hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
127add1ede6fc7e323acde12acceb115ae953001
463
py
Python
tentacruel/heos_watcher/__init__.py
paulhoule/tentacruel
600f39157598b762226a1c07d78966981da5f7f9
[ "MIT" ]
null
null
null
tentacruel/heos_watcher/__init__.py
paulhoule/tentacruel
600f39157598b762226a1c07d78966981da5f7f9
[ "MIT" ]
39
2019-01-12T00:00:48.000Z
2019-05-08T02:06:36.000Z
tentacruel/heos_watcher/__init__.py
paulhoule/tentacruel
600f39157598b762226a1c07d78966981da5f7f9
[ "MIT" ]
null
null
null
from uuid import UUID HEOS_NS = UUID('003df636-ad90-11e9-aca1-9eb6d06a70c5') attributes = { "/player_volume_changed": { "device_id": "pid", "name": "heos.volume", "subattributes": ["level", "mute"] }, "/player_now_playing_progress": { "device_id": "pid", "name": "heo...
24.368421
54
0.61987
from uuid import UUID from aio_pika import Exchange from tentacruel import HeosClientProtocol HEOS_NS = UUID('003df636-ad90-11e9-aca1-9eb6d06a70c5') attributes = { "/player_volume_changed": { "device_id": "pid", "name": "heos.volume", "subattributes": ["level", "mute"] }, "/player_...
0
0
0
0
0
0
0
28
45
0af00527171f4fdb332cc8b7ff7cfbe536057074
1,257
py
Python
demo/amrparsing/create_span_concept_dict.py
raosudha89/vowpal_wabbit
03e973838e022149d802ec3f5e2817dcbc9019d5
[ "BSD-3-Clause" ]
2
2016-05-20T16:27:07.000Z
2021-10-01T16:35:53.000Z
demo/amrparsing/create_span_concept_dict.py
Sandy4321/vowpal_wabbit-1
03e973838e022149d802ec3f5e2817dcbc9019d5
[ "BSD-3-Clause" ]
null
null
null
demo/amrparsing/create_span_concept_dict.py
Sandy4321/vowpal_wabbit-1
03e973838e022149d802ec3f5e2817dcbc9019d5
[ "BSD-3-Clause" ]
1
2021-10-01T16:35:54.000Z
2021-10-01T16:35:54.000Z
import sys import cPickle as pickle from collections import OrderedDict argv = sys.argv[1:] if len(argv) < 1: print "usage: create_span_concept_dict.py <span_concept_dataset.p> <output_filename>" sys.exit() span_concept_dataset = pickle.load(open(argv[0], "rb")) output_filename = argv[1] output_file = open(output_f...
34.916667
112
0.739857
import sys import cPickle as pickle from collections import OrderedDict argv = sys.argv[1:] if len(argv) < 1: print "usage: create_span_concept_dict.py <span_concept_dataset.p> <output_filename>" sys.exit() span_concept_dataset = pickle.load(open(argv[0], "rb")) output_filename = argv[1] output_file = open(output_f...
0
0
0
0
0
0
0
0
0
8642c823acca4db3ebf91ee66a8a446df6a868a9
55,071
py
Python
coverage_test_proxy.py
urbas/CoAPthon3
f6a3c25cde5371fb003a18b94a8f8e8bee5c534a
[ "MIT" ]
51
2018-01-26T16:47:38.000Z
2022-01-18T08:44:20.000Z
coverage_test_proxy.py
urbas/CoAPthon3
f6a3c25cde5371fb003a18b94a8f8e8bee5c534a
[ "MIT" ]
28
2018-02-21T12:24:21.000Z
2021-08-03T15:50:06.000Z
coverage_test_proxy.py
urbas/CoAPthon3
f6a3c25cde5371fb003a18b94a8f8e8bee5c534a
[ "MIT" ]
48
2018-01-29T08:55:53.000Z
2021-10-17T00:38:19.000Z
# -*- coding: utf-8 -*- import unittest __author__ = 'Giacomo Tanganelli' __version__ = "2.0" if __name__ == '__main__': unittest.main()
38.727848
123
0.603348
# -*- coding: utf-8 -*- from queue import Queue import random import socket import threading import unittest from coapclient import HelperClient from coapforwardproxy import CoAPForwardProxy from coapserver import CoAPServer from coapthon import defines from coapthon.messages.option import Option from coapthon.messag...
0
0
0
54,506
0
0
0
131
289
460b7bbb44e83bb656c795546fd27222fb6d006d
1,948
py
Python
tests/run_trading_bot_test.py
Ricky294/cryptodata
da9cbcfdfa155830b3e877e9d5736dace17ced88
[ "MIT" ]
null
null
null
tests/run_trading_bot_test.py
Ricky294/cryptodata
da9cbcfdfa155830b3e877e9d5736dace17ced88
[ "MIT" ]
null
null
null
tests/run_trading_bot_test.py
Ricky294/cryptodata
da9cbcfdfa155830b3e877e9d5736dace17ced88
[ "MIT" ]
null
null
null
# candle_stream( # symbol="btcusdt", # interval="1h", # candles=candles, # on_open=on_open, # on_close=on_close, # on_candle=on_candle, # on_candle_close=on_candle_close, # )
23.190476
87
0.676078
from datetime import datetime import pandas as pd import websocket from tests import tests_path from crypto_data.shared.utils import exclude_values from crypto_data.binance.extract import get_candles, get_latest_candle_timestamp from crypto_data.binance.schema import ( OPEN_TIME, OPEN_PRICE, CLOSE_PRICE, ...
0
0
0
0
0
1,168
0
250
293
d022948a48bb25e619e60df0d1f33e7b1a71f499
2,689
py
Python
server/video_process.py
brycecorbitt/FlashGuard
e018595fa7474065b6359c95b6ee78d2dfee24d5
[ "MIT" ]
null
null
null
server/video_process.py
brycecorbitt/FlashGuard
e018595fa7474065b6359c95b6ee78d2dfee24d5
[ "MIT" ]
null
null
null
server/video_process.py
brycecorbitt/FlashGuard
e018595fa7474065b6359c95b6ee78d2dfee24d5
[ "MIT" ]
2
2019-05-29T15:18:16.000Z
2020-06-02T16:08:44.000Z
import youtube_dl import os FLASH_MINIMUM = 3 tmp_dir = 'temp/' ex = {'format': 'worstvideo[vcodec^=avc1][fps=30]/worst[vcodec^=avc1][fps=30]/worstvideo[vcodec=vp9][fps=30]/worst[vcodec=vp9][fps=30]', 'outtmpl': 'temp/temp.%(ext)s', 'recode_video': 'webm'} ytdl = youtube_dl.YoutubeDL(ex) if not os.path.isdir(tmp_di...
24.225225
192
0.605058
import cv2 import youtube_dl import numpy as np import os import time FLASH_MINIMUM = 3 tmp_dir = 'temp/' ex = {'format': 'worstvideo[vcodec^=avc1][fps=30]/worst[vcodec^=avc1][fps=30]/worstvideo[vcodec=vp9][fps=30]/worst[vcodec=vp9][fps=30]', 'outtmpl': 'temp/temp.%(ext)s', 'recode_video': 'webm'} ytdl = youtube_dl....
0
0
0
0
0
1,848
0
-24
227
8a02077158eed84ba37ce6ea33e5f141cd7a9c06
15,524
py
Python
slim/nets/inception_v4.py
svedi/tensorflow_models
0d58acf27841c5591b7caad8fc7e3498c219f382
[ "Apache-2.0" ]
null
null
null
slim/nets/inception_v4.py
svedi/tensorflow_models
0d58acf27841c5591b7caad8fc7e3498c219f382
[ "Apache-2.0" ]
null
null
null
slim/nets/inception_v4.py
svedi/tensorflow_models
0d58acf27841c5591b7caad8fc7e3498c219f382
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
47.91358
80
0.622327
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
0
0
0
0
0
75
0
0
25
c7d0a67ce9575c64567f250d546dfe7a3a82b6d0
6,625
py
Python
pyopentsdb/query.py
mikecokina/pyopentsdb
b8d78e8f42aed4ebbd6ac3aff925071de41d6b52
[ "MIT" ]
2
2018-05-09T08:34:30.000Z
2018-09-25T22:42:09.000Z
pyopentsdb/query.py
mikecokina/pyopentsdb
b8d78e8f42aed4ebbd6ac3aff925071de41d6b52
[ "MIT" ]
2
2018-12-24T10:51:30.000Z
2019-01-21T13:55:11.000Z
pyopentsdb/query.py
mikecokina/pyopentsdb
b8d78e8f42aed4ebbd6ac3aff925071de41d6b52
[ "MIT" ]
null
null
null
from queue import Queue from threading import Thread from pyopentsdb import errors from pyopentsdb.utils import request_post from pyopentsdb.conf import QueryPointer def tsdb_query_metrics_validation(**kwargs): """ looking for metric and all related and required arguments in kwargs specified in ...
34.505208
115
0.637736
from queue import Queue from queue import Empty from threading import Thread from pyopentsdb import errors from pyopentsdb.utils import request_post from pyopentsdb.conf import QueryPointer class IterableQueue(object): """ Transform standard python Queue instance to iterable one""" def __init__(self, source...
0
0
0
398
0
726
0
2
94
68fe1bd2aeb26294f3009435d3e3d763b7b7ffa7
10,564
py
Python
old_versions/sgnn_pl_pure/loss.py
goodok/sgnn
a1ea5023c5b7e4f1a66afd1daed10a60786e6ac1
[ "MIT" ]
2
2020-08-10T13:55:01.000Z
2020-08-13T16:06:25.000Z
old_versions/sgnn_pl_pure/loss.py
goodok/sgnn
a1ea5023c5b7e4f1a66afd1daed10a60786e6ac1
[ "MIT" ]
null
null
null
old_versions/sgnn_pl_pure/loss.py
goodok/sgnn
a1ea5023c5b7e4f1a66afd1daed10a60786e6ac1
[ "MIT" ]
2
2020-11-13T17:48:13.000Z
2020-11-13T17:50:35.000Z
UNK_THRESH = 2 #UNK_THRESH = 3 UNK_ID = -1 # note: weight_missing_geo must be > 1 # hierarchical loss
45.339056
230
0.648429
import numpy as np import torch import torch.nn.functional as F import sparseconvnet as scn import data_util UNK_THRESH = 2 #UNK_THRESH = 3 UNK_ID = -1 def compute_targets(target, hierarchy, num_hierarchy_levels, truncation, use_loss_masking, known): assert(len(target.shape) == 5) target_for_occs = [None]...
0
0
0
0
0
10,160
0
-1
295
8673e63a5911ec7d23cefb57c9ad17a81189a8e3
5,978
py
Python
geomstats/integrator.py
YannCabanes/geomstats
ce3f4bab6cd59c2f071371a46e336086771d0493
[ "MIT" ]
2
2022-03-30T00:47:45.000Z
2022-03-31T18:22:16.000Z
geomstats/integrator.py
YannCabanes/geomstats
ce3f4bab6cd59c2f071371a46e336086771d0493
[ "MIT" ]
null
null
null
geomstats/integrator.py
YannCabanes/geomstats
ce3f4bab6cd59c2f071371a46e336086771d0493
[ "MIT" ]
null
null
null
r"""Integrator functions used when no closed forms are available. Lead author: Nicolas Guigui. These are designed for first order ODE written of a variable x and a time variable t: .. math:: \frac{dx}{dt} = force(x, t) where :math: `x` is called the state variable. It may represent many variable...
28.065728
79
0.607059
r"""Integrator functions used when no closed forms are available. Lead author: Nicolas Guigui. These are designed for first order ODE written of a variable x and a time variable t: .. math:: \frac{dx}{dt} = force(x, t) where :math: `x` is called the state variable. It may represent many variable...
6
0
0
0
0
0
0
0
0
4bcfe6f5e75c6f352c785ad65e7375a9edd97d19
3,524
py
Python
haipproxy/scheduler.py
searchlyf/haipproxy
33be5298c2dc11372b6faa8ec7f4c10d3bcb7ec1
[ "MIT" ]
null
null
null
haipproxy/scheduler.py
searchlyf/haipproxy
33be5298c2dc11372b6faa8ec7f4c10d3bcb7ec1
[ "MIT" ]
null
null
null
haipproxy/scheduler.py
searchlyf/haipproxy
33be5298c2dc11372b6faa8ec7f4c10d3bcb7ec1
[ "MIT" ]
null
null
null
""" This module schedules all the tasks according to config.rules. """ import logging from haipproxy.config.rules import CRAWLER_TASKS from haipproxy.settings import (SPIDER_AJAX_Q, SPIDER_GFW_Q, SPIDER_AJAX_GFW_Q) DEFAULT_CRAWLER_QS = [SPIDER_AJAX_Q, SPIDER_GFW_Q, SPIDER_AJAX_GFW_Q] logger = logging.getLogger(__name...
30.119658
85
0.648978
""" This module schedules all the tasks according to config.rules. """ import click import logging import multiprocessing import schedule import time from scrapy.crawler import CrawlerRunner from scrapy.utils.project import get_project_settings from twisted.internet import reactor from haipproxy.client import SquidCl...
0
0
0
2,225
0
232
0
192
291
a343dd3be46b0b1c71ff80808ad25d2733b56f65
1,176
py
Python
NLP/libs/NLP/classification/train_data.py
YarosJ/prestige-of-districts
56ef437bff3f55e843a0602e0d33467582a50e5d
[ "MIT" ]
6
2019-04-30T11:01:10.000Z
2021-02-17T17:58:24.000Z
NLP/libs/NLP/classification/train_data.py
YarosJ/prestige-of-districts
56ef437bff3f55e843a0602e0d33467582a50e5d
[ "MIT" ]
null
null
null
NLP/libs/NLP/classification/train_data.py
YarosJ/prestige-of-districts
56ef437bff3f55e843a0602e0d33467582a50e5d
[ "MIT" ]
1
2019-09-25T03:19:52.000Z
2019-09-25T03:19:52.000Z
#!/usr/bin/env python # coding: utf8 from __future__ import unicode_literals categories = {'FAULT': 0, 'INFO': 0, 'TOXIC': 0, 'REPAIR': 0}
30.947368
123
0.647109
#!/usr/bin/env python # coding: utf8 from __future__ import unicode_literals import random import operator from typing import Dict categories = {'FAULT': 0, 'INFO': 0, 'TOXIC': 0, 'REPAIR': 0} def train_data(*args, coefficient: float = 20): categories_counts: Dict[str, float] = categories.copy() result = []...
0
0
0
0
0
957
0
-12
89
30efe457e2cdfa8b5a921c646458acb2e2e64f67
279
py
Python
Code/stacks-and-queues/reverse.py
lukeaparker/CS1.3-Data-Struct
2b09fa95ddb1fd3e21c42ccacdc9e19fc53382a8
[ "MIT" ]
null
null
null
Code/stacks-and-queues/reverse.py
lukeaparker/CS1.3-Data-Struct
2b09fa95ddb1fd3e21c42ccacdc9e19fc53382a8
[ "MIT" ]
null
null
null
Code/stacks-and-queues/reverse.py
lukeaparker/CS1.3-Data-Struct
2b09fa95ddb1fd3e21c42ccacdc9e19fc53382a8
[ "MIT" ]
null
null
null
input_num = '22235253534090' reverse(input_num)
14.684211
28
0.569892
input_num = '22235253534090' def reverse(input_num): stack1 = [] stack2 = [] for i in input_num: stack1.append(i) for i in stack1: pop = stack1.pop() stack2.insert(0, i) print(stack2) return stack2 reverse(input_num)
0
0
0
0
0
195
0
0
23
d506975b831bb63cb8084904c0509b92d0510073
12,478
py
Python
research/cv/cct/src/models/cct/cct.py
mindspore-ai/models
9127b128e2961fd698977e918861dadfad00a44c
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/cct/src/models/cct/cct.py
mindspore-ai/models
9127b128e2961fd698977e918861dadfad00a44c
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/cct/src/models/cct/cct.py
mindspore-ai/models
9127b128e2961fd698977e918861dadfad00a44c
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
25.780992
79
0.578699
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
0
0
0
2,763
0
0
0
122
112
b7bbadbd5e3fea86210ad485005e52358c20ba8f
2,769
py
Python
pyproj/utils.py
matthew-brett/pyproj
5749ae3448041fa2a9e1444ef9d569ae6c2b9976
[ "MIT" ]
null
null
null
pyproj/utils.py
matthew-brett/pyproj
5749ae3448041fa2a9e1444ef9d569ae6c2b9976
[ "MIT" ]
null
null
null
pyproj/utils.py
matthew-brett/pyproj
5749ae3448041fa2a9e1444ef9d569ae6c2b9976
[ "MIT" ]
null
null
null
from array import array def _copytobuffer(x): """ return a copy of x as an object that supports the python Buffer API (python array if input is float, list or tuple, numpy array if input is a numpy array). returns copyofx, isfloat, islist, istuple (islist is True if input is a list, istuple is tr...
34.185185
84
0.548935
from array import array def _copytobuffer_return_scalar(x): try: # inx,isfloat,islist,istuple return array("d", (float(x),)), True, False, False except: raise TypeError("input must be an array, list, tuple or scalar") def _copytobuffer(x): """ return a copy of x as an object ...
0
0
0
0
0
464
0
0
46
b86241b35ed456fca8e62338d08ae2fe58b443e5
514
py
Python
aao/spiders/__init__.py
rkenny2/aao
57ccba1b833bfbb030616d1c1f69015b7ac65af2
[ "MIT" ]
27
2018-08-20T09:31:07.000Z
2022-03-31T06:12:50.000Z
aao/spiders/__init__.py
rkenny2/aao
57ccba1b833bfbb030616d1c1f69015b7ac65af2
[ "MIT" ]
null
null
null
aao/spiders/__init__.py
rkenny2/aao
57ccba1b833bfbb030616d1c1f69015b7ac65af2
[ "MIT" ]
4
2018-07-15T23:34:02.000Z
2021-05-28T15:39:47.000Z
import importlib package = 'aao.spiders.bookmakers' SpiderBet365 = importlib.import_module( '.bet365', package).SpiderBet365 SpiderBwin = importlib.import_module( '.bwin', package).SpiderBwin Spider888sport = importlib.import_module( '.888sport', package).Spider888sport SpiderWilliamhill = importlib.impor...
25.7
46
0.743191
import importlib package = 'aao.spiders.bookmakers' SpiderBet365 = importlib.import_module( '.bet365', package).SpiderBet365 SpiderBwin = importlib.import_module( '.bwin', package).SpiderBwin Spider888sport = importlib.import_module( '.888sport', package).Spider888sport SpiderWilliamhill = importlib.impor...
0
0
0
0
0
0
0
0
0
0b23dcf2a889f6d295e096ffba1f1642692453de
2,279
py
Python
statsSend/jenkins/jenkinsJob.py
luigiberrettini/build-deploy-stats
52a0bf5aeb8d2f8ef62e4e836eb0b9874dea500d
[ "MIT" ]
2
2017-07-04T14:30:35.000Z
2017-07-04T16:04:53.000Z
statsSend/jenkins/jenkinsJob.py
luigiberrettini/build-deploy-stats
52a0bf5aeb8d2f8ef62e4e836eb0b9874dea500d
[ "MIT" ]
null
null
null
statsSend/jenkins/jenkinsJob.py
luigiberrettini/build-deploy-stats
52a0bf5aeb8d2f8ef62e4e836eb0b9874dea500d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3
36.758065
107
0.584906
#!/usr/bin/env python3 from reporting.category import Category from statsSend.jenkins.jenkinsBuild import JenkinsBuild class JenkinsJob: def __init__(self, session, url): self.session = session self.url = url self.builds = [] @property def id(self): return '/'.join(self.ur...
0
70
628
1,439
0
0
0
52
68
a7bd2c4211c196da6104a551e21f6df02b968760
6,004
py
Python
setupsrc/pl_setup/update_pdfium.py
pypdfium2-team/pypdfium2
9a1796ba9f058102997652086a48e28af9cd3579
[ "Apache-2.0", "BSD-3-Clause" ]
17
2021-12-13T05:36:20.000Z
2022-03-13T22:56:16.000Z
setupsrc/pl_setup/update_pdfium.py
pypdfium2-team/pypdfium2
9a1796ba9f058102997652086a48e28af9cd3579
[ "Apache-2.0", "BSD-3-Clause" ]
51
2021-12-04T13:21:35.000Z
2022-03-28T13:33:29.000Z
setupsrc/pl_setup/update_pdfium.py
pypdfium2-team/pypdfium2
9a1796ba9f058102997652086a48e28af9cd3579
[ "Apache-2.0", "BSD-3-Clause" ]
2
2022-02-01T22:56:47.000Z
2022-03-16T13:26:35.000Z
#! /usr/bin/env python3 # SPDX-FileCopyrightText: 2022 geisserml <geisserml@gmail.com> # SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause # Download the PDFium binaries and generate ctypes bindings import sys from os.path import abspath, dirname sys.path.insert(0, dirname(dirname(abspath(__file__)))) from pl_setup...
29.004831
106
0.650067
#! /usr/bin/env python3 # SPDX-FileCopyrightText: 2022 geisserml <geisserml@gmail.com> # SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause # Download the PDFium binaries and generate ctypes bindings import os import sys import shutil import tarfile import argparse import traceback from urllib import request from os...
0
0
0
0
0
4,326
0
90
408
55f548e6457977df06ca2f504c649c7bb491fcb8
217
py
Python
gin/i_o/test/test_create_dataset_from_smiles.py
choderalab/gin
9082431d8b664699a898c1e2fa490a18737d6e2d
[ "MIT" ]
24
2019-07-20T22:37:09.000Z
2021-07-07T07:13:56.000Z
gin/i_o/test/test_create_dataset_from_smiles.py
choderalab/gin
9082431d8b664699a898c1e2fa490a18737d6e2d
[ "MIT" ]
3
2021-05-10T05:29:59.000Z
2022-02-10T00:15:05.000Z
gin/i_o/test/test_create_dataset_from_smiles.py
kuano-ai/gimlet
9082431d8b664699a898c1e2fa490a18737d6e2d
[ "MIT" ]
8
2019-08-09T17:30:20.000Z
2021-12-01T13:27:46.000Z
from gin.i_o.from_smiles import to_mols import pandas as pd df = pd.read_csv('data/delaney-processed.csv') smiles_array = df[['smiles']].values.flatten() mols = to_mols(smiles_array) for mol in mols: print(mol)
21.7
46
0.741935
from gin.i_o.from_smiles import to_mols import pandas as pd df = pd.read_csv('data/delaney-processed.csv') smiles_array = df[['smiles']].values.flatten() mols = to_mols(smiles_array) for mol in mols: print(mol)
0
0
0
0
0
0
0
0
0
20c79a53cae917612c347763df25a19850ccdcfb
981
py
Python
web/helpdesk/migrations/0008_auto_20170116_1712.py
stesla/arxcode
a0ebf7c4d310de8c1980a8ba2a48948a68bb5a0a
[ "MIT" ]
5
2019-03-16T08:26:53.000Z
2019-11-27T15:42:16.000Z
web/helpdesk/migrations/0008_auto_20170116_1712.py
stesla/arxcode
a0ebf7c4d310de8c1980a8ba2a48948a68bb5a0a
[ "MIT" ]
7
2018-09-29T05:08:15.000Z
2021-06-10T21:35:32.000Z
web/helpdesk/migrations/0008_auto_20170116_1712.py
stesla/arxcode
a0ebf7c4d310de8c1980a8ba2a48948a68bb5a0a
[ "MIT" ]
7
2018-09-19T21:11:29.000Z
2019-11-19T12:46:14.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2017-01-16 17:12 from __future__ import unicode_literals
36.333333
255
0.626911
# -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2017-01-16 17:12 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('helpdesk', '0007_ticket_submitting_room'), ] operat...
0
0
0
770
0
0
0
30
68
4cc04dddb430b232152853948a3923ccef6094d7
157
py
Python
StringCompare.py
shakaka/ExcelReading
25e26cdd98ee1bc5c9fda24b4b3645b23f0de46e
[ "Apache-2.0" ]
1
2020-08-20T12:44:46.000Z
2020-08-20T12:44:46.000Z
StringCompare.py
shakaka/ExcelReading
25e26cdd98ee1bc5c9fda24b4b3645b23f0de46e
[ "Apache-2.0" ]
null
null
null
StringCompare.py
shakaka/ExcelReading
25e26cdd98ee1bc5c9fda24b4b3645b23f0de46e
[ "Apache-2.0" ]
null
null
null
PhoneDirectory = ['John:009878788677' , 'Jefrey:67654654645' , 'Maria:8787677766'] for entry in PhoneDirectory: if '7' in entry: print('yeah')
22.428571
82
0.66879
PhoneDirectory = ['John:009878788677' , 'Jefrey:67654654645' , 'Maria:8787677766'] for entry in PhoneDirectory: if '7' in entry: print('yeah')
0
0
0
0
0
0
0
0
0
b71edf427ff507754fa7cb3b8c604e5c6c67b139
2,055
py
Python
puzzle15/part_two.py
Tomer23/advent-of-code-2021
6781616807c9e5910cd4fe512aa9a3a9ec6738e2
[ "Apache-2.0" ]
null
null
null
puzzle15/part_two.py
Tomer23/advent-of-code-2021
6781616807c9e5910cd4fe512aa9a3a9ec6738e2
[ "Apache-2.0" ]
null
null
null
puzzle15/part_two.py
Tomer23/advent-of-code-2021
6781616807c9e5910cd4fe512aa9a3a9ec6738e2
[ "Apache-2.0" ]
null
null
null
FILENAME = './puzzle15/data/input' small_cave = [] with open(FILENAME) as file: for line in file: small_cave.append([int(x) for x in list(line.strip())]) small_n = len(small_cave) large_n = small_n * 5 cave = [[ 0 for _ in range(large_n)] for _ in range(large_n)] for i in range(large_n): ...
33.145161
82
0.491971
FILENAME = './puzzle15/data/input' small_cave = [] with open(FILENAME) as file: for line in file: small_cave.append([int(x) for x in list(line.strip())]) small_n = len(small_cave) large_n = small_n * 5 cave = [[ 0 for _ in range(large_n)] for _ in range(large_n)] for i in range(large_n): ...
0
0
0
0
0
0
0
0
0
5d5ff45542bf2d1b577667a9265c1f9131176d2e
38
py
Python
Python/Introduction/Say ''Hello, World!'' With Python/solution.py
TanishqBhargava/HackerRank
a9fd69a19b7cfca864460c1bec63525f4d023e13
[ "Apache-2.0" ]
7
2020-04-02T16:18:46.000Z
2021-02-12T14:06:44.000Z
Python/Introduction/Say ''Hello, World!'' With Python/solution.py
hamzaV2000/HackerRank-1
a9fd69a19b7cfca864460c1bec63525f4d023e13
[ "Apache-2.0" ]
null
null
null
Python/Introduction/Say ''Hello, World!'' With Python/solution.py
hamzaV2000/HackerRank-1
a9fd69a19b7cfca864460c1bec63525f4d023e13
[ "Apache-2.0" ]
11
2020-05-06T08:28:43.000Z
2021-12-08T17:25:45.000Z
#!/bin/python3 print("Hello, World!")
12.666667
22
0.657895
#!/bin/python3 print("Hello, World!")
0
0
0
0
0
0
0
0
0
3865ef09a643d534599f12dec74093133848f10f
4,675
py
Python
freerouting-1-4-4-pm/3-build-distribution-with-jdk-14.py
pierremolinaro/ElCanari
fd9d87cee18ad484da263959a1c08424c7264eaf
[ "MIT" ]
3
2019-12-18T12:47:51.000Z
2020-12-21T14:07:43.000Z
freerouting-1-4-4-pm/3-build-distribution-with-jdk-14.py
pierremolinaro/ElCanari
fd9d87cee18ad484da263959a1c08424c7264eaf
[ "MIT" ]
1
2018-09-11T09:11:45.000Z
2018-09-12T12:13:10.000Z
freerouting-1-4-4-pm/3-build-distribution-with-jdk-14.py
pierremolinaro/ElCanari
fd9d87cee18ad484da263959a1c08424c7264eaf
[ "MIT" ]
null
null
null
#! /usr/bin/env python # -*- coding: UTF-8 -*- #------------------------------------------------------------------------------ # https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html #-------------------------------------------------------------------...
30.555556
147
0.543316
#! /usr/bin/env python # -*- coding: UTF-8 -*- #------------------------------------------------------------------------------ # https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html #-------------------------------------------------------------------...
0
0
0
0
0
293
0
12
23
0bf8e8edc7e5afc247166fdd4df07eace630c1df
21,091
py
Python
train_bboxnet.py
alvari1997/cluster_classifier
36a40631704a4e47fb84cc3f162b7867ef600fbf
[ "MIT" ]
null
null
null
train_bboxnet.py
alvari1997/cluster_classifier
36a40631704a4e47fb84cc3f162b7867ef600fbf
[ "MIT" ]
null
null
null
train_bboxnet.py
alvari1997/cluster_classifier
36a40631704a4e47fb84cc3f162b7867ef600fbf
[ "MIT" ]
null
null
null
from __future__ import print_function import argparse import os import random import torch import torch.nn.parallel import torch.optim as optim import torch.utils.data from pointnet.dataset import BoxDataset from pointnet.box_model import BoxNet import numpy as np import matplotlib.pyplot as plt import time from model_...
39.79434
210
0.555261
from __future__ import print_function import argparse from cProfile import label from dis import dis import os import random from socket import MSG_DONTROUTE from sklearn import cluster import torch import torch.nn.parallel import torch.optim as optim import torch.utils.data from pointnet.dataset import LidarDataset, B...
0
0
0
0
0
0
0
137
154
c890e90a3e98b6bea29fc02df9a08e7506ee1738
855
py
Python
questions/permutations/Solution.py
marcus-aurelianus/leetcode-solutions
8b43e72fe1f51c84abc3e89b181ca51f09dc7ca6
[ "MIT" ]
141
2017-12-12T21:45:53.000Z
2022-03-25T07:03:39.000Z
questions/permutations/Solution.py
marcus-aurelianus/leetcode-solutions
8b43e72fe1f51c84abc3e89b181ca51f09dc7ca6
[ "MIT" ]
32
2015-10-05T14:09:52.000Z
2021-05-30T10:28:41.000Z
questions/permutations/Solution.py
marcus-aurelianus/leetcode-solutions
8b43e72fe1f51c84abc3e89b181ca51f09dc7ca6
[ "MIT" ]
56
2015-09-30T05:23:28.000Z
2022-03-08T07:57:11.000Z
''' Given a collection of distinct integers, return all possible permutations. Example: Input: [1,2,3] Output: [ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1] ] '''
21.923077
74
0.48655
''' Given a collection of distinct integers, return all possible permutations. Example: Input: [1,2,3] Output: [ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1] ] ''' class Solution: def permute(self, nums: List[int]) -> List[List[int]]: def generate_permutation(nums, ret, curr, visited...
0
0
0
645
0
0
0
0
23
2a67c24d6509b5402887a363e7b1d2d6392f873a
3,211
py
Python
src/nn-mnist.py
NormalReedus/cds-visual-analytics
4c71251dd71f1850fd9b09c494f766bc6125e747
[ "MIT" ]
null
null
null
src/nn-mnist.py
NormalReedus/cds-visual-analytics
4c71251dd71f1850fd9b09c494f766bc6125e747
[ "MIT" ]
null
null
null
src/nn-mnist.py
NormalReedus/cds-visual-analytics
4c71251dd71f1850fd9b09c494f766bc6125e747
[ "MIT" ]
null
null
null
import sys sys.path.append("..") import argparse from pathlib import Path # Import teaching utils # Import sklearn metrics if __name__ == '__main__': parser = argparse.ArgumentParser(description = "train neural network on the full MNIST dataset and view the classifier metrics") parser.add_argument("-d",...
38.22619
166
0.721893
import os import sys sys.path.append("..") import argparse from pathlib import Path # Import teaching utils import pandas as pd import numpy as np from utils.neuralnetwork import NeuralNetwork # Import sklearn metrics from sklearn import metrics from sklearn.datasets import fetch_openml from sklearn.model_selection i...
0
0
0
0
0
2,241
0
91
222
8e07f6d0a40c30c1ae062554ab83d36a008a77cc
1,451
py
Python
flexneuart/ir_datasets/base.py
gitter-badger/FlexNeuART
f69e5421bdebe9db0d993b5470dace61872f90df
[ "Apache-2.0" ]
101
2020-08-06T07:06:00.000Z
2022-03-02T15:25:59.000Z
flexneuart/ir_datasets/base.py
gitter-badger/FlexNeuART
f69e5421bdebe9db0d993b5470dace61872f90df
[ "Apache-2.0" ]
9
2020-11-05T23:17:06.000Z
2021-08-21T06:07:30.000Z
flexneuart/ir_datasets/base.py
gitter-badger/FlexNeuART
f69e5421bdebe9db0d993b5470dace61872f90df
[ "Apache-2.0" ]
17
2020-09-09T22:08:03.000Z
2022-03-25T09:50:30.000Z
# # Copyright 2014+ Carnegie Mellon University # # 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 ag...
38.184211
92
0.680221
# # Copyright 2014+ Carnegie Mellon University # # 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 ag...
0
0
0
707
0
0
0
0
23
3e208f6701e2557c8499a4694562c2b1b0ec266b
1,289
py
Python
yamlip.py
jjmurre/yamlip
479c4c7a476a922354191eb3bb2601550784fdbd
[ "MIT" ]
null
null
null
yamlip.py
jjmurre/yamlip
479c4c7a476a922354191eb3bb2601550784fdbd
[ "MIT" ]
null
null
null
yamlip.py
jjmurre/yamlip
479c4c7a476a922354191eb3bb2601550784fdbd
[ "MIT" ]
null
null
null
"""yamlip - A yaml interpolation tool""" __version__ = '0.0.1' __author__ = 'Jan Murre <jan.murre@catalyz.nl>' __all__ = []
26.306122
90
0.679597
"""yamlip - A yaml interpolation tool""" __version__ = '0.0.1' __author__ = 'Jan Murre <jan.murre@catalyz.nl>' __all__ = [] import functools from string import Template from attrdict import AttrDict import yaml import click class DotTemplate(Template): idpattern = r"[a-z][\.\-_a-z0-9]*" def rgetattr(obj, init...
0
275
0
46
0
646
0
-10
203
afe5f5cbf718b4ce6119b99515def79331c8a71c
1,084
py
Python
datastructure/practice/c7/c_7_39.py
stoneyangxu/python-kata
979af91c74718a525dcd2a83fe53ec6342af9741
[ "MIT" ]
null
null
null
datastructure/practice/c7/c_7_39.py
stoneyangxu/python-kata
979af91c74718a525dcd2a83fe53ec6342af9741
[ "MIT" ]
null
null
null
datastructure/practice/c7/c_7_39.py
stoneyangxu/python-kata
979af91c74718a525dcd2a83fe53ec6342af9741
[ "MIT" ]
null
null
null
import unittest if __name__ == '__main__': unittest.main()
21.68
57
0.640221
import unittest from datastructure.links.PositionList import PositionList class PositionalQueue: def __init__(self): self._position_list = PositionList() def __len__(self): return len(self._position_list) def is_empty(self): return self._position_list.is_empty() def enqueue(...
0
0
0
913
0
0
0
36
68
d2bbec169cf1fbb94e5c0ece719624ec9804f905
2,166
py
Python
mergify_engine/tests/unit/rules/test_parser.py
Madhu-1/mergify-engine
9ca4f4697cc825230b1584f5587f10393cabc971
[ "Apache-2.0" ]
null
null
null
mergify_engine/tests/unit/rules/test_parser.py
Madhu-1/mergify-engine
9ca4f4697cc825230b1584f5587f10393cabc971
[ "Apache-2.0" ]
null
null
null
mergify_engine/tests/unit/rules/test_parser.py
Madhu-1/mergify-engine
9ca4f4697cc825230b1584f5587f10393cabc971
[ "Apache-2.0" ]
null
null
null
# -*- encoding: utf-8 -*- # # Copyright 2018 Julien Danjou <jd@mergify.io> # # 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 requ...
39.381818
85
0.545706
# -*- encoding: utf-8 -*- # # Copyright © 2018 Julien Danjou <jd@mergify.io> # # 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 req...
4
0
0
0
0
1,421
0
5
113
fd3666ee0fab2cd9c640657bd1edaac0f3682818
10,562
py
Python
marsyas-vamp/marsyas/scripts/large-evaluators/tempo-reference-implementation/beat_histogram.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
marsyas-vamp/marsyas/scripts/large-evaluators/tempo-reference-implementation/beat_histogram.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
marsyas-vamp/marsyas/scripts/large-evaluators/tempo-reference-implementation/beat_histogram.py
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
import scipy.fftpack def autocorrelation(signal): """ this matches Marsyas exactly. """ N = signal.shape[1] ffts = scipy.fftpack.fft(signal, 2*N, axis=1) / (2*N) ffts_abs = abs(ffts) ffts_abs_scaled = ffts_abs**0.5 scratch = (scipy.fftpack.ifft(ffts_abs_scaled, axis=1 ).real)*(2*N) ...
30.703488
83
0.506249
import math import itertools import operator import numpy import pylab import scipy.fftpack import overlap def autocorrelation(signal): """ this matches Marsyas exactly. """ N = signal.shape[1] ffts = scipy.fftpack.fft(signal, 2*N, axis=1) / (2*N) ffts_abs = abs(ffts) ffts_abs_scaled = ffts_abs**...
0
0
0
0
0
9,846
0
-46
345
6f8a5b379f68a2e3171d1a9f70029cb8a66e0056
7,359
py
Python
brain-bert/utils/utils.py
MrDoghead/brain-commonsense
8af7ab25d9113c623660e6eb928de0f4a43abd20
[ "MIT" ]
null
null
null
brain-bert/utils/utils.py
MrDoghead/brain-commonsense
8af7ab25d9113c623660e6eb928de0f4a43abd20
[ "MIT" ]
null
null
null
brain-bert/utils/utils.py
MrDoghead/brain-commonsense
8af7ab25d9113c623660e6eb928de0f4a43abd20
[ "MIT" ]
null
null
null
# train/test is the full NLP feature # train/test_pca is the NLP feature reduced to 10 dimensions via PCA that has been fit on the training data # feat_dir is the directory where the NLP features are stored # train_indicator is an array of 0s and 1s indicating whether the word at this index is in the training se...
38.528796
176
0.646963
import numpy as np from sklearn.decomposition import PCA from scipy.stats import zscore import time import csv import os import nibabel from sklearn.metrics.pairwise import euclidean_distances from scipy.ndimage.filters import gaussian_filter from utils.ridge_tools import cross_val_ridge, corr import time as tm import...
0
0
0
0
0
6,538
0
60
434
5bab5badf9683279c88080d58b0c2344b2ed1d22
1,344
py
Python
main.py
GustavoHdezH/Website-Blocker
df6e2bee470399404653274f906e3463afee5f0a
[ "MIT" ]
null
null
null
main.py
GustavoHdezH/Website-Blocker
df6e2bee470399404653274f906e3463afee5f0a
[ "MIT" ]
null
null
null
main.py
GustavoHdezH/Website-Blocker
df6e2bee470399404653274f906e3463afee5f0a
[ "MIT" ]
null
null
null
import time from datetime import datetime as dt """ host files for windows windows c:\windows\system32\drivers\etc host files for linux & Mac /ect/hosts """ # list paths hosts_path_system = r"C:\Windows\System32\drivers\etc\hosts" host_dir = hosts_path_system #host_dir = "hosts" local redir = "127.0.0.1" # ...
31.255814
136
0.58631
import time from datetime import datetime as dt """ host files for windows windows c:\windows\system32\drivers\etc host files for linux & Mac /ect/hosts """ # list paths hosts_path_system = r"C:\Windows\System32\drivers\etc\hosts" host_dir = hosts_path_system #host_dir = "hosts" local redir = "127.0.0.1" # ...
0
0
0
0
0
0
0
0
0
d9cd1da08e71c31b14ac37edb655f6ce2477eb27
2,731
py
Python
cifar10.py
moskomule/sam.pytorch
766a038e9ece49fcf74283b309a377bc95054197
[ "MIT" ]
101
2020-12-30T07:31:33.000Z
2022-03-30T08:22:39.000Z
cifar10.py
moskomule/sam.pytorch
766a038e9ece49fcf74283b309a377bc95054197
[ "MIT" ]
1
2021-04-05T19:57:14.000Z
2021-04-15T01:40:01.000Z
cifar10.py
moskomule/sam.pytorch
766a038e9ece49fcf74283b309a377bc95054197
[ "MIT" ]
10
2020-12-31T02:43:10.000Z
2022-03-27T10:02:34.000Z
if __name__ == '__main__': main()
29.365591
107
0.633834
from functools import partial from typing import Tuple import chika import homura import torch import torch.nn.functional as F from homura import lr_scheduler, reporters, trainers from homura.vision import DATASET_REGISTRY, MODEL_REGISTRY from sam import SAMSGD as _SAMSGD def SAM(lr=1e-1, momentum=0.0, dampening=0....
0
559
0
521
0
1,192
0
75
338
076ca4822407724857fe3e31d79539177654a693
16,470
py
Python
app/admin/views.py
RagtagOpen/carpools
56b8f6491a2d347b637b345fbad7bc744130ec7f
[ "Apache-2.0" ]
11
2017-08-23T17:41:43.000Z
2018-10-24T03:00:38.000Z
app/admin/views.py
RagtagOpen/carpools
56b8f6491a2d347b637b345fbad7bc744130ec7f
[ "Apache-2.0" ]
480
2017-07-14T00:29:11.000Z
2020-01-06T19:04:51.000Z
app/admin/views.py
RagtagOpen/carpools
56b8f6491a2d347b637b345fbad7bc744130ec7f
[ "Apache-2.0" ]
22
2017-07-07T00:07:32.000Z
2020-02-27T19:43:14.000Z
from .. import db
33.47561
109
0.613236
import csv import io from flask import ( current_app, flash, redirect, render_template, request, Response, url_for, ) from flask_login import current_user from . import admin_bp from .forms import ( CancelCarpoolAdminForm, DeleteDestinationForm, DestinationForm, ProfilePurgeF...
0
14,577
0
0
0
844
0
381
634
e8764ac8179743789cb0b11839a0841f88bd1b2f
3,914
py
Python
experiments/tune_plot.py
trangnv/geb-simulations-h20
df86e1ad1ff8e98cf2c3f6025d1626d260a3b125
[ "MIT" ]
7
2021-08-31T13:11:51.000Z
2022-02-10T09:05:16.000Z
experiments/tune_plot.py
trangnv/geb-simulations-h20
df86e1ad1ff8e98cf2c3f6025d1626d260a3b125
[ "MIT" ]
null
null
null
experiments/tune_plot.py
trangnv/geb-simulations-h20
df86e1ad1ff8e98cf2c3f6025d1626d260a3b125
[ "MIT" ]
8
2021-09-03T08:29:09.000Z
2021-12-04T04:20:49.000Z
import sys import os import json import glob import plotly import plotly.graph_objs as go if len(sys.argv) != 2: print("Usage: python tune_plot.py <result_dir>") print("Example: python tune_pot.py ~/ray_results/objective_mean_2021-04-08_00-07-44/") result_dir = sys.argv[1] tune_run = os.path.basename(os.path...
36.240741
120
0.468574
import sys import os import json import glob import pandas as pd import plotly import plotly.graph_objs as go if len(sys.argv) != 2: print("Usage: python tune_plot.py <result_dir>") print("Example: python tune_pot.py ~/ray_results/objective_mean_2021-04-08_00-07-44/") result_dir = sys.argv[1] tune_run = os.p...
0
0
0
0
0
0
0
-2
22
017188de41467f7e7a397c25e24bc966ad998367
3,052
py
Python
Pytorch/softmaxMnist.py
AutuanLiu/Machine-Learning-on-docker
00eb7211a3a40a9da02114923647dfd6ac24f138
[ "Apache-2.0" ]
11
2018-03-18T11:06:59.000Z
2020-02-23T03:24:43.000Z
Pytorch/softmaxMnist.py
AutuanLiu/Machine-Learning-on-docker
00eb7211a3a40a9da02114923647dfd6ac24f138
[ "Apache-2.0" ]
null
null
null
Pytorch/softmaxMnist.py
AutuanLiu/Machine-Learning-on-docker
00eb7211a3a40a9da02114923647dfd6ac24f138
[ "Apache-2.0" ]
4
2018-03-28T13:04:26.000Z
2019-05-29T05:49:52.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ------------------------------------------------- File NamesoftmaxMnist Description : mnist data sets, softmax model pytorch one-hot , Email : autuanliu@163.com Date18-1-16 """ import torch.nn as nn import torch.optim as optim # if __name__ == ...
33.538462
130
0.6173
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ------------------------------------------------- File Name:softmaxMnist Description : mnist data sets, softmax model pytorch 不需要进行 one-hot 编码, 使用类别即可 Email : autuanliu@163.com Date:18-1-16 """ import torch.nn as nn import torch.optim as optim from torch...
117
0
0
505
0
1,436
0
85
201
ec134e9600b59b28012e9fd74a0fe7281e79c18f
477
py
Python
01-basics/04-singlebyte-xor-detect.py
DavidBuchanan314/cryptopals-python3
fe53fb1d324639193451e11d2d93cb251bce3021
[ "MIT" ]
null
null
null
01-basics/04-singlebyte-xor-detect.py
DavidBuchanan314/cryptopals-python3
fe53fb1d324639193451e11d2d93cb251bce3021
[ "MIT" ]
null
null
null
01-basics/04-singlebyte-xor-detect.py
DavidBuchanan314/cryptopals-python3
fe53fb1d324639193451e11d2d93cb251bce3021
[ "MIT" ]
null
null
null
from sys import path; path += [".", ".."] # hacky... if __name__ == "__main__": ciphertexts = map(dehex, load_data("4.txt").split("\n")) keyspace = list(range(0x100)) plaintexts = reduce(op.add, [ [xor(ct, [key]) for key in keyspace] for ct in ciphertexts ]) best_plaintext = min(plaintexts, key=englishnes...
26.5
69
0.666667
from sys import path; path += [".", ".."] # hacky... from utils import * if __name__ == "__main__": ciphertexts = map(dehex, load_data("4.txt").split("\n")) keyspace = list(range(0x100)) plaintexts = reduce(op.add, [ [xor(ct, [key]) for key in keyspace] for ct in ciphertexts ]) best_plaintext = min(plaint...
0
0
0
0
0
0
0
-2
22
2f7f32685db80a3f2be2e3f54150ebbe5f582daf
3,211
py
Python
packages/sdk/tests/local/test_local_packaging.py
odahu/odahuflow
58c3220a266a61bb893cf79c4b994569e3445097
[ "ECL-2.0", "Apache-2.0" ]
12
2020-10-13T15:39:52.000Z
2021-10-11T17:13:42.000Z
packages/sdk/tests/local/test_local_packaging.py
odahu/odahuflow
58c3220a266a61bb893cf79c4b994569e3445097
[ "ECL-2.0", "Apache-2.0" ]
475
2019-11-18T12:40:47.000Z
2022-03-29T21:17:38.000Z
packages/sdk/tests/local/test_local_packaging.py
odahu/odahuflow
58c3220a266a61bb893cf79c4b994569e3445097
[ "ECL-2.0", "Apache-2.0" ]
4
2020-02-25T11:26:10.000Z
2021-03-10T12:01:00.000Z
# Copyright 2020 EPAM Systems # # 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 wri...
40.1375
113
0.730925
# Copyright 2020 EPAM Systems # # 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 wri...
0
1,834
0
0
0
0
0
143
201
7b37bde3bf4c1a3743a3ed4fb7e54c5990ae1044
9,597
py
Python
properties/migrations/0007_auto_20200629_2225.py
Zayanto/Protocol-CRM
c81489d69de581d8216e20f7dd80089116f85c7b
[ "MIT" ]
null
null
null
properties/migrations/0007_auto_20200629_2225.py
Zayanto/Protocol-CRM
c81489d69de581d8216e20f7dd80089116f85c7b
[ "MIT" ]
null
null
null
properties/migrations/0007_auto_20200629_2225.py
Zayanto/Protocol-CRM
c81489d69de581d8216e20f7dd80089116f85c7b
[ "MIT" ]
null
null
null
# Generated by Django 3.0.7 on 2020-06-29 22:25
40.838298
263
0.550068
# Generated by Django 3.0.7 on 2020-06-29 22:25 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('properties', '0006_remove_property_location'), ] operations = [ migrations.CreateModel( name='StageBuying', fields=[...
0
0
0
9,483
0
0
0
19
46
228a1835d7d8c0c4561e9b598ae0cb4c389c7e67
2,749
py
Python
ros/src/twist_controller/twist_controller.py
Benson516/CarND-Capstone
6f54bb59e81ce69f1ad1c011ecb73509b8f04c61
[ "MIT" ]
null
null
null
ros/src/twist_controller/twist_controller.py
Benson516/CarND-Capstone
6f54bb59e81ce69f1ad1c011ecb73509b8f04c61
[ "MIT" ]
null
null
null
ros/src/twist_controller/twist_controller.py
Benson516/CarND-Capstone
6f54bb59e81ce69f1ad1c011ecb73509b8f04c61
[ "MIT" ]
null
null
null
GAS_DENSITY = 2.858 ONE_MPH = 0.44704
31.965116
89
0.548927
import rospy from yaw_controller import YawController from lowpass import LowPassFilter from pid import PID GAS_DENSITY = 2.858 ONE_MPH = 0.44704 class Controller(object): def __init__(self, param_dict): # TODO: Implement self.yaw_controller = YawController(param_dict["wheel_base"], ...
0
0
0
2,575
0
0
0
20
111
a3ae640f8a79b4b5a07050634a3c386363a3bf3c
1,011
py
Python
tests/unit/test_api.py
staticdev/github3.py
b9af598dcf1771c083dcc512a2aa8e5008bf4ea8
[ "MIT" ]
null
null
null
tests/unit/test_api.py
staticdev/github3.py
b9af598dcf1771c083dcc512a2aa8e5008bf4ea8
[ "MIT" ]
32
2021-02-17T19:46:21.000Z
2021-05-12T05:56:03.000Z
tests/unit/test_api.py
staticdev/github3.py
b9af598dcf1771c083dcc512a2aa8e5008bf4ea8
[ "MIT" ]
null
null
null
"""Unit tests for github4.api."""
37.444444
84
0.65183
"""Unit tests for github4.api.""" import unittest.mock import github4 class TestAPI(unittest.TestCase): """All tests for the github4.api module.""" def test_enterprise_login(self): """Show that github4.enterprise_login returns GitHubEnterprise.""" args = ("login", "password", None, "https:/...
0
0
0
916
0
0
0
-8
68
fa64022251c523bf266eb1aed5874bafa1bed4a3
4,880
py
Python
tests/test_api.py
filepreviews/filepreviews-python
eb50d527a8f1a2942f1be2c2bc057b5da4879ecd
[ "MIT" ]
4
2017-01-24T17:03:34.000Z
2021-09-05T15:08:27.000Z
tests/test_api.py
filepreviews/filepreviews-python
eb50d527a8f1a2942f1be2c2bc057b5da4879ecd
[ "MIT" ]
1
2021-05-15T22:10:20.000Z
2021-05-15T22:10:20.000Z
tests/test_api.py
filepreviews/filepreviews-python
eb50d527a8f1a2942f1be2c2bc057b5da4879ecd
[ "MIT" ]
2
2017-02-14T08:02:55.000Z
2020-12-05T13:17:25.000Z
from filepreviews import FilePreviews file_previews = FilePreviews(api_key="DUMMY_API_KEY", api_secret="DUMMY_SECRET_KEY")
27.727273
88
0.545697
import json import pytest import responses from filepreviews import API_URL, FilePreviews, exceptions file_previews = FilePreviews(api_key="DUMMY_API_KEY", api_secret="DUMMY_SECRET_KEY") @responses.activate def test_api_generate(): def request_callback(request): body = { "id": "1", ...
0
4,570
0
0
0
0
0
-2
182
10f9f5f2bc5a39c36c0807c9975bf5bc17848bc0
23,845
py
Python
ai.py
mandaw2014/Rally
cafc12aff75bf1a158753d08ae36eb4056dcb1e0
[ "MIT" ]
1
2022-03-28T01:18:31.000Z
2022-03-28T01:18:31.000Z
ai.py
mandaw2014/Rally
cafc12aff75bf1a158753d08ae36eb4056dcb1e0
[ "MIT" ]
null
null
null
ai.py
mandaw2014/Rally
cafc12aff75bf1a158753d08ae36eb4056dcb1e0
[ "MIT" ]
1
2022-03-17T22:26:20.000Z
2022-03-17T22:26:20.000Z
sign = lambda x: -1 if x < 0 else (1 if x > 0 else 0)
71.392216
1,156
0.625708
from ursina import * from ursina import curve from particles import ParticleSystem sign = lambda x: -1 if x < 0 else (1 if x > 0 else 0) class AICar(Entity): def __init__(self, car, sand_track, grass_track, snow_track, plains_track): super().__init__( model = "car.obj", position = ...
0
0
0
23,662
0
0
0
17
112
c2d338e18b66c01319cc8393b1f86d815804b2e7
2,791
py
Python
parlai/agents/programr/robot/sentimentdata.py
roholazandie/ParlAI
32352cab81ecb666aefd596232c5ed9f33cbaeb9
[ "MIT" ]
null
null
null
parlai/agents/programr/robot/sentimentdata.py
roholazandie/ParlAI
32352cab81ecb666aefd596232c5ed9f33cbaeb9
[ "MIT" ]
null
null
null
parlai/agents/programr/robot/sentimentdata.py
roholazandie/ParlAI
32352cab81ecb666aefd596232c5ed9f33cbaeb9
[ "MIT" ]
null
null
null
DISTRIBUTION_SIZE = 10 NEGATIVE_THRESHOLD = -2.5
32.453488
95
0.60301
import numpy as np DISTRIBUTION_SIZE = 10 NEGATIVE_THRESHOLD = -2.5 class SentimentData(): def __init__(self): self._sentiment_values = np.zeros(DISTRIBUTION_SIZE) self._rolling_sentiment = 0 self._neg_thresh = NEGATIVE_THRESHOLD self._threshold_reached = False self.init_...
0
234
0
2,465
0
0
0
-3
45
9fb8bf70fcac7fc0e1d816b67d336fa1321bc8ed
18,032
py
Python
rlkit/torch/irl/disc_models/other_v1p0_disc_models.py
yifan-you-37/rl_swiss
8b0ee7caa5c1fa93860916004cf4fd970667764f
[ "MIT" ]
56
2019-10-20T03:09:02.000Z
2022-03-25T09:21:40.000Z
rlkit/torch/irl/disc_models/other_v1p0_disc_models.py
yifan-you-37/rl_swiss
8b0ee7caa5c1fa93860916004cf4fd970667764f
[ "MIT" ]
3
2020-10-01T07:33:51.000Z
2021-05-12T03:40:57.000Z
rlkit/torch/irl/disc_models/other_v1p0_disc_models.py
yifan-you-37/rl_swiss
8b0ee7caa5c1fa93860916004cf4fd970667764f
[ "MIT" ]
10
2019-11-04T16:56:09.000Z
2022-03-25T09:21:41.000Z
import torch.nn as nn
34.281369
113
0.609306
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from rlkit.torch.core import PyTorchModule from rlkit.torch.networks import Mlp, identity from rlkit.torch import pytorch_util as ptu from copy import deepcopy class ThreeWayResNetAIRLDisc(ResNetAIRLDisc): def...
0
0
0
17,527
0
0
0
87
386
3f4e80a85e1b0df0823521f49e0f3c23eaa69849
1,461
py
Python
bin/Archive/read.json.py
rubenchazarra/AS_Function_Evaluator
5942d074fb03726fe539f8ecf37db09f8132922e
[ "MIT" ]
null
null
null
bin/Archive/read.json.py
rubenchazarra/AS_Function_Evaluator
5942d074fb03726fe539f8ecf37db09f8132922e
[ "MIT" ]
null
null
null
bin/Archive/read.json.py
rubenchazarra/AS_Function_Evaluator
5942d074fb03726fe539f8ecf37db09f8132922e
[ "MIT" ]
null
null
null
if __name__ == "__main__": main()
20.871429
117
0.499658
import argparse import sys import json def main(): global args global json_file parser = argparse.ArgumentParser() parser.add_argument('-json_file', metavar='<json_file>', dest="json_file", help="JSON file output by PFAM database") args = parser.parse_args() ## Prep global objects json_file = str(args....
0
0
0
0
0
1,357
0
-27
90
cc9098ccaf76a651fffae1eccde9e2b362f7b70a
433
py
Python
passing_numpy_array/setup.py
JFeaux/cython_demo
5be2db83fb2c4c948d8c0f26dee578798202e94f
[ "MIT" ]
1
2019-04-23T03:09:39.000Z
2019-04-23T03:09:39.000Z
passing_numpy_array/setup.py
JFeaux/cython_demo
5be2db83fb2c4c948d8c0f26dee578798202e94f
[ "MIT" ]
null
null
null
passing_numpy_array/setup.py
JFeaux/cython_demo
5be2db83fb2c4c948d8c0f26dee578798202e94f
[ "MIT" ]
null
null
null
from distutils.core import setup from Cython.Build import cythonize from distutils.extension import Extension import numpy as np sourcefiles = ['array_tools.pyx', '_sum.cpp'] extra_compile_args = [] libraries = [] ext = [Extension('*', sourcefiles, extra_compile_args=extra_compile_args, libr...
22.789474
66
0.690531
from distutils.core import setup from Cython.Build import cythonize from distutils.extension import Extension import numpy as np sourcefiles = ['array_tools.pyx', '_sum.cpp'] extra_compile_args = [] libraries = [] ext = [Extension('*', sourcefiles, extra_compile_args=extra_compile_args, libr...
0
0
0
0
0
0
0
0
0
bd5ab117d585128256e9f43687b2f40ea381e07b
1,691
py
Python
omc_python_app/views.py
Hooker41/Exchange-Trading-Order-Management-Tool
d7f6878655f0fe08c15b6d2b0b5b0db487b97430
[ "MIT" ]
null
null
null
omc_python_app/views.py
Hooker41/Exchange-Trading-Order-Management-Tool
d7f6878655f0fe08c15b6d2b0b5b0db487b97430
[ "MIT" ]
null
null
null
omc_python_app/views.py
Hooker41/Exchange-Trading-Order-Management-Tool
d7f6878655f0fe08c15b6d2b0b5b0db487b97430
[ "MIT" ]
null
null
null
# Create your views here. exchangeIns = {}
27.721311
99
0.691307
from django.shortcuts import render from django.views.generic import TemplateView from django.http import HttpResponse, JsonResponse, HttpResponseForbidden, HttpResponseBadRequest import ccxt # Create your views here. def getExchanges(request): exchangeName = request.GET["exchange"] print(exchangeName) ...
0
0
0
0
0
1,361
0
104
180
b5da938235e6816cfd761ec8546d351be3bd180e
30
py
Python
lib/python3.4/tokenize.py
caiocsalvador/whats_the_craic
c49ef62f1acd7379f6fd90c2b93aa1fa00c8661d
[ "MIT" ]
7
2017-04-26T12:28:22.000Z
2021-02-09T18:59:50.000Z
django-ng/lib/python3.4/tokenize.py
Arsalen/BusinessStrategies
209e57340359af3ea063c064982198848dc36c5f
[ "MIT" ]
13
2015-12-04T03:38:37.000Z
2015-12-12T00:15:46.000Z
django-ng/lib/python3.4/tokenize.py
Arsalen/BusinessStrategies
209e57340359af3ea063c064982198848dc36c5f
[ "MIT" ]
8
2017-06-01T08:42:16.000Z
2020-07-23T12:30:19.000Z
/usr/lib/python3.4/tokenize.py
30
30
0.8
/usr/lib/python3.4/tokenize.py
0
0
0
0
0
0
0
0
0
683aaa70f4e21185ee6a7cdb4a48ac989e06ef19
1,954
py
Python
core/polyaxon/polypod/compiler/resolver/resolver.py
erexer/polyaxon
be14dae1ed56d568983388736bcdaf27a7baa4a4
[ "Apache-2.0" ]
null
null
null
core/polyaxon/polypod/compiler/resolver/resolver.py
erexer/polyaxon
be14dae1ed56d568983388736bcdaf27a7baa4a4
[ "Apache-2.0" ]
null
null
null
core/polyaxon/polypod/compiler/resolver/resolver.py
erexer/polyaxon
be14dae1ed56d568983388736bcdaf27a7baa4a4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2018-2020 Polyaxon, Inc. # # 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 ...
31.015873
98
0.701126
#!/usr/bin/python # # Copyright 2018-2020 Polyaxon, Inc. # # 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 ...
0
0
0
0
0
1,092
0
123
134
37832db13561a35be24cf2bec836422c123e4278
7,192
py
Python
fuzzers/030-iob/process_rdb.py
rw1nkler/prjxray
aff076b47dcf6d653eb3ce791b41fd6cf4343edd
[ "ISC" ]
1
2021-12-16T03:09:59.000Z
2021-12-16T03:09:59.000Z
fuzzers/030-iob/process_rdb.py
rw1nkler/prjxray
aff076b47dcf6d653eb3ce791b41fd6cf4343edd
[ "ISC" ]
null
null
null
fuzzers/030-iob/process_rdb.py
rw1nkler/prjxray
aff076b47dcf6d653eb3ce791b41fd6cf4343edd
[ "ISC" ]
1
2020-11-10T01:57:12.000Z
2020-11-10T01:57:12.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2017-2020 The Project X-Ray Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-Identifier: ISC """ IOB bits are more complicated tha...
32.107143
82
0.525028
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2017-2020 The Project X-Ray Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-Identifier: ISC """ IOB bits are more complicated tha...
0
0
0
0
693
5,648
0
-6
137
26b0f3e5bae776ac1dad54c81206538a9984b7fb
2,175
py
Python
pset8/mashup/helpers.py
Star1111/cs50
0ef91b4558e4e080512045cb5035ecf9f9294047
[ "Unlicense" ]
2
2020-11-03T08:31:31.000Z
2021-03-20T16:40:34.000Z
pset8/mashup/helpers.py
Star1111/cs50
0ef91b4558e4e080512045cb5035ecf9f9294047
[ "Unlicense" ]
null
null
null
pset8/mashup/helpers.py
Star1111/cs50
0ef91b4558e4e080512045cb5035ecf9f9294047
[ "Unlicense" ]
null
null
null
import feedparser import urllib.parse from random import shuffle, seed UKR_NEWS = ["https://news.yandex.ua/index.rss", "http://www.ukr-portal.com/php/rss_1.xml", "http://news.finance.ua/ru/rss", "http://www.ua.rian.ru/export/rss2/index.xml", "http://feeds.feedburner.com/zaxid/rss_ua", "http://www.dt.ua/export.rss", "h...
35.655738
302
0.581149
import feedparser import urllib.parse from random import shuffle, seed UKR_NEWS = ["https://news.yandex.ua/index.rss", "http://www.ukr-portal.com/php/rss_1.xml", "http://news.finance.ua/ru/rss", "http://www.ua.rian.ru/export/rss2/index.xml", "http://feeds.feedburner.com/zaxid/rss_ua", "http://www.dt.ua/export.rss", "h...
52
0
0
0
0
0
0
0
0
51d1b802f5cf738b16c5ae33596de8b712c69625
12,438
py
Python
md.py
dormrod/molecular_dynamics_300_lines
4c0993436af0d048fb0ccf56416156a3ff9575dc
[ "MIT" ]
1
2021-11-28T03:50:43.000Z
2021-11-28T03:50:43.000Z
md.py
dormrod/molecular_dynamics_300_lines
4c0993436af0d048fb0ccf56416156a3ff9575dc
[ "MIT" ]
null
null
null
md.py
dormrod/molecular_dynamics_300_lines
4c0993436af0d048fb0ccf56416156a3ff9575dc
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Single Molecule Molecular Dynamics Code Created 2018 by David of Theoretically Speaking Please Modify! """ from __future__ import print_function import os import sys import numpy as np # Global variables for unit conversions hartree = 4.35974465e-18 # J, atomic unit of energy emass = 5....
41.46
136
0.659752
# -*- coding: utf-8 -*- """ Single Molecule Molecular Dynamics Code Created 2018 by David of Theoretically Speaking Please Modify! """ from __future__ import print_function import os import sys import numpy as np # Global variables for unit conversions hartree = 4.35974465e-18 # J, atomic unit of energy emass = 5....
0
0
0
0
0
0
0
0
0
8c6bf3b641e19bfc1b8c5b7ba9cc7a8c661082f1
385
py
Python
arcade_solutions/the_core/minimal_number_of_coins.py
nickaigi/automatic-dollop
eb8222475c7871c1d5710242c5aed8c70ea0d2c8
[ "Unlicense" ]
null
null
null
arcade_solutions/the_core/minimal_number_of_coins.py
nickaigi/automatic-dollop
eb8222475c7871c1d5710242c5aed8c70ea0d2c8
[ "Unlicense" ]
null
null
null
arcade_solutions/the_core/minimal_number_of_coins.py
nickaigi/automatic-dollop
eb8222475c7871c1d5710242c5aed8c70ea0d2c8
[ "Unlicense" ]
null
null
null
if __name__ == '__main__': coins = [1, 2, 10] price = 28 print(minimal_number_of_coins(coins, price))
20.263158
48
0.532468
def minimal_number_of_coins(coins, price): bal = price index = len(coins) count = 0 while bal > 0: if bal >= max(coins[:index]): bal -= max(coins[:index]) count += 1 else: index -= 1 return count if __name__ == '__main__': coins = [1, 2, 10]...
0
0
0
0
0
246
0
0
22
da55e0f85c135dc0582e1cec208f874daa211773
129
py
Python
pokemon/001bulbasaur.py
julio177/ascii-pokedex
2727d3f3257abd746300248ae75e11cae2c40ea3
[ "MIT" ]
null
null
null
pokemon/001bulbasaur.py
julio177/ascii-pokedex
2727d3f3257abd746300248ae75e11cae2c40ea3
[ "MIT" ]
null
null
null
pokemon/001bulbasaur.py
julio177/ascii-pokedex
2727d3f3257abd746300248ae75e11cae2c40ea3
[ "MIT" ]
null
null
null
'''Bulbasaur, Ivysaur and Venusaur''' from __init__ import Pokemon Bulbasaur = Pokemon('generation_1/001.txt') print(Bulbasaur)
21.5
43
0.775194
'''Bulbasaur, Ivysaur and Venusaur''' from __init__ import Pokemon Bulbasaur = Pokemon('generation_1/001.txt') print(Bulbasaur)
0
0
0
0
0
0
0
0
0
4d5ea548eddd8bc8ca4e3717d9cb16eda6b1c591
951
py
Python
leetcode/207.course-schedule.py
schio/algorithm_test
c240faca428a9adb2970591338d4792b2f4fb7f3
[ "MIT" ]
null
null
null
leetcode/207.course-schedule.py
schio/algorithm_test
c240faca428a9adb2970591338d4792b2f4fb7f3
[ "MIT" ]
null
null
null
leetcode/207.course-schedule.py
schio/algorithm_test
c240faca428a9adb2970591338d4792b2f4fb7f3
[ "MIT" ]
null
null
null
# # @lc app=leetcode id=207 lang=python3 # # [207] Course Schedule # # @lc code=start # @lc code=end
19.8125
81
0.466877
# # @lc app=leetcode id=207 lang=python3 # # [207] Course Schedule # # @lc code=start class Solution: def canFinish(self, numCourses: int, prerequisites: List[List[int]]) -> bool: graph = collections.defaultdict(list) # make graph for x, y in prerequisites: graph[x].append(y) ...
105
0
0
790
0
0
0
0
22
6a1b221b40ffc1a9f30f8e3c2ffc4fc69bcecad8
9,313
py
Python
tests/test_security.py
Jimvin/nipyapi
826beac376d4321bd2d69491f09086474c7e7bfb
[ "Apache-2.0" ]
199
2017-08-24T12:19:41.000Z
2022-03-20T14:50:17.000Z
tests/test_security.py
Jimvin/nipyapi
826beac376d4321bd2d69491f09086474c7e7bfb
[ "Apache-2.0" ]
275
2017-08-28T21:21:49.000Z
2022-03-29T17:57:26.000Z
tests/test_security.py
Jimvin/nipyapi
826beac376d4321bd2d69491f09086474c7e7bfb
[ "Apache-2.0" ]
73
2017-09-07T10:13:56.000Z
2022-02-28T10:37:21.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for nipyapi security module.""" from __future__ import absolute_import import pytest from tests import conftest # Tells pytest to skip this module of security testing is not enabled. pytestmark = pytest.mark.skipif(not conftest.test_security, reason='test_securi...
35.681992
104
0.719747
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for nipyapi security module.""" from __future__ import absolute_import import pytest from tests import conftest import nipyapi # Tells pytest to skip this module of security testing is not enabled. pytestmark = pytest.mark.skipif(not conftest.test_security, reas...
0
0
0
0
0
8,130
0
-7
459
1a733cf776ecb3c6b1ac3142642e6e5092c63616
3,038
py
Python
gettingstarted/urls.py
TomWerner/AlumniMentoring
d4bac09fc768232f0795a0672eb041a2225118ae
[ "MIT" ]
2
2016-10-19T17:04:53.000Z
2017-07-23T21:49:34.000Z
gettingstarted/urls.py
TomWerner/AlumniMentoring
d4bac09fc768232f0795a0672eb041a2225118ae
[ "MIT" ]
null
null
null
gettingstarted/urls.py
TomWerner/AlumniMentoring
d4bac09fc768232f0795a0672eb041a2225118ae
[ "MIT" ]
null
null
null
from django.conf.urls import url from django.contrib import admin from django.views.generic import RedirectView admin.autodiscover() import django.contrib.auth.views from mentoring.views import views from mentoring.views import honors_admin # Examples: # url(r'^$', 'gettingstarted.views.home', name='home'), # url(r...
46.738462
106
0.705069
from django.conf.urls import include, url from django.contrib import admin from django.contrib.auth.forms import UserCreationForm from django.views.generic import CreateView from django.views.generic import RedirectView admin.autodiscover() from django.conf import settings from django.conf.urls.static import static ...
0
0
0
0
0
0
0
96
89
d565975d5c6295b512c456ab9bae2b597eba5e6d
260
py
Python
partner_ngos/programs_management/doctype/programs/programs.py
AkramMutaher/partner_ngos
4a345fb6989ff5a21db7fca07aa4e5174dca8f59
[ "MIT" ]
1
2021-06-03T17:14:08.000Z
2021-06-03T17:14:08.000Z
partner_ngos/programs_management/doctype/programs/programs.py
AkramMutaher/partner_ngos
4a345fb6989ff5a21db7fca07aa4e5174dca8f59
[ "MIT" ]
null
null
null
partner_ngos/programs_management/doctype/programs/programs.py
AkramMutaher/partner_ngos
4a345fb6989ff5a21db7fca07aa4e5174dca8f59
[ "MIT" ]
1
2021-10-09T16:20:09.000Z
2021-10-09T16:20:09.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2020, Akram Mutaher and contributors # For license information, please see license.txt from __future__ import unicode_literals # import frappe
23.636364
52
0.773077
# -*- coding: utf-8 -*- # Copyright (c) 2020, Akram Mutaher and contributors # For license information, please see license.txt from __future__ import unicode_literals # import frappe from frappe.model.document import Document class Programs(Document): pass
0
0
0
10
0
0
0
21
45
37e220aa191b5c091355a0d9f206340516811513
1,035
py
Python
minerals/context_processors.py
mhunterak/TD_Mineral_Catalog
dc76289274b83d44fd76dafb2e734843d11675a0
[ "MIT" ]
null
null
null
minerals/context_processors.py
mhunterak/TD_Mineral_Catalog
dc76289274b83d44fd76dafb2e734843d11675a0
[ "MIT" ]
null
null
null
minerals/context_processors.py
mhunterak/TD_Mineral_Catalog
dc76289274b83d44fd76dafb2e734843d11675a0
[ "MIT" ]
null
null
null
''' Context Processors do some pretty great work, like default arguments supplied to templates when they're rendered. kind of like Macros in Flask, but even more powerful. ''' import string from django.utils.datastructures import MultiValueDictKeyError from .forms import SearchForm from .static_vars import COLORS, GR...
24.069767
79
0.687923
''' Context Processors do some pretty great work, like default arguments supplied to templates when they're rendered. kind of like Macros in Flask, but even more powerful. ''' import string from django.utils.datastructures import MultiValueDictKeyError from .forms import SearchForm from .static_vars import COLORS, GR...
0
0
0
0
0
0
0
0
0
fa8f707b07aac17427883b74e5ed9efe4487c86a
143
py
Python
pushover/__init__.py
ccoder64/pushover-python
6be770ecb7d269169718c02c14d9ba35fa0c8715
[ "MIT" ]
null
null
null
pushover/__init__.py
ccoder64/pushover-python
6be770ecb7d269169718c02c14d9ba35fa0c8715
[ "MIT" ]
null
null
null
pushover/__init__.py
ccoder64/pushover-python
6be770ecb7d269169718c02c14d9ba35fa0c8715
[ "MIT" ]
null
null
null
""" pushover simple api ~~~~~~~~~~~~~~~~~~~ """ __author__ = "toloy"
13
50
0.524476
""" pushover simple api ~~~~~~~~~~~~~~~~~~~ """ __author__ = "toloy" from .pushover import Pushover, PushoverException
0
0
0
0
0
0
0
28
25
a7f943ad32a943a1947fc358318e58687aeadc3a
420
py
Python
kubernetes_typed/client/models/v1beta1_certificate_signing_request_condition.py
sobolevn/kubernetes-typed
5f0a770631c73a9831fbeaeebac188e8f4a52c54
[ "Apache-2.0" ]
22
2020-12-10T13:06:02.000Z
2022-02-13T21:58:15.000Z
kubernetes_typed/client/models/v1beta1_certificate_signing_request_condition.py
sobolevn/kubernetes-typed
5f0a770631c73a9831fbeaeebac188e8f4a52c54
[ "Apache-2.0" ]
4
2021-03-08T07:06:12.000Z
2022-03-29T23:41:45.000Z
kubernetes_typed/client/models/v1beta1_certificate_signing_request_condition.py
sobolevn/kubernetes-typed
5f0a770631c73a9831fbeaeebac188e8f4a52c54
[ "Apache-2.0" ]
2
2021-09-05T19:18:28.000Z
2022-03-14T02:56:17.000Z
# Code generated by `typeddictgen`. DO NOT EDIT. """V1beta1CertificateSigningRequestConditionDict generated type.""" import datetime from typing import TypedDict V1beta1CertificateSigningRequestConditionDict = TypedDict( "V1beta1CertificateSigningRequestConditionDict", { "lastUpdateTime": datetime.date...
26.25
67
0.709524
# Code generated by `typeddictgen`. DO NOT EDIT. """V1beta1CertificateSigningRequestConditionDict generated type.""" import datetime from typing import TypedDict V1beta1CertificateSigningRequestConditionDict = TypedDict( "V1beta1CertificateSigningRequestConditionDict", { "lastUpdateTime": datetime.date...
0
0
0
0
0
0
0
0
0
f0ac79bf020ed55f8efbaf8848de6863288c059a
5,900
py
Python
sdk/servicebus/azure-servicebus/tests/perf_tests/_test_base.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/servicebus/azure-servicebus/tests/perf_tests/_test_base.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/servicebus/azure-servicebus/tests/perf_tests/_test_base.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
45.736434
181
0.685932
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
0
1,055
1,436
2,614
0
0
0
217
205
9c6c38e7013c1655dd41c7d2f0d93f4df08fa931
1,652
py
Python
mandel.py
SalahKouhen/Mandel_surf
3c2c49085efa190213d782ceba05d40a1dd3e155
[ "MIT" ]
null
null
null
mandel.py
SalahKouhen/Mandel_surf
3c2c49085efa190213d782ceba05d40a1dd3e155
[ "MIT" ]
null
null
null
mandel.py
SalahKouhen/Mandel_surf
3c2c49085efa190213d782ceba05d40a1dd3e155
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt nx, ny = (1000,1000) x = np.linspace(-2,1,nx) y = np.linspace(-1.5,1.5,ny) X, Y = np.meshgrid(x,y) cgrid = X + 1j*Y # For some numbers c doing z^2 + c again and again from 0 will diverge, not for others, plot it to get the mandelbrot set Z = 0*cgrid ZC = Z for i in...
20.146341
121
0.62046
import numpy as np import matplotlib.pyplot as plt from matplotlib import cm nx, ny = (1000,1000) x = np.linspace(-2,1,nx) y = np.linspace(-1.5,1.5,ny) X, Y = np.meshgrid(x,y) cgrid = X + 1j*Y # For some numbers c doing z^2 + c again and again from 0 will diverge, not for others, plot it to get the mandelbrot set Z...
0
0
0
0
0
538
0
4
45
d2a28cf08377e6534f06c4530d85b60c48e5b7d9
43
py
Python
examples/DecryptLoginExamples/crawlers/moocdl/__init__.py
hedou/DecryptLogin
ff86a5d378c8a42d1caebbb7482658a95053f716
[ "Apache-2.0" ]
null
null
null
examples/DecryptLoginExamples/crawlers/moocdl/__init__.py
hedou/DecryptLogin
ff86a5d378c8a42d1caebbb7482658a95053f716
[ "Apache-2.0" ]
null
null
null
examples/DecryptLoginExamples/crawlers/moocdl/__init__.py
hedou/DecryptLogin
ff86a5d378c8a42d1caebbb7482658a95053f716
[ "Apache-2.0" ]
null
null
null
'''initialize'''
21.5
26
0.744186
'''initialize''' from .moocdl import MOOCDL
0
0
0
0
0
0
0
5
22
bc91e141bb675209d3ac6e0bc451b35ae04e5206
150
py
Python
module2.py
arajajyothibabu/PythonLearning
53658ba3591e284733ef8a66551dadd515ab8edc
[ "MIT" ]
null
null
null
module2.py
arajajyothibabu/PythonLearning
53658ba3591e284733ef8a66551dadd515ab8edc
[ "MIT" ]
null
null
null
module2.py
arajajyothibabu/PythonLearning
53658ba3591e284733ef8a66551dadd515ab8edc
[ "MIT" ]
null
null
null
__author__ = 'Kalyan' # this is a sample module for the understanding_modules assignment.
18.75
67
0.726667
__author__ = 'Kalyan' # this is a sample module for the understanding_modules assignment. def greet(name): return "module2 says hi to " + name
0
0
0
0
0
35
0
0
23
73f42c1536b7cbae9884bce03cfe3067637e0ad1
3,681
py
Python
get_stock_data.py
jeremychonggg/Alpaca-Trading-Bot
82df00e327e2e55f5a0cdf85cd950c49c59bf669
[ "MIT" ]
null
null
null
get_stock_data.py
jeremychonggg/Alpaca-Trading-Bot
82df00e327e2e55f5a0cdf85cd950c49c59bf669
[ "MIT" ]
null
null
null
get_stock_data.py
jeremychonggg/Alpaca-Trading-Bot
82df00e327e2e55f5a0cdf85cd950c49c59bf669
[ "MIT" ]
null
null
null
import json import requests import pandas as pd # Get Alpaca API Credential endpoint = "https://data.alpaca.markets/v2" headers = json.loads(open("key.txt", 'r').read()) def hist_data(symbols, start="2021-01-01", timeframe="1Hour", limit=50, end=""): """ returns historical bar data for a stri...
39.159574
115
0.551481
import json import requests import pandas as pd import websocket # Get Alpaca API Credential endpoint = "https://data.alpaca.markets/v2" headers = json.loads(open("key.txt", 'r').read()) def hist_data(symbols, start="2021-01-01", timeframe="1Hour", limit=50, end=""): """ returns historical b...
0
0
0
0
0
0
0
-5
23
0d2ec34acd2b78a28677252958e616fde99ac3d1
597
py
Python
stl_path.py
theodorsm/trex-scripts
5d12e913c8c725f692d62f7458c1a49fb93d4c5b
[ "MIT" ]
1
2022-02-07T22:02:44.000Z
2022-02-07T22:02:44.000Z
stl_path.py
theodorsm/trex-scripts
5d12e913c8c725f692d62f7458c1a49fb93d4c5b
[ "MIT" ]
null
null
null
stl_path.py
theodorsm/trex-scripts
5d12e913c8c725f692d62f7458c1a49fb93d4c5b
[ "MIT" ]
2
2022-02-07T22:02:45.000Z
2022-03-11T23:10:33.000Z
import sys, os from dotenv import dotenv_values config = dotenv_values(".env") cur_dir = os.path.dirname(__file__) trex_path = f"{config['TREX_LOCATION']}/{config['TREX_VERSION']}" interactive = os.path.abspath(f"{trex_path}/automation/trex_control_plane/interactive") sys.path.insert(0, os.path.abspath(interactive)...
35.117647
87
0.782245
import sys, os from dotenv import dotenv_values config = dotenv_values(".env") cur_dir = os.path.dirname(__file__) trex_path = f"{config['TREX_LOCATION']}/{config['TREX_VERSION']}" interactive = os.path.abspath(f"{trex_path}/automation/trex_control_plane/interactive") sys.path.insert(0, os.path.abspath(interactive)...
0
0
0
0
0
0
0
0
0
98da454bb8184e678d9da3b5c4db075b9b0f7815
3,237
py
Python
Examples/PDFTool/DealPdf1_cmd.py
wxh0000mm/TKinterDesigner
01878e78746082413a09444283edbd52118d15ef
[ "Apache-2.0" ]
1
2022-03-09T08:43:41.000Z
2022-03-09T08:43:41.000Z
Examples/PDFTool/DealPdf1_cmd.py
wxh0000mm/TKinterDesigner
01878e78746082413a09444283edbd52118d15ef
[ "Apache-2.0" ]
null
null
null
Examples/PDFTool/DealPdf1_cmd.py
wxh0000mm/TKinterDesigner
01878e78746082413a09444283edbd52118d15ef
[ "Apache-2.0" ]
null
null
null
#coding=utf-8 import sys from os.path import abspath, dirname sys.path.append(abspath(dirname(__file__))) import tkinter ElementBGArray={} ElementBGArray_Resize={} ElementBGArray_IM={}
34.073684
94
0.621563
#coding=utf-8 import sys import os from os.path import abspath, dirname sys.path.append(abspath(dirname(__file__))) import tkinter import tkinter.filedialog from tkinter import * import Fun ElementBGArray={} ElementBGArray_Resize={} ElementBGArray_IM={} from PyPDF2 import PdfFileReader, PdfFileWriter def getRan...
285
0
0
0
0
2,721
0
11
220
5daa7c7b545e3d2dadc43b6d602c383c8384eb54
329
py
Python
game/exceptions.py
ikacikac/mtrix
9d65ce4f9fb08bf302f3322039eb882e8116890e
[ "MIT" ]
null
null
null
game/exceptions.py
ikacikac/mtrix
9d65ce4f9fb08bf302f3322039eb882e8116890e
[ "MIT" ]
null
null
null
game/exceptions.py
ikacikac/mtrix
9d65ce4f9fb08bf302f3322039eb882e8116890e
[ "MIT" ]
null
null
null
# -*- coding: utf8 -*-
11.75
41
0.735562
# -*- coding: utf8 -*- class MovementException(Exception): pass class RightException(MovementException): pass class LeftException(MovementException): pass class RotateException(MovementException): pass class ColException(MovementException): pass class DownException(MovementException): ...
0
0
0
160
0
0
0
0
138
94a825233662f1870149a97c9267cd1f71508949
651
py
Python
001_IntroCS/PS2/ps2c.py
PDmatrix/OSSU
dd482b6e4cdbdef5a8897c1b6ef135751681423a
[ "MIT" ]
null
null
null
001_IntroCS/PS2/ps2c.py
PDmatrix/OSSU
dd482b6e4cdbdef5a8897c1b6ef135751681423a
[ "MIT" ]
null
null
null
001_IntroCS/PS2/ps2c.py
PDmatrix/OSSU
dd482b6e4cdbdef5a8897c1b6ef135751681423a
[ "MIT" ]
null
null
null
balance = 999999 annualInterestRate = 0.18 monthlyInterestRate = annualInterestRate/12.0 monthlyLower = balance/12 monthlyUpper = (balance * (1+monthlyInterestRate)**12)/12.0 while True: updatedBalance = balance for i in range(12): payment = (monthlyUpper + monthlyLower)/2.0 monthlyUnp...
31
90
0.691244
balance = 999999 annualInterestRate = 0.18 monthlyInterestRate = annualInterestRate/12.0 monthlyLower = balance/12 monthlyUpper = (balance * (1+monthlyInterestRate)**12)/12.0 while True: updatedBalance = balance for i in range(12): payment = (monthlyUpper + monthlyLower)/2.0 monthlyUnp...
0
0
0
0
0
0
0
0
0
b41050b80a9cc015d3baca79949feec94791e99c
3,959
py
Python
tests/integration/commands/deploy.py
wilzbach/cli
bac7edb42618f3aeecd81ec80d5bec144fa893c2
[ "Apache-2.0" ]
null
null
null
tests/integration/commands/deploy.py
wilzbach/cli
bac7edb42618f3aeecd81ec80d5bec144fa893c2
[ "Apache-2.0" ]
null
null
null
tests/integration/commands/deploy.py
wilzbach/cli
bac7edb42618f3aeecd81ec80d5bec144fa893c2
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*-
37
79
0.621369
# -*- coding: utf-8 -*- import time from pytest import mark @mark.parametrize('with_message', [True, False]) @mark.parametrize('hard_deployment', [True, False]) @mark.parametrize('final_release_state', [ 'DEPLOYED', 'FAILED', 'UNKNOWN', 'TEMP_DEPLOYMENT_FAILURE' ]) @mark.parametrize('maintenance', [True, False])...
0
3,244
0
0
0
606
0
-8
91
f50846638b0fd8d698d6237e05231b9a37225f4b
22,357
py
Python
device.py
zhangyintai/Experiment_Manager
800f95068a12b64d4a7e524fe406d5ef3b47f521
[ "MIT" ]
null
null
null
device.py
zhangyintai/Experiment_Manager
800f95068a12b64d4a7e524fe406d5ef3b47f521
[ "MIT" ]
null
null
null
device.py
zhangyintai/Experiment_Manager
800f95068a12b64d4a7e524fe406d5ef3b47f521
[ "MIT" ]
null
null
null
# coding=UTF-8 """ -------------------------------------------------------- Copyright (c) ****-2018 ESR, Inc. All rights reserved. -------------------------------------------------------- Author: Mingdong Zhu Date: 2019/03/07 Design Name: The user interface of the DDS software Purpose: Design an UI and test f...
40.428571
902
0.538534
# coding=UTF-8 """ -------------------------------------------------------- Copyright (c) ****-2018 ESR, Inc. All rights reserved. -------------------------------------------------------- Author: Mingdong Zhu Date: 2019/03/07 Design Name: The user interface of the DDS software Purpose: Design an UI and test f...
39
0
0
17,612
0
0
0
-21
121
5302b93b77e85403459c6d3e9e7609e976336e0b
403
py
Python
listings/urls.py
darkismus/kompassi
35dea2c7af2857a69cae5c5982b48f01ba56da1f
[ "CC-BY-3.0" ]
13
2015-11-29T12:19:12.000Z
2021-02-21T15:42:11.000Z
listings/urls.py
darkismus/kompassi
35dea2c7af2857a69cae5c5982b48f01ba56da1f
[ "CC-BY-3.0" ]
23
2015-04-29T19:43:34.000Z
2021-02-10T05:50:17.000Z
listings/urls.py
darkismus/kompassi
35dea2c7af2857a69cae5c5982b48f01ba56da1f
[ "CC-BY-3.0" ]
11
2015-09-20T18:59:00.000Z
2020-02-07T08:47:34.000Z
from django.conf.urls import url from .views import listings_listing_view, listings_api_view urlpatterns = [ url( r'^listings/(?P<listing_hostname>[a-z0-9-\.]+)/?$', listings_listing_view, name='listings_listing_view', ), url( r'^api/v1/listings/(?P<listing_hostname>[a-z0...
21.210526
66
0.610422
from django.conf.urls import url from .views import listings_listing_view, listings_api_view urlpatterns = [ url( r'^listings/(?P<listing_hostname>[a-z0-9-\.]+)/?$', listings_listing_view, name='listings_listing_view', ), url( r'^api/v1/listings/(?P<listing_hostname>[a-z0...
0
0
0
0
0
0
0
0
0
10559bf17d1f5c778b0ad69a4bbaca775ed978fb
641
py
Python
code/begin/Session.py
redxyb/Flask
4ee226501f16eb0fa5cb585dc6bf780005fa8a28
[ "MIT" ]
null
null
null
code/begin/Session.py
redxyb/Flask
4ee226501f16eb0fa5cb585dc6bf780005fa8a28
[ "MIT" ]
null
null
null
code/begin/Session.py
redxyb/Flask
4ee226501f16eb0fa5cb585dc6bf780005fa8a28
[ "MIT" ]
null
null
null
''' Author: xyb Date: 2020-08-10 18:35:32 LastEditTime: 2020-08-10 18:52:50 ''' from flask import Flask app = Flask(__name__) app.secret_key = 'dfslkfjdlfsdkjfnskj' # # # class DefaultConfig(object): # SECRET_KEY = 'dfslkfjdlfsdkjfnskj' # app.config.from_object(DefaultConfig) if __name__ == "__main__": ap...
21.366667
53
0.700468
''' Author: xyb Date: 2020-08-10 18:35:32 LastEditTime: 2020-08-10 18:52:50 ''' from flask import Flask, make_response, request app = Flask(__name__) app.secret_key = 'dfslkfjdlfsdkjfnskj' #直接设置 #间接设置 # class DefaultConfig(object): # SECRET_KEY = 'dfslkfjdlfsdkjfnskj' # app.config.from_object(DefaultConfig) @ap...
24
204
0
0
0
0
0
24
46
a20f29e99f0bfe18d2e7d7416b1c44845378a3e2
10,451
py
Python
audio_pipeline/audio_processing/subtitle_utils.py
AlexWimpory/video-caption
4252835bc69ecb54e6d0e0af49f2e77c76fd78ad
[ "MIT" ]
null
null
null
audio_pipeline/audio_processing/subtitle_utils.py
AlexWimpory/video-caption
4252835bc69ecb54e6d0e0af49f2e77c76fd78ad
[ "MIT" ]
null
null
null
audio_pipeline/audio_processing/subtitle_utils.py
AlexWimpory/video-caption
4252835bc69ecb54e6d0e0af49f2e77c76fd78ad
[ "MIT" ]
1
2020-12-02T17:21:12.000Z
2020-12-02T17:21:12.000Z
import tempfile from pysubs2 import SSAFile, SSAStyle, Color, SSAEvent, make_time from audio_pipeline import logging_config from audio_pipeline.audio_processing.ffmpeg_processor import run_ffmpeg logger = logging_config.get_logger(__name__) def _adjust_for_clashing_subs(combined_subs, working_sub, exclude): """ ...
36.799296
111
0.62683
import tempfile from pysubs2 import SSAFile, SSAStyle, Color, SSAEvent, make_time from audio_pipeline import logging_config from audio_pipeline.audio_processing.ffmpeg_processor import run_ffmpeg logger = logging_config.get_logger(__name__) def _adjust_for_clashing_subs(combined_subs, working_sub, exclude): """ ...
0
0
0
0
0
0
0
0
0
365aacb7e69ac288818c4cf46c2f47b217dbd9af
962
py
Python
drug/migrations/0004_auto_20190604_2300.py
MubongwoNdasi/pms
0cc5dcbc25b31e13631672e1a03c88e2ad46bc92
[ "MIT" ]
null
null
null
drug/migrations/0004_auto_20190604_2300.py
MubongwoNdasi/pms
0cc5dcbc25b31e13631672e1a03c88e2ad46bc92
[ "MIT" ]
8
2021-03-18T22:27:44.000Z
2022-02-10T09:18:50.000Z
drug/migrations/0004_auto_20190604_2300.py
MubongwoNdasi/pms
0cc5dcbc25b31e13631672e1a03c88e2ad46bc92
[ "MIT" ]
1
2021-09-20T06:37:41.000Z
2021-09-20T06:37:41.000Z
# Generated by Django 2.2 on 2019-06-04 23:00
29.151515
110
0.589397
# Generated by Django 2.2 on 2019-06-04 23:00 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('drug', '0003_auto_20190604_2233'), ] operations = [ migrations.RemoveField( model_name='drugs', name='name', )...
0
0
0
850
0
0
0
19
46
c0e7ce2e4c3ab7a07d885ea07518fe7f67108216
3,006
py
Python
butunleme/160401007/butunleme.py
gizemozgun/kriptografi
fa395ea7592f2e6cf0cbb44a20f876d30a1d502a
[ "Unlicense" ]
8
2020-04-15T12:06:42.000Z
2022-01-21T10:35:51.000Z
butunleme/160401007/butunleme.py
gizemozgun/kriptografi
fa395ea7592f2e6cf0cbb44a20f876d30a1d502a
[ "Unlicense" ]
3
2020-05-13T20:41:27.000Z
2020-06-11T00:45:27.000Z
butunleme/160401007/butunleme.py
gizemozgun/kriptografi
fa395ea7592f2e6cf0cbb44a20f876d30a1d502a
[ "Unlicense" ]
54
2020-04-23T14:58:50.000Z
2020-06-26T06:00:32.000Z
#Gizem zgn / 160401007 # -*- coding: utf-8 -*- if __name__ == "__main__": menu()
28.093458
135
0.558217
#Gizem Özgün / 160401007 # -*- coding: utf-8 -*- import sys def str_to_binary(string): #string'i binary'e ceviren fonksiyon binary = "" for i in string: binary += "".join(f"{ord(i):08b}") return binary def binary_to_dec(binary): #binary'i decimale ceviren fonksiyon binary=str(b...
10
0
0
0
0
2,736
0
-11
183
37639967ffaa3c0210549f24f634d2e636218c9a
2,561
py
Python
BayOptPy/freesurfer_preprocess/uniform_distributed_dataset.py
Mind-the-Pineapple/tpot-age
2969bfa6dc5c652d5b4f00f59e9b0b23869f6bef
[ "MIT" ]
3
2020-04-09T16:53:54.000Z
2020-04-21T16:49:52.000Z
BayOptPy/freesurfer_preprocess/uniform_distributed_dataset.py
Mind-the-Pineapple/tpot-age
2969bfa6dc5c652d5b4f00f59e9b0b23869f6bef
[ "MIT" ]
null
null
null
BayOptPy/freesurfer_preprocess/uniform_distributed_dataset.py
Mind-the-Pineapple/tpot-age
2969bfa6dc5c652d5b4f00f59e9b0b23869f6bef
[ "MIT" ]
null
null
null
# This script assumes taht the freesurfer csv for the BANC data has already been generated import os import numpy as np import pdb import seaborn as sns sns.set() from BayOptPy.helperfunctions import get_paths, get_data def str_to_bool(s): ''' As arg pass does not acess boolen, transfrom the string into b...
36.070423
90
0.629832
# This script assumes taht the freesurfer csv for the BANC data has already been generated import os import pandas as pd import numpy as np import pdb import seaborn as sns sns.set() import matplotlib.pyplot as plt from BayOptPy.helperfunctions import get_paths, get_data, drop_missing_features def str_to_bool(s): ...
0
0
0
0
0
0
0
31
44
8bbf2f6e7ce233dc89fddc7e425bf35285b8c1c1
584
py
Python
leaderboard/migrations/0007_submission_is_public.py
AppraiseDev/OCELoT
9237c1eb1d9feebb1a51966b8c1ef82b381b4b1e
[ "BSD-3-Clause" ]
6
2020-06-25T05:00:45.000Z
2022-03-30T09:45:11.000Z
leaderboard/migrations/0007_submission_is_public.py
AppraiseDev/OCELoT
9237c1eb1d9feebb1a51966b8c1ef82b381b4b1e
[ "BSD-3-Clause" ]
42
2020-06-24T08:48:48.000Z
2021-09-08T14:36:11.000Z
leaderboard/migrations/0007_submission_is_public.py
AppraiseDev/OCELoT
9237c1eb1d9feebb1a51966b8c1ef82b381b4b1e
[ "BSD-3-Clause" ]
3
2020-05-25T20:34:08.000Z
2021-03-21T05:10:11.000Z
# pylint: disable=invalid-name,missing-docstring # Generated by Django 2.2.1 on 2020-06-19 05:29
26.545455
64
0.580479
# pylint: disable=invalid-name,missing-docstring # Generated by Django 2.2.1 on 2020-06-19 05:29 from django.db import migrations from django.db import models class Migration(migrations.Migration): dependencies = [('leaderboard', '0006_auto_20200618_2204')] operations = [ migrations.AddFi...
0
0
0
394
0
0
0
18
71
aefd262b130e708bff022101d0ddcb9ba1871734
2,110
py
Python
models.py
fanieblesat/proyectoMintic
18e25caf4a077a67c0e83d82757dfdc167ef61f6
[ "MIT" ]
null
null
null
models.py
fanieblesat/proyectoMintic
18e25caf4a077a67c0e83d82757dfdc167ef61f6
[ "MIT" ]
null
null
null
models.py
fanieblesat/proyectoMintic
18e25caf4a077a67c0e83d82757dfdc167ef61f6
[ "MIT" ]
null
null
null
from flask_login import UserMixin from werkzeug.security import generate_password_hash, check_password_hash
26.375
94
0.592417
from flask_login import UserMixin from werkzeug.security import generate_password_hash, check_password_hash from flask_login import UserMixin from werkzeug.security import generate_password_hash, check_password_hash from __init__ import db class User(db.Model): """Data model for user accounts.""" _...
0
726
0
1,110
0
0
0
66
94
0b45197a2c899c4d28fd133ec00a125cd4845c21
15,393
py
Python
models_all_solvable2/syn05m02h.py
grossmann-group/pyomo-MINLP-benchmarking
714f0a0dffd61675649a805683c0627af6b4929e
[ "MIT" ]
7
2019-05-08T19:14:34.000Z
2021-12-24T00:00:40.000Z
models_all_solvable2/syn05m02h.py
grossmann-group/pyomo-MINLP-benchmarking
714f0a0dffd61675649a805683c0627af6b4929e
[ "MIT" ]
null
null
null
models_all_solvable2/syn05m02h.py
grossmann-group/pyomo-MINLP-benchmarking
714f0a0dffd61675649a805683c0627af6b4929e
[ "MIT" ]
2
2020-05-21T22:15:51.000Z
2020-06-02T23:02:08.000Z
# MINLP written by GAMS Convert at 05/15/20 00:51:23 # # Equation counts # Total E G L N X C B # 152 71 6 75 0 0 0 0 # # Variable counts # x b i s1s s2s sc ...
35.386207
112
0.626324
# MINLP written by GAMS Convert at 05/15/20 00:51:23 # # Equation counts # Total E G L N X C B # 152 71 6 75 0 0 0 0 # # Variable counts # x b i s1s s2s sc ...
0
0
0
0
0
0
0
6
23
f2d7eb3ab3f908b1ca35e025e58b489235659469
64
py
Python
custom/opm/opm_tasks/__init__.py
SEL-Columbia/commcare-hq
992ee34a679c37f063f86200e6df5a197d5e3ff6
[ "BSD-3-Clause" ]
1
2015-02-10T23:26:39.000Z
2015-02-10T23:26:39.000Z
custom/opm/opm_tasks/__init__.py
SEL-Columbia/commcare-hq
992ee34a679c37f063f86200e6df5a197d5e3ff6
[ "BSD-3-Clause" ]
null
null
null
custom/opm/opm_tasks/__init__.py
SEL-Columbia/commcare-hq
992ee34a679c37f063f86200e6df5a197d5e3ff6
[ "BSD-3-Clause" ]
null
null
null
DEVELOPERS_EMAILS = ['esoergel@dimagi.com', 'sreddy@dimagi.com']
64
64
0.765625
DEVELOPERS_EMAILS = ['esoergel@dimagi.com', 'sreddy@dimagi.com']
0
0
0
0
0
0
0
0
0
606cc358f9511c3f340751656877c62607d0a40f
6,894
py
Python
runner_with_threshold.py
dmitryrubtsov/Predictions-of-calls-in-Moscow-Megafon
260bb49e859694d6a7c0dfb8cb13cd39d05ed597
[ "MIT" ]
null
null
null
runner_with_threshold.py
dmitryrubtsov/Predictions-of-calls-in-Moscow-Megafon
260bb49e859694d6a7c0dfb8cb13cd39d05ed597
[ "MIT" ]
null
null
null
runner_with_threshold.py
dmitryrubtsov/Predictions-of-calls-in-Moscow-Megafon
260bb49e859694d6a7c0dfb8cb13cd39d05ed597
[ "MIT" ]
null
null
null
import pickle import pandas as pd TARGET = 'target' THRESHOLD = 0.7 df = pd.read_csv('data_test.csv', index_col=[1]) \ .drop('Unnamed: 0', axis=1) with open('model.pkl', 'rb') as f: model = pickle.load(f) df[TARGET] = (model.predict_proba(df)[:, 1] > THRESHOLD).astype('int') df.to_csv('answers_test.c...
37.879121
120
0.555411
import os import pickle import time import pandas as pd from sklearn.base import BaseEstimator, TransformerMixin class ColumnSelector(BaseEstimator, TransformerMixin): def __init__(self, columns): self.columns = columns def fit(self, X, y=None): return self def transform(self, X): ...
0
0
0
6,397
0
0
0
13
159
f9df096ba45086d24778903b52ed2aaffddeaa80
920
py
Python
02_script.py
michalskop/cz-covid-predictive-data
42b7a4557d8b3c40ab4d2cf194efabb3b16db8be
[ "Apache-2.0" ]
null
null
null
02_script.py
michalskop/cz-covid-predictive-data
42b7a4557d8b3c40ab4d2cf194efabb3b16db8be
[ "Apache-2.0" ]
null
null
null
02_script.py
michalskop/cz-covid-predictive-data
42b7a4557d8b3c40ab4d2cf194efabb3b16db8be
[ "Apache-2.0" ]
null
null
null
"""Split sorted modely_02.""" import pandas as pd url = "https://onemocneni-aktualne.mzcr.cz/api/account/mifLSHU2re3GAmiotOkdYExeoQ/file/modely%252Fmodely_02_efektivita_testovani.csv" df = pd.read_csv(url, delimiter=';') df = df.sort_values(['datum_hlaseni', 'datum_prvniho_priznaku', 'orp', 'vek_kat', 'pohlavi']) ...
48.421053
138
0.753261
"""Split sorted modely_02.""" import pandas as pd url = "https://onemocneni-aktualne.mzcr.cz/api/account/mifLSHU2re3GAmiotOkdYExeoQ/file/modely%252Fmodely_02_efektivita_testovani.csv" df = pd.read_csv(url, delimiter=';') df = df.sort_values(['datum_hlaseni', 'datum_prvniho_priznaku', 'orp', 'vek_kat', 'pohlavi']) ...
0
0
0
0
0
0
0
0
0
832acd9db96614ccc2d38b291080f4460de203bc
8,375
py
Python
functions/sampling.py
Yuleii/yulei-thesis-QBSM-kw94
bb882bc6c809331c370a4d6442c36ad67ccad498
[ "MIT" ]
null
null
null
functions/sampling.py
Yuleii/yulei-thesis-QBSM-kw94
bb882bc6c809331c370a4d6442c36ad67ccad498
[ "MIT" ]
null
null
null
functions/sampling.py
Yuleii/yulei-thesis-QBSM-kw94
bb882bc6c809331c370a4d6442c36ad67ccad498
[ "MIT" ]
null
null
null
"""Functions that create samples.""" import chaospy as cp import numpy as np import respy as rp import pandas as pd from pathlib import Path PROJECT_ROOT = Path(__file__).resolve().parents[1] DATA_PATH = PROJECT_ROOT / "data" CHAOSPY_SAMPLING_METHODS = { "random", "grid", "chebyshev", "korobov", ...
27.459016
89
0.628776
"""Functions that create samples.""" import chaospy as cp import numpy as np import respy as rp import pandas as pd from pathlib import Path PROJECT_ROOT = Path(__file__).resolve().parents[1] DATA_PATH = PROJECT_ROOT / "data" CHAOSPY_SAMPLING_METHODS = { "random", "grid", "chebyshev", "korobov", ...
0
0
0
0
0
0
0
0
0
eaff22981bf52da6d78148d2d28c27ef6dce2a67
523
py
Python
app/auth.py
leandcesar/bobotinho-api
7a3ce31fb2220e00b4b1fabf10e1c32afde314a9
[ "MIT" ]
null
null
null
app/auth.py
leandcesar/bobotinho-api
7a3ce31fb2220e00b4b1fabf10e1c32afde314a9
[ "MIT" ]
null
null
null
app/auth.py
leandcesar/bobotinho-api
7a3ce31fb2220e00b4b1fabf10e1c32afde314a9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from flask_httpauth import HTTPTokenAuth auth = HTTPTokenAuth(scheme="Bearer", header="Authorization")
24.904762
76
0.74761
# -*- coding: utf-8 -*- from http import HTTPStatus from typing import Optional from flask_httpauth import HTTPTokenAuth from app.config import config auth = HTTPTokenAuth(scheme="Bearer", header="Authorization") @auth.verify_token def verify_token(token: str) -> Optional[str]: users = {config.AUTH_TOKEN: "adm...
0
259
0
0
0
0
0
20
113
826b024a79bb72e12c1b5294e4bfa65c557b57a9
3,118
py
Python
lib/cirrocumulus/parquet_output.py
klarman-cell-observatory/cirrocumulus-app-engine
52997ae790773364591ab8d7c747e4505700373b
[ "BSD-3-Clause" ]
null
null
null
lib/cirrocumulus/parquet_output.py
klarman-cell-observatory/cirrocumulus-app-engine
52997ae790773364591ab8d7c747e4505700373b
[ "BSD-3-Clause" ]
1
2021-04-13T14:52:39.000Z
2021-04-13T15:53:34.000Z
lib/cirrocumulus/parquet_output.py
klarman-cell-observatory/cirrocumulus-app-engine
52997ae790773364591ab8d7c747e4505700373b
[ "BSD-3-Clause" ]
null
null
null
import logging logger = logging.getLogger("cirro")
37.566265
107
0.661642
import logging import os import numpy as np import pandas._libs.json as ujson import pyarrow as pa import pyarrow.parquet as pq import scipy.sparse from cirrocumulus.anndata_util import DataType logger = logging.getLogger("cirro") def write_pq(d, output_dir, name, filesystem, write_statistics=True, row_group_size=...
0
0
0
0
0
2,764
0
26
271
bfdf11c58987e1527ebc503d8721980c3affd9ed
17,105
py
Python
abei/implements/procedure_basic.py
mind-bricks/abei
5e364d5200111793073a0a3d64f556b5207a8734
[ "MIT" ]
null
null
null
abei/implements/procedure_basic.py
mind-bricks/abei
5e364d5200111793073a0a3d64f556b5207a8734
[ "MIT" ]
null
null
null
abei/implements/procedure_basic.py
mind-bricks/abei
5e364d5200111793073a0a3d64f556b5207a8734
[ "MIT" ]
null
null
null
# composite procedure class ------------------------------ procedure_class_composite = ProcedureClassComposite() # bool procedure classes ---------------------------------- procedure_class_not = ProcedureClassBasic( signature='not', docstring='logic not', procedure_type=ProcedureUnaryOperator,...
29.696181
77
0.635194
from abei.interfaces import ( IProcedure, IProcedureClass, IProcedureFactory, IProcedureData, IProcedureLink, ) from .procedure_joint_basic import ( joint_validate, joint_run, ) class ProcedureBasic(IProcedure): signature = 'NA' docstring = 'NA' input_signatures = [] output...
0
614
0
11,145
0
0
0
162
319
21c9f79920b697cfa6ac2f04a0ea24b5b317a312
5,109
py
Python
tests/handlers/test_base_handler_with_different_storage_config.py
bear8421/thumbor
00a0c44d44b8fa5f06c38deee7123793addda404
[ "MIT" ]
1
2021-12-24T02:01:52.000Z
2021-12-24T02:01:52.000Z
tests/handlers/test_base_handler_with_different_storage_config.py
bear8421/thumbor
00a0c44d44b8fa5f06c38deee7123793addda404
[ "MIT" ]
2
2022-03-17T06:53:16.000Z
2022-03-31T19:42:00.000Z
tests/handlers/test_base_handler_with_different_storage_config.py
bear8421/thumbor
00a0c44d44b8fa5f06c38deee7123793addda404
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com thumbor@googlegroups.com # pylint: disable=broad-except,abstract-method,attribute-defined-out...
34.755102
115
0.671169
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com thumbor@googlegroups.com from json import loads from shutil import which from preggy import ...
0
2,686
0
1,504
0
0
0
225
291
69f96b0f73d164eab7447db6d9b5280090b7a144
784
py
Python
server/migrations/versions/69858d32aaff_.py
morganrconnolly/billingPlatform
9323b3af5a906cac0a0966943d8cf6d9fb1b656c
[ "MIT" ]
null
null
null
server/migrations/versions/69858d32aaff_.py
morganrconnolly/billingPlatform
9323b3af5a906cac0a0966943d8cf6d9fb1b656c
[ "MIT" ]
null
null
null
server/migrations/versions/69858d32aaff_.py
morganrconnolly/billingPlatform
9323b3af5a906cac0a0966943d8cf6d9fb1b656c
[ "MIT" ]
null
null
null
"""empty message Revision ID: 69858d32aaff Revises: 160db434d139 Create Date: 2016-07-20 16:08:00.219265 """ # revision identifiers, used by Alembic. revision = '69858d32aaff' down_revision = '160db434d139'
27.034483
113
0.706633
"""empty message Revision ID: 69858d32aaff Revises: 160db434d139 Create Date: 2016-07-20 16:08:00.219265 """ # revision identifiers, used by Alembic. revision = '69858d32aaff' down_revision = '160db434d139' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - ...
0
0
0
0
0
478
0
3
91
07f275f04459b59e56771f458e8dbc8d729ad137
3,070
py
Python
autogluon/utils/tabular/ml/models/abstract/model_trial.py
tlienart/autogluon
d02e37f41cd947dd1281bb1296cd12a8187ec441
[ "Apache-2.0" ]
6
2020-06-16T19:17:36.000Z
2021-07-07T14:50:31.000Z
autogluon/utils/tabular/ml/models/abstract/model_trial.py
tlienart/autogluon
d02e37f41cd947dd1281bb1296cd12a8187ec441
[ "Apache-2.0" ]
null
null
null
autogluon/utils/tabular/ml/models/abstract/model_trial.py
tlienart/autogluon
d02e37f41cd947dd1281bb1296cd12a8187ec441
[ "Apache-2.0" ]
2
2020-12-13T16:40:04.000Z
2021-03-08T09:14:16.000Z
import logging logger = logging.getLogger(__name__)
41.486486
138
0.708143
import os import time import logging from ....utils.loaders import load_pkl from ....utils.exceptions import TimeLimitExceeded from ......core import args from ......scheduler.reporter import LocalStatusReporter logger = logging.getLogger(__name__) @args() def model_trial(args, reporter: LocalStatusReporter): "...
0
1,471
0
0
0
1,276
0
65
202
b91ce7f9815c40c314f3094cadd8acb2c4cda526
2,874
py
Python
examples/server-ssh-keys.py
pschelle/pyonepassword
2258c0fa851ad6a63c4f959982a66c715706b654
[ "MIT" ]
12
2019-08-11T09:08:47.000Z
2022-03-18T22:10:12.000Z
examples/server-ssh-keys.py
pschelle/pyonepassword
2258c0fa851ad6a63c4f959982a66c715706b654
[ "MIT" ]
23
2019-09-13T20:16:12.000Z
2022-01-15T18:29:52.000Z
examples/server-ssh-keys.py
pschelle/pyonepassword
2258c0fa851ad6a63c4f959982a66c715706b654
[ "MIT" ]
10
2020-03-10T19:49:35.000Z
2022-01-18T14:09:10.000Z
if __name__ == "__main__": main()
32.292135
101
0.675713
import os import getpass from pathlib import Path from argparse import ArgumentParser from pyonepassword import OP, OPServerItem class ServerWithSSHKeys: SSH_KEYS_SECTION = "SSH Keys" PRIV_PERMS = 0o600 PUB_PERMS = 0o644 DIR_PERMS = 0o755 def __init__(self, server_item: OPServerItem): sel...
0
0
0
1,494
0
1,116
0
19
202
df90b5084ec078dc608d22914913d694a5f7c40b
21,282
py
Python
scraper.py
dancing-rain/HackIllinois-2022-RedditUsrInfoDiscordBot
65462267f5a282e68b5714c0a1e09a6ded939f1a
[ "MIT" ]
2
2022-02-26T07:27:10.000Z
2022-02-26T22:41:06.000Z
scraper.py
dancing-rain/HackIllinois-2022-RedditUsrInfoDiscordBot
65462267f5a282e68b5714c0a1e09a6ded939f1a
[ "MIT" ]
null
null
null
scraper.py
dancing-rain/HackIllinois-2022-RedditUsrInfoDiscordBot
65462267f5a282e68b5714c0a1e09a6ded939f1a
[ "MIT" ]
1
2022-02-26T07:21:01.000Z
2022-02-26T07:21:01.000Z
#Dependencies import praw import os import json from dotenv import load_dotenv load_dotenv("./.env") CLIENT_ID = os.getenv("CLIENT_ID") CLIENT_SECRET = os.getenv("CLIENT_SECRET") PASSWORD = os.getenv("PASS") USER_AGENT = os.getenv("USER_AGENT") USERNAME = os.getenv("USERNAME") abs_path = os.path.abspath(__file__) di...
43.971074
282
0.619303
#Dependencies from array import array from operator import mod from statistics import mode from unicodedata import name import praw import os from datetime import datetime import time from prawcore.exceptions import NotFound import json from dotenv import load_dotenv import scraper as scrape load_dotenv("./.env") CLI...
0
0
0
16,627
0
1,567
0
38
369
5d6c9190d3e7576fe518ec7b1ef02456361a1ace
507
py
Python
tests/bench_mark/func_exec_time_decorator.py
apache/incubator-sdap-in-situ-data-services
4e65e0e2eb178461baba61e2204e5a97f701d8ed
[ "Apache-2.0" ]
1
2021-11-07T20:27:13.000Z
2021-11-07T20:27:13.000Z
tests/bench_mark/func_exec_time_decorator.py
apache/incubator-sdap-in-situ-data-services
4e65e0e2eb178461baba61e2204e5a97f701d8ed
[ "Apache-2.0" ]
null
null
null
tests/bench_mark/func_exec_time_decorator.py
apache/incubator-sdap-in-situ-data-services
4e65e0e2eb178461baba61e2204e5a97f701d8ed
[ "Apache-2.0" ]
2
2021-11-07T20:27:05.000Z
2021-11-15T15:40:40.000Z
import logging LOGGER = logging.getLogger(__name__)
28.166667
82
0.682446
import logging from datetime import datetime from functools import wraps LOGGER = logging.getLogger(__name__) def func_exec_time_decorator(f): @wraps(f) def decorated_function(*args, **kwargs): time1 = datetime.now() func_result = f(*args, **kwargs) time2 = datetime.now() dura...
0
305
0
0
0
67
0
14
67
c3a5056c918dabba6cfeccc2f5e35a381a297809
678
py
Python
falconn/src/examples/glove/convert.py
bobpoekert/ocamlfalconn
678976064077ca2a4bc6ced3e84042ac1751669a
[ "MIT" ]
1,068
2015-12-10T18:03:11.000Z
2022-03-29T09:05:38.000Z
falconn/src/examples/glove/convert.py
bobpoekert/ocamlfalconn
678976064077ca2a4bc6ced3e84042ac1751669a
[ "MIT" ]
108
2015-12-10T21:14:41.000Z
2022-03-15T17:51:17.000Z
falconn/src/examples/glove/convert.py
bobpoekert/ocamlfalconn
678976064077ca2a4bc6ced3e84042ac1751669a
[ "MIT" ]
224
2015-12-17T02:35:21.000Z
2022-03-29T09:05:40.000Z
#!/usr/bin/python import sys import struct import numpy as np matrix = [] with open('dataset/glove.840B.300d.txt', 'r') as inf: with open('dataset/glove.840B.300d.dat', 'wb') as ouf: counter = 0 for line in inf: row = [float(x) for x in line.split()[1:]] assert len(row) == ...
32.285714
70
0.558997
#!/usr/bin/python import sys import struct import numpy as np matrix = [] with open('dataset/glove.840B.300d.txt', 'r') as inf: with open('dataset/glove.840B.300d.dat', 'wb') as ouf: counter = 0 for line in inf: row = [float(x) for x in line.split()[1:]] assert len(row) == ...
0
0
0
0
0
0
0
0
0
54c89ad19cbe5956de571d43a26e1b16cbff6748
18,826
py
Python
iso3166/__init__.py
briangmaddox/QGISSOLR
e98e98f89265b7d0b6b8a760f6233c990ce368c3
[ "MIT" ]
null
null
null
iso3166/__init__.py
briangmaddox/QGISSOLR
e98e98f89265b7d0b6b8a760f6233c990ce368c3
[ "MIT" ]
null
null
null
iso3166/__init__.py
briangmaddox/QGISSOLR
e98e98f89265b7d0b6b8a760f6233c990ce368c3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from builtins import object from collections import namedtuple __all__ = ["countries"] try: str except NameError: str = str Country = namedtuple('Country', 'name alpha2 alpha3 numeric apolitical_name') _records = [ Country(u"Afghanistan", "AF", "AFG", "004",...
49.412073
78
0.565973
# -*- coding: utf-8 -*- from builtins import object import re from numbers import Integral from collections import namedtuple __all__ = ["countries"] try: str except NameError: str = str Country = namedtuple('Country', 'name alpha2 alpha3 numeric apolitical_name') _records = [ Coun...
20
0
0
1,014
0
56
0
-5
90
eeffb6fed77812d6b8dcfa922e04b9b21a87db1d
637
py
Python
tracim/migration/versions/2cd20ff3d23a_user_timezone.py
lebouquetin/tracim
dc3485f92b07ced3230834a5852c9f9574477c1c
[ "MIT" ]
1
2016-09-27T12:16:05.000Z
2016-09-27T12:16:05.000Z
tracim/migration/versions/2cd20ff3d23a_user_timezone.py
lebouquetin/tracim
dc3485f92b07ced3230834a5852c9f9574477c1c
[ "MIT" ]
null
null
null
tracim/migration/versions/2cd20ff3d23a_user_timezone.py
lebouquetin/tracim
dc3485f92b07ced3230834a5852c9f9574477c1c
[ "MIT" ]
null
null
null
"""user_timezone Revision ID: 2cd20ff3d23a Revises: b4b8d57b54e5 Create Date: 2016-11-08 11:32:00.903232 """ # revision identifiers, used by Alembic. revision = '2cd20ff3d23a' down_revision = 'b4b8d57b54e5'
23.592593
108
0.700157
"""user_timezone Revision ID: 2cd20ff3d23a Revises: b4b8d57b54e5 Create Date: 2016-11-08 11:32:00.903232 """ # revision identifiers, used by Alembic. revision = '2cd20ff3d23a' down_revision = 'b4b8d57b54e5' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - ...
0
0
0
0
0
331
0
3
91
adfdf8fb280e0e87d5424c93032f99b388e9671d
1,280
py
Python
setup.py
CraazzzyyFoxx/lavacord.py
5974644b2ceb814b8ad3e253e9328d22c5e17921
[ "MIT" ]
null
null
null
setup.py
CraazzzyyFoxx/lavacord.py
5974644b2ceb814b8ad3e253e9328d22c5e17921
[ "MIT" ]
null
null
null
setup.py
CraazzzyyFoxx/lavacord.py
5974644b2ceb814b8ad3e253e9328d22c5e17921
[ "MIT" ]
null
null
null
import pathlib from setuptools import setup here = pathlib.Path(__file__).parent.resolve() long_description = (here / 'README.md').read_text(encoding='utf-8') setup( name='lavacord.py', version='1.0.4a1', description='Its a lavalink nodes manger to make a music bots for discord with python.', long_d...
36.571429
92
0.663281
import pathlib from setuptools import setup here = pathlib.Path(__file__).parent.resolve() long_description = (here / 'README.md').read_text(encoding='utf-8') setup( name='lavacord.py', version='1.0.4a1', description='Its a lavalink nodes manger to make a music bots for discord with python.', long_d...
0
0
0
0
0
0
0
0
0