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
9d1226bb934aa8d85aebc5a8286c5873c99e466e
1,136
py
Python
geojson_buffer.py
jamaps/shell_scripts
439dae46e8c9b6f8e950ac442bc8a4dd477eff9b
[ "MIT" ]
9
2016-10-22T18:37:18.000Z
2021-07-15T23:36:33.000Z
geojson_buffer.py
jamaps/shell_scripts
439dae46e8c9b6f8e950ac442bc8a4dd477eff9b
[ "MIT" ]
null
null
null
geojson_buffer.py
jamaps/shell_scripts
439dae46e8c9b6f8e950ac442bc8a4dd477eff9b
[ "MIT" ]
3
2016-10-24T18:39:27.000Z
2020-07-05T15:30:20.000Z
# creates a polygonoal buffer in geojson format given ... # xin,yin = centre point # radius = buffer radius # npoints = number of points (e.g. 3 for triangle, 6 for hex, Inf. for circle, etc.) import math import matplotlib.pyplot as plt print buffer(50,50,1,24)
23.183673
84
0.49912
# creates a polygonoal buffer in geojson format given ... # xin,yin = centre point # radius = buffer radius # npoints = number of points (e.g. 3 for triangle, 6 for hex, Inf. for circle, etc.) import math import matplotlib.pyplot as plt def buffer(xin,yin,radius,npoints): x = [] y = [] coords = [] a...
0
0
0
0
0
849
0
0
23
5c3d230b1a892a1d3a050db854bf46226b9496f0
3,913
py
Python
tests/data/embeddings_test.py
mrbot-ai/deep_qa
a1731331e12b921b4dbb43433f9c028b362495e8
[ "Apache-2.0" ]
2
2017-01-26T13:07:13.000Z
2019-03-27T16:11:56.000Z
deep_qa-master/tests/data/embeddings_test.py
RTHMaK/RPGOne
3f3ada7db1762781668bfb2377154fdc00e17212
[ "Apache-2.0" ]
null
null
null
deep_qa-master/tests/data/embeddings_test.py
RTHMaK/RPGOne
3f3ada7db1762781668bfb2377154fdc00e17212
[ "Apache-2.0" ]
1
2019-01-04T13:08:27.000Z
2019-01-04T13:08:27.000Z
# pylint: disable=no-self-use,invalid-name
56.710145
101
0.718375
# pylint: disable=no-self-use,invalid-name import gzip import numpy import pytest from deep_qa.data.embeddings import PretrainedEmbeddings from deep_qa.data.data_indexer import DataIndexer from ..common.test_case import DeepQaTestCase class TestPretrainedEmbeddings(DeepQaTestCase): # pylint: disable=protected-acc...
0
0
0
3,654
0
0
0
60
156
4c5befdd5e200333700e147cce3fbc7aba3757e3
630
py
Python
instructors/projects/decoding_fun/examples/rotator.py
mgadagin/PythonClass
70b370362d75720b3fb0e1d6cc8158f9445e9708
[ "MIT" ]
46
2017-09-27T20:19:36.000Z
2020-12-08T10:07:19.000Z
instructors/projects/decoding_fun/examples/rotator.py
mgadagin/PythonClass
70b370362d75720b3fb0e1d6cc8158f9445e9708
[ "MIT" ]
6
2018-01-09T08:07:37.000Z
2020-09-07T12:25:13.000Z
instructors/projects/decoding_fun/examples/rotator.py
mgadagin/PythonClass
70b370362d75720b3fb0e1d6cc8158f9445e9708
[ "MIT" ]
18
2017-10-10T02:06:51.000Z
2019-12-01T10:18:13.000Z
import rot13 if __name__ == '__main__': """ Perform rotational encryption on an input. """ source_file = 'cc.txt' state = 'r' alphabet = 'abcdefghijklmnopqrstuvwxyz' rotation = 13 output_file = 'ccenc.txt' output_mode = 'w' rotation_dict = rot13.assign_and_return_posit...
19.090909
73
0.660317
import rot13 if __name__ == '__main__': """ Perform rotational encryption on an input. """ source_file = 'cc.txt' state = 'r' alphabet = 'abcdefghijklmnopqrstuvwxyz' rotation = 13 output_file = 'ccenc.txt' output_mode = 'w' rotation_dict = rot13.assign_and_return_posit...
0
0
0
0
0
0
0
0
0
2c810743481e3cc8b1ed04f6e9a8ea16cf1dd34b
1,804
py
Python
test/test_manager/make_tc_list.py
jonghenhan/iotivity
7dfc2bc6a5c0506cf88bc23e88e38fe1b795da31
[ "Apache-2.0" ]
301
2015-01-20T16:11:32.000Z
2021-11-25T04:29:36.000Z
test/test_manager/make_tc_list.py
jonghenhan/iotivity
7dfc2bc6a5c0506cf88bc23e88e38fe1b795da31
[ "Apache-2.0" ]
13
2015-06-04T09:55:15.000Z
2020-09-23T00:38:07.000Z
test/test_manager/make_tc_list.py
jonghenhan/iotivity
7dfc2bc6a5c0506cf88bc23e88e38fe1b795da31
[ "Apache-2.0" ]
233
2015-01-26T03:41:59.000Z
2022-03-18T23:54:04.000Z
#!/usr/bin/python3 ''' /****************************************************************** * * Copyright 2018 Samsung Electronics 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...
32.214286
104
0.55765
#!/usr/bin/python3 ''' /****************************************************************** * * Copyright 2018 Samsung Electronics 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...
0
0
0
0
0
702
0
-12
45
01254b2360e57505c2e3c9d6e0f430a01875142e
1,046
py
Python
api/encrypt.py
ChrisBoesch/angular-csv-viewer
772557c7be900c2b3acce2d8d6bf0a871f32d69a
[ "MIT" ]
2
2016-08-10T02:34:50.000Z
2021-03-24T08:00:02.000Z
api/encrypt.py
ChrisBoesch/angular-csv-viewer
772557c7be900c2b3acce2d8d6bf0a871f32d69a
[ "MIT" ]
null
null
null
api/encrypt.py
ChrisBoesch/angular-csv-viewer
772557c7be900c2b3acce2d8d6bf0a871f32d69a
[ "MIT" ]
1
2015-07-01T02:45:39.000Z
2015-07-01T02:45:39.000Z
#!/usr/bin/env python # # Encrypt sys.stdin # import os.path import logging ROOT = os.path.dirname(__file__) PRIV_KEY = os.path.join(ROOT, 'rsa_1024_priv.pem') PUB_KEY = os.path.join(ROOT, 'rsa_1024_pub.pem') if __name__ == '__main__': logging.basicConfig(level=logging.INFO) main()
20.92
59
0.705545
#!/usr/bin/env python # # Encrypt sys.stdin # import fileinput import os.path import logging from Crypto.Cipher import PKCS1_v1_5 from Crypto.PublicKey import RSA ROOT = os.path.dirname(__file__) PRIV_KEY = os.path.join(ROOT, 'rsa_1024_priv.pem') PUB_KEY = os.path.join(ROOT, 'rsa_1024_pub.pem') def get_key(pem_...
0
0
0
0
0
568
0
21
160
01029686157e349c178c6c525cd0233c6cea6f5b
5,280
py
Python
sanskrit_parser/generator/sutra.py
avinashvarna/sanskrit_parser
79338213128b29927fe2f06031379bb1e3864a83
[ "MIT" ]
54
2017-06-30T09:11:53.000Z
2022-03-22T15:35:41.000Z
sanskrit_parser/generator/sutra.py
avinashvarna/sanskrit_parser
79338213128b29927fe2f06031379bb1e3864a83
[ "MIT" ]
159
2017-06-30T07:04:36.000Z
2021-06-17T17:03:43.000Z
sanskrit_parser/generator/sutra.py
avinashvarna/sanskrit_parser
79338213128b29927fe2f06031379bb1e3864a83
[ "MIT" ]
18
2017-08-17T13:22:00.000Z
2022-01-20T01:08:58.000Z
""" Operational Sutras """ import logging logger = logging.getLogger(__name__) # Global Domains # Base class
30.877193
85
0.540341
""" Operational Sutras """ from sanskrit_parser.base.sanskrit_base import SanskritImmutableString, SLP1 from decimal import Decimal from copy import deepcopy from sanskrit_parser.generator.paninian_object import PaninianObject import logging logger = logging.getLogger(__name__) # Global Domains class GlobalDomains(...
0
0
0
3,880
0
993
0
112
178
e7f82b756d91da90b530eac516827be92b6587ce
1,842
py
Python
satellite/tests/vault/test_transformer.py
mnimmny/vgs-satellite
82624dc76b1e7b767e7b176c24f9867a1591f91c
[ "Apache-2.0" ]
null
null
null
satellite/tests/vault/test_transformer.py
mnimmny/vgs-satellite
82624dc76b1e7b767e7b176c24f9867a1591f91c
[ "Apache-2.0" ]
null
null
null
satellite/tests/vault/test_transformer.py
mnimmny/vgs-satellite
82624dc76b1e7b767e7b176c24f9867a1591f91c
[ "Apache-2.0" ]
null
null
null
XML_PAYLOAD = b"""<CC> <Foo>PREFIX<Bar>TEXT1</Bar>TEXT2<Bar>TEXT3</Bar>TAIL</Foo> <Number>4111111111111111</Number> <Number>4444333322221111</Number> <CVC>123</CVC> </CC>"""
24.891892
71
0.635179
import pytest from satellite.vault.transformer import ( FormDataTransformer, TransformerError, XMLTransformer, ) XML_PAYLOAD = b"""<CC> <Foo>PREFIX<Bar>TEXT1</Bar>TEXT2<Bar>TEXT3</Bar>TAIL</Foo> <Number>4111111111111111</Number> <Number>4444333322221111</Number> <CVC>123</CVC> </CC>""" ...
0
798
0
0
0
606
0
81
160
558c41df94a8f85f4bed27fc8c56b4797f223639
2,813
py
Python
test/python/test_io_utils/test_pink_graph_io.py
deisemaia/Higra
82cb78b606a383f3961faa882457a9a987f802e0
[ "CECILL-B" ]
64
2019-08-18T19:23:23.000Z
2022-03-21T04:15:04.000Z
test/python/test_io_utils/test_pink_graph_io.py
deisemaia/Higra
82cb78b606a383f3961faa882457a9a987f802e0
[ "CECILL-B" ]
120
2019-08-16T09:10:35.000Z
2022-03-17T09:42:58.000Z
test/python/test_io_utils/test_pink_graph_io.py
deisemaia/Higra
82cb78b606a383f3961faa882457a9a987f802e0
[ "CECILL-B" ]
12
2019-10-04T07:35:55.000Z
2021-01-10T19:59:11.000Z
############################################################################ # Copyright ESIEE Paris (2018) # # # # Contributor(s) : Benjamin Perret # # ...
31.255556
81
0.515819
############################################################################ # Copyright ESIEE Paris (2018) # # # # Contributor(s) : Benjamin Perret # # ...
0
0
0
1,649
0
69
0
-6
90
bb8b378cde978876649117f8b27141698922b9e2
1,800
py
Python
Scrapers/MovieTitleScraper.py
JeremyEudy/AutoTomato
393b5e0cd9e9f6468ed7554087f6e6b7ec655198
[ "MIT" ]
null
null
null
Scrapers/MovieTitleScraper.py
JeremyEudy/AutoTomato
393b5e0cd9e9f6468ed7554087f6e6b7ec655198
[ "MIT" ]
null
null
null
Scrapers/MovieTitleScraper.py
JeremyEudy/AutoTomato
393b5e0cd9e9f6468ed7554087f6e6b7ec655198
[ "MIT" ]
null
null
null
# **************************************************************************** # # # # |\ # # MovieTitleScraper.py ------| \---- ...
41.860465
105
0.388333
# **************************************************************************** # # # # |\ # # MovieTitleScraper.py ------| \---- ...
0
0
0
0
0
0
0
9
66
ffe3a14062bdb6e547ae9e5634c9d6699a29c16e
2,810
py
Python
utils/utils.py
GunjanChourasia/WS_DAN_PyTorch
6c12a1b5b0b8980e3b69d44474e0b5edb455570c
[ "MIT" ]
134
2019-11-30T07:36:21.000Z
2022-03-21T10:53:14.000Z
utils/utils.py
GunjanChourasia/WS_DAN_PyTorch
6c12a1b5b0b8980e3b69d44474e0b5edb455570c
[ "MIT" ]
9
2020-02-01T09:28:52.000Z
2021-06-07T04:20:46.000Z
utils/utils.py
GunjanChourasia/WS_DAN_PyTorch
6c12a1b5b0b8980e3b69d44474e0b5edb455570c
[ "MIT" ]
28
2019-11-30T09:21:20.000Z
2022-03-17T12:21:01.000Z
############################################################ # File: utils.py # # Created: 2019-11-18 20:50:50 # # Author : wvinzh # # Email : wvinzh@qq.com # # -----------...
32.674419
86
0.556584
############################################################ # File: utils.py # # Created: 2019-11-18 20:50:50 # # Author : wvinzh # # Email : wvinzh@qq.com # # -----------...
87
0
0
0
0
1,505
0
-38
224
aacb44c73a5196446260ba164db40bd45fe507df
4,569
py
Python
app/views/old/users.py
WilliamBesseau/Groot
9dfdc05dc6da914a65a94a57b2b56dc63ddbdb8e
[ "MIT" ]
null
null
null
app/views/old/users.py
WilliamBesseau/Groot
9dfdc05dc6da914a65a94a57b2b56dc63ddbdb8e
[ "MIT" ]
null
null
null
app/views/old/users.py
WilliamBesseau/Groot
9dfdc05dc6da914a65a94a57b2b56dc63ddbdb8e
[ "MIT" ]
null
null
null
SALT = b'$2b$12$QSEeNz4SOAKE/RUZT4zNHO'
33.595588
104
0.615233
import bcrypt as b from flask import render_template, request, redirect, url_for, session, abort from sqlalchemy import or_ from app import app from app.models.users import User from app.models.speakers import Speaker from app.models.students import Student SALT = b'$2b$12$QSEeNz4SOAKE/RUZT4zNHO' @app.route('/login...
34
4,085
0
0
0
0
0
104
316
abbd6345d8fb492ffb84d82aa6765d8e1019d6d7
615
py
Python
edx_course_team_api/apps.py
ibm-skills-network/edx-course-team-api
662a756f61047bd2f1c10ede2feb6f1a24c2717d
[ "MIT" ]
null
null
null
edx_course_team_api/apps.py
ibm-skills-network/edx-course-team-api
662a756f61047bd2f1c10ede2feb6f1a24c2717d
[ "MIT" ]
null
null
null
edx_course_team_api/apps.py
ibm-skills-network/edx-course-team-api
662a756f61047bd2f1c10ede2feb6f1a24c2717d
[ "MIT" ]
null
null
null
""" edx_course_team_api Django application initialization. """
22.777778
65
0.543089
""" edx_course_team_api Django application initialization. """ from django.apps import AppConfig class EdxCourseTeamApiConfig(AppConfig): """ Configuration for the edx_course_team_api Django application. """ name = 'edx_course_team_api' plugin_app = { 'url_config': { 'cms.dja...
0
0
0
493
0
0
0
12
46
534205e088ef8c7792a1be27b11aab8cb158f1c5
4,238
py
Python
nutanix-backup.py
deviscalio/nutanix-backup-script
f43bc37e84348e02dc3c7075eb252ae5914151df
[ "Apache-2.0" ]
null
null
null
nutanix-backup.py
deviscalio/nutanix-backup-script
f43bc37e84348e02dc3c7075eb252ae5914151df
[ "Apache-2.0" ]
null
null
null
nutanix-backup.py
deviscalio/nutanix-backup-script
f43bc37e84348e02dc3c7075eb252ae5914151df
[ "Apache-2.0" ]
null
null
null
import json import requests from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning) import os if __name__ == '__main__': try: with open("nutanix-backup.json", "r") as config_file: cfg = json.load(config_file) ...
32.6
99
0.619396
import hashlib import json import requests from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning) from datetime import datetime import sys import click import glob import os @click.group() def cli(): pass def clean_backup_folder()...
0
354
0
0
0
3,156
0
-29
340
8ad4b97807caba29accad1b5317470b25cc6a08f
2,303
py
Python
other/application-mongo.py
rhotter/marinotes
db8d99acd5cf30008cc599fd1b4bfc74b66b2e2b
[ "MIT" ]
2
2018-05-28T01:39:07.000Z
2019-03-10T21:06:30.000Z
other/application-mongo.py
rhotter/marinotes
db8d99acd5cf30008cc599fd1b4bfc74b66b2e2b
[ "MIT" ]
null
null
null
other/application-mongo.py
rhotter/marinotes
db8d99acd5cf30008cc599fd1b4bfc74b66b2e2b
[ "MIT" ]
null
null
null
from flask import Flask from flask_pymongo import PyMongo application = Flask(__name__) application.config['MONGO_DBNAME'] = 'server2' with application.app_context(): mongo = PyMongo(application) d = mongo.db.classes if __name__ == "__main__": # Setting debug to True enables debug output. This line sho...
26.77907
94
0.641772
from flask import Flask, render_template, redirect, abort import os from flask_pymongo import PyMongo application = Flask(__name__) application.config['MONGO_DBNAME'] = 'server2' with application.app_context(): mongo = PyMongo(application) d = mongo.db.classes def getClasses(): classes = [] classes...
0
856
0
0
0
837
0
22
160
789e65230cc59f1f4cea1c30eabc5b8b62c876e8
6,715
py
Python
flink-ml-python/pyflink/ml/core/wrapper.py
mumuhhh/flink-ml
bd6d67f78fe5341ec992d72b633b26e2def7783a
[ "Apache-2.0" ]
null
null
null
flink-ml-python/pyflink/ml/core/wrapper.py
mumuhhh/flink-ml
bd6d67f78fe5341ec992d72b633b26e2def7783a
[ "Apache-2.0" ]
null
null
null
flink-ml-python/pyflink/ml/core/wrapper.py
mumuhhh/flink-ml
bd6d67f78fe5341ec992d72b633b26e2def7783a
[ "Apache-2.0" ]
null
null
null
################################################################################ # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this...
32.129187
96
0.660462
################################################################################ # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this...
0
894
0
3,730
0
154
0
154
296
639788a082231170ba459cbc29c9b32af6afe889
2,305
py
Python
sleekxmpp/features/feature_starttls/starttls.py
vijayp/SleekXMPP
b2e7f57334d27f140f079213c2016615b7168742
[ "BSD-3-Clause" ]
1
2016-10-24T05:30:25.000Z
2016-10-24T05:30:25.000Z
sleekxmpp/features/feature_starttls/starttls.py
vijayp/SleekXMPP
b2e7f57334d27f140f079213c2016615b7168742
[ "BSD-3-Clause" ]
null
null
null
sleekxmpp/features/feature_starttls/starttls.py
vijayp/SleekXMPP
b2e7f57334d27f140f079213c2016615b7168742
[ "BSD-3-Clause" ]
null
null
null
""" SleekXMPP: The Sleek XMPP Library Copyright (C) 2011 Nathanael C. Fritz This file is part of SleekXMPP. See the file LICENSE for copying permission. """ import logging log = logging.getLogger(__name__)
32.464789
72
0.62603
""" SleekXMPP: The Sleek XMPP Library Copyright (C) 2011 Nathanael C. Fritz This file is part of SleekXMPP. See the file LICENSE for copying permission. """ import logging from sleekxmpp.stanza import StreamFeatures from sleekxmpp.xmlstream import RestartStream, register_stanza_plugin from sleekxmpp...
0
0
0
1,753
0
0
0
168
156
0d1ad864dafdba382bbc872df89e13d95e6e7e52
1,933
py
Python
Permutation/Factorial.py
caidevOficial/Python_CombinatorialCalculus
b4f5b4aefef9eff26e179866c87d7ccb4d2c7894
[ "MIT" ]
4
2021-03-27T19:06:38.000Z
2021-09-21T05:46:08.000Z
Permutation/Factorial.py
caidevOficial/Python_CombinatorialCalculus
b4f5b4aefef9eff26e179866c87d7ccb4d2c7894
[ "MIT" ]
null
null
null
Permutation/Factorial.py
caidevOficial/Python_CombinatorialCalculus
b4f5b4aefef9eff26e179866c87d7ccb4d2c7894
[ "MIT" ]
null
null
null
# MIT License # # Copyright (c) 2021 [FacuFalcone] # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
42.021739
80
0.718572
# MIT License # # Copyright (c) 2021 [FacuFalcone] # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
0
0
0
0
0
0
0
0
0
be6577434ed9f5ec17857b0699bb578b7511d36c
1,454
py
Python
Problem 001-150 Python/pb023.py
Adamssss/projectEuler
25881b1bd82876e81197756f62ab5b0d73e3e6c8
[ "MIT" ]
2
2015-02-11T05:47:42.000Z
2015-02-11T05:47:51.000Z
Problem 001-150 Python/pb023.py
Adamssss/projectEuler
25881b1bd82876e81197756f62ab5b0d73e3e6c8
[ "MIT" ]
1
2015-04-13T06:36:21.000Z
2015-04-13T06:36:21.000Z
Problem 001-150 Python/pb023.py
Adamssss/projectEuler
25881b1bd82876e81197756f62ab5b0d73e3e6c8
[ "MIT" ]
null
null
null
import time t1 = time.time() N = 28124 prime = [2,3] b = 3 while True: while True: b = b+2 i = 0 t = True while (prime[i]*prime[i] < b): i=i+1 if (b%prime[i] == 0): t = False break if t: ...
16.155556
66
0.43879
import math import time t1 = time.time() N = 28124 prime = [2,3] b = 3 while True: while True: b = b+2 i = 0 t = True while (prime[i]*prime[i] < b): i=i+1 if (b%prime[i] == 0): t = False break ...
0
0
0
0
0
421
0
-10
44
b1e21793fc6679db25270986e87e8b1ab5d0cc8e
2,538
py
Python
hsm_software/sw/safe_shutdown.py
DiamondKeySecurity/HSM
6b6a0d691a22863411e048c7c211ac63bf9ffaa7
[ "BSD-3-Clause" ]
null
null
null
hsm_software/sw/safe_shutdown.py
DiamondKeySecurity/HSM
6b6a0d691a22863411e048c7c211ac63bf9ffaa7
[ "BSD-3-Clause" ]
null
null
null
hsm_software/sw/safe_shutdown.py
DiamondKeySecurity/HSM
6b6a0d691a22863411e048c7c211ac63bf9ffaa7
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2019 Diamond Key Security, NFP # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # - Redistributions of source code must retain the above copyright notice, #...
36.782609
74
0.706856
#!/usr/bin/env python # Copyright (c) 2019 Diamond Key Security, NFP # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # - Redistributions of source code must retain the above copyright notice, #...
0
0
0
936
0
0
0
-12
46
660bd7d2ea907262ea042d06c371edca1ee8baf9
6,457
py
Python
tokenizer/bpe.py
PaprikaSteiger/atmt
9fa6977a72a2790c3fb0ee7593f61118b1a60514
[ "MIT" ]
null
null
null
tokenizer/bpe.py
PaprikaSteiger/atmt
9fa6977a72a2790c3fb0ee7593f61118b1a60514
[ "MIT" ]
null
null
null
tokenizer/bpe.py
PaprikaSteiger/atmt
9fa6977a72a2790c3fb0ee7593f61118b1a60514
[ "MIT" ]
null
null
null
from pathlib import Path import argparse from tokenizers.decoders import BPEDecoder from seq2seq.data.dictionary import Dictionary from preprocess import make_binary_dataset if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--tokenizer-dir", help...
39.613497
129
0.579216
from pathlib import Path import json import typing as t import argparse import tokenizers.decoders from tokenizers import Tokenizer from tokenizers.pre_tokenizers import Whitespace from tokenizers.trainers import BpeTrainer from tokenizers.models import BPE from tokenizers.decoders import BPEDecoder from seq2seq.data...
0
0
0
0
0
1,671
0
63
293
86df2083ced90d5ba4a0af7f87db6e15f117ba84
51,614
py
Python
src/tests/ftest/util/data_mover_test_base.py
Kmannth/daos
44164ad2582412a24762185d5919b293306cfae3
[ "BSD-2-Clause-Patent" ]
null
null
null
src/tests/ftest/util/data_mover_test_base.py
Kmannth/daos
44164ad2582412a24762185d5919b293306cfae3
[ "BSD-2-Clause-Patent" ]
null
null
null
src/tests/ftest/util/data_mover_test_base.py
Kmannth/daos
44164ad2582412a24762185d5919b293306cfae3
[ "BSD-2-Clause-Patent" ]
null
null
null
#!/usr/bin/python """ (C) Copyright 2018-2021 Intel Corporation. SPDX-License-Identifier: BSD-2-Clause-Patent """
39.67256
98
0.569148
#!/usr/bin/python """ (C) Copyright 2018-2021 Intel Corporation. SPDX-License-Identifier: BSD-2-Clause-Patent """ import os from command_utils_base import CommandFailure from test_utils_container import TestContainer from pydaos.raw import str_to_c_uuid, DaosContainer, DaosObj, IORequest from ior_test_base import Ior...
0
0
0
50,911
0
0
0
255
332
59020769db0211f01beffba3e1d00fdbca1c4bde
2,696
py
Python
assignments/09-grad-swissprot/swisstake.py
jaeanderson/biosys-analytics
2d92bfc584a5ee6a3072616b0f139c0a809bae1d
[ "MIT" ]
null
null
null
assignments/09-grad-swissprot/swisstake.py
jaeanderson/biosys-analytics
2d92bfc584a5ee6a3072616b0f139c0a809bae1d
[ "MIT" ]
null
null
null
assignments/09-grad-swissprot/swisstake.py
jaeanderson/biosys-analytics
2d92bfc584a5ee6a3072616b0f139c0a809bae1d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ Name: jranderson Date: 03.17.19 Purpose: SwissProt to FASTA """ import argparse import os import re import sys from Bio import SeqIO # -------------------------------------------------------- def get_args(): """get command-line arguments""" parser = argparse.ArgumentParser( ...
25.923077
100
0.525964
#!/usr/bin/env python3 """ Name: jranderson Date: 03.17.19 Purpose: SwissProt to FASTA """ import argparse import os import re import sys from Bio import SeqIO # -------------------------------------------------------- def get_args(): """get command-line arguments""" parser = argparse.ArgumentParser( ...
0
0
0
0
0
0
0
0
0
839334f4bb2cc443095af228268cd398084ac4a0
369
py
Python
days/0/main.py
chris-cmsoft/advent-of-code-2021
a69b435f7023e07ee25dc118a2fdc478cc897230
[ "MIT" ]
null
null
null
days/0/main.py
chris-cmsoft/advent-of-code-2021
a69b435f7023e07ee25dc118a2fdc478cc897230
[ "MIT" ]
null
null
null
days/0/main.py
chris-cmsoft/advent-of-code-2021
a69b435f7023e07ee25dc118a2fdc478cc897230
[ "MIT" ]
null
null
null
import os INPUT_FILE = os.path.join(os.path.dirname(os.path.realpath(__file__)), "input.txt") if __name__ == '__main__': for row in get_input(INPUT_FILE): print(row)
23.0625
83
0.574526
import os INPUT_FILE = os.path.join(os.path.dirname(os.path.realpath(__file__)), "input.txt") def get_input(path): with open(path, "r") as file: while True: line = file.readline() if not line: break yield line.strip() if __name__ == '__main__': for ...
0
0
0
0
166
0
0
0
23
a8b5dbc8b68c367c3db60082961c1914656da706
2,378
py
Python
tdrs-backend/tdpservice/users/test/factories.py
riatzukiza/TANF-app
e34efc87e9703bab37db76b84cc47a041e3612a1
[ "CC0-1.0" ]
18
2020-03-25T19:57:12.000Z
2021-07-26T15:37:50.000Z
tdrs-backend/tdpservice/users/test/factories.py
raft-tech/TANF-app
a4ff39ca392591c4c218ad86df3bff5056d73152
[ "CC0-1.0" ]
1,465
2020-07-22T21:16:53.000Z
2022-03-31T16:04:22.000Z
tdrs-backend/tdpservice/users/test/factories.py
riatzukiza/TANF-app
e34efc87e9703bab37db76b84cc47a041e3612a1
[ "CC0-1.0" ]
15
2020-07-22T14:58:37.000Z
2021-06-22T17:29:55.000Z
"""Generate test data for users."""
26.131868
83
0.677881
"""Generate test data for users.""" import factory from tdpservice.stts.test.factories import STTFactory class BaseUserFactory(factory.django.DjangoModelFactory): """Generate test data for users.""" class Meta: """Hardcoded metata data for users.""" model = "users.User" django_get_...
0
380
0
1,700
0
0
0
25
230
349d523ed3e7bdfb570f64403542fd53ed379614
1,632
py
Python
test/framework/abort_job.py
velniukas/jenkinsflow
ca09c4044fc9da683b2233404e071fad506167b8
[ "BSD-3-Clause" ]
12
2015-03-05T14:57:58.000Z
2021-03-30T09:22:04.000Z
test/framework/abort_job.py
lhupfeldt/jenkinsflow
0eda66ea4ac4ef9cd2e07149cc9a33f93a6c40b0
[ "BSD-3-Clause" ]
3
2015-02-23T04:32:11.000Z
2016-03-06T11:51:04.000Z
test/framework/abort_job.py
velniukas/jenkinsflow
ca09c4044fc9da683b2233404e071fad506167b8
[ "BSD-3-Clause" ]
4
2015-05-28T06:08:04.000Z
2019-08-26T09:35:24.000Z
# Copyright (c) 2012 - 2015 Lars Hupfeldt Nielsen, Hupfeldt IT # All rights reserved. This work is under a BSD license, see LICENSE.TXT. import sys import subprocess from jenkinsflow.test.cfg import ApiType from jenkinsflow.test.framework.logger import logt if __name__ == '__main__': job_name = sys.argv[4] ...
36.266667
128
0.706495
# Copyright (c) 2012 - 2015 Lars Hupfeldt Nielsen, Hupfeldt IT # All rights reserved. This work is under a BSD license, see LICENSE.TXT. import sys import time import subprocess from jenkinsflow.test.cfg import ApiType from jenkinsflow.test.framework import api_select from jenkinsflow.test.framework.logger import log...
0
0
0
0
0
647
0
23
67
b16fa4627808d674c41b42e09bbe397e89cb97fb
4,310
py
Python
target_snowflake/file_formats/parquet.py
fixdauto/pipelinewise-target-snowflake
900c350636f4ce11ec2873447239f9a670342663
[ "Apache-2.0" ]
null
null
null
target_snowflake/file_formats/parquet.py
fixdauto/pipelinewise-target-snowflake
900c350636f4ce11ec2873447239f9a670342663
[ "Apache-2.0" ]
1
2022-03-06T21:28:25.000Z
2022-03-06T21:28:25.000Z
target_snowflake/file_formats/parquet.py
isabella232/pipelinewise-target-snowflake
6abcf425ad62233181cc3120daf13f996b6b9c8c
[ "Apache-2.0" ]
1
2022-03-06T21:27:59.000Z
2022-03-06T21:27:59.000Z
"""Parquet file format functions""" import os import pandas from typing import Dict, List from tempfile import mkstemp import target_snowflake.flattening as flattening def create_copy_sql(table_name: str, stage_name: str, s3_key: str, file_format_name: str...
35.619835
116
0.561717
"""Parquet file format functions""" import os import pandas from typing import Dict, List from tempfile import mkstemp import target_snowflake.flattening as flattening def create_copy_sql(table_name: str, stage_name: str, s3_key: str, file_format_name: str...
0
0
0
0
0
0
0
0
0
cfb588c4bb1bd6e10b898ae3f586170e425d6042
16,607
py
Python
gdraw.py
cesar-aguilar/gdraw
e2590e5f7923bb46a922ab4082aba4a6b0517787
[ "MIT" ]
null
null
null
gdraw.py
cesar-aguilar/gdraw
e2590e5f7923bb46a922ab4082aba4a6b0517787
[ "MIT" ]
null
null
null
gdraw.py
cesar-aguilar/gdraw
e2590e5f7923bb46a922ab4082aba4a6b0517787
[ "MIT" ]
null
null
null
# gdraw.py """ Copyright 2021 Cesar O. Aguilar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish...
29.445035
107
0.509544
# gdraw.py """ Copyright 2021 Cesar O. Aguilar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish...
0
0
0
15,246
0
0
0
8
133
d4ce86f0ca0f6275f3682480e94f464d7e604c68
1,022
py
Python
Chapter08/ch08_06.py
ngkhang/py4e
e38f01e4301f8f8b6dbe1bccf953d4c7ce478a40
[ "CECILL-B" ]
null
null
null
Chapter08/ch08_06.py
ngkhang/py4e
e38f01e4301f8f8b6dbe1bccf953d4c7ce478a40
[ "CECILL-B" ]
null
null
null
Chapter08/ch08_06.py
ngkhang/py4e
e38f01e4301f8f8b6dbe1bccf953d4c7ce478a40
[ "CECILL-B" ]
null
null
null
''' Exercise 6: Rewrite the program that prompts the user for a list of numbers\ and prints out the maximum and minimum of the numbers at the end when the user enters done. Write the program to store the numbers the user enters in a list and use the max() and min() functions to compu...
23.767442
68
0.577299
''' Exercise 6: Rewrite the program that prompts the user for a list of numbers\ and prints out the maximum and minimum of the numbers at the end when the user enters “done”. Write the program to store the numbers the user enters in a list and use the max() and min() functions to com...
6
0
0
0
0
0
0
0
0
27ec0dbd3483b66d79d8935d99fc21cca0bfc1f2
8,776
py
Python
mojo/public/bindings/pylib/parse/mojo_lexer.py
iplo/Chain
8bc8943d66285d5258fffc41bed7c840516c4422
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
231
2015-01-08T09:04:44.000Z
2021-12-30T03:03:10.000Z
mojo/public/bindings/pylib/parse/mojo_lexer.py
JasonEric/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2017-02-14T21:55:58.000Z
2017-02-14T21:55:58.000Z
mojo/public/bindings/pylib/parse/mojo_lexer.py
JasonEric/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
268
2015-01-21T05:53:28.000Z
2022-03-25T22:09:01.000Z
# PLY based Lexer class, based on pycparser by Eli Bendersky. # # Copyright (c) 2012, Eli Bendersky # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # * Redistributions of source code must retain...
28.586319
82
0.592183
# PLY based Lexer class, based on pycparser by Eli Bendersky. # # Copyright (c) 2012, Eli Bendersky # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # * Redistributions of source code must retain...
0
852
0
5,797
0
0
0
-8
70
aadf9eceeb3f898003221f77981bf07bb6fbeb68
2,941
py
Python
examples/hacker_news/hacker_news/legacy/pipelines/download_pipeline.py
gergelylendvai/dagster
bbd93c33c5b092b8e9fec166e372aada44c5a627
[ "Apache-2.0" ]
null
null
null
examples/hacker_news/hacker_news/legacy/pipelines/download_pipeline.py
gergelylendvai/dagster
bbd93c33c5b092b8e9fec166e372aada44c5a627
[ "Apache-2.0" ]
null
null
null
examples/hacker_news/hacker_news/legacy/pipelines/download_pipeline.py
gergelylendvai/dagster
bbd93c33c5b092b8e9fec166e372aada44c5a627
[ "Apache-2.0" ]
null
null
null
from dagster import ModeDefinition, PresetDefinition from dagster.seven.temp_dir import get_system_temp_directory from hacker_news.resources import RESOURCES_LOCAL, RESOURCES_PROD, RESOURCES_STAGING from hacker_news.resources.hn_resource import hn_api_subsample_client, hn_snapshot_client from hacker_news.resources.part...
30.010204
99
0.65862
from dagster import ModeDefinition, PresetDefinition, pipeline from dagster.seven.temp_dir import get_system_temp_directory from hacker_news.ops.download_items import build_comments, build_stories, download_items from hacker_news.ops.id_range_for_time import id_range_for_time from hacker_news.resources import RESOURCES...
0
755
0
0
0
0
0
119
67
d0f031e1af9d6625a407d6c65a77203c1247fbea
727
py
Python
source-code/Sum of Two Integers 371.py
ttungl/Coding-Interview-Challenge
d80c3e15468d50b42ee53fcc73e9326c6c816495
[ "MIT" ]
null
null
null
source-code/Sum of Two Integers 371.py
ttungl/Coding-Interview-Challenge
d80c3e15468d50b42ee53fcc73e9326c6c816495
[ "MIT" ]
null
null
null
source-code/Sum of Two Integers 371.py
ttungl/Coding-Interview-Challenge
d80c3e15468d50b42ee53fcc73e9326c6c816495
[ "MIT" ]
null
null
null
# 371. Sum of Two Integers # ttungl@gmail.com # Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -.
25.964286
97
0.423659
# 371. Sum of Two Integers # ttungl@gmail.com # Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. class Solution: def getSum(self, a, b): """ :type a: int :type b: int :rtype: int """ # sol 1: # runtime: 40ms ...
0
0
0
548
0
0
0
0
23
1cd7737542f5951f3c7bfa40668bfc48ccb49b13
7,607
py
Python
08/py/q2.py
RussellDash332/practice-makes-perfect
917822b461550a2e3679351e467362f95d9e428d
[ "MIT" ]
2
2021-11-18T06:22:09.000Z
2021-12-25T09:52:57.000Z
08/py/q2.py
RussellDash332/practice-makes-perfect
917822b461550a2e3679351e467362f95d9e428d
[ "MIT" ]
2
2021-11-17T16:28:00.000Z
2021-12-01T09:59:40.000Z
08/py/q2.py
RussellDash332/practice-makes-perfect
917822b461550a2e3679351e467362f95d9e428d
[ "MIT" ]
null
null
null
general = Channel("general-helpdesk", ["Owner", "Tutor", "Student"]) announcements = Channel("announcements", ["Owner", "Tutor"]) secret = Channel("foobar", ["Owner"]) print(general.get_name()) # #general-helpdesk print(secret.get_name()) # #foobar russell = Owner("Russell") cli...
52.826389
149
0.598791
class Channel: pass class User: pass class Tutor: pass class Student: pass class Owner: pass general = Channel("general-helpdesk", ["Owner", "Tutor", "Student"]) announcements = Channel("announcements", ["Owner", "Tutor"]) secret = Channel("foobar", ["Owner"]) print(general....
0
0
0
8
0
204
0
0
148
dfbe1b9bd6889ff2cf2e0625f279d70bfbeb97dc
8,564
py
Python
research/cv/PDarts/train.py
mindspore-ai/models
9127b128e2961fd698977e918861dadfad00a44c
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/PDarts/train.py
mindspore-ai/models
9127b128e2961fd698977e918861dadfad00a44c
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/PDarts/train.py
mindspore-ai/models
9127b128e2961fd698977e918861dadfad00a44c
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2022 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 # # less required by applicable law or agreed to i...
42.606965
101
0.670481
# Copyright 2022 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 # # less required by applicable law or agreed to i...
0
0
0
0
0
4,291
0
411
427
6813cfd293b108d309b69189ce8610ab6038870c
711
py
Python
chardet/icon_chardet/actions/detect_encoding/action.py
killstrelok/insightconnect-plugins
911358925f4233ab273dbd8172e8b7b9188ebc01
[ "MIT" ]
1
2020-03-18T09:14:55.000Z
2020-03-18T09:14:55.000Z
chardet/icon_chardet/actions/detect_encoding/action.py
killstrelok/insightconnect-plugins
911358925f4233ab273dbd8172e8b7b9188ebc01
[ "MIT" ]
1
2021-02-23T23:57:37.000Z
2021-02-23T23:57:37.000Z
chardet/icon_chardet/actions/detect_encoding/action.py
killstrelok/insightconnect-plugins
911358925f4233ab273dbd8172e8b7b9188ebc01
[ "MIT" ]
null
null
null
# Custom imports below
30.913043
87
0.69339
import komand from .schema import DetectEncodingInput, DetectEncodingOutput, Input, Output, Component # Custom imports below import chardet import base64 class DetectEncoding(komand.Action): def __init__(self): super(self.__class__, self).__init__( name='detect_encoding', ...
0
0
0
533
0
0
0
43
111
2f2b80d96340873d1328ad5396633c2efca45351
263
py
Python
src/conf.py
AlbertoVf/numeros-primos
868d9e147e1edbdbc7e159c0f1d3b35890235dbb
[ "MIT" ]
null
null
null
src/conf.py
AlbertoVf/numeros-primos
868d9e147e1edbdbc7e159c0f1d3b35890235dbb
[ "MIT" ]
null
null
null
src/conf.py
AlbertoVf/numeros-primos
868d9e147e1edbdbc7e159c0f1d3b35890235dbb
[ "MIT" ]
null
null
null
import os path_files = 'Primos' csv_file = os.path.join(path_files, 'Informacion.csv') incremento = 1000 * 1000 inicio = ultimo_calculo() final = inicio * 100
18.785714
54
0.722433
import os path_files = 'Primos' csv_file = os.path.join(path_files, 'Informacion.csv') def ultimo_calculo(): archivos = len(os.listdir(path_files))-1 return archivos * incremento incremento = 1000 * 1000 inicio = ultimo_calculo() final = inicio * 100
0
0
0
0
0
78
0
0
23
5777724ac5190a0ac01dbdd6d9da7c71114e7714
390
py
Python
audio/test.py
aidanchandra/PiPod
615c0c4476ac1b00518b722b7235ed3348337956
[ "MIT" ]
null
null
null
audio/test.py
aidanchandra/PiPod
615c0c4476ac1b00518b722b7235ed3348337956
[ "MIT" ]
null
null
null
audio/test.py
aidanchandra/PiPod
615c0c4476ac1b00518b722b7235ed3348337956
[ "MIT" ]
null
null
null
import http.client, urllib.parse conn = http.client.HTTPConnection('api.positionstack.com') params = urllib.parse.urlencode({ 'access_key': '0d2a35d484a0c57e8d1da1d92620249c', 'query': 'Copacabana', 'region': 'Rio de Janeiro', 'limit': 1, }) conn.request('GET', '/v1/forward?{}'.format(params)) r...
22.941176
58
0.676923
import http.client, urllib.parse conn = http.client.HTTPConnection('api.positionstack.com') params = urllib.parse.urlencode({ 'access_key': '0d2a35d484a0c57e8d1da1d92620249c', 'query': 'Copacabana', 'region': 'Rio de Janeiro', 'limit': 1, }) conn.request('GET', '/v1/forward?{}'.format(params)) r...
0
0
0
0
0
0
0
0
0
f90ecc4d09049cb07fc0768678924fca228daa45
31,100
py
Python
dipper/sources/NCBIGene.py
justaddcoffee/dipper
085c1601ae5b88848ddcdad0d52387e8f450b1be
[ "BSD-3-Clause" ]
null
null
null
dipper/sources/NCBIGene.py
justaddcoffee/dipper
085c1601ae5b88848ddcdad0d52387e8f450b1be
[ "BSD-3-Clause" ]
null
null
null
dipper/sources/NCBIGene.py
justaddcoffee/dipper
085c1601ae5b88848ddcdad0d52387e8f450b1be
[ "BSD-3-Clause" ]
null
null
null
import logging LOG = logging.getLogger(__name__)
42.312925
95
0.511704
import re import gzip import logging from dipper.sources.OMIMSource import OMIMSource from dipper.models.Model import Model from dipper.models.assoc.OrthologyAssoc import OrthologyAssoc from dipper.models.Genotype import Genotype from dipper.models.GenomicFeature import Feature, makeChromID, makeChromLabel from dipper...
0
0
0
30,686
0
0
0
163
200
55d667017f5faf24e21da7c56f16402ef3cd642b
446
py
Python
main.py
FishmanDefender/Evolution_Simulation
6d334f0efa966bfd98400c15661bae65fa2dc47b
[ "MIT" ]
null
null
null
main.py
FishmanDefender/Evolution_Simulation
6d334f0efa966bfd98400c15661bae65fa2dc47b
[ "MIT" ]
null
null
null
main.py
FishmanDefender/Evolution_Simulation
6d334f0efa966bfd98400c15661bae65fa2dc47b
[ "MIT" ]
null
null
null
#!/user/bin/env python world = World()
14.866667
68
0.56278
#!/user/bin/env python import numpy as np class World: def __init__0(self): ''' Initialization function for the World ''' self.x = 100 self.y = 100 self.food_count = 100 self.food_positions = 100*np.random.rand(self.food_count, 2) print(self.food...
0
0
0
338
0
0
0
-3
68
3da9bc113a8df0953871ce584b42c7b1d3670209
18,303
py
Python
src/python/WMCore/FwkJobReport/XMLParser.py
hufnagel/WMCore
b150cc725b68fc1cf8e6e0fa07c826226a4421fa
[ "Apache-2.0" ]
1
2015-02-05T13:43:46.000Z
2015-02-05T13:43:46.000Z
src/python/WMCore/FwkJobReport/XMLParser.py
hufnagel/WMCore
b150cc725b68fc1cf8e6e0fa07c826226a4421fa
[ "Apache-2.0" ]
1
2016-10-13T14:57:35.000Z
2016-10-13T14:57:35.000Z
src/python/WMCore/FwkJobReport/XMLParser.py
hufnagel/WMCore
b150cc725b68fc1cf8e6e0fa07c826226a4421fa
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ _XMLParser_ Read the raw XML output from the cmsRun executable. """ from __future__ import division, print_function from WMCore.Algorithms.ParseXMLFile import xmlFileToNode def reportBuilder(nodeStruct, report, target): """ _reportBuilder_ Driver for coroutine pipe for buildin...
33.894444
110
0.57608
#!/usr/bin/env python """ _XMLParser_ Read the raw XML output from the cmsRun executable. """ from __future__ import division, print_function import logging import re from WMCore.Algorithms.ParseXMLFile import coroutine, xmlFileToNode from WMCore.DataStructs.Run import Run from WMCore.FwkJobReport import Report de...
0
15,884
0
0
0
102
0
26
480
f352d31f81bdc77f8b40bae4fc830af96a07a6e8
23,950
py
Python
irodsbackend/api.py
bihealth/sodar-server
0c6a03c274ab34cd8987280fe97dc8989551d4bd
[ "MIT" ]
null
null
null
irodsbackend/api.py
bihealth/sodar-server
0c6a03c274ab34cd8987280fe97dc8989551d4bd
[ "MIT" ]
1
2021-05-28T10:59:49.000Z
2021-06-03T12:30:23.000Z
irodsbackend/api.py
bihealth/sodar-server
0c6a03c274ab34cd8987280fe97dc8989551d4bd
[ "MIT" ]
null
null
null
"""iRODS backend API for SODAR Django apps""" import logging logger = logging.getLogger(__name__) # Local constants ACCEPTED_PATH_TYPES = [ 'Assay', 'LandingZone', 'Project', 'Investigation', 'Study', ] NAME_LIKE_OVERHEAD = 23 # Magic number for query overhead for name filtering NAME_LIKE_MAX_...
34.263233
80
0.547808
"""iRODS backend API for SODAR Django apps""" import logging import math import pytz import random import re import string from irods.api_number import api_number from irods.collection import iRODSCollection from irods.column import Criterion from irods.exception import CollectionDoesNotExist, CAT_NO_ROWS_FOUND from ...
0
8,732
0
14,037
0
0
0
227
443
30b9dddc38369acfbd4a1d633e263dffc2e67efa
1,380
py
Python
happy_numbers/happy_numbers.py
bm5w/codeeval
ca214643b2a93bd9362182134624a8641b44aba2
[ "MIT" ]
null
null
null
happy_numbers/happy_numbers.py
bm5w/codeeval
ca214643b2a93bd9362182134624a8641b44aba2
[ "MIT" ]
null
null
null
happy_numbers/happy_numbers.py
bm5w/codeeval
ca214643b2a93bd9362182134624a8641b44aba2
[ "MIT" ]
null
null
null
""" Happy numbers solution, code eval. https://www.codeeval.com/open_challenges/39/ A happy number is defined by the following process. Starting with any positive integer, replace the number by the sum of the squares of its digits, and repeat the process until the number equals 1 (where it will stay), or it loops endle...
31.363636
397
0.681884
""" Happy numbers solution, code eval. https://www.codeeval.com/open_challenges/39/ A happy number is defined by the following process. Starting with any positive integer, replace the number by the sum of the squares of its digits, and repeat the process until the number equals 1 (where it will stay), or it loops endle...
0
0
0
0
0
328
0
0
46
fbf31559cfeabd2dc7ee7c93ec82f2198f8e9b73
5,835
py
Python
src/api/dataflow/flow/tasklog/yarn_util.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
84
2021-06-30T06:20:23.000Z
2022-03-22T03:05:49.000Z
src/api/dataflow/flow/tasklog/yarn_util.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
7
2021-06-30T06:21:16.000Z
2022-03-29T07:36:13.000Z
src/api/dataflow/flow/tasklog/yarn_util.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
40
2021-06-30T06:21:26.000Z
2022-03-29T12:42:26.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-BASE available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-BASE is licensed under the MIT License. License for BK-BASE : ------------------------------------------------------------...
44.204545
119
0.613882
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-BASE 蓝鲸基础平台 is licensed under the MIT License. License for BK-BASE 蓝鲸基础平台: ------------------------------------------...
210
4,044
0
2
0
0
0
138
225
437c027418bc4209b808faab28ed7ff1efca3bec
2,945
py
Python
Greedy/042. Trapping Rain Water.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
138
2020-02-08T05:25:26.000Z
2021-11-04T11:59:28.000Z
Greedy/042. Trapping Rain Water.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
null
null
null
Greedy/042. Trapping Rain Water.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
24
2021-01-02T07:18:43.000Z
2022-03-20T08:17:54.000Z
""" 42. Trapping Rain Water Example: Input: [0,1,0,2,1,0,1,3,2,1,2,1] Output: 6 """ #Descending Stack # Greedy
28.592233
70
0.413582
""" 42. Trapping Rain Water Example: Input: [0,1,0,2,1,0,1,3,2,1,2,1] Output: 6 """ #Descending Stack class Solution: def trap(self, height): """ :type height: List[int] :rtype: int """ stack = [] area = 0 for i,h in enumerate(height): ...
0
0
0
2,688
0
0
0
0
122
19889c5299eac32e6130cb6627e1538cfd9003f2
801
py
Python
tests/elementary/test_vardiff.py
gnafit/gna
c1a58dac11783342c97a2da1b19c97b85bce0394
[ "MIT" ]
5
2019-10-14T01:06:57.000Z
2021-02-02T16:33:06.000Z
tests/elementary/test_vardiff.py
gnafit/gna
c1a58dac11783342c97a2da1b19c97b85bce0394
[ "MIT" ]
null
null
null
tests/elementary/test_vardiff.py
gnafit/gna
c1a58dac11783342c97a2da1b19c97b85bce0394
[ "MIT" ]
null
null
null
#!/usr/bin/env python from load import ROOT as R from gna.env import env from gna.parameters.printer import print_parameters from gna.converters import convert ns = env.globalns names = [ 'one', 'two', 'three', 'four', 'five' ] for i, name in enumerate( names ): ns.defparameter( name, central=(100-i*20), relsigma...
24.272727
61
0.667915
#!/usr/bin/env python from load import ROOT as R from gna.env import env from gna.parameters.printer import print_parameters from gna.converters import convert ns = env.globalns names = [ 'one', 'two', 'three', 'four', 'five' ] for i, name in enumerate( names ): ns.defparameter( name, central=(100-i*20), relsigma...
0
0
0
0
0
0
0
0
0
f0d58dbf7db2ecb12af76efec0d5817b59bec64e
4,279
py
Python
hg/display.py
manzt/hg
ed94c6dbdecdb2ad884ebc54e62f2f262dc084e6
[ "MIT" ]
4
2022-02-01T17:41:59.000Z
2022-02-04T15:21:55.000Z
hg/display.py
manzt/hg
ed94c6dbdecdb2ad884ebc54e62f2f262dc084e6
[ "MIT" ]
9
2022-02-06T17:59:08.000Z
2022-03-23T20:20:45.000Z
hg/display.py
manzt/hg
ed94c6dbdecdb2ad884ebc54e62f2f262dc084e6
[ "MIT" ]
null
null
null
import jinja2 HTML_TEMPLATE = jinja2.Template( """ <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="{{ base_url }}/higlass@{{ higlass_version }}/dist/hglib.css"> </head> <body> <div id="{{ output_div }}"></div> <script type="module"> async function loadScript(src) { return new Promise...
28.718121
95
0.632858
import json import uuid from dataclasses import dataclass, field from typing import Any, Dict, List, Optional import jinja2 HTML_TEMPLATE = jinja2.Template( """ <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="{{ base_url }}/higlass@{{ higlass_version }}/dist/hglib.css"> </head> <body> <div id="{{ o...
0
526
0
474
0
745
0
22
180
2a457c7ff3790c904105b938a2daba3d41eca262
7,934
py
Python
pybda/corrupting_gains.py
OxfordSKA/bda
0f92bead29a26d18fddaf5eb2ecd6f6d92401c2d
[ "BSD-3-Clause" ]
2
2019-11-22T18:39:49.000Z
2020-03-13T04:03:50.000Z
pybda/corrupting_gains.py
OxfordSKA/bda
0f92bead29a26d18fddaf5eb2ecd6f6d92401c2d
[ "BSD-3-Clause" ]
null
null
null
pybda/corrupting_gains.py
OxfordSKA/bda
0f92bead29a26d18fddaf5eb2ecd6f6d92401c2d
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Module to evaluate corrupting gains for BDA simulations.""" from __future__ import (print_function, absolute_import) import numpy def allan_deviation(data, dt, tau): """ Evaluate the Allan deviation of a time series. References: https://en.wikipedia.org/wiki/Allan_vari...
34.051502
80
0.572095
# -*- coding: utf-8 -*- """Module to evaluate corrupting gains for BDA simulations.""" from __future__ import (print_function, absolute_import) import numpy import time import os def allan_deviation(data, dt, tau): """ Evaluate the Allan deviation of a time series. References: https://en.wikiped...
0
0
0
0
0
5,760
0
-22
136
93744df5a36c723521ccc2b1bfaab65acee53603
2,261
py
Python
sscs-variants-calling-scripts/mateLinkCall_0828.py
hanmei5191/Duplex
3b0cfacceb62959faaa3f64784ab6f5089f3c9ca
[ "MIT" ]
null
null
null
sscs-variants-calling-scripts/mateLinkCall_0828.py
hanmei5191/Duplex
3b0cfacceb62959faaa3f64784ab6f5089f3c9ca
[ "MIT" ]
null
null
null
sscs-variants-calling-scripts/mateLinkCall_0828.py
hanmei5191/Duplex
3b0cfacceb62959faaa3f64784ab6f5089f3c9ca
[ "MIT" ]
null
null
null
#!usr/bin/python import re target = open ("linkage_mates.txt","w") with open ("mate_aligned.txt", "r") as f: fam={} fam_mate={} lines = f.readlines() for line in lines: line_split = line.split("\t", 1) try: fam[line_split[0]] fam[line_split[0]].append(line_split[1]) except KeyErr...
37.683333
102
0.588235
#!usr/bin/python import re def callVariants (mate1_seq,mate1_start,mate2_seq,mate2_start): a = [(m.start() + mate1_start, m.group(0)) for m in re.finditer(r'[ATCG]', mate1_seq)] b = [(n.start() + mate2_start, n.group(0)) for n in re.finditer(r'[ATCG]', mate2_seq)] if len(a) > 0 and len(b) > 0: return([...
0
0
0
0
0
273
0
0
23
a769231bad160b880c80b619dfcd7fdd0624e4e4
395
py
Python
ProgrammingBasicWithPython-KCL/Chapter-2/While-loop-Testing.py
mrmyothet/IPND
204e010f815fa10951daf38669a9323cb6b13147
[ "MIT" ]
1
2020-07-04T14:00:48.000Z
2020-07-04T14:00:48.000Z
ProgrammingBasicWithPython-KCL/Chapter-2/While-loop-Testing.py
mrmyothet/IPND
204e010f815fa10951daf38669a9323cb6b13147
[ "MIT" ]
20
2020-06-01T04:32:16.000Z
2020-09-14T07:18:54.000Z
ProgrammingBasicWithPython-KCL/Chapter-2/While-loop-Testing.py
mrmyothet/ipnd
204e010f815fa10951daf38669a9323cb6b13147
[ "MIT" ]
null
null
null
x = False while x == False: value = input("Enter the number between 0-9 : ") try : value = int(value) if value > 9: print("Your value is over 9") elif value < 0: print("Your value is less than 0") else: print("Your value is ",value) ...
26.333333
52
0.511392
x = False while x == False: value = input("Enter the number between 0-9 : ") try : value = int(value) if value > 9: print("Your value is over 9") elif value < 0: print("Your value is less than 0") else: print("Your value is ",value) ...
0
0
0
0
0
0
0
0
0
aaf692b2b8bcb236090a695b5dd6f86ceb7b31cb
4,114
py
Python
torchrec/distributed/test_utils/multi_process.py
samiwilf/torchrec
50ff0973d5d01ec80fe36ba5f1d524c92c799836
[ "BSD-3-Clause" ]
1
2022-03-07T09:06:11.000Z
2022-03-07T09:06:11.000Z
torchrec/distributed/test_utils/multi_process.py
samiwilf/torchrec
50ff0973d5d01ec80fe36ba5f1d524c92c799836
[ "BSD-3-Clause" ]
null
null
null
torchrec/distributed/test_utils/multi_process.py
samiwilf/torchrec
50ff0973d5d01ec80fe36ba5f1d524c92c799836
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. #!/usr/bin/env python3
30.701493
86
0.619105
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. #!/usr/bin/env python3 import multiprocessing import os import unittest from typing imp...
0
491
0
3,019
0
0
0
123
224
773df7b9fdf5fc0e996e0014bb2b01738120970d
13,630
py
Python
tests/integration/test_authorizer.py
LilSpazJoekp/asyncprawcore
dc8ba3821ed55150a376b3259812fd8f2800f3fa
[ "BSD-2-Clause" ]
1
2020-06-18T20:15:35.000Z
2020-06-18T20:15:35.000Z
tests/integration/test_authorizer.py
LilSpazJoekp/asyncprawcore
dc8ba3821ed55150a376b3259812fd8f2800f3fa
[ "BSD-2-Clause" ]
2
2020-06-18T17:47:12.000Z
2020-06-22T00:28:06.000Z
tests/integration/test_authorizer.py
LilSpazJoekp/asyncprawcore
dc8ba3821ed55150a376b3259812fd8f2800f3fa
[ "BSD-2-Clause" ]
null
null
null
"""Test for asyncprawcore.auth.Authorizer classes."""
36.937669
84
0.674101
"""Test for asyncprawcore.auth.Authorizer classes.""" import pytest import asyncprawcore from ..conftest import two_factor_callback # noqa F401 from . import IntegrationTest class AuthorizerBase(IntegrationTest): async def setUp(self): await super().setUp() self.authentication = asyncprawcore.T...
0
0
12,506
103
0
0
0
20
942
50430b6a7cb427810bf83067a00ca21376a2136a
1,405
py
Python
core/utils/normalize.py
ollietb/VQGAN-CLIP-Docker
f3c6bd44bd1948dd9a5a4fd75d8d43910c9267ce
[ "MIT" ]
57
2021-08-06T19:23:06.000Z
2022-03-30T04:20:11.000Z
core/utils/normalize.py
ollietb/VQGAN-CLIP-Docker
f3c6bd44bd1948dd9a5a4fd75d8d43910c9267ce
[ "MIT" ]
3
2021-09-01T00:31:10.000Z
2021-11-13T11:27:42.000Z
core/utils/normalize.py
ollietb/VQGAN-CLIP-Docker
f3c6bd44bd1948dd9a5a4fd75d8d43910c9267ce
[ "MIT" ]
12
2021-08-08T05:18:38.000Z
2022-03-24T20:12:56.000Z
# https://github.com/pratogab/batch-transforms
33.452381
95
0.614947
# https://github.com/pratogab/batch-transforms import torch class Normalize: """Applies the :class:`~torchvision.transforms.Normalize` transform to a batch of images. .. note:: This transform acts out of place by default, i.e., it does not mutate the input tensor. Args: mean (sequence):...
0
0
0
1,320
0
0
0
-9
46
c7b93733bb862c135fc9a82d718f69735ae374c2
11,229
py
Python
app/blueprints/admin.py
pythoneer-ljz/onelog
8c600895acf8f0af07d5bd9aa91832e1c36bd093
[ "MIT" ]
null
null
null
app/blueprints/admin.py
pythoneer-ljz/onelog
8c600895acf8f0af07d5bd9aa91832e1c36bd093
[ "MIT" ]
null
null
null
app/blueprints/admin.py
pythoneer-ljz/onelog
8c600895acf8f0af07d5bd9aa91832e1c36bd093
[ "MIT" ]
null
null
null
from flask import (Blueprint) admin_bp = Blueprint("admin", __name__)
30.348649
85
0.657138
from flask import ( current_app, flash, Blueprint, render_template, request, redirect, url_for, abort, make_response, ) from ..models import Option, Page, User, Category, Tag, Post, Comment, Link from ..extensions import db from ..forms import ( LoginForm, PostForm, PageF...
300
9,979
0
0
0
0
0
368
687
ee113cbc67366b094f66d4642834b558ba0bb8d0
76
py
Python
py2nb/__init__.py
DSqiansun/py2nb
772ce7eb6bc3715124e2c3c228c99e49a1608039
[ "MIT" ]
1
2019-01-04T16:09:19.000Z
2019-01-04T16:09:19.000Z
py2nb/__init__.py
bjornaa/py2nb
772ce7eb6bc3715124e2c3c228c99e49a1608039
[ "MIT" ]
null
null
null
py2nb/__init__.py
bjornaa/py2nb
772ce7eb6bc3715124e2c3c228c99e49a1608039
[ "MIT" ]
2
2019-01-02T21:14:09.000Z
2021-05-14T17:05:34.000Z
"""init file for py2nb"""
19
25
0.736842
"""init file for py2nb""" from .py2nb import py2nb from .nb2py import nb2py
0
0
0
0
0
0
0
6
45
d80353d24145ef46c88fd794949e1f9e51331579
1,243
py
Python
tests/test_firehose_replicator.py
VolpeUSDOT/sdc-dot-cvp-ingest
04f4440347b7e19ca723dedba95cd4158b1904ee
[ "Apache-2.0" ]
3
2020-01-20T17:28:14.000Z
2020-04-03T16:18:59.000Z
tests/test_firehose_replicator.py
VolpeUSDOT/sdc-dot-cvp-ingest
04f4440347b7e19ca723dedba95cd4158b1904ee
[ "Apache-2.0" ]
17
2019-09-05T22:52:15.000Z
2020-10-30T16:24:18.000Z
tests/test_firehose_replicator.py
VolpeUSDOT/sdc-dot-cvp-ingest
04f4440347b7e19ca723dedba95cd4158b1904ee
[ "Apache-2.0" ]
2
2019-05-23T17:14:31.000Z
2019-05-28T18:00:22.000Z
import os ECS_BUCKET_NAME = "the-ecs-bucket" ECS_OBJECT_PREFIX = "cv/wydot" os.environ["ECS_BUCKET_NAME"] = ECS_BUCKET_NAME os.environ["ECS_OBJECT_PREFIX"] = ECS_OBJECT_PREFIX
31.871795
94
0.690265
import os import pytest import boto3 import base64 from moto import mock_s3 from firehose_replicator import firehose_replicator ECS_BUCKET_NAME = "the-ecs-bucket" ECS_OBJECT_PREFIX = "cv/wydot" os.environ["ECS_BUCKET_NAME"] = ECS_BUCKET_NAME os.environ["ECS_OBJECT_PREFIX"] = ECS_OBJECT_PREFIX @mock_s3 def test_lambd...
0
923
0
0
0
0
0
8
133
4b35fe79a3e0c6551813d3d593c0e7b4f9d590df
453
py
Python
consume.py
jmonsalverodilla/heroku_deploy_iris
133d609f6fc553763027ed533485a5dfd7f7791e
[ "MIT" ]
null
null
null
consume.py
jmonsalverodilla/heroku_deploy_iris
133d609f6fc553763027ed533485a5dfd7f7791e
[ "MIT" ]
null
null
null
consume.py
jmonsalverodilla/heroku_deploy_iris
133d609f6fc553763027ed533485a5dfd7f7791e
[ "MIT" ]
null
null
null
###################THIS FILE DOES NOT WORK################# import requests import html_to_json #URL = "https://modelo-prueba.herokuapp.com/result" url = "http://127.0.0.1:8080/result" data = {'a':1, 'b':2, 'c':3, 'd':4} ####################Alternativa1############################### r = requests.post(url,data=data)...
26.647059
63
0.540839
###################THIS FILE DOES NOT WORK################# import requests import html_to_json #URL = "https://modelo-prueba.herokuapp.com/result" url = "http://127.0.0.1:8080/result" data = {'a':1, 'b':2, 'c':3, 'd':4} ####################Alternativa1############################### r = requests.post(url,data=data)...
0
0
0
0
0
0
0
0
0
49850fd0037339f84f10ffcd47ee7ded7e2b4689
4,707
py
Python
pcdet/models/backbones_3d/vfe/prop_utils/propagating_module.py
wyddmw/RotPred
18ca1a565fdbf90e8016e51ed5a3b84dc12109f3
[ "Apache-2.0" ]
null
null
null
pcdet/models/backbones_3d/vfe/prop_utils/propagating_module.py
wyddmw/RotPred
18ca1a565fdbf90e8016e51ed5a3b84dc12109f3
[ "Apache-2.0" ]
null
null
null
pcdet/models/backbones_3d/vfe/prop_utils/propagating_module.py
wyddmw/RotPred
18ca1a565fdbf90e8016e51ed5a3b84dc12109f3
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn if __name__ == '__main__': feature = torch.randn(1, 32, 128, 256) # canvas_transform(feature) # grid_test() # grid_canvas = create_grid_canvas(feature) # print(grid_canvas.shape) # grid_canvas = normalize_grid_canvas(grid_canvas) # print(grid_canvas.sha...
39.225
140
0.650945
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np class PointPropagation(nn.Module): def __init__(self, feature_shape, num_offset=1): super().__init__() N, C, H, W = feature_shape self.num_offset = num_offset self.center_offset = nn.Conv2d(C, num...
60
0
0
974
0
3,074
0
7
205
aed27ca013566e9f87d96282a2ec73ae485cb059
10,073
py
Python
netsniff.py
generatorexit/netsniff
ea1431ad16539d9a2e112805ce64aec6952c46ef
[ "MIT" ]
null
null
null
netsniff.py
generatorexit/netsniff
ea1431ad16539d9a2e112805ce64aec6952c46ef
[ "MIT" ]
null
null
null
netsniff.py
generatorexit/netsniff
ea1431ad16539d9a2e112805ce64aec6952c46ef
[ "MIT" ]
null
null
null
#! /usr/local/bin/python3.5 import struct TAB_1 = '\t - ' TAB_2 = '\t\t - ' TAB_3 = '\t\t\t - ' TAB_4 = '\t\t\t\t - ' DATA_TAB_1 = '\t ' DATA_TAB_2 = '\t\t ' DATA_TAB_3 = '\t\t\t ' DATA_TAB_4 = '\t\t\t\t ' # Unpack Ethernet Frame # Unpack IPv4 Packets Recieved # Returns Formatted IP Address # Un...
32.811075
132
0.588702
#! /usr/local/bin/python3.5 import socket import struct import textwrap import binascii import struct import sys TAB_1 = '\t - ' TAB_2 = '\t\t - ' TAB_3 = '\t\t\t - ' TAB_4 = '\t\t\t\t - ' DATA_TAB_1 = '\t ' DATA_TAB_2 = '\t\t ' DATA_TAB_3 = '\t\t\t ' DATA_TAB_4 = '\t\t\t\t ' def main(): conn = socket.s...
0
0
0
0
0
9,199
0
-39
471
4ee25690a84de611beacf85b5bedf80eaab07608
1,114
py
Python
playnetmano_rm/tests/tempest/scenario/consts.py
rickyhai11/playnetmano_rm
50c94ab3babaeb5a441aa24f129784e3f140a349
[ "Apache-2.0" ]
null
null
null
playnetmano_rm/tests/tempest/scenario/consts.py
rickyhai11/playnetmano_rm
50c94ab3babaeb5a441aa24f129784e3f140a349
[ "Apache-2.0" ]
null
null
null
playnetmano_rm/tests/tempest/scenario/consts.py
rickyhai11/playnetmano_rm
50c94ab3babaeb5a441aa24f129784e3f140a349
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Ericsson AB # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
39.785714
78
0.663375
# Copyright 2016 Ericsson AB # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
0
0
0
0
0
0
0
0
0
0cabf86669b31d921beb05d1e094eea3623482bf
1,278
py
Python
dev-tools/vendor/github.com/cavaliercoder/go-rpm/vercmp_test.py
gza/beats
62f8734aabed3af8b6f69cdae9e0c0d78b4c5785
[ "ECL-2.0", "Apache-2.0" ]
87
2017-07-22T00:14:20.000Z
2022-03-28T04:00:43.000Z
dev-tools/vendor/github.com/cavaliercoder/go-rpm/vercmp_test.py
gza/beats
62f8734aabed3af8b6f69cdae9e0c0d78b4c5785
[ "ECL-2.0", "Apache-2.0" ]
21
2018-05-29T06:50:18.000Z
2020-07-30T19:07:58.000Z
dev-tools/vendor/github.com/cavaliercoder/go-rpm/vercmp_test.py
gza/beats
62f8734aabed3af8b6f69cdae9e0c0d78b4c5785
[ "ECL-2.0", "Apache-2.0" ]
31
2018-06-11T19:45:08.000Z
2022-01-27T08:48:39.000Z
#!/usr/bin/python # # Generate test cases for version_test.go # # Herein lies my first ever python script... # import rpm versions = [ "", "0", "1", "2", "10", "100", "0.0", "0.1", "0.10", "0.99", "1.0", "1.99", "2.0", "0.0.0", "0.0.1", "0.0.2", "0.0.10", "0.0.99", "0.1.0", "0....
15.585366
107
0.507825
#!/usr/bin/python # # Generate test cases for version_test.go # # Herein lies my first ever python script... # import rpm versions = [ "", "0", "1", "2", "10", "100", "0.0", "0.1", "0.10", "0.99", "1.0", "1.99", "2.0", "0.0.0", "0.0.1", "0.0.2", "0.0.10", "0.0.99", "0.1.0", "0....
0
0
0
0
0
0
0
0
0
149c1a4a52f5b233c1f81674ca47806da74f3aa9
3,875
py
Python
webmaps/elections/data/parse.py
blazec/blazec.github.io
918fffe1f927a752adade4276bb52923015b7ad7
[ "MIT" ]
null
null
null
webmaps/elections/data/parse.py
blazec/blazec.github.io
918fffe1f927a752adade4276bb52923015b7ad7
[ "MIT" ]
null
null
null
webmaps/elections/data/parse.py
blazec/blazec.github.io
918fffe1f927a752adade4276bb52923015b7ad7
[ "MIT" ]
null
null
null
import json import csv DISTRICT = 2 PARTY = 4 VOTE_PERCENTAGE = 8 WINNER = 11 PARTIES = ("NDP", "Liberal", "Conservative", "Bloc Quebecois", "Green") json_file = open("electoral_districts.json") districts = json.load(json_file) ## Parse csv file containing individual results csv_file = "output.csv" with open(csv_f...
35.87963
145
0.640258
import json import csv DISTRICT = 2 PARTY = 4 VOTE_PERCENTAGE = 8 WINNER = 11 PARTIES = ("NDP", "Liberal", "Conservative", "Bloc Quebecois", "Green") json_file = open("electoral_districts.json") districts = json.load(json_file) ## Parse csv file containing individual results csv_file = "output.csv" with open(csv_f...
0
0
0
0
0
0
0
-6
22
52d3d389e09fc7efcae4bcfdedcf2f66febbed38
1,358
py
Python
tests/test_path.py
urihoenig/v3io-fs
1f7f30bc060c1cacd477007d4134a6938eb8e80e
[ "Apache-2.0" ]
1
2020-10-19T19:13:19.000Z
2020-10-19T19:13:19.000Z
tests/test_path.py
urihoenig/v3io-fs
1f7f30bc060c1cacd477007d4134a6938eb8e80e
[ "Apache-2.0" ]
null
null
null
tests/test_path.py
urihoenig/v3io-fs
1f7f30bc060c1cacd477007d4134a6938eb8e80e
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Iguazio # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, soft...
25.622642
74
0.65243
# Copyright 2020 Iguazio # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, soft...
0
414
0
0
0
0
0
4
92
b8d704fdcce61dc29f926fd3ed9f6ab5a265e420
990
py
Python
check_sizes.py
tfmoraes/deep_heart_torch
4168ce01d600e69baf82c752a3e57af86861b6ea
[ "MIT" ]
null
null
null
check_sizes.py
tfmoraes/deep_heart_torch
4168ce01d600e69baf82c752a3e57af86861b6ea
[ "MIT" ]
null
null
null
check_sizes.py
tfmoraes/deep_heart_torch
4168ce01d600e69baf82c752a3e57af86861b6ea
[ "MIT" ]
null
null
null
if __name__ == "__main__": main()
31.935484
108
0.668687
import pathlib import nibabel as nib import numpy as np import shutil import sys def read_nii(filename: pathlib.Path) -> np.ndarray: nii = nib.load(str(filename)) return nii.get_fdata() def main(): masks_folder = pathlib.Path("datasets/masks/nii/").absolute() images_folder = pathlib.Path("datasets/im...
0
0
0
0
0
821
0
-29
157
07bb1935769b27c7902f8e82c1dd4ff9cd01203c
18,170
py
Python
cudf/_gdf.py
raghavmi/cudf
4ab29c71a7155b03eca2ec95728e27e5826cf5b9
[ "Apache-2.0" ]
null
null
null
cudf/_gdf.py
raghavmi/cudf
4ab29c71a7155b03eca2ec95728e27e5826cf5b9
[ "Apache-2.0" ]
null
null
null
cudf/_gdf.py
raghavmi/cudf
4ab29c71a7155b03eca2ec95728e27e5826cf5b9
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018, NVIDIA CORPORATION. """ This file provide binding to the libgdf library. """ import numpy as np import pandas as pd import pyarrow as pa from libgdf_cffi import ffi, libgdf def columnview(size, data, mask=None, dtype=None, null_count=None): """ Make a column view. Parameters ...
29.983498
79
0.580297
# Copyright (c) 2018, NVIDIA CORPORATION. """ This file provide binding to the libgdf library. """ import contextlib import itertools import numpy as np import pandas as pd import pyarrow as pa from libgdf_cffi import ffi, libgdf from librmm_cffi import librmm as rmm from . import cudautils from .utils import calc_...
0
1,718
0
2,093
0
5,530
0
48
459
b77f61807f22b6c582b456d3f6559f8ac459a43d
1,308
py
Python
reporting/reporting_calm_transformer/src/reporting_calm_transformer.py
TheStanfordDaily/loris-archives
357e6918ac9dc76a451af47f810017cb55cfa43d
[ "MIT" ]
null
null
null
reporting/reporting_calm_transformer/src/reporting_calm_transformer.py
TheStanfordDaily/loris-archives
357e6918ac9dc76a451af47f810017cb55cfa43d
[ "MIT" ]
null
null
null
reporting/reporting_calm_transformer/src/reporting_calm_transformer.py
TheStanfordDaily/loris-archives
357e6918ac9dc76a451af47f810017cb55cfa43d
[ "MIT" ]
null
null
null
""" Basic transformer, which cleans up the static calm data before sending it off to an elasticsearch index. The raw data can be obtained by running: python monitoring/scripts/download_oai_harvest.py from the root of this repo. This will create a file called `calm_records.json`. The elasticsearch credentials (u...
26.16
84
0.724771
""" Basic transformer, which cleans up the static calm data before sending it off to an elasticsearch index. The raw data can be obtained by running: python monitoring/scripts/download_oai_harvest.py from the root of this repo. This will create a file called `calm_records.json`. The elasticsearch credentials (u...
0
0
0
0
0
0
0
0
0
8ed1fddd6f38763762d54b79c3147b8511d5de90
458
py
Python
Login!/Profile/css/flask-image-upload-thing-master/flask_uploads/models.py
baguilar1998/artstartWebsite
0c79fbe085bc110761df2394bfb39eb2cf1a5030
[ "Apache-2.0" ]
20
2015-01-07T16:17:22.000Z
2015-12-14T03:45:52.000Z
Login!/Profile/css/flask-image-upload-thing-master/flask_uploads/models.py
baguilar1998/artstartWebsite
0c79fbe085bc110761df2394bfb39eb2cf1a5030
[ "Apache-2.0" ]
2
2015-08-07T01:51:03.000Z
2015-12-15T02:04:25.000Z
Login!/Profile/css/flask-image-upload-thing-master/flask_uploads/models.py
baguilar1998/artstartWebsite
0c79fbe085bc110761df2394bfb39eb2cf1a5030
[ "Apache-2.0" ]
9
2015-03-05T09:36:22.000Z
2015-11-13T21:24:20.000Z
from .extensions import db, resizer if resizer: for size in resizer.sizes.iterkeys(): setattr(Upload, size + '_name', db.Column(db.Unicode(255))) setattr(Upload, size + '_url', db.Column(db.Unicode(255)))
30.533333
68
0.679039
from .extensions import db, resizer class Upload(db.Model): __tablename__ = 'upload' id = db.Column(db.Integer, autoincrement=True, primary_key=True) name = db.Column(db.Unicode(255), nullable=False) url = db.Column(db.Unicode(255), nullable=False) if resizer: for size in resizer.sizes.iterkeys(...
0
0
0
208
0
0
0
0
23
2440738595198e3faa18e00166c285ed2f33b53a
1,265
py
Python
examples/05/train/train_job.py
chenwuperth/smworkshop
13738a04d6cdcaf75a4c97b3ca3ed31349a9385f
[ "Apache-2.0" ]
null
null
null
examples/05/train/train_job.py
chenwuperth/smworkshop
13738a04d6cdcaf75a4c97b3ca3ed31349a9385f
[ "Apache-2.0" ]
null
null
null
examples/05/train/train_job.py
chenwuperth/smworkshop
13738a04d6cdcaf75a4c97b3ca3ed31349a9385f
[ "Apache-2.0" ]
2
2020-06-22T02:55:34.000Z
2020-07-09T10:18:48.000Z
""" Train job interacts with SageMaker """ import os import boto3 import sagemaker # We use the Estimator from the SageMaker Python SDK from sagemaker.pytorch.estimator import PyTorch from ...sm_utils import get_sm_execution_role ON_SAGEMAKER_NOTEBOOK = False # preparation sm_boto3 = boto3.client('sagemaker') sess...
30.119048
93
0.730435
""" Train job interacts with SageMaker """ import os import boto3 import numpy as np import pandas as pd import sagemaker # We use the Estimator from the SageMaker Python SDK from sagemaker.pytorch.estimator import PyTorch from ...sm_utils import get_sm_execution_role ON_SAGEMAKER_NOTEBOOK = False # preparation sm...
0
0
0
0
0
0
0
-5
44
980c1f0af166eba11feb43d297fc3a400f3d9157
226
py
Python
async_tools/context/async_exit_stack.py
HeavenVolkoff/async_tools
c2fb373f4de11542f61fdbf596955f118a2ba467
[ "BSD-3-Clause" ]
4
2019-10-30T20:03:31.000Z
2021-03-05T18:29:42.000Z
async_tools/context/async_exit_stack.py
HeavenVolkoff/async_tools
c2fb373f4de11542f61fdbf596955f118a2ba467
[ "BSD-3-Clause" ]
2
2019-06-11T18:26:10.000Z
2021-05-25T20:43:50.000Z
async_tools/context/async_exit_stack.py
HeavenVolkoff/async_tools
c2fb373f4de11542f61fdbf596955f118a2ba467
[ "BSD-3-Clause" ]
1
2021-05-24T13:31:13.000Z
2021-05-24T13:31:13.000Z
# Internal from warnings import warn from contextlib import AsyncExitStack warn( "async_tools.context.async_context_manager is deprecated, use contextlib instead", DeprecationWarning, ) __all__ = ("AsyncExitStack",)
20.545455
86
0.787611
# Internal from warnings import warn from contextlib import AsyncExitStack warn( "async_tools.context.async_context_manager is deprecated, use contextlib instead", DeprecationWarning, ) __all__ = ("AsyncExitStack",)
0
0
0
0
0
0
0
0
0
33a62b4965ed22948fc671cb4b609e090ce96c77
764
py
Python
lib/evn/action.py
tpn/enversion
6990541c3021a7f9d0c1cd64e1cb58bc9aac135e
[ "Apache-2.0" ]
2
2016-10-13T15:36:38.000Z
2019-04-13T22:54:32.000Z
lib/evn/action.py
tpn/enversion
6990541c3021a7f9d0c1cd64e1cb58bc9aac135e
[ "Apache-2.0" ]
null
null
null
lib/evn/action.py
tpn/enversion
6990541c3021a7f9d0c1cd64e1cb58bc9aac135e
[ "Apache-2.0" ]
2
2018-06-04T09:19:28.000Z
2021-11-01T14:54:35.000Z
#=============================================================================== # Imports #=============================================================================== #=============================================================================== # Constants #=====================================================...
28.296296
80
0.217277
#=============================================================================== # Imports #=============================================================================== from evn.util import ( Constant, ) #=============================================================================== # Constants #==============...
0
0
0
96
0
0
0
17
66
9c5532ef796ad1f8eabfec9ab8a95f62e422f889
208
py
Python
ebv/experiments/exp/__main__.py
pritamKarmokar/event-based-vision
46eb368cd5c8832d6a42c36bb3f21624281d2ee0
[ "MIT" ]
null
null
null
ebv/experiments/exp/__main__.py
pritamKarmokar/event-based-vision
46eb368cd5c8832d6a42c36bb3f21624281d2ee0
[ "MIT" ]
null
null
null
ebv/experiments/exp/__main__.py
pritamKarmokar/event-based-vision
46eb368cd5c8832d6a42c36bb3f21624281d2ee0
[ "MIT" ]
null
null
null
from .experiment_runner import ExperimentRunner if __name__ == '__main__': exp_runner = ExperimentRunner() print("Running Experiment\n") exp_runner.run() print("Experiment complete!.\n")
17.333333
47
0.706731
from .experiment_runner import ExperimentRunner if __name__ == '__main__': exp_runner = ExperimentRunner() print("Running Experiment\n") exp_runner.run() print("Experiment complete!.\n")
0
0
0
0
0
0
0
0
0
fc634a92c10fc6c94364838703282cc509e7f7fc
131
py
Python
client.py
ItaloPerez2019/Soap_Homework_01
4804d6ac1292902b4dcba22fd33ef4e9ea48595b
[ "MIT" ]
null
null
null
client.py
ItaloPerez2019/Soap_Homework_01
4804d6ac1292902b4dcba22fd33ef4e9ea48595b
[ "MIT" ]
null
null
null
client.py
ItaloPerez2019/Soap_Homework_01
4804d6ac1292902b4dcba22fd33ef4e9ea48595b
[ "MIT" ]
null
null
null
from suds.client import Client client = Client('http://localhost:8000/?wsdl', cache=None) print(client.service.say_fibonacci(10))
26.2
58
0.770992
from suds.client import Client client = Client('http://localhost:8000/?wsdl', cache=None) print(client.service.say_fibonacci(10))
0
0
0
0
0
0
0
0
0
a201752f6a544650fb1e49e9b9d982e82259f97d
8,772
py
Python
tap_chromedata/streams.py
fixdauto/tap-chromedata
5bbd72487327ce49ba952c7b9e15c884a7d1238d
[ "MIT" ]
null
null
null
tap_chromedata/streams.py
fixdauto/tap-chromedata
5bbd72487327ce49ba952c7b9e15c884a7d1238d
[ "MIT" ]
null
null
null
tap_chromedata/streams.py
fixdauto/tap-chromedata
5bbd72487327ce49ba952c7b9e15c884a7d1238d
[ "MIT" ]
null
null
null
"""Stream type classes for tap-chromedata.""" import re def camel_to_snake(name): """Convert camelCase words to snake_case""" name = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', name).lower()
41.377358
148
0.610807
"""Stream type classes for tap-chromedata.""" import csv from pathlib import Path from typing import Any, Dict, Optional, Union, List, Iterable from singer_sdk import typing as th # JSON Schema typing helpers from singer_sdk.streams import Stream import re import ftplib import io import json from zipfile import Zip...
0
387
0
7,723
0
0
0
38
369
5bf80086d7a85ca8ad87b504764a090186a2eca4
291
py
Python
data/src/common.py
sinclairnick/EfficientDet
f26fc90dab8e17479de141c75b4fb1a39904aea2
[ "Apache-2.0" ]
null
null
null
data/src/common.py
sinclairnick/EfficientDet
f26fc90dab8e17479de141c75b4fb1a39904aea2
[ "Apache-2.0" ]
null
null
null
data/src/common.py
sinclairnick/EfficientDet
f26fc90dab8e17479de141c75b4fb1a39904aea2
[ "Apache-2.0" ]
null
null
null
input_dir = 'data/raw' output_dir = 'data/processed' TLHW = ['top', 'left', 'height', 'width'] XYXY = ['x1', 'y1', 'x2', 'y2'] OUT_HEADER = ['file', *XYXY, 'body', 'color'] mappings = { 'supercab': 'ute', 'cab': 'ute', 'minivan': 'people-mover', 'wagon': 'station-wagon', }
22.384615
45
0.549828
input_dir = 'data/raw' output_dir = 'data/processed' TLHW = ['top', 'left', 'height', 'width'] XYXY = ['x1', 'y1', 'x2', 'y2'] OUT_HEADER = ['file', *XYXY, 'body', 'color'] mappings = { 'supercab': 'ute', 'cab': 'ute', 'minivan': 'people-mover', 'wagon': 'station-wagon', }
0
0
0
0
0
0
0
0
0
69b059b5777c7e5c5a16939fb1611d16eb545366
847
py
Python
Networking/simpleClient.py
HKuz/Test_Code
798efc9fc668ef021736a6d9699ef4713cf8b718
[ "MIT" ]
1
2020-06-14T20:10:04.000Z
2020-06-14T20:10:04.000Z
Networking/simpleClient.py
makramjandar/Test_Code
798efc9fc668ef021736a6d9699ef4713cf8b718
[ "MIT" ]
null
null
null
Networking/simpleClient.py
makramjandar/Test_Code
798efc9fc668ef021736a6d9699ef4713cf8b718
[ "MIT" ]
1
2019-12-09T12:48:05.000Z
2019-12-09T12:48:05.000Z
#!/Applications/anaconda/envs/Python3/bin import socket def main(): '''Example Creating a Simple Client Using the socket Module''' HOST = '127.0.0.1' PORT = 50002 incomingMessage = '' outgoingMessage = '' # s is socket object for IPv4, TCP s = socket.socket(socket.AF_INET , socket.SOCK_S...
25.666667
81
0.634002
#!/Applications/anaconda/envs/Python3/bin import socket def main(): '''Example Creating a Simple Client Using the socket Module''' HOST = '127.0.0.1' PORT = 50002 incomingMessage = '' outgoingMessage = '' # s is socket object for IPv4, TCP s = socket.socket(socket.AF_INET , socket.SOCK_S...
0
0
0
0
0
0
0
0
0
ce821802f2bcb873bdacc5a2a6ca1f22aaf1bc15
253
py
Python
python/gemv.py
j-c-cook/LinearAlgebra
8a1a59860233b579b904df3e99c31ade5824d952
[ "MIT" ]
null
null
null
python/gemv.py
j-c-cook/LinearAlgebra
8a1a59860233b579b904df3e99c31ade5824d952
[ "MIT" ]
10
2021-05-14T15:01:19.000Z
2021-05-30T04:46:14.000Z
python/gemv.py
j-c-cook/LinearAlgebra
8a1a59860233b579b904df3e99c31ade5824d952
[ "MIT" ]
null
null
null
if __name__ == '__main__': main()
13.315789
39
0.383399
import numpy as np def main(): A = np.array([ [1., 2., 3., 4., 5.], [6., 7., 8., 9., 10.] ]) x = np.array([4., 8., 10., 6., 8.]) x = x[:, np.newaxis] y = A @ x print(y) if __name__ == '__main__': main()
0
0
0
0
0
170
0
-3
45
a43b6bb26fd388c2174f944bbb1a1e944b06ff2b
14,565
py
Python
hitballs.py
sharababy/hitball_agent
c04e57b67b5441815047e195c41c6e069f032732
[ "MIT" ]
1
2019-04-17T21:00:43.000Z
2019-04-17T21:00:43.000Z
hitballs.py
sharababy/hitball_agent
c04e57b67b5441815047e195c41c6e069f032732
[ "MIT" ]
null
null
null
hitballs.py
sharababy/hitball_agent
c04e57b67b5441815047e195c41c6e069f032732
[ "MIT" ]
null
null
null
# Zeit wird gezaehlt import random, time import PIL.Image as Image import torch.nn as nn import os os.environ["SDL_VIDEODRIVER"] = "dummy" #
34.11007
196
0.511294
# Zeit wird gezaehlt import pygame, math, random, time from pygame.locals import * import PIL.Image as Image import numpy as np import random import time import torch import torch.nn as nn from torch.autograd import Variable import os, sys os.environ["SDL_VIDEODRIVER"] = "dummy" def GameStart(model,options,optimizer...
0
0
0
0
0
14,228
0
9
178
3933dc80e91094b4260ccdebe302ea39319759cf
2,706
py
Python
adms/config.py
adleida/adms
98efcb70d9c06dc7e5ca3fd7f01daff84974a565
[ "MIT" ]
null
null
null
adms/config.py
adleida/adms
98efcb70d9c06dc7e5ca3fd7f01daff84974a565
[ "MIT" ]
null
null
null
adms/config.py
adleida/adms
98efcb70d9c06dc7e5ca3fd7f01daff84974a565
[ "MIT" ]
null
null
null
# coding: utf-8
31.835294
96
0.526608
# coding: utf-8 import logging from os import path from .models.mdsp import Mdsp from .utils.udefault import load_yaml from .dao.mongo.daomongo import DaoMongo from .dao.mongo.daogridfs import DaoGridFS class Config(object): ''' load all info from etc when starting webservice ''' @staticmethod def pres...
0
2,336
0
141
0
0
0
55
157
625ea579179d61fc7ae63d723d4956759314d983
2,535
py
Python
main.py
RomainSabathe/cw_dimension_reduction
fbe62e66d78ffd5dee5c6643cc03d97d7025641f
[ "MIT" ]
null
null
null
main.py
RomainSabathe/cw_dimension_reduction
fbe62e66d78ffd5dee5c6643cc03d97d7025641f
[ "MIT" ]
null
null
null
main.py
RomainSabathe/cw_dimension_reduction
fbe62e66d78ffd5dee5c6643cc03d97d7025641f
[ "MIT" ]
null
null
null
import numpy as np import os import pandas as pd from preprocessing import method_name from plot_toolbox import plot_error_rate ############################################################################### ### CLASSIFICATION EXPERIMENTS ############################################### ###############################...
35.208333
97
0.560158
import numpy as np import scipy.io as sio import os import matplotlib.pyplot as plt import pandas as pd from preprocessing import method_name from plot_toolbox import plot_error_rate ############################################################################### ### CLASSIFICATION EXPERIMENTS ########################...
0
0
0
0
0
0
0
11
44
015f231c514489f48159c0b99c7ed2d533a381e9
1,006
py
Python
leetcode-56.py
comst007/myLeetCode
2596f207f686a1601ea32d263cba4a9a1e2f3630
[ "Apache-2.0" ]
null
null
null
leetcode-56.py
comst007/myLeetCode
2596f207f686a1601ea32d263cba4a9a1e2f3630
[ "Apache-2.0" ]
null
null
null
leetcode-56.py
comst007/myLeetCode
2596f207f686a1601ea32d263cba4a9a1e2f3630
[ "Apache-2.0" ]
null
null
null
import pprint sl = Solution() t1 = [[1,3],[2,6],[8,10],[15,18]] t1 = [Interval(*x) for x in t1] res = sl.merge(t1) pprint.pprint(res) sl = Solution() t2 = [[1,4],[4,5]] t2 = [Interval(*x) for x in t2] res = sl.merge(t2) print(res)
23.395349
62
0.522863
import pprint class Interval: def __init__(self, s=0, e=0): self.start = s self.end = e class Solution: def merge(self, intervals: list): res = [] n = len(intervals) if not n: return [] if n == 1: return intervals intervals.sort...
0
0
0
724
0
0
0
0
45
7615058d98c7dfb50b7dd39b2419c160b561ca08
2,520
py
Python
data_mining.py
anthonywww/intro-to-python
d8f2a9736eeef9dbf113c7f337c9d5aaffb7a702
[ "MIT" ]
null
null
null
data_mining.py
anthonywww/intro-to-python
d8f2a9736eeef9dbf113c7f337c9d5aaffb7a702
[ "MIT" ]
null
null
null
data_mining.py
anthonywww/intro-to-python
d8f2a9736eeef9dbf113c7f337c9d5aaffb7a702
[ "MIT" ]
1
2020-08-04T14:38:11.000Z
2020-08-04T14:38:11.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Program Name: data_mining.py # Anthony Waldsmith # 8/03/16 # Python Version 3.4 # Description: Datamining CSV google stocks # Optional import for versions of python <= 2 from __future__ import print_function #name: get_data_list #param: FILE_NAME - the file's name you...
25.714286
110
0.700397
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Program Name: data_mining.py # Anthony Waldsmith # 8/03/16 # Python Version 3.4 # Description: Datamining CSV google stocks # Optional import for versions of python <= 2 from __future__ import print_function #name: get_data_list #param: FILE_NAME - the file's name you...
0
0
0
0
0
1,176
0
0
89
4fa07e9199021389bf18c7494de0ca997d3c3c40
7,512
py
Python
nncore/nn/blocks/msg_pass.py
yeliudev/nncore
2160db62268767d3bcc69dd918cd291305fc820f
[ "MIT" ]
6
2021-03-27T15:25:00.000Z
2021-08-23T06:29:33.000Z
nncore/nn/blocks/msg_pass.py
yeliudev/nncore
2160db62268767d3bcc69dd918cd291305fc820f
[ "MIT" ]
4
2020-10-23T09:15:09.000Z
2021-08-24T03:33:59.000Z
nncore/nn/blocks/msg_pass.py
yeliudev/nncore
2160db62268767d3bcc69dd918cd291305fc820f
[ "MIT" ]
null
null
null
# Copyright (c) Ye Liu. All rights reserved. import torch.nn as nn
33.386667
79
0.578674
# Copyright (c) Ye Liu. All rights reserved. import torch import torch.nn as nn import nncore from ..builder import MESSAGE_PASSINGS from ..bundle import Parameter @MESSAGE_PASSINGS.register() @nncore.bind_getter('in_features', 'out_features') class GCN(nn.Module): """ Graph Convolutional Layer introduced i...
4
7,272
0
0
0
0
0
9
159
faa9ddb6d71e5cb6b115e550df2c3fceb7f3c868
1,914
py
Python
src/detection/pre_processing.py
wdoppenberg/crater-detection
471d1bc508dee873cc5d05329147dfc5314bc15d
[ "MIT" ]
8
2021-06-09T15:07:16.000Z
2021-12-22T09:39:29.000Z
src/detection/pre_processing.py
wdoppenberg/crater-detection
471d1bc508dee873cc5d05329147dfc5314bc15d
[ "MIT" ]
3
2021-04-23T12:29:40.000Z
2021-06-10T11:01:05.000Z
src/detection/pre_processing.py
wdoppenberg/crater-detection
471d1bc508dee873cc5d05329147dfc5314bc15d
[ "MIT" ]
null
null
null
import numpy as np # https://automaticaddison.com/how-to-do-histogram-matching-using-opencv/ def calculate_cdf(histogram: np.ndarray) -> np.ndarray: """ This method calculates the cumulative distribution function :param array histogram: The values of the histogram :return: normalized_cdf: The normal...
31.9
116
0.706374
import cv2 import numpy as np from numba import njit # https://automaticaddison.com/how-to-do-histogram-matching-using-opencv/ def calculate_cdf(histogram: np.ndarray) -> np.ndarray: """ This method calculates the cumulative distribution function :param array histogram: The values of the histogram :...
0
413
0
0
0
865
0
-10
90
90e56f8186d7bd6e67931a6c80dcdcbe03466866
11,628
py
Python
osmhm/tables.py
SomeoneElseOSM/osm_hall_monitor
47740e1a105b6c051d882e8b12e0443939e6fe3d
[ "MIT" ]
null
null
null
osmhm/tables.py
SomeoneElseOSM/osm_hall_monitor
47740e1a105b6c051d882e8b12e0443939e6fe3d
[ "MIT" ]
null
null
null
osmhm/tables.py
SomeoneElseOSM/osm_hall_monitor
47740e1a105b6c051d882e8b12e0443939e6fe3d
[ "MIT" ]
null
null
null
error_message = 'Action is not defined. Please use create, truncate, or drop.'
28.640394
121
0.517716
import connect error_message = 'Action is not defined. Please use create, truncate, or drop.' def file_list(action): conn = connect.connect() cur = conn.cursor() if action in ['create', 'c']: cur.execute(""" CREATE TABLE file_list ( id SERIAL NOT NULL PRIMARY KEY, ...
0
0
0
0
0
11,198
0
-7
343
52fc2d289bfb033df41d4a7a2fb1d5495d2a59f2
2,801
gyp
Python
node_modules/librdkafka-node/binding.gyp
rjsadaye/devilsinvent
28b39edefcdcae2c651533f43c9ffed847bfac58
[ "MIT" ]
null
null
null
node_modules/librdkafka-node/binding.gyp
rjsadaye/devilsinvent
28b39edefcdcae2c651533f43c9ffed847bfac58
[ "MIT" ]
null
null
null
node_modules/librdkafka-node/binding.gyp
rjsadaye/devilsinvent
28b39edefcdcae2c651533f43c9ffed847bfac58
[ "MIT" ]
null
null
null
{ 'variables': { # may be redefined in command line on configuration stage 'BUILD_LIBRDKAFKA%': 1, }, "targets": [ { "target_name": "bindings", "sources": [ "<!@(ls -1 src/*.cc)", ], "include_dirs": [ "<!(node -e \"require('nan')\")", ], 'conditions': [ ...
28.292929
111
0.446626
{ 'variables': { # may be redefined in command line on configuration stage 'BUILD_LIBRDKAFKA%': 1, }, "targets": [ { "target_name": "bindings", "sources": [ "<!@(ls -1 src/*.cc)", ], "include_dirs": [ "<!(node -e \"require('nan')\")", ], 'conditions': [ ...
0
0
0
0
0
0
0
0
0
f3f0308568526f0095f653c74b076ec99c6bd8fd
4,179
py
Python
examples/samplers/distributions/bivariate_normal/metropolis_hastings.py
papamarkou/eeyore
4cd9b5a619cd095035aa93f348d1c937629aa8a3
[ "MIT" ]
6
2020-04-22T18:56:46.000Z
2021-09-09T15:57:48.000Z
examples/samplers/distributions/bivariate_normal/metropolis_hastings.py
papamarkou/eeyore
4cd9b5a619cd095035aa93f348d1c937629aa8a3
[ "MIT" ]
19
2019-11-14T21:22:21.000Z
2020-10-31T16:18:36.000Z
examples/samplers/distributions/bivariate_normal/metropolis_hastings.py
scidom/eeyore
4cd9b5a619cd095035aa93f348d1c937629aa8a3
[ "MIT" ]
null
null
null
# Sampling from a bivariate normal density via Metropolis-Hastings # %% Import packages import matplotlib.pyplot as plt import numpy as np import scipy.stats as stats import seaborn as sns import torch from torch.distributions import MultivariateNormal # from torch.distributions import Normal from torch.utils.data i...
31.186567
119
0.73295
# Sampling from a bivariate normal density via Metropolis-Hastings # %% Import packages import matplotlib.pyplot as plt import numpy as np import scipy.stats as stats import seaborn as sns import torch from torch.distributions import MultivariateNormal # from torch.distributions import Normal from torch.utils.data i...
0
0
0
0
0
35
0
0
23
0ae52dc18610d88566a80f105361f69c85e7703c
1,909
py
Python
jobs/v4beta1/job_search_list_jobs.py
thesugar/python-docs-samples
1a59ca688f1d7602d52cd4088fa7b6e3afe0afd0
[ "Apache-2.0" ]
1
2020-06-04T16:50:49.000Z
2020-06-04T16:50:49.000Z
jobs/v4beta1/job_search_list_jobs.py
thesugar/python-docs-samples
1a59ca688f1d7602d52cd4088fa7b6e3afe0afd0
[ "Apache-2.0" ]
null
null
null
jobs/v4beta1/job_search_list_jobs.py
thesugar/python-docs-samples
1a59ca688f1d7602d52cd4088fa7b6e3afe0afd0
[ "Apache-2.0" ]
1
2020-06-12T16:23:17.000Z
2020-06-12T16:23:17.000Z
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
33.491228
75
0.700891
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
0
0
0
0
0
0
0
0
0
f1dcfa061bd6ebb0ea16cd437d66f37ad6568348
653
py
Python
setup.py
sh4dowb/DiziCLI
b9fb3a0ab5ddbf5d51d76f4da490853269e522dc
[ "MIT" ]
2
2021-08-16T17:39:42.000Z
2021-08-23T05:36:20.000Z
setup.py
sh4dowb/DiziCLI
b9fb3a0ab5ddbf5d51d76f4da490853269e522dc
[ "MIT" ]
null
null
null
setup.py
sh4dowb/DiziCLI
b9fb3a0ab5ddbf5d51d76f4da490853269e522dc
[ "MIT" ]
1
2018-09-17T16:05:21.000Z
2018-09-17T16:05:21.000Z
#!/usr/bin/env python from setuptools import find_packages, setup version = '1.0.0' setup( name='dizicli', version=version, description='Dizi Crawler', author='Batuhan Osman Taskaya', author_email='batuhanosmantaskaya@gmail.com', url='https://github.com/btaskaya/dizicli', download_url='http...
29.681818
84
0.641654
#!/usr/bin/env python from setuptools import find_packages,setup version = '1.0.0' setup( name='dizicli', version=version, description='Dizi Crawler', author='Batuhan Osman Taskaya', author_email='batuhanosmantaskaya@gmail.com', url='https://github.com/btaskaya/dizicli', download_url='https...
0
0
0
0
0
0
0
-1
0
07e380b7f4cc32d4a6ed0cb2489421687db3ae08
723
py
Python
euler3.py
josephhaddad55/project-euler
29f6dd1a424d15da9f737a9b9aa11705f5761a65
[ "MIT" ]
null
null
null
euler3.py
josephhaddad55/project-euler
29f6dd1a424d15da9f737a9b9aa11705f5761a65
[ "MIT" ]
null
null
null
euler3.py
josephhaddad55/project-euler
29f6dd1a424d15da9f737a9b9aa11705f5761a65
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143? if __name__ == "__main__": assert largest_prime_factor(13195) == 29 assert largest_prime_factor(600851475143) == 6857
27.807692
110
0.630705
#!/usr/bin/env python3 # The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143? def largest_prime_factor(n: int) -> int: # The largest divisor to start is 2 because 2 is the smallest prime number largest_divisor = 2 # We divide by the smallest possible...
0
0
0
0
0
438
0
0
22
39c40fe7422eb01f8cfe854446d15a0aca6845a0
1,000
py
Python
examples/docs_snippets/docs_snippets/overview/asset_stores/custom_asset_store.py
mitodl/dagster
c94cd8d0f5f67722790e8a176228aa4bdcaa0068
[ "Apache-2.0" ]
1
2021-04-30T00:19:20.000Z
2021-04-30T00:19:20.000Z
examples/docs_snippets/docs_snippets/overview/asset_stores/custom_asset_store.py
mitodl/dagster
c94cd8d0f5f67722790e8a176228aa4bdcaa0068
[ "Apache-2.0" ]
null
null
null
examples/docs_snippets/docs_snippets/overview/asset_stores/custom_asset_store.py
mitodl/dagster
c94cd8d0f5f67722790e8a176228aa4bdcaa0068
[ "Apache-2.0" ]
null
null
null
"""isort:skip_file""" # start_marker # end_marker
20
89
0.729
"""isort:skip_file""" from dagster import solid @solid def solid1(_): pass @solid def solid2(_, _a): pass def write_dataframe_to_table(**_kwargs): pass def read_dataframe_from_table(**_kwargs): pass # start_marker from dagster import AssetStore, ModeDefinition, pipeline, resource class MyAss...
0
162
0
466
0
57
0
49
205
325f8bc69af4bd46f0e829c73247df50b4f818d6
384
py
Python
bacdive/tests/test_utils.py
microDM/BacDivePy
635bd6a856e2b0bd892a363898bfe46a5e470d90
[ "BSD-2-Clause" ]
1
2022-02-04T09:21:26.000Z
2022-02-04T09:21:26.000Z
bacdive/tests/test_utils.py
microDM/BacDivePy
635bd6a856e2b0bd892a363898bfe46a5e470d90
[ "BSD-2-Clause" ]
null
null
null
bacdive/tests/test_utils.py
microDM/BacDivePy
635bd6a856e2b0bd892a363898bfe46a5e470d90
[ "BSD-2-Clause" ]
null
null
null
import unittest if __name__ == "__main__": unittest.main()
20.210526
51
0.669271
import unittest from bacdive.utils import check_allow class TestUtils(unittest.TestCase): def setUp(self): pass def test_check_allow(self): good=check_allow('clos lj')#returns true bad=check_allow('b./_ subit')#resutns false self.assertEqual(good, True) self.assertEqu...
0
0
0
258
0
0
0
16
45
38e758ca928c145d56c6141c5833249371abe3b1
4,414
py
Python
Lat_Gen.py
patrick-schubert/emission-line-galaxy
996432abbe9c8be93ff2b00ef508b8d92cf17d32
[ "MIT" ]
1
2021-04-02T20:02:37.000Z
2021-04-02T20:02:37.000Z
Lat_Gen.py
patrick-schubert/emission-line-galaxy
996432abbe9c8be93ff2b00ef508b8d92cf17d32
[ "MIT" ]
null
null
null
Lat_Gen.py
patrick-schubert/emission-line-galaxy
996432abbe9c8be93ff2b00ef508b8d92cf17d32
[ "MIT" ]
null
null
null
Lat_Gen()
45.040816
110
0.468056
from Dirs import * import Layers import Model from Data import * import pandas as pd import numpy as np import time def Lat_Gen(): print("Iniciando...") start = time.time() model_list = ["CAE","CVAE"] #std_list = [1.0,0.5, 0.1, 1e-13] std_list = [1.0,0.5, 0.1, 1e-13] lat_dim_list = [2,3,4,5...
0
0
0
0
0
4,264
0
-38
177
5fc72e80dc3346eaf7dab56dfa788bda9897e9c4
3,445
py
Python
expocomp.py
mjirik/face_in_photo
5d61e9dbaf501b8e01030e13e267dd2079e7610c
[ "MIT" ]
null
null
null
expocomp.py
mjirik/face_in_photo
5d61e9dbaf501b8e01030e13e267dd2079e7610c
[ "MIT" ]
null
null
null
expocomp.py
mjirik/face_in_photo
5d61e9dbaf501b8e01030e13e267dd2079e7610c
[ "MIT" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright 2015 mjirik <mjirik@mjirik-Latitude-E6520> # # Distributed under terms of the MIT license. """ Automatic exposure compensation """ import logging logger = logging.getLogger(__name__) if __name__ == "__main__": main()
23.59589
65
0.559071
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2015 mjirik <mjirik@mjirik-Latitude-E6520> # # Distributed under terms of the MIT license. """ Automatic exposure compensation """ import logging logger = logging.getLogger(__name__) import argparse import numpy as np import matplotlib.py...
2
0
0
2,068
0
931
0
-8
134
73f0bd0c41c3e6db3d4702cfb0b68afda2123fae
625
py
Python
main/ninja/template.py
yopito/cports
ef5f808a46724ee3cd215eb95192904ebb7ddcd1
[ "BSD-2-Clause" ]
null
null
null
main/ninja/template.py
yopito/cports
ef5f808a46724ee3cd215eb95192904ebb7ddcd1
[ "BSD-2-Clause" ]
null
null
null
main/ninja/template.py
yopito/cports
ef5f808a46724ee3cd215eb95192904ebb7ddcd1
[ "BSD-2-Clause" ]
null
null
null
pkgname = "ninja" pkgver = "1.10.2" pkgrel = 0 hostmakedepends = ["python"] pkgdesc = "Small build system with a focus on speed" maintainer = "q66 <q66@chimera-linux.org>" license = "Apache-2.0" url = "https://ninja-build.org" sources = [f"https://github.com/ninja-build/ninja/archive/v{pkgver}.tar.gz"] sha256 = ["ce358...
27.173913
77
0.7056
pkgname = "ninja" pkgver = "1.10.2" pkgrel = 0 hostmakedepends = ["python"] pkgdesc = "Small build system with a focus on speed" maintainer = "q66 <q66@chimera-linux.org>" license = "Apache-2.0" url = "https://ninja-build.org" sources = [f"https://github.com/ninja-build/ninja/archive/v{pkgver}.tar.gz"] sha256 = ["ce358...
0
0
0
0
0
125
0
0
68
076757d7ae9bf693a5a98130c874a5fa6a271f5b
20,350
py
Python
bpt_diagram_and_image.py
Andromeda31/senior
f6983c1871844823f2565e40e977b7f00cff23ea
[ "MIT" ]
null
null
null
bpt_diagram_and_image.py
Andromeda31/senior
f6983c1871844823f2565e40e977b7f00cff23ea
[ "MIT" ]
null
null
null
bpt_diagram_and_image.py
Andromeda31/senior
f6983c1871844823f2565e40e977b7f00cff23ea
[ "MIT" ]
null
null
null
##lots of imports. Some are unnecessary but I left a lot just to be safe... import matplotlib.pyplot as plt import matplotlib from astropy.io import fits import numpy as np import astropy.table as t import matplotlib.image as img import math import matplotlib.cm as cm import matplotlib.mlab as mlab plt.rcParams['axes....
34.259259
214
0.577838
##lots of imports. Some are unnecessary but I left a lot just to be safe... import matplotlib.pyplot as plt import matplotlib from astropy.io import fits import numpy as np import astropy.table as t import matplotlib.image as img from scipy.optimize import newton from pathlib import Path import math import matplotlib.c...
0
0
0
0
0
1,267
0
62
373
ad9d2f580572a517defde6633c295d53de93a3f0
24,338
py
Python
sc2reader/utils.py
dsjoerg/sc2reader
adeb6e3da80e57974b1a29b20e80a02411e693e2
[ "MIT" ]
2
2016-05-31T14:50:47.000Z
2021-11-04T20:03:19.000Z
sc2reader/utils.py
dsjoerg/sc2reader
adeb6e3da80e57974b1a29b20e80a02411e693e2
[ "MIT" ]
null
null
null
sc2reader/utils.py
dsjoerg/sc2reader
adeb6e3da80e57974b1a29b20e80a02411e693e2
[ "MIT" ]
2
2017-01-28T09:09:47.000Z
2017-09-14T14:29:20.000Z
from __future__ import absolute_import from sc2reader.exceptions import FileError LITTLE_ENDIAN,BIG_ENDIAN = '<','>' def read_header(file): ''' Read the file as a byte stream according to the documentation found at: http://wiki.devklog.net/index.php?title=The_MoPaQ_Archive_Format Return ...
35.018705
138
0.587065
from __future__ import absolute_import import argparse import cStringIO import fnmatch import os import re import struct import textwrap from itertools import groupby from sc2reader.exceptions import FileError LITTLE_ENDIAN,BIG_ENDIAN = '<','>' class ReplayBuffer(object): """ The ReplayBuffer is a wrapper over...
0
925
0
20,132
0
1,766
0
-46
498
d4f5e6ba452701bed3ea566bf3282a45dff0a638
2,261
py
Python
Tareas/5.Tarea2conRPC/servidorIntermedio.py
bravo95/SistemasDistribuidos
5b633cb59158efcc1d36b7531552e45c9eb99eca
[ "MIT" ]
1
2018-09-19T07:38:58.000Z
2018-09-19T07:38:58.000Z
Tareas/5.Tarea2conRPC/servidorIntermedio.py
bravo95/SistemasDistribuidos
5b633cb59158efcc1d36b7531552e45c9eb99eca
[ "MIT" ]
null
null
null
Tareas/5.Tarea2conRPC/servidorIntermedio.py
bravo95/SistemasDistribuidos
5b633cb59158efcc1d36b7531552e45c9eb99eca
[ "MIT" ]
null
null
null
from SimpleXMLRPCServer import SimpleXMLRPCServer from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler import xmlrpclib #instancio un objeto y conecto el servidor a donde se va a conectar servidorSuma = xmlrpclib.ServerProxy('http://localhost:9998') servidorSub = xmlrpclib.ServerProxy('http://localhost:9997') ser...
40.375
67
0.747015
from SimpleXMLRPCServer import SimpleXMLRPCServer from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler import xmlrpclib #instancio un objeto y conecto el servidor a donde se va a conectar servidorSuma = xmlrpclib.ServerProxy('http://localhost:9998') servidorSub = xmlrpclib.ServerProxy('http://localhost:9997') ser...
0
0
0
1,260
0
0
0
0
45
3fd31c273aac639ffd2046e45b6ca43b195bc3ff
1,025
py
Python
pickups/migrations/0003_auto_20211120_1101.py
Zadigo/restaurant
10d2d64f1164de697eeccaa7cd500c71755bfb99
[ "MIT" ]
null
null
null
pickups/migrations/0003_auto_20211120_1101.py
Zadigo/restaurant
10d2d64f1164de697eeccaa7cd500c71755bfb99
[ "MIT" ]
null
null
null
pickups/migrations/0003_auto_20211120_1101.py
Zadigo/restaurant
10d2d64f1164de697eeccaa7cd500c71755bfb99
[ "MIT" ]
null
null
null
# Generated by Django 3.2.8 on 2021-11-20 10:01
24.404762
75
0.525854
# Generated by Django 3.2.8 on 2021-11-20 10:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('inventory', '0001_initial'), ('pickups', '0002_auto_20211005_2343'), ] operations = [ migrations.RemoveField( model_name...
0
0
0
911
0
0
0
19
46
c4026cb8e68ed5f70aefe2c25921002139eabc74
2,337
py
Python
word_count.py
tiggreen/map_reduce.py
130c6aa93f7a5ab23cbd2f114fa121af9b293e84
[ "MIT" ]
11
2015-02-07T06:10:47.000Z
2021-03-01T08:56:30.000Z
word_count.py
tiggreen/map_reduce.py
130c6aa93f7a5ab23cbd2f114fa121af9b293e84
[ "MIT" ]
null
null
null
word_count.py
tiggreen/map_reduce.py
130c6aa93f7a5ab23cbd2f114fa121af9b293e84
[ "MIT" ]
2
2015-06-06T18:07:27.000Z
2015-07-29T20:24:51.000Z
""" The MIT License Copyright (c) Tigran Hakobyan. http://tiggreen.me Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, mo...
31.581081
77
0.744116
""" The MIT License Copyright (c) Tigran Hakobyan. http://tiggreen.me Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, mo...
0
0
0
960
0
0
0
3
45
9de0071295fd887d28317c498aef2f85e7b2d49a
1,884
py
Python
causal_meta/modules/mdn.py
damienstanton/causaloptimization
162c04142e3591132f015a3e5d2a207fd4973c6d
[ "MIT" ]
64
2019-02-03T12:57:42.000Z
2022-02-12T11:50:16.000Z
causal_meta/modules/mdn.py
damienstanton/causaloptimization
162c04142e3591132f015a3e5d2a207fd4973c6d
[ "MIT" ]
1
2020-10-11T18:52:50.000Z
2020-10-13T09:58:35.000Z
causal_meta/modules/mdn.py
damienstanton/causaloptimization
162c04142e3591132f015a3e5d2a207fd4973c6d
[ "MIT" ]
12
2019-01-30T14:07:40.000Z
2021-03-02T02:32:15.000Z
import torch.nn as nn
31.932203
84
0.619958
import torch import torch.nn as nn import torch.nn.functional as F class MDN(nn.Module): def __init__(self, n_hidden, n_gaussians): super(MDN, self).__init__() self.z_h = nn.Sequential( nn.Linear(1, n_hidden), nn.Tanh() ) self.z_pi = nn.Linear(n_hidden, n_ga...
0
0
0
1,114
0
609
0
1
136
2d78593dbad655d65392640be8489c14a0bf7405
1,353
py
Python
dockerfile_requirements/__init__.py
conordowling/dockerfile-requirements
abb1e73e2bf176db999d4d03dd3bb335850879ab
[ "MIT" ]
null
null
null
dockerfile_requirements/__init__.py
conordowling/dockerfile-requirements
abb1e73e2bf176db999d4d03dd3bb335850879ab
[ "MIT" ]
null
null
null
dockerfile_requirements/__init__.py
conordowling/dockerfile-requirements
abb1e73e2bf176db999d4d03dd3bb335850879ab
[ "MIT" ]
null
null
null
import sys ADD_REQUIREMENTS_MACRO = """ {%- macro add_requirements(fname) -%} # Requirements populated from {{fname}} {% for requirement in read_requirements(fname) -%} RUN pip install "{{ requirement }}" {% endfor -%} {%- endmacro -%} """ if __name__ == '__main__': main(sys.argv[1])
26.529412
114
0.695492
import os import sys import datetime import git from jinja2 import Template def git_root(): root, = os.popen('git rev-parse --show-toplevel') return root.strip() def get_last_changed(fname): repo = git.Repo(git_root()) blame = repo.blame('HEAD', os.path.abspath(fname)) line_dt = {line: commit.a...
0
0
0
0
0
897
0
-23
181
d16cfacdd5b15325d373817a633155f2c089632b
166
py
Python
Python/7. Creating a calender.py
bhoomika909/Hacktoberfest2021-1
d36792245ec00336ce68b582f0279b23c2cd26a9
[ "MIT" ]
1
2022-01-02T11:14:32.000Z
2022-01-02T11:14:32.000Z
Python/7. Creating a calender.py
bhoomika909/Hacktoberfest2021-1
d36792245ec00336ce68b582f0279b23c2cd26a9
[ "MIT" ]
null
null
null
Python/7. Creating a calender.py
bhoomika909/Hacktoberfest2021-1
d36792245ec00336ce68b582f0279b23c2cd26a9
[ "MIT" ]
9
2021-10-16T07:31:54.000Z
2021-10-31T18:02:34.000Z
import calendar print(calendar.month(2018, 8)) #This is for particular month calendar print(calendar.calendar(2020)) #This if for printing whole year calendar
27.666667
73
0.771084
import calendar print(calendar.month(2018, 8)) #This is for particular month calendar print(calendar.calendar(2020)) #This if for printing whole year calendar
0
0
0
0
0
0
0
0
0