hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
6b03e3a80d97f1ab3fae5b956c2028270ee37766
7,069
py
Python
tests/integ/test_trial_component.py
jmahlik/sagemaker-experiments
9df55c0f0b919e3f2708a9098b87ea962ec882c9
[ "Apache-2.0" ]
88
2019-12-04T05:16:35.000Z
2022-03-14T18:49:05.000Z
tests/integ/test_trial_component.py
jmahlik/sagemaker-experiments
9df55c0f0b919e3f2708a9098b87ea962ec882c9
[ "Apache-2.0" ]
46
2020-01-13T23:20:10.000Z
2022-03-27T19:36:33.000Z
tests/integ/test_trial_component.py
jmahlik/sagemaker-experiments
9df55c0f0b919e3f2708a9098b87ea962ec882c9
[ "Apache-2.0" ]
21
2019-12-05T18:18:36.000Z
2022-03-11T13:48:41.000Z
# Copyright Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompan...
42.584337
114
0.757816
# Copyright Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompan...
6,107
0
230
f330e74884f39e318ce58c74af6a7d488351704c
431
py
Python
test/constants.py
Crimack/lissandra
7f43ca70040ce054f335ad3b134e3bd4ee52ff3e
[ "MIT" ]
null
null
null
test/constants.py
Crimack/lissandra
7f43ca70040ce054f335ad3b134e3bd4ee52ff3e
[ "MIT" ]
null
null
null
test/constants.py
Crimack/lissandra
7f43ca70040ce054f335ad3b134e3bd4ee52ff3e
[ "MIT" ]
null
null
null
""" This file defines constants which are used in the various tests to validate the API functions. """ # Summoner name to be used for Standard API calls, defaulting to EUW SUMMONER_NAME = "Crimack" # Unknown Summoner, used to validate that an error is thrown UNKNOWN_SUMMONER_NAME = "abcaklsjdlakakdjlsakjdsdjlaksjdla...
25.352941
68
0.793503
""" This file defines constants which are used in the various tests to validate the API functions. """ # Summoner name to be used for Standard API calls, defaulting to EUW SUMMONER_NAME = "Crimack" # Unknown Summoner, used to validate that an error is thrown UNKNOWN_SUMMONER_NAME = "abcaklsjdlakakdjlsakjdsdjlaksjdla...
0
0
0
8f97bf2869138aad90bcfcda72d6b30224db6b45
112
py
Python
Python_3/DEF/DEF/programa -- Print especial.py
NicolasGandolfi/Exercicios-Python
935fe3577c149192f9e29568e9798e970a620131
[ "MIT" ]
null
null
null
Python_3/DEF/DEF/programa -- Print especial.py
NicolasGandolfi/Exercicios-Python
935fe3577c149192f9e29568e9798e970a620131
[ "MIT" ]
null
null
null
Python_3/DEF/DEF/programa -- Print especial.py
NicolasGandolfi/Exercicios-Python
935fe3577c149192f9e29568e9798e970a620131
[ "MIT" ]
null
null
null
linha('NICOLAS')
16
21
0.517857
def linha(txt): tam=len(txt)+4 print('—'*tam) print(f' {txt}') print('—'*tam) linha('NICOLAS')
77
0
22
03c8dba9df1507c8ce6a990c4a32a8671e07b8bd
230
py
Python
server/main.py
lvillis/serverstatus
234d239efc1bab1bc7290d2f233fa1608b943e22
[ "MIT" ]
null
null
null
server/main.py
lvillis/serverstatus
234d239efc1bab1bc7290d2f233fa1608b943e22
[ "MIT" ]
11
2021-05-18T04:46:37.000Z
2022-03-14T20:09:33.000Z
server/main.py
lvillis/serverstatus
234d239efc1bab1bc7290d2f233fa1608b943e22
[ "MIT" ]
null
null
null
import uvicorn from utils import check_config_json from configs import * if __name__ == '__main__': if not check_config_json(): exit() uvicorn.run('api:app', host=HOST, port=PORT, log_level='info', reload=False)
23
80
0.704348
import uvicorn from utils import check_config_json from configs import * if __name__ == '__main__': if not check_config_json(): exit() uvicorn.run('api:app', host=HOST, port=PORT, log_level='info', reload=False)
0
0
0
afc3c75f2ba699a5137b325745f39c894b8c5125
855
py
Python
winkie/_nbdev.py
kiview/winkie
f8bc81bf00ff4ab2eee08b2b6c1c73fa86d6cf26
[ "Apache-2.0" ]
null
null
null
winkie/_nbdev.py
kiview/winkie
f8bc81bf00ff4ab2eee08b2b6c1c73fa86d6cf26
[ "Apache-2.0" ]
null
null
null
winkie/_nbdev.py
kiview/winkie
f8bc81bf00ff4ab2eee08b2b6c1c73fa86d6cf26
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED BY NBDEV! DO NOT EDIT! __all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"DLCImporter": "00_dlc_importer.ipynb", "transform_to_relative": "00_dlc_importer.ipynb", "add_middle_neck": "00_dlc_importer.ipynb", "add_rotation": "00_dlc_importer.ipynb", ...
34.2
61
0.666667
# AUTOGENERATED BY NBDEV! DO NOT EDIT! __all__ = ["index", "modules", "custom_doc_links", "git_url"] index = {"DLCImporter": "00_dlc_importer.ipynb", "transform_to_relative": "00_dlc_importer.ipynb", "add_middle_neck": "00_dlc_importer.ipynb", "add_rotation": "00_dlc_importer.ipynb", ...
18
0
23
69669df21c86a33e1febf956018a7558604f0be2
1,896
py
Python
apps/social/tasks.py
ghuntley/NewsBlur
ce52a329c2624a5b596a25416606356cfbfe4d9c
[ "MIT" ]
null
null
null
apps/social/tasks.py
ghuntley/NewsBlur
ce52a329c2624a5b596a25416606356cfbfe4d9c
[ "MIT" ]
null
null
null
apps/social/tasks.py
ghuntley/NewsBlur
ce52a329c2624a5b596a25416606356cfbfe4d9c
[ "MIT" ]
null
null
null
from celery.task import Task from apps.social.models import MSharedStory, MSocialProfile, MSocialServices from utils import log as logging
35.111111
110
0.693565
from celery.task import Task from apps.social.models import MSharedStory, MSocialProfile, MSocialServices from utils import log as logging class PostToService(Task): def run(self, shared_story_id, service): try: shared_story = MSharedStory.objects.get(id=shared_story_id) share...
1,216
128
391
0427ea64bdeb2adb8dba08ff92c89677f6a2d1e7
1,917
py
Python
models/reconstruction.py
JWHan717/CS492I-Project
5da80bc41425ee90711a3de89c5501b5f7acd4b7
[ "MIT" ]
23
2020-02-14T02:19:07.000Z
2022-01-05T05:56:39.000Z
models/reconstruction.py
JWHan717/CS492I-Project
5da80bc41425ee90711a3de89c5501b5f7acd4b7
[ "MIT" ]
1
2020-12-25T03:28:15.000Z
2020-12-25T03:28:15.000Z
models/reconstruction.py
JWHan717/CS492I-Project
5da80bc41425ee90711a3de89c5501b5f7acd4b7
[ "MIT" ]
2
2020-08-11T13:46:37.000Z
2021-11-21T17:22:37.000Z
import torch import torch.nn as nn import torch.nn.functional as F from functools import reduce from operator import mul import math import models.utils as utils import pdb #class BaseCNN(nn.Module) #CNN -> 3 layer CNN, linear transform to hidden, step through gru for new hidden #return -> linear pass through criti...
30.428571
101
0.615545
import torch import torch.nn as nn import torch.nn.functional as F from functools import reduce from operator import mul import math import models.utils as utils import pdb #class BaseCNN(nn.Module) #CNN -> 3 layer CNN, linear transform to hidden, step through gru for new hidden #return -> linear pass through criti...
1,044
4
76
559d08b64484e8af7ffc4bd56cee7469461b9cbe
28
py
Python
python/events/lib/python3.4/stat.py
classmember/proof_of_concept
da284ca57806f7c05c1b39bebfe0d681db2260fc
[ "MIT" ]
null
null
null
python/events/lib/python3.4/stat.py
classmember/proof_of_concept
da284ca57806f7c05c1b39bebfe0d681db2260fc
[ "MIT" ]
3
2020-06-05T23:21:54.000Z
2021-06-10T22:02:26.000Z
python/events/lib/python3.4/stat.py
classmember/proof_of_concept
da284ca57806f7c05c1b39bebfe0d681db2260fc
[ "MIT" ]
null
null
null
/usr/lib64/python3.4/stat.py
28
28
0.785714
/usr/lib64/python3.4/stat.py
0
0
0
149133f641bf8fcb0f289d4dd1126fbb6e7f7437
2,746
py
Python
ayb/net/http.py
msolo/ayb
3bb804846033cc0b054f06c2e6298131d22d49f2
[ "BSD-3-Clause" ]
null
null
null
ayb/net/http.py
msolo/ayb
3bb804846033cc0b054f06c2e6298131d22d49f2
[ "BSD-3-Clause" ]
null
null
null
ayb/net/http.py
msolo/ayb
3bb804846033cc0b054f06c2e6298131d22d49f2
[ "BSD-3-Clause" ]
null
null
null
import asynchat import asyncore import os import socket import string import sys import StringIO import mimetools ROOT = "." PORT = 8000 # a producer which reads data from a file object if __name__ == '__main__': s = HTTPServer(PORT) print "serving at port", PORT asyncore.loop()
25.425926
67
0.630736
import asynchat import asyncore import os import socket import string import sys import StringIO import mimetools ROOT = "." PORT = 8000 class HTTPChannel(asynchat.async_chat): def __init__(self, server, sock, addr): asynchat.async_chat.__init__(self, sock) self.server = server self.set_terminator("\r\n...
2,127
33
293
463ee74f64e620cdfe37fec339f3b7b10bf7f572
79,029
py
Python
src/opserver/alarmgen.py
Mirantis/contrail-controller
6a8ce71bde9f30e14241027dc89fcd9ca6ac0673
[ "Apache-2.0" ]
3
2019-01-11T06:16:40.000Z
2021-02-24T23:48:21.000Z
src/opserver/alarmgen.py
Mirantis/contrail-controller
6a8ce71bde9f30e14241027dc89fcd9ca6ac0673
[ "Apache-2.0" ]
null
null
null
src/opserver/alarmgen.py
Mirantis/contrail-controller
6a8ce71bde9f30e14241027dc89fcd9ca6ac0673
[ "Apache-2.0" ]
2
2019-02-06T12:52:00.000Z
2019-04-11T23:19:28.000Z
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # # # Opserver # # Operational State Server for VNC # from gevent import monkey monkey.patch_all() import sys import json import socket import time import copy import traceback import signal import logging logging.getLogger('kafka').addHandler(logging...
42.126333
94
0.533513
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # # # Opserver # # Operational State Server for VNC # from gevent import monkey monkey.patch_all() import sys import json import socket import time import copy import traceback import signal import logging logging.getLogger('kafka').addHandler(logging...
30,591
44,798
611
132ce39687d67b406da9092611bcd5bbfe58fde7
7,662
py
Python
_doc/examples/plot_op_reducesumsquare.py
henrywu2019/mlprodict
4c09dc39d5ba7a7235fa321d80c81b5bf4f078ad
[ "MIT" ]
null
null
null
_doc/examples/plot_op_reducesumsquare.py
henrywu2019/mlprodict
4c09dc39d5ba7a7235fa321d80c81b5bf4f078ad
[ "MIT" ]
null
null
null
_doc/examples/plot_op_reducesumsquare.py
henrywu2019/mlprodict
4c09dc39d5ba7a7235fa321d80c81b5bf4f078ad
[ "MIT" ]
null
null
null
""" .. _l-b-reducesumsquare: Compares implementations of ReduceSumSquare =========================================== This example compares the *numpy* for the operator *ReduceSumSquare* to :epkg:`onnxruntime` implementation. If available, :epkg:`tensorflow` and :epkg:`pytorch` are included as well. .. contents:: ...
30.284585
83
0.539285
""" .. _l-b-reducesumsquare: Compares implementations of ReduceSumSquare =========================================== This example compares the *numpy* for the operator *ReduceSumSquare* to :epkg:`onnxruntime` implementation. If available, :epkg:`tensorflow` and :epkg:`pytorch` are included as well. .. contents:: ...
3,864
0
69
b08159c094d7db5f5f213e5dd6f6f4838e966eb9
804
py
Python
app.py
rap999a/flask-boiler-plate
b890af60451963fed9876e6bfbf181fb3411aa68
[ "MIT" ]
null
null
null
app.py
rap999a/flask-boiler-plate
b890af60451963fed9876e6bfbf181fb3411aa68
[ "MIT" ]
1
2021-04-30T20:39:57.000Z
2021-04-30T20:39:57.000Z
app.py
rohanpurekar/flask-boiler-plate
b890af60451963fed9876e6bfbf181fb3411aa68
[ "MIT" ]
null
null
null
from flask import Flask from flask_restful import Resource, Api from flask_jwt import JWT from flask_admin import Admin from resources.user import UserRegister from authentication.security import authenticate, identity import os app = Flask(__name__) app.config.from_object(os.environ['APP_SETTINGS']) app.config['SQLAL...
24.363636
58
0.762438
from flask import Flask from flask_restful import Resource, Api from flask_jwt import JWT from flask_admin import Admin from resources.user import UserRegister from authentication.security import authenticate, identity import os app = Flask(__name__) app.config.from_object(os.environ['APP_SETTINGS']) app.config['SQLAL...
37
0
22
5230fa08253b2d257a9ed7906735863e43e66ebc
2,296
py
Python
archive/EPSC_0.1.4_meantrace_test.py
ngglasgow/clamp_ephys
60f1f490837939a0afcf9cf5bdd123fb51546269
[ "MIT" ]
null
null
null
archive/EPSC_0.1.4_meantrace_test.py
ngglasgow/clamp_ephys
60f1f490837939a0afcf9cf5bdd123fb51546269
[ "MIT" ]
null
null
null
archive/EPSC_0.1.4_meantrace_test.py
ngglasgow/clamp_ephys
60f1f490837939a0afcf9cf5bdd123fb51546269
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created 5 March 2019 epsc_peak_x.y.z.py """ # from __main__ import * import pandas as pd import numpy as np import matplotlib.pyplot as plt import os from collections import OrderedDict import math import platform ''' ################## Define file structure on server ###################...
31.888889
89
0.716463
# -*- coding: utf-8 -*- """ Created 5 March 2019 epsc_peak_x.y.z.py """ # from __main__ import * import pandas as pd import numpy as np import matplotlib.pyplot as plt import os from collections import OrderedDict import math import platform ''' ################## Define file structure on server ###################...
0
0
0
099c7e6422958e06ac9e0c8a6c2fd876ea41de10
1,046
py
Python
Comic-Con and k-means/Conclusion/clustering.py
jetbrains-academy/Machine-Learning-101
7b583dbff1e90115296dcaeac78ca88363c158c9
[ "MIT" ]
null
null
null
Comic-Con and k-means/Conclusion/clustering.py
jetbrains-academy/Machine-Learning-101
7b583dbff1e90115296dcaeac78ca88363c158c9
[ "MIT" ]
10
2021-11-22T16:51:52.000Z
2022-02-14T12:57:57.000Z
Comic-Con and k-means/K-means/clustering.py
jetbrains-academy/Machine-Learning-101
7b583dbff1e90115296dcaeac78ca88363c158c9
[ "MIT" ]
null
null
null
import numpy as np
34.866667
76
0.636711
import numpy as np def init_clusters(n_clusters, n_features): return np.random.randint(low=0, high=255, size=(n_clusters, n_features)) def k_means(X, n_clusters, distance_metric): n_samples, n_features = X.shape classification = np.zeros(n_samples) clusters = init_clusters(n_clusters, n_features) ...
979
0
46
bf00d403382e030cc46b58d47977163aa1d687ce
1,407
py
Python
InterviewBit/LinkedList/list_cycle.py
codervikash/online-courses
a60efad23af65080a98e7dd038fb2c750237b781
[ "MIT" ]
null
null
null
InterviewBit/LinkedList/list_cycle.py
codervikash/online-courses
a60efad23af65080a98e7dd038fb2c750237b781
[ "MIT" ]
null
null
null
InterviewBit/LinkedList/list_cycle.py
codervikash/online-courses
a60efad23af65080a98e7dd038fb2c750237b781
[ "MIT" ]
null
null
null
""" Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Try solving it using constant additional space. Example : Input : ______ | | \/ | 1 -> 2 -> 3 -> 4 Return the node corresponding to node 3. """ # D...
23.065574
95
0.464819
""" Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Try solving it using constant additional space. Example : Input : ______ | | \/ | 1 -> 2 -> 3 -> 4 Return the node corresponding to node 3. """ # D...
810
-6
49
4ea0fcdd48cc727932565635a0f08f4f04e83935
7,941
py
Python
telecom_churn.py
SeyVu/subscription_renewal
9f4ba491ddd3ea1c2c5ce772ae3260a0daf4cbac
[ "MIT" ]
null
null
null
telecom_churn.py
SeyVu/subscription_renewal
9f4ba491ddd3ea1c2c5ce772ae3260a0daf4cbac
[ "MIT" ]
null
null
null
telecom_churn.py
SeyVu/subscription_renewal
9f4ba491ddd3ea1c2c5ce772ae3260a0daf4cbac
[ "MIT" ]
null
null
null
######################################################################################################### # Description: Main file for telecom_churn dataset. Key function is to transform dataset into needed # input_features and output ###################################################################################...
38.362319
119
0.607228
######################################################################################################### # Description: Main file for telecom_churn dataset. Key function is to transform dataset into needed # input_features and output ###################################################################################...
2,640
0
23
cf5c6f564200785c67648ea25d18d53173b1b69d
1,939
py
Python
tests/test_decorators/test_refresh_jwt_required.py
neruyzo/Sanic-JWT-Extended
03983bf2a73719bad57664a4395556dc8e8b4c66
[ "MIT" ]
null
null
null
tests/test_decorators/test_refresh_jwt_required.py
neruyzo/Sanic-JWT-Extended
03983bf2a73719bad57664a4395556dc8e8b4c66
[ "MIT" ]
null
null
null
tests/test_decorators/test_refresh_jwt_required.py
neruyzo/Sanic-JWT-Extended
03983bf2a73719bad57664a4395556dc8e8b4c66
[ "MIT" ]
null
null
null
import uuid import pytest from sanic import Sanic from sanic.response import json from sanic.websocket import WebSocketProtocol from sanic_jwt_extended.decorators import refresh_jwt_required from sanic_jwt_extended.jwt_manager import JWT from tests.utils import DunnoValue @pytest.fixture @pytest.fixture
28.101449
103
0.689015
import uuid import pytest from sanic import Sanic from sanic.response import json from sanic.websocket import WebSocketProtocol from sanic_jwt_extended.decorators import refresh_jwt_required from sanic_jwt_extended.jwt_manager import JWT from tests.utils import DunnoValue @pytest.fixture def app(): app = Sanic(...
1,536
0
90
f2ac9bf80d74555d2b7ecabbf4ee7a55781a4aba
58
py
Python
src/z3c/autoinclude/__init__.py
datakurre/z3c.autoinclude
5e42815357d97d2704bff61f3eb7ed2ddc891907
[ "ZPL-2.1" ]
null
null
null
src/z3c/autoinclude/__init__.py
datakurre/z3c.autoinclude
5e42815357d97d2704bff61f3eb7ed2ddc891907
[ "ZPL-2.1" ]
null
null
null
src/z3c/autoinclude/__init__.py
datakurre/z3c.autoinclude
5e42815357d97d2704bff61f3eb7ed2ddc891907
[ "ZPL-2.1" ]
null
null
null
# from z3c.autoinclude.dependency import package_includes
19.333333
55
0.862069
# from z3c.autoinclude.dependency import package_includes
0
0
0
4df055ff85ede7577ef2b8c7326df4cc292513f7
959
py
Python
tests/test_migrator/test_migrator.py
wemake-services/django-test-migrations
2ff83cc9c985a3ea17ebe17f9a57a5cbbc1eb5f7
[ "MIT" ]
294
2019-11-21T16:43:42.000Z
2022-03-31T04:41:23.000Z
tests/test_migrator/test_migrator.py
ktaranov/django-test-migrations
b53da248e702503c4687694f5cf5216ec091f658
[ "MIT" ]
252
2019-11-21T15:07:31.000Z
2022-03-30T07:47:41.000Z
tests/test_migrator/test_migrator.py
ktaranov/django-test-migrations
b53da248e702503c4687694f5cf5216ec091f658
[ "MIT" ]
27
2020-01-26T11:41:50.000Z
2021-12-13T08:30:18.000Z
import pytest from django.db.migrations.state import ProjectState from django_test_migrations.migrator import Migrator @pytest.mark.django_db() def test_migrator(transactional_db): """We only need this test for coverage.""" migrator = Migrator() old_state = migrator.apply_initial_migration(('main_app', N...
33.068966
79
0.752868
import pytest from django.db.migrations.state import ProjectState from django_test_migrations.migrator import Migrator @pytest.mark.django_db() def test_migrator(transactional_db): """We only need this test for coverage.""" migrator = Migrator() old_state = migrator.apply_initial_migration(('main_app', N...
0
0
0
d79af23ad1cdcab09d02fdccb160a6005c9fb86c
188
py
Python
lox/__init__.py
ehomrich/lox
a954d2362974b8f2cc9b6b34c48c9fc3b9357aa1
[ "MIT" ]
3
2020-12-11T15:39:10.000Z
2022-02-27T09:35:44.000Z
lox/__init__.py
ehomrich/lox
a954d2362974b8f2cc9b6b34c48c9fc3b9357aa1
[ "MIT" ]
null
null
null
lox/__init__.py
ehomrich/lox
a954d2362974b8f2cc9b6b34c48c9fc3b9357aa1
[ "MIT" ]
null
null
null
from lox.ast_printer import AstPrinter from lox.lox import Lox from lox.parser import Parser, ParseError from lox.scanner import Scanner from lox import expressions from lox import tokens
26.857143
41
0.840426
from lox.ast_printer import AstPrinter from lox.lox import Lox from lox.parser import Parser, ParseError from lox.scanner import Scanner from lox import expressions from lox import tokens
0
0
0
4e3fca3bb397aea2e4bcb9c38fa2734dd6b246b8
1,713
py
Python
test/test_relic_density.py
LoganAMorrison/Hazma
e9612729767ff48d5ce50633393f81ee021242d2
[ "MIT" ]
6
2019-07-30T18:14:43.000Z
2020-10-25T04:58:44.000Z
test/test_relic_density.py
LoganAMorrison/Hazma
e9612729767ff48d5ce50633393f81ee021242d2
[ "MIT" ]
8
2017-12-19T08:06:59.000Z
2021-04-22T02:15:26.000Z
test/test_relic_density.py
LoganAMorrison/Hazma
e9612729767ff48d5ce50633393f81ee021242d2
[ "MIT" ]
1
2020-04-01T11:08:49.000Z
2020-04-01T11:08:49.000Z
import unittest from numpy.testing import assert_allclose import warnings from hazma.parameters import omega_h2_cdm from hazma.relic_density import relic_density import unittest warnings.filterwarnings("ignore")
30.052632
74
0.642148
import unittest from numpy.testing import assert_allclose import warnings from hazma.parameters import omega_h2_cdm from hazma.relic_density import relic_density import unittest warnings.filterwarnings("ignore") class ToyModel(object): def __init__(self, mx, sigmav): self.mx = mx self.sigmav = si...
957
442
99
f91f6d45c3926b76a73c012722f66b8a8ee35a6b
1,608
py
Python
ffmpeg_chainsaw/helpers.py
dedayoa/ffmpeg-chainsaw
67a8d944ff7dde6c3a46a3ff4097d485361bfc54
[ "MIT" ]
null
null
null
ffmpeg_chainsaw/helpers.py
dedayoa/ffmpeg-chainsaw
67a8d944ff7dde6c3a46a3ff4097d485361bfc54
[ "MIT" ]
null
null
null
ffmpeg_chainsaw/helpers.py
dedayoa/ffmpeg-chainsaw
67a8d944ff7dde6c3a46a3ff4097d485361bfc54
[ "MIT" ]
null
null
null
import functools import threading import logging import requests import datetime from requests.models import HTTPBasicAuth logger = logging.getLogger(__name__) def thread_it(func): """A wrapper function to run func in a daemon thread. Args: func (function): The function to run in a thread Retu...
29.236364
106
0.641791
import functools import threading import logging import requests import datetime from requests.models import HTTPBasicAuth logger = logging.getLogger(__name__) def thread_it(func): """A wrapper function to run func in a daemon thread. Args: func (function): The function to run in a thread Retu...
190
0
26
261f6d88c07b7fca09f051f1968bedd8b6dee939
699
py
Python
crawler/spider.py
pugong/microblog
cb93214de99528370718877ea9f09f041f64a0a4
[ "BSD-3-Clause" ]
null
null
null
crawler/spider.py
pugong/microblog
cb93214de99528370718877ea9f09f041f64a0a4
[ "BSD-3-Clause" ]
null
null
null
crawler/spider.py
pugong/microblog
cb93214de99528370718877ea9f09f041f64a0a4
[ "BSD-3-Clause" ]
null
null
null
from urllib2 import Request, urlopen, URLError, HTTPError #samplefirst() samplesecond()
22.548387
62
0.613734
from urllib2 import Request, urlopen, URLError, HTTPError def samplefirst(): try: response = urllib2.urlopen('http://www.alibaidu.com/') html = response.read() print html except HTTPError, e: print 'The server couldn\'t fulfill the request.' print 'Error code: ', e.co...
559
0
46
bb55972f93684b5b860de75bb6e972111c196aae
11,799
py
Python
deepfake_photo/MAC/detect_deepfake_photos.py
saraferreirascf/Deep-fake-detector
423f7c985481c007226d7f1acd8d48d593b724bb
[ "MIT" ]
2
2021-06-28T12:47:29.000Z
2021-12-11T13:20:43.000Z
deepfake_photo/MAC/detect_deepfake_photos.py
saraferreirascf/Deep-fake-detector
423f7c985481c007226d7f1acd8d48d593b724bb
[ "MIT" ]
null
null
null
deepfake_photo/MAC/detect_deepfake_photos.py
saraferreirascf/Deep-fake-detector
423f7c985481c007226d7f1acd8d48d593b724bb
[ "MIT" ]
1
2021-05-29T04:04:28.000Z
2021-05-29T04:04:28.000Z
# Contact: sara.ferreira <at> fc [dot] up [dot] pt # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either in source code form or as a compiled # binary, for any purpose, commercial or non-commerci...
43.7
170
0.682092
# Contact: sara.ferreira <at> fc [dot] up [dot] pt # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either in source code form or as a compiled # binary, for any purpose, commercial or non-commerci...
7,477
1,389
44
9f4fe0c4f3a5ac9ce68a404275e9cc1e94d8a418
19,124
py
Python
tests/kind_test.py
globocom/globomap-loader-napi
a3621e1396c14730d131315ae50ce2d7c1228765
[ "Apache-2.0" ]
3
2017-08-31T13:35:49.000Z
2019-07-11T11:37:21.000Z
tests/kind_test.py
globocom/globomap-loader-napi
a3621e1396c14730d131315ae50ce2d7c1228765
[ "Apache-2.0" ]
4
2017-09-06T22:34:49.000Z
2019-07-11T12:33:12.000Z
tests/kind_test.py
globocom/globomap-loader-napi
a3621e1396c14730d131315ae50ce2d7c1228765
[ "Apache-2.0" ]
2
2017-09-06T20:46:33.000Z
2019-07-11T12:12:38.000Z
""" Copyright 2018 Globo.com 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 writ...
32.304054
93
0.624294
""" Copyright 2018 Globo.com 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 writ...
16,377
1,968
23
4895b70f956d363402340ee469b68b88d774cf31
2,972
py
Python
openregistry/lots/loki/tests/lot.py
ivanka-jakimchuk/openregistry.lots.loki
e865e8833ffac67b1af14a34398f2ffdb1283799
[ "Apache-2.0" ]
null
null
null
openregistry/lots/loki/tests/lot.py
ivanka-jakimchuk/openregistry.lots.loki
e865e8833ffac67b1af14a34398f2ffdb1283799
[ "Apache-2.0" ]
null
null
null
openregistry/lots/loki/tests/lot.py
ivanka-jakimchuk/openregistry.lots.loki
e865e8833ffac67b1af14a34398f2ffdb1283799
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import os import unittest from openregistry.lots.core.tests.base import BaseWebTest, snitch from openregistry.lots.core.tests.blanks.mixins import ResourceTestMixin from openregistry.lots.loki.tests.base import ( BaseLotWebTest ) from openregistry.lots.loki.tests.json_data import test_loki_...
35.807229
82
0.805182
# -*- coding: utf-8 -*- import os import unittest from openregistry.lots.core.tests.base import BaseWebTest, snitch from openregistry.lots.core.tests.blanks.mixins import ResourceTestMixin from openregistry.lots.loki.tests.base import ( BaseLotWebTest ) from openregistry.lots.loki.tests.json_data import test_loki_...
143
1,648
69
9e632f7417b5af07d180667e55b501d267892ba8
431
py
Python
codes/Ex022.py
BelfortJoao/Curso-phyton01
79376233be228f39bf548f90b8d9bd5419ac067a
[ "MIT" ]
3
2021-08-17T14:02:14.000Z
2021-08-19T02:37:30.000Z
codes/Ex022.py
BelfortJoao/Curso-phyton01
79376233be228f39bf548f90b8d9bd5419ac067a
[ "MIT" ]
null
null
null
codes/Ex022.py
BelfortJoao/Curso-phyton01
79376233be228f39bf548f90b8d9bd5419ac067a
[ "MIT" ]
null
null
null
print('Bem vindo ao analisador de nomes') print('--------------------------------') Nom = input('Qual seu nome? ') print('________________________________') print('Seu nome em maiusculo ficaria {}'.format(Nom.upper())) print('Seu nome em minusculo ficaria {}'.format(Nom.lower())) Nomd = Nom.split() print('Seu primeiro ...
43.1
68
0.651972
print('Bem vindo ao analisador de nomes') print('--------------------------------') Nom = input('Qual seu nome? ') print('________________________________') print('Seu nome em maiusculo ficaria {}'.format(Nom.upper())) print('Seu nome em minusculo ficaria {}'.format(Nom.lower())) Nomd = Nom.split() print('Seu primeiro ...
0
0
0
edec5c7aed9bf59e6a891c037f5beb5dcbb7e264
67
py
Python
colorizer/__init__.py
danbradham/colorizer
0071f7fdfa3d88e024103e585c8c194877176c8f
[ "MIT" ]
2
2020-03-26T14:37:42.000Z
2020-06-20T23:04:52.000Z
colorizer/__init__.py
danbradham/colorizer
0071f7fdfa3d88e024103e585c8c194877176c8f
[ "MIT" ]
null
null
null
colorizer/__init__.py
danbradham/colorizer
0071f7fdfa3d88e024103e585c8c194877176c8f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from .api import * from . import ui, util
13.4
23
0.58209
# -*- coding: utf-8 -*- from .api import * from . import ui, util
0
0
0
8b8731dafe7fb93abe62f798241d9618688c15b1
5,015
py
Python
app/run.py
HectorMontes10/PropertiesPriceApp
4a38061a914d508f9465959af6fe1cb62fa04e06
[ "MIT" ]
null
null
null
app/run.py
HectorMontes10/PropertiesPriceApp
4a38061a914d508f9465959af6fe1cb62fa04e06
[ "MIT" ]
null
null
null
app/run.py
HectorMontes10/PropertiesPriceApp
4a38061a914d508f9465959af6fe1cb62fa04e06
[ "MIT" ]
null
null
null
import json import plotly import pandas as pd from flask import Flask from flask import render_template, request, jsonify from plotly.graph_objs import Bar from sqlalchemy import create_engine import joblib import plotly.graph_objs as go_ from flask import current_app, flash, jsonify, make_response, redirect, request, ...
33.657718
119
0.673579
import json import plotly import pandas as pd from flask import Flask from flask import render_template, request, jsonify from plotly.graph_objs import Bar from sqlalchemy import create_engine import joblib import plotly.graph_objs as go_ from flask import current_app, flash, jsonify, make_response, redirect, request, ...
2,846
0
177
b5995dc82f79c55950a995af453f892c17f2e0d4
2,395
py
Python
35_Arac_Hizi_Hesaplama.py
omerkocadayi/Python_Goruntu_Isleme
4a13d2b2343a51b3af292996d0c6884a102503a9
[ "MIT" ]
15
2019-08-02T12:56:40.000Z
2022-03-17T13:00:25.000Z
35_Arac_Hizi_Hesaplama.py
omerkocadayi/Python_Goruntu_Isleme
4a13d2b2343a51b3af292996d0c6884a102503a9
[ "MIT" ]
3
2020-12-09T02:40:25.000Z
2021-11-01T12:44:09.000Z
35_Arac_Hizi_Hesaplama.py
omerkocadayi/Python_Goruntu_Isleme
4a13d2b2343a51b3af292996d0c6884a102503a9
[ "MIT" ]
4
2021-02-27T11:41:06.000Z
2021-12-21T18:03:00.000Z
""" -*- coding: utf-8 -*- @author: omerkocadayi https://github.com/omerkocadayi https://www.linkedin.com/in/omerkocadayi/ """ import cv2 import time vid = cv2.VideoCapture("cars.mp4") carCascade = cv2.CascadeClassifier("haarcascade/car1.xml") crd = [[620,220],[740,220],[580,500],[815,500]] d...
39.262295
146
0.455115
""" -*- coding: utf-8 -*- @author: omerkocadayi https://github.com/omerkocadayi https://www.linkedin.com/in/omerkocadayi/ """ import cv2 import time vid = cv2.VideoCapture("cars.mp4") carCascade = cv2.CascadeClassifier("haarcascade/car1.xml") crd = [[620,220],[740,220],[580,500],[815,500]] d...
0
0
0
fc7e76bb9454b1190e01d039822faddac1ed0b87
21,436
py
Python
cumm/conv/main_real.py
FindDefinition/cumm
3d58e85b660afa05c20514afe65b8aa3a4995953
[ "Apache-2.0" ]
20
2021-10-13T03:41:59.000Z
2022-03-31T07:23:14.000Z
cumm/conv/main_real.py
FindDefinition/cumm
3d58e85b660afa05c20514afe65b8aa3a4995953
[ "Apache-2.0" ]
3
2021-11-21T11:25:55.000Z
2022-03-08T06:12:35.000Z
cumm/conv/main_real.py
FindDefinition/cumm
3d58e85b660afa05c20514afe65b8aa3a4995953
[ "Apache-2.0" ]
4
2021-10-13T03:42:01.000Z
2022-03-21T13:07:56.000Z
# Copyright 2021 Yan Yan # # 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...
41.542636
96
0.54903
# Copyright 2021 Yan Yan # # 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...
20,052
0
46
5b9847c07ed4ebe23b84072699226c55aa07bb96
41
py
Python
aroma/cli/__init__.py
oesteban/aroma
3c077ecef03cd44fb2d50d7dbabb37d295afb459
[ "Apache-2.0" ]
5
2021-08-31T17:36:59.000Z
2021-12-13T04:51:56.000Z
aroma/cli/__init__.py
oesteban/aroma
3c077ecef03cd44fb2d50d7dbabb37d295afb459
[ "Apache-2.0" ]
44
2020-09-28T18:27:29.000Z
2020-12-22T21:16:22.000Z
aroma/cli/__init__.py
oesteban/aroma
3c077ecef03cd44fb2d50d7dbabb37d295afb459
[ "Apache-2.0" ]
6
2021-02-09T22:39:43.000Z
2021-12-08T15:13:17.000Z
"""Command-line interfaces for AROMA."""
20.5
40
0.707317
"""Command-line interfaces for AROMA."""
0
0
0
8a34dab3d2d6bcc227e7940bf689a8ad37755cea
878
py
Python
coding patterns/dynamic programming/longest_common_substring/max_sum_inc_subsequence_bottomUpTabu.py
mkoryor/Python
837ec4c03130dc4cb919fb5f1eeb4d31206790e4
[ "Unlicense" ]
null
null
null
coding patterns/dynamic programming/longest_common_substring/max_sum_inc_subsequence_bottomUpTabu.py
mkoryor/Python
837ec4c03130dc4cb919fb5f1eeb4d31206790e4
[ "Unlicense" ]
null
null
null
coding patterns/dynamic programming/longest_common_substring/max_sum_inc_subsequence_bottomUpTabu.py
mkoryor/Python
837ec4c03130dc4cb919fb5f1eeb4d31206790e4
[ "Unlicense" ]
null
null
null
""" Given a number sequence, find the increasing subsequence with the highest sum. Write a method that returns the highest sum. Example 1: Input: {4,1,2,6,10,1,12} Output: 32 Explanation: The increaseing sequence is {4,6,10,12}. Please note the difference, as the LIS is {1,2,6,10,12} which has a sum of '31'. Exa...
18.291667
80
0.604784
""" Given a number sequence, find the increasing subsequence with the highest sum. Write a method that returns the highest sum. Example 1: Input: {4,1,2,6,10,1,12} Output: 32 Explanation: The increaseing sequence is {4,6,10,12}. Please note the difference, as the LIS is {1,2,6,10,12} which has a sum of '31'. Exa...
360
0
45
fce55d5d083da6d0c2d6034db3f36f6dc764f0f9
2,790
py
Python
brac/scripts/train_bc.py
Thibaud-Ardoin/d4rl_evaluations
135b23d3aecc234aacaeaaa019fbc7101d9b87ec
[ "Apache-2.0" ]
123
2020-07-02T02:42:06.000Z
2022-03-31T11:44:30.000Z
brac/scripts/train_bc.py
junmokane/AI602_Project
59c132ae04751f9fb6cf6ebb491042cbf4de003d
[ "Apache-2.0" ]
24
2020-06-29T19:52:07.000Z
2022-02-10T02:07:17.000Z
brac/scripts/train_bc.py
junmokane/AI602_Project
59c132ae04751f9fb6cf6ebb491042cbf4de003d
[ "Apache-2.0" ]
24
2020-07-03T12:28:49.000Z
2022-03-24T04:44:49.000Z
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
30.659341
80
0.729749
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
665
0
23
9917f123c2f2228408c4cc5b6deedc8bc26d2346
286
py
Python
wk/web/applications/knowledge_platform/utils.py
Peiiii/wk
dcf948c1cb36c1eec9b2a554ea0296c6d3dbbdc4
[ "MIT" ]
null
null
null
wk/web/applications/knowledge_platform/utils.py
Peiiii/wk
dcf948c1cb36c1eec9b2a554ea0296c6d3dbbdc4
[ "MIT" ]
null
null
null
wk/web/applications/knowledge_platform/utils.py
Peiiii/wk
dcf948c1cb36c1eec9b2a554ea0296c6d3dbbdc4
[ "MIT" ]
null
null
null
import jieba from wk import string_utils as TU
40.857143
112
0.762238
import jieba from wk import string_utils as TU def get_keywords(text): keywords = list(jieba.cut_for_search(text)) keywords = list(filter(lambda word: TU.is_all_chinese(word) or TU.is_all_alphabet_or_digit(word), keywords)) keywords = list(set(keywords)) return keywords
218
0
22
7ca75fb91f67e7bea901ef23cdc663dbf6cea978
826
py
Python
apps/modules/message/apis/send_msg.py
Bension/osroom
59148fbaf6068dd700a7f9dfb8e8a6882c2a5e67
[ "BSD-2-Clause" ]
579
2017-11-29T15:34:14.000Z
2022-03-28T13:23:53.000Z
apps/modules/message/apis/send_msg.py
Bension/osroom
59148fbaf6068dd700a7f9dfb8e8a6882c2a5e67
[ "BSD-2-Clause" ]
50
2017-07-26T16:44:01.000Z
2022-01-13T00:42:09.000Z
apps/modules/message/apis/send_msg.py
Bension/osroom
59148fbaf6068dd700a7f9dfb8e8a6882c2a5e67
[ "BSD-2-Clause" ]
238
2018-05-19T17:31:19.000Z
2022-01-09T08:19:04.000Z
#!/usr/bin/env python # -*-coding:utf-8-*- # @Time : 2017/11/1 ~ 2019/9/1 # @Author : Allen Woo from apps.core.flask.login_manager import osr_login_required from apps.core.blueprint import api from apps.core.flask.permission import permission_required from apps.core.flask.response import response_format from apps.modul...
29.5
95
0.687651
#!/usr/bin/env python # -*-coding:utf-8-*- # @Time : 2017/11/1 ~ 2019/9/1 # @Author : Allen Woo from apps.core.flask.login_manager import osr_login_required from apps.core.blueprint import api from apps.core.flask.permission import permission_required from apps.core.flask.response import response_format from apps.modul...
0
0
0
70a9f42953c68280009495c8a3970739bbc6452f
12,653
py
Python
library/nosecone/standard_nosecones.py
summerswallow/open-rocketry-tools
981c3f0cd16aac142e8bc9e57fc86151ce864a7c
[ "MIT" ]
null
null
null
library/nosecone/standard_nosecones.py
summerswallow/open-rocketry-tools
981c3f0cd16aac142e8bc9e57fc86151ce864a7c
[ "MIT" ]
null
null
null
library/nosecone/standard_nosecones.py
summerswallow/open-rocketry-tools
981c3f0cd16aac142e8bc9e57fc86151ce864a7c
[ "MIT" ]
null
null
null
# ================== # # nosecone_threaded_bases.py # # License: https://github.com/summerswallow/open-rocketry/blob/master/LICENSE # (c) 2018 Summer Swallow Consulting # # ================== from math import sqrt, atan, acos, cos, sin, fabs, pi import os from solid import * from solid.utils import up, down, left, ...
44.868794
121
0.612345
# ================== # # nosecone_threaded_bases.py # # License: https://github.com/summerswallow/open-rocketry/blob/master/LICENSE # (c) 2018 Summer Swallow Consulting # # ================== from math import sqrt, atan, acos, cos, sin, fabs, pi import os from solid import * from solid.utils import up, down, left, ...
9,354
214
673
ef1c0f5e5ef5bdd88efa0121392093e214d2623c
43
py
Python
Book/chap3/Supporting Materials/randnCode.py
lorenghoh/pyman
9b4ddd52c5577fc85e2601ae3128f398f0eb673c
[ "CC0-1.0" ]
3
2020-04-30T19:50:11.000Z
2020-10-17T02:07:00.000Z
Book/chap3/Supporting Materials/randnCode.py
lorenghoh/pyman
9b4ddd52c5577fc85e2601ae3128f398f0eb673c
[ "CC0-1.0" ]
35
2020-04-21T04:25:31.000Z
2021-11-06T22:49:44.000Z
Book/chap3/Supporting Materials/randnCode.py
lorenghoh/pyman
9b4ddd52c5577fc85e2601ae3128f398f0eb673c
[ "CC0-1.0" ]
11
2020-04-21T04:33:48.000Z
2020-10-23T21:12:12.000Z
import numpy as np x = np.random.randn(20)
14.333333
23
0.72093
import numpy as np x = np.random.randn(20)
0
0
0
488990970db978049c5e47458a6fda21607531f9
181
py
Python
surrortg/inputs/__init__.py
IvarK/surrortg-sdk
c68940357c330c2ef8a8f92265f776b038d227a3
[ "MIT" ]
null
null
null
surrortg/inputs/__init__.py
IvarK/surrortg-sdk
c68940357c330c2ef8a8f92265f776b038d227a3
[ "MIT" ]
1
2021-04-10T11:59:23.000Z
2021-04-10T11:59:23.000Z
surrortg/inputs/__init__.py
IvarK/surrortg-sdk
c68940357c330c2ef8a8f92265f776b038d227a3
[ "MIT" ]
2
2021-01-28T17:43:13.000Z
2021-03-29T13:19:38.000Z
from .input import Input from .switch import Switch from .delayed_switch import DelayedSwitch from .joystick import Joystick, Directions from .linear_actuator import LinearActuator
30.166667
43
0.850829
from .input import Input from .switch import Switch from .delayed_switch import DelayedSwitch from .joystick import Joystick, Directions from .linear_actuator import LinearActuator
0
0
0
0fd71cc2dece817ec3c053c230f410cde9da93ad
299
py
Python
mcs/loc.py
MUzzell/UoR-msc-project
fac83bb0ebbdd3839530c6df0493deff3475fff5
[ "MIT" ]
null
null
null
mcs/loc.py
MUzzell/UoR-msc-project
fac83bb0ebbdd3839530c6df0493deff3475fff5
[ "MIT" ]
null
null
null
mcs/loc.py
MUzzell/UoR-msc-project
fac83bb0ebbdd3839530c6df0493deff3475fff5
[ "MIT" ]
null
null
null
import numpy as np import math from .util import add_column from . import global_val as gv
16.611111
42
0.618729
import numpy as np import math from .util import add_column from . import global_val as gv def chkloc(x, nloc): for k in range(nloc): if x == gv.xloc[:, k]: return False return True def addloc(x, nloc): gv.xloc = add_column(gv.xloc, nloc, x) return nloc + 1
160
0
46
5600ac25a4ecf53939067e76e6b9cbab6e411eb7
73
py
Python
apps/account/views.py
sssunda/flask-jwt-auth
12c91ea5668926292e67a7dea722873851423ce6
[ "MIT" ]
1
2020-01-29T15:29:58.000Z
2020-01-29T15:29:58.000Z
apps/account/views.py
sssunda/flask-jwt-auth
12c91ea5668926292e67a7dea722873851423ce6
[ "MIT" ]
null
null
null
apps/account/views.py
sssunda/flask-jwt-auth
12c91ea5668926292e67a7dea722873851423ce6
[ "MIT" ]
null
null
null
# Third Party Module Import from flask_restplus import Api api = Api()
12.166667
30
0.753425
# Third Party Module Import from flask_restplus import Api api = Api()
0
0
0
12d445805ddef917b30b4c1291d0d723b55f0e25
7,935
py
Python
torch_datasets/datasets/convert.py
mingruimingrui/torch-datasets
2640b8c4fa82156e68e617fc545a546b4e08dc4e
[ "MIT" ]
null
null
null
torch_datasets/datasets/convert.py
mingruimingrui/torch-datasets
2640b8c4fa82156e68e617fc545a546b4e08dc4e
[ "MIT" ]
null
null
null
torch_datasets/datasets/convert.py
mingruimingrui/torch-datasets
2640b8c4fa82156e68e617fc545a546b4e08dc4e
[ "MIT" ]
null
null
null
""" Collection of functions to transform popular datasets into torch_dataset Datasets """ import os import tqdm import json from scipy.io import loadmat from .detection_dataset import DetectionDataset from .siamese_dataset import SiameseDataset def convert_coco_to_detection_dataset(coco_ann_file, root_image_dir, no...
36.736111
102
0.63201
""" Collection of functions to transform popular datasets into torch_dataset Datasets """ import os import tqdm import json from scipy.io import loadmat from .detection_dataset import DetectionDataset from .siamese_dataset import SiameseDataset def convert_coco_to_detection_dataset(coco_ann_file, root_image_dir, no...
0
0
0
d8304e3ad3f39daa11dc4f742e61518c19e8fd22
5,090
py
Python
toy_problem.py
Janna112358/pta-nullstreams
323403642f4f5c6b618782e422469a18c783b0e5
[ "MIT" ]
null
null
null
toy_problem.py
Janna112358/pta-nullstreams
323403642f4f5c6b618782e422469a18c783b0e5
[ "MIT" ]
null
null
null
toy_problem.py
Janna112358/pta-nullstreams
323403642f4f5c6b618782e422469a18c783b0e5
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jan 11 15:49:12 2019 @author: jgoldstein inspace toy problem """ import numpy as np import matplotlib.pyplot as plt from scipy.signal import periodogram from inspace.interpolation import get_target_times, sinc_interpolation from inspace.gp_george impo...
40.07874
98
0.664833
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jan 11 15:49:12 2019 @author: jgoldstein inspace toy problem """ import numpy as np import matplotlib.pyplot as plt from scipy.signal import periodogram from inspace.interpolation import get_target_times, sinc_interpolation from inspace.gp_george impo...
3,298
0
69
d3bd58cf9d007264ac0f41fd3b302cca6c4891ce
2,476
py
Python
ga-es_dist/es_distributed/algos/algo.py
MUzzell/UoR-msc-project
fac83bb0ebbdd3839530c6df0493deff3475fff5
[ "MIT" ]
null
null
null
ga-es_dist/es_distributed/algos/algo.py
MUzzell/UoR-msc-project
fac83bb0ebbdd3839530c6df0493deff3475fff5
[ "MIT" ]
null
null
null
ga-es_dist/es_distributed/algos/algo.py
MUzzell/UoR-msc-project
fac83bb0ebbdd3839530c6df0493deff3475fff5
[ "MIT" ]
null
null
null
import sys import logging import gym import h5py from es_distributed import tf_util from es_distributed.policies import policies from es_distributed.atari_wrappers import wrap_deepmind from .common import RunningStat, SharedNoiseTable log = logging.getLogger(__name__)
29.831325
102
0.664378
import sys import logging import gym import h5py from es_distributed import tf_util from es_distributed.policies import policies from es_distributed.atari_wrappers import wrap_deepmind from .common import RunningStat, SharedNoiseTable log = logging.getLogger(__name__) def build_env(env_id): gym.undo_logger_setu...
1,888
201
115
7f3ae5bbd070ed3d885337f64b0d5cb227a4a8ed
3,530
py
Python
lib/pytracking/ltr/models/bbreg/atom.py
ngunnar/tracking_reg
71a1d22e53e277f36f961040f03e56efb163ded5
[ "MIT" ]
12
2021-07-27T07:18:24.000Z
2022-03-09T13:52:20.000Z
ltr/models/bbreg/atom.py
tsingqguo/AttackTracker
054268d5afa0044675c7acf1ac13e621f1c9549e
[ "Apache-2.0" ]
2
2021-08-03T09:21:33.000Z
2021-12-29T14:25:30.000Z
ltr/models/bbreg/atom.py
tsingqguo/AttackTracker
054268d5afa0044675c7acf1ac13e621f1c9549e
[ "Apache-2.0" ]
3
2021-11-18T14:46:40.000Z
2022-01-03T15:47:23.000Z
import torch.nn as nn import ltr.models.backbone as backbones import ltr.models.bbreg as bbmodels from ltr import model_constructor class ATOMnet(nn.Module): """ ATOM network module""" def __init__(self, feature_extractor, bb_regressor, bb_regressor_layer, extractor_grad=True): """ args: ...
41.046512
124
0.690368
import torch.nn as nn import ltr.models.backbone as backbones import ltr.models.bbreg as bbmodels from ltr import model_constructor class ATOMnet(nn.Module): """ ATOM network module""" def __init__(self, feature_extractor, bb_regressor, bb_regressor_layer, extractor_grad=True): """ args: ...
1,175
0
98
2505b1df72aead6dfc3642e99095a97e3c6f7e4a
1,226
py
Python
src/dm/run.py
must-11/ap_experiment
50af0e239bfbd4e3b02c8a23fe1b110601715952
[ "MIT" ]
null
null
null
src/dm/run.py
must-11/ap_experiment
50af0e239bfbd4e3b02c8a23fe1b110601715952
[ "MIT" ]
null
null
null
src/dm/run.py
must-11/ap_experiment
50af0e239bfbd4e3b02c8a23fe1b110601715952
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np np.random.seed(100) p = 0.98 # スパース度 n = 100 # 行列のサイズ l = [0]*int(p*100) + [1]*int((1-p)*100) if __name__ == "__main__": main()
21.508772
66
0.484502
import matplotlib.pyplot as plt import numpy as np np.random.seed(100) p = 0.98 # スパース度 n = 100 # 行列のサイズ l = [0]*int(p*100) + [1]*int((1-p)*100) def main(): # 対象のグラフ G = np.random.choice(l, n**2).reshape((n, -1)).astype(np.int8) # 最大マッチングを求める match = max_matching(G) # 残余グラフから不要な枝を取り除く Gm...
1,148
0
23
c913f3600452f85390bb6a260fc273ffd4a7dfad
11,882
py
Python
baselines/launch.py
google/qhbm-library
e4e24ca0458bb475d60276207e871a312de86f65
[ "Apache-2.0" ]
19
2022-02-17T19:32:36.000Z
2022-03-31T01:07:19.000Z
baselines/launch.py
google/qhbm-library
e4e24ca0458bb475d60276207e871a312de86f65
[ "Apache-2.0" ]
37
2022-02-17T17:26:01.000Z
2022-03-31T21:32:16.000Z
baselines/launch.py
google/qhbm-library
e4e24ca0458bb475d60276207e871a312de86f65
[ "Apache-2.0" ]
8
2022-02-17T17:26:32.000Z
2022-03-18T12:11:33.000Z
"""XManager/XCloud launcher for both GPU and TPU jobs. The launcher works with any Python binary with the following flags: * `output_dir` is the directory for saving summaries and logs; * `use_gpu` determines whether to run on GPU or otherwise TPU; * `num_cores` is the number of TPU cores or GPUs; * `tpu` is the TPU ...
39.214521
136
0.698872
"""XManager/XCloud launcher for both GPU and TPU jobs. The launcher works with any Python binary with the following flags: * `output_dir` is the directory for saving summaries and logs; * `use_gpu` determines whether to run on GPU or otherwise TPU; * `num_cores` is the number of TPU cores or GPUs; * `tpu` is the TPU ...
497
0
23
354ab747db3a6fc22a1a104435220ccf26046785
420
py
Python
prodapi/info.py
jmagnusson/prodapi
7eba2bc5d9faf44181e1d2f579d05c0fdfc9bcdf
[ "MIT" ]
4
2021-04-11T22:50:13.000Z
2021-04-12T13:50:25.000Z
prodapi/info.py
jmagnusson/prodapi
7eba2bc5d9faf44181e1d2f579d05c0fdfc9bcdf
[ "MIT" ]
null
null
null
prodapi/info.py
jmagnusson/prodapi
7eba2bc5d9faf44181e1d2f579d05c0fdfc9bcdf
[ "MIT" ]
null
null
null
import os import platform try: from importlib.metadata import version as _version_func # type: ignore except ImportError: # Python 3.7 and lower from importlib_metadata import version as _version_func # type: ignore __all__ = ("name", "version", "node", "environment") name = __package__ version = _vers...
26.25
75
0.745238
import os import platform try: from importlib.metadata import version as _version_func # type: ignore except ImportError: # Python 3.7 and lower from importlib_metadata import version as _version_func # type: ignore __all__ = ("name", "version", "node", "environment") name = __package__ version = _vers...
0
0
0
5aa266946f5076ba45dc98655ae286e0430d1126
764
py
Python
mail/emailparser.py
isabella232/payloadmail
dbfacf5482d2ee49757fa49d7fc082b633de9537
[ "MIT" ]
1
2019-05-17T06:27:11.000Z
2019-05-17T06:27:11.000Z
mail/emailparser.py
payloadmail/payloadmail
dbfacf5482d2ee49757fa49d7fc082b633de9537
[ "MIT" ]
1
2022-01-23T15:23:25.000Z
2022-01-23T15:30:40.000Z
mail/emailparser.py
isabella232/payloadmail
dbfacf5482d2ee49757fa49d7fc082b633de9537
[ "MIT" ]
3
2019-05-16T19:20:27.000Z
2022-01-23T15:17:31.000Z
from . import parsed_email import mailbox from email.utils import parseaddr if __name__ == '__main__': for mail in check_emails(): print(mail.getall())
24.645161
57
0.704188
from . import parsed_email import mailbox from email.utils import parseaddr def check_emails(useremail=None): emails = [] mbox = mailbox.Maildir('/home/mailuser/Maildir') for msg in mbox.values(): parsed_sender = parseaddr(msg['From'])[1].split('@')[0] if parsed_sender == useremail: emails.append(parsed_ema...
560
0
46
5ea0d1d6c57ce68bc5cc6e01f55ab87e976337b1
5,213
py
Python
pianoputer.py
MemoryAndDream/pianoputer
2a878761e8ef3a5f7fc20d2dd3a1292f24f9e6aa
[ "CC-BY-3.0" ]
1
2021-07-12T14:19:49.000Z
2021-07-12T14:19:49.000Z
pianoputer.py
MemoryAndDream/pianoputer
2a878761e8ef3a5f7fc20d2dd3a1292f24f9e6aa
[ "CC-BY-3.0" ]
null
null
null
pianoputer.py
MemoryAndDream/pianoputer
2a878761e8ef3a5f7fc20d2dd3a1292f24f9e6aa
[ "CC-BY-3.0" ]
null
null
null
#!/usr/bin/env python #coding=utf8 from scipy.io import wavfile import argparse import numpy as np import pygame import sys import warnings import Queue myQueue = Queue.Queue() #music=[0,0,0,0,0,0] #music=[1,2,3,4,5,6,7,8,8,7,6,5,4,3,2,1] #music=[-2,1,3,5,1,0,3,5,5,6,7,8,6,6,5,5,3,2,1,1,1,3,2,1,1,1,2,3,2,1,-1,2,3,2] ...
32.179012
127
0.612315
#!/usr/bin/env python #coding=utf8 from scipy.io import wavfile import argparse import numpy as np import pygame import sys import warnings import Queue myQueue = Queue.Queue() #music=[0,0,0,0,0,0] #music=[1,2,3,4,5,6,7,8,8,7,6,5,4,3,2,1] #music=[-2,1,3,5,1,0,3,5,5,6,7,8,6,6,5,5,3,2,1,1,1,3,2,1,1,1,2,3,2,1,-1,2,3,2] ...
2,999
0
46
97a2009462c6bbaa0498904780e07eff5f9607fb
2,322
py
Python
LobbyService/test/test_poll_lobby.py
Devin0xFFFFFF/singed-feathers
747eef56fb3ba2a73cb7ba851462894efeddd00b
[ "BSD-3-Clause" ]
1
2017-06-20T15:19:40.000Z
2017-06-20T15:19:40.000Z
LobbyService/test/test_poll_lobby.py
Devin0xFFFFFF/singed-feathers
747eef56fb3ba2a73cb7ba851462894efeddd00b
[ "BSD-3-Clause" ]
3
2019-02-13T16:05:25.000Z
2019-02-15T03:31:06.000Z
LobbyService/test/test_poll_lobby.py
Devin0xFFFFFF/singed-feathers
747eef56fb3ba2a73cb7ba851462894efeddd00b
[ "BSD-3-Clause" ]
null
null
null
import pytest from mock import Mock, patch from service import poll_lobby valid_query_string_params = { "queryStringParameters": { "PlayerID": "Player2", "LobbyID": "Lobby1"} } valid_get_lobby = { "GameID": "0", "Players": [ {"PlayerID": "Player1", "PlayerName": "Bob", "PlayerSide...
30.552632
97
0.702412
import pytest from mock import Mock, patch from service import poll_lobby valid_query_string_params = { "queryStringParameters": { "PlayerID": "Player2", "LobbyID": "Lobby1"} } valid_get_lobby = { "GameID": "0", "Players": [ {"PlayerID": "Player1", "PlayerName": "Bob", "PlayerSide...
1,039
0
88
cf7338bb14d2132529620d1c339580d9cd6f3063
141
py
Python
tests/conftest.py
beastmatser/aiopokeapi
6ffe10bf8db0b6349cabf5b5b01b738214f805d0
[ "MIT" ]
3
2021-10-03T13:49:47.000Z
2022-03-31T03:12:30.000Z
tests/conftest.py
beastmatser/aiopokeapi
6ffe10bf8db0b6349cabf5b5b01b738214f805d0
[ "MIT" ]
3
2022-01-18T07:31:08.000Z
2022-01-18T07:32:09.000Z
tests/conftest.py
beastmatser/aiopokeapi
6ffe10bf8db0b6349cabf5b5b01b738214f805d0
[ "MIT" ]
1
2022-01-19T12:35:09.000Z
2022-01-19T12:35:09.000Z
import pytest import aiopoke @pytest.fixture
14.1
50
0.723404
import pytest import aiopoke @pytest.fixture async def client(): async with aiopoke.AiopokeClient() as _client: yield _client
71
0
22
641e33b7dded95a874419a090f8107d9b6d40393
1,712
py
Python
hyperadmin/tests/wizard_fixtures.py
zbyte64/django-hyperadmin
9ac2ae284b76efb3c50a1c2899f383a27154cb54
[ "BSD-3-Clause" ]
25
2015-01-26T11:37:22.000Z
2021-04-05T17:21:05.000Z
hyperadmin/tests/wizard_fixtures.py
webcube/django-hyperadmin
c6fcbd227098ea02a2c1a2865664fbbef92107dc
[ "BSD-3-Clause" ]
1
2015-04-13T04:19:49.000Z
2015-04-13T04:19:49.000Z
hyperadmin/tests/wizard_fixtures.py
webcube/django-hyperadmin
c6fcbd227098ea02a2c1a2865664fbbef92107dc
[ "BSD-3-Clause" ]
2
2017-05-24T13:33:17.000Z
2019-11-14T06:24:48.000Z
from django import forms from django.contrib.formtools.wizard.storage import BaseStorage from hyperadmin.resources.wizard import Wizard, FormStep, MultiPartStep
23.452055
71
0.651869
from django import forms from django.contrib.formtools.wizard.storage import BaseStorage from hyperadmin.resources.wizard import Wizard, FormStep, MultiPartStep class EmailForm(forms.Form): email = forms.EmailField() class UsernameForm(forms.Form): username = forms.CharField() class PasswordForm(forms.Form...
205
1,068
276
b33c85c9d0ba0eaeac3ddce07a45ed0495ad9176
32,402
py
Python
SJTUsoso/blog/views.py
JianmingGuo/SJTUsousou
a7ffb3921c241d2074f2da5f74abfb9a03b0311d
[ "MIT" ]
6
2020-04-28T13:36:56.000Z
2020-06-21T14:21:29.000Z
SJTUsoso/blog/views.py
JianmingGuo/SJTUsousou
a7ffb3921c241d2074f2da5f74abfb9a03b0311d
[ "MIT" ]
3
2020-05-27T18:34:05.000Z
2020-06-17T11:18:49.000Z
SJTUsoso/blog/views.py
JianmingGuo/SJTUsousou
a7ffb3921c241d2074f2da5f74abfb9a03b0311d
[ "MIT" ]
3
2020-04-28T13:40:24.000Z
2020-06-21T15:57:50.000Z
import json import hashlib import re import os import random import math from urllib.parse import urlencode from functools import wraps from django.db.models import Avg, Q, Count, F from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.http import HttpResponse, JsonResponse from django.s...
39.805897
111
0.590087
import json import hashlib import re import os import random import math from urllib.parse import urlencode from functools import wraps from django.db.models import Avg, Q, Count, F from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.http import HttpResponse, JsonResponse from django.s...
31,884
0
666
cab6e460543c0b300b53881e918dd09d92d3495c
1,631
py
Python
nmj/test/cleaners_test.py
ericcolleu/python-nmj
d61741efaa858a88bbd45844ec11ac193cce3cde
[ "MIT" ]
1
2021-01-31T11:41:22.000Z
2021-01-31T11:41:22.000Z
nmj/test/cleaners_test.py
ericcolleu/python-nmj
d61741efaa858a88bbd45844ec11ac193cce3cde
[ "MIT" ]
null
null
null
nmj/test/cleaners_test.py
ericcolleu/python-nmj
d61741efaa858a88bbd45844ec11ac193cce3cde
[ "MIT" ]
null
null
null
import unittest from nmj.cleaners import MovieCleaner, TVShowCleaner if __name__ == "__main__": unittest.main()
31.365385
141
0.762109
import unittest from nmj.cleaners import MovieCleaner, TVShowCleaner class MovieCleanerTestCase(unittest.TestCase): def setUp(self): super(MovieCleanerTestCase, self).setUp() self.cleaner = MovieCleaner() def test_01a(self): self.__test_cleaning("The A Team", "the a team") def test_02a(self): self.__tes...
1,132
25
358
52f1b9e73d74a165d986a37027ba04698399ee7b
1,466
py
Python
cgi-bin/login.py
bengood362/csci4140-asg1
caa8aa61b2f6daefe4cde69a6b2d8fa23b2d4b1f
[ "ImageMagick" ]
null
null
null
cgi-bin/login.py
bengood362/csci4140-asg1
caa8aa61b2f6daefe4cde69a6b2d8fa23b2d4b1f
[ "ImageMagick" ]
null
null
null
cgi-bin/login.py
bengood362/csci4140-asg1
caa8aa61b2f6daefe4cde69a6b2d8fa23b2d4b1f
[ "ImageMagick" ]
null
null
null
#!/usr/bin/python # login.cgi import cgi if __name__ == '__main__': try: formData = cgi.FieldStorage() message = formData.getvalue('message','') htmlTop() if message == "wrong_password": htmlMid("No such account or the password is wrong, please try again.") elif ...
29.918367
84
0.557981
#!/usr/bin/python # login.cgi import cgi def htmlTop(): print("""Content-type:text/html\n\n <!DOCTYPE html> <html lang='en'> <head> <meta charset='utf-8'/> <title>Login</title> </head> <body>""") def htmlMid(message=''): print...
884
0
68
94eae5df7a0c6b6a989fc36fa087f9a4b52b36b0
20,602
py
Python
sdk/python/pulumi_cloudflare/zone_lockdown.py
pulumi/pulumi-cloudflare
d444af2fab6101b388a15cf2e3933e45e9935cc6
[ "ECL-2.0", "Apache-2.0" ]
35
2019-03-14T21:29:29.000Z
2022-03-30T00:00:59.000Z
sdk/python/pulumi_cloudflare/zone_lockdown.py
pulumi/pulumi-cloudflare
d444af2fab6101b388a15cf2e3933e45e9935cc6
[ "ECL-2.0", "Apache-2.0" ]
128
2019-03-08T23:45:58.000Z
2022-03-31T21:05:22.000Z
sdk/python/pulumi_cloudflare/zone_lockdown.py
pulumi/pulumi-cloudflare
d444af2fab6101b388a15cf2e3933e45e9935cc6
[ "ECL-2.0", "Apache-2.0" ]
6
2019-05-10T12:52:56.000Z
2020-03-24T15:02:14.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import ...
47.800464
320
0.663382
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import ...
3,710
16,358
67
ccf0f67bdaf6c9f9aae70cc4c13f47e0c8b0fdd4
2,502
py
Python
main.py
3191110276/APIC-EM-Spark-Bot
00ca2c9b8891cf33517d2e7604c89994fdadd189
[ "MIT" ]
1
2018-04-06T10:45:08.000Z
2018-04-06T10:45:08.000Z
main.py
3191110276/APIC-EM-Spark-Bot
00ca2c9b8891cf33517d2e7604c89994fdadd189
[ "MIT" ]
null
null
null
main.py
3191110276/APIC-EM-Spark-Bot
00ca2c9b8891cf33517d2e7604c89994fdadd189
[ "MIT" ]
null
null
null
from flask import Flask, request from flask_basicauth import BasicAuth from werkzeug.wrappers import Response from intents import controller import requests from requests_toolbelt.multipart.encoder import MultipartEncoder import json import os # Configuration information for the application app = Flask(__name__) #app....
30.144578
105
0.643885
from flask import Flask, request from flask_basicauth import BasicAuth from werkzeug.wrappers import Response from intents import controller import requests from requests_toolbelt.multipart.encoder import MultipartEncoder import json import os # Configuration information for the application app = Flask(__name__) #app....
0
0
0
7f525f70141e1530ae8856b4f286479941c52932
1,098
py
Python
python3/leetcodepy/largest_rectangle_in_histogram.py
qianbinbin/leetcode
915cecab0c940cd13847683ec55b17b77eb0f39b
[ "MIT" ]
4
2018-03-05T02:27:16.000Z
2021-03-15T14:19:44.000Z
python3/leetcodepy/largest_rectangle_in_histogram.py
qianbinbin/leetcode
915cecab0c940cd13847683ec55b17b77eb0f39b
[ "MIT" ]
null
null
null
python3/leetcodepy/largest_rectangle_in_histogram.py
qianbinbin/leetcode
915cecab0c940cd13847683ec55b17b77eb0f39b
[ "MIT" ]
2
2018-07-22T10:32:10.000Z
2018-10-20T03:14:28.000Z
""" Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram. https://leetcode.com/static/images/problemset/histogram.png Above is a histogram where width of each bar is 1, given height = [2,1,5,6,2,3]. https://leetcod...
26.780488
156
0.578324
""" Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram. https://leetcode.com/static/images/problemset/histogram.png Above is a histogram where width of each bar is 1, given height = [2,1,5,6,2,3]. https://leetcod...
0
578
23
6083790ebb35ed2a3f50d1a93fc03cac27502db1
4,208
py
Python
app.py
testmorii/azure_flask_cv_keras
1a9be3b4d42873178ed74a1a03805029918050c7
[ "MIT" ]
null
null
null
app.py
testmorii/azure_flask_cv_keras
1a9be3b4d42873178ed74a1a03805029918050c7
[ "MIT" ]
null
null
null
app.py
testmorii/azure_flask_cv_keras
1a9be3b4d42873178ed74a1a03805029918050c7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import numpy as np import urllib.request from flask import Flask, render_template, request, redirect, url_for, send_from_directory, session from werkzeug.utils import secure_filename from PIL import Image import cv2 import io from keras import models from keras.models import load_mode...
35.361345
98
0.679895
# -*- coding: utf-8 -*- import os import numpy as np import urllib.request from flask import Flask, render_template, request, redirect, url_for, send_from_directory, session from werkzeug.utils import secure_filename from PIL import Image import cv2 import io from keras import models from keras.models import load_mode...
3,350
0
89
b12f7a9c9a1e5ed2ab800720a7e14805ded4a355
9,276
py
Python
lib/setup.py
NU-LL/lighttrack-
d870c9eac76003fe9e0c908e2e6d516b942d431c
[ "MIT" ]
1
2021-03-04T04:52:09.000Z
2021-03-04T04:52:09.000Z
lib/setup.py
NU-LL/lighttrack-
d870c9eac76003fe9e0c908e2e6d516b942d431c
[ "MIT" ]
null
null
null
lib/setup.py
NU-LL/lighttrack-
d870c9eac76003fe9e0c908e2e6d516b942d431c
[ "MIT" ]
1
2021-01-21T10:03:36.000Z
2021-01-21T10:03:36.000Z
# -*- coding: UTF-8 -*- # -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- import os from os.path import join as pjoin imp...
38.016393
91
0.545925
# -*- coding: UTF-8 -*- # -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- import os from os.path import join as pjoin imp...
5,483
13
71
a6759f089fb5a55c9a535202c9591d5ce235d14b
16,016
py
Python
src/gpiodmonitor/gpiodmonitor.py
randomchars42/gpiodmonitor
2ce0524ba8d3694276d38a32a31a666c4104894d
[ "Unlicense" ]
null
null
null
src/gpiodmonitor/gpiodmonitor.py
randomchars42/gpiodmonitor
2ce0524ba8d3694276d38a32a31a666c4104894d
[ "Unlicense" ]
null
null
null
src/gpiodmonitor/gpiodmonitor.py
randomchars42/gpiodmonitor
2ce0524ba8d3694276d38a32a31a666c4104894d
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 """ Monitor GPIO pins ("lines") using the "new" way (libgpiod). Thus it depends on python3-gpiod being installed: https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git """ import contextlib import logging import sys import time from typing import Dict, List, Callable, Tuple, Optional, Iter...
36.818391
80
0.575737
#!/usr/bin/env python3 """ Monitor GPIO pins ("lines") using the "new" way (libgpiod). Thus it depends on python3-gpiod being installed: https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git """ import contextlib import logging import sys import time from typing import Dict, List, Callable, Tuple, Optional, Iter...
0
0
0
8965cdc003143c4a35bf0d7922fa54d69310399a
7,245
py
Python
tools/scripts/gen-attributions.py
gh-determined-ai/determined
9a1ab33a3a356b69681b3351629fef4ab98ddb56
[ "Apache-2.0" ]
1,729
2020-04-27T17:36:40.000Z
2022-03-31T05:48:39.000Z
tools/scripts/gen-attributions.py
ChrisW09/determined
5c37bfe9cfcc69174ba29a3f1a115c3e9e3632e0
[ "Apache-2.0" ]
1,940
2020-04-27T17:34:14.000Z
2022-03-31T23:02:28.000Z
tools/scripts/gen-attributions.py
ChrisW09/determined
5c37bfe9cfcc69174ba29a3f1a115c3e9e3632e0
[ "Apache-2.0" ]
214
2020-04-27T19:57:28.000Z
2022-03-29T08:17:16.000Z
#!/usr/bin/env python3 """ gen-attributions.py: a tool for generating various OSS attributions docs. See tools/scripts/README.md for instructions on how to format license files. usage: gen-attributions.py BUILD_TYPE [OUTPUT_FILE] where BUILD_TYPE is one of: sphix -- generate an ReST file for the sphinx do...
28.190661
93
0.570738
#!/usr/bin/env python3 """ gen-attributions.py: a tool for generating various OSS attributions docs. See tools/scripts/README.md for instructions on how to format license files. usage: gen-attributions.py BUILD_TYPE [OUTPUT_FILE] where BUILD_TYPE is one of: sphix -- generate an ReST file for the sphinx do...
3,982
304
138
cef9ce0fe062206a67d4f07fdeaaadbb8ca78a26
1,276
py
Python
web/services/user-service/src/models/user.py
fhgrings/match-io
0acb0b006ae8d8073f1d148e80275a568c2517ae
[ "MIT" ]
null
null
null
web/services/user-service/src/models/user.py
fhgrings/match-io
0acb0b006ae8d8073f1d148e80275a568c2517ae
[ "MIT" ]
null
null
null
web/services/user-service/src/models/user.py
fhgrings/match-io
0acb0b006ae8d8073f1d148e80275a568c2517ae
[ "MIT" ]
null
null
null
import json from ..ext.database import db
30.380952
120
0.602665
import json from ..ext.database import db class User(db.Model): __tablename__ = "User" id_user = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(20)) password = db.Column(db.String(20)) first_name = db.Column(db.String(20)) last_name = db.Column(db.String(20)) ...
683
523
24
5090e0630c83c36506003159368026393d2faa23
2,196
py
Python
drizm_commons/sqla/base.py
drizm-team/python-commons
55e14754222cc1aa8a6c9137f75d529158864fee
[ "MIT" ]
null
null
null
drizm_commons/sqla/base.py
drizm-team/python-commons
55e14754222cc1aa8a6c9137f75d529158864fee
[ "MIT" ]
2
2021-01-01T19:45:33.000Z
2021-03-03T13:25:41.000Z
drizm_commons/sqla/base.py
drizm-team/python-commons
55e14754222cc1aa8a6c9137f75d529158864fee
[ "MIT" ]
null
null
null
import weakref from re import sub from typing import Any from sqlalchemy import MetaData, Integer, Column, Sequence from sqlalchemy.ext.declarative import declarative_base, declared_attr, DeclarativeMeta def gen_tablenames(name: str) -> str: """ Converts CamelCase class names to snake_case table names """ re...
33.784615
95
0.653916
import weakref from re import sub from typing import Any from sqlalchemy import MetaData, Integer, Column, Sequence from sqlalchemy.ext.declarative import declarative_base, declared_attr, DeclarativeMeta def gen_tablenames(name: str) -> str: """ Converts CamelCase class names to snake_case table names """ re...
865
238
152
805304469fd4550f6b7b0f4581b9aa5238d0efcf
4,446
py
Python
test/resources/mock.py
SpartanPlume/MysqldbPythonWrapper
6f43e50032faf3067d5d1f2c110051da41096e83
[ "MIT" ]
null
null
null
test/resources/mock.py
SpartanPlume/MysqldbPythonWrapper
6f43e50032faf3067d5d1f2c110051da41096e83
[ "MIT" ]
3
2020-02-26T21:36:11.000Z
2021-09-11T17:39:58.000Z
test/resources/mock.py
SpartanPlume/MysqldbPythonWrapper
6f43e50032faf3067d5d1f2c110051da41096e83
[ "MIT" ]
null
null
null
"""All Tosurnament module mock objects.""" import json import os from unittest import mock from mysqldb_wrapper import crypt def query_side_effect_wrapper(session_mock): """Side effect for the query function, used to return the stubs in the storage.""" return query_side_effect def add_side_effect_wrapper...
31.309859
117
0.609537
"""All Tosurnament module mock objects.""" import json import os from unittest import mock from mysqldb_wrapper import crypt def query_side_effect_wrapper(session_mock): """Side effect for the query function, used to return the stubs in the storage.""" def query_side_effect(table): tablename = tabl...
2,343
-5
346
c92f0589ef691ff6e4989ad930db6b48b7139b8c
11,012
py
Python
bmtk/tests/simulator/utils/test_nwb.py
tjbanks/bmtk
52fee3b230ceb14a666c46f57f2031c38f1ac5b1
[ "BSD-3-Clause" ]
1
2019-03-27T12:23:09.000Z
2019-03-27T12:23:09.000Z
bmtk/tests/simulator/utils/test_nwb.py
tjbanks/bmtk
52fee3b230ceb14a666c46f57f2031c38f1ac5b1
[ "BSD-3-Clause" ]
null
null
null
bmtk/tests/simulator/utils/test_nwb.py
tjbanks/bmtk
52fee3b230ceb14a666c46f57f2031c38f1ac5b1
[ "BSD-3-Clause" ]
null
null
null
import pytest import numpy as np from bmtk.simulator.utils import nwb import os import h5py @pytest.mark.skip(reason='Ability to add 0-lenght datasetset has been removed in newer version of h5py') if __name__ == "__main__": test_create_blank_file() # pragma: no cover test_...
32.19883
104
0.652561
import pytest import numpy as np from bmtk.simulator.utils import nwb import os import h5py def test_create_blank_file(): nwb.create_blank_file() f = nwb.create_blank_file(close=False) file_name = f.filename f.close() nwb.create_blank_file(file_name, force=True) os.remove(file_name) ...
9,520
0
402
9a18fa0b2044ba6be3c2f30eeb4b35f1e86a258d
510
py
Python
match.py
swiharta/radres
a007c34623d0a443a2b4e3dfecaaa848ddecbb2f
[ "MIT" ]
2
2019-02-24T19:33:28.000Z
2019-10-31T11:50:07.000Z
match.py
swiharta/radres
a007c34623d0a443a2b4e3dfecaaa848ddecbb2f
[ "MIT" ]
null
null
null
match.py
swiharta/radres
a007c34623d0a443a2b4e3dfecaaa848ddecbb2f
[ "MIT" ]
null
null
null
from fuzzywuzzy import process import codecs#, re, sys from residents import RESIDENTS, NAMES filename = raw_input('Enter a name for the new file: ') file = codecs.open(filename, 'w', encoding='utf-8', errors='ignore') for resident in RESIDENTS: match = process.extractOne(resident, NAMES) name, accuracy = match[0]...
34
68
0.688235
from fuzzywuzzy import process import codecs#, re, sys from residents import RESIDENTS, NAMES filename = raw_input('Enter a name for the new file: ') file = codecs.open(filename, 'w', encoding='utf-8', errors='ignore') for resident in RESIDENTS: match = process.extractOne(resident, NAMES) name, accuracy = match[0]...
0
0
0
a206545b62dfd7ec509a6039d755716e46058bee
5,507
py
Python
catalog_query/catalog_query.py
mwengren/catalog-query
a0c92a19988ded5e1463eb005f91a8f5cbf63023
[ "MIT" ]
1
2021-03-04T20:46:56.000Z
2021-03-04T20:46:56.000Z
catalog_query/catalog_query.py
mwengren/catalog-query
a0c92a19988ded5e1463eb005f91a8f5cbf63023
[ "MIT" ]
null
null
null
catalog_query/catalog_query.py
mwengren/catalog-query
a0c92a19988ded5e1463eb005f91a8f5cbf63023
[ "MIT" ]
null
null
null
import argparse import os import errno import io import importlib import sys from datetime import datetime, timedelta try: from urllib.parse import urlparse # Python 3 except ImportError: from urlparse import urlparse # Python 2 # import requests IOOS_CATALOG_URL = "https://data.ioos.us/api/3" VALID_QUERY_A...
50.063636
373
0.65335
import argparse import os import errno import io import importlib import sys from datetime import datetime, timedelta try: from urllib.parse import urlparse # Python 3 except ImportError: from urlparse import urlparse # Python 2 # import requests IOOS_CATALOG_URL = "https://data.ioos.us/api/3" VALID_QUERY_A...
0
21
23
5832834a0404c0219486869a800594a1cb6b30a1
1,089
py
Python
allennlp/common/testing/__init__.py
danielkingai2/allennlp
65a146d20697ac431564ef1bedb18d61011e727e
[ "Apache-2.0" ]
4
2019-05-30T01:03:31.000Z
2021-12-18T08:24:51.000Z
allennlp/common/testing/__init__.py
danielkingai2/allennlp
65a146d20697ac431564ef1bedb18d61011e727e
[ "Apache-2.0" ]
null
null
null
allennlp/common/testing/__init__.py
danielkingai2/allennlp
65a146d20697ac431564ef1bedb18d61011e727e
[ "Apache-2.0" ]
5
2019-07-16T06:43:50.000Z
2021-12-18T08:25:12.000Z
""" Utilities and helpers for writing tests. """ import torch import pytest from allennlp.common.testing.test_case import AllenNlpTestCase from allennlp.common.testing.model_test_case import ModelTestCase _available_devices = ["cpu"] + (["cuda"] if torch.cuda.is_available() else []) def multi_device(test_method): ...
26.560976
97
0.687787
""" Utilities and helpers for writing tests. """ import torch import pytest from allennlp.common.testing.test_case import AllenNlpTestCase from allennlp.common.testing.model_test_case import ModelTestCase _available_devices = ["cpu"] + (["cuda"] if torch.cuda.is_available() else []) def multi_device(test_method): ...
0
0
0
e607df82b0328cf323a31867e15f80488f129ac4
2,976
py
Python
api/files/api/app/send_email.py
trackit/trackit-legacy
76cfab7941eddb9d390dd6c7b9a408a9ad4fc8da
[ "Apache-2.0" ]
2
2018-02-01T09:18:05.000Z
2020-03-12T18:11:11.000Z
api/files/api/app/send_email.py
trackit/trackit-legacy
76cfab7941eddb9d390dd6c7b9a408a9ad4fc8da
[ "Apache-2.0" ]
null
null
null
api/files/api/app/send_email.py
trackit/trackit-legacy
76cfab7941eddb9d390dd6c7b9a408a9ad4fc8da
[ "Apache-2.0" ]
5
2018-05-11T10:32:52.000Z
2021-05-26T12:09:47.000Z
import smtplib from email.MIMEMultipart import MIMEMultipart from email.MIMEText import MIMEText from app import app import config
29.465347
92
0.646505
import smtplib from email.MIMEMultipart import MIMEMultipart from email.MIMEText import MIMEText from app import app import config def send_email(email, subject, text, html, bypass_debug=False): if not config.SMTP_ADDRESS: return if app.debug: print 'EMAIL', email, subject.encode('utf8'), text....
2,776
0
69
bcc42c49058b562227d90aa8bd21c82d866aee21
4,982
py
Python
was-deploy.py
filipemanuelofs/was-utils
4db1d13ef06cb1e2a1e0ea5e431be9f285485581
[ "MIT" ]
1
2019-07-16T14:29:41.000Z
2019-07-16T14:29:41.000Z
was-deploy.py
filipemanuelofs/was-utils
4db1d13ef06cb1e2a1e0ea5e431be9f285485581
[ "MIT" ]
null
null
null
was-deploy.py
filipemanuelofs/was-utils
4db1d13ef06cb1e2a1e0ea5e431be9f285485581
[ "MIT" ]
1
2021-12-07T12:48:08.000Z
2021-12-07T12:48:08.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- ''' Versão: 2.0 Script responsavel por realizar o undeploy e deploy do aplicativo no WAS, alem de compilar atraves do Maven. Execução: $ cd C:\<CAMINHO_WAS>\WebSphere\AppServer\bin $ wsadmin.bat -lang jython -f <CAMINHO_SCRIPT> -username <USUARIO> -password <SENHA> Autor: F...
32.141935
136
0.599558
#!/usr/bin/python # -*- coding: utf-8 -*- ''' Versão: 2.0 Script responsavel por realizar o undeploy e deploy do aplicativo no WAS, alem de compilar atraves do Maven. Execução: $ cd C:\<CAMINHO_WAS>\WebSphere\AppServer\bin $ wsadmin.bat -lang jython -f <CAMINHO_SCRIPT> -username <USUARIO> -password <SENHA> Autor: F...
3,290
-5
285
b73b96a42e71886caefeba9374ee5cd859ef45ba
7,495
py
Python
pDeep/bucket.py
pFindStudio/pDeep3
27def6d36f2ff1342f91817440971440cb057de6
[ "Apache-2.0" ]
10
2020-05-28T17:04:19.000Z
2021-05-13T12:11:22.000Z
pDeep/bucket.py
pFindStudio/pDeep3
27def6d36f2ff1342f91817440971440cb057de6
[ "Apache-2.0" ]
7
2020-05-21T02:13:05.000Z
2021-02-21T15:29:15.000Z
pDeep/bucket.py
pFindStudio/pDeep3
27def6d36f2ff1342f91817440971440cb057de6
[ "Apache-2.0" ]
6
2020-02-25T15:53:39.000Z
2021-12-10T03:54:09.000Z
import sys import numpy as np from .config.pDeep_config import Common_Config instrument_list = Common_Config().instrument_list instrument_num = Common_Config().max_instrument_num instrument_dict = dict(zip(instrument_list, range(len(instrument_list)))) _feature_name_list = ['x', 'mod_x', 'charge', 'nce', 'instrument...
40.513514
114
0.598666
import sys import numpy as np from .config.pDeep_config import Common_Config instrument_list = Common_Config().instrument_list instrument_num = Common_Config().max_instrument_num instrument_dict = dict(zip(instrument_list, range(len(instrument_list)))) _feature_name_list = ['x', 'mod_x', 'charge', 'nce', 'instrument...
3,544
6
264
60258aee00558aae4b82aff648cdcd0705911399
283
py
Python
BioinformaticsStronghold/rna/rna.py
mateuszstompor/Rosalind
1828fd8c5b22c7af5743188f8a54ad6db6c0f481
[ "MIT" ]
null
null
null
BioinformaticsStronghold/rna/rna.py
mateuszstompor/Rosalind
1828fd8c5b22c7af5743188f8a54ad6db6c0f481
[ "MIT" ]
null
null
null
BioinformaticsStronghold/rna/rna.py
mateuszstompor/Rosalind
1828fd8c5b22c7af5743188f8a54ad6db6c0f481
[ "MIT" ]
null
null
null
import sys if __name__ == "__main__": if len(sys.argv) != 2: print("Invoke the program passing a path to a file as an argument") else: with open(sys.argv[1], 'r') as file: print(rna(file.read()))
20.214286
75
0.572438
import sys def rna(dna): return dna.replace('T', 'U') if __name__ == "__main__": if len(sys.argv) != 2: print("Invoke the program passing a path to a file as an argument") else: with open(sys.argv[1], 'r') as file: print(rna(file.read()))
25
0
23
78e5324b5a2155f1b409c7a96479930949f52f5e
3,410
py
Python
hwt/serializer/systemC/serializer.py
ufo2011/hwt
2a32a3fc0c04cf3d6e78dce2dcd0d90dffc7eac1
[ "MIT" ]
134
2018-02-28T05:06:31.000Z
2022-03-25T23:50:13.000Z
hwt/serializer/systemC/serializer.py
ufo2011/hwt
2a32a3fc0c04cf3d6e78dce2dcd0d90dffc7eac1
[ "MIT" ]
32
2018-03-15T19:01:02.000Z
2021-07-02T14:00:06.000Z
hwt/serializer/systemC/serializer.py
ufo2011/hwt
2a32a3fc0c04cf3d6e78dce2dcd0d90dffc7eac1
[ "MIT" ]
17
2018-09-16T12:54:01.000Z
2022-01-20T03:16:52.000Z
from copy import copy from typing import Optional from hdlConvertorAst.hdlAst._defs import HdlIdDef from hdlConvertorAst.hdlAst._expr import HdlValueId, HdlOp, HdlOpType from hdlConvertorAst.hdlAst._structural import HdlModuleDec, HdlCompInst from hdlConvertorAst.to.systemc.keywords import SYSTEMC_KEYWORDS from hdlCon...
37.065217
82
0.652786
from copy import copy from typing import Optional from hdlConvertorAst.hdlAst._defs import HdlIdDef from hdlConvertorAst.hdlAst._expr import HdlValueId, HdlOp, HdlOpType from hdlConvertorAst.hdlAst._structural import HdlModuleDec, HdlCompInst from hdlConvertorAst.to.systemc.keywords import SYSTEMC_KEYWORDS from hdlCon...
1,769
0
108
94d77b3c03548adb00a560af25e81e6d04b98d78
1,850
py
Python
lib/bitcore_config.py
c1xx/sentinel
81284d7732dc3151e58263bb5f71604964cdf627
[ "MIT" ]
1
2020-12-16T20:20:32.000Z
2020-12-16T20:20:32.000Z
lib/bitcore_config.py
c1xx/sentinel
81284d7732dc3151e58263bb5f71604964cdf627
[ "MIT" ]
null
null
null
lib/bitcore_config.py
c1xx/sentinel
81284d7732dc3151e58263bb5f71604964cdf627
[ "MIT" ]
null
null
null
import sys import os import io import re sys.path.append(os.path.join(os.path.dirname(__file__), '..')) sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'lib')) from misc import printdbg
29.83871
81
0.586486
import sys import os import io import re sys.path.append(os.path.join(os.path.dirname(__file__), '..')) sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'lib')) from misc import printdbg class BitcoreConfig(): @classmethod def slurp_config_file(self, filename): # read bitcore.conf config...
1,493
133
23
54823f8b57c131a44cf21f6c10577b59d48b440f
5,074
py
Python
workers.py
donmbelembe/php-installer
86758787ad8d8f32d9725185efc2145e541d5fff
[ "MIT" ]
null
null
null
workers.py
donmbelembe/php-installer
86758787ad8d8f32d9725185efc2145e541d5fff
[ "MIT" ]
null
null
null
workers.py
donmbelembe/php-installer
86758787ad8d8f32d9725185efc2145e541d5fff
[ "MIT" ]
null
null
null
# https://stackoverflow.com/a/33453124/6210398 import threading import sys from requests import get as requests_get from zipfile import ZipFile import os from shutil import copyfile from bs4 import BeautifulSoup from packaging.version import Version, parse from PyQt5.QtCore import QObject, pyqtSignal, pyqtSlot import t...
29.672515
84
0.616279
# https://stackoverflow.com/a/33453124/6210398 import threading import sys from requests import get as requests_get from zipfile import ZipFile import os from shutil import copyfile from bs4 import BeautifulSoup from packaging.version import Version, parse from PyQt5.QtCore import QObject, pyqtSignal, pyqtSlot import t...
3,767
605
69
63c8aeacd81d0fa827f96ba7a04809515c5936f4
8,339
py
Python
lino_care/lib/care/fixtures/demo.py
khchine5/care
a9ec53709117c5dc0efac240d899a93750ecfd4e
[ "BSD-2-Clause" ]
null
null
null
lino_care/lib/care/fixtures/demo.py
khchine5/care
a9ec53709117c5dc0efac240d899a93750ecfd4e
[ "BSD-2-Clause" ]
null
null
null
lino_care/lib/care/fixtures/demo.py
khchine5/care
a9ec53709117c5dc0efac240d899a93750ecfd4e
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: UTF-8 -*- # Copyright 2016-2017 Luc Saffre # License: BSD (see file COPYING for details) from __future__ import unicode_literals from lino.api import rt, _ from lino.utils.cycler import Cycler from lino.utils.instantiator import create_row from lino_xl.lib.tickets.choicelists import TicketStates from l...
33.625
73
0.613863
# -*- coding: UTF-8 -*- # Copyright 2016-2017 Luc Saffre # License: BSD (see file COPYING for details) from __future__ import unicode_literals from lino.api import rt, _ from lino.utils.cycler import Cycler from lino.utils.instantiator import create_row from lino_xl.lib.tickets.choicelists import TicketStates from l...
6,452
0
69
1b824dcfd62a1cad062cc31ddb87e3dfc998e8e6
10,997
py
Python
tournament_test.py
iraquitan/udacity-fsnd-p2-swiss-pairings
af171b7b4458e9fe3706bd295decbb0dc5bb40e5
[ "MIT" ]
null
null
null
tournament_test.py
iraquitan/udacity-fsnd-p2-swiss-pairings
af171b7b4458e9fe3706bd295decbb0dc5bb40e5
[ "MIT" ]
null
null
null
tournament_test.py
iraquitan/udacity-fsnd-p2-swiss-pairings
af171b7b4458e9fe3706bd295decbb0dc5bb40e5
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # Test cases for tournament.py from tournament import * if __name__ == '__main__': test_delete_matches() test_delete() test_count() test_register() test_register_count_delete() test_standings_before_matches() test_report_matches() test_pairings() # ...
38.184028
82
0.596708
#!/usr/bin/env python # # Test cases for tournament.py from tournament import * def test_delete_matches(): delete_matches() print "1. Old matches can be deleted." def test_delete(): delete_matches() delete_byes() delete_tournament_players() delete_players() delete_tournaments() prin...
10,393
0
207
699297ba567517c4e5fc8236d9a3276d30f3e202
411
py
Python
tests/covariances/test_cov.py
gnafit/gna
c1a58dac11783342c97a2da1b19c97b85bce0394
[ "MIT" ]
5
2019-10-14T01:06:57.000Z
2021-02-02T16:33:06.000Z
tests/covariances/test_cov.py
gnafit/gna
c1a58dac11783342c97a2da1b19c97b85bce0394
[ "MIT" ]
null
null
null
tests/covariances/test_cov.py
gnafit/gna
c1a58dac11783342c97a2da1b19c97b85bce0394
[ "MIT" ]
null
null
null
# Name assosiated with a set of parameters and covariance matrix. Will be used # to retrieve it name = 'test_cov' mode = 'relative' uncorr_uncs = [0.5, 0.1] # 'keep' stands for keeping uncorrelated uncertainties of parameters and 'override' stands # for substituting them values from uncorr_uncs policy = 'keep' param...
37.363636
90
0.690998
# Name assosiated with a set of parameters and covariance matrix. Will be used # to retrieve it name = 'test_cov' mode = 'relative' uncorr_uncs = [0.5, 0.1] # 'keep' stands for keeping uncorrelated uncertainties of parameters and 'override' stands # for substituting them values from uncorr_uncs policy = 'keep' param...
0
0
0
b127a1ca03fa6f388dd8877996d66c716c4b5b16
184
py
Python
atakama/__init__.py
aman-atakama/atakama_sdk
6e917e81c07495324fd5ab1208a63217b7e4c3fd
[ "BSD-3-Clause" ]
null
null
null
atakama/__init__.py
aman-atakama/atakama_sdk
6e917e81c07495324fd5ab1208a63217b7e4c3fd
[ "BSD-3-Clause" ]
11
2021-08-04T23:40:55.000Z
2022-03-23T19:34:30.000Z
atakama/__init__.py
aman-atakama/atakama_sdk
6e917e81c07495324fd5ab1208a63217b7e4c3fd
[ "BSD-3-Clause" ]
null
null
null
"""Atakama sdk.""" # only import stuff here that has no co-deps, external-lib deps, etc. # otherwise, the user should import the from a specific submodule from .plugin_base import *
26.285714
69
0.73913
"""Atakama sdk.""" # only import stuff here that has no co-deps, external-lib deps, etc. # otherwise, the user should import the from a specific submodule from .plugin_base import *
0
0
0
d4d0745f500b86bc52dff5e7939fe0dfaec5aba5
5,965
py
Python
nbs/dl2/selfmade/exp/nb_04.py
Hustens0hn/fastai-course-v3
5f803c0a9b6b7169b8675f16ee81758c3b5f2f14
[ "Apache-2.0" ]
null
null
null
nbs/dl2/selfmade/exp/nb_04.py
Hustens0hn/fastai-course-v3
5f803c0a9b6b7169b8675f16ee81758c3b5f2f14
[ "Apache-2.0" ]
null
null
null
nbs/dl2/selfmade/exp/nb_04.py
Hustens0hn/fastai-course-v3
5f803c0a9b6b7169b8675f16ee81758c3b5f2f14
[ "Apache-2.0" ]
null
null
null
################################################# ### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ### ################################################# # file to edit: dev_nb/04_callbacks.ipynb from exp.nb_03 import * import re _camel_re1 = re.compile('(.)([A-Z][a-z]+)') _camel_re2 = re.compile('([a-z0-9])([A-Z])') ...
33.892045
187
0.61777
################################################# ### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ### ################################################# # file to edit: dev_nb/04_callbacks.ipynb from exp.nb_03 import * class DataBunch(): def __init__(self, train_dl, valid_dl, c=None): self.train_dl, self.va...
4,423
701
470
1cf718c0fb6f448fece503a53d2b03ab594d4f56
1,160
py
Python
scripts/get_dataset.py
Oofone/SudokuExample
aeccde519f2f58831f0d5ab84bfd10b74c93eba9
[ "MIT" ]
1
2020-06-14T00:29:56.000Z
2020-06-14T00:29:56.000Z
scripts/get_dataset.py
Oofone/SudokuExample
aeccde519f2f58831f0d5ab84bfd10b74c93eba9
[ "MIT" ]
null
null
null
scripts/get_dataset.py
Oofone/SudokuExample
aeccde519f2f58831f0d5ab84bfd10b74c93eba9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import sys import requests from definitions import ROOT_DIR ADDRESS = "https://s3.ap-south-1.amazonaws.com/shreyas-gopal-personal/sudoku.csv" FILE_NAME = "sudoku.csv"
29
81
0.591379
# -*- coding: utf-8 -*- import os import sys import requests from definitions import ROOT_DIR ADDRESS = "https://s3.ap-south-1.amazonaws.com/shreyas-gopal-personal/sudoku.csv" FILE_NAME = "sudoku.csv" def fetch(): global ADDRESS, FILE_NAME DATA_DIR = ROOT_DIR + '/dataset/' if not os.path.isdir(DATA_DIR)...
934
0
23
3eef7241c169e87924e9adb9595ef906accd6e26
647
py
Python
tests/core/menu/test_key.py
malviguys/frontendcli
c4c1875892b46a194013ea1d41ca9b815f42ee20
[ "MIT" ]
null
null
null
tests/core/menu/test_key.py
malviguys/frontendcli
c4c1875892b46a194013ea1d41ca9b815f42ee20
[ "MIT" ]
3
2021-11-26T17:38:31.000Z
2021-12-16T07:28:05.000Z
tests/core/menu/test_key.py
malviguys/frontendcli
c4c1875892b46a194013ea1d41ca9b815f42ee20
[ "MIT" ]
null
null
null
import pytest from valid8 import ValidationError from core.menu.menu import Key
17.972222
57
0.629057
import pytest from valid8 import ValidationError from core.menu.menu import Key def test_create_key(): k = Key('1') assert k.value == '1' def test_key_str(): val = 'help' assert str(Key(val)) == val def test_key_empty_fails(): with pytest.raises(ValidationError): Key('') def test_ke...
424
0
138
d5d18b4e7a8ea53b20a854e1883aa8298f795a6b
3,633
py
Python
deep-rl/lib/python2.7/site-packages/OpenGL/GLU/glustruct.py
ShujaKhalid/deep-rl
99c6ba6c3095d1bfdab81bd01395ced96bddd611
[ "MIT" ]
210
2016-04-09T14:26:00.000Z
2022-03-25T18:36:19.000Z
deep-rl/lib/python2.7/site-packages/OpenGL/GLU/glustruct.py
ShujaKhalid/deep-rl
99c6ba6c3095d1bfdab81bd01395ced96bddd611
[ "MIT" ]
72
2016-09-04T09:30:19.000Z
2022-03-27T17:06:53.000Z
deep-rl/lib/python2.7/site-packages/OpenGL/GLU/glustruct.py
ShujaKhalid/deep-rl
99c6ba6c3095d1bfdab81bd01395ced96bddd611
[ "MIT" ]
64
2016-04-09T14:26:49.000Z
2022-03-21T11:19:47.000Z
"""Base class for GLU callback-caching structures""" import ctypes import weakref from OpenGL._bytes import long, integer_types class GLUStruct( object ): """Mix-in class for GLU Structures that want to retain references to callbacks Also provides original-object-return for the "datapointer" style paremte...
41.284091
82
0.625378
"""Base class for GLU callback-caching structures""" import ctypes import weakref from OpenGL._bytes import long, integer_types class GLUStruct( object ): """Mix-in class for GLU Structures that want to retain references to callbacks Also provides original-object-return for the "datapointer" style paremte...
0
0
0
d324115ebff9657b4a34c1488704e7895527bd90
4,318
py
Python
gpt2_deepspeed/generate.py
cipher982/Wine-o-matic
a8000bf5ec86554e9c3c746aae51ba509ab59162
[ "Apache-2.0" ]
4
2019-04-18T20:34:53.000Z
2022-01-18T10:09:55.000Z
gpt2_deepspeed/generate.py
cipher982/Wine-o-matic
a8000bf5ec86554e9c3c746aae51ba509ab59162
[ "Apache-2.0" ]
11
2020-01-28T22:09:12.000Z
2021-04-01T19:57:29.000Z
gpt2_deepspeed/generate.py
cipher982/Wine-o-matic
a8000bf5ec86554e9c3c746aae51ba509ab59162
[ "Apache-2.0" ]
null
null
null
import argparse import logging import os from pathlib import Path import deepspeed import pandas as pd import torch from tqdm import tqdm import transformers os.environ["TOKENIZERS_PARALLELISM"] = "false" LOG = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) if __name__ == "__main__": mai...
31.985185
88
0.591014
import argparse import logging import os from pathlib import Path import deepspeed import pandas as pd import torch from tqdm import tqdm import transformers os.environ["TOKENIZERS_PARALLELISM"] = "false" LOG = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) def add_argument(): parser = arg...
3,948
0
46
3aa1c69c4f295a1987d4bb1f7efb8d797ed8774c
4,959
py
Python
pysabertooth/PySabertooth.py
MomsFriendlyRobotCompany/pysabertooth
cbb0bf8656b9c7e5f35b1720835576570d3f4bc9
[ "MIT" ]
11
2018-04-10T01:46:16.000Z
2021-06-17T17:59:06.000Z
pysabertooth/PySabertooth.py
MomsFriendlyRobotCompany/pysabertooth
cbb0bf8656b9c7e5f35b1720835576570d3f4bc9
[ "MIT" ]
3
2018-09-21T01:19:23.000Z
2020-10-06T23:52:25.000Z
pysabertooth/PySabertooth.py
MomsFriendlyRobotCompany/pysabertooth
cbb0bf8656b9c7e5f35b1720835576570d3f4bc9
[ "MIT" ]
8
2018-04-10T01:46:18.000Z
2021-12-13T11:42:55.000Z
## # Sabertooth.py: Class implementing packetized serial control of # Sabertooth 2x32 motor driver (Dimension Engineering). # # This code was adapted from MIT licensed # Copyright 2015, Egan McComb # copywrite 2017 Kevin J. Walchko # ## import serial import logging import time class Sabertooth(object)...
26.66129
83
0.543456
## # Sabertooth.py: Class implementing packetized serial control of # Sabertooth 2x32 motor driver (Dimension Engineering). # # This code was adapted from MIT licensed # Copyright 2015, Egan McComb # copywrite 2017 Kevin J. Walchko # ## import serial import logging import time class Sabertooth(object)...
0
0
0
09430e07e8642e5abbd8157617e60ba6605c1e30
383
py
Python
mfi_customization/mfi/patch/set_closing_date_in_issue.py
anuradha-88/mfi_customization
eb19ed43d0178b461f1d9914d2f7b6b55c9d030c
[ "MIT" ]
null
null
null
mfi_customization/mfi/patch/set_closing_date_in_issue.py
anuradha-88/mfi_customization
eb19ed43d0178b461f1d9914d2f7b6b55c9d030c
[ "MIT" ]
null
null
null
mfi_customization/mfi/patch/set_closing_date_in_issue.py
anuradha-88/mfi_customization
eb19ed43d0178b461f1d9914d2f7b6b55c9d030c
[ "MIT" ]
null
null
null
import frappe from datetime import datetime # bench execute mfi_customization.mfi.patch.set_closing_date_in_issue.execute
34.818182
94
0.754569
import frappe from datetime import datetime # bench execute mfi_customization.mfi.patch.set_closing_date_in_issue.execute def execute(): for d in frappe.get_all("Issue"): for tk in frappe.get_all("Task",{"issue": d.name}, ['completion_date_time']): if tk.completion_date_time: frappe.db.set_value("Issue", {"n...
234
0
22
2141ee73add0d87dc081b7aa8efb2dd8489e27e1
7,225
py
Python
mnlite/__init__.py
datadavev/mnlite
be3118cde634fce97ea689e1044803edf3cbc1ea
[ "Apache-2.0" ]
null
null
null
mnlite/__init__.py
datadavev/mnlite
be3118cde634fce97ea689e1044803edf3cbc1ea
[ "Apache-2.0" ]
14
2021-07-07T13:17:40.000Z
2022-01-17T19:01:34.000Z
mnlite/__init__.py
datadavev/mnlite
be3118cde634fce97ea689e1044803edf3cbc1ea
[ "Apache-2.0" ]
null
null
null
import os import pathlib import json import flask import flask_cors from mnlite import mnode import opersist.utils
35.072816
88
0.528028
import os import pathlib import json import flask import flask_cors from mnlite import mnode import opersist.utils def initialize_instance(instance_path): db_path = os.path.join(instance_path, "dashboard") db_config = os.path.join(db_path, "dashboard.cfg") if not os.path.exists(db_config): os.maked...
7,062
0
46
908fa17c8c4159fbb68861eddb95219d68da6d2e
5,586
py
Python
netbox/virtualization/forms/filtersets.py
teixemf/netbox
57759aa4a3dec8f5bc098f28e9cde0cb3c28699c
[ "Apache-2.0" ]
null
null
null
netbox/virtualization/forms/filtersets.py
teixemf/netbox
57759aa4a3dec8f5bc098f28e9cde0cb3c28699c
[ "Apache-2.0" ]
null
null
null
netbox/virtualization/forms/filtersets.py
teixemf/netbox
57759aa4a3dec8f5bc098f28e9cde0cb3c28699c
[ "Apache-2.0" ]
null
null
null
from django import forms from django.utils.translation import gettext as _ from dcim.models import DeviceRole, Platform, Region, Site, SiteGroup from extras.forms import CustomFieldModelFilterForm, LocalConfigContextFilterForm from tenancy.forms import TenancyFilterForm, ContactModelFilterForm from utilities.forms imp...
29.871658
132
0.644468
from django import forms from django.utils.translation import gettext as _ from dcim.models import DeviceRole, Platform, Region, Site, SiteGroup from extras.forms import CustomFieldModelFilterForm, LocalConfigContextFilterForm from tenancy.forms import TenancyFilterForm, ContactModelFilterForm from utilities.forms imp...
0
4,788
115
32a4ccb2326785cd2ce299435f725dc7cb2cf04a
3,132
py
Python
third_party/WebKit/PRESUBMIT_test.py
zipated/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
third_party/WebKit/PRESUBMIT_test.py
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
third_party/WebKit/PRESUBMIT_test.py
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
#!/usr/bin/env python # Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # # Note: running this test requires installing the package python-mock. # pylint: disable=C0103 # pylint: disable=F0401 import PRESUBMI...
36.418605
89
0.694764
#!/usr/bin/env python # Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # # Note: running this test requires installing the package python-mock. # pylint: disable=C0103 # pylint: disable=F0401 import PRESUBMI...
74
2,109
77
bdda4ee91e920a49ce882b4f963735587c8e09bb
792
py
Python
asynapplicationinsights/utils/__init__.py
RobertoPrevato/aioapplicationinsights
c72721c6ed0e64b4e5bfecbcd3dde62f7c6ea120
[ "MIT" ]
2
2018-08-13T14:26:31.000Z
2019-12-01T01:03:10.000Z
asynapplicationinsights/utils/__init__.py
RobertoPrevato/aioapplicationinsights
c72721c6ed0e64b4e5bfecbcd3dde62f7c6ea120
[ "MIT" ]
4
2018-10-09T20:32:59.000Z
2018-12-09T20:46:09.000Z
asynapplicationinsights/utils/__init__.py
RobertoPrevato/aioapplicationinsights
c72721c6ed0e64b4e5bfecbcd3dde62f7c6ea120
[ "MIT" ]
null
null
null
from ..exceptions import ArgumentNullException def has_params(data, *args): """ Validates required parameters against an object. :param data: :param args: required parameters :return: """ if not data: return False for a in args: if not a in data: return Fal...
22.628571
53
0.625
from ..exceptions import ArgumentNullException def has_params(data, *args): """ Validates required parameters against an object. :param data: :param args: required parameters :return: """ if not data: return False for a in args: if not a in data: return Fal...
327
0
46
cb883596b664a75c662994f10cbd5aef47d2a7e9
2,600
py
Python
korapp/korgen.py
korakotlee/korapp
e7aeedd8fe0dda85eacfd432ef74a16e875bd904
[ "MIT" ]
3
2020-01-18T15:46:03.000Z
2021-06-23T02:40:58.000Z
korapp/korgen.py
korakotlee/korapp
e7aeedd8fe0dda85eacfd432ef74a16e875bd904
[ "MIT" ]
null
null
null
korapp/korgen.py
korakotlee/korapp
e7aeedd8fe0dda85eacfd432ef74a16e875bd904
[ "MIT" ]
null
null
null
import os import io import yaml import stringcase # from pprint import pprint from pathlib import Path from korapp import kordir from korapp import utils
32.911392
79
0.517692
import os import io import yaml import stringcase # from pprint import pprint from pathlib import Path from korapp import kordir from korapp import utils def init(): print(f'KorApp Gen') if utils.is_running_in_app(): mm = utils.read_mm_dict('app.mm') # run model first if exists for no...
2,373
0
69
86db79e69512a53d6878bf63e8fbd20a9030ed43
5,377
py
Python
colour/models/rgb/transfer_functions/tests/test_arri_alexa_log_c.py
tjdcs/colour
09413da71b5da57408eb812797c5db1300d4791a
[ "BSD-3-Clause" ]
null
null
null
colour/models/rgb/transfer_functions/tests/test_arri_alexa_log_c.py
tjdcs/colour
09413da71b5da57408eb812797c5db1300d4791a
[ "BSD-3-Clause" ]
null
null
null
colour/models/rgb/transfer_functions/tests/test_arri_alexa_log_c.py
tjdcs/colour
09413da71b5da57408eb812797c5db1300d4791a
[ "BSD-3-Clause" ]
null
null
null
""" Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.arri_alexa_log_c` module. """ import numpy as np import unittest from colour.models.rgb.transfer_functions import ( log_encoding_ALEXALogC, log_decoding_ALEXALogC, ) from colour.utilities import domain_range_scale, ignore_numpy_error...
30.902299
79
0.652966
""" Define the unit tests for the :mod:`colour.models.rgb.transfer_functions.arri_alexa_log_c` module. """ import numpy as np import unittest from colour.models.rgb.transfer_functions import ( log_encoding_ALEXALogC, log_decoding_ALEXALogC, ) from colour.utilities import domain_range_scale, ignore_numpy_error...
0
0
0
b74e376018ab8b32f7b9f6d5f8f0affb3853c152
2,336
py
Python
server/endpoints/stations/normals.py
meteostat/meteostat-server
fecb4acab34ce97121a7c9a16e3ca1b4ffb55b7a
[ "MIT" ]
3
2021-04-11T03:28:45.000Z
2022-02-03T19:55:56.000Z
server/endpoints/stations/normals.py
meteostat/meteostat-server
fecb4acab34ce97121a7c9a16e3ca1b4ffb55b7a
[ "MIT" ]
1
2021-09-21T12:45:07.000Z
2021-09-23T08:53:56.000Z
server/endpoints/stations/normals.py
meteostat/meteostat-server
fecb4acab34ce97121a7c9a16e3ca1b4ffb55b7a
[ "MIT" ]
null
null
null
""" Meteostat JSON API Server The code is licensed under the MIT license. """ from datetime import datetime import json from flask import abort from meteostat import Normals, units from server import app, utils """ Meteostat configuration """ cache_time = 60 * 60 * 24 * 30 Normals.max_age = cache_time Normals.autoc...
22.037736
76
0.509846
""" Meteostat JSON API Server The code is licensed under the MIT license. """ from datetime import datetime import json from flask import abort from meteostat import Normals, units from server import app, utils """ Meteostat configuration """ cache_time = 60 * 60 * 24 * 30 Normals.max_age = cache_time Normals.autoc...
0
0
0
ed42316f4862d6d4bf6d506243ff399bd8b2b1a4
39,632
py
Python
tasks-deploy/xortop/generate.py
irdkwmnsb/lkshl-ctf
e5c0200ddc8ba73df5f321b87b9763fb1bbaba57
[ "MIT" ]
3
2021-03-30T06:27:58.000Z
2021-04-03T17:56:35.000Z
tasks-deploy/xortop/generate.py
irdkwmnsb/lkshl-ctf
e5c0200ddc8ba73df5f321b87b9763fb1bbaba57
[ "MIT" ]
null
null
null
tasks-deploy/xortop/generate.py
irdkwmnsb/lkshl-ctf
e5c0200ddc8ba73df5f321b87b9763fb1bbaba57
[ "MIT" ]
null
null
null
TITLE = "Xor - топ" STATEMENT_TEMPLATE = ''' Дан код, шифрующий флаг, и результат его работы. Получите флаг. ` with open("output.txt", "w") as f: key = 0 # some x 0<x<256 flag = "some string" encrypted_flag = [] for i in range(len(flag)): encrypted_flag.append(ord(flag[i]) ^ key) ...
1,651.333333
39,009
0.736677
TITLE = "Xor - топ" STATEMENT_TEMPLATE = ''' Дан код, шифрующий флаг, и результат его работы. Получите флаг. ` with open("output.txt", "w") as f: key = 0 # some x 0<x<256 flag = "some string" encrypted_flag = [] for i in range(len(flag)): encrypted_flag.append(ord(flag[i]) ^ key) ...
160
0
25
288fa040d3862010c7115aad033d1d53d73c41fa
4,072
py
Python
torchTest.py
Aniket-Gujarathi/d2-net
c716d37087390af04c8843452dadfa47a64cfbe2
[ "BSD-3-Clause-Clear" ]
6
2020-09-04T04:06:58.000Z
2021-11-29T08:41:37.000Z
torchTest.py
kinalmehta/d2-net
f0d63609730b06e064c037256e0e40bac5b5ca43
[ "BSD-3-Clause-Clear" ]
null
null
null
torchTest.py
kinalmehta/d2-net
f0d63609730b06e064c037256e0e40bac5b5ca43
[ "BSD-3-Clause-Clear" ]
3
2020-09-24T04:36:20.000Z
2022-01-12T08:40:49.000Z
from sys import argv, exit import torch import torchgeometry as tgm import cv2 import matplotlib.pyplot as plt import torch.nn as nn if __name__ == '__main__': imgFile1 = argv[1] imgFile2 = argv[2] # rotate(imgFile) # warp(imgFile2) image1 = cv2.imread(imgFile1)[..., (2,1,0)] img1 = tgm.utils.image_to_te...
24.238095
83
0.655206
from sys import argv, exit import torch import torchgeometry as tgm import cv2 import matplotlib.pyplot as plt import torch.nn as nn def rotate(imgFile): image = cv2.imread(imgFile)[..., (2,1,0)] print(image.shape) img = tgm.utils.image_to_tensor(image) img = torch.unsqueeze(img.float(), dim=0) alpha = 45.0 ...
3,328
2
116
80cb83322efa2905d1ee2abff0dd719d76dff1eb
5,285
py
Python
face_detection_3tiers/train.py
hqbao/dlp_tf
e8fe3281470faebbe8e36caf55025c270e84c44f
[ "MIT" ]
null
null
null
face_detection_3tiers/train.py
hqbao/dlp_tf
e8fe3281470faebbe8e36caf55025c270e84c44f
[ "MIT" ]
null
null
null
face_detection_3tiers/train.py
hqbao/dlp_tf
e8fe3281470faebbe8e36caf55025c270e84c44f
[ "MIT" ]
1
2021-12-30T08:55:37.000Z
2021-12-30T08:55:37.000Z
import tensorflow as tf import numpy as np from models import build_model as build_model from datagen import genxy from utils import genanchors, nsm, comiou train_anno_file_path = '../datasets/widerface/train1024.txt' train_image_dir = '../datasets/widerface/train1024' test_anno_file_path = '../datasets/widerface/tes...
29.361111
277
0.721665
import tensorflow as tf import numpy as np from models import build_model as build_model from datagen import genxy from utils import genanchors, nsm, comiou train_anno_file_path = '../datasets/widerface/train1024.txt' train_image_dir = '../datasets/widerface/train1024' test_anno_file_path = '../datasets/widerface/tes...
0
0
0
f9376f652040b2b3caee98ada7058c8c33d76636
1,784
py
Python
tracking/test_api.py
ScottEvansDBCA/it-assets
0728d4aa5894b15049b8ef26f8191ffe65167d7e
[ "Apache-2.0" ]
null
null
null
tracking/test_api.py
ScottEvansDBCA/it-assets
0728d4aa5894b15049b8ef26f8191ffe65167d7e
[ "Apache-2.0" ]
null
null
null
tracking/test_api.py
ScottEvansDBCA/it-assets
0728d4aa5894b15049b8ef26f8191ffe65167d7e
[ "Apache-2.0" ]
null
null
null
from itassets.test_api import ApiTestCase, random_dbca_email from mixer.backend.django import mixer from tracking.models import FreshdeskTicket, FreshdeskContact
36.408163
77
0.663677
from itassets.test_api import ApiTestCase, random_dbca_email from mixer.backend.django import mixer from tracking.models import FreshdeskTicket, FreshdeskContact class FreshdeskTicketResourceTestCase(ApiTestCase): def setUp(self): """Generate from FreshdeskTicket objects. """ super(Fresh...
0
1,597
23
acb16a421e55900fbc5585df2b117ae0c85369b2
889
py
Python
math_study/numpy_basics/data_types/data_types_conversion.py
PitPietro/pascal-triangle
eb81e9fc4728f4e09a631922c470201a9f897195
[ "MIT" ]
1
2020-03-11T10:20:53.000Z
2020-03-11T10:20:53.000Z
math_study/numpy_basics/data_types/data_types_conversion.py
PitPietro/python-structure
eb81e9fc4728f4e09a631922c470201a9f897195
[ "MIT" ]
1
2020-07-06T15:45:01.000Z
2020-07-06T15:50:32.000Z
math_study/numpy_basics/data_types/data_types_conversion.py
PitPietro/python-structure
eb81e9fc4728f4e09a631922c470201a9f897195
[ "MIT" ]
1
2020-07-02T05:21:58.000Z
2020-07-02T05:21:58.000Z
import numpy as np from math_study.numpy_basics.data_types.print_data_type_info import print_info if __name__ == '__main__': int_array = np.array(list(range(10)), dtype=np.int64) float_array = np.array(list(range(10)), dtype=np.float128) complex_array = np.array(list(range(10)), dtype=np.complex256) ...
35.56
78
0.748031
import numpy as np from math_study.numpy_basics.data_types.print_data_type_info import print_info if __name__ == '__main__': int_array = np.array(list(range(10)), dtype=np.int64) float_array = np.array(list(range(10)), dtype=np.float128) complex_array = np.array(list(range(10)), dtype=np.complex256) ...
0
0
0