hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
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
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
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
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f752c63f381267ad9898ebe0be9e1ec2d8fcf35f
54,707
py
Python
numpy/testing/tests/test_utils.py
weidan-wd/numpy
b7c27bd2a3817f59c84b004b87bba5db57d9a9b0
[ "BSD-3-Clause" ]
1
2020-02-01T11:13:07.000Z
2020-02-01T11:13:07.000Z
numpy/testing/tests/test_utils.py
weidan-wd/numpy
b7c27bd2a3817f59c84b004b87bba5db57d9a9b0
[ "BSD-3-Clause" ]
null
null
null
numpy/testing/tests/test_utils.py
weidan-wd/numpy
b7c27bd2a3817f59c84b004b87bba5db57d9a9b0
[ "BSD-3-Clause" ]
null
null
null
import warnings import sys import os import itertools import textwrap import pytest import weakref import numpy as np from numpy.testing import ( assert_equal, assert_array_equal, assert_almost_equal, assert_array_almost_equal, assert_array_less, build_err_msg, raises, assert_raises, assert_warns, assert_n...
34.277569
86
0.590564
import warnings import sys import os import itertools import textwrap import pytest import weakref import numpy as np from numpy.testing import ( assert_equal, assert_array_equal, assert_almost_equal, assert_array_almost_equal, assert_array_less, build_err_msg, raises, assert_raises, assert_warns, assert_n...
true
true
f752c691c5d06a0fef12389ad65bdc868032fce0
21,602
py
Python
reframe/core/systems.py
Lumi-supercomputer/reframe
f1e46807663db0b4f7e6b1252c4fcda6fbcc3270
[ "BSD-3-Clause" ]
null
null
null
reframe/core/systems.py
Lumi-supercomputer/reframe
f1e46807663db0b4f7e6b1252c4fcda6fbcc3270
[ "BSD-3-Clause" ]
3
2022-03-11T09:51:33.000Z
2022-03-31T08:20:19.000Z
reframe/core/systems.py
Lumi-supercomputer/reframe
f1e46807663db0b4f7e6b1252c4fcda6fbcc3270
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2016-2022 Swiss National Supercomputing Centre (CSCS/ETH Zurich) # ReFrame Project Developers. See the top-level LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause import re import json import reframe.utility as util import reframe.utility.jsonext as jsonext from reframe.core.backends imp...
30.904149
79
0.5799
import re import json import reframe.utility as util import reframe.utility.jsonext as jsonext from reframe.core.backends import (getlauncher, getscheduler) from reframe.core.environments import (Environment, ProgEnvironment) from reframe.core.logging import getlogger from reframe.core.modules import ModulesSystem ...
true
true
f752c71ae156d133302cc60d9601a3fe6ef763b7
450
py
Python
test/functions/async2.py
kylebarron/MagicPython
da6fa0793e2c85d3bf7709ff1d4f65ccf468db11
[ "MIT" ]
1,482
2015-10-16T21:59:32.000Z
2022-03-30T11:44:40.000Z
test/functions/async2.py
kylebarron/MagicPython
da6fa0793e2c85d3bf7709ff1d4f65ccf468db11
[ "MIT" ]
226
2015-10-15T15:53:44.000Z
2022-03-25T03:08:27.000Z
test/functions/async2.py
kylebarron/MagicPython
da6fa0793e2c85d3bf7709ff1d4f65ccf468db11
[ "MIT" ]
129
2015-10-20T02:41:49.000Z
2022-03-22T01:44:36.000Z
async = await = 2 async : keyword.control.flow.python, source.python : source.python = : keyword.operator.assignment.python, source.python : source.python await : keyword.control.flow.python, source.python : source.python = : keyword.o...
32.142857
65
0.586667
async = await = 2 async : keyword.control.flow.python, source.python : source.python = : keyword.operator.assignment.python, source.python : source.python await : keyword.control.flow.python, source.python : source.python = : keyword.o...
false
true
f752c753d6b622ebcae972dc486ecad34d3c7aa8
2,224
py
Python
pybb/proxies.py
thoas/pybbm
0e7ab7ef60f15951660015f2b9be0ff7192f1095
[ "BSD-2-Clause" ]
1
2015-05-18T09:19:30.000Z
2015-05-18T09:19:30.000Z
pybb/proxies.py
ulule/pybbm
0e7ab7ef60f15951660015f2b9be0ff7192f1095
[ "BSD-2-Clause" ]
5
2017-06-13T16:25:34.000Z
2018-07-17T20:30:56.000Z
pybb/proxies.py
ulule/pybbm
0e7ab7ef60f15951660015f2b9be0ff7192f1095
[ "BSD-2-Clause" ]
1
2018-10-29T13:12:59.000Z
2018-10-29T13:12:59.000Z
from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from guardian.models import UserObjectPermission as BaseUserObjectPermission from guardian.managers import UserObjectPermissionManager as BaseUserObjectPermissionManager from guardian.exceptions import ObjectNo...
34.215385
92
0.629047
from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from guardian.models import UserObjectPermission as BaseUserObjectPermission from guardian.managers import UserObjectPermissionManager as BaseUserObjectPermissionManager from guardian.exceptions import ObjectNo...
true
true
f752c831830930aa220fe7ecb0bcd9d9d2dfbf26
2,520
py
Python
tests/conftest.py
keiv-fly/python-tcod
5cb861090ea5400d21ba0c875e6d85a37e1a0e37
[ "BSD-2-Clause" ]
null
null
null
tests/conftest.py
keiv-fly/python-tcod
5cb861090ea5400d21ba0c875e6d85a37e1a0e37
[ "BSD-2-Clause" ]
null
null
null
tests/conftest.py
keiv-fly/python-tcod
5cb861090ea5400d21ba0c875e6d85a37e1a0e37
[ "BSD-2-Clause" ]
null
null
null
import random import warnings import pytest import tcod def pytest_addoption(parser): parser.addoption("--no-window", action="store_true", help="Skip tests which need a rendering context.") @pytest.fixture(scope="session", params=['SDL', 'SDL2']) def session_console(request): if(request.config.geto...
26.808511
78
0.659524
import random import warnings import pytest import tcod def pytest_addoption(parser): parser.addoption("--no-window", action="store_true", help="Skip tests which need a rendering context.") @pytest.fixture(scope="session", params=['SDL', 'SDL2']) def session_console(request): if(request.config.geto...
true
true
f752c8485c3a7f8df14d7ceedeb8a07d8619ddf3
4,435
py
Python
plugins/modules/panos_email_server.py
dstogsdill/pan-os-ansible
ce7be004d435a07ab32252903447d0a9fc691f00
[ "Apache-2.0" ]
null
null
null
plugins/modules/panos_email_server.py
dstogsdill/pan-os-ansible
ce7be004d435a07ab32252903447d0a9fc691f00
[ "Apache-2.0" ]
5
2021-06-01T05:58:47.000Z
2022-02-01T19:01:44.000Z
plugins/modules/panos_email_server.py
dstogsdill/pan-os-ansible
ce7be004d435a07ab32252903447d0a9fc691f00
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2019 Palo Alto Networks, 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 # #...
27.893082
83
0.660203
from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = """ --- module: panos_email_server short_description: Manage email servers in an email profile. description: - Manages email servers in an email server profile. author: "Garfield Lee Freeman (@shinmog)" version...
true
true
f752c84c33e28b38f132fd1dfa44e858bece5bd8
4,458
py
Python
sleepAnalytics/Sleep Analysis.py
ISTE-NITK/istesleep
caff596dfc02c67fc4fc11f4d386ba04b6e1a0d7
[ "MIT" ]
null
null
null
sleepAnalytics/Sleep Analysis.py
ISTE-NITK/istesleep
caff596dfc02c67fc4fc11f4d386ba04b6e1a0d7
[ "MIT" ]
null
null
null
sleepAnalytics/Sleep Analysis.py
ISTE-NITK/istesleep
caff596dfc02c67fc4fc11f4d386ba04b6e1a0d7
[ "MIT" ]
null
null
null
# coding: utf-8 # In[1]: import pandas as pd import matplotlib.pyplot as plt import matplotlib from matplotlib.dates import date2num import datetime import matplotlib.dates as mdates import time import numpy as np from datetime import date import matplotlib.lines as mlines from mpl_toolkits.mplot3d import Axes3D imp...
20.263636
145
0.637506
import pandas as pd import matplotlib.pyplot as plt import matplotlib from matplotlib.dates import date2num import datetime import matplotlib.dates as mdates import time import numpy as np from datetime import date import matplotlib.lines as mlines from mpl_toolkits.mplot3d import Axes3D import matplotlib.patches as...
true
true
f752ca06aee635d49b74f35b814a242ae39ac214
7,837
py
Python
contrib/bitrpc/bitrpc.py
ahmedbodi/bytecoin
fdc7831cdf931dbe394803c4a32e6a5e7436aea0
[ "MIT" ]
4
2015-06-12T04:28:15.000Z
2018-04-29T08:46:56.000Z
contrib/bitrpc/bitrpc.py
ahmedbodi/bytecoin
fdc7831cdf931dbe394803c4a32e6a5e7436aea0
[ "MIT" ]
null
null
null
contrib/bitrpc/bitrpc.py
ahmedbodi/bytecoin
fdc7831cdf931dbe394803c4a32e6a5e7436aea0
[ "MIT" ]
1
2017-06-13T12:28:36.000Z
2017-06-13T12:28:36.000Z
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:8332") else: access = Ser...
24.188272
79
0.668368
from jsonrpc import ServiceProxy import sys import string rpcuser = "" rpcpass = "" if rpcpass == "": access = ServiceProxy("http://127.0.0.1:8332") else: access = ServiceProxy("http://"+rpcuser+":"+rpcpass+"@127.0.0.1:8332") cmd = sys.argv[1].lower() if cmd == "backupwallet": try: path = raw_input("Enter dest...
false
true
f752cae01ac0412f3417077b702ab543c0d0114e
11,353
py
Python
redash/handlers/query_results.py
PicolotoLF/redash
42be730cf30ccf03e4071a09f616f4e5c7169fe0
[ "BSD-2-Clause" ]
1
2020-03-20T14:12:27.000Z
2020-03-20T14:12:27.000Z
redash/handlers/query_results.py
PicolotoLF/redash
42be730cf30ccf03e4071a09f616f4e5c7169fe0
[ "BSD-2-Clause" ]
8
2018-04-10T14:39:53.000Z
2022-02-13T15:50:30.000Z
redash/handlers/query_results.py
chriszs/redash
d2882c77eb2f093fee3687abe931e68a51b01625
[ "BSD-2-Clause" ]
null
null
null
import logging import time from flask import make_response, request from flask_login import current_user from flask_restful import abort from redash import models, settings from redash.tasks import QueryTask from redash.permissions import require_permission, not_view_only, has_access, require_access, view_only from re...
40.838129
136
0.640976
import logging import time from flask import make_response, request from flask_login import current_user from flask_restful import abort from redash import models, settings from redash.tasks import QueryTask from redash.permissions import require_permission, not_view_only, has_access, require_access, view_only from re...
true
true
f752cb10963113d149d4a4a339348a6c575a1efa
2,988
py
Python
PyPrograms/contacts/functions.py
JymPatel/Python
6c643339ce12d26071336c87a88e94550cb13ea8
[ "MIT" ]
null
null
null
PyPrograms/contacts/functions.py
JymPatel/Python
6c643339ce12d26071336c87a88e94550cb13ea8
[ "MIT" ]
null
null
null
PyPrograms/contacts/functions.py
JymPatel/Python
6c643339ce12d26071336c87a88e94550cb13ea8
[ "MIT" ]
null
null
null
fname = 0 lname = 1 number = 2 email = 3 def printallcontacts(arraylen, array): print("") print("== YOUR CONTACT LIST ==") print("|") i1 = 0 # print all names while i1 < arraylen: print(f"| {array[fname][i1]} {array[lname][i1]}, {array[number][i1]} {array[email][i1]}"...
32.129032
101
0.477912
fname = 0 lname = 1 number = 2 email = 3 def printallcontacts(arraylen, array): print("") print("== YOUR CONTACT LIST ==") print("|") i1 = 0 while i1 < arraylen: print(f"| {array[fname][i1]} {array[lname][i1]}, {array[number][i1]} {array[email][i1]}") i1 += 1 ...
true
true
f752cbfef4c82660390a9fe6dec369c15ddaa331
945
py
Python
ulid/consts.py
xkortex/ulid
96bdb1daad7ce96f6db8c91ac0410b66d2e1c4c1
[ "Apache-2.0" ]
303
2017-06-15T14:41:41.000Z
2022-03-28T11:46:50.000Z
ulid/consts.py
xkortex/ulid
96bdb1daad7ce96f6db8c91ac0410b66d2e1c4c1
[ "Apache-2.0" ]
387
2017-06-16T14:47:31.000Z
2022-03-24T05:55:44.000Z
ulid/consts.py
xkortex/ulid
96bdb1daad7ce96f6db8c91ac0410b66d2e1c4c1
[ "Apache-2.0" ]
21
2017-06-16T20:00:33.000Z
2022-03-23T04:14:04.000Z
""" ulid/consts ~~~~~~~~~~~ Contains public API constant values. """ from . import ulid __all__ = ['MIN_TIMESTAMP', 'MAX_TIMESTAMP', 'MIN_RANDOMNESS', 'MAX_RANDOMNESS', 'MIN_ULID', 'MAX_ULID'] #: Minimum possible timestamp value (0). MIN_TIMESTAMP = ulid.Timestamp(b'\x00\x00\x00\x00\x00\x00') #: Maximu...
28.636364
104
0.739683
from . import ulid __all__ = ['MIN_TIMESTAMP', 'MAX_TIMESTAMP', 'MIN_RANDOMNESS', 'MAX_RANDOMNESS', 'MIN_ULID', 'MAX_ULID'] MIN_TIMESTAMP = ulid.Timestamp(b'\x00\x00\x00\x00\x00\x00') MAX_TIMESTAMP = ulid.Timestamp(b'\xff\xff\xff\xff\xff\xff') MIN_RANDOMNESS = ulid.Randomness(b'\x00\x00\x00\x00\x00\x00\x00\x00\x0...
true
true
f752ccdc4d1425963ee3a3657e462fda4da334fc
3,422
py
Python
common.py
romanian-parlamint/parsers
a2fc870c0b06fc5b9db00b92d91f4d33ad5ded4a
[ "MIT" ]
null
null
null
common.py
romanian-parlamint/parsers
a2fc870c0b06fc5b9db00b92d91f4d33ad5ded4a
[ "MIT" ]
1
2022-03-02T10:41:33.000Z
2022-03-02T10:41:33.000Z
common.py
romanian-parlamint/parsers
a2fc870c0b06fc5b9db00b92d91f4d33ad5ded4a
[ "MIT" ]
null
null
null
import re def build_speaker_id(speaker_name): """Builds the id of the speaker from its name. Parameters ---------- speaker_name: str The name of the speaker. Returns ------- speaker_id: str The id of the speaker. """ canonical_name = re.sub(r'\s+', '-', speaker_na...
27.376
107
0.62069
import re def build_speaker_id(speaker_name): canonical_name = re.sub(r'\s+', '-', speaker_name, 0, re.MULTILINE) speaker_id = "#{}".format(canonical_name) return speaker_id def get_element_text(element): text = ''.join(element.itertext()) return text class OrganizationType: Independent = ...
true
true
f752cd17b40f220bcb962691cd2dd85c4275b692
69,863
py
Python
OmsAgent/omsagent.py
nidhanda/azure-linux-extensions
e63403257f260f85067939d31d29f5faf653bdb9
[ "Apache-2.0" ]
null
null
null
OmsAgent/omsagent.py
nidhanda/azure-linux-extensions
e63403257f260f85067939d31d29f5faf653bdb9
[ "Apache-2.0" ]
null
null
null
OmsAgent/omsagent.py
nidhanda/azure-linux-extensions
e63403257f260f85067939d31d29f5faf653bdb9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # OmsAgentForLinux Extension # # Copyright 2015 Microsoft Corporation # # 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....
39.921714
287
0.634585
import os import os.path import pwd import grp import re import sys import traceback import time import platform import subprocess import json import base64 import inspect import urllib import urllib2 import watcherutil import shutil from threading import Thread try: from Utils.WAAgentUtil import waagent imp...
false
true
f752cd4b86ced7571c52f76bbc42f3014d07fb96
1,329
py
Python
test/test_copyright_license.py
Theosakamg/colcon-ros-bazel
8fdde5e0b1284e4b3c8a5812b64c6a3519a83b28
[ "Apache-2.0" ]
6
2018-08-24T00:46:59.000Z
2022-03-09T02:09:55.000Z
test/test_copyright_license.py
Theosakamg/colcon-ros-bazel
8fdde5e0b1284e4b3c8a5812b64c6a3519a83b28
[ "Apache-2.0" ]
1
2018-09-12T04:38:03.000Z
2018-10-12T21:57:06.000Z
test/test_copyright_license.py
Theosakamg/colcon-ros-bazel
8fdde5e0b1284e4b3c8a5812b64c6a3519a83b28
[ "Apache-2.0" ]
3
2018-09-01T16:07:24.000Z
2021-12-23T05:09:38.000Z
# Copyright 2016-2018 Dirk Thomas # Copyright 2018 Mickael Gaillard # Licensed under the Apache License, Version 2.0 from pathlib import Path import sys def test_copyright_licence(): missing = check_files([Path(__file__).parents[1]]) assert not len(missing), \ 'In some files no copyright / license li...
31.642857
75
0.544771
from pathlib import Path import sys def test_copyright_licence(): missing = check_files([Path(__file__).parents[1]]) assert not len(missing), \ 'In some files no copyright / license line was found' def check_files(paths): missing = [] for path in paths: if path.is_dir(): ...
true
true
f752ce5bd80e9695dbdc7db47c8430254f065339
1,481
py
Python
gpvdm_gui/gui/gui_enable.py
roderickmackenzie/gpvdm
914fd2ee93e7202339853acaec1d61d59b789987
[ "BSD-3-Clause" ]
12
2016-09-13T08:58:13.000Z
2022-01-17T07:04:52.000Z
gpvdm_gui/gui/gui_enable.py
roderickmackenzie/gpvdm
914fd2ee93e7202339853acaec1d61d59b789987
[ "BSD-3-Clause" ]
3
2017-11-11T12:33:02.000Z
2019-03-08T00:48:08.000Z
gpvdm_gui/gui/gui_enable.py
roderickmackenzie/gpvdm
914fd2ee93e7202339853acaec1d61d59b789987
[ "BSD-3-Clause" ]
6
2019-01-03T06:17:12.000Z
2022-01-01T15:59:00.000Z
# # General-purpose Photovoltaic Device Model - a drift diffusion base/Shockley-Read-Hall # model for 1st, 2nd and 3rd generation solar cells. # Copyright (C) 2008-2022 Roderick C. I. MacKenzie r.c.i.mackenzie at googlemail.com # # https://www.gpvdm.com # # This program is free software; you can redist...
25.982456
108
0.72181
import sys import os enabled=False def gui_test(): global enabled for arg in sys.argv: if arg.startswith("--") and arg!="--load": enabled=False return try: from PyQt5.QtWidgets import QWidget enabled=True except: enabled=False pass def set_gui(value): global enabled enabled=value def gu...
true
true
f752ce757ff6009cd63eb80491f7f8e9b664773d
11,596
py
Python
util/device.py
cztian/prjbureau
22d959ab2988570052e79a4ad96bc0bca3ad723f
[ "0BSD" ]
34
2019-12-12T07:52:47.000Z
2022-03-12T13:52:51.000Z
util/device.py
RobertBaruch/prjbureau
8631e0f661047747de7121e5ab3e6da5f2828c48
[ "0BSD" ]
9
2020-08-10T15:22:59.000Z
2021-06-13T19:33:08.000Z
util/device.py
RobertBaruch/prjbureau
8631e0f661047747de7121e5ab3e6da5f2828c48
[ "0BSD" ]
4
2020-08-10T15:13:45.000Z
2021-06-12T16:37:03.000Z
# Be careful modifying this file: line ranges from it are included in docs/jtag/as.rst. import enum from bitarray import bitarray __all__ = ['ATF15xxInstr', 'ATF1502ASDevice', 'ATF1504ASDevice', 'ATF1508ASDevice'] class ATF15xxInstr(enum.IntEnum): EXTEST = 0x000 SAMPLE = 0x055 ...
37.286174
87
0.541652
import enum from bitarray import bitarray __all__ = ['ATF15xxInstr', 'ATF1502ASDevice', 'ATF1504ASDevice', 'ATF1508ASDevice'] class ATF15xxInstr(enum.IntEnum): EXTEST = 0x000 SAMPLE = 0x055 IDCODE = 0x059 ISC_READ_UES = 0x270 ISC_CONFIG = ...
true
true
f752cf4edd2a7a89ac0584d8b8cf4ba2fc64be09
1,925
py
Python
collecte/postes_plage_snsm/convert.py
entrepreneur-interet-general/predisauvetage
4d985ee79355652709da322db48daffb3e5a895a
[ "MIT" ]
6
2018-02-16T15:07:17.000Z
2020-10-09T09:34:29.000Z
collecte/postes_plage_snsm/convert.py
entrepreneur-interet-general/predisauvetage
4d985ee79355652709da322db48daffb3e5a895a
[ "MIT" ]
107
2018-03-29T14:55:33.000Z
2021-12-13T19:44:50.000Z
collecte/postes_plage_snsm/convert.py
entrepreneur-interet-general/predisauvetage
4d985ee79355652709da322db48daffb3e5a895a
[ "MIT" ]
1
2021-03-03T21:02:33.000Z
2021-03-03T21:02:33.000Z
# -*- coding: utf-8 -*- from bs4 import BeautifulSoup import pandas as pd # Likely coming from # https://www.google.com/maps/d/viewer?mid=151Itl_57S7UlpC7P-TdfvT2Pz7Y class KMLConverter(object): def __init__(self, filepath): self.filepath = filepath self.postes = [] self.parse() def ...
35.648148
79
0.539221
from bs4 import BeautifulSoup import pandas as pd class KMLConverter(object): def __init__(self, filepath): self.filepath = filepath self.postes = [] self.parse() def clean_key(self, key): return { u'DÉPARTEMENT': 'departement', 'NB DE SAUVETEURS SNSM'...
true
true
f752cfd667b2437606e420767fde3526c3b5b2f7
37,113
py
Python
presto/Preprocessors/Upscale/Structured/StructuredUpscalingMethods.py
padmec-reservoir/PRESTO
d9ab92f2df020a36d13040ce6157162402b93c8e
[ "MIT" ]
42
2017-05-04T05:29:19.000Z
2021-09-15T14:03:33.000Z
presto/Preprocessors/Upscale/Structured/StructuredUpscalingMethods.py
jpra2/Presto2
71525a8dece2bcc4f16ff4a2120d7627e9ecd776
[ "CNRI-Python" ]
null
null
null
presto/Preprocessors/Upscale/Structured/StructuredUpscalingMethods.py
jpra2/Presto2
71525a8dece2bcc4f16ff4a2120d7627e9ecd776
[ "CNRI-Python" ]
15
2017-06-19T20:09:06.000Z
2021-06-02T12:40:42.000Z
import numpy as np import collections import time from pymoab import types from pymoab import topo_util from PyTrilinos import Epetra, AztecOO, ML class StructuredUpscalingMethods: """Defines a structured upscaling mesh representation Parameters ---------- coarse_ratio: List or array of integers ...
44.287589
79
0.488589
import numpy as np import collections import time from pymoab import types from pymoab import topo_util from PyTrilinos import Epetra, AztecOO, ML class StructuredUpscalingMethods: def __init__(self, coarse_ratio, mesh_size, block_size, method, moab): self.coarse_ratio = coarse_ratio self.mesh_si...
true
true
f752d08074fc614533e2e4b3e936f97f4e2ac97d
3,108
py
Python
events_library/admin.py
SelfHacked/events-library
cc60e9db70fd77281f773215082cc43b3232b1b5
[ "MIT" ]
null
null
null
events_library/admin.py
SelfHacked/events-library
cc60e9db70fd77281f773215082cc43b3232b1b5
[ "MIT" ]
1
2021-04-09T15:30:13.000Z
2021-04-09T15:30:13.000Z
events_library/admin.py
SelfHacked/events-library
cc60e9db70fd77281f773215082cc43b3232b1b5
[ "MIT" ]
2
2021-03-28T11:19:03.000Z
2021-06-03T11:43:43.000Z
import typing from django.contrib import admin from django.db.models import Model, QuerySet from django.http.request import HttpRequest from .core import EventApi from .domain import EventLog, HandlerLog, SyncTask class InmutableAdminModel(admin.ModelAdmin): """Admin model class that disables the Add and Ed...
27.504425
87
0.627091
import typing from django.contrib import admin from django.db.models import Model, QuerySet from django.http.request import HttpRequest from .core import EventApi from .domain import EventLog, HandlerLog, SyncTask class InmutableAdminModel(admin.ModelAdmin): def has_add_permission(self, request: HttpRequest) -...
true
true
f752d12c41bdb58d8a797ff5179d17433e2b6b1f
816
py
Python
apps/account/urls.py
convers39/IR-ecommerce
57665aace80c14b52a40a9576de8b433a13f8f3f
[ "MIT" ]
2
2021-10-12T11:04:57.000Z
2022-01-04T08:17:11.000Z
apps/account/urls.py
convers39/IR-ecommerce
57665aace80c14b52a40a9576de8b433a13f8f3f
[ "MIT" ]
null
null
null
apps/account/urls.py
convers39/IR-ecommerce
57665aace80c14b52a40a9576de8b433a13f8f3f
[ "MIT" ]
1
2021-04-30T16:43:29.000Z
2021-04-30T16:43:29.000Z
from django.urls import path from .views import (LoginView, LogoutView, RegisterView, ActivateView, PasswordResetView, AccountCenterView, OrderListView, AddressView, WishlistView) app_name = 'account' urlpatterns = [ path('', AccountCenterView.as_view(), name='center'), path('order/', Orde...
48
89
0.686275
from django.urls import path from .views import (LoginView, LogoutView, RegisterView, ActivateView, PasswordResetView, AccountCenterView, OrderListView, AddressView, WishlistView) app_name = 'account' urlpatterns = [ path('', AccountCenterView.as_view(), name='center'), path('order/', Orde...
true
true
f752d16ce8105909fcf9dc454fe5dbe22ad46152
5,509
py
Python
wsgidav/samples/mongo_dav_provider.py
jaredrunyon/wsgidav
2e375551f1961380d7afd2cbcf3bef32bb98b8d7
[ "MIT" ]
62
2015-02-05T08:16:33.000Z
2022-02-25T20:51:32.000Z
wsgidav/samples/mongo_dav_provider.py
jaredrunyon/wsgidav
2e375551f1961380d7afd2cbcf3bef32bb98b8d7
[ "MIT" ]
32
2015-01-29T09:46:18.000Z
2022-02-15T03:27:29.000Z
wsgidav/samples/mongo_dav_provider.py
jaredrunyon/wsgidav
2e375551f1961380d7afd2cbcf3bef32bb98b8d7
[ "MIT" ]
59
2015-02-02T02:36:16.000Z
2022-02-14T01:55:21.000Z
# -*- coding: utf-8 -*- # (c) 2009-2020 Martin Wendt and contributors; see WsgiDAV https://github.com/mar10/wsgidav # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php """ Implementation of a WebDAV provider that provides a very basic, read-only resource layer emulation of a MongoDB dat...
33.591463
91
0.5943
from bson.objectid import ObjectId from pprint import pformat from wsgidav import compat, util from wsgidav.dav_provider import DAVCollection, DAVNonCollection, DAVProvider from wsgidav.util import join_uri import pymongo __docformat__ = "reStructuredText" _logger = util.get_module_logger(__name__) class Connecti...
true
true
f752d1cd0aa959a32f09313b203ecafab721cdc9
12,099
py
Python
tensorflow/python/module/module.py
satsumas/tensorflow
6a286bfcfeebcfa2b91b95334d83d9f0edf735b9
[ "Apache-2.0" ]
3
2017-11-09T17:40:28.000Z
2021-11-17T10:24:19.000Z
tensorflow/python/module/module.py
jensfreudenau/tensorflow
3fe3f2b1984aab6f159b89aa3ab0069988925689
[ "Apache-2.0" ]
null
null
null
tensorflow/python/module/module.py
jensfreudenau/tensorflow
3fe3f2b1984aab6f159b89aa3ab0069988925689
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
34.08169
80
0.661129
from __future__ import absolute_import from __future__ import division from __future__ import print_function import re from tensorflow.python.framework import ops from tensorflow.python.ops import resource_variable_ops from tensorflow.python.ops import variables from tensorflow.python.training.tracking import tracki...
true
true
f752d279d1015f3b8a3fa8572aff6d39c3b69f42
2,826
py
Python
special_k/tests/test_registry.py
namoopsoo/special_k
816ad200e8608d862e20971dc2bc4d2724aaf0bc
[ "Apache-2.0" ]
null
null
null
special_k/tests/test_registry.py
namoopsoo/special_k
816ad200e8608d862e20971dc2bc4d2724aaf0bc
[ "Apache-2.0" ]
null
null
null
special_k/tests/test_registry.py
namoopsoo/special_k
816ad200e8608d862e20971dc2bc4d2724aaf0bc
[ "Apache-2.0" ]
null
null
null
# Copyright 2020-present Kensho Technologies, LLC. import unittest from ..serializers.base import BaseIO from ..serializers.base_serializers import PickleIO, get_base_serializer_map from ..serializers.registry import SerializerRegistry class MockSerializer(BaseIO): @staticmethod def _deserialize_from_stream(...
38.712329
88
0.703468
import unittest from ..serializers.base import BaseIO from ..serializers.base_serializers import PickleIO, get_base_serializer_map from ..serializers.registry import SerializerRegistry class MockSerializer(BaseIO): @staticmethod def _deserialize_from_stream(stream): @staticmethod def _serialize_to_s...
true
true
f752d2ababf0ccbf3b48c5f2e174011cbb4c235f
6,311
py
Python
tests/test_assert_immediate.py
leonardt/fault
b16dec55fa287f0cf96e4083ec98a82a721bc971
[ "BSD-3-Clause" ]
31
2018-07-16T15:03:14.000Z
2022-03-10T08:36:09.000Z
tests/test_assert_immediate.py
leonardt/fault
b16dec55fa287f0cf96e4083ec98a82a721bc971
[ "BSD-3-Clause" ]
216
2018-07-18T20:00:34.000Z
2021-10-05T17:40:47.000Z
tests/test_assert_immediate.py
leonardt/fault
b16dec55fa287f0cf96e4083ec98a82a721bc971
[ "BSD-3-Clause" ]
10
2019-02-17T00:56:58.000Z
2021-11-05T13:31:37.000Z
from contextlib import nullcontext import tempfile import pytest import fault as f import magma as m from fault.verilator_utils import verilator_version from .test_property import requires_ncsim @pytest.mark.parametrize('success_msg', [None, "OK"]) @pytest.mark.parametrize('failure_msg', [None, "FAILED"]) @pytest.ma...
35.256983
78
0.55427
from contextlib import nullcontext import tempfile import pytest import fault as f import magma as m from fault.verilator_utils import verilator_version from .test_property import requires_ncsim @pytest.mark.parametrize('success_msg', [None, "OK"]) @pytest.mark.parametrize('failure_msg', [None, "FAILED"]) @pytest.ma...
true
true
f752d2d9c8fc88d1a9bf4d9ff7c758dc752a3044
1,557
py
Python
tests/test_openDataset.py
1271756664/xgrads
d563a3668a37f10c525711ee8a76ca614962377f
[ "MIT" ]
40
2020-03-15T13:09:47.000Z
2022-01-18T15:36:34.000Z
tests/test_openDataset.py
wqshen/xgrads
d563a3668a37f10c525711ee8a76ca614962377f
[ "MIT" ]
31
2020-03-09T06:27:17.000Z
2022-03-28T03:57:04.000Z
tests/test_openDataset.py
wqshen/xgrads
d563a3668a37f10c525711ee8a76ca614962377f
[ "MIT" ]
15
2020-03-24T03:26:53.000Z
2021-12-10T02:13:50.000Z
# -*- coding: utf-8 -*- """ Created on 2020.03.02 @author: MiniUFO Copyright 2018. All rights reserved. Use is subject to license terms. """ from xgrads.xgrads import open_CtlDataset, open_mfdataset import xarray as xr dset = open_CtlDataset('D:/Data/ULFI/output/2017101712_1721.ctl') dset.sst[-1].where(dset.sst[-1]!=...
27.803571
69
0.716763
from xgrads.xgrads import open_CtlDataset, open_mfdataset import xarray as xr dset = open_CtlDataset('D:/Data/ULFI/output/2017101712_1721.ctl') dset.sst[-1].where(dset.sst[-1]!=-999).plot() dset = open_CtlDataset('D:/Data/ERAInterim/ElenaIsen/ElenaTest.ctl') dset.ut[-1].plot() dset = open_CtlDataset('D:/Data/ERAInte...
true
true
f752d3e5777b0e167bf352166b64fdec1029469b
9,836
py
Python
sdk/python/pulumi_azure/databasemigration/service.py
suresh198526/pulumi-azure
bf27206a38d7a5c58b3c2c57ec8769fe3d0fc5d7
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/databasemigration/service.py
suresh198526/pulumi-azure
bf27206a38d7a5c58b3c2c57ec8769fe3d0fc5d7
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/databasemigration/service.py
suresh198526/pulumi-azure
bf27206a38d7a5c58b3c2c57ec8769fe3d0fc5d7
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilitie...
50.183673
243
0.670089
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables __all__ = ['Service'] class Service(pulumi.CustomResource): def __init__(__self__, resource_name: str, opts: Optional[pulumi.Resourc...
true
true
f752d4ec1ad09c86be66179d096418913c8ffdc5
478
py
Python
P25019-Beijing-Panda/week01/000_confirm_name.py
tonylhb/python-25
321793d5abe92b71fe5a89f0d5022cced9277406
[ "Apache-2.0" ]
1
2019-09-11T23:24:58.000Z
2019-09-11T23:24:58.000Z
P25019-Beijing-Panda/week01/000_confirm_name.py
tonylhb/python-25
321793d5abe92b71fe5a89f0d5022cced9277406
[ "Apache-2.0" ]
null
null
null
P25019-Beijing-Panda/week01/000_confirm_name.py
tonylhb/python-25
321793d5abe92b71fe5a89f0d5022cced9277406
[ "Apache-2.0" ]
5
2019-09-11T06:33:34.000Z
2020-02-17T12:52:31.000Z
while True: s = input('Input your Github directory name: ') if not s.startswith('P'): print('The name must starts with P !') continue name_list = s.split('-') if len(name_list) != 3: print('The name must be like P25000-Beijing-Wei !') continue if name_list != [x.ca...
25.157895
59
0.585774
while True: s = input('Input your Github directory name: ') if not s.startswith('P'): print('The name must starts with P !') continue name_list = s.split('-') if len(name_list) != 3: print('The name must be like P25000-Beijing-Wei !') continue if name_list != [x.ca...
true
true
f752d67a346ec58cb3a82c1863fc798491691221
2,251
py
Python
uw_libraries/mylib.py
uw-it-aca/uw-restclients-libraries
4c72049b2c6c8df3bb5f6aba78af8135532d1685
[ "Apache-2.0" ]
null
null
null
uw_libraries/mylib.py
uw-it-aca/uw-restclients-libraries
4c72049b2c6c8df3bb5f6aba78af8135532d1685
[ "Apache-2.0" ]
8
2017-04-17T16:46:10.000Z
2021-04-16T22:35:41.000Z
uw_libraries/mylib.py
uw-it-aca/uw-restclients-libraries
4c72049b2c6c8df3bb5f6aba78af8135532d1685
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 """ This is the interface for interacting with the UW Libraries Web Service. """ from datetime import datetime from dateutil.parser import parse import json from urllib.parse import urlencode from uw_libraries.dao import MyLib_DAO ...
29.618421
78
0.717459
from datetime import datetime from dateutil.parser import parse import json from urllib.parse import urlencode from uw_libraries.dao import MyLib_DAO from uw_libraries.models import MyLibAccount from restclients_core.exceptions import DataFailureException MyLibDao = MyLib_DAO() mylib_url_prefix = '/mylibinfo/v1/' ...
true
true
f752d6d0db33081f49a824401035745f30f5ad9d
5,153
py
Python
gbpclient/gbp/v2_0/purge.py
noironetworks/python-group-based-policy-client
150c9b0d752bfea79651253d9fa3382842df1a69
[ "Apache-2.0" ]
null
null
null
gbpclient/gbp/v2_0/purge.py
noironetworks/python-group-based-policy-client
150c9b0d752bfea79651253d9fa3382842df1a69
[ "Apache-2.0" ]
null
null
null
gbpclient/gbp/v2_0/purge.py
noironetworks/python-group-based-policy-client
150c9b0d752bfea79651253d9fa3382842df1a69
[ "Apache-2.0" ]
1
2015-09-29T21:36:04.000Z
2015-09-29T21:36:04.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
42.586777
78
0.556957
import re import sys from neutronclient.common import exceptions as nexc from neutronclient.neutron.v2_0 import purge as n_purge AUTO_PTG_REGEX = 'auto[0-9a-f]{32}\Z' class Purge(n_purge.Purge): def _pluralize(self, string): if re.search('_policy$', string): return re.sub('_policy$', '_pol...
true
true
f752d73b8ec133c11bf505c8924a991ee04c73aa
6,075
py
Python
scripts/cra-bundle-stats-diff.py
wikimedia/operations-debs-karma
c51b0caafd687d043617070cbb97ff446b55ae7a
[ "Apache-2.0" ]
1,533
2018-09-10T04:02:07.000Z
2022-03-31T12:17:31.000Z
scripts/cra-bundle-stats-diff.py
supertassu/karma
c564229c8e34109db861b8464d18884106b63a38
[ "Apache-2.0" ]
1,331
2018-09-09T13:34:04.000Z
2022-03-31T19:24:23.000Z
scripts/cra-bundle-stats-diff.py
supertassu/karma
c564229c8e34109db861b8464d18884106b63a38
[ "Apache-2.0" ]
153
2018-09-14T21:18:34.000Z
2022-03-22T14:19:21.000Z
#!/usr/bin/env python3 from collections import namedtuple import json import os import sys Bundle = namedtuple('Bundle' , 'seq ext bundleName totalBytes files') Diff = namedtuple('Diff', 'status path oldBytes newBytes isBigger diff') BundleDiff = namedtuple('BundleDiff', 'total files') class Status: added ...
26.413043
78
0.534156
from collections import namedtuple import json import os import sys Bundle = namedtuple('Bundle' , 'seq ext bundleName totalBytes files') Diff = namedtuple('Diff', 'status path oldBytes newBytes isBigger diff') BundleDiff = namedtuple('BundleDiff', 'total files') class Status: added = 'added' modified...
true
true
f752d7728292ad7c2868c0af279d38064cb8111f
408
py
Python
CalendarApp/migrations/0002_calendar_test.py
FranckyCastell/DjangoCalendar
f6d75bff0c23b7d3fd259aea260f61a852ae4e6e
[ "Apache-2.0" ]
null
null
null
CalendarApp/migrations/0002_calendar_test.py
FranckyCastell/DjangoCalendar
f6d75bff0c23b7d3fd259aea260f61a852ae4e6e
[ "Apache-2.0" ]
null
null
null
CalendarApp/migrations/0002_calendar_test.py
FranckyCastell/DjangoCalendar
f6d75bff0c23b7d3fd259aea260f61a852ae4e6e
[ "Apache-2.0" ]
null
null
null
# Generated by Django 4.0 on 2021-12-11 18:41 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('CalendarApp', '0001_initial'), ] operations = [ migrations.AddField( model_name='calendar', name='test', f...
21.473684
83
0.602941
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('CalendarApp', '0001_initial'), ] operations = [ migrations.AddField( model_name='calendar', name='test', field=models.DateTimeField(blank=True, null=Tru...
true
true
f752d8a8b681fd9b65d1a26ee2bba64b041c4ac3
4,480
py
Python
ProjectJarvis.py
ming2242/project_jarvis_for_linux
5bb93f8e6a55d38e7146d55d362314ab890aa776
[ "MIT" ]
null
null
null
ProjectJarvis.py
ming2242/project_jarvis_for_linux
5bb93f8e6a55d38e7146d55d362314ab890aa776
[ "MIT" ]
null
null
null
ProjectJarvis.py
ming2242/project_jarvis_for_linux
5bb93f8e6a55d38e7146d55d362314ab890aa776
[ "MIT" ]
null
null
null
#build by mingH 06/12/2016 01:00 import speech_recognition as sr from datetime import datetime import pyttsx import os import time import pyowm import re #set up the text to speech engine engine = pyttsx.init() rate = engine.getProperty('rate') engine.setProperty('rate', 150) engine.setProperty('voice', 1) #openweathe...
35.84
109
0.621652
import speech_recognition as sr from datetime import datetime import pyttsx import os import time import pyowm import re engine = pyttsx.init() rate = engine.getProperty('rate') engine.setProperty('rate', 150) engine.setProperty('voice', 1) owmAPI_key = '01ac0d6eccb4b34fc0e9ee925ac40a3d' owm = pyowm.OWM(owmAPI_key) W...
true
true
f752d9223bd52af14c8cbf480e39a707c146f401
10,711
py
Python
src/main/python/OptionsData.py
RookiePC/Img2url
04cc58516429a1c927bfa2f18e31984bf830aab1
[ "MIT" ]
1
2020-02-16T15:12:46.000Z
2020-02-16T15:12:46.000Z
src/main/python/OptionsData.py
RookiePC/Img2url
04cc58516429a1c927bfa2f18e31984bf830aab1
[ "MIT" ]
null
null
null
src/main/python/OptionsData.py
RookiePC/Img2url
04cc58516429a1c927bfa2f18e31984bf830aab1
[ "MIT" ]
null
null
null
""" MIT License Copyright (c) 2019 RookiePC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, dist...
36.308475
117
0.647185
import os import sys import enum import configparser from Tools import ShareTools class WorkMode(enum.Enum): key_word_replace_mode = 1 hot_key_mode = 2 class Options: def __init__(self): super().__init__() self.platform: str = sys.platform self.config_parser: configparser...
true
true
f752d9278b70cce864c845598ce98a7f1ee21c54
27,025
py
Python
sim/fighters.py
Tjorriemorrie/ufc
46918c91e1ccf464d9d03dc8524dab91eca239d2
[ "Apache-2.0" ]
1
2019-11-10T14:14:42.000Z
2019-11-10T14:14:42.000Z
sim/fighters.py
Tjorriemorrie/ufc
46918c91e1ccf464d9d03dc8524dab91eca239d2
[ "Apache-2.0" ]
2
2020-09-25T23:55:31.000Z
2022-02-10T00:20:20.000Z
sim/fighters.py
Tjorriemorrie/ufc
46918c91e1ccf464d9d03dc8524dab91eca239d2
[ "Apache-2.0" ]
null
null
null
############################################################################################### # mens ############################################################################################### MENS_CATCH_WEIGHT = 'mens catch weight' # ??.?kg MENS_STRAWWEIGHT = 'mens strawweight' # 52.5kg MENS_FLYWEIGHT = '...
32.172619
95
0.771397
MENS_CATCH_WEIGHT = 'mens catch weight' MENS_STRAWWEIGHT = 'mens strawweight' MENS_FLYWEIGHT = 'mens flyweight' ALEXANDRE_PANTOJA = 'Alexandre Pantoja' ASHKAN_MOKHTARIAN = 'Ashkan Mokhtarian' BEN_NGUYEN = 'Ben Nguyen' BRANDON_MORENO = 'Brandon Moreno' DEIVESON_FIGUEIREDO = 'Deiveson Figueiredo' DEMETRIOUS_JOHNS...
true
true
f752d934dc65851a7786406ea5fa7a85ebec2119
1,425
py
Python
observations/r/smoking.py
hajime9652/observations
2c8b1ac31025938cb17762e540f2f592e302d5de
[ "Apache-2.0" ]
199
2017-07-24T01:34:27.000Z
2022-01-29T00:50:55.000Z
observations/r/smoking.py
hajime9652/observations
2c8b1ac31025938cb17762e540f2f592e302d5de
[ "Apache-2.0" ]
46
2017-09-05T19:27:20.000Z
2019-01-07T09:47:26.000Z
observations/r/smoking.py
hajime9652/observations
2c8b1ac31025938cb17762e540f2f592e302d5de
[ "Apache-2.0" ]
45
2017-07-26T00:10:44.000Z
2022-03-16T20:44:59.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import csv import numpy as np import os import sys from observations.util import maybe_download_and_extract def smoking(path): """smoking A simple data set with only 6 observatio...
23.360656
71
0.670175
from __future__ import absolute_import from __future__ import division from __future__ import print_function import csv import numpy as np import os import sys from observations.util import maybe_download_and_extract def smoking(path): import pandas as pd path = os.path.expanduser(path) filename = 'smoking.cs...
true
true
f752d93795cee5934a67cdb7ac48c883eb6503c6
5,521
py
Python
motion_blur/blur_image.py
pikerbright/DeblurGAN
31fdc7f83d45e05d0d0a352aa1b8a960e42d618b
[ "BSD-3-Clause" ]
2,253
2017-07-14T09:00:51.000Z
2022-03-30T06:56:13.000Z
motion_blur/blur_image.py
milletzcz/DeblurGAN
39e8a4b408b90d0ef98608c5c4562eae3e184251
[ "BSD-3-Clause" ]
206
2017-11-25T08:25:21.000Z
2022-03-24T07:59:12.000Z
motion_blur/blur_image.py
milletzcz/DeblurGAN
39e8a4b408b90d0ef98608c5c4562eae3e184251
[ "BSD-3-Clause" ]
543
2017-07-12T05:53:25.000Z
2022-03-30T06:56:15.000Z
import numpy as np import matplotlib.pyplot as plt import cv2 import os from scipy import signal from scipy import misc from motion_blur.generate_PSF import PSF from motion_blur.generate_trajectory import Trajectory class BlurImage(object): def __init__(self, image_path, PSFs=None, part=None, path__to_save=None)...
45.628099
116
0.561855
import numpy as np import matplotlib.pyplot as plt import cv2 import os from scipy import signal from scipy import misc from motion_blur.generate_PSF import PSF from motion_blur.generate_trajectory import Trajectory class BlurImage(object): def __init__(self, image_path, PSFs=None, part=None, path__to_save=None)...
true
true
f752d93982fd8f29cadb131ffc91ed0fa98d196a
517
py
Python
examples/SvmSgd.py
vibhatha/PSGDSVMPY
69ed88f5db8d9a250ee944f44b88e54351f8696f
[ "Apache-2.0" ]
null
null
null
examples/SvmSgd.py
vibhatha/PSGDSVMPY
69ed88f5db8d9a250ee944f44b88e54351f8696f
[ "Apache-2.0" ]
null
null
null
examples/SvmSgd.py
vibhatha/PSGDSVMPY
69ed88f5db8d9a250ee944f44b88e54351f8696f
[ "Apache-2.0" ]
null
null
null
import numpy as np X = np.array([ [-2,4,-1], [4,1,-1], [1, 6, -1], [2, 4, -1], [6, 2, -1], ]) y = np.array([-1,-1,1,1,1]) def svm_sgd(X, Y): w = np.zeros(len(X[0])) eta = 1 epochs = 100000 for epoch in range(1,epochs): for i, x in enumerate(X): if (Y[i]*np.d...
16.677419
69
0.388781
import numpy as np X = np.array([ [-2,4,-1], [4,1,-1], [1, 6, -1], [2, 4, -1], [6, 2, -1], ]) y = np.array([-1,-1,1,1,1]) def svm_sgd(X, Y): w = np.zeros(len(X[0])) eta = 1 epochs = 100000 for epoch in range(1,epochs): for i, x in enumerate(X): if (Y[i]*np.d...
true
true
f752d9c9ad5d805eeb83d529ee2e6b93c29b6559
310
py
Python
Python/bot swagbuck gold survey/belajar.py
AnnasJK/annas
21627f13d72112ce5ce65e3a635cbf5d2f8e5e41
[ "MIT" ]
2
2021-01-17T17:13:28.000Z
2021-05-20T13:00:44.000Z
Python/bot swagbuck gold survey/belajar.py
AnnasJK/annas
21627f13d72112ce5ce65e3a635cbf5d2f8e5e41
[ "MIT" ]
null
null
null
Python/bot swagbuck gold survey/belajar.py
AnnasJK/annas
21627f13d72112ce5ce65e3a635cbf5d2f8e5e41
[ "MIT" ]
1
2021-02-09T07:15:33.000Z
2021-02-09T07:15:33.000Z
import pyautogui import random from time import sleep sleep(2) while True: for i in range(random.randrange(350,450), random.randrange(550,650), 3): if i > random.randrange(480, 600) and i < random.randrange(548,647): pyautogui.click(1188, 300) pyautogui.click(1188, i)
31
77
0.658065
import pyautogui import random from time import sleep sleep(2) while True: for i in range(random.randrange(350,450), random.randrange(550,650), 3): if i > random.randrange(480, 600) and i < random.randrange(548,647): pyautogui.click(1188, 300) pyautogui.click(1188, i)
true
true
f752da015d1582755abf43598480df6861c2236b
6,451
py
Python
run_energy_model_mnist.py
SudeepSarkar/equilibrium-propagation
ba6d9ee5426445e9ad91c96c816fa5287ff97258
[ "MIT" ]
18
2020-01-07T11:25:45.000Z
2022-01-24T18:25:13.000Z
run_energy_model_mnist.py
SudeepSarkar/equilibrium-propagation
ba6d9ee5426445e9ad91c96c816fa5287ff97258
[ "MIT" ]
null
null
null
run_energy_model_mnist.py
SudeepSarkar/equilibrium-propagation
ba6d9ee5426445e9ad91c96c816fa5287ff97258
[ "MIT" ]
5
2020-06-26T23:37:22.000Z
2021-09-04T12:22:49.000Z
# MIT License # Copyright (c) 2020 Simon Schug, João Sacramento # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, ...
39.820988
99
0.674779
import argparse import json import logging import sys import torch from lib import config, data, energy, train, utils def load_default_config(energy): if energy == "restr_hopfield": default_config = "etc/energy_restr_hopfield.json" elif energy == "cond_gaussian": default_config = "etc/e...
true
true
f752db5b452781cb38e9d2fabcf1b69a20fcf21b
643
py
Python
seminars/seminar_oop/hr_registry.py
dmitry-uraev/programming-2021-19fpl
8d0c12c7f9ba246e51914ff74b6c3887b88ae783
[ "MIT" ]
null
null
null
seminars/seminar_oop/hr_registry.py
dmitry-uraev/programming-2021-19fpl
8d0c12c7f9ba246e51914ff74b6c3887b88ae783
[ "MIT" ]
null
null
null
seminars/seminar_oop/hr_registry.py
dmitry-uraev/programming-2021-19fpl
8d0c12c7f9ba246e51914ff74b6c3887b88ae783
[ "MIT" ]
null
null
null
from seminars.seminar_oop.employee import Employee class HRRegistry: def __init__(self, name: str, location: str): self.name = name self.location = location self.registry = {} self.counter = 1 def add_employee(self, employee: Employee): self.registry[self.counter] = em...
25.72
50
0.712286
from seminars.seminar_oop.employee import Employee class HRRegistry: def __init__(self, name: str, location: str): self.name = name self.location = location self.registry = {} self.counter = 1 def add_employee(self, employee: Employee): self.registry[self.counter] = em...
true
true
f752dba43d79fe779ca262d1ae976eac74d50927
3,801
py
Python
hy/model_patterns.py
lafrenierejm/hy
abd5ef6a8a3c42c0f097e5ae424296b177d1221f
[ "MIT" ]
null
null
null
hy/model_patterns.py
lafrenierejm/hy
abd5ef6a8a3c42c0f097e5ae424296b177d1221f
[ "MIT" ]
null
null
null
hy/model_patterns.py
lafrenierejm/hy
abd5ef6a8a3c42c0f097e5ae424296b177d1221f
[ "MIT" ]
null
null
null
"Parser combinators for pattern-matching Hy model trees." from collections import namedtuple from functools import reduce from itertools import repeat from math import isinf from operator import add from funcparserlib.parser import ( NoParseError, Parser, State, a, finished, many, skip, ...
24.681818
84
0.632991
from collections import namedtuple from functools import reduce from itertools import repeat from math import isinf from operator import add from funcparserlib.parser import ( NoParseError, Parser, State, a, finished, many, skip, some, ) from hy.models import ( Bytes, Complex,...
true
true
f752dc622751eb068e8f1326a265e1315200c00e
27,414
py
Python
axelrod/strategies/titfortat.py
HarryLi98/Axelrod
3e9877d6b3db83815e15c78abc16bbbd296277d3
[ "MIT" ]
null
null
null
axelrod/strategies/titfortat.py
HarryLi98/Axelrod
3e9877d6b3db83815e15c78abc16bbbd296277d3
[ "MIT" ]
null
null
null
axelrod/strategies/titfortat.py
HarryLi98/Axelrod
3e9877d6b3db83815e15c78abc16bbbd296277d3
[ "MIT" ]
null
null
null
from axelrod.action import Action, actions_to_str from axelrod.player import Player from axelrod.strategy_transformers import ( FinalTransformer, TrackHistoryTransformer, ) C, D = Action.C, Action.D class TitForTat(Player): """ A player starts by cooperating and then mimics the previous action of the...
28.735849
100
0.60046
from axelrod.action import Action, actions_to_str from axelrod.player import Player from axelrod.strategy_transformers import ( FinalTransformer, TrackHistoryTransformer, ) C, D = Action.C, Action.D class TitForTat(Player): name = "Tit For Tat" classifier = { "memory_depth": 1, ...
true
true
f752dd4295b489dedaa5172ea01bceb8c78b17ef
2,140
py
Python
app/documents/api_v1_0/resources.py
dgazcon27/api_erp_gestional_inc
e759120ce6177615a32616681539e2dbc722beba
[ "MIT" ]
null
null
null
app/documents/api_v1_0/resources.py
dgazcon27/api_erp_gestional_inc
e759120ce6177615a32616681539e2dbc722beba
[ "MIT" ]
null
null
null
app/documents/api_v1_0/resources.py
dgazcon27/api_erp_gestional_inc
e759120ce6177615a32616681539e2dbc722beba
[ "MIT" ]
null
null
null
from flask import request, Blueprint from flask_restful import Api, Resource, reqparse from flask_jwt_extended import jwt_required, get_jwt from werkzeug import datastructures, utils import os import uuid from .schemas import DocumentsSchema from ..models import Documents from config.default import UPLOAD_FOLDER docu...
31.470588
93
0.643925
from flask import request, Blueprint from flask_restful import Api, Resource, reqparse from flask_jwt_extended import jwt_required, get_jwt from werkzeug import datastructures, utils import os import uuid from .schemas import DocumentsSchema from ..models import Documents from config.default import UPLOAD_FOLDER docu...
true
true
f752de3d0e8986f5d3ef6db5e07f62ec3f705fc1
1,361
py
Python
examples/Full4x4Coupler.py
MartinPdeS/SuPyMode
8a0a77ccbdae781d878f3d92a2b476774d666fa5
[ "MIT" ]
null
null
null
examples/Full4x4Coupler.py
MartinPdeS/SuPyMode
8a0a77ccbdae781d878f3d92a2b476774d666fa5
[ "MIT" ]
null
null
null
examples/Full4x4Coupler.py
MartinPdeS/SuPyMode
8a0a77ccbdae781d878f3d92a2b476774d666fa5
[ "MIT" ]
1
2021-07-16T14:20:01.000Z
2021-07-16T14:20:01.000Z
from SuPyModes.Geometry import Geometry, Circle, Fused4 from SuPyModes.Solver import SuPySolver from SuPyModes.sellmeier import Fused_silica Clad = Fused4(Radius = 62.5, Fusion = 0.8, Index = Fused_silica(1.55)) Core0 = Circle( Position=Clad.C[0], Radi = 4.2, Index = Fused_silica(1.55)...
34.897436
82
0.468773
from SuPyModes.Geometry import Geometry, Circle, Fused4 from SuPyModes.Solver import SuPySolver from SuPyModes.sellmeier import Fused_silica Clad = Fused4(Radius = 62.5, Fusion = 0.8, Index = Fused_silica(1.55)) Core0 = Circle( Position=Clad.C[0], Radi = 4.2, Index = Fused_silica(1.55)...
false
true
f752deaa769d3ec55fac10bf2d4f501680b4d01f
5,562
py
Python
src/python/pants/backend/java/target_types.py
asherf/pants
e010b93c4123b4446a631cac5db0b7ea15634686
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/java/target_types.py
asherf/pants
e010b93c4123b4446a631cac5db0b7ea15634686
[ "Apache-2.0" ]
14
2021-05-03T13:54:41.000Z
2022-03-30T10:20:58.000Z
src/python/pants/backend/java/target_types.py
asherf/pants
e010b93c4123b4446a631cac5db0b7ea15634686
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations from dataclasses import dataclass from pants.core.goals.package import OutputPathField from pants.engine.rules import Get, collect_rules, rule from pan...
27.671642
97
0.67278
from __future__ import annotations from dataclasses import dataclass from pants.core.goals.package import OutputPathField from pants.engine.rules import Get, collect_rules, rule from pants.engine.target import ( COMMON_TARGET_FIELDS, Dependencies, FieldSet, GeneratedTargets, GenerateTargetsReques...
true
true
f752def2b77616895a57d0d557ad9cf1c8a50603
3,014
py
Python
sedkit/tests/test_modelgrid.py
hover2pi/sedkit
76ea2bda7492b6a724818dc0ad4b7d3301bdde42
[ "MIT" ]
6
2020-09-15T01:14:19.000Z
2021-12-07T21:11:06.000Z
sedkit/tests/test_modelgrid.py
hover2pi/sedkit
76ea2bda7492b6a724818dc0ad4b7d3301bdde42
[ "MIT" ]
19
2018-10-29T18:19:36.000Z
2021-11-29T14:18:37.000Z
sedkit/tests/test_modelgrid.py
hover2pi/sedkit
76ea2bda7492b6a724818dc0ad4b7d3301bdde42
[ "MIT" ]
4
2019-01-04T14:18:34.000Z
2021-03-05T10:58:39.000Z
import unittest import os from pkg_resources import resource_filename import astropy.units as q from .. import modelgrid as mg from .. import utilities as u class TestModelGrid(unittest.TestCase): """Tests for the ModelGrid class""" def setUp(self): # Make Model class for testing params = [...
29.54902
126
0.626742
import unittest import os from pkg_resources import resource_filename import astropy.units as q from .. import modelgrid as mg from .. import utilities as u class TestModelGrid(unittest.TestCase): def setUp(self): params = ['spty'] grid = mg.ModelGrid('Test', params, q.AA, q.erg/q.s/q.c...
true
true
f752df10f06ea89586e7bda3f973b11ae5a7c2ed
3,152
py
Python
python/cugraph/tests/test_triangle_count.py
rgsl888prabhu/cugraph
e030a2fe22ad308fba05d6146765a3c9aa865e5b
[ "Apache-2.0" ]
null
null
null
python/cugraph/tests/test_triangle_count.py
rgsl888prabhu/cugraph
e030a2fe22ad308fba05d6146765a3c9aa865e5b
[ "Apache-2.0" ]
null
null
null
python/cugraph/tests/test_triangle_count.py
rgsl888prabhu/cugraph
e030a2fe22ad308fba05d6146765a3c9aa865e5b
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2019, NVIDIA CORPORATION. # 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...
29.735849
75
0.706536
import gc from itertools import product import pytest from scipy.io import mmread import cudf import cugraph from librmm_cffi import librmm as rmm from librmm_cffi import librmm_config as rmm_cfg import warnings with warnings.catch_warnings(): warnings.filterwarnings("ignore", category=DeprecationWarning) i...
true
true
f752dfde75df7e3d4681aa6894b869f8bd2289ad
27,152
py
Python
wf_psf/SimPSFToolkit.py
tobias-liaudat/wf-psf
0ff1a12d06c46bd8599061d227785393fb528d76
[ "MIT" ]
7
2022-03-10T10:49:01.000Z
2022-03-17T16:06:12.000Z
wf_psf/SimPSFToolkit.py
tobias-liaudat/wf-psf
0ff1a12d06c46bd8599061d227785393fb528d76
[ "MIT" ]
null
null
null
wf_psf/SimPSFToolkit.py
tobias-liaudat/wf-psf
0ff1a12d06c46bd8599061d227785393fb528d76
[ "MIT" ]
null
null
null
import numpy as np import scipy.signal as spsig import scipy.interpolate as sinterp import PIL import matplotlib.pyplot as plt import matplotlib as mpl from matplotlib.colors import ListedColormap, LinearSegmentedColormap from mpl_toolkits.axes_grid1 import make_axes_locatable try: from cv2 import resize, INTER_ARE...
35.82058
100
0.604265
import numpy as np import scipy.signal as spsig import scipy.interpolate as sinterp import PIL import matplotlib.pyplot as plt import matplotlib as mpl from matplotlib.colors import ListedColormap, LinearSegmentedColormap from mpl_toolkits.axes_grid1 import make_axes_locatable try: from cv2 import resize, INTER_ARE...
true
true
f752e18eea219c2ffde214bbed23f8de7e1f63cf
52,700
py
Python
rpython/jit/backend/llsupport/rewrite.py
hollmmax/zig
d80baa5a5fcbc82b3e2294b398edc20a98737a52
[ "MIT" ]
null
null
null
rpython/jit/backend/llsupport/rewrite.py
hollmmax/zig
d80baa5a5fcbc82b3e2294b398edc20a98737a52
[ "MIT" ]
null
null
null
rpython/jit/backend/llsupport/rewrite.py
hollmmax/zig
d80baa5a5fcbc82b3e2294b398edc20a98737a52
[ "MIT" ]
1
2022-03-30T11:42:37.000Z
2022-03-30T11:42:37.000Z
from rpython.rlib import rgc from rpython.rlib.objectmodel import we_are_translated, always_inline from rpython.rlib.rarithmetic import ovfcheck, highest_bit from rpython.rtyper.lltypesystem import llmemory, lltype, rstr from rpython.rtyper.annlowlevel import cast_instance_to_gcref from rpython.jit.metainterp.history i...
46.390845
101
0.594668
from rpython.rlib import rgc from rpython.rlib.objectmodel import we_are_translated, always_inline from rpython.rlib.rarithmetic import ovfcheck, highest_bit from rpython.rtyper.lltypesystem import llmemory, lltype, rstr from rpython.rtyper.annlowlevel import cast_instance_to_gcref from rpython.jit.metainterp.history i...
true
true
f752e1b8fafc252ecc747c068de9b36a34ee996b
1,148
py
Python
0_main.py
RobosaurusFLL/CityShaper
60f9959fcf681fe6b30606e1b7a0694395b4950c
[ "Apache-2.0" ]
null
null
null
0_main.py
RobosaurusFLL/CityShaper
60f9959fcf681fe6b30606e1b7a0694395b4950c
[ "Apache-2.0" ]
null
null
null
0_main.py
RobosaurusFLL/CityShaper
60f9959fcf681fe6b30606e1b7a0694395b4950c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env micropython import sys import time from ev3dev2.button import Button from time import sleep from push_blocks import blocks_and_crane from swing2ramp import swing2ramp from Traffic_Tree import Traffic_Tree import os os.system('setfont Lat15-TerminusBold32x16') btn = Button() function_list = [blocks_a...
26.697674
67
0.594948
import sys import time from ev3dev2.button import Button from time import sleep from push_blocks import blocks_and_crane from swing2ramp import swing2ramp from Traffic_Tree import Traffic_Tree import os os.system('setfont Lat15-TerminusBold32x16') btn = Button() function_list = [blocks_and_crane, Traffic_Tree, swi...
true
true
f752e222a1e03fcfb14bd171131d20b6c6a15a25
3,873
py
Python
src/sentry/integrations/pipeline.py
rob-opsi/sentry
bbfe97c5dec8e300d5733cab440f620fb04c5dc8
[ "BSD-3-Clause" ]
null
null
null
src/sentry/integrations/pipeline.py
rob-opsi/sentry
bbfe97c5dec8e300d5733cab440f620fb04c5dc8
[ "BSD-3-Clause" ]
null
null
null
src/sentry/integrations/pipeline.py
rob-opsi/sentry
bbfe97c5dec8e300d5733cab440f620fb04c5dc8
[ "BSD-3-Clause" ]
1
2020-07-03T00:52:19.000Z
2020-07-03T00:52:19.000Z
from __future__ import absolute_import, print_function __all__ = ['IntegrationPipeline'] from django.db import IntegrityError from django.db.models import Q from django.http import HttpResponse from django.utils import timezone from sentry.api.serializers import serialize from sentry.models import Identity, Identity...
31.487805
91
0.59747
from __future__ import absolute_import, print_function __all__ = ['IntegrationPipeline'] from django.db import IntegrityError from django.db.models import Q from django.http import HttpResponse from django.utils import timezone from sentry.api.serializers import serialize from sentry.models import Identity, Identity...
true
true
f752e241f402d0ab49bb37c681005bca1632987f
559
py
Python
creational/first_lazy_initialization.py
MADTeacher/design-patterns
8cac737a923f3e3dbfd4c5f38f95eeb74b0ca020
[ "MIT" ]
11
2021-07-23T10:10:25.000Z
2022-02-09T08:54:16.000Z
creational/first_lazy_initialization.py
MADTeacher/design-patterns
8cac737a923f3e3dbfd4c5f38f95eeb74b0ca020
[ "MIT" ]
null
null
null
creational/first_lazy_initialization.py
MADTeacher/design-patterns
8cac737a923f3e3dbfd4c5f38f95eeb74b0ca020
[ "MIT" ]
8
2021-03-26T17:57:15.000Z
2022-01-03T13:23:42.000Z
class Pizza: def __init__(self, pizza_name: str): self.name = pizza_name def __str__(self): return self.name class PizzaPlace: def __init__(self) -> None: self.pizzas = {} def get_pizza(self, pizza_name: str) -> Pizza: if pizza_name not in self.pizzas: sel...
23.291667
55
0.649374
class Pizza: def __init__(self, pizza_name: str): self.name = pizza_name def __str__(self): return self.name class PizzaPlace: def __init__(self) -> None: self.pizzas = {} def get_pizza(self, pizza_name: str) -> Pizza: if pizza_name not in self.pizzas: sel...
true
true
f752e2cf0b648ea7beb67cc45eef4df9a0116fc5
4,637
py
Python
TRAFFIC_ASSIGNMENT/PYTHON-MASLAB/transportation_networks/tools/python_example.py
uahservtel/uah-gist-mutraff-bastra
b5a4eab4763e1cf9d914c4af8a77426391e71e31
[ "Xnet", "Linux-OpenIB", "X11" ]
3
2019-11-20T15:22:27.000Z
2021-06-13T07:52:14.000Z
TRAFFIC_ASSIGNMENT/PYTHON-MASLAB/transportation_networks/tools/python_example.py
uahservtel/uah-gist-mutraff-bastra
b5a4eab4763e1cf9d914c4af8a77426391e71e31
[ "Xnet", "Linux-OpenIB", "X11" ]
null
null
null
TRAFFIC_ASSIGNMENT/PYTHON-MASLAB/transportation_networks/tools/python_example.py
uahservtel/uah-gist-mutraff-bastra
b5a4eab4763e1cf9d914c4af8a77426391e71e31
[ "Xnet", "Linux-OpenIB", "X11" ]
null
null
null
''' Created on 22/08/2016 @author: Gabriel de O. Ramos ''' from py_expression_eval import Parser # represents a node in the network class Node: def __init__(self, name): self.name = name # name of the node # represents an edge in the network class Edge: def __init__(self, name, start, end, cost_f...
33.359712
156
0.567177
''' Created on 22/08/2016 @author: Gabriel de O. Ramos ''' from py_expression_eval import Parser class Node: def __init__(self, name): self.name = name class Edge: def __init__(self, name, start, end, cost_function, param_name): self.name = name self.start = start self.end...
false
true
f752e313317f7bf7107edbff56c08407b2b77d6c
4,049
py
Python
utils/postprocess.py
binfen/FBDD
26c859a2dbe3d308711898ef1d149a5f8c49055f
[ "MIT" ]
null
null
null
utils/postprocess.py
binfen/FBDD
26c859a2dbe3d308711898ef1d149a5f8c49055f
[ "MIT" ]
null
null
null
utils/postprocess.py
binfen/FBDD
26c859a2dbe3d308711898ef1d149a5f8c49055f
[ "MIT" ]
null
null
null
import time import numpy as np import pandas as pd from molecules import mol_from_smiles from molecules import add_property from molecules import ( add_atom_counts, add_bond_counts, add_ring_counts) from .config import get_dataset_info from .filesystem import load_dataset SCORES = ["validity", "novelty", "unique...
28.514085
73
0.656705
import time import numpy as np import pandas as pd from molecules import mol_from_smiles from molecules import add_property from molecules import ( add_atom_counts, add_bond_counts, add_ring_counts) from .config import get_dataset_info from .filesystem import load_dataset SCORES = ["validity", "novelty", "unique...
true
true
f752e3162c266b364089f4420733223b25102b98
4,675
py
Python
src/pypine/_ChainNodeP.py
jkpubsrc/PyPine
e0144fabd8d7cd061f14ac4478ba2d3bc8fafe03
[ "Apache-1.1" ]
null
null
null
src/pypine/_ChainNodeP.py
jkpubsrc/PyPine
e0144fabd8d7cd061f14ac4478ba2d3bc8fafe03
[ "Apache-1.1" ]
null
null
null
src/pypine/_ChainNodeP.py
jkpubsrc/PyPine
e0144fabd8d7cd061f14ac4478ba2d3bc8fafe03
[ "Apache-1.1" ]
null
null
null
import os import typing import jk_typing import jk_utils #import jk_prettyprintobj from .utils.TreeHelper import TreeHelper from ._INode import _INode from .EnumAction import EnumAction from .FileTypeInfo import FileTypeInfo from .Context import Context from .AbstractProcessor import AbstractProcessor from .utils....
31.166667
170
0.529198
import os import typing import jk_typing import jk_utils from .utils.TreeHelper import TreeHelper from ._INode import _INode from .EnumAction import EnumAction from .FileTypeInfo import FileTypeInfo from .Context import Context from .AbstractProcessor import AbstractProcessor from .utils.Color import Color ...
true
true
f752e3223f28a9a09268748c9d23b25198db40b7
3,263
py
Python
prepare_data.py
violetcodes/hiking-ridge
b10550f32172a0e36371e1ad84563be32e67ab4a
[ "Apache-2.0" ]
null
null
null
prepare_data.py
violetcodes/hiking-ridge
b10550f32172a0e36371e1ad84563be32e67ab4a
[ "Apache-2.0" ]
null
null
null
prepare_data.py
violetcodes/hiking-ridge
b10550f32172a0e36371e1ad84563be32e67ab4a
[ "Apache-2.0" ]
null
null
null
import utils from tqdm import tqdm jfile_texts = lambda jload: [i['section_title'] + ': ' + i['text'] for i in jload] def find_index(text, target, width=100, find_only=False, lowr=True): if lowr: text = utils.clean_text(text) target = utils.clean_text(target) if find_only: return t...
32.306931
82
0.517315
import utils from tqdm import tqdm jfile_texts = lambda jload: [i['section_title'] + ': ' + i['text'] for i in jload] def find_index(text, target, width=100, find_only=False, lowr=True): if lowr: text = utils.clean_text(text) target = utils.clean_text(target) if find_only: return t...
true
true
f752e530740fb1e79ca1e76d6efe27daa4c4ec30
10,982
py
Python
test/functional/test_framework/test_node.py
thaotlh94/usdacoin
87edf5821fae5aa8385afdff62395be8fd8583e4
[ "MIT" ]
null
null
null
test/functional/test_framework/test_node.py
thaotlh94/usdacoin
87edf5821fae5aa8385afdff62395be8fd8583e4
[ "MIT" ]
null
null
null
test/functional/test_framework/test_node.py
thaotlh94/usdacoin
87edf5821fae5aa8385afdff62395be8fd8583e4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Class for bitcoind node under test""" import decimal import errno import http.client import json import log...
38.669014
248
0.629667
import decimal import errno import http.client import json import logging import os import re import subprocess import time from .authproxy import JSONRPCException from .util import ( assert_equal, delete_cookie_file, get_rpc_proxy, rpc_url, wait_until, p2p_port, ) JSONDecodeError = getattr(j...
true
true
f752e71183e4acd7fdaf700577c1091ca15432f6
22,581
py
Python
pyccl/tests/test_power.py
Jappenn/CCL
a37cad61f060f3928fa5d47b1e2670db3e9bce6f
[ "BSD-3-Clause" ]
91
2017-07-14T02:45:59.000Z
2022-03-28T08:55:54.000Z
pyccl/tests/test_power.py
Jappenn/CCL
a37cad61f060f3928fa5d47b1e2670db3e9bce6f
[ "BSD-3-Clause" ]
703
2017-07-07T16:27:17.000Z
2022-03-30T14:40:10.000Z
pyccl/tests/test_power.py
Jappenn/CCL
a37cad61f060f3928fa5d47b1e2670db3e9bce6f
[ "BSD-3-Clause" ]
54
2017-07-12T13:08:25.000Z
2022-02-06T13:12:10.000Z
import numpy as np import pytest import pyccl as ccl from pyccl import CCLError, CCLWarning COSMO = ccl.Cosmology( Omega_c=0.27, Omega_b=0.045, h=0.67, sigma8=0.8, n_s=0.96, transfer_function='bbks', matter_power_spectrum='halofit') COSMO_HM = ccl.Cosmology( Omega_c=0.27, Omega_b=0.045, h=0.67, sigma8=0....
36.836868
78
0.591604
import numpy as np import pytest import pyccl as ccl from pyccl import CCLError, CCLWarning COSMO = ccl.Cosmology( Omega_c=0.27, Omega_b=0.045, h=0.67, sigma8=0.8, n_s=0.96, transfer_function='bbks', matter_power_spectrum='halofit') COSMO_HM = ccl.Cosmology( Omega_c=0.27, Omega_b=0.045, h=0.67, sigma8=0....
true
true
f752e72c67790ca11d79f3921945dbc9731df9cc
18,455
py
Python
tests/integration/test_storage_s3/test.py
r1j1k/ClickHouse
c5df9433f051e272bdfa731a79a4b592a8859b0b
[ "Apache-2.0" ]
1
2020-10-01T01:54:37.000Z
2020-10-01T01:54:37.000Z
tests/integration/test_storage_s3/test.py
r1j1k/ClickHouse
c5df9433f051e272bdfa731a79a4b592a8859b0b
[ "Apache-2.0" ]
null
null
null
tests/integration/test_storage_s3/test.py
r1j1k/ClickHouse
c5df9433f051e272bdfa731a79a4b592a8859b0b
[ "Apache-2.0" ]
null
null
null
import gzip import json import logging import os import random import StringIO import threading import time import helpers.client import pytest from helpers.cluster import ClickHouseCluster, ClickHouseInstance logging.getLogger().setLevel(logging.INFO) logging.getLogger().addHandler(logging.StreamHandler()) # Creat...
39.433761
155
0.602818
import gzip import json import logging import os import random import StringIO import threading import time import helpers.client import pytest from helpers.cluster import ClickHouseCluster, ClickHouseInstance logging.getLogger().setLevel(logging.INFO) logging.getLogger().addHandler(logging.StreamHandler()) def pre...
true
true
f752e9468e334d361da0a8c8c316b96fa818e09f
688
py
Python
azure-devops/azext_devops/vstsCompressed/file_container/v4_1/models/__init__.py
vijayraavi/azure-devops-cli-extension
88f1420c5815cb09bea15b050f4c553e0f326dad
[ "MIT" ]
null
null
null
azure-devops/azext_devops/vstsCompressed/file_container/v4_1/models/__init__.py
vijayraavi/azure-devops-cli-extension
88f1420c5815cb09bea15b050f4c553e0f326dad
[ "MIT" ]
37
2020-04-27T07:45:19.000Z
2021-04-05T07:27:15.000Z
azure-devops/azext_devops/vstsCompressed/file_container/v4_1/models/__init__.py
vijayraavi/azure-devops-cli-extension
88f1420c5815cb09bea15b050f4c553e0f326dad
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
43
94
0.452035
from .models import FileContainer from .models import FileContainerItem __all__ = [ 'FileContainer', 'FileContainerItem', ]
true
true
f752ea9886ce3bdfa3c640d4cae06802596a7467
34,159
py
Python
src/python/pants/backend/scala/compile/scalac_test.py
betaboon/pants
05ec375c8bfcaa0396c673847bb139326883cc08
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/scala/compile/scalac_test.py
betaboon/pants
05ec375c8bfcaa0396c673847bb139326883cc08
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/scala/compile/scalac_test.py
betaboon/pants
05ec375c8bfcaa0396c673847bb139326883cc08
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import itertools import textwrap from textwrap import dedent import pytest from pants.backend.scala.compile.scalac import CompileScalaSourceRequest fr...
36.185381
115
0.524283
from __future__ import annotations import itertools import textwrap from textwrap import dedent import pytest from pants.backend.scala.compile.scalac import CompileScalaSourceRequest from pants.backend.scala.compile.scalac import rules as scalac_rules from pants.backend.scala.dependency_inference.rules import rules...
true
true
f752eca8c8b10c1307679c84762b9d2edf1fc3e7
1,371
py
Python
python/frame_convert2.py
vinzdef/rorrim
7a3fd4a212420b6fbe6590005300ea095938bf66
[ "Unlicense" ]
null
null
null
python/frame_convert2.py
vinzdef/rorrim
7a3fd4a212420b6fbe6590005300ea095938bf66
[ "Unlicense" ]
null
null
null
python/frame_convert2.py
vinzdef/rorrim
7a3fd4a212420b6fbe6590005300ea095938bf66
[ "Unlicense" ]
null
null
null
import numpy as np import matplotlib def to_hsv(numb): hue = np.interp(numb, [0, 1024], [0, 1]) rgb = matplotlib.colors.hsv_to_rgb(np.array([hue, 0.5, 1])) bgr = rgb[:, :, ::-1] # RGB -> BGR return np.array(bgr) def hsv_depth(depth): depth = to_hsv(depth) return depth def pretty_depth(depth)...
24.482143
71
0.652808
import numpy as np import matplotlib def to_hsv(numb): hue = np.interp(numb, [0, 1024], [0, 1]) rgb = matplotlib.colors.hsv_to_rgb(np.array([hue, 0.5, 1])) bgr = rgb[:, :, ::-1] return np.array(bgr) def hsv_depth(depth): depth = to_hsv(depth) return depth def pretty_depth(depth): np.clip...
true
true
f752ecc33832f2ac9fb87b2dbebbb978e23f1a7e
2,755
py
Python
draw.py
VGGatGitHub/QWorld-silver
4da363df7d8544959ff80f6e71fccc520db86745
[ "Apache-2.0", "CC-BY-4.0" ]
1
2021-05-26T13:35:30.000Z
2021-05-26T13:35:30.000Z
draw.py
Innanov/QSilver
99fc53d9c0f77dd1122e65ec24117574fff7c8a5
[ "Apache-2.0", "CC-BY-4.0" ]
null
null
null
draw.py
Innanov/QSilver
99fc53d9c0f77dd1122e65ec24117574fff7c8a5
[ "Apache-2.0", "CC-BY-4.0" ]
2
2021-12-01T17:41:53.000Z
2022-01-07T20:11:11.000Z
############################################################################## # Copyright 2019 Rigetti Computing # # 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://ww...
37.739726
96
0.662069
import os import shutil import subprocess import tempfile from typing import Any, Optional from IPython.display import Image from pyquil.latex._main import to_latex from pyquil.latex._diagram import DiagramSettings from pyquil.quil import Program def display( circuit: Program, settings: Optional[DiagramSetting...
true
true
f752ece6e85caf219e8dd6811d61d6fb7c6cb0b6
53,090
py
Python
analysis/pymo/preprocessing.py
guillefix/mt-lightning
56e93a569d85a768c178b15461e5362c25fdc3e3
[ "MIT" ]
46
2021-06-29T01:30:59.000Z
2022-02-21T14:07:43.000Z
analysis/pymo/preprocessing.py
guillefix/mt-lightning
56e93a569d85a768c178b15461e5362c25fdc3e3
[ "MIT" ]
4
2021-07-08T06:34:09.000Z
2022-02-08T12:56:20.000Z
analysis/pymo/preprocessing.py
guillefix/transflower-lightning
56e93a569d85a768c178b15461e5362c25fdc3e3
[ "MIT" ]
5
2021-07-14T03:18:37.000Z
2021-11-18T08:14:05.000Z
''' Preprocessing Tranformers Based on sci-kit's API By Omid Alemi Created on June 12, 2017 ''' import copy import pandas as pd import numpy as np import transforms3d as t3d import scipy.ndimage.filters as filters from sklearn.base import BaseEstimator, TransformerMixin from analysis.pymo.rotation_tools import Rotat...
39.887303
230
0.565587
import copy import pandas as pd import numpy as np import transforms3d as t3d import scipy.ndimage.filters as filters from sklearn.base import BaseEstimator, TransformerMixin from analysis.pymo.rotation_tools import Rotation, euler2expmap, euler2expmap2, expmap2euler, euler_reorder, unroll from analysis.pymo.Quaterni...
true
true
f752ed777a0c535cc01b0d59abb89b63c2ce484d
1,630
py
Python
setup.py
deknijf/python-terraform-runner
8b9141536f9bd39c3f00aeca83ce5ac5d793804b
[ "Apache-2.0" ]
null
null
null
setup.py
deknijf/python-terraform-runner
8b9141536f9bd39c3f00aeca83ce5ac5d793804b
[ "Apache-2.0" ]
null
null
null
setup.py
deknijf/python-terraform-runner
8b9141536f9bd39c3f00aeca83ce5ac5d793804b
[ "Apache-2.0" ]
null
null
null
from distutils.core import setup DEPENDENCIES = [ 'python_terraform', 'requests', 'argparse' ] VERSION = '0.6' URL = 'https://github.com/deknijf/python-terraform-runner' setup( name='python-terraform-runner', #packages=['tf-runner'], version=VERSION, # Chose a license from here: https://h...
32.6
103
0.636196
from distutils.core import setup DEPENDENCIES = [ 'python_terraform', 'requests', 'argparse' ] VERSION = '0.6' URL = 'https://github.com/deknijf/python-terraform-runner' setup( name='python-terraform-runner', version=VERSION, license='Apache Software License', description='Scr...
true
true
f752ee187af3f9a845474c1888f8c6dd176f0e28
6,475
py
Python
openspeech/search/beam_search_rnn_transducer.py
techthiyanes/openspeech
71d28bae1232420da1d6f357f52ff1a607dc983f
[ "Apache-2.0", "MIT" ]
207
2021-07-22T02:04:47.000Z
2022-03-31T07:24:12.000Z
openspeech/search/beam_search_rnn_transducer.py
tqslj2/openspeech
10307587f08615224df5a868fb5249c68c70b12d
[ "Apache-2.0", "MIT" ]
81
2021-07-21T16:52:22.000Z
2022-03-31T14:56:54.000Z
openspeech/search/beam_search_rnn_transducer.py
tqslj2/openspeech
10307587f08615224df5a868fb5249c68c70b12d
[ "Apache-2.0", "MIT" ]
43
2021-07-21T16:33:27.000Z
2022-03-23T09:43:49.000Z
# MIT License # # Copyright (c) 2021 Soohwan Kim and Sangchun Ha and Soyoung Cho # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights...
41.50641
112
0.589961
import torch from openspeech.search.beam_search_base import OpenspeechBeamSearchBase from openspeech.decoders import RNNTransducerDecoder class BeamSearchRNNTransducer(OpenspeechBeamSearchBase): def __init__( self, joint, decoder: RNNTransducerDecoder, beam_size: ...
true
true
f752ee3f9287486c4c7081e7f854a0bc65f04d81
1,268
py
Python
mmdet/models/backbones/__init__.py
DongshuoYin/garbage_dump_detection
1087f2cd35f781c5d973db5a59ecf8eb3bfa2537
[ "Apache-2.0" ]
null
null
null
mmdet/models/backbones/__init__.py
DongshuoYin/garbage_dump_detection
1087f2cd35f781c5d973db5a59ecf8eb3bfa2537
[ "Apache-2.0" ]
null
null
null
mmdet/models/backbones/__init__.py
DongshuoYin/garbage_dump_detection
1087f2cd35f781c5d973db5a59ecf8eb3bfa2537
[ "Apache-2.0" ]
null
null
null
from .darknet import Darknet from .detectors_resnet import DetectoRS_ResNet from .detectors_resnext import DetectoRS_ResNeXt from .hourglass import HourglassNet from .hrnet import HRNet from .regnet import RegNet from .res2net import Res2Net from .resnest import ResNeSt from .resnet import ResNet, ResNetV1d from .resne...
39.625
89
0.77918
from .darknet import Darknet from .detectors_resnet import DetectoRS_ResNet from .detectors_resnext import DetectoRS_ResNeXt from .hourglass import HourglassNet from .hrnet import HRNet from .regnet import RegNet from .res2net import Res2Net from .resnest import ResNeSt from .resnet import ResNet, ResNetV1d from .resne...
true
true
f752eeb5e863b4e583cea6ec3a4fe492cc08b182
17,827
py
Python
benchmarks/bench_plot_randomized_svd.py
emarkou/scikit-learn
d73822f84f2832dcc25f0ff58769f60871a78025
[ "BSD-3-Clause" ]
8
2015-01-24T04:53:08.000Z
2021-06-11T22:08:11.000Z
benchmarks/bench_plot_randomized_svd.py
emarkou/scikit-learn
d73822f84f2832dcc25f0ff58769f60871a78025
[ "BSD-3-Clause" ]
29
2021-03-04T02:56:48.000Z
2021-04-06T04:06:45.000Z
benchmarks/bench_plot_randomized_svd.py
emarkou/scikit-learn
d73822f84f2832dcc25f0ff58769f60871a78025
[ "BSD-3-Clause" ]
12
2021-02-05T20:33:04.000Z
2022-02-17T04:11:25.000Z
""" Benchmarks on the power iterations phase in randomized SVD. We test on various synthetic and real datasets the effect of increasing the number of power iterations in terms of quality of approximation and running time. A number greater than 0 should help with noisy matrices, which are characterized by a slow spectr...
38.255365
79
0.609637
import numpy as np import scipy as sp import matplotlib.pyplot as plt import gc import pickle from time import time from collections import defaultdict import os.path from sklearn.utils._arpack import _init_arpack_v0 from sklearn.utils import gen_batches from sklearn.utils.validation import check_random_state from ...
true
true
f752eec1cdf78bb5eedf42facf3e65c2428a6848
1,996
py
Python
build/plugins/xs.py
SitdikovRustam/CatBoost
39fb9dfddb24e977ed87efc71063b03cd4bc8f16
[ "Apache-2.0" ]
33
2016-12-15T21:47:13.000Z
2020-10-27T23:53:59.000Z
build/plugins/xs.py
dsferz/machinelearning_yandex
8fde8314c5c70299ece8b8f00075ddfcd5e07ddf
[ "Apache-2.0" ]
null
null
null
build/plugins/xs.py
dsferz/machinelearning_yandex
8fde8314c5c70299ece8b8f00075ddfcd5e07ddf
[ "Apache-2.0" ]
14
2016-12-28T17:00:33.000Z
2022-01-16T20:15:27.000Z
import os import re import _import_wrapper as iw class XsParser(object): def __init__(self, path, unit): self._path = path retargeted = os.path.join(unit.path(), os.path.basename(path)) with open(path, 'rb') as f: includes, induced = XsParser.parse_includes(f.readlines()) ...
26.613333
96
0.573647
import os import re import _import_wrapper as iw class XsParser(object): def __init__(self, path, unit): self._path = path retargeted = os.path.join(unit.path(), os.path.basename(path)) with open(path, 'rb') as f: includes, induced = XsParser.parse_includes(f.readlines()) ...
true
true
f752efef5c6f2cf9d2106f2b9413dfb810ba4946
1,823
py
Python
gdrest/levels/routes.py
Silverflower67/GDRest
c6a02d18aa876c9df4c60a738b589da0509897b2
[ "MIT" ]
null
null
null
gdrest/levels/routes.py
Silverflower67/GDRest
c6a02d18aa876c9df4c60a738b589da0509897b2
[ "MIT" ]
null
null
null
gdrest/levels/routes.py
Silverflower67/GDRest
c6a02d18aa876c9df4c60a738b589da0509897b2
[ "MIT" ]
null
null
null
import gd from starlette.requests import Request from starlette.responses import JSONResponse, RedirectResponse from starlette.routing import Mount, Route from gdrest.levels.level import Level from auth import auth_client async def get_level(request: Request): client = auth_client(request.user) lid: int = re...
33.145455
95
0.667032
import gd from starlette.requests import Request from starlette.responses import JSONResponse, RedirectResponse from starlette.routing import Mount, Route from gdrest.levels.level import Level from auth import auth_client async def get_level(request: Request): client = auth_client(request.user) lid: int = re...
true
true
f752f0ed94c202bb19f9330da8bc51cb49fd1a73
620
py
Python
core/models/job_run_logs.py
seamless-io/seamless-web
ad171c9c00f34b7f0453b18b9ea33f16a5427015
[ "Apache-2.0" ]
1
2021-02-16T04:47:52.000Z
2021-02-16T04:47:52.000Z
core/models/job_run_logs.py
seamless-io/seamless-web
ad171c9c00f34b7f0453b18b9ea33f16a5427015
[ "Apache-2.0" ]
2
2020-12-30T02:57:42.000Z
2020-12-30T03:23:01.000Z
core/models/job_run_logs.py
seamless-io/seamless-web
ad171c9c00f34b7f0453b18b9ea33f16a5427015
[ "Apache-2.0" ]
null
null
null
from sqlalchemy import Column, Integer, DateTime, Text, ForeignKey from sqlalchemy.orm import relationship from core.models.base import base class JobRunLog(base): __tablename__ = 'job_run_logs' id = Column(Integer, primary_key=True) job_run_id = Column(Integer, ForeignKey('job_runs.id', ondelete='CASCA...
32.631579
95
0.727419
from sqlalchemy import Column, Integer, DateTime, Text, ForeignKey from sqlalchemy.orm import relationship from core.models.base import base class JobRunLog(base): __tablename__ = 'job_run_logs' id = Column(Integer, primary_key=True) job_run_id = Column(Integer, ForeignKey('job_runs.id', ondelete='CASCA...
true
true
f752f19bfa307b074c9553595820c117808cc645
3,644
py
Python
onnx/backend/test/case/node/cumsum.py
How-Wang/onnx
c940fa3fea84948e46603cab2f86467291443beb
[ "Apache-2.0" ]
1
2022-02-04T07:45:14.000Z
2022-02-04T07:45:14.000Z
onnx/backend/test/case/node/cumsum.py
How-Wang/onnx
c940fa3fea84948e46603cab2f86467291443beb
[ "Apache-2.0" ]
null
null
null
onnx/backend/test/case/node/cumsum.py
How-Wang/onnx
c940fa3fea84948e46603cab2f86467291443beb
[ "Apache-2.0" ]
null
null
null
# SPDX-License-Identifier: Apache-2.0 from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np # type: ignore import onnx from ..base import Base from . import expect class CumSum(Base): @staticmeth...
32.828829
82
0.512075
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np import onnx from ..base import Base from . import expect class CumSum(Base): @staticmethod def export_cumsum_1d() -> None: node =...
true
true
f752f1b8c527725c006db71e1c2dae0cff77de9c
4,694
py
Python
var/spack/repos/builtin/packages/ecp-data-vis-sdk/package.py
jonglezb/spack
ebc871abbf8f082000617e1798c75260652f0770
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/ecp-data-vis-sdk/package.py
jonglezb/spack
ebc871abbf8f082000617e1798c75260652f0770
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
14
2021-07-20T01:04:53.000Z
2022-03-02T01:08:36.000Z
var/spack/repos/builtin/packages/ecp-data-vis-sdk/package.py
jonglezb/spack
ebc871abbf8f082000617e1798c75260652f0770
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class EcpDataVisSdk(BundlePackage): """ECP Data & Vis SDK""" homepage = "https://github.com...
41.910714
85
0.602897
from spack import * class EcpDataVisSdk(BundlePackage): homepage = "https://github.com/chuckatkins/ecp-data-viz-sdk" tags = ['ecp'] maintainers = ['chuckatkins'] version('1.0') variant('adios2', default=True, description="Enable ADIOS2") variant('darshan', default=True, d...
true
true
f752f27605649ae4987dd08eac6a9c03ff8029ca
34
py
Python
regulation/regutil/util/__init__.py
RNatvik/rntools
ddaf8f9cc440bcd0ed0439f087bc951e0add6dce
[ "MIT" ]
null
null
null
regulation/regutil/util/__init__.py
RNatvik/rntools
ddaf8f9cc440bcd0ed0439f087bc951e0add6dce
[ "MIT" ]
1
2020-08-11T16:05:51.000Z
2020-08-11T16:05:51.000Z
regulation/regutil/util/__init__.py
RNatvik/rntools
ddaf8f9cc440bcd0ed0439f087bc951e0add6dce
[ "MIT" ]
null
null
null
from regutil.util.timing import *
17
33
0.794118
from regutil.util.timing import *
true
true
f752f2bf83ecdc7a43a3ad74742bb0c55ed16594
3,670
py
Python
parsel/csstranslator.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
22
2018-03-13T13:51:41.000Z
2022-02-19T07:27:48.000Z
parsel/csstranslator.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
2
2021-03-31T18:31:06.000Z
2021-12-13T19:46:40.000Z
parsel/csstranslator.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
5
2018-03-28T09:07:03.000Z
2020-02-23T12:49:52.000Z
from cssselect import GenericTranslator as OriginalGenericTranslator from cssselect import HTMLTranslator as OriginalHTMLTranslator from cssselect.xpath import XPathExpr as OriginalXPathExpr from cssselect.xpath import _unicode_safe_getattr, ExpressionError from cssselect.parser import FunctionalPseudoElement class X...
34.299065
82
0.623433
from cssselect import GenericTranslator as OriginalGenericTranslator from cssselect import HTMLTranslator as OriginalHTMLTranslator from cssselect.xpath import XPathExpr as OriginalXPathExpr from cssselect.xpath import _unicode_safe_getattr, ExpressionError from cssselect.parser import FunctionalPseudoElement class X...
true
true
f752f43bcff2516cd044771ab96bc85c89bc1640
5,598
py
Python
python/smqtk/bin/make_train_test_sets.py
jbeezley/SMQTK
e6b00f94be95f39bbca52a7983ac3d6d1f86f847
[ "BSD-3-Clause" ]
1
2021-04-10T10:51:26.000Z
2021-04-10T10:51:26.000Z
python/smqtk/bin/make_train_test_sets.py
jbeezley/SMQTK
e6b00f94be95f39bbca52a7983ac3d6d1f86f847
[ "BSD-3-Clause" ]
3
2021-09-08T02:17:49.000Z
2022-03-12T00:40:33.000Z
python/smqtk/bin/make_train_test_sets.py
DigitalCompanion/SMQTK
fc9404b69150ef44f24423844bc80735c0c2b669
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import argparse import csv import itertools import os import re import numpy import six from sklearn.model_selection import StratifiedShuffleSplit class KeyToFilepath(argparse.Action): """ Custom argparse action for parsing out positional class-to-filepath arguments. """ re_...
39.146853
80
0.562344
import argparse import csv import itertools import os import re import numpy import six from sklearn.model_selection import StratifiedShuffleSplit class KeyToFilepath(argparse.Action): re_key2path = re.compile('(\w+)=(.+)', flags=re.UNICODE) def __init__(self, option_strings, dest, nargs=None, const=Non...
true
true
f752f6aa6b93aedbe8e8b73ee6d5507083cd2d82
821
py
Python
python/paddle_fl/mpc/version.py
barrierye/PaddleFL
eff6ef28491fa2011686ca3daa4f680e5ef83deb
[ "Apache-2.0" ]
379
2019-09-27T14:26:42.000Z
2022-03-29T14:28:12.000Z
python/paddle_fl/mpc/version.py
Sprate/PaddleFL
583691acd5db0a7ca331cc9a72415017b18669b8
[ "Apache-2.0" ]
132
2019-10-16T03:22:03.000Z
2022-03-23T08:54:29.000Z
python/paddle_fl/mpc/version.py
Sprate/PaddleFL
583691acd5db0a7ca331cc9a72415017b18669b8
[ "Apache-2.0" ]
106
2019-09-27T12:47:18.000Z
2022-03-29T09:07:25.000Z
# Copyright (c) 2020 PaddlePaddle 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 appli...
29.321429
74
0.727162
CURRENT_VER = '1.0.0' __all__ = ['version', ] def version(): print("Paddle Encrypted Version: " + CURRENT_VER)
true
true
f752f79eea8bba4248f71b571a1bf9396c4307a7
3,286
py
Python
bot/exts/utilities/realpython.py
brad90four/sir-lancebot
b266be04b00f371392f75e698f2a588038242213
[ "MIT" ]
null
null
null
bot/exts/utilities/realpython.py
brad90four/sir-lancebot
b266be04b00f371392f75e698f2a588038242213
[ "MIT" ]
null
null
null
bot/exts/utilities/realpython.py
brad90four/sir-lancebot
b266be04b00f371392f75e698f2a588038242213
[ "MIT" ]
null
null
null
import logging from html import unescape from typing import Optional from urllib.parse import quote_plus from discord import Embed from discord.ext import commands from bot.bot import Bot from bot.constants import Colours logger = logging.getLogger(__name__) API_ROOT = "https://realpython.com/search/api/v1/" ARTIC...
32.534653
110
0.613512
import logging from html import unescape from typing import Optional from urllib.parse import quote_plus from discord import Embed from discord.ext import commands from bot.bot import Bot from bot.constants import Colours logger = logging.getLogger(__name__) API_ROOT = "https://realpython.com/search/api/v1/" ARTIC...
true
true
f752f9012b60304c6f5aab0061c437205453ae9b
3,288
py
Python
aioddd/errors.py
Yasti4/python-aioddd
a0731e05a0133bf5636437ceb7625f7deaa100ab
[ "MIT" ]
4
2020-07-28T12:34:02.000Z
2021-02-11T09:57:20.000Z
aioddd/errors.py
Yasti4/python-aioddd
a0731e05a0133bf5636437ceb7625f7deaa100ab
[ "MIT" ]
2
2020-11-19T20:45:53.000Z
2020-12-25T13:48:08.000Z
aioddd/errors.py
Yasti4/python-aioddd
a0731e05a0133bf5636437ceb7625f7deaa100ab
[ "MIT" ]
1
2020-11-19T20:39:09.000Z
2020-11-19T20:39:09.000Z
from json import dumps from typing import Any, Dict, Optional from uuid import uuid4 def raise_(err: BaseException) -> BaseException: raise err # pragma: no cover class BaseError(Exception): _id: str _code: str = 'code' _title: str = 'title' _detail: str _meta: Dict[str, Any] def __ini...
24.355556
84
0.629258
from json import dumps from typing import Any, Dict, Optional from uuid import uuid4 def raise_(err: BaseException) -> BaseException: raise err class BaseError(Exception): _id: str _code: str = 'code' _title: str = 'title' _detail: str _meta: Dict[str, Any] def __init__(self, *args, **...
true
true
f752fa61471ce0ba7580075f3d215c0c449beb2e
7,320
py
Python
cynetworkx/algorithms/centrality/load.py
Viech/cynetworkx
01a37859c67b752392e9e783c949084964eef2cf
[ "BSD-3-Clause" ]
12
2019-07-23T08:07:53.000Z
2022-03-09T06:13:16.000Z
cynetworkx/algorithms/centrality/load.py
Viech/cynetworkx
01a37859c67b752392e9e783c949084964eef2cf
[ "BSD-3-Clause" ]
7
2019-08-30T07:00:00.000Z
2021-12-30T08:02:56.000Z
cynetworkx/algorithms/centrality/load.py
Viech/cynetworkx
01a37859c67b752392e9e783c949084964eef2cf
[ "BSD-3-Clause" ]
5
2020-10-10T03:40:32.000Z
2021-11-23T12:28:53.000Z
# -*- coding: utf-8 -*- # Copyright (C) 2004-2018 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. # # Authors: Aric Hagberg (hagberg@lanl.gov) # Pieter Swart (swart@lanl.gov) # Sasha Gutfrai...
34.205607
79
0.597541
from __future__ import division from operator import itemgetter import cynetworkx as nx __all__ = ['load_centrality', 'edge_load_centrality'] def newman_betweenness_centrality(G, v=None, cutoff=None, normalized=True, weight=None): if v is not None: betweenness = 0.0 ...
true
true
f752fa81f03ba81084e737c6b9d288c28f89e6af
8,841
py
Python
docs/conf.py
TrackNet/python-lz4
28d59e3b00f0ec763463ada5b92e529d4c1fb80b
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
TrackNet/python-lz4
28d59e3b00f0ec763463ada5b92e529d4c1fb80b
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
TrackNet/python-lz4
28d59e3b00f0ec763463ada5b92e529d4c1fb80b
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # python-lz4 documentation build configuration file, created by # sphinx-quickstart on Sat Jun 4 21:29:32 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # ...
31.575
79
0.727067
import sys import os needs_sphinx = '1.4.8' extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.coverage', 'sphinx.ext.napoleon', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'python-lz4' copyright = u'2016, python-lz4 developers' ...
true
true
f752faf4287ec84b5805ccf334d07fe854cc3658
3,569
py
Python
sdk/python/pulumi_gcp/tpu/get_tensorflow_versions.py
dimpu47/pulumi-gcp
38355de300a5768e11c49d344a8165ba0735deed
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_gcp/tpu/get_tensorflow_versions.py
dimpu47/pulumi-gcp
38355de300a5768e11c49d344a8165ba0735deed
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_gcp/tpu/get_tensorflow_versions.py
dimpu47/pulumi-gcp
38355de300a5768e11c49d344a8165ba0735deed
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Dict, List, Mapping, Optional, Tuple, Union from .. import ...
35.336634
244
0.657047
import warnings import pulumi import pulumi.runtime from typing import Any, Dict, List, Mapping, Optional, Tuple, Union from .. import _utilities, _tables __all__ = [ 'GetTensorflowVersionsResult', 'AwaitableGetTensorflowVersionsResult', 'get_tensorflow_versions', ] @pulumi.output_type class GetTensorflo...
true
true
f752fb318e8ac6abcd367ad4040847fb0c13df95
279
py
Python
components/oneshot.py
Yooooomi/my-car
7b6d0fec6537876471e0293bdcc8edc80d684acd
[ "MIT" ]
null
null
null
components/oneshot.py
Yooooomi/my-car
7b6d0fec6537876471e0293bdcc8edc80d684acd
[ "MIT" ]
null
null
null
components/oneshot.py
Yooooomi/my-car
7b6d0fec6537876471e0293bdcc8edc80d684acd
[ "MIT" ]
null
null
null
import core from component import Component import asyncio class Oneshot(Component): async def start(self): core.core.delete_component(self) await asyncio.sleep(5) print("End start") def stop(self): super().stop() print("Closed")
21.461538
40
0.641577
import core from component import Component import asyncio class Oneshot(Component): async def start(self): core.core.delete_component(self) await asyncio.sleep(5) print("End start") def stop(self): super().stop() print("Closed")
true
true
f752fbee322e46007e66f92fc7a32682121f4ffc
8,298
py
Python
var/spack/repos/builtin/packages/lua/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
9
2018-04-18T07:51:40.000Z
2021-09-10T03:56:57.000Z
var/spack/repos/builtin/packages/lua/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
907
2018-04-18T11:17:57.000Z
2022-03-31T13:20:25.000Z
var/spack/repos/builtin/packages/lua/package.py
robertodr/spack
9b809e01b47d48f01b3d257912fe1b752943cd3d
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
29
2018-11-05T16:14:23.000Z
2022-02-03T16:07:09.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * import os class Lua(Package): """The Lua programming language interpreter and library.""" h...
42.994819
95
0.597132
from spack import * import os class Lua(Package): homepage = "http://www.lua.org" url = "http://www.lua.org/ftp/lua-5.3.4.tar.gz" version('5.3.5', sha256='0c2eed3f960446e1a3e4b9a1ca2f3ff893b6ce41942cf54d5dd59ab4b3b058ac') version('5.3.4', sha256='f681aa518233bc407e23acf0f5887c884f17436f000d453b2491...
true
true
f752fbf7d55f19811d816d787e4e6d59db6475ac
21,290
py
Python
geophys_utils/netcdf_converter/aseg_gdf_utils.py
GeoscienceAustralia/geophys_utils
e5580f582f3e42f347d71b140dd9213f784e2fde
[ "Apache-2.0" ]
18
2018-05-16T04:46:56.000Z
2021-04-02T13:12:46.000Z
geophys_utils/netcdf_converter/aseg_gdf_utils.py
alex-ip/geophys_utils
0681f6260f8fe7a9d5097fb8759a2b57c41fccc3
[ "Apache-2.0" ]
6
2018-08-06T00:38:36.000Z
2021-11-01T01:28:49.000Z
geophys_utils/netcdf_converter/aseg_gdf_utils.py
GeoscienceAustralia/geophys_utils
e5580f582f3e42f347d71b140dd9213f784e2fde
[ "Apache-2.0" ]
9
2018-05-15T23:03:34.000Z
2021-12-16T00:00:44.000Z
''' Functions to work with ASEG-GDF format string Refer to https://www.aseg.org.au/sites/default/files/pdf/ASEG-GDF2-REV4.pdf for further information Created on 19 Jun. 2018 @author: u76345 ''' import re import numpy as np from collections import OrderedDict from math import ceil, log10 import logging logger = logg...
56.62234
159
0.57985
import re import numpy as np from collections import OrderedDict from math import ceil, log10 import logging logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) def dfrexp(f): if type(f) == np.ndarray: fexp = np.zeros(shape=f.shape, dtype='int32') fexp[f != 0] = np.ceil(np.log1...
true
true
f752fc1f96446be9fed0c71f41d06703d3283d3d
2,707
py
Python
watchdog.py
appKom/watchdog
fcf3ed3efc435a701bea956d72653e82afe13bcf
[ "MIT" ]
null
null
null
watchdog.py
appKom/watchdog
fcf3ed3efc435a701bea956d72653e82afe13bcf
[ "MIT" ]
null
null
null
watchdog.py
appKom/watchdog
fcf3ed3efc435a701bea956d72653e82afe13bcf
[ "MIT" ]
null
null
null
import os import datetime import time from models import checkin, metadata from sqlalchemy import create_engine, MetaData # Generates the variables used later engine = create_engine('sqlite:///checkins.db') #TODO: get the name associated with cardnumber from API def returnName(numb): #Temp name until API is in place...
33.419753
145
0.701145
import os import datetime import time from models import checkin, metadata from sqlalchemy import create_engine, MetaData engine = create_engine('sqlite:///checkins.db') def returnName(numb): name = "Onliner" return name try: conn = engine.connect() metadata.create_all(engine) except: print("Oooops. Something...
true
true
f752fc6d41b905f0a405638f64421ba1204dca18
9,127
py
Python
deepchem/utils/save.py
saurabhclusterone/deepchem
29bcf0fbf29a74c264a553237627ad3573a4b09d
[ "MIT" ]
null
null
null
deepchem/utils/save.py
saurabhclusterone/deepchem
29bcf0fbf29a74c264a553237627ad3573a4b09d
[ "MIT" ]
null
null
null
deepchem/utils/save.py
saurabhclusterone/deepchem
29bcf0fbf29a74c264a553237627ad3573a4b09d
[ "MIT" ]
null
null
null
""" Simple utils to save and load from disk. """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals # TODO(rbharath): Use standard joblib once old-data has been regenerated. import joblib from sklearn.externals import joblib as old_joblib import gzip import js...
30.023026
156
0.696176
from __future__ import print_function from __future__ import division from __future__ import unicode_literals import joblib from sklearn.externals import joblib as old_joblib import gzip import json import pickle import pandas as pd import numpy as np import os import deepchem from rdkit import Chem import warnings fr...
true
true
f752fcc5fd13d79414efee84a4c82b5eab2bb52e
371
py
Python
study/functools_study.py
strawsyz/straw
db313c78c2e3c0355cd10c70ac25a15bb5632d41
[ "MIT" ]
2
2020-04-06T09:09:19.000Z
2020-07-24T03:59:55.000Z
study/functools_study.py
strawsyz/straw
db313c78c2e3c0355cd10c70ac25a15bb5632d41
[ "MIT" ]
null
null
null
study/functools_study.py
strawsyz/straw
db313c78c2e3c0355cd10c70ac25a15bb5632d41
[ "MIT" ]
null
null
null
from functools import partial # 偏函数(functools.partial) def add(*args, **kwargs): # 打印位置参数 for n in args: print(n) print("-" * 20) # 打印关键字参数 for k, v in kwargs.items(): print('%s:%s' % (k, v)) add_partial = partial(add, 10, k1=10, k2=20) if __name__ == '__main__': # add(1, 2...
17.666667
44
0.552561
from functools import partial def add(*args, **kwargs): for n in args: print(n) print("-" * 20) for k, v in kwargs.items(): print('%s:%s' % (k, v)) add_partial = partial(add, 10, k1=10, k2=20) if __name__ == '__main__': add_partial(1, 2, 3, k3=20)
true
true
f752fcfa56c8de2a2d31b9434422811cc975fa82
1,411
py
Python
app/FrontendMicroservice/setup_app/config.py
AdavisSnakes/GrocerySaaS
1d0b50d1c0d2e53b1bdb9fe57e94c6168b7e4c84
[ "MIT" ]
null
null
null
app/FrontendMicroservice/setup_app/config.py
AdavisSnakes/GrocerySaaS
1d0b50d1c0d2e53b1bdb9fe57e94c6168b7e4c84
[ "MIT" ]
null
null
null
app/FrontendMicroservice/setup_app/config.py
AdavisSnakes/GrocerySaaS
1d0b50d1c0d2e53b1bdb9fe57e94c6168b7e4c84
[ "MIT" ]
null
null
null
MODE='NotTesting' DEBUG=True if MODE == 'Testing': # For MacOS, this fixes an issue where you can't reach other endpoints on localhost MYSQL_HOST='host.docker.internal' BASE_URL='host.docker.internal' else: MYSQL_HOST='localhost' BASE_URL='localhost' MYSQL_PORT='3306' MYSQL_USER="root" MYSQL_PASSW...
32.068182
113
0.836286
MODE='NotTesting' DEBUG=True if MODE == 'Testing': MYSQL_HOST='host.docker.internal' BASE_URL='host.docker.internal' else: MYSQL_HOST='localhost' BASE_URL='localhost' MYSQL_PORT='3306' MYSQL_USER="root" MYSQL_PASSWORD="Thetree565" MYSQL_DB_NAME="FrontendDb" TRIAL_LENGTH_DAYS=1 SQLALCHEMY_TRACK_MO...
true
true
f752fd98470b80d081be0e8714ae6e4f05bd2e96
436
py
Python
src/action/migrations/0024_auto_20180630_1418.py
japesone/ontask_b
17af441f9893c521d2e14011e7790ba4077e3318
[ "MIT" ]
1
2020-11-08T16:47:46.000Z
2020-11-08T16:47:46.000Z
src/action/migrations/0024_auto_20180630_1418.py
japesone/ontask_b
17af441f9893c521d2e14011e7790ba4077e3318
[ "MIT" ]
null
null
null
src/action/migrations/0024_auto_20180630_1418.py
japesone/ontask_b
17af441f9893c521d2e14011e7790ba4077e3318
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-30 04:48 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('action', '0023_set_content_and_columns'), ] operations = [ migrations.RenameField(...
20.761905
51
0.612385
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('action', '0023_set_content_and_columns'), ] operations = [ migrations.RenameField( model_name='action', old_name='_content', ...
true
true
f752fdb06a3c16647d3be763ba89305cacad3ce1
3,109
py
Python
fn_misp/fn_misp/components/misp_create_event.py
rudimeyer/resilient-community-apps
7a46841ba41fa7a1c421d4b392b0a3ca9e36bd00
[ "MIT" ]
1
2020-08-25T03:43:07.000Z
2020-08-25T03:43:07.000Z
fn_misp/fn_misp/components/misp_create_event.py
rudimeyer/resilient-community-apps
7a46841ba41fa7a1c421d4b392b0a3ca9e36bd00
[ "MIT" ]
1
2019-07-08T16:57:48.000Z
2019-07-08T16:57:48.000Z
fn_misp/fn_misp/components/misp_create_event.py
rudimeyer/resilient-community-apps
7a46841ba41fa7a1c421d4b392b0a3ca9e36bd00
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # pragma pylint: disable=unused-argument, no-self-use """Function implementation""" import logging from pymisp import PyMISP from resilient_circuits import ResilientComponent, function, handler, StatusMessage, FunctionResult, FunctionError PACKAGE= "fn_misp" class FunctionComponent(ResilientC...
39.35443
159
0.621743
import logging from pymisp import PyMISP from resilient_circuits import ResilientComponent, function, handler, StatusMessage, FunctionResult, FunctionError PACKAGE= "fn_misp" class FunctionComponent(ResilientComponent): def __init__(self, opts): super(FunctionComponent, self).__init__(opts) self...
true
true
f752feb07f34b09d7a64b8932bc6cc20424af18f
5,615
py
Python
qa/rpc-tests/rpcbind_test.py
kazucoin/kazugold
7b0e034b08eceacf907b18913be7043c9cdcf5f4
[ "MIT" ]
1
2019-06-02T17:21:29.000Z
2019-06-02T17:21:29.000Z
qa/rpc-tests/rpcbind_test.py
kazucoin/kazugold
7b0e034b08eceacf907b18913be7043c9cdcf5f4
[ "MIT" ]
null
null
null
qa/rpc-tests/rpcbind_test.py
kazucoin/kazugold
7b0e034b08eceacf907b18913be7043c9cdcf5f4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Test for -rpcbind, as well as -rpcallowip and -rpcconnect # TODO extend this test from the test framew...
37.939189
118
0.643099
import tempfile import traceback from test_framework.util import * from test_framework.netutil import * def run_bind_test(tmpdir, allow_ips, connect_to, addresses, expected): expected = [(addr_to_hex(addr), port) for (addr, port) in expected] base_args = ['-disablewallet', '-nolisten'] if allow_ips: ...
true
true
f752febf3d0b910578269f3eec4095f27767e765
4,974
py
Python
dislash/application_commands/errors.py
Bakersbakebread/dislash.py
afe19c3ebf0b95a3abdec08f3fde8b455024aabd
[ "MIT" ]
371
2021-02-07T07:47:38.000Z
2022-02-17T13:06:51.000Z
dislash/application_commands/errors.py
Bakersbakebread/dislash.py
afe19c3ebf0b95a3abdec08f3fde8b455024aabd
[ "MIT" ]
39
2021-03-22T06:06:05.000Z
2021-12-20T05:46:36.000Z
dislash/application_commands/errors.py
Bakersbakebread/dislash.py
afe19c3ebf0b95a3abdec08f3fde8b455024aabd
[ "MIT" ]
51
2021-02-08T18:12:40.000Z
2022-01-17T14:14:50.000Z
from discord import DiscordException class ApplicationCommandError(DiscordException): """ The base exception type for all slash-command related errors. This inherits from :exc:`discord.DiscordException`. This exception and exceptions inherited from it are handled in a special way as they are cau...
32.090323
103
0.660836
from discord import DiscordException class ApplicationCommandError(DiscordException): def __init__(self, message=None, *args): if message is not None: m = message.replace("@everyone", "@\u200beveryone").replace("@here", "@\u200bhere") super().__init__(m, *args) ...
true
true
f752feffd2396b65976a86502ed1c62a7b81d545
381
py
Python
rabbit_python/sender.py
flaviogf/Exemplos
fc666429f6e90c388e201fb7b7d5801e3c25bd25
[ "MIT" ]
null
null
null
rabbit_python/sender.py
flaviogf/Exemplos
fc666429f6e90c388e201fb7b7d5801e3c25bd25
[ "MIT" ]
5
2019-12-29T04:58:10.000Z
2021-03-11T04:35:15.000Z
rabbit_python/sender.py
flaviogf/Exemplos
fc666429f6e90c388e201fb7b7d5801e3c25bd25
[ "MIT" ]
null
null
null
import pika import os URL_RABBIT = os.getenv('URL_RABBIT') connection = pika.BlockingConnection(pika.ConnectionParameters(URL_RABBIT)) channel = connection.channel() channel.queue_declare(queue='hello') channel.basic_publish(exchange='', routing_key='hello', body='Hello W...
23.8125
75
0.687664
import pika import os URL_RABBIT = os.getenv('URL_RABBIT') connection = pika.BlockingConnection(pika.ConnectionParameters(URL_RABBIT)) channel = connection.channel() channel.queue_declare(queue='hello') channel.basic_publish(exchange='', routing_key='hello', body='Hello W...
true
true
f752ff3e2478a58215db3f6b7dc628f8e1956fb2
306
py
Python
tests/sproc/metrics_test.py
gaocegege/treadmill
04325d319c0ee912c066f07b88b674e84485f154
[ "Apache-2.0" ]
2
2017-03-20T07:13:33.000Z
2017-05-03T03:39:53.000Z
tests/sproc/metrics_test.py
gaocegege/treadmill
04325d319c0ee912c066f07b88b674e84485f154
[ "Apache-2.0" ]
12
2017-07-10T07:04:06.000Z
2017-07-26T09:32:54.000Z
tests/sproc/metrics_test.py
gaocegege/treadmill
04325d319c0ee912c066f07b88b674e84485f154
[ "Apache-2.0" ]
2
2017-05-04T11:25:32.000Z
2017-07-11T09:10:01.000Z
"""Unit test for treadmill.sproc.metrics""" import unittest # the point of this file is to check at least the syntax from treadmill.sproc import metrics # noqa: F401 class MetricsTest(unittest.TestCase): """Test treadmill.sproc.metrics""" pass if __name__ == '__main__': unittest.main()
19.125
56
0.715686
import unittest from treadmill.sproc import metrics class MetricsTest(unittest.TestCase): pass if __name__ == '__main__': unittest.main()
true
true
f752fffbaec2694ca4123a218a65bea81481dec8
1,110
py
Python
cvxpy/constraints/constraint.py
quantopian/cvxpy
7deee4d172470aa8f629dab7fead50467afa75ff
[ "Apache-2.0" ]
5
2017-08-31T01:37:00.000Z
2022-03-24T04:23:09.000Z
cvxpy/constraints/constraint.py
quantopian/cvxpy
7deee4d172470aa8f629dab7fead50467afa75ff
[ "Apache-2.0" ]
null
null
null
cvxpy/constraints/constraint.py
quantopian/cvxpy
7deee4d172470aa8f629dab7fead50467afa75ff
[ "Apache-2.0" ]
6
2017-02-09T19:37:07.000Z
2021-01-07T00:17:54.000Z
""" Copyright 2017 Steven Diamond Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software...
27.073171
72
0.707207
import cvxpy.lin_ops.lin_utils as lu import abc class Constraint(object): __metaclass__ = abc.ABCMeta def __init__(self, constr_id=None): if constr_id is None: self.constr_id = lu.get_id() else: self.constr_id = constr_id super(Constraint, self).__init__()
true
true
f75300fb96e8326a7cd967fd813024ab01e76c27
11,419
py
Python
configs/_base_/datasets/char_bbox_instance.py
jireh-father/mmdetection
b797e4d5b81c5a3d7d868ee2dc9aa27dbab23e7d
[ "Apache-2.0" ]
null
null
null
configs/_base_/datasets/char_bbox_instance.py
jireh-father/mmdetection
b797e4d5b81c5a3d7d868ee2dc9aa27dbab23e7d
[ "Apache-2.0" ]
null
null
null
configs/_base_/datasets/char_bbox_instance.py
jireh-father/mmdetection
b797e4d5b81c5a3d7d868ee2dc9aa27dbab23e7d
[ "Apache-2.0" ]
null
null
null
dataset_type = 'CocoDataset' data_root = 'data/coco/' img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) train_pipeline = [ dict(type='LoadImageFromFile'), dict(type='LoadAnnotations', with_bbox=True, with_mask=True), dict(type='Resize', img_scale=(1333, 800),...
219.596154
9,657
0.308784
dataset_type = 'CocoDataset' data_root = 'data/coco/' img_norm_cfg = dict( mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) train_pipeline = [ dict(type='LoadImageFromFile'), dict(type='LoadAnnotations', with_bbox=True, with_mask=True), dict(type='Resize', img_scale=(1333, 800),...
true
true
f753011ef525e355a2583e0f353335c1c2ee27a6
6,457
py
Python
purity_fb/purity_fb_1dot9/models/array_connection_path.py
bsamz-ps/purity_fb_python_client
11f27ef0c72d8aac1fc4e1ed036cca038b85dfa4
[ "Apache-2.0" ]
null
null
null
purity_fb/purity_fb_1dot9/models/array_connection_path.py
bsamz-ps/purity_fb_python_client
11f27ef0c72d8aac1fc4e1ed036cca038b85dfa4
[ "Apache-2.0" ]
null
null
null
purity_fb/purity_fb_1dot9/models/array_connection_path.py
bsamz-ps/purity_fb_python_client
11f27ef0c72d8aac1fc4e1ed036cca038b85dfa4
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Pure Storage FlashBlade REST 1.9 Python SDK Pure Storage FlashBlade REST 1.9 Python SDK. Compatible with REST API versions 1.0 - 1.9. Developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/). ...
27.130252
249
0.567446
from pprint import pformat from six import iteritems import re class ArrayConnectionPath(object): swagger_types = { 'id': 'str', 'name': 'str', 'destination': 'str', 'source': 'str', 'status': 'str' } attribute_map = { 'id': 'id', 'name': 'name...
true
true
f75301a4ec187d1c996f877032870e7abff8cecd
1,133
py
Python
h/views/api/decorators/response.py
julien-cheng/h
36c8ec044725720cf36f0986cdf025395aca8929
[ "BSD-2-Clause" ]
2
2019-08-04T07:22:11.000Z
2020-07-17T05:01:41.000Z
h/views/api/decorators/response.py
11-eleven-11/h
91c7a4504ad7471ed3e30246763a03e6c1cc531b
[ "BSD-2-Clause" ]
4
2020-03-24T17:38:24.000Z
2022-03-02T05:45:01.000Z
h/views/api/decorators/response.py
11-eleven-11/h
91c7a4504ad7471ed3e30246763a03e6c1cc531b
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """API view decorators for response headers""" from __future__ import unicode_literals from h.views.api import API_VERSION_DEFAULT from h.views.api.helpers.media_types import media_type_for_version, version_media_types def version_media_type_header(wrapped): """View decorator to add resp...
37.766667
87
0.690203
from __future__ import unicode_literals from h.views.api import API_VERSION_DEFAULT from h.views.api.helpers.media_types import media_type_for_version, version_media_types def version_media_type_header(wrapped): def wrapper(context, request): response = wrapped(context, request) version...
true
true
f75301b42296322c8e560a51805682386fd76383
1,562
py
Python
blackbox/handlers/notifiers/telegram.py
rabibh/blackbox
c77dac14449a4a3d74ee3d2b00170b3085642bbf
[ "MIT" ]
31
2021-01-07T11:29:24.000Z
2022-03-19T12:43:43.000Z
blackbox/handlers/notifiers/telegram.py
rabibh/blackbox
c77dac14449a4a3d74ee3d2b00170b3085642bbf
[ "MIT" ]
61
2021-01-07T11:28:00.000Z
2021-07-05T11:25:54.000Z
blackbox/handlers/notifiers/telegram.py
rabibh/blackbox
c77dac14449a4a3d74ee3d2b00170b3085642bbf
[ "MIT" ]
10
2021-01-22T18:25:49.000Z
2022-03-05T18:19:08.000Z
import telebot from telebot.apihelper import ApiTelegramException from blackbox.handlers.notifiers._base import BlackboxNotifier from blackbox.utils.logger import log STRING_LIMIT = 2000 # Limit output CHECKMARK_EMOJI = "\U00002705" # ✔ FAIL_EMOJI = "\U0000274C" # ❌ WARNING_EMOJI = "\U000026A0" # ⚠ clas...
33.234043
78
0.596031
import telebot from telebot.apihelper import ApiTelegramException from blackbox.handlers.notifiers._base import BlackboxNotifier from blackbox.utils.logger import log STRING_LIMIT = 2000 CHECKMARK_EMOJI = "\U00002705" FAIL_EMOJI = "\U0000274C" WARNING_EMOJI = "\U000026A0" class Telegram(BlackboxNotifier...
true
true