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
f77b64fda5f721b0eb9ff5f5a0326bef89e75359
1,995
py
Python
src/meio/experiment/demo_gsm.py
dmcnamee/snc
c2da8c1e9ecdc42c59b9de73224b3d50ee1c9786
[ "Apache-2.0" ]
5
2021-03-24T16:23:10.000Z
2021-11-17T12:44:51.000Z
src/meio/experiment/demo_gsm.py
dmcnamee/snc
c2da8c1e9ecdc42c59b9de73224b3d50ee1c9786
[ "Apache-2.0" ]
3
2021-03-26T01:16:08.000Z
2021-05-08T22:06:47.000Z
src/meio/experiment/demo_gsm.py
dmcnamee/snc
c2da8c1e9ecdc42c59b9de73224b3d50ee1c9786
[ "Apache-2.0" ]
2
2021-03-24T17:20:06.000Z
2021-04-19T09:01:12.000Z
import argparse import os import re from logging import warning import meio.gsm.tree_gsm as tree_gsm from meio.experiment.gsm_experiment_utils import plot_gsm from meio.gsm.dag_gsm import GuaranteedServiceModelDAG from meio.gsm.utils import read_supply_chain_from_txt def run_gsm(path, network, figpath, run_gsm_optim...
38.365385
99
0.695739
import argparse import os import re from logging import warning import meio.gsm.tree_gsm as tree_gsm from meio.experiment.gsm_experiment_utils import plot_gsm from meio.gsm.dag_gsm import GuaranteedServiceModelDAG from meio.gsm.utils import read_supply_chain_from_txt def run_gsm(path, network, figpath, run_gsm_optim...
true
true
f77b65e1956902f4f56ff7d870cd97769d065b8f
23,436
py
Python
suites/DatabaseApi/Globals/GetGlobalProperties.py
dbulka/pytests
d2658cff3832293cb1b8abcd970f7df83a2b5035
[ "MIT" ]
null
null
null
suites/DatabaseApi/Globals/GetGlobalProperties.py
dbulka/pytests
d2658cff3832293cb1b8abcd970f7df83a2b5035
[ "MIT" ]
null
null
null
suites/DatabaseApi/Globals/GetGlobalProperties.py
dbulka/pytests
d2658cff3832293cb1b8abcd970f7df83a2b5035
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import lemoncheesecake.api as lcc from lemoncheesecake.matching import is_integer, check_that_in, check_that, is_list, is_, has_length, \ is_dict, has_entry, is_str from common.base_test import BaseTest SUITE = { "description": "Method 'get_global_properties'" } @lcc.prop("main", "ty...
52.3125
119
0.617725
import lemoncheesecake.api as lcc from lemoncheesecake.matching import is_integer, check_that_in, check_that, is_list, is_, has_length, \ is_dict, has_entry, is_str from common.base_test import BaseTest SUITE = { "description": "Method 'get_global_properties'" } @lcc.prop("main", "type") @lcc.prop("negative...
true
true
f77b66115347d8047c2d07fc6c6ee3f7cad8a733
2,744
py
Python
py2cytoscape/data/base_view.py
moritzschaefer/py2cytoscape
3411231d346eae8f8d87456d16c5ff5a6f769d41
[ "MIT" ]
1
2022-01-26T15:51:30.000Z
2022-01-26T15:51:30.000Z
py2cytoscape/data/base_view.py
moritzschaefer/py2cytoscape
3411231d346eae8f8d87456d16c5ff5a6f769d41
[ "MIT" ]
7
2017-08-25T12:36:20.000Z
2018-04-23T04:08:38.000Z
approaches/networkx-graph/visual/py2cytoscape/data/base_view.py
athityakumar/btp
a1bdad0ed6162faa482673347707c09228d6cd9c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import json import requests from . import BASE_URL, HEADERS BASE_URL_NETWORK = BASE_URL + 'networks' class BaseView(object): """ Base view class to directly access node/edge view properties. """ def __init__(self, network_view=None, obj_id=None, obj_type=None): if ne...
27.717172
76
0.556122
import json import requests from . import BASE_URL, HEADERS BASE_URL_NETWORK = BASE_URL + 'networks' class BaseView(object): def __init__(self, network_view=None, obj_id=None, obj_type=None): if network_view is None: raise ValueError('Network view is required.') if obj_type is None...
true
true
f77b676b3fc622ba30560d94eca7abf5f9a70ece
1,879
py
Python
docker/ubuntu-bionic/runtime_test.py
pabloinigoblasco/DroneRescue
9e2f47bfa24eea03787bc43bd42c49b762b4ec3d
[ "MIT" ]
null
null
null
docker/ubuntu-bionic/runtime_test.py
pabloinigoblasco/DroneRescue
9e2f47bfa24eea03787bc43bd42c49b762b4ec3d
[ "MIT" ]
null
null
null
docker/ubuntu-bionic/runtime_test.py
pabloinigoblasco/DroneRescue
9e2f47bfa24eea03787bc43bd42c49b762b4ec3d
[ "MIT" ]
1
2019-09-27T17:30:17.000Z
2019-09-27T17:30:17.000Z
#!/usr/bin/python import sys import os import threading from threading import Thread import time import signal import subprocess airsimprocess = subprocess.Popen(["/home/nvagent/Blocks/Blocks.sh"]) exit_flag = False def exit_properly_runtime_test(): global exit_flag print("CREATING SUCCESS RESULT FILE...
22.369048
141
0.658329
import sys import os import threading from threading import Thread import time import signal import subprocess airsimprocess = subprocess.Popen(["/home/nvagent/Blocks/Blocks.sh"]) exit_flag = False def exit_properly_runtime_test(): global exit_flag print("CREATING SUCCESS RESULT FILE") print("...
true
true
f77b6860a6d565ee49964dd25421a549980ca5f0
990
py
Python
sound_download.py
Abhisathy/Imound
8e391b361496810b582428b0e33af3bacc43f602
[ "Apache-2.0" ]
null
null
null
sound_download.py
Abhisathy/Imound
8e391b361496810b582428b0e33af3bacc43f602
[ "Apache-2.0" ]
null
null
null
sound_download.py
Abhisathy/Imound
8e391b361496810b582428b0e33af3bacc43f602
[ "Apache-2.0" ]
3
2018-10-06T02:05:33.000Z
2018-10-11T03:16:03.000Z
import requests # headers = {'content-disposition': 'attachment'} # headers={'Authorization': 'Bearer 1n3SF3B1cXejCiQymF0fpsvNXitE7b'} # auth= "BINhnaWONXGmeTBxc1xs4jozzvnuaU" # url = "https://actions.google.com/sounds/v1/alarms/alarm_clock.ogg" # url_1 = 'https://freesound.org/apiv2/search/text/?query=piano&token=7W7...
35.357143
116
0.747475
import requests url = "http://10.25.55.250:5000/getImage" video_file = open('images/airplane.jpg', 'rb') payload = {'client_id': 1} response = requests.post(url, files={'file': video_file},data=payload) print(response.status_code)
true
true
f77b6861317afd09565cb5500c516423e915d34d
8,142
py
Python
python_modules/libraries/dagster-aws/dagster_aws/s3/compute_log_manager.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
null
null
null
python_modules/libraries/dagster-aws/dagster_aws/s3/compute_log_manager.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
null
null
null
python_modules/libraries/dagster-aws/dagster_aws/s3/compute_log_manager.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
1
2019-09-11T03:02:27.000Z
2019-09-11T03:02:27.000Z
import os from contextlib import contextmanager import boto3 from botocore.errorfactory import ClientError from dagster import Field, StringSource, check, seven from dagster.core.storage.compute_log_manager import ( MAX_BYTES_FILE_READ, ComputeIOType, ComputeLogFileData, ComputeLogManager, ) from dagst...
38.771429
100
0.663473
import os from contextlib import contextmanager import boto3 from botocore.errorfactory import ClientError from dagster import Field, StringSource, check, seven from dagster.core.storage.compute_log_manager import ( MAX_BYTES_FILE_READ, ComputeIOType, ComputeLogFileData, ComputeLogManager, ) from dagst...
true
true
f77b6959960611ae923c52198a4da3a4459be45b
10,166
py
Python
briefmetrics/test/functional/test_namecheap.py
shazow/briefmetrics
b6ca5ac0980ae00ccc160e6456e36ade8a3e2eeb
[ "MIT" ]
18
2020-02-06T23:31:43.000Z
2022-02-09T00:32:42.000Z
briefmetrics/test/functional/test_namecheap.py
shazow/briefmetrics
b6ca5ac0980ae00ccc160e6456e36ade8a3e2eeb
[ "MIT" ]
8
2020-02-08T23:00:46.000Z
2021-07-27T20:52:12.000Z
briefmetrics/test/functional/test_namecheap.py
shazow/briefmetrics
b6ca5ac0980ae00ccc160e6456e36ade8a3e2eeb
[ "MIT" ]
1
2020-07-09T12:59:27.000Z
2020-07-09T12:59:27.000Z
from briefmetrics import api from briefmetrics import test from briefmetrics import model from briefmetrics.lib.service import registry as service_registry from briefmetrics.lib.payment import registry as payment_registry from dateutil.relativedelta import relativedelta import mock import json import logging import da...
43.076271
544
0.652961
from briefmetrics import api from briefmetrics import test from briefmetrics import model from briefmetrics.lib.service import registry as service_registry from briefmetrics.lib.payment import registry as payment_registry from dateutil.relativedelta import relativedelta import mock import json import logging import da...
true
true
f77b69b1bf15c8138d9938634bde27736a37c712
6,767
py
Python
src/third_party/wiredtiger/test/suite/test_cursor05.py
SunguckLee/real-mongodb
fef0e44fafc6d3709a84101327e7d2f54dd18d88
[ "Apache-2.0" ]
4
2018-02-06T01:53:12.000Z
2018-02-20T01:47:36.000Z
src/third_party/wiredtiger/test/suite/test_cursor05.py
SunguckLee/real-mongodb
fef0e44fafc6d3709a84101327e7d2f54dd18d88
[ "Apache-2.0" ]
null
null
null
src/third_party/wiredtiger/test/suite/test_cursor05.py
SunguckLee/real-mongodb
fef0e44fafc6d3709a84101327e7d2f54dd18d88
[ "Apache-2.0" ]
3
2018-02-06T01:53:18.000Z
2021-07-28T09:48:15.000Z
#!/usr/bin/env python # # Public Domain 2014-2016 MongoDB, Inc. # Public Domain 2008-2014 WiredTiger, Inc. # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either in source code form or as ...
38.016854
81
0.598049
import wiredtiger, wttest class test_cursor05(wttest.WiredTigerTestCase): nentries = 2 def populate(self, count): cursor = self.session.open_cursor('table:main', None, None) for i in range(0, count): cursor[(i, 'key' + str(i))] = ('val' + str(i), i, 'val' + str(i), i) ...
true
true
f77b69e93079eadde7f5a44f7eaa1e28af162f63
7,506
py
Python
clients/kratos/python/ory_kratos_client/model/update_identity.py
simoneromano96/sdk
a6113d0daefbbb803790297e4b242d4c7cbbcb22
[ "Apache-2.0" ]
null
null
null
clients/kratos/python/ory_kratos_client/model/update_identity.py
simoneromano96/sdk
a6113d0daefbbb803790297e4b242d4c7cbbcb22
[ "Apache-2.0" ]
null
null
null
clients/kratos/python/ory_kratos_client/model/update_identity.py
simoneromano96/sdk
a6113d0daefbbb803790297e4b242d4c7cbbcb22
[ "Apache-2.0" ]
null
null
null
""" Ory Kratos API Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the admini...
43.137931
446
0.603917
import re import sys from ory_kratos_client.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) c...
true
true
f77b6adf7c685ab980f6421edbf3ae4821200d6d
9,278
py
Python
applications/welcome/languages/pl.py
jessicadelrio/HandyHouse
058e8981da850790c84f990fd2a3bbcf9aa695cc
[ "BSD-3-Clause" ]
21
2018-02-16T17:43:59.000Z
2021-12-29T12:08:28.000Z
applications/welcome/languages/pl.py
jessicadelrio/HandyHouse
058e8981da850790c84f990fd2a3bbcf9aa695cc
[ "BSD-3-Clause" ]
40
2018-05-05T22:01:49.000Z
2018-06-11T19:37:16.000Z
applications/welcome/languages/pl.py
jessicadelrio/HandyHouse
058e8981da850790c84f990fd2a3bbcf9aa695cc
[ "BSD-3-Clause" ]
8
2018-10-08T03:48:00.000Z
2022-03-31T12:13:01.000Z
# -*- coding: utf-8 -*- { '!langcode!': 'pl', '!langname!': 'Polska', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Uaktualnij" jest dodatkowym wyrażeniem postaci "pole1=\'nowawartość\'". Nie możesz uaktualnić lub usunąć wyników z JOIN:', '%s %%{ro...
44.392344
280
0.658763
{ '!langcode!': 'pl', '!langname!': 'Polska', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Uaktualnij" jest dodatkowym wyrażeniem postaci "pole1=\'nowawartość\'". Nie możesz uaktualnić lub usunąć wyników z JOIN:', '%s %%{row} deleted': 'Wierszy us...
true
true
f77b6b082813c9d2af7cf34251e76014a23ef5e5
351
py
Python
Q876_Middle_Linked_List.py
amitjoshi9627/LeetCode-Solutions
64f85459804fbcf017466f4815c1b3cd2e53d722
[ "MIT" ]
1
2020-07-11T10:28:03.000Z
2020-07-11T10:28:03.000Z
Q876_Middle_Linked_List.py
amitjoshi9627/LeetCode-Solutions
64f85459804fbcf017466f4815c1b3cd2e53d722
[ "MIT" ]
null
null
null
Q876_Middle_Linked_List.py
amitjoshi9627/LeetCode-Solutions
64f85459804fbcf017466f4815c1b3cd2e53d722
[ "MIT" ]
null
null
null
''' LeetCode LinkedList Q.876 Middle of the Linked List Recusion and Slow/Fast Pointer Solution ''' def middleNode(self, head: ListNode) -> ListNode: def rec(slow, fast): if not fast: return slow elif not fast.next: return slow return rec(slow.next, fast.next.nex...
18.473684
51
0.621083
def middleNode(self, head: ListNode) -> ListNode: def rec(slow, fast): if not fast: return slow elif not fast.next: return slow return rec(slow.next, fast.next.next) return rec(head, head)
true
true
f77b6bbf35fa662f11141fbe6a4f8a6896f2a498
3,462
py
Python
port_forwarding.py
gauravssnl/Python3-Network-Programming
32bb5a4872bce60219c6387b6f3c2e7f31b0654a
[ "MIT" ]
4
2017-12-04T15:05:35.000Z
2021-03-24T11:53:39.000Z
port_forwarding.py
gauravssnl/Python3-Network-Programming
32bb5a4872bce60219c6387b6f3c2e7f31b0654a
[ "MIT" ]
null
null
null
port_forwarding.py
gauravssnl/Python3-Network-Programming
32bb5a4872bce60219c6387b6f3c2e7f31b0654a
[ "MIT" ]
null
null
null
import asyncore import socket LOCAL_SERVER_HOST = 'localhost' REMOTE_SERVER_HOST = 'www.google.com' BUFFSIZE = 2048 class PortForwarder(asyncore.dispatcher): def __init__(self, ip, port, remoteip, remoteport, backlog=5): asyncore.dispatcher.__init__(self) self.remoteip = remoteip self.rem...
33.61165
76
0.653668
import asyncore import socket LOCAL_SERVER_HOST = 'localhost' REMOTE_SERVER_HOST = 'www.google.com' BUFFSIZE = 2048 class PortForwarder(asyncore.dispatcher): def __init__(self, ip, port, remoteip, remoteport, backlog=5): asyncore.dispatcher.__init__(self) self.remoteip = remoteip self.rem...
true
true
f77b6ed718c089543af9c68c69b62f337ddb39be
25,113
py
Python
mediation/packages/bts/network_audit.py
chandusekhar/bts-ce
ad546dd06ca3c89d0c96ac8242302f4678ca3ee3
[ "Apache-2.0" ]
29
2018-04-25T01:11:12.000Z
2022-02-25T06:36:53.000Z
mediation/packages/bts/network_audit.py
chandusekhar/bts-ce
ad546dd06ca3c89d0c96ac8242302f4678ca3ee3
[ "Apache-2.0" ]
25
2018-03-11T21:52:20.000Z
2021-01-20T04:40:26.000Z
mediation/packages/bts/network_audit.py
chandusekhar/bts-ce
ad546dd06ca3c89d0c96ac8242302f4678ca3ee3
[ "Apache-2.0" ]
16
2018-04-14T23:00:54.000Z
2021-10-06T20:14:26.000Z
import psycopg2 from sqlalchemy import create_engine, MetaData, Table from sqlalchemy.orm import sessionmaker from sqlalchemy.sql import text import os class NetworkAudit(object): def __init__(self): ''' Constructor for this class. ''' #@TODO: Refactor sqlalchemy_db_uri = 'postgresql://{...
42.854949
205
0.558237
import psycopg2 from sqlalchemy import create_engine, MetaData, Table from sqlalchemy.orm import sessionmaker from sqlalchemy.sql import text import os class NetworkAudit(object): def __init__(self): sqlalchemy_db_uri = 'postgresql://{0}:{1}@{2}:{3}/{4}'.format( os.getenv("BTS_DB_USE...
true
true
f77b6f2e8dd7f476196d3d282ef24eee07029b3a
2,940
py
Python
Algorithm.Python/RawDataRegressionAlgorithm.py
szymanskilukasz/Lean
fe2ac131af2d0614494e5c970a57d4b7c89d5f88
[ "Apache-2.0" ]
1
2021-05-19T21:26:57.000Z
2021-05-19T21:26:57.000Z
Algorithm.Python/RawDataRegressionAlgorithm.py
szymanskilukasz/Lean
fe2ac131af2d0614494e5c970a57d4b7c89d5f88
[ "Apache-2.0" ]
null
null
null
Algorithm.Python/RawDataRegressionAlgorithm.py
szymanskilukasz/Lean
fe2ac131af2d0614494e5c970a57d4b7c89d5f88
[ "Apache-2.0" ]
null
null
null
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect 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 Licen...
43.235294
105
0.683333
from clr import AddReference AddReference("System.Core") AddReference("QuantConnect.Common") AddReference("QuantConnect.Algorithm") from System import * from QuantConnect import * from QuantConnect.Algorithm import QCAlgorithm from QuantConnect.Data.Auxiliary import FactorFile from QuantConnect.Data.UniverseSelection...
true
true
f77b700003da1232aab935433d72a1f8bc7c676a
1,784
py
Python
aux 6/heroe.py
ppizarror/CC3501-2018-2
399da13589db46a0898c486469b03929845c631f
[ "MIT" ]
1
2018-09-12T01:16:03.000Z
2018-09-12T01:16:03.000Z
aux 6/heroe.py
CC3501/CC3501-2018-2
399da13589db46a0898c486469b03929845c631f
[ "MIT" ]
null
null
null
aux 6/heroe.py
CC3501/CC3501-2018-2
399da13589db46a0898c486469b03929845c631f
[ "MIT" ]
null
null
null
import pygame from pygame.locals import * from OpenGL.GL import * from OpenGL.GLU import * import numpy as np from curvas import * from utils import rgb class Heroe: def __init__(self, p): self.p = np.array(p) # posicion self.vive = True # marca para poder eliminar ... self.r = 30 def...
21.756098
70
0.492152
import pygame from pygame.locals import * from OpenGL.GL import * from OpenGL.GLU import * import numpy as np from curvas import * from utils import rgb class Heroe: def __init__(self, p): self.p = np.array(p) self.vive = True self.r = 30 def mover(self,dt,v): self.p = self.p ...
true
true
f77b7079b192a76bd3f2d67c6d3d919922a85875
5,642
py
Python
_MOM/_Pred/Spec.py
Tapyr/tapyr
4235fba6dce169fe747cce4d17d88dcf4a3f9f1d
[ "BSD-3-Clause" ]
6
2016-12-10T17:51:10.000Z
2021-10-11T07:51:48.000Z
_MOM/_Pred/Spec.py
Tapyr/tapyr
4235fba6dce169fe747cce4d17d88dcf4a3f9f1d
[ "BSD-3-Clause" ]
null
null
null
_MOM/_Pred/Spec.py
Tapyr/tapyr
4235fba6dce169fe747cce4d17d88dcf4a3f9f1d
[ "BSD-3-Clause" ]
3
2020-03-29T07:37:03.000Z
2021-01-21T16:08:40.000Z
# -*- coding: utf-8 -*- # Copyright (C) 2009-2016 Mag. Christian Tanzer. All rights reserved # Glasauergasse 32, A--1130 Wien, Austria. tanzer@swing.co.at # **************************************************************************** # This module is part of the package _MOM. # # This module is licensed under the terms...
37.118421
80
0.576746
from _MOM import MOM from _TFL import TFL from _TFL.pyk import pyk import _MOM._Meta.M_Pred_Spec import _MOM._Pred.Kind import _MOM._Pred.Type import _MOM._Prop.Spec import _TFL._Meta.Property import _TFL._Meta.Once_Property import _TFL.defaultdict class Spec (MO...
true
true
f77b70df00e897c96372dbfa1a9e5f3890759401
2,150
py
Python
tests/src/python/test_qgsvectorlayertools.py
dyna-mis/Hilabeling
cb7d5d4be29624a20c8a367162dbc6fd779b2b52
[ "MIT" ]
null
null
null
tests/src/python/test_qgsvectorlayertools.py
dyna-mis/Hilabeling
cb7d5d4be29624a20c8a367162dbc6fd779b2b52
[ "MIT" ]
null
null
null
tests/src/python/test_qgsvectorlayertools.py
dyna-mis/Hilabeling
cb7d5d4be29624a20c8a367162dbc6fd779b2b52
[ "MIT" ]
1
2021-12-25T08:40:30.000Z
2021-12-25T08:40:30.000Z
# -*- coding: utf-8 -*- """QGIS Unit test utils for provider tests. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. "...
28.666667
137
0.663256
__author__ = 'Denis Rouzaud' __date__ = '2016-11-07' __copyright__ = 'Copyright 2015, The QGIS Project' __revision__ = '176c06ceefb5f555205e72b20c962740cc0ec183' from qgis.core import QgsFeatureRequest, QgsVectorLayer, QgsProject, QgsVectorLayerTools from qgis.testing import start_app, unittest import os start_app(...
true
true
f77b70f2dfbd3a28a4a742b908a2085e52a8cdb8
1,004
py
Python
1 MyPractice/A_Tutorials/Socratica/1ArithmeticV3.py
Davidjbennett/DavidBennett.github.io
09a2652b7ace8741bf23c6432abd58ee790b9f0c
[ "MIT" ]
3
2021-05-18T16:17:29.000Z
2022-01-20T15:46:59.000Z
1 MyPractice/A_Tutorials/Socratica/1ArithmeticV3.py
Davidjbennett/DavidBennett
09a2652b7ace8741bf23c6432abd58ee790b9f0c
[ "MIT" ]
null
null
null
1 MyPractice/A_Tutorials/Socratica/1ArithmeticV3.py
Davidjbennett/DavidBennett
09a2652b7ace8741bf23c6432abd58ee790b9f0c
[ "MIT" ]
null
null
null
#V2 uses 4 types of numbers #V3 uses 3 types of numbers #types of numbers: int, float, complex print("\nNumbers:") #int a = 496 print("a(496) is a:",type(a)) #float e = 2.718281828 f = 2.0 print("e(2.718281828) is a:",type(e)) print("f(2.0) is a:",type(f)) #complex numbers z = 2 - 6.1j print("z(2-6.1j) is a:",type(z...
17.928571
57
0.665339
print("\nNumbers:") a = 496 print("a(496) is a:",type(a)) e = 2.718281828 f = 2.0 print("e(2.718281828) is a:",type(e)) print("f(2.0) is a:",type(f)) z = 2 - 6.1j print("z(2-6.1j) is a:",type(z)) print("\n\nArithmetic:") x = 28 y = 28.0 print(float(28)) print(int(3.14)) x = 1.732 + 0j a = 2 b = 6.0 c = 12 + 0j ...
true
true
f77b712c85eb6f01f63c76e04226dd8b8d28458d
1,232
py
Python
tools/pulp_tools/pulp-configs/python/generators/v1/devices/jtag_proxy_gen.py
knmcguire/gap_sdk
7b0a09a353ab6f0550793d40bd46e98051f4a3d7
[ "Apache-2.0" ]
118
2018-05-22T08:45:59.000Z
2022-03-30T07:00:45.000Z
tools/pulp_tools/pulp-configs/python/generators/v1/devices/jtag_proxy_gen.py
knmcguire/gap_sdk
7b0a09a353ab6f0550793d40bd46e98051f4a3d7
[ "Apache-2.0" ]
213
2018-07-25T02:37:32.000Z
2022-03-30T18:04:01.000Z
tools/pulp_tools/pulp-configs/python/generators/v1/devices/jtag_proxy_gen.py
knmcguire/gap_sdk
7b0a09a353ab6f0550793d40bd46e98051f4a3d7
[ "Apache-2.0" ]
76
2018-07-04T08:19:27.000Z
2022-03-24T09:58:05.000Z
# # Copyright (C) 2018 ETH Zurich, University of Bologna and # GreenWaves Technologies # # 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 # # U...
36.235294
92
0.775974
from generators.v1.comp_gen import * import collections import json_tools as js def gen_config(name, system_config, system, device_config, usecases=[]): system.system_tree.board.add_component(name, Tb_Component( config=device_config.get('config') )) system.system_tree.board.chip.jtag0 = system.system_...
true
true
f77b71827a683ec8c6ff5f0c24c1e7ed201fb194
804
py
Python
migrations/versions/0b9fe706da69_added_about_me_and_last_seen_to_user.py
kowabunga314/KarmaCompanion
b7e465f76a96fc3608d2147dc28b9818111bd288
[ "MIT" ]
2
2020-01-20T01:08:23.000Z
2020-02-10T00:45:49.000Z
migrations/versions/0b9fe706da69_added_about_me_and_last_seen_to_user.py
kowabunga314/KarmaCompanion
b7e465f76a96fc3608d2147dc28b9818111bd288
[ "MIT" ]
null
null
null
migrations/versions/0b9fe706da69_added_about_me_and_last_seen_to_user.py
kowabunga314/KarmaCompanion
b7e465f76a96fc3608d2147dc28b9818111bd288
[ "MIT" ]
null
null
null
"""added about_me and last_seen to user Revision ID: 0b9fe706da69 Revises: 3f0fb80d30af Create Date: 2019-12-14 14:45:04.886154 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '0b9fe706da69' down_revision = '3f0fb80d30af' branch_labels = None depends_on = None ...
25.935484
86
0.69403
from alembic import op import sqlalchemy as sa revision = '0b9fe706da69' down_revision = '3f0fb80d30af' branch_labels = None depends_on = None def upgrade(): op.add_column('user', sa.Column('about_me', sa.String(length=140), nullable=True)) op.add_column('user', sa.Column('last_seen', sa.DateTime(), nul...
true
true
f77b759cdcaed8596d8489609e2b10b04d700456
1,571
py
Python
samples/c2b.py
geoffreynyaga/daraja
61db415b474fae004547a4caa057fedfe375ebb6
[ "MIT" ]
23
2019-11-14T14:37:43.000Z
2022-02-25T01:53:09.000Z
samples/c2b.py
geoffreynyaga/daraja
61db415b474fae004547a4caa057fedfe375ebb6
[ "MIT" ]
11
2020-02-12T02:43:25.000Z
2022-02-19T04:43:54.000Z
samples/c2b.py
geoffreynyaga/daraja
61db415b474fae004547a4caa057fedfe375ebb6
[ "MIT" ]
15
2019-11-10T23:28:18.000Z
2022-03-04T08:35:17.000Z
import requests from requests.auth import HTTPBasicAuth from access_token import generate_access_token import keys def register_url(): my_access_token = generate_access_token() api_url = "https://sandbox.safaricom.co.ke/mpesa/c2b/v1/registerurl" headers = {"Authorization": "Bearer %s" % m...
27.086207
106
0.65818
import requests from requests.auth import HTTPBasicAuth from access_token import generate_access_token import keys def register_url(): my_access_token = generate_access_token() api_url = "https://sandbox.safaricom.co.ke/mpesa/c2b/v1/registerurl" headers = {"Authorization": "Bearer %s" % m...
true
true
f77b75ba7718c0ba0a702041560559e9d8f20a79
3,425
py
Python
analyze/dataset_distribution.py
wutong8023/PLM4CL
4e9e98be425150ad75468b26feb8fb7f5e93c34b
[ "MIT" ]
1
2021-06-30T04:27:57.000Z
2021-06-30T04:27:57.000Z
analyze/dataset_distribution.py
wutong8023/PLM4CL
4e9e98be425150ad75468b26feb8fb7f5e93c34b
[ "MIT" ]
null
null
null
analyze/dataset_distribution.py
wutong8023/PLM4CL
4e9e98be425150ad75468b26feb8fb7f5e93c34b
[ "MIT" ]
null
null
null
""" Author: Tong Time: --2021 """ from argparse import ArgumentParser from datasets import NAMES as DATASET_NAMES import importlib import os import seaborn as sns import matplotlib.pyplot as plt import numpy as np from utils.conf import base_path class DatasetAnalysis: def __init__(self, dataset, args): ...
33.252427
112
0.609927
from argparse import ArgumentParser from datasets import NAMES as DATASET_NAMES import importlib import os import seaborn as sns import matplotlib.pyplot as plt import numpy as np from utils.conf import base_path class DatasetAnalysis: def __init__(self, dataset, args): self.dataset = dataset self...
true
true
f77b761e3b88ffe336f24dab3c98807a103462ac
6,363
py
Python
salt/returners/sqlite3_return.py
moniker-dns/salt
0e1cd880dc7831b9f937a213dd90cc32e2a09884
[ "Apache-2.0" ]
1
2016-03-13T09:05:15.000Z
2016-03-13T09:05:15.000Z
salt/returners/sqlite3_return.py
moniker-dns/salt
0e1cd880dc7831b9f937a213dd90cc32e2a09884
[ "Apache-2.0" ]
null
null
null
salt/returners/sqlite3_return.py
moniker-dns/salt
0e1cd880dc7831b9f937a213dd90cc32e2a09884
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Insert minion return data into a sqlite3 database :maintainer: Mickey Malone <mickey.malone@gmail.com> :maturity: New :depends: None :platform: All Sqlite3 is a serverless database that lives in a single file. In order to use this returner the database file must exist, h...
27.426724
81
0.59846
import logging import json import datetime try: import sqlite3 HAS_SQLITE3 = True except ImportError: HAS_SQLITE3 = False log = logging.getLogger(__name__) def __virtual__(): if not HAS_SQLITE3: return False return 'sqlite3' def _get_conn(): if not __salt__['config.option'...
true
true
f77b765c85c43449c40538553eb77d7808281760
9,341
py
Python
cryptoapis/model/new_unconfirmed_coins_transactions_response_item.py
xan187/Crypto_APIs_2.0_SDK_Python
a56c75df54ef037b39be1315ed6e54de35bed55b
[ "MIT" ]
null
null
null
cryptoapis/model/new_unconfirmed_coins_transactions_response_item.py
xan187/Crypto_APIs_2.0_SDK_Python
a56c75df54ef037b39be1315ed6e54de35bed55b
[ "MIT" ]
null
null
null
cryptoapis/model/new_unconfirmed_coins_transactions_response_item.py
xan187/Crypto_APIs_2.0_SDK_Python
a56c75df54ef037b39be1315ed6e54de35bed55b
[ "MIT" ]
1
2021-07-21T03:35:18.000Z
2021-07-21T03:35:18.000Z
""" CryptoAPIs Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of thei...
46.939698
484
0.624023
import re import sys from cryptoapis.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) class Ne...
true
true
f77b77302af6f59b8d9de332ddc84c3e5feae255
2,490
py
Python
DjangoUeditor3-master/TestApp/models.py
youshuad/django-vue-shop
dbede2301b10cb95ef30d0bbbbd594b240071fc1
[ "MIT" ]
1
2021-03-15T02:07:50.000Z
2021-03-15T02:07:50.000Z
DjangoUeditor3-master/TestApp/models.py
youshuad/django-vue-shop
dbede2301b10cb95ef30d0bbbbd594b240071fc1
[ "MIT" ]
null
null
null
DjangoUeditor3-master/TestApp/models.py
youshuad/django-vue-shop
dbede2301b10cb95ef30d0bbbbd594b240071fc1
[ "MIT" ]
1
2021-03-15T02:07:55.000Z
2021-03-15T02:07:55.000Z
#coding:utf-8 # from django.db import models from DjangoUeditor.models import UEditorField from DjangoUeditor.commands import * def getImagePath(model_instance=None): if model_instance is None: return "aaa/" else: return "%s/" % model_instance.Name def getDescImagePath(model_instance=None): ...
32.763158
113
0.539357
from django.db import models from DjangoUeditor.models import UEditorField from DjangoUeditor.commands import * def getImagePath(model_instance=None): if model_instance is None: return "aaa/" else: return "%s/" % model_instance.Name def getDescImagePath(model_instance=None): return "aa...
true
true
f77b78aceb8284de18f55bf5017173ef1e4ad7ec
2,978
py
Python
models/dropout_sampler.py
zchenry/bnn-analysis
4454943967435fc80cfdc60d8e00282abb8ee201
[ "MIT" ]
null
null
null
models/dropout_sampler.py
zchenry/bnn-analysis
4454943967435fc80cfdc60d8e00282abb8ee201
[ "MIT" ]
null
null
null
models/dropout_sampler.py
zchenry/bnn-analysis
4454943967435fc80cfdc60d8e00282abb8ee201
[ "MIT" ]
null
null
null
""" This module implements MC Dropout based sampler. https://arxiv.org/pdf/1506.02142.pdf Following https://github.com/yaringal/DropoutUncertaintyExps """ from keras.models import Sequential from keras.layers.core import Dense, Dropout, Activation from keras.regularizers import l2 from keras import backend as K from ...
34.229885
118
0.628274
from keras.models import Sequential from keras.layers.core import Dense, Dropout, Activation from keras.regularizers import l2 from keras import backend as K from sampler import Sampler, SampleStats class DropoutSampler(Sampler): def __init__(self, model=None, batch_size=None, n_epochs=None, **kwargs): ...
true
true
f77b78d77ba4d47fbda9dbf2a237283d178d25c6
1,743
py
Python
main4.py
Annuvian/E04a-Sprites
e78ebf1f65ec90fbb8119f239fbc2a80c5ffad34
[ "MIT" ]
null
null
null
main4.py
Annuvian/E04a-Sprites
e78ebf1f65ec90fbb8119f239fbc2a80c5ffad34
[ "MIT" ]
null
null
null
main4.py
Annuvian/E04a-Sprites
e78ebf1f65ec90fbb8119f239fbc2a80c5ffad34
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import utils, os, random, time, open_color, arcade utils.check_version((3,7)) SCREEN_WIDTH = 1000 SCREEN_HEIGHT = 1000 SCREEN_TITLE = "Sprites Example" class MyGame(arcade.Window): def __init__(self): super().__init__(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE) file_path ...
26.409091
119
0.615605
import utils, os, random, time, open_color, arcade utils.check_version((3,7)) SCREEN_WIDTH = 1000 SCREEN_HEIGHT = 1000 SCREEN_TITLE = "Sprites Example" class MyGame(arcade.Window): def __init__(self): super().__init__(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE) file_path = os.path.dirname(os.pa...
true
true
f77b7b24611ac6e376cacf1126a92b47b0501958
3,506
py
Python
ai/code4life/code4life.py
jonasnic/codingame
f1a7fe8007b9ca63bdf30cd72f4d6ac41a5ac721
[ "MIT" ]
1
2021-02-11T08:52:44.000Z
2021-02-11T08:52:44.000Z
ai/code4life/code4life.py
jonasnic/codingame
f1a7fe8007b9ca63bdf30cd72f4d6ac41a5ac721
[ "MIT" ]
null
null
null
ai/code4life/code4life.py
jonasnic/codingame
f1a7fe8007b9ca63bdf30cd72f4d6ac41a5ac721
[ "MIT" ]
null
null
null
import sys # Bronze League # Bring data on patient samples from the diagnosis machine to the laboratory with enough molecules to produce medicine! class Sample(): def __init__(self, sample_id, carried_by, rank, gain, health, cost): self.sample_id = sample_id self.carried_by = carried_by s...
33.711538
164
0.608956
import sys class Sample(): def __init__(self, sample_id, carried_by, rank, gain, health, cost): self.sample_id = sample_id self.carried_by = carried_by self.rank = rank self.gain = gain self.health = health self.cost = cost self.diagnosed = health != -1 ...
true
true
f77b7c0b514a866b4522b52069bb64c2587e4869
3,662
py
Python
src/m1_sequence_mutation.py
LiamEnneking/21-Exam3Practice
335928ad67caf5a070ebf1063fa50fbe71ac009f
[ "MIT" ]
null
null
null
src/m1_sequence_mutation.py
LiamEnneking/21-Exam3Practice
335928ad67caf5a070ebf1063fa50fbe71ac009f
[ "MIT" ]
null
null
null
src/m1_sequence_mutation.py
LiamEnneking/21-Exam3Practice
335928ad67caf5a070ebf1063fa50fbe71ac009f
[ "MIT" ]
null
null
null
""" PRACTICE Test 3. This problem provides practice at: *** LOOPS WITHIN LOOPS, SEQUENCES and MUTATION *** Authors: David Mutchler, Valerie Galluzzi, Mark Hays, Amanda Stouder, their colleagues and Liam. """ # DONE: 1. PUT YOUR NAME IN THE ABOVE LINE. def main(): """ Calls the TEST functions i...
35.901961
82
0.456581
def main(): run_test_zero_changer() def run_test_zero_changer(): print() print('--------------------------------------------------') print('Testing the zero_changer function:') print('--------------------------------------------------') test1 = ([8, 4, 0, 9], [77, 0, 0, 1, 5, 0], [4...
true
true
f77b7cd4a6c3ba823256fefa6855995c4ffb3628
12,437
py
Python
pandas/tests/frame/methods/test_describe.py
Japanuspus/pandas
e38e987160c792f315685dc74fc1fc33d9389a71
[ "BSD-3-Clause" ]
1
2021-01-06T00:28:03.000Z
2021-01-06T00:28:03.000Z
pandas/tests/frame/methods/test_describe.py
Japanuspus/pandas
e38e987160c792f315685dc74fc1fc33d9389a71
[ "BSD-3-Clause" ]
null
null
null
pandas/tests/frame/methods/test_describe.py
Japanuspus/pandas
e38e987160c792f315685dc74fc1fc33d9389a71
[ "BSD-3-Clause" ]
1
2022-03-08T15:07:11.000Z
2022-03-08T15:07:11.000Z
import numpy as np import pandas as pd from pandas import Categorical, DataFrame, Series, Timestamp, date_range import pandas._testing as tm class TestDataFrameDescribe: def test_describe_bool_in_mixed_frame(self): df = DataFrame( { "string_data": ["a", "b", "c", "d", "e"], ...
34.261708
88
0.442148
import numpy as np import pandas as pd from pandas import Categorical, DataFrame, Series, Timestamp, date_range import pandas._testing as tm class TestDataFrameDescribe: def test_describe_bool_in_mixed_frame(self): df = DataFrame( { "string_data": ["a", "b", "c", "d", "e"], ...
true
true
f77b7de775e41cd016a37e6ce02847774771e95d
5,398
py
Python
src/data_sorting/choose_TFs_cv.py
Switham1/PromoterArchitecture
0a9021b869ac66cdd622be18cd029950314d111e
[ "MIT" ]
null
null
null
src/data_sorting/choose_TFs_cv.py
Switham1/PromoterArchitecture
0a9021b869ac66cdd622be18cd029950314d111e
[ "MIT" ]
null
null
null
src/data_sorting/choose_TFs_cv.py
Switham1/PromoterArchitecture
0a9021b869ac66cdd622be18cd029950314d111e
[ "MIT" ]
null
null
null
import argparse import os import pandas as pd def parse_args(args): parser = argparse.ArgumentParser(description="choose_TFs_cv") parser.add_argument( "file_names", type=str, help="Name of folder and filenames for the promoters extracted", ) parser.add_argument( "no_of...
31.567251
107
0.6608
import argparse import os import pandas as pd def parse_args(args): parser = argparse.ArgumentParser(description="choose_TFs_cv") parser.add_argument( "file_names", type=str, help="Name of folder and filenames for the promoters extracted", ) parser.add_argument( "no_of...
true
true
f77b7eea0d3cac306173f3283d01ef7badc71ad9
30,450
py
Python
CTFd/utils/__init__.py
leeshunpeng/ctfd-chinese
c1342d227acade052dc8ce26b32328be0b3f7946
[ "Apache-2.0" ]
2
2018-09-20T16:20:18.000Z
2019-04-01T06:27:36.000Z
CTFd/utils/__init__.py
leeshunpeng/ctfd-chinese
c1342d227acade052dc8ce26b32328be0b3f7946
[ "Apache-2.0" ]
1
2021-02-01T08:11:02.000Z
2021-02-01T08:11:02.000Z
CTFd/utils/__init__.py
leeshunpeng/ctfd-chinese
c1342d227acade052dc8ce26b32328be0b3f7946
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- import base64 import datetime import functools import hashlib import json import logging import logging.handlers import mistune import os import re import requests import shutil import six import smtplib import socket import sys import tempfile import time import dataset import datafreeze import ...
30.511022
117
0.58867
import base64 import datetime import functools import hashlib import json import logging import logging.handlers import mistune import os import re import requests import shutil import six import smtplib import socket import sys import tempfile import time import dataset import datafreeze import zipfile import io from...
true
true
f77b806c00bd4457874fc8b2b1e5d4702efe95e4
4,722
py
Python
foolbox/attacks/base.py
pGit1/foolbox
a75ddec2c202890026b40bd298d95b87146d82de
[ "MIT" ]
null
null
null
foolbox/attacks/base.py
pGit1/foolbox
a75ddec2c202890026b40bd298d95b87146d82de
[ "MIT" ]
null
null
null
foolbox/attacks/base.py
pGit1/foolbox
a75ddec2c202890026b40bd298d95b87146d82de
[ "MIT" ]
1
2021-02-26T10:04:20.000Z
2021-02-26T10:04:20.000Z
import warnings import sys import abc abstractmethod = abc.abstractmethod if sys.version_info >= (3, 4): ABC = abc.ABC else: # pragma: no cover ABC = abc.ABCMeta('ABC', (), {}) from ..adversarial import Adversarial from ..criteria import Misclassification class Attack(ABC): """Abstract base class for a...
33.253521
172
0.617111
import warnings import sys import abc abstractmethod = abc.abstractmethod if sys.version_info >= (3, 4): ABC = abc.ABC else: ABC = abc.ABCMeta('ABC', (), {}) from ..adversarial import Adversarial from ..criteria import Misclassification class Attack(ABC): def __init__(self, model=None, criterion=Miscl...
true
true
f77b80cd97313596f303de0ae11acd60a17c4add
6,540
py
Python
mne/datasets/eegbci/eegbci.py
DraganaMana/mne-python
83d48ec9e93bc176ae7fb8d000521ba3bd6b4c3c
[ "BSD-3-Clause" ]
1
2020-11-05T21:30:15.000Z
2020-11-05T21:30:15.000Z
mne/datasets/eegbci/eegbci.py
DraganaMana/mne-python
83d48ec9e93bc176ae7fb8d000521ba3bd6b4c3c
[ "BSD-3-Clause" ]
2
2016-02-27T13:43:15.000Z
2018-07-18T19:44:45.000Z
mne/datasets/eegbci/eegbci.py
DraganaMana/mne-python
83d48ec9e93bc176ae7fb8d000521ba3bd6b4c3c
[ "BSD-3-Clause" ]
1
2017-12-05T05:13:56.000Z
2017-12-05T05:13:56.000Z
# Author: Martin Billinger <martin.billinger@tugraz.at> # License: BSD Style. import os from os import path as op from ..utils import _get_path, _do_path_update from ...utils import _fetch_file, _url_to_local_path, verbose EEGMI_URL = 'http://www.physionet.org/physiobank/database/eegmmidb/' @verbose def data_path...
38.470588
82
0.620948
import os from os import path as op from ..utils import _get_path, _do_path_update from ...utils import _fetch_file, _url_to_local_path, verbose EEGMI_URL = 'http://www.physionet.org/physiobank/database/eegmmidb/' @verbose def data_path(url, path=None, force_update=False, update_path=None, verbose=N...
true
true
f77b81f485a47ea9a8c417934fdc51f218ec696f
7,859
py
Python
src/data/sets.py
Reasmey/adsi_beer_app
345bab07d6fe579c019a06660cffa5d13718e03c
[ "FTL" ]
null
null
null
src/data/sets.py
Reasmey/adsi_beer_app
345bab07d6fe579c019a06660cffa5d13718e03c
[ "FTL" ]
null
null
null
src/data/sets.py
Reasmey/adsi_beer_app
345bab07d6fe579c019a06660cffa5d13718e03c
[ "FTL" ]
null
null
null
def subset_x_y(target, features, start_index:int, end_index:int): """Keep only the rows for X and y sets from the specified indexes Parameters ---------- target : pd.DataFrame Dataframe containing the target features : pd.DataFrame Dataframe containing all features features : in...
27.770318
119
0.630487
def subset_x_y(target, features, start_index:int, end_index:int): return features[start_index:end_index], target[start_index:end_index] def split_sets_by_time(df, target_col, test_ratio=0.2, to_numpy=True): numpy = to_numpy df_copy = df.copy() target = df_copy.pop(target_col) cutoff = int(le...
true
true
f77b83cb54bf9cc509473cea36d0c7a93199e70d
4,929
py
Python
mmflow/datasets/base_dataset.py
hologerry/mmflow
40caf064851bd95317424e31cc137c0007a2bece
[ "Apache-2.0" ]
481
2021-11-16T07:04:23.000Z
2022-03-31T22:21:21.000Z
mmflow/datasets/base_dataset.py
hologerry/mmflow
40caf064851bd95317424e31cc137c0007a2bece
[ "Apache-2.0" ]
72
2021-11-16T12:25:55.000Z
2022-03-28T13:10:45.000Z
mmflow/datasets/base_dataset.py
hologerry/mmflow
40caf064851bd95317424e31cc137c0007a2bece
[ "Apache-2.0" ]
48
2021-11-16T06:48:46.000Z
2022-03-30T12:46:40.000Z
# Copyright (c) OpenMMLab. All rights reserved. import copy import os.path as osp from abc import ABCMeta, abstractmethod from typing import Optional, Sequence, Union import mmcv from torch.utils.data import Dataset from .pipelines import Compose class BaseDataset(Dataset, metaclass=ABCMeta): """Base class for ...
31.196203
79
0.578819
import copy import os.path as osp from abc import ABCMeta, abstractmethod from typing import Optional, Sequence, Union import mmcv from torch.utils.data import Dataset from .pipelines import Compose class BaseDataset(Dataset, metaclass=ABCMeta): def __init__(self, data_root: str, ...
true
true
f77b865b261f14b714100c46472319933bd7d45f
9,645
py
Python
sympy/diffgeom/tests/test_diffgeom.py
V1krant/sympy
f8e7019feded4e4d0852f49fe0ccfa777f0e8744
[ "BSD-3-Clause" ]
1
2020-01-15T17:04:02.000Z
2020-01-15T17:04:02.000Z
sympy/diffgeom/tests/test_diffgeom.py
V1krant/sympy
f8e7019feded4e4d0852f49fe0ccfa777f0e8744
[ "BSD-3-Clause" ]
null
null
null
sympy/diffgeom/tests/test_diffgeom.py
V1krant/sympy
f8e7019feded4e4d0852f49fe0ccfa777f0e8744
[ "BSD-3-Clause" ]
null
null
null
from sympy.diffgeom.rn import R2, R2_p, R2_r, R3_r, R3_c, R3_s from sympy.diffgeom import (Commutator, Differential, TensorProduct, WedgeProduct, BaseCovarDerivativeOp, CovarDerivativeOp, LieDerivative, covariant_order, contravariant_order, twoform_to_matrix, metric_to_Christoffel_1st, metric_to...
42.676991
122
0.67154
from sympy.diffgeom.rn import R2, R2_p, R2_r, R3_r, R3_c, R3_s from sympy.diffgeom import (Commutator, Differential, TensorProduct, WedgeProduct, BaseCovarDerivativeOp, CovarDerivativeOp, LieDerivative, covariant_order, contravariant_order, twoform_to_matrix, metric_to_Christoffel_1st, metric_to...
true
true
f77b86ab4e00fd06e216419582692f94de66a14e
309
py
Python
mysite/blog/migrations/0002_auto_20210109_1749.py
oleksii-harmash/news-blog
e8ad8dfc9fa13a21366278ed6d36ca5d19b9f518
[ "MIT" ]
null
null
null
mysite/blog/migrations/0002_auto_20210109_1749.py
oleksii-harmash/news-blog
e8ad8dfc9fa13a21366278ed6d36ca5d19b9f518
[ "MIT" ]
null
null
null
mysite/blog/migrations/0002_auto_20210109_1749.py
oleksii-harmash/news-blog
e8ad8dfc9fa13a21366278ed6d36ca5d19b9f518
[ "MIT" ]
null
null
null
# Generated by Django 3.1.4 on 2021-01-09 15:49 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('blog', '0001_initial'), ] operations = [ migrations.AlterModelTable( name='post', table='post', ), ]
17.166667
47
0.566343
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('blog', '0001_initial'), ] operations = [ migrations.AlterModelTable( name='post', table='post', ), ]
true
true
f77b87158324fde40378ba60e896cbf72fd07e5b
1,655
py
Python
bluebottle/bb_tasks/dashboard.py
maykinmedia/bluebottle
355d4729662b5e9a03398efb4fe882e0f8cfa28d
[ "BSD-3-Clause" ]
null
null
null
bluebottle/bb_tasks/dashboard.py
maykinmedia/bluebottle
355d4729662b5e9a03398efb4fe882e0f8cfa28d
[ "BSD-3-Clause" ]
null
null
null
bluebottle/bb_tasks/dashboard.py
maykinmedia/bluebottle
355d4729662b5e9a03398efb4fe882e0f8cfa28d
[ "BSD-3-Clause" ]
null
null
null
from admin_tools.dashboard.modules import DashboardModule from bluebottle.utils.model_dispatcher import get_task_model from django.utils.translation import ugettext_lazy as _ TASK_MODEL = get_task_model() class TaskModule(DashboardModule): """ """ title = _('Recently Created Tasks') template = 'admin...
35.212766
138
0.667069
from admin_tools.dashboard.modules import DashboardModule from bluebottle.utils.model_dispatcher import get_task_model from django.utils.translation import ugettext_lazy as _ TASK_MODEL = get_task_model() class TaskModule(DashboardModule): title = _('Recently Created Tasks') template = 'admin_tools/dashboard...
true
true
f77b884e850bfa566c77919dcae4bfaee45136e2
6,093
py
Python
sdk/python/pulumi_kubernetes/core/v1/Binding.py
hazsetata/pulumi-kubernetes
e3aa3027fa3bb268c496af174b59a9913ae8094e
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_kubernetes/core/v1/Binding.py
hazsetata/pulumi-kubernetes
e3aa3027fa3bb268c496af174b59a9913ae8094e
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_kubernetes/core/v1/Binding.py
hazsetata/pulumi-kubernetes
e3aa3027fa3bb268c496af174b59a9913ae8094e
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by pulumigen. *** # *** 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 _utilities, _tables from . imp...
49.536585
335
0.675201
import warnings import pulumi import pulumi.runtime from typing import Any, Dict, List, Mapping, Optional, Tuple, Union from ... import _utilities, _tables from . import outputs from ... import meta as _meta from ._inputs import * __all__ = ['Binding'] class Binding(pulumi.CustomResource): def __init__(__self__...
true
true
f77b88b7b1b3e9ba04a3f6b4b8682fdcda74370a
10,836
py
Python
src/i18n.py
gbenetz/pvcheck
e165939dc6b9ba75ee70a79aa7a2ef4637356bae
[ "MIT" ]
3
2016-04-12T21:42:52.000Z
2020-04-20T10:58:02.000Z
src/i18n.py
gbenetz/pvcheck
e165939dc6b9ba75ee70a79aa7a2ef4637356bae
[ "MIT" ]
6
2015-10-16T13:13:50.000Z
2020-05-30T20:42:22.000Z
src/i18n.py
gbenetz/pvcheck
e165939dc6b9ba75ee70a79aa7a2ef4637356bae
[ "MIT" ]
1
2019-06-10T08:51:54.000Z
2019-06-10T08:51:54.000Z
# -*- coding: utf-8 -*- """Internationalization. Use from i18n import translate as _ to enable string localization. In the future it would be easily replaced by gettext since translatable strings are marked in the same way as _("text"). Beside the translation service, this module defines the messages used in the...
49.935484
255
0.595884
import os import sys import atexit def translate(text): try: return _strings[text] except KeyError: pass try: return _strings[text[:-1]] + text[-1] except KeyError: _missing_translation.add(text) s = (text if len(text) < 15 else text[:15] + "...") ...
true
true
f77b8979d1c4b5066903973c5405ecc4130f4695
3,072
py
Python
Python X/Swapping Variables using a temp.py
nirobio/puzzles
fda8c84d8eefd93b40594636fb9b7f0fde02b014
[ "MIT" ]
null
null
null
Python X/Swapping Variables using a temp.py
nirobio/puzzles
fda8c84d8eefd93b40594636fb9b7f0fde02b014
[ "MIT" ]
null
null
null
Python X/Swapping Variables using a temp.py
nirobio/puzzles
fda8c84d8eefd93b40594636fb9b7f0fde02b014
[ "MIT" ]
null
null
null
{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "v1 = \"first string\"\n", "v2 = \"second string\"" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "v2 = v1\n", "v1 =...
15.207921
34
0.437826
{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "v1 = \"first string\"\n", "v2 = \"second string\"" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "v2 = v1\n", "v1 =...
true
true
f77b8a5ecbb7bbf3ed0faa7558c4e3c1fe47679c
9,077
py
Python
SimpleGUIWallet/wallet_forms.py
Kryptoxic/ledger-app-bts
93b3b5b6d9069105207d56d901ec4314fbbbe589
[ "Apache-2.0" ]
null
null
null
SimpleGUIWallet/wallet_forms.py
Kryptoxic/ledger-app-bts
93b3b5b6d9069105207d56d901ec4314fbbbe589
[ "Apache-2.0" ]
null
null
null
SimpleGUIWallet/wallet_forms.py
Kryptoxic/ledger-app-bts
93b3b5b6d9069105207d56d901ec4314fbbbe589
[ "Apache-2.0" ]
null
null
null
import tkinter as tk import ttk import Logger class WhoAmIFrame(ttk.Frame): def __init__(self, parent, *args, **kwargs): self.button_command = kwargs.pop('command', lambda *args, **kwargs: None) self.textvariable = kwargs.pop('textvariable', None) self.textvariable_path = kwargs.pop('text...
34.12406
103
0.592266
import tkinter as tk import ttk import Logger class WhoAmIFrame(ttk.Frame): def __init__(self, parent, *args, **kwargs): self.button_command = kwargs.pop('command', lambda *args, **kwargs: None) self.textvariable = kwargs.pop('textvariable', None) self.textvariable_path = kwargs.pop('text...
true
true
f77b8a7fbc7f22c05531079e2bfa52ca9247c223
2,942
py
Python
lib/lib/__init__.py
zepheira/amara
d3ffe07d6e2266b34d72b012a82d572c8edbf1e7
[ "Apache-2.0" ]
6
2015-01-30T03:50:36.000Z
2022-03-20T16:09:58.000Z
lib/lib/__init__.py
zepheira/amara
d3ffe07d6e2266b34d72b012a82d572c8edbf1e7
[ "Apache-2.0" ]
2
2015-02-04T17:18:47.000Z
2019-09-27T23:39:52.000Z
lib/lib/__init__.py
zepheira/amara
d3ffe07d6e2266b34d72b012a82d572c8edbf1e7
[ "Apache-2.0" ]
6
2015-02-04T16:16:18.000Z
2019-10-30T20:07:48.000Z
#amara.lib __all__ = ['IriError', 'inputsource'] from amara import Error class IriError(Error): """ Exception related to URI/IRI processing """ RESOURCE_ERROR = 1 INVALID_BASE_URI = 100 #RELATIVE_DOCUMENT_URI = 110 RELATIVE_BASE_URI = 111 OPAQUE_BASE_URI = 112 NON_FILE_URI = 12...
35.445783
84
0.604351
__all__ = ['IriError', 'inputsource'] from amara import Error class IriError(Error): RESOURCE_ERROR = 1 INVALID_BASE_URI = 100 RELATIVE_BASE_URI = 111 OPAQUE_BASE_URI = 112 NON_FILE_URI = 120 UNIX_REMOTE_HOST_FILE_URI = 121 RESOURCE_ERROR = 130 SCHEME_REQUIRED = 200 UNSUP...
true
true
f77b8b2c277dc065bfb7be3ca1ae74e7d2a1824f
1,695
py
Python
ssseg/cfgs/ocrnet/cfgs_ade20k_resnet50os8.py
skydengyao/sssegmentation
606b05983fa967bb3c98d1120f44dfc516532dad
[ "MIT" ]
1
2021-05-28T06:42:37.000Z
2021-05-28T06:42:37.000Z
ssseg/cfgs/ocrnet/cfgs_ade20k_resnet50os8.py
skydengyao/sssegmentation
606b05983fa967bb3c98d1120f44dfc516532dad
[ "MIT" ]
null
null
null
ssseg/cfgs/ocrnet/cfgs_ade20k_resnet50os8.py
skydengyao/sssegmentation
606b05983fa967bb3c98d1120f44dfc516532dad
[ "MIT" ]
null
null
null
'''define the config file for ade20k and resnet50os8''' from .base_cfg import * # modify dataset config DATASET_CFG = DATASET_CFG.copy() DATASET_CFG['train'].update( { 'type': 'ade20k', 'rootdir': 'data/ADE20k', } ) DATASET_CFG['test'].update( { 'type': 'ade20k', 'rootdir':...
24.214286
96
0.59764
from .base_cfg import * DATASET_CFG = DATASET_CFG.copy() DATASET_CFG['train'].update( { 'type': 'ade20k', 'rootdir': 'data/ADE20k', } ) DATASET_CFG['test'].update( { 'type': 'ade20k', 'rootdir': 'data/ADE20k', } ) DATALOADER_CFG = DATALOADER_CFG.copy() OPTIMIZER_CFG = O...
true
true
f77b8bf47dfd31e2c170330c80133da8621030a9
2,950
py
Python
safelifeEnv/lib/python3.6/site-packages/pyglet/debug.py
JohnBurden/safelife
338c9c42aa94fed49f6d80151c37dd28ba6f7978
[ "Apache-2.0" ]
2
2019-07-17T13:00:32.000Z
2019-07-17T13:09:30.000Z
safelifeEnv/lib/python3.6/site-packages/pyglet/debug.py
JohnBurden/safelife
338c9c42aa94fed49f6d80151c37dd28ba6f7978
[ "Apache-2.0" ]
null
null
null
safelifeEnv/lib/python3.6/site-packages/pyglet/debug.py
JohnBurden/safelife
338c9c42aa94fed49f6d80151c37dd28ba6f7978
[ "Apache-2.0" ]
null
null
null
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # Copyright (c) 2008-2019 pyglet contributors # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the follo...
38.815789
90
0.686441
from __future__ import print_function import pyglet def debug_print(enabled_or_option='debug'): if isinstance(enabled_or_option, bool): enabled = enabled_or_option else: enabled = pyglet.options.get(enabled_or_option, False) if enabled: def _debug_print(*args, **kwargs): ...
true
true
f77b8cbdf6e522944b18967509984a2312e3149a
176
py
Python
notes_project/urls.py
nijatmursali/notesapp-react-django
bb30072aa4bbb9839f852bb75497e0f3c421c0d0
[ "Apache-2.0" ]
null
null
null
notes_project/urls.py
nijatmursali/notesapp-react-django
bb30072aa4bbb9839f852bb75497e0f3c421c0d0
[ "Apache-2.0" ]
null
null
null
notes_project/urls.py
nijatmursali/notesapp-react-django
bb30072aa4bbb9839f852bb75497e0f3c421c0d0
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('api/v1/notes/', include('notes.urls')) ]
22
48
0.693182
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('api/v1/notes/', include('notes.urls')) ]
true
true
f77b8d5d54bdb8540b2dcfc1a6a9d21089686344
116
py
Python
postfix_mail_admin/cli/__init__.py
dyachoksa/postfix-mail-admin
dca49176d0ca1d1af5c500d3cc0b800cc081ed32
[ "MIT" ]
1
2020-12-08T15:45:32.000Z
2020-12-08T15:45:32.000Z
postfix_mail_admin/cli/__init__.py
dyachoksa/postfix-mail-admin
dca49176d0ca1d1af5c500d3cc0b800cc081ed32
[ "MIT" ]
null
null
null
postfix_mail_admin/cli/__init__.py
dyachoksa/postfix-mail-admin
dca49176d0ca1d1af5c500d3cc0b800cc081ed32
[ "MIT" ]
null
null
null
import flask from .users import users_cli def register_cli(app: flask.Flask): app.cli.add_command(users_cli)
14.5
35
0.767241
import flask from .users import users_cli def register_cli(app: flask.Flask): app.cli.add_command(users_cli)
true
true
f77b8fa91a51942af610fe4e8b2b213e7d9501af
6,144
py
Python
selfdrive/car/interfaces.py
vetmike/openpilot
04df8276a5aa532d1f9021ef92b3249717c93f71
[ "MIT" ]
null
null
null
selfdrive/car/interfaces.py
vetmike/openpilot
04df8276a5aa532d1f9021ef92b3249717c93f71
[ "MIT" ]
null
null
null
selfdrive/car/interfaces.py
vetmike/openpilot
04df8276a5aa532d1f9021ef92b3249717c93f71
[ "MIT" ]
null
null
null
import os import time from cereal import car from common.kalman.simple_kalman import KF1D from common.realtime import DT_CTRL from selfdrive.car import gen_empty_fingerprint from selfdrive.controls.lib.drive_helpers import EventTypes as ET, create_event from selfdrive.controls.lib.vehicle_model import VehicleModel from...
36.790419
125
0.700521
import os import time from cereal import car from common.kalman.simple_kalman import KF1D from common.realtime import DT_CTRL from selfdrive.car import gen_empty_fingerprint from selfdrive.controls.lib.drive_helpers import EventTypes as ET, create_event from selfdrive.controls.lib.vehicle_model import VehicleModel from...
true
true
f77b90a77d152401b2a3bf98ec26ef58ab1087ca
4,379
py
Python
tests/test_scripts.py
joaovictortr/pypicloud
7884a29a3b50fc5c28dac0fa02563aa6b9bdbc83
[ "MIT" ]
null
null
null
tests/test_scripts.py
joaovictortr/pypicloud
7884a29a3b50fc5c28dac0fa02563aa6b9bdbc83
[ "MIT" ]
null
null
null
tests/test_scripts.py
joaovictortr/pypicloud
7884a29a3b50fc5c28dac0fa02563aa6b9bdbc83
[ "MIT" ]
null
null
null
""" Tests for commandline scripts """ from mock import patch from pypicloud import scripts from pypicloud.access import get_pwd_context try: import unittest2 as unittest # pylint: disable=F0401 except ImportError: import unittest class TestScripts(unittest.TestCase): """ Tests for commandline scripts...
35.601626
70
0.615894
from mock import patch from pypicloud import scripts from pypicloud.access import get_pwd_context try: import unittest2 as unittest except ImportError: import unittest class TestScripts(unittest.TestCase): @patch.object(scripts, 'getpass') def test_gen_password(self, getpass): pwd_contex...
true
true
f77b90d304055da332971fce64492f6d4335527c
1,057
py
Python
perfkitbenchmarker/traces/__init__.py
PublicStuff/PerfKitBenchmarker
ff77e5594e4407443b5dcb1a8986f21c0c4c9c44
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/traces/__init__.py
PublicStuff/PerfKitBenchmarker
ff77e5594e4407443b5dcb1a8986f21c0c4c9c44
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/traces/__init__.py
PublicStuff/PerfKitBenchmarker
ff77e5594e4407443b5dcb1a8986f21c0c4c9c44
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
34.096774
78
0.782403
from perfkitbenchmarker import import_util TRACE_COLLECTORS = list(import_util.LoadModulesForPath(__path__, __name__)) def RegisterAll(sender, parsed_flags): for module in TRACE_COLLECTORS: module.Register(parsed_flags)
true
true
f77b90ddc775e7625f6cd7d9978390ef09c87ea9
549
py
Python
pythonSolutions/bsspc21j2.py
nexus-x86/competitive-programming
1adef9a29fae94eafb1f4501a0221572c2a2c73e
[ "MIT" ]
null
null
null
pythonSolutions/bsspc21j2.py
nexus-x86/competitive-programming
1adef9a29fae94eafb1f4501a0221572c2a2c73e
[ "MIT" ]
null
null
null
pythonSolutions/bsspc21j2.py
nexus-x86/competitive-programming
1adef9a29fae94eafb1f4501a0221572c2a2c73e
[ "MIT" ]
null
null
null
# https://dmoj.ca/problem/bsspc21j2 m = int(input()) booleanList = [False] * 1441 for i in range(0,m): a,b = list(map(int, input().split(" "))) for j in range(a,b+1): booleanList[j] = True n = int(input()) for i in range(0,n): a,b = list(map(int, input().split(" "))) intersects = False for j...
27.45
74
0.557377
m = int(input()) booleanList = [False] * 1441 for i in range(0,m): a,b = list(map(int, input().split(" "))) for j in range(a,b+1): booleanList[j] = True n = int(input()) for i in range(0,n): a,b = list(map(int, input().split(" "))) intersects = False for j in range(a,b+1): if(boolean...
true
true
f77b918c84bc27a9e0a04e98b535e3d1502607e7
102,206
py
Python
node_modules/pygmentize-bundled/vendor/pygments/pygments/lexers/functional.py
Kanishkparganiha/Portfolio-website-using-NextJs-and-Vercel
f038a601ea9e1f6dcb614fc4d776b8efbf822402
[ "MIT" ]
null
null
null
node_modules/pygmentize-bundled/vendor/pygments/pygments/lexers/functional.py
Kanishkparganiha/Portfolio-website-using-NextJs-and-Vercel
f038a601ea9e1f6dcb614fc4d776b8efbf822402
[ "MIT" ]
null
null
null
node_modules/pygmentize-bundled/vendor/pygments/pygments/lexers/functional.py
Kanishkparganiha/Portfolio-website-using-NextJs-and-Vercel
f038a601ea9e1f6dcb614fc4d776b8efbf822402
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ pygments.lexers.functional ~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for functional languages. :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import Lexer, RegexLexer, bygroups, incl...
42.656928
89
0.499472
import re from pygments.lexer import Lexer, RegexLexer, bygroups, include, do_insertions from pygments.token import Text, Comment, Operator, Keyword, Name, \ String, Number, Punctuation, Literal, Generic, Error __all__ = ['RacketLexer', 'SchemeLexer', 'CommonLispLexer', 'HaskellLexer', 'LiterateHaske...
true
true
f77b91c4d63b55e320ae8015b3f97073eb9747c5
16,388
py
Python
proxyclient/m1n1/adt.py
leeehui/m1n1
c947f6aec39c2248b0ff8e2165fa1196a0b54712
[ "MIT" ]
null
null
null
proxyclient/m1n1/adt.py
leeehui/m1n1
c947f6aec39c2248b0ff8e2165fa1196a0b54712
[ "MIT" ]
null
null
null
proxyclient/m1n1/adt.py
leeehui/m1n1
c947f6aec39c2248b0ff8e2165fa1196a0b54712
[ "MIT" ]
null
null
null
# SPDX-License-Identifier: MIT import itertools, fnmatch from construct import * from .utils import AddrLookup, FourCC, SafeGreedyRange __all__ = ["load_adt"] ADTPropertyStruct = Struct( "name" / PaddedString(32, "ascii"), "size" / Int32ul, "value" / Bytes(this.size & 0x7fffffff) ) ADTNodeStruct = Struc...
29.47482
109
0.524103
import itertools, fnmatch from construct import * from .utils import AddrLookup, FourCC, SafeGreedyRange __all__ = ["load_adt"] ADTPropertyStruct = Struct( "name" / PaddedString(32, "ascii"), "size" / Int32ul, "value" / Bytes(this.size & 0x7fffffff) ) ADTNodeStruct = Struct( "property_count" / Int32...
true
true
f77b9261e1be045c15e767fd494513cd161d585f
336
py
Python
Beginner/03. Python/qr-coder/qrdecoder.py
ankita080208/Hacktoberfest
2be849e89285260e7b6672f42979943ad6bbec78
[ "MIT" ]
3
2021-03-16T16:44:04.000Z
2021-06-07T17:32:51.000Z
Beginner/03. Python/qr-coder/qrdecoder.py
ankita080208/Hacktoberfest
2be849e89285260e7b6672f42979943ad6bbec78
[ "MIT" ]
null
null
null
Beginner/03. Python/qr-coder/qrdecoder.py
ankita080208/Hacktoberfest
2be849e89285260e7b6672f42979943ad6bbec78
[ "MIT" ]
2
2020-10-12T15:58:02.000Z
2020-10-20T05:31:11.000Z
import os from pyzbar.pyzbar import decode from PIL import Image res = '' filenames = sorted([int(name.replace('.png', '')) for name in os.listdir('./qrs/')]) for filename in filenames: if qr:=decode(Image.open('./qrs/'+str(filename)+'.png')): res += qr[0].data.decode() else: print(f'error with file {filenam...
30.545455
84
0.66369
import os from pyzbar.pyzbar import decode from PIL import Image res = '' filenames = sorted([int(name.replace('.png', '')) for name in os.listdir('./qrs/')]) for filename in filenames: if qr:=decode(Image.open('./qrs/'+str(filename)+'.png')): res += qr[0].data.decode() else: print(f'error with file {filenam...
false
true
f77b92666657da9f0ec13caa1b2e6a83d694ad25
5,637
py
Python
python/setup.py
spaparaju/triton
b7f0e87dc2143cdf9cbc050e34ba80440074c53b
[ "MIT" ]
null
null
null
python/setup.py
spaparaju/triton
b7f0e87dc2143cdf9cbc050e34ba80440074c53b
[ "MIT" ]
null
null
null
python/setup.py
spaparaju/triton
b7f0e87dc2143cdf9cbc050e34ba80440074c53b
[ "MIT" ]
null
null
null
import os import re import sys import sysconfig import platform import subprocess import distutils import glob import tempfile import shutil from distutils.version import LooseVersion from setuptools import setup, Extension, find_packages from setuptools.command.build_ext import build_ext from setuptools.command.test i...
38.346939
122
0.630477
import os import re import sys import sysconfig import platform import subprocess import distutils import glob import tempfile import shutil from distutils.version import LooseVersion from setuptools import setup, Extension, find_packages from setuptools.command.build_ext import build_ext from setuptools.command.test i...
true
true
f77b92bf50bddcc447baf35c213bafb61cd4153c
2,859
py
Python
awardsApp/api.py
MosesGakuhi1857/Awards
474a013089df15242259084b8756ed96c7499d10
[ "MIT" ]
1
2021-10-31T10:34:49.000Z
2021-10-31T10:34:49.000Z
awardsApp/api.py
MosesGakuhi1857/Awards
474a013089df15242259084b8756ed96c7499d10
[ "MIT" ]
null
null
null
awardsApp/api.py
MosesGakuhi1857/Awards
474a013089df15242259084b8756ed96c7499d10
[ "MIT" ]
null
null
null
from django.http import JsonResponse from django.http import HttpResponse, Http404,HttpResponseRedirect from .permissions import IsAdminOrReadOnly from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework.views import APIView from profiles.models import Pro...
31.766667
83
0.711088
from django.http import JsonResponse from django.http import HttpResponse, Http404,HttpResponseRedirect from .permissions import IsAdminOrReadOnly from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework.views import APIView from profiles.models import Pro...
true
true
f77b93567bd73fe40689da4d5c04cfa046b31820
6,157
py
Python
Miroir/affichage.py
Asifadam93/MiroirConnecte
08f6db3c90e7e97aba627d3be7c526f61197391f
[ "BSD-3-Clause" ]
null
null
null
Miroir/affichage.py
Asifadam93/MiroirConnecte
08f6db3c90e7e97aba627d3be7c526f61197391f
[ "BSD-3-Clause" ]
null
null
null
Miroir/affichage.py
Asifadam93/MiroirConnecte
08f6db3c90e7e97aba627d3be7c526f61197391f
[ "BSD-3-Clause" ]
null
null
null
import functools from pprint import pprint from tkinter import * from datetime import datetime, time from pytz import timezone # la fenêtre import apiWeather fenetre = Tk() fenetre.configure(bg="#000000", pady=20, padx=20) fenetre.attributes("-fullscreen", True) # définitions des variables destinée à la taille des f...
33.461957
153
0.683287
import functools from pprint import pprint from tkinter import * from datetime import datetime, time from pytz import timezone import apiWeather fenetre = Tk() fenetre.configure(bg="#000000", pady=20, padx=20) fenetre.attributes("-fullscreen", True) fenetre.attributes("-fullscreen", True) fenetre_block_width = int((...
true
true
f77b93c5d335f1a4a405c53278cc536a56724859
2,061
py
Python
source/random_walk.py
xalhs/Random-Walks
106f972e2b9c204039ba4ae0e39ccdec4165e656
[ "MIT" ]
null
null
null
source/random_walk.py
xalhs/Random-Walks
106f972e2b9c204039ba4ae0e39ccdec4165e656
[ "MIT" ]
null
null
null
source/random_walk.py
xalhs/Random-Walks
106f972e2b9c204039ba4ae0e39ccdec4165e656
[ "MIT" ]
null
null
null
import random import math import numpy as np import matplotlib.pyplot as plt from matplotlib import animation tmax = 875 t = 0 x = [0] y = [0] t=0 t_total = 0 dist = 0 #coord = [[x[t],y[t]]] while t < tmax: coord = random.randint(0,1) if coord == 0: direction = random.randint(0,1) dire...
21.030612
81
0.59049
import random import math import numpy as np import matplotlib.pyplot as plt from matplotlib import animation tmax = 875 t = 0 x = [0] y = [0] t=0 t_total = 0 dist = 0 while t < tmax: coord = random.randint(0,1) if coord == 0: direction = random.randint(0,1) direction = 2*direction -1 ...
true
true
f77b95207e193f3de4eb232ad6dfdcaa7a65830f
96
py
Python
handlers/submit.py
lotus-gd/api
6eb0f54c7b20330d5c1ef47e19381a7863d26edc
[ "MIT" ]
null
null
null
handlers/submit.py
lotus-gd/api
6eb0f54c7b20330d5c1ef47e19381a7863d26edc
[ "MIT" ]
null
null
null
handlers/submit.py
lotus-gd/api
6eb0f54c7b20330d5c1ef47e19381a7863d26edc
[ "MIT" ]
null
null
null
import aiohttp async def submit(r: aiohttp.web.RequestHandler): return aiohttp.web.HTTPOk()
24
48
0.770833
import aiohttp async def submit(r: aiohttp.web.RequestHandler): return aiohttp.web.HTTPOk()
true
true
f77b9566717a1de04e5691b7ea95f9b60a2d89d1
3,615
py
Python
PythonScripts/pyevtk/src/examples/lowlevel.py
rcarson3/pyFEpX
f95851e41025fb57893041d0395d53a5745b7e6c
[ "MIT" ]
3
2018-03-27T21:24:58.000Z
2022-03-11T13:35:59.000Z
PythonScripts/pyevtk/build/lib/evtk/examples/lowlevel.py
rcarson3/pyFEpX
f95851e41025fb57893041d0395d53a5745b7e6c
[ "MIT" ]
1
2018-09-10T22:54:10.000Z
2018-09-10T22:54:10.000Z
PythonScripts/pyevtk/src/examples/lowlevel.py
rcarson3/pyFEpX
f95851e41025fb57893041d0395d53a5745b7e6c
[ "MIT" ]
2
2018-05-13T07:44:35.000Z
2022-03-11T13:36:00.000Z
#! /usr/bin/env python # *********************************************************************************** # * Copyright 2010 - 2016 Paulo A. Herrera. All rights reserved * # * * # * Redistribution and use in source ...
45.759494
86
0.541909
from evtk.vtk import VtkFile, VtkRectilinearGrid import numpy as np nx, ny, nz = 6, 6, 2 lx, ly, lz = 1.0, 1.0, 1.0 dx, dy, dz = lx/nx, ly/ny, lz/nz ncells = nx * ny * nz npoints = (nx + 1) * (ny + 1) * (nz + 1) x = np.arange(0, lx + 0.1*dx, dx, dtype='float64') y = np.arange(0, ly + 0.1*dy, dy, dtype='float64') z ...
true
true
f77b95690ef286071d6424ffdaf2a0f1fa67285d
1,427
py
Python
scripts/download_google_drive.py
avilab/sars-cov2-est
17b3d99050a8e30fa314b5e55bbc8a7641f60e3f
[ "MIT" ]
null
null
null
scripts/download_google_drive.py
avilab/sars-cov2-est
17b3d99050a8e30fa314b5e55bbc8a7641f60e3f
[ "MIT" ]
10
2021-08-12T06:29:59.000Z
2021-08-12T06:36:37.000Z
scripts/download_google_drive.py
avilab/sarscov2-epidemiology
94e358740eb3b0830c35b75e0f89dd12387ffe56
[ "MIT" ]
null
null
null
import gdown import tempfile import pandas as pd from Bio import SeqIO import io # Download GISAID cov2020 acknowledgements file from Google drive excel_url = "https://drive.google.com/uc?id=1g85nEcuiVnmO75Hh8yWAty5uW8P_RSiR" # Download sars-cov-2 genomic sequences fasta file fasta_url = "https://drive.google.com/uc?...
32.431818
83
0.688858
import gdown import tempfile import pandas as pd from Bio import SeqIO import io excel_url = "https://drive.google.com/uc?id=1g85nEcuiVnmO75Hh8yWAty5uW8P_RSiR" fasta_url = "https://drive.google.com/uc?id=1ds-tnGObN7wIRDb12yq1Ey0-Ch8sR5V4" with tempfile.TemporaryFile() as tmp: gdown.download(excel_url, tmp, quiet...
true
true
f77b9583d43a178cd6707f27f1c354d5ec0d6024
1,558
py
Python
sqlalchemy_utils/types/arrow.py
tteaka/sqlalchemy-utils
4754a9e93d661144dfffb674fd762becb607514b
[ "BSD-3-Clause" ]
3
2021-03-29T03:19:20.000Z
2021-03-29T03:28:04.000Z
sqlalchemy_utils/types/arrow.py
tteaka/sqlalchemy-utils
4754a9e93d661144dfffb674fd762becb607514b
[ "BSD-3-Clause" ]
3
2021-08-30T16:30:50.000Z
2022-03-01T23:15:44.000Z
sqlalchemy_utils/types/arrow.py
tteaka/sqlalchemy-utils
4754a9e93d661144dfffb674fd762becb607514b
[ "BSD-3-Clause" ]
3
2021-11-30T11:10:26.000Z
2021-12-08T05:59:31.000Z
from __future__ import absolute_import from ..exceptions import ImproperlyConfigured from .enriched_datetime import ArrowDateTime from .enriched_datetime.enriched_datetime_type import EnrichedDateTimeType arrow = None try: import arrow except ImportError: pass class ArrowType(EnrichedDateTimeType): """ ...
25.966667
78
0.658537
from __future__ import absolute_import from ..exceptions import ImproperlyConfigured from .enriched_datetime import ArrowDateTime from .enriched_datetime.enriched_datetime_type import EnrichedDateTimeType arrow = None try: import arrow except ImportError: pass class ArrowType(EnrichedDateTimeType): def ...
true
true
f77b9641a9ad6b47326b4bb4eef492800761be48
5,045
py
Python
src/compas/utilities/async_.py
arpastrana/compas
ed677a162c14dbe562c82d72f370279259faf7da
[ "MIT" ]
null
null
null
src/compas/utilities/async_.py
arpastrana/compas
ed677a162c14dbe562c82d72f370279259faf7da
[ "MIT" ]
9
2019-09-11T08:53:19.000Z
2019-09-16T08:35:39.000Z
src/compas/utilities/async_.py
Licini/compas
34f65adb3d0abc3f403312ffba62aa76f3376292
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys import threading __all__ = ['await_callback'] class ThreadExceptHookHandler(object): """Workaround to deal with a bug in the Python interpreter (!). Report: http://bugs.python.org/issue1...
29.16185
96
0.607136
from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys import threading __all__ = ['await_callback'] class ThreadExceptHookHandler(object): def __enter__(self): original_init = threading.Thread.__init__ def init(self, *args, **k...
true
true
f77b967954286d92ae186f81da831bcd4e06db26
17,804
py
Python
argdeco/main.py
klorenz/python-argdeco
eb614d63430c5da68a972bdc40f8a1541070089d
[ "MIT" ]
null
null
null
argdeco/main.py
klorenz/python-argdeco
eb614d63430c5da68a972bdc40f8a1541070089d
[ "MIT" ]
null
null
null
argdeco/main.py
klorenz/python-argdeco
eb614d63430c5da68a972bdc40f8a1541070089d
[ "MIT" ]
null
null
null
""" argdeco.main -- the main function This module provides :py:class:`~argdeco.main.Main`, which can be used to create main functions. For ease it provides common arguments like `debug`, `verbosity` and `quiet` which control whether you want to print stacktraces, and how verbose the logging is. These arguments will ...
33.466165
150
0.59217
import argdeco.command_decorator as command_decorator import sys, logging from inspect import isfunction import argparse import os from os.path import expanduser from .arguments import arg from .command_decorator import NoAction PY3 = sys.version_info > (3, 0) try: an_exception = StandardError except: an_ex...
true
true
f77b97a417c7d3f4c16a283c0ef0504fc446fb20
2,950
py
Python
tests/server/parser/test_event_processor.py
mrenno/events-protocol-python
e61063eb76233f84a24d5b079879fe577a6ed072
[ "Apache-2.0" ]
null
null
null
tests/server/parser/test_event_processor.py
mrenno/events-protocol-python
e61063eb76233f84a24d5b079879fe577a6ed072
[ "Apache-2.0" ]
null
null
null
tests/server/parser/test_event_processor.py
mrenno/events-protocol-python
e61063eb76233f84a24d5b079879fe577a6ed072
[ "Apache-2.0" ]
null
null
null
import json from unittest import TestCase from uuid import uuid4 from events_protocol.core.exception import EventParsingException from events_protocol.core.logging.supressor import supress_log from events_protocol.core.model.event import Event, CamelPydanticMixin, ResponseEvent from events_protocol.core.model.event_ty...
35.97561
97
0.730169
import json from unittest import TestCase from uuid import uuid4 from events_protocol.core.exception import EventParsingException from events_protocol.core.logging.supressor import supress_log from events_protocol.core.model.event import Event, CamelPydanticMixin, ResponseEvent from events_protocol.core.model.event_ty...
true
true
f77b98ee1938e4422fe1c931738c86b139b3dd2c
2,276
py
Python
tests/unit/resolution_resolvelib/conftest.py
briantracy/pip
39398cb2812cce5ad62a18f195060477b79f6c59
[ "MIT" ]
2
2021-06-07T06:24:59.000Z
2021-08-13T12:59:19.000Z
tests/unit/resolution_resolvelib/conftest.py
illia-v/pip
76cd70ac42cbbe6a51d83bd100f500ac4c21f26b
[ "MIT" ]
215
2020-03-23T18:59:53.000Z
2021-02-22T20:30:51.000Z
tests/unit/resolution_resolvelib/conftest.py
illia-v/pip
76cd70ac42cbbe6a51d83bd100f500ac4c21f26b
[ "MIT" ]
2
2021-02-12T09:31:15.000Z
2021-02-12T09:48:03.000Z
import pytest from pip._internal.cli.req_command import RequirementCommand from pip._internal.commands.install import InstallCommand from pip._internal.index.collector import LinkCollector from pip._internal.index.package_finder import PackageFinder # from pip._internal.models.index import PyPI from pip._internal.mod...
30.756757
78
0.700351
import pytest from pip._internal.cli.req_command import RequirementCommand from pip._internal.commands.install import InstallCommand from pip._internal.index.collector import LinkCollector from pip._internal.index.package_finder import PackageFinder from pip._internal.models.search_scope import SearchScope from pip._...
true
true
f77b98fd7645436b0b1d5192c2e774d8fd0ea740
1,321
py
Python
api/lib/fast_rcnn/nms_wrapper.py
Praneet9/Docify
a936014750dedf4a6b5a84918bbbf66cd63109de
[ "MIT" ]
26
2019-07-29T10:35:54.000Z
2022-03-27T03:51:18.000Z
api/lib/fast_rcnn/nms_wrapper.py
Praneet9/Docify
a936014750dedf4a6b5a84918bbbf66cd63109de
[ "MIT" ]
null
null
null
api/lib/fast_rcnn/nms_wrapper.py
Praneet9/Docify
a936014750dedf4a6b5a84918bbbf66cd63109de
[ "MIT" ]
15
2019-06-30T09:48:22.000Z
2022-02-07T20:48:24.000Z
import numpy as np from .config import cfg pure_python_nms = False try: from lib.utils.gpu_nms import gpu_nms from ..utils.cython_nms import nms as cython_nms except ImportError: pure_python_nms = True def nms(dets, thresh): if dets.shape[0] == 0: return [] if pure_python_nms:...
27.520833
60
0.53293
import numpy as np from .config import cfg pure_python_nms = False try: from lib.utils.gpu_nms import gpu_nms from ..utils.cython_nms import nms as cython_nms except ImportError: pure_python_nms = True def nms(dets, thresh): if dets.shape[0] == 0: return [] if pure_python_nms:...
true
true
f77b997bdec7d4cb7f63e0d507675fea48d479b2
869
py
Python
model-optimizer/extensions/front/caffe/relu6.py
fujunwei/dldt
09497b7724de4be92629f7799b8538b483d809a2
[ "Apache-2.0" ]
1
2021-07-30T17:03:50.000Z
2021-07-30T17:03:50.000Z
model-optimizer/extensions/front/caffe/relu6.py
fujunwei/dldt
09497b7724de4be92629f7799b8538b483d809a2
[ "Apache-2.0" ]
null
null
null
model-optimizer/extensions/front/caffe/relu6.py
fujunwei/dldt
09497b7724de4be92629f7799b8538b483d809a2
[ "Apache-2.0" ]
null
null
null
""" Copyright (C) 2018-2020 Intel 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.965517
73
0.75374
from mo.front.extractor import FrontExtractorOp from extensions.ops.activation_ops import ReLU6 class ReLU6FrontExtractor(FrontExtractorOp): op = 'ReLU6' enabled = True @classmethod def extract(cls, node): ReLU6.update_node_stat(node) return True
true
true
f77b99a66f5dbc766e237ad498400129a7025cd8
2,211
py
Python
src/python/pants/core_tasks/clean.py
AllClearID/pants
c4fdf00a3bdf9f26f876e85c46909d0729f7132c
[ "Apache-2.0" ]
1
2021-11-11T14:04:24.000Z
2021-11-11T14:04:24.000Z
src/python/pants/core_tasks/clean.py
AllClearID/pants
c4fdf00a3bdf9f26f876e85c46909d0729f7132c
[ "Apache-2.0" ]
2
2016-10-13T21:37:42.000Z
2018-07-20T20:14:33.000Z
src/python/pants/core_tasks/clean.py
AllClearID/pants
c4fdf00a3bdf9f26f876e85c46909d0729f7132c
[ "Apache-2.0" ]
1
2018-03-08T22:21:44.000Z
2018-03-08T22:21:44.000Z
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging impor...
36.245902
110
0.687472
from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging import os from pants.task.task import Task from pants.util.contextutil import temporary_dir from pants.util.dirutil import safe_concurrent_rename, saf...
false
true
f77b99aa1e3936f7db808438a98585f82d55d8a9
3,144
py
Python
mogo/connection.py
nod/mogo
31aeca261ac7b913187af1f22d34b323e8637c94
[ "Apache-2.0" ]
1
2021-02-17T04:27:51.000Z
2021-02-17T04:27:51.000Z
mogo/connection.py
nod/mogo
31aeca261ac7b913187af1f22d34b323e8637c94
[ "Apache-2.0" ]
null
null
null
mogo/connection.py
nod/mogo
31aeca261ac7b913187af1f22d34b323e8637c94
[ "Apache-2.0" ]
null
null
null
""" The wrapper for pymongo's connection stuff. """ try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse from pymongo import MongoClient from pymongo.errors import ConnectionFailure class Connection(object): """ This just caches a pymongo connection and adds a...
28.581818
79
0.622455
try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse from pymongo import MongoClient from pymongo.errors import ConnectionFailure class Connection(object): _instance = None connection = None _database = None @classmethod def instance(cls): if...
true
true
f77b9a067acdfa7f370fa9214f1c8d6aff013180
716
py
Python
fbotics/tests/client/test_retrieve_supported_tags.py
pasmod/fbotics
6ddd5d1f2396f43a90a1fb529f896d15e47f72b3
[ "BSD-3-Clause" ]
3
2018-11-16T13:20:08.000Z
2019-04-16T16:43:25.000Z
fbotics/tests/client/test_retrieve_supported_tags.py
pasmod/fbotics
6ddd5d1f2396f43a90a1fb529f896d15e47f72b3
[ "BSD-3-Clause" ]
1
2018-12-16T16:58:58.000Z
2018-12-16T16:58:58.000Z
fbotics/tests/client/test_retrieve_supported_tags.py
pasmod/fbotics
6ddd5d1f2396f43a90a1fb529f896d15e47f72b3
[ "BSD-3-Clause" ]
2
2018-12-16T16:30:18.000Z
2021-10-03T12:43:54.000Z
from pytest_voluptuous import Partial, S def test_retrieve_supported_tags_response_status_code_is_200(client, recipient_id): """ GIVEN a client WHEN retrieving the list of supported tags THEN the status code of the response is 200 """ response = client.retrieve_supported_tags() assert resp...
31.130435
83
0.726257
from pytest_voluptuous import Partial, S def test_retrieve_supported_tags_response_status_code_is_200(client, recipient_id): response = client.retrieve_supported_tags() assert response.status_code == 200 def test_retrieve_supported_tags_response_structure_is_as_expected(client): response = client.retrie...
true
true
f77b9a44de7742732973ef06fcee9524bd6e9456
5,975
py
Python
scripts/theanet/utils.py
HPG-AI/bachbot
6656e866ea67a1092a1a450117a7766c9baf88d0
[ "MIT" ]
380
2016-05-13T00:53:25.000Z
2022-03-24T21:09:16.000Z
scripts/theanet/utils.py
HPG-AI/bachbot
6656e866ea67a1092a1a450117a7766c9baf88d0
[ "MIT" ]
11
2017-09-21T03:56:06.000Z
2021-09-07T23:37:16.000Z
scripts/theanet/utils.py
kaizengrowth/bachbot
6656e866ea67a1092a1a450117a7766c9baf88d0
[ "MIT" ]
56
2016-08-03T22:01:06.000Z
2022-03-03T18:45:07.000Z
import climate import pickle import gzip import numpy as np import os import pickle import sys import tarfile import tempfile import urllib try: import matplotlib.pyplot as plt except ImportError: logging.critical('please install matplotlib to run the examples!') raise logging = climate.get_logger(__name_...
31.781915
89
0.564854
import climate import pickle import gzip import numpy as np import os import pickle import sys import tarfile import tempfile import urllib try: import matplotlib.pyplot as plt except ImportError: logging.critical('please install matplotlib to run the examples!') raise logging = climate.get_logger(__name_...
true
true
f77b9d99ab35aaf3f2d6846c75ac0358f739ae34
6,494
py
Python
scrape_mars.py
Juan-S-Galindo/Web-Scraping-Challenge
4f351cecf8f81e8ebb785656728adb7e75afae3c
[ "ADSL" ]
null
null
null
scrape_mars.py
Juan-S-Galindo/Web-Scraping-Challenge
4f351cecf8f81e8ebb785656728adb7e75afae3c
[ "ADSL" ]
null
null
null
scrape_mars.py
Juan-S-Galindo/Web-Scraping-Challenge
4f351cecf8f81e8ebb785656728adb7e75afae3c
[ "ADSL" ]
null
null
null
#Import Libraries #Web Scraping tools from bs4 import BeautifulSoup as bs from selenium import webdriver #from splinter import Browser #DataFrame tools import pandas as pd #Misc tools for web scraping import time import requests #Function to initianilze browser. def init_browser(): #Settings for headless mode....
30.777251
194
0.570065
from bs4 import BeautifulSoup as bs from selenium import webdriver import pandas as pd import time import requests def init_browser(): options = webdriver.ChromeOptions() options.add_argument('headless') browser = webdriver.Chrome("/Users/Sebastian/Documents/GitHub/Data Visualizatio...
true
true
f77b9dc7a48d85d9be1b398ca9f11982116b0cb8
2,803
py
Python
test/test_sctp.py
mahdi1001/vpp
2f54c27f7fd0d2c24e7d6b1d48809e8b58ec1abf
[ "Apache-2.0" ]
null
null
null
test/test_sctp.py
mahdi1001/vpp
2f54c27f7fd0d2c24e7d6b1d48809e8b58ec1abf
[ "Apache-2.0" ]
null
null
null
test/test_sctp.py
mahdi1001/vpp
2f54c27f7fd0d2c24e7d6b1d48809e8b58ec1abf
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import unittest from framework import VppTestCase, VppTestRunner from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath class TestSCTP(VppTestCase): """ SCTP Test Case """ @classmethod def setUpClass(cls): super(TestSCTP, cls).setUpClass() def setUp(self): ...
32.593023
75
0.524438
import unittest from framework import VppTestCase, VppTestRunner from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath class TestSCTP(VppTestCase): @classmethod def setUpClass(cls): super(TestSCTP, cls).setUpClass() def setUp(self): super(TestSCTP, self).setUp() self.va...
true
true
f77b9df1ffbd02a27bb45279fda9c7228b0a3f61
1,900
py
Python
test/lint/check-doc.py
stance-project/stance-core
7a3930614506c3d949b6a425e23421c9d191f4fc
[ "MIT" ]
null
null
null
test/lint/check-doc.py
stance-project/stance-core
7a3930614506c3d949b6a425e23421c9d191f4fc
[ "MIT" ]
null
null
null
test/lint/check-doc.py
stance-project/stance-core
7a3930614506c3d949b6a425e23421c9d191f4fc
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2018 The Stancecoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' This checks if all command line args are documented. Return value is 0 to indicate no error. Auth...
38.77551
211
0.701053
from subprocess import check_output import re import sys FOLDER_GREP = 'src' FOLDER_TEST = 'src/test/' REGEX_ARG = '(?:ForceSet|SoftSet|Get|Is)(?:Bool)?Args?(?:Set)?\("(-[^"]+)"' REGEX_DOC = 'AddArg\("(-[^"=]+?)(?:=|")' CMD_ROOT_DIR = '`git rev-parse --show-toplevel`/{}'.format(FOLDER_GREP) CMD_GREP_ARGS = r"git gre...
true
true
f77b9e8a6a84244c212db1881a24893ba3d94893
3,207
py
Python
tuna_service_sdk/model/topology/link_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
5
2019-07-31T04:11:05.000Z
2021-01-07T03:23:20.000Z
tuna_service_sdk/model/topology/link_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
tuna_service_sdk/model/topology/link_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: link.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import...
36.033708
332
0.758965
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _s...
true
true
f77b9ecfb7490815f76659170d3b9b23a56ef6eb
5,643
py
Python
applications/DEMApplication/tests/test_DEMApplication.py
clazaro/Kratos
b947b82c90dfcbf13d60511427f85990d36b90be
[ "BSD-4-Clause" ]
null
null
null
applications/DEMApplication/tests/test_DEMApplication.py
clazaro/Kratos
b947b82c90dfcbf13d60511427f85990d36b90be
[ "BSD-4-Clause" ]
3
2021-08-18T16:12:20.000Z
2021-09-02T07:36:15.000Z
applications/DEMApplication/tests/test_DEMApplication.py
clazaro/Kratos
b947b82c90dfcbf13d60511427f85990d36b90be
[ "BSD-4-Clause" ]
1
2020-12-28T15:39:39.000Z
2020-12-28T15:39:39.000Z
import KratosMultiphysics import KratosMultiphysics.DEMApplication as DEMApplication import KratosMultiphysics.KratosUnittest as KratosUnittest import test_guis import test_kinematic_constraints import test_particle_creator_destructor import test_wall_creator_destructor import test_analytics import test_glued_particle...
49.069565
134
0.837321
import KratosMultiphysics import KratosMultiphysics.DEMApplication as DEMApplication import KratosMultiphysics.KratosUnittest as KratosUnittest import test_guis import test_kinematic_constraints import test_particle_creator_destructor import test_wall_creator_destructor import test_analytics import test_glued_particle...
true
true
f77b9f493b6719a1b8d6313dd3d3d88a0814797e
129
py
Python
_init_.py
Programming-The-Next-Step-2021/Julius-Calendar_App
4e09c034f9055b2d136d3ebfeebe8d981c650a59
[ "MIT" ]
null
null
null
_init_.py
Programming-The-Next-Step-2021/Julius-Calendar_App
4e09c034f9055b2d136d3ebfeebe8d981c650a59
[ "MIT" ]
3
2021-05-12T18:11:17.000Z
2021-05-19T19:22:46.000Z
_init_.py
Programming-The-Next-Step-2021/Julius-Calendar_App
4e09c034f9055b2d136d3ebfeebe8d981c650a59
[ "MIT" ]
1
2021-05-19T01:18:54.000Z
2021-05-19T01:18:54.000Z
#This is the initialization package from jpeg_compression import Code_experimental_design, Compression_code, Stock_files_library
43
92
0.891473
from jpeg_compression import Code_experimental_design, Compression_code, Stock_files_library
true
true
f77b9f5c127a506d2baa31105550d765416b5df7
2,715
py
Python
app/notify_client/invite_api_client.py
alphagov-mirror/notifications-admin
04d051df6b85cf596a7d6d0f28474b04673e420a
[ "MIT" ]
null
null
null
app/notify_client/invite_api_client.py
alphagov-mirror/notifications-admin
04d051df6b85cf596a7d6d0f28474b04673e420a
[ "MIT" ]
null
null
null
app/notify_client/invite_api_client.py
alphagov-mirror/notifications-admin
04d051df6b85cf596a7d6d0f28474b04673e420a
[ "MIT" ]
null
null
null
from app.models.roles_and_permissions import ( roles, translate_permissions_from_admin_roles_to_db, ) from app.notify_client import NotifyAdminAPIClient, _attach_current_user, cache class InviteApiClient(NotifyAdminAPIClient): def init_app(self, app): super().init_app(app) self.admin_url...
35.723684
103
0.626888
from app.models.roles_and_permissions import ( roles, translate_permissions_from_admin_roles_to_db, ) from app.notify_client import NotifyAdminAPIClient, _attach_current_user, cache class InviteApiClient(NotifyAdminAPIClient): def init_app(self, app): super().init_app(app) self.admin_url...
true
true
f77b9f79a50bd2ac3618f0ed84036863b43baf1a
980
py
Python
rosalind_exercises/textbook_track/1D_clump_finding_problem.py
csiu/tokens
8a7f865d921d91aae4019e43677435ad78a8a703
[ "MIT" ]
null
null
null
rosalind_exercises/textbook_track/1D_clump_finding_problem.py
csiu/tokens
8a7f865d921d91aae4019e43677435ad78a8a703
[ "MIT" ]
1
2015-04-20T03:28:48.000Z
2015-04-20T03:40:44.000Z
rosalind_exercises/textbook_track/1D_clump_finding_problem.py
csiu/tokens
8a7f865d921d91aae4019e43677435ad78a8a703
[ "MIT" ]
null
null
null
## [1D] Clump Finding Problem genome = "CGGACTCGACAGATGTGAAGAAATGTGAAGACTGAGTGAAGAGAAGAGGAAACACGACACGACATTGCGACATAATGTACGAATGTAATGTGCCTATGGC" k, L, t = 5, 75, 4 ## do something... l1, l2 = 0, L k1, k2 = 0, k clumps_dict = {} first_round = True while l2 <= len(genome): while first_round: while k2 <= l2: ...
22.272727
111
0.568367
genome = "CGGACTCGACAGATGTGAAGAAATGTGAAGACTGAGTGAAGAGAAGAGGAAACACGACACGACATTGCGACATAATGTACGAATGTAATGTGCCTATGGC" k, L, t = 5, 75, 4 l1, l2 = 0, L k1, k2 = 0, k clumps_dict = {} first_round = True while l2 <= len(genome): while first_round: while k2 <= l2: kmer = genome[k1:k2] try: ...
false
true
f77b9f832653cd873d876340e7f37ed470a2766b
7,134
py
Python
non_semantic_speech_benchmark/export_model/model_export_utils.py
bwang514/google-research
b7ae2e24a39cc72b19c1779d9f4b35befc4b8b8b
[ "Apache-2.0" ]
null
null
null
non_semantic_speech_benchmark/export_model/model_export_utils.py
bwang514/google-research
b7ae2e24a39cc72b19c1779d9f4b35befc4b8b8b
[ "Apache-2.0" ]
null
null
null
non_semantic_speech_benchmark/export_model/model_export_utils.py
bwang514/google-research
b7ae2e24a39cc72b19c1779d9f4b35befc4b8b8b
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
37.350785
100
0.734371
import os from typing import Any, Dict, List, Optional from absl import flags from absl import logging import numpy as np import tensorflow as tf from non_semantic_speech_benchmark.data_prep import audio_to_embeddings_beam_utils from non_semantic_speech_benchmark.distillation import frontend_lib from non_semantic...
true
true
f77ba02eec9ea728facca75458be095b77c59f71
21,701
py
Python
scripts/ilap_artifacts.py
francyM/iLEAPP
16326163f419ba45d4d7eab38ff42703673d0527
[ "MIT" ]
null
null
null
scripts/ilap_artifacts.py
francyM/iLEAPP
16326163f419ba45d4d7eab38ff42703673d0527
[ "MIT" ]
null
null
null
scripts/ilap_artifacts.py
francyM/iLEAPP
16326163f419ba45d4d7eab38ff42703673d0527
[ "MIT" ]
null
null
null
# To add a new artifact module, import it here as shown below: # from scripts.artifacts.fruitninja import get_fruitninja # Also add the grep search for that module using the same name # to the 'tosearch' data structure. import traceback from scripts.artifacts.applicationstate import get_applicationstate from scri...
61.826211
127
0.74333
import traceback from scripts.artifacts.applicationstate import get_applicationstate from scripts.artifacts.appSnapshots import get_applicationSnapshots from scripts.artifacts.journalStrings import get_journalStrings from scripts.artifacts.walStrings import get_walStrings from scripts.artifacts.confaccts import get_...
true
true
f77ba13c70cb5d603108ccbfebb18ac91a6164c0
3,485
py
Python
samples/python/fitellipse.py
JyotiJanai/test
c4d536a208c10e6465864f1029ee90f371991276
[ "BSD-3-Clause" ]
9
2017-10-18T19:00:37.000Z
2020-02-23T05:19:55.000Z
samples/python/fitellipse.py
JyotiJanai/test
c4d536a208c10e6465864f1029ee90f371991276
[ "BSD-3-Clause" ]
1
2019-08-14T02:56:04.000Z
2019-08-14T03:53:21.000Z
samples/python/fitellipse.py
JyotiJanai/test
c4d536a208c10e6465864f1029ee90f371991276
[ "BSD-3-Clause" ]
3
2017-09-07T16:28:27.000Z
2017-10-19T09:56:35.000Z
#!/usr/bin/python """ This program is a demonstration of ellipse fitting. Trackbar controls threshold parameter. Gray lines are contours. Colored lines are fit ellipses. Original C implementation by: Denis Burenkov. Python implementation by: Roman Stanchak, James Bowman """ import sys import urllib2 import random...
33.190476
100
0.613486
""" This program is a demonstration of ellipse fitting. Trackbar controls threshold parameter. Gray lines are contours. Colored lines are fit ellipses. Original C implementation by: Denis Burenkov. Python implementation by: Roman Stanchak, James Bowman """ import sys import urllib2 import random import cv2.cv as ...
false
true
f77ba231340eb83fcc6f4e47bf7eec7f0e06ee64
7,294
py
Python
app.py
honzajavorek/deoraclize
47a8d2e243908a062323e7006ef24ed4877a40dd
[ "MIT" ]
1
2017-10-16T08:06:12.000Z
2017-10-16T08:06:12.000Z
app.py
honzajavorek/deoraclize
47a8d2e243908a062323e7006ef24ed4877a40dd
[ "MIT" ]
null
null
null
app.py
honzajavorek/deoraclize
47a8d2e243908a062323e7006ef24ed4877a40dd
[ "MIT" ]
null
null
null
import os import re import traceback import requests from lxml import html from flask import Flask, redirect, jsonify, request, abort from werkzeug.contrib.cache import FileSystemCache HOUR = 3600 ROOT_DIR = os.path.join(os.path.dirname(__file__)) CACHE_DIR = os.path.join(ROOT_DIR, 'cache') app = Flask(__name__) c...
33.004525
121
0.515218
import os import re import traceback import requests from lxml import html from flask import Flask, redirect, jsonify, request, abort from werkzeug.contrib.cache import FileSystemCache HOUR = 3600 ROOT_DIR = os.path.join(os.path.dirname(__file__)) CACHE_DIR = os.path.join(ROOT_DIR, 'cache') app = Flask(__name__) c...
true
true
f77ba239510e7267ac5e4c499d0bd3afb0a87838
15,444
py
Python
repos/system_upgrade/common/libraries/mounting.py
winndows/leapp-repository
e4fd7c3fc14e5630b53998bfa3e4869d3e76cf4f
[ "Apache-2.0" ]
null
null
null
repos/system_upgrade/common/libraries/mounting.py
winndows/leapp-repository
e4fd7c3fc14e5630b53998bfa3e4869d3e76cf4f
[ "Apache-2.0" ]
9
2020-01-07T12:48:59.000Z
2020-01-16T10:44:34.000Z
repos/system_upgrade/common/libraries/mounting.py
winndows/leapp-repository
e4fd7c3fc14e5630b53998bfa3e4869d3e76cf4f
[ "Apache-2.0" ]
null
null
null
import errno import itertools import os import shutil from collections import namedtuple from leapp.libraries.stdlib import run, CalledProcessError, api from leapp.libraries.common.config import get_all_envs ALWAYS_BIND = ['/etc/hosts:/etc/hosts'] ErrorData = namedtuple('ErrorData', ['summary', 'details']) class ...
36.684086
112
0.63481
import errno import itertools import os import shutil from collections import namedtuple from leapp.libraries.stdlib import run, CalledProcessError, api from leapp.libraries.common.config import get_all_envs ALWAYS_BIND = ['/etc/hosts:/etc/hosts'] ErrorData = namedtuple('ErrorData', ['summary', 'details']) class ...
true
true
f77ba3981713952e94f8a10192aa53828e4d483e
28,501
py
Python
python/chronos/src/bigdl/chronos/autots/tspipeline.py
Forest216/BigDL
840da9a2eaf395978dd83730b02aa5e5dfbd7989
[ "Apache-2.0" ]
null
null
null
python/chronos/src/bigdl/chronos/autots/tspipeline.py
Forest216/BigDL
840da9a2eaf395978dd83730b02aa5e5dfbd7989
[ "Apache-2.0" ]
null
null
null
python/chronos/src/bigdl/chronos/autots/tspipeline.py
Forest216/BigDL
840da9a2eaf395978dd83730b02aa5e5dfbd7989
[ "Apache-2.0" ]
null
null
null
# # Copyright 2016 The BigDL Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
48.719658
99
0.563454
import os import torch import types import numpy as np from bigdl.chronos.data import TSDataset from bigdl.chronos.metric.forecast_metrics import Evaluator DEFAULT_MODEL_INIT_DIR = "model_init.ckpt" DEFAULT_BEST_MODEL_DIR = "best_model.ckpt" DEFAULT_DATA_PROCESS_DIR = "data_process.ckpt" DEFAULT_BEST_CONFIG_DIR = "b...
true
true
f77ba4bd1d5984c3b14de443ea2c53b688e1c49b
23
py
Python
tests/functional_tests/__init__.py
confessin/authomatic
3828f9bdedf556dc1f56433ba1d6e2e66a840f40
[ "MIT" ]
1
2015-05-21T03:53:15.000Z
2015-05-21T03:53:15.000Z
tests/functional_tests/__init__.py
confessin/authomatic
3828f9bdedf556dc1f56433ba1d6e2e66a840f40
[ "MIT" ]
1
2020-07-27T01:20:51.000Z
2020-07-27T01:20:51.000Z
tests/functional_tests/__init__.py
confessin/authomatic
3828f9bdedf556dc1f56433ba1d6e2e66a840f40
[ "MIT" ]
1
2019-10-14T19:35:37.000Z
2019-10-14T19:35:37.000Z
from . import fixtures
11.5
22
0.782609
from . import fixtures
true
true
f77ba53eb84225958aed87d0c8f4e36fbcd4b62a
14,827
py
Python
slearn/tools.py
nla-group/slearn
2c90f11a7f80235dcfcc77be522b97cf3ce689c1
[ "MIT" ]
3
2021-11-26T12:31:18.000Z
2022-03-10T10:46:02.000Z
build/lib/slearn/tools.py
nla-group/slearn
2c90f11a7f80235dcfcc77be522b97cf3ce689c1
[ "MIT" ]
null
null
null
build/lib/slearn/tools.py
nla-group/slearn
2c90f11a7f80235dcfcc77be522b97cf3ce689c1
[ "MIT" ]
1
2022-03-20T18:05:57.000Z
2022-03-20T18:05:57.000Z
# Copyright (c) 2021, nla group, manchester # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, this # list of condition...
35.727711
92
0.63182
from .symbols import * from random import randint import pandas as pd import numpy as np from itertools import product import warnings def Symbols(n=52): range_ = 123 collection = [chr(i) for i in np.arange(range_) if chr(i).isalpha()] dict_symbols = {symbol:i for i,symbol in enumerate(collection...
true
true
f77ba590f83bcbf14cd2fab161a328625750686c
16,708
py
Python
delver/crawler.py
nuncjo/Delver
dada1324c1b5015269d27eb15ebea528da6deb05
[ "MIT" ]
4
2019-03-18T09:18:15.000Z
2020-02-21T06:20:45.000Z
delver/crawler.py
nuncjo/Delver
dada1324c1b5015269d27eb15ebea528da6deb05
[ "MIT" ]
1
2020-08-11T18:13:23.000Z
2020-08-11T18:13:23.000Z
delver/crawler.py
nuncjo/Delver
dada1324c1b5015269d27eb15ebea528da6deb05
[ "MIT" ]
1
2019-06-16T17:12:14.000Z
2019-06-16T17:12:14.000Z
# -*- coding: utf-8 -*- import logging import os import time from concurrent.futures import ThreadPoolExecutor, as_completed from random import randrange from collections import namedtuple, deque from copy import deepcopy from urllib.parse import urljoin, urlparse import requests from .decorators import with_histor...
31.347092
97
0.557039
import logging import os import time from concurrent.futures import ThreadPoolExecutor, as_completed from random import randrange from collections import namedtuple, deque from copy import deepcopy from urllib.parse import urljoin, urlparse import requests from .decorators import with_history from .exceptions impor...
true
true
f77ba5ec1e333dddd22ebb005f10efd4eb57842e
5,980
py
Python
src/appengine/libs/issue_management/jira/__init__.py
kennethkang/clusterfuzz
ac1d38d5509b1ca8b0cd9fd3e519cbf81f3c46ac
[ "Apache-2.0" ]
null
null
null
src/appengine/libs/issue_management/jira/__init__.py
kennethkang/clusterfuzz
ac1d38d5509b1ca8b0cd9fd3e519cbf81f3c46ac
[ "Apache-2.0" ]
null
null
null
src/appengine/libs/issue_management/jira/__init__.py
kennethkang/clusterfuzz
ac1d38d5509b1ca8b0cd9fd3e519cbf81f3c46ac
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
27.431193
83
0.714548
from urllib.parse import urljoin from dateutil import parser from clusterfuzz._internal.config import db_config from libs.issue_management import issue_tracker from libs.issue_management.jira.issue_tracker_manager import IssueTrackerManager class Issue(issue_tracker.Issue): def __init__(self, itm, jira_issue): ...
true
true
f77ba6c6431ddbeeeb8c4f4081e60edf11db2e6c
1,459
py
Python
mep/books/migrations/0024_add_work_sort_title.py
making-books-ren-today/test_eval_3_shxco
5a6427abeb4aec1aa70c0d9a4b32d028012780c8
[ "Apache-2.0" ]
3
2020-05-12T19:19:41.000Z
2021-04-07T13:56:32.000Z
mep/books/migrations/0024_add_work_sort_title.py
making-books-ren-today/test_eval_3_shxco
5a6427abeb4aec1aa70c0d9a4b32d028012780c8
[ "Apache-2.0" ]
736
2017-06-21T16:24:42.000Z
2022-02-26T17:46:10.000Z
mep/books/migrations/0024_add_work_sort_title.py
making-books-ren-today/test_eval_3_shxco
5a6427abeb4aec1aa70c0d9a4b32d028012780c8
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.2.11 on 2020-04-22 17:54 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('books', '0023_merge_20200406_1206'), ] operations = [ migrations.AlterModelOptions( name='creator', options={'order...
35.585366
265
0.605894
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('books', '0023_merge_20200406_1206'), ] operations = [ migrations.AlterModelOptions( name='creator', options={'ordering': ['creator_type__order', 'order', 'person__s...
true
true
f77ba70b5e24fe807e2ea9809f042e9a3c72a1ca
747
py
Python
fluent_python/array/dictionary.py
ftconan/python3
eb63ba33960072f792ecce6db809866b38c402f8
[ "MIT" ]
1
2018-12-19T22:07:56.000Z
2018-12-19T22:07:56.000Z
fluent_python/array/dictionary.py
ftconan/python3
eb63ba33960072f792ecce6db809866b38c402f8
[ "MIT" ]
12
2020-03-14T05:32:26.000Z
2022-03-12T00:08:49.000Z
fluent_python/array/dictionary.py
ftconan/python3
eb63ba33960072f792ecce6db809866b38c402f8
[ "MIT" ]
1
2018-12-19T22:08:00.000Z
2018-12-19T22:08:00.000Z
# coding=utf-8 """ @author: magician @date: 2018/8/25 """ import collections class StrKeyDict(collections.UserDict): """ key is str """ def __missing__(self, key): if isinstance(key, str): raise KeyError(key) return self[str(key)] def __contains__(se...
20.75
50
0.542169
import collections class StrKeyDict(collections.UserDict): def __missing__(self, key): if isinstance(key, str): raise KeyError(key) return self[str(key)] def __contains__(self, key): return str(key) in self.data def __setitem__(self, key, item): ...
true
true
f77ba7e999a4e94fef28397c233b035a86a84a4d
3,576
py
Python
test/functional/feature_notifications.py
shamimiceewu025/glee
aa0dc8240f2552e4c64a0b722d4e5f25dd981e66
[ "MIT" ]
null
null
null
test/functional/feature_notifications.py
shamimiceewu025/glee
aa0dc8240f2552e4c64a0b722d4e5f25dd981e66
[ "MIT" ]
null
null
null
test/functional/feature_notifications.py
shamimiceewu025/glee
aa0dc8240f2552e4c64a0b722d4e5f25dd981e66
[ "MIT" ]
1
2020-11-04T07:04:44.000Z
2020-11-04T07:04:44.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The GleecBTC Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the -alertnotify, -blocknotify and -walletnotify options.""" import os from test_framework.addre...
46.441558
152
0.666387
import os from test_framework.address import ADDRESS_BCRT1_UNSPENDABLE from test_framework.test_framework import GleecBTCTestFramework from test_framework.util import ( assert_equal, wait_until, connect_nodes, ) class NotificationsTest(GleecBTCTestFramework): def set_test_params(self): self.n...
true
true
f77ba81c6b7fb7dc28389a4cda15a27709d1deb2
977
py
Python
resize.py
ngthquocminh/text-image-cropper-too
55a37ab40b8f557ebf072609d6848bdfedcaf8b9
[ "MIT" ]
1
2021-01-26T10:55:41.000Z
2021-01-26T10:55:41.000Z
resize.py
ngthquocminh/text-image-cropper-tool
55a37ab40b8f557ebf072609d6848bdfedcaf8b9
[ "MIT" ]
null
null
null
resize.py
ngthquocminh/text-image-cropper-tool
55a37ab40b8f557ebf072609d6848bdfedcaf8b9
[ "MIT" ]
null
null
null
import cv2 import sys import os import numpy as np def main(arg: object) -> object: img_path = arg[0] img_out = arg[1] height = int(arg[2]) if not os.path.exists(img_path) or not os.path.exists(img_out): print("Path error") return files = os.listdir(img_path) for index, file ...
22.204545
89
0.532242
import cv2 import sys import os import numpy as np def main(arg: object) -> object: img_path = arg[0] img_out = arg[1] height = int(arg[2]) if not os.path.exists(img_path) or not os.path.exists(img_out): print("Path error") return files = os.listdir(img_path) for index, file ...
true
true
f77ba841662b3a1ff4a44e18cc75e1546a49decb
35,218
py
Python
src/sentry/lang/javascript/processor.py
ccdlvc/report.iupdate.io
0ab451850c34af40b86eb517e39124e5b894b44b
[ "BSD-3-Clause" ]
null
null
null
src/sentry/lang/javascript/processor.py
ccdlvc/report.iupdate.io
0ab451850c34af40b86eb517e39124e5b894b44b
[ "BSD-3-Clause" ]
5
2019-12-28T18:13:59.000Z
2022-03-02T04:32:45.000Z
src/sentry/lang/javascript/processor.py
ccdlvc/report.iupdate.io
0ab451850c34af40b86eb517e39124e5b894b44b
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import, print_function __all__ = ['SourceProcessor'] import codecs import logging import re import base64 import six import time import zlib from django.conf import settings from django.core.exceptions import SuspiciousOperation from collections import namedtuple from os.path import s...
36.954879
111
0.562298
from __future__ import absolute_import, print_function __all__ = ['SourceProcessor'] import codecs import logging import re import base64 import six import time import zlib from django.conf import settings from django.core.exceptions import SuspiciousOperation from collections import namedtuple from os.path import s...
true
true
f77ba87b1c9f8ccc4e9da01a495857398f6fa324
2,406
py
Python
tfx/utils/name_utils_test.py
rtg0795/tfx
63c31b719896eef645df3850d0e6b946e44cd059
[ "Apache-2.0" ]
1
2022-03-29T23:06:54.000Z
2022-03-29T23:06:54.000Z
tfx/utils/name_utils_test.py
rtg0795/tfx
63c31b719896eef645df3850d0e6b946e44cd059
[ "Apache-2.0" ]
null
null
null
tfx/utils/name_utils_test.py
rtg0795/tfx
63c31b719896eef645df3850d0e6b946e44cd059
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
32.513514
79
0.746883
import types import tensorflow as tf from tfx.utils import name_utils class Foo: class Bar: pass def fun(): pass VALUE = 42 class ClassUtilsTest(tf.test.TestCase): def testGetFullName_GoodExamples(self): self.assertEqual(name_utils.get_full_name(str), 'builtins.str') self.assertEqual(name_u...
true
true
f77ba914eb6f55b9930ab6cf9394742c46f914a7
18,372
py
Python
modules/termcolor.py
zhester/hzpy
d41c002493a4f5b4667870fca0a2849307d51b34
[ "BSD-2-Clause" ]
3
2016-08-31T21:54:06.000Z
2018-05-29T13:37:02.000Z
modules/termcolor.py
zhester/hzpy
d41c002493a4f5b4667870fca0a2849307d51b34
[ "BSD-2-Clause" ]
null
null
null
modules/termcolor.py
zhester/hzpy
d41c002493a4f5b4667870fca0a2849307d51b34
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python """ Terminal Colorization ===================== This module contains a class for sending strings with color and other attributes to a terminal application. Simple Usage Example -------------------- Print bold and bright red text on a white background. import termcolor termcolor.cprin...
29.3952
79
0.526236
""" Terminal Colorization ===================== This module contains a class for sending strings with color and other attributes to a terminal application. Simple Usage Example -------------------- Print bold and bright red text on a white background. import termcolor termcolor.cprint( 'Hello Worl...
false
true
f77ba96c50f4f0c1ac6678e4a4b906cf96334ea6
2,377
py
Python
test/functional/p2p_timeouts.py
DemoCoin-Dev/democoin
4f3ee2a4484a05140cc1066a299afae7c120b0d2
[ "MIT" ]
1
2018-10-15T00:55:42.000Z
2018-10-15T00:55:42.000Z
test/functional/p2p_timeouts.py
DemoCoin-Dev/democoin
4f3ee2a4484a05140cc1066a299afae7c120b0d2
[ "MIT" ]
null
null
null
test/functional/p2p_timeouts.py
DemoCoin-Dev/democoin
4f3ee2a4484a05140cc1066a299afae7c120b0d2
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2016-2018 The Democoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test various net timeouts. - Create three democoind nodes: no_verack_node - we never send a vera...
32.121622
116
0.736643
from time import sleep from test_framework.messages import msg_ping from test_framework.mininode import P2PInterface from test_framework.test_framework import DemocoinTestFramework class TestP2PConn(P2PInterface): def on_version(self, message): pass class TimeoutsTest(DemocoinTestFramework): ...
true
true
f77ba9c4b82e616db3bc23810b88488e476f6a8c
8,465
py
Python
sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/datab/operations/_alerts_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/datab/operations/_alerts_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/datab/operations/_alerts_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
45.26738
208
0.652688
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpR...
true
true