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
1c055cbe430f74c660c8f820238d7140f74f60d9
17,289
py
Python
src/srbpy/model/core.py
billhu0228/SmartRoadBridgePy
4a5d34028a2612aef846b580733bf6f488110798
[ "MIT" ]
2
2020-08-05T10:46:45.000Z
2020-08-11T11:05:18.000Z
src/srbpy/model/core.py
billhu0228/SmartRoadBridgePy
4a5d34028a2612aef846b580733bf6f488110798
[ "MIT" ]
null
null
null
src/srbpy/model/core.py
billhu0228/SmartRoadBridgePy
4a5d34028a2612aef846b580733bf6f488110798
[ "MIT" ]
1
2020-08-26T07:50:22.000Z
2020-08-26T07:50:22.000Z
# -*- coding : utf-8-*- import copy import json import os import zipfile import numpy as np import sqlalchemy from decimal import ROUND_HALF_UP, Decimal from PyAngle import Angle from numpy import loadtxt, pi from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker from xml.dom.minidom import...
33.12069
117
0.568049
import copy import json import os import zipfile import numpy as np import sqlalchemy from decimal import ROUND_HALF_UP, Decimal from PyAngle import Angle from numpy import loadtxt, pi from sqlalchemy import create_engine, event from sqlalchemy.orm import sessionmaker from xml.dom.minidom import Document from ..alignme...
true
true
1c055ddfa914814100f7cc741e1e639bcb4e8115
3,624
py
Python
tensorforce/environments/environment.py
zysilence/tensorforce
7539e5dde66f3a93b881006f9b7f38c926ced21b
[ "Apache-2.0" ]
2
2021-11-14T12:28:24.000Z
2022-02-14T19:23:51.000Z
tensorforce/environments/environment.py
zysilence/tensorforce
7539e5dde66f3a93b881006f9b7f38c926ced21b
[ "Apache-2.0" ]
null
null
null
tensorforce/environments/environment.py
zysilence/tensorforce
7539e5dde66f3a93b881006f9b7f38c926ced21b
[ "Apache-2.0" ]
3
2021-03-04T17:26:43.000Z
2021-03-04T17:27:10.000Z
# Copyright 2017 reinforce.io. 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...
32.070796
120
0.614238
from __future__ import absolute_import from __future__ import print_function from __future__ import division import tensorforce.environments import tensorforce.util class Environment(object): def __str__(self): raise NotImplementedError def close(self): pass def seed(self, seed): ...
true
true
1c0561433a2a182bfa2a085bfe9cef4bd8ed333a
27,476
py
Python
library/python/pysandesh/protocol/TXMLProtocol.py
atsgen/contrail-sandesh
857c483697b88da94cd11ecfe2df3247c902bbb3
[ "Apache-2.0" ]
8
2015-01-08T17:36:08.000Z
2019-09-18T01:49:18.000Z
library/python/pysandesh/protocol/TXMLProtocol.py
atsgen/contrail-sandesh
857c483697b88da94cd11ecfe2df3247c902bbb3
[ "Apache-2.0" ]
4
2015-01-12T21:26:04.000Z
2020-12-22T15:48:55.000Z
library/python/pysandesh/protocol/TXMLProtocol.py
atsgen/contrail-sandesh
857c483697b88da94cd11ecfe2df3247c902bbb3
[ "Apache-2.0" ]
35
2015-02-26T18:19:18.000Z
2020-02-05T09:49:47.000Z
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import ctypes import re import uuid import netaddr from TProtocol import * from pysandesh.sandesh_logger import SandeshLogger class TXMLProtocol(TProtocolBase): """XML implementation of the Thrift protocol driver.""" _XML_TAG_OPEN = '<' _XM...
31.98603
93
0.648384
import ctypes import re import uuid import netaddr from TProtocol import * from pysandesh.sandesh_logger import SandeshLogger class TXMLProtocol(TProtocolBase): _XML_TAG_OPEN = '<' _XML_TAG_CLOSE = '>' _XML_END_TAG = '</' _XML_TYPE = 'type' _XML_IDENTIFIER = 'identifier' _XML_ELEMENT = 'element' _XML...
true
true
1c05623d0af758abe54a8a1733d212147c63f24f
1,269
py
Python
Data Structures/SizeOfBinaryTree.py
its-varun/Python-Codes
237733f23e27a291f4c96be2c004899ac5e50e70
[ "MIT" ]
109
2017-02-09T16:56:16.000Z
2022-03-29T07:26:03.000Z
Data Structures/SizeOfBinaryTree.py
its-varun/Python-Codes
237733f23e27a291f4c96be2c004899ac5e50e70
[ "MIT" ]
18
2017-10-02T16:50:49.000Z
2020-10-05T18:19:26.000Z
Data Structures/SizeOfBinaryTree.py
its-varun/Python-Codes
237733f23e27a291f4c96be2c004899ac5e50e70
[ "MIT" ]
88
2017-04-11T12:30:17.000Z
2021-06-02T05:08:07.000Z
import queue '''class for node of binary tree''' class Node(object): """docstring for Node""" def __init__(self, val=None): super(Node, self).__init__() self.left = None self.right = None self.val = val '''class for binary tree''' class BinaryTree(object): """docstring for BinaryTree""" def ...
21.15
58
0.619385
import queue class Node(object): def __init__(self, val=None): super(Node, self).__init__() self.left = None self.right = None self.val = val class BinaryTree(object): def __init__(self): super(BinaryTree, self).__init__() self.root = None def insert(self, val): new_node = Node(val)...
true
true
1c05630388f3b8b50102521255765f23fb0e0bde
670
py
Python
var/spack/repos/builtin/packages/py-downhill/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/py-downhill/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
8
2021-11-09T20:28:40.000Z
2022-03-15T03:26:33.000Z
var/spack/repos/builtin/packages/py-downhill/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2019-02-08T20:37:20.000Z
2019-03-31T15:19:26.000Z
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.package import * class PyDownhill(PythonPackage): """Stochastic optimization routines for Theano""" ...
33.5
95
0.713433
from spack.package import * class PyDownhill(PythonPackage): homepage = "http://github.com/lmjohns3/downhill" pypi = "downhill/downhill-0.4.0.tar.gz" version('0.4.0', sha256='074ad91deb06c05108c67d982ef71ffffb6ede2c77201abc69e332649f823b42') depends_on('py-setuptools', type='build') depend...
true
true
1c056358f04bd03c05cbf99d9ad4a861549e72f7
4,241
py
Python
starter-kits/pygame.py
Chandu2000/HUB-FOR-HACKERS
39a7ca9c392b60418779acde4bdf70024efddaf3
[ "MIT" ]
null
null
null
starter-kits/pygame.py
Chandu2000/HUB-FOR-HACKERS
39a7ca9c392b60418779acde4bdf70024efddaf3
[ "MIT" ]
null
null
null
starter-kits/pygame.py
Chandu2000/HUB-FOR-HACKERS
39a7ca9c392b60418779acde4bdf70024efddaf3
[ "MIT" ]
null
null
null
# For full code given below, visit: # https://realpython.com/pygame-a-primer/#basic-game-design # Import the pygame module import pygame # Import pygame.locals for easier access to key coordinates # Updated to conform to flake8 and black standards from pygame.locals import ( K_UP, K_DOWN, K_LEF...
28.086093
76
0.640415
import pygame from pygame.locals import ( K_UP, K_DOWN, K_LEFT, K_RIGHT, K_ESCAPE, KEYDOWN, QUIT, ) pygame.init() SCREEN_WIDTH = 800 SCREEN_HEIGHT = 600 screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT)) running = True while running: for ev...
true
true
1c0564decbaae5bbcfa87e4a9f49b7207c4f3912
159
py
Python
tests/unit_tests/utils/test_datetime.py
Georgi2704/vidpit-authentication
521505a3b4e77db512227688558dab5605822626
[ "Apache-2.0" ]
16
2021-06-08T05:47:59.000Z
2022-01-29T22:39:16.000Z
tests/unit_tests/utils/test_datetime.py
Georgi2704/vidpit-authentication
521505a3b4e77db512227688558dab5605822626
[ "Apache-2.0" ]
6
2021-09-30T14:45:37.000Z
2022-01-28T13:27:00.000Z
tests/unit_tests/utils/test_datetime.py
Georgi2704/vidpit-authentication
521505a3b4e77db512227688558dab5605822626
[ "Apache-2.0" ]
3
2021-06-24T14:13:36.000Z
2022-01-29T22:39:32.000Z
from server.utils.date_utils import TIMESTAMP_REGEX, timestamp def test_timestamp_and_regex(): ts = timestamp() assert TIMESTAMP_REGEX.fullmatch(ts)
22.714286
62
0.786164
from server.utils.date_utils import TIMESTAMP_REGEX, timestamp def test_timestamp_and_regex(): ts = timestamp() assert TIMESTAMP_REGEX.fullmatch(ts)
true
true
1c0565330a18b43bf961b7e6b481a1df775e8575
33,949
py
Python
exl_env/lib/python3.6/site-packages/IPython/core/tests/test_interactiveshell.py
verma-varsha/fraud-detection
13c5b0c274dfa2b68e82a4ee317e09223b5b663f
[ "MIT" ]
11
2019-03-26T17:35:20.000Z
2019-05-14T17:03:15.000Z
team_members/Tzahi/src/Tester/python_to_use/Python37/Lib/site-packages/IPython/core/tests/test_interactiveshell.py
or2261/Tracer
f92e06e0c2c7fc36f43e8862a800148cb98198e2
[ "MIT" ]
10
2019-05-22T13:55:30.000Z
2021-09-08T00:59:46.000Z
team_members/Tzahi/src/Tester/python_to_use/Python37/Lib/site-packages/IPython/core/tests/test_interactiveshell.py
or2261/Tracer
f92e06e0c2c7fc36f43e8862a800148cb98198e2
[ "MIT" ]
13
2019-03-26T17:37:17.000Z
2019-07-30T18:33:03.000Z
# -*- coding: utf-8 -*- """Tests for the key interactiveshell module. Historically the main classes in interactiveshell have been under-tested. This module should grow as many single-method tests as possible to trap many of the recurring bugs we seem to encounter with high-level interaction. """ # Copyright (c) IPyt...
34.153924
105
0.593154
import asyncio import ast import os import signal import shutil import sys import tempfile import unittest from unittest import mock from os.path import join import nose.tools as nt from IPython.core.error import InputRejected from IPython.core.inputtransformer import InputTransformer from IPython.core import inte...
true
true
1c05670d34cb68315ed0bbd5a0a319ae5e902c42
397
py
Python
backend/proj_30267/wsgi.py
crowdbotics-apps/proj-30267
6c982e840dc77d0d9a36717c32f0c2cb9941c124
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/proj_30267/wsgi.py
crowdbotics-apps/proj-30267
6c982e840dc77d0d9a36717c32f0c2cb9941c124
[ "FTL", "AML", "RSA-MD" ]
5
2021-09-20T21:27:44.000Z
2021-10-05T11:47:10.000Z
backend/proj_30267/wsgi.py
crowdbotics-apps/proj-30267
6c982e840dc77d0d9a36717c32f0c2cb9941c124
[ "FTL", "AML", "RSA-MD" ]
null
null
null
""" WSGI config for proj_30267 project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SE...
23.352941
78
0.788413
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'proj_30267.settings') application = get_wsgi_application()
true
true
1c0569f580c30ca675b198c46f7148cd73b8e018
1,731
py
Python
validate_egs.py
peterphilips/bdrgateway-testclient
addeacc14af76eb482ccf545127ad5d7111ed8e7
[ "BSD-3-Clause" ]
null
null
null
validate_egs.py
peterphilips/bdrgateway-testclient
addeacc14af76eb482ccf545127ad5d7111ed8e7
[ "BSD-3-Clause" ]
null
null
null
validate_egs.py
peterphilips/bdrgateway-testclient
addeacc14af76eb482ccf545127ad5d7111ed8e7
[ "BSD-3-Clause" ]
null
null
null
from pathlib import Path from rdflib import Graph, Namespace from rdflib.namespace import RDF, SH from pyshacl import validate import sys def print_validity(r): # ignore SHACL Warnings v = True for vr in r[1].objects(subject=None, predicate=SH.result): for sev in r[1].objects(subject=vr, predicate...
27.47619
95
0.594454
from pathlib import Path from rdflib import Graph, Namespace from rdflib.namespace import RDF, SH from pyshacl import validate import sys def print_validity(r): v = True for vr in r[1].objects(subject=None, predicate=SH.result): for sev in r[1].objects(subject=vr, predicate=SH.resultSeverity): ...
true
true
1c056b56f11360e4fddc1d2ab4156e22f2e26918
58
py
Python
test.py
sikros/FileDownloadManager
93b66604f6e78c8cd2c62d37e8ace68233232fe1
[ "Apache-2.0" ]
null
null
null
test.py
sikros/FileDownloadManager
93b66604f6e78c8cd2c62d37e8ace68233232fe1
[ "Apache-2.0" ]
null
null
null
test.py
sikros/FileDownloadManager
93b66604f6e78c8cd2c62d37e8ace68233232fe1
[ "Apache-2.0" ]
null
null
null
a='1' b=a.split('.') print(len(b)) if len(b)!=0:print('a')
14.5
23
0.534483
a='1' b=a.split('.') print(len(b)) if len(b)!=0:print('a')
true
true
1c056c24a698bcbd9c957677757d279a87c547f1
11,621
py
Python
radical_translations/agents/models.py
kingsdigitallab/radical_translations
c18ca1ccc0ab2d88ae472dc2eda58e2ff9dcc76a
[ "MIT" ]
3
2022-02-08T18:03:44.000Z
2022-03-18T18:10:43.000Z
radical_translations/agents/models.py
kingsdigitallab/radical_translations
c18ca1ccc0ab2d88ae472dc2eda58e2ff9dcc76a
[ "MIT" ]
19
2020-05-11T15:36:35.000Z
2022-02-08T11:26:40.000Z
radical_translations/agents/models.py
kingsdigitallab/radical_translations
c18ca1ccc0ab2d88ae472dc2eda58e2ff9dcc76a
[ "MIT" ]
null
null
null
from typing import Dict, Optional from django.conf import settings from django.db import models from model_utils.models import TimeStampedModel from polymorphic.models import PolymorphicModel from controlled_vocabulary.models import ControlledTermsField from controlled_vocabulary.utils import search_term_or_none from...
30.501312
88
0.594269
from typing import Dict, Optional from django.conf import settings from django.db import models from model_utils.models import TimeStampedModel from polymorphic.models import PolymorphicModel from controlled_vocabulary.models import ControlledTermsField from controlled_vocabulary.utils import search_term_or_none from...
true
true
1c056c25f0a48c3e2b17814ae7abf1f791c7da6e
517
py
Python
build.py
t-b/inferno
3d555888ef038f246193dc029c01ab32b908aa9b
[ "MIT" ]
null
null
null
build.py
t-b/inferno
3d555888ef038f246193dc029c01ab32b908aa9b
[ "MIT" ]
1
2018-09-10T12:02:27.000Z
2018-09-10T12:02:27.000Z
build.py
t-b/inferno
3d555888ef038f246193dc029c01ab32b908aa9b
[ "MIT" ]
1
2018-08-14T15:38:55.000Z
2018-08-14T15:38:55.000Z
""" This script uses cx_freeze + distuitls to convert inferno into an exe file. """ #TODO a batch script to launch a terminal window? import os PYTHON_PATH_X86='C:\X86Python33\python.exe' def pre(): #os.system('cp docs\README.md docs\README.txt') pass def post(): #os.system('rm docs\README.txt') ...
16.677419
79
0.644101
import os PYTHON_PATH_X86='C:\X86Python33\python.exe' def pre(): pass def post(): pass def makeExe(): command = 'setup.py bdist_msi' os.system(PYTHON_PATH_X86+' '+command) pass def main(): pre() makeExe() post() if __name__ == '__main__': main()
true
true
1c056ca5d3db502182b48880bddcefda3dc4a411
6,679
py
Python
src/scripts/models.py
trevordavid/rossby-ridge
fb25a8ccf49bec42c440c17d82e56c3ee999f9de
[ "MIT" ]
1
2022-03-31T21:21:26.000Z
2022-03-31T21:21:26.000Z
src/scripts/models.py
trevordavid/rossby-ridge
fb25a8ccf49bec42c440c17d82e56c3ee999f9de
[ "MIT" ]
2
2021-12-16T15:07:23.000Z
2022-03-18T14:31:35.000Z
src/scripts/models.py
trevordavid/rossby-ridge
fb25a8ccf49bec42c440c17d82e56c3ee999f9de
[ "MIT" ]
1
2022-03-18T06:15:58.000Z
2022-03-18T06:15:58.000Z
#!/usr/bin/env python # coding: utf-8 import paths import numpy as np import pandas as pd import astropy.constants as c from astropy.table import Table import matplotlib.pyplot as plt import matplotlib as mpl mpl.rcParams["figure.dpi"] = 100 mpl.rcParams["savefig.bbox"] = "tight" mpl.rcParams["savefig.dpi"] = 300 ...
40.23494
140
0.601138
import paths import numpy as np import pandas as pd import astropy.constants as c from astropy.table import Table import matplotlib.pyplot as plt import matplotlib as mpl mpl.rcParams["figure.dpi"] = 100 mpl.rcParams["savefig.bbox"] = "tight" mpl.rcParams["savefig.dpi"] = 300 import seaborn as sns sun = {"teff": ...
true
true
1c056d5a64344360cfbc0b78c9e68ea401bab4d8
1,994
py
Python
pysnmp/carrier/asyncio/dgram/udp.py
RKinsey/pysnmp
96b5cf31e2f5d19f34d0dd1075014c488f6a5789
[ "BSD-2-Clause" ]
492
2016-03-13T11:03:13.000Z
2022-03-21T02:52:57.000Z
pysnmp/carrier/asyncio/dgram/udp.py
bartomo/pysnmp
becd15c79c9a6b5696928ecd50bf5cca8b1770a1
[ "BSD-2-Clause" ]
372
2016-03-29T22:42:05.000Z
2022-03-26T10:28:25.000Z
pysnmp/carrier/asyncio/dgram/udp.py
bartomo/pysnmp
becd15c79c9a6b5696928ecd50bf5cca8b1770a1
[ "BSD-2-Clause" ]
197
2016-03-13T11:01:54.000Z
2022-03-07T19:52:15.000Z
# # This file is part of pysnmp software. # # Copyright (c) 2005-2019, Ilya Etingof <etingof@gmail.com> # License: http://snmplabs.com/pysnmp/license.html # # Copyright (C) 2014, Zebra Technologies # Authors: Matt Hooks <me@matthooks.com> # Zachary Lorusso <zlorusso@gmail.com> # # Redistribution and use in sou...
39.098039
77
0.77984
import socket from pysnmp.carrier.asyncio.dgram.base import DgramAsyncioProtocol from pysnmp.carrier.base import AbstractTransportAddress domainName = snmpUDPDomain = (1, 3, 6, 1, 6, 1, 1) class UdpTransportAddress(tuple, AbstractTransportAddress): pass class UdpAsyncioTransport(DgramAsyncioProtocol): SOC...
true
true
1c056e99812087ec311b48c3ccd59229286d01d0
3,314
py
Python
nanobrok/blueprints/webui/routes/auth.py
retr0-13/nanobroK
6e01e385c6c0c7c231609faedb76c0337de90dc0
[ "Apache-2.0" ]
142
2021-09-18T11:25:28.000Z
2022-03-30T13:44:58.000Z
nanobrok/blueprints/webui/routes/auth.py
retr0-13/nanobroK
6e01e385c6c0c7c231609faedb76c0337de90dc0
[ "Apache-2.0" ]
1
2021-09-19T14:31:17.000Z
2021-09-21T00:47:04.000Z
nanobrok/blueprints/webui/routes/auth.py
retr0-13/nanobroK
6e01e385c6c0c7c231609faedb76c0337de90dc0
[ "Apache-2.0" ]
31
2021-09-19T03:52:13.000Z
2022-03-31T14:19:12.000Z
from flask import abort, render_template, request, flash, url_for, redirect, session from nanobrok.models import * from sqlalchemy import or_ from werkzeug.security import check_password_hash from nanobrok.ext.auth import login_manager from nanobrok.blueprints.resources.resourcesAuth import generateTokenJwt from flask_...
35.255319
145
0.703681
from flask import abort, render_template, request, flash, url_for, redirect, session from nanobrok.models import * from sqlalchemy import or_ from werkzeug.security import check_password_hash from nanobrok.ext.auth import login_manager from nanobrok.blueprints.resources.resourcesAuth import generateTokenJwt from flask_...
true
true
1c057036404182b2e6d12ca2654302110e126673
23,243
py
Python
bitbots_vision/bitbots_vision/src/bitbots_vision/vision_modules/yolo_handler.py
MosHumanoid/bitbots_thmos_meta
f45ccc362dc689b69027be5b0d000d2a08580de4
[ "MIT" ]
null
null
null
bitbots_vision/bitbots_vision/src/bitbots_vision/vision_modules/yolo_handler.py
MosHumanoid/bitbots_thmos_meta
f45ccc362dc689b69027be5b0d000d2a08580de4
[ "MIT" ]
null
null
null
bitbots_vision/bitbots_vision/src/bitbots_vision/vision_modules/yolo_handler.py
MosHumanoid/bitbots_thmos_meta
f45ccc362dc689b69027be5b0d000d2a08580de4
[ "MIT" ]
null
null
null
import cv2 import os import abc import rospy import numpy as np from math import exp from collections import defaultdict from .candidate import CandidateFinder, Candidate try: from pydarknet import Detector, Image except ImportError: rospy.logerr("Not able to run Darknet YOLO! Its only executable under python3 ...
39.12963
171
0.592652
import cv2 import os import abc import rospy import numpy as np from math import exp from collections import defaultdict from .candidate import CandidateFinder, Candidate try: from pydarknet import Detector, Image except ImportError: rospy.logerr("Not able to run Darknet YOLO! Its only executable under python3 ...
true
true
1c05712c28478b2d8dcb98b92beaaa738c31bbe8
26,819
py
Python
Plugins/UnrealEnginePython/Binaries/Win64/Lib/site-packages/tensorflow/contrib/estimator/python/estimator/rnn.py
JustinACoder/H22-GR3-UnrealAI
361eb9ef1147f8a2991e5f98c4118cd823184adf
[ "MIT" ]
6
2022-02-04T18:12:24.000Z
2022-03-21T23:57:12.000Z
Lib/site-packages/tensorflow/contrib/estimator/python/estimator/rnn.py
shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings
1fa4cd6a566c8745f455fc3d2273208f21f88ced
[ "bzip2-1.0.6" ]
null
null
null
Lib/site-packages/tensorflow/contrib/estimator/python/estimator/rnn.py
shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings
1fa4cd6a566c8745f455fc3d2273208f21f88ced
[ "bzip2-1.0.6" ]
1
2022-02-08T03:53:23.000Z
2022-02-08T03:53:23.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
42.502377
113
0.688243
from __future__ import absolute_import from __future__ import division from __future__ import print_function import six from tensorflow.contrib.estimator.python.estimator import extenders from tensorflow.contrib.feature_column.python.feature_column import sequence_feature_column as seq_fc from tensorflow.py...
true
true
1c0571f4bae2a6ead5997b63ed0fc11d6576f7a9
58
bzl
Python
src/test/fixtures/bsv.buildifier/unformatted.bzl
stackb/bazel-stack-vscode
d9c4ee7106d25955b145f7eea690b98fa56065de
[ "Apache-2.0" ]
29
2020-07-19T23:45:24.000Z
2022-03-18T16:29:55.000Z
src/test/fixtures/bsv.buildifier/unformatted.bzl
stackb/bazel-stack-vscode
d9c4ee7106d25955b145f7eea690b98fa56065de
[ "Apache-2.0" ]
36
2020-07-19T19:46:45.000Z
2022-03-27T19:24:47.000Z
src/test/fixtures/bsv.buildifier/unformatted.bzl
stackb/bazel-stack-vscode
d9c4ee7106d25955b145f7eea690b98fa56065de
[ "Apache-2.0" ]
2
2021-03-18T22:48:29.000Z
2021-12-01T20:30:19.000Z
def foo(): http_archive( name = "foo", )
9.666667
21
0.431034
def foo(): http_archive( name = "foo", )
true
true
1c0572081c406a133fb18fd948132c8294dff4e1
11,731
py
Python
model_cur.py
mehtamohit013/ITU-Challenge
2a60de6c9730f85c797c6c2d0eac1627932d41ac
[ "MIT" ]
null
null
null
model_cur.py
mehtamohit013/ITU-Challenge
2a60de6c9730f85c797c6c2d0eac1627932d41ac
[ "MIT" ]
null
null
null
model_cur.py
mehtamohit013/ITU-Challenge
2a60de6c9730f85c797c6c2d0eac1627932d41ac
[ "MIT" ]
null
null
null
import torch.nn.functional as F import torch.nn as nn import torch import torch.optim as optim import numpy as np import math from torch.nn import init class NoisyLinear(nn.Module): """Factorised Gaussian NoisyNet""" def __init__(self, in_features, out_features, sigma0=0.5): super().__init__() ...
32.139726
112
0.566107
import torch.nn.functional as F import torch.nn as nn import torch import torch.optim as optim import numpy as np import math from torch.nn import init class NoisyLinear(nn.Module): def __init__(self, in_features, out_features, sigma0=0.5): super().__init__() self.in_features = in_features ...
true
true
1c05745358c942d20c8771e098fa074df55599b9
750
py
Python
equals/__init__.py
toddsifleet/equals
fb2b2a027e5389fdeb2f59e9acbdcacb8a8cdfb4
[ "MIT" ]
38
2015-03-18T21:45:33.000Z
2020-12-22T11:13:05.000Z
equals/__init__.py
toddsifleet/equals
fb2b2a027e5389fdeb2f59e9acbdcacb8a8cdfb4
[ "MIT" ]
8
2015-02-12T04:06:37.000Z
2022-02-10T08:30:08.000Z
equals/__init__.py
toddsifleet/equals
fb2b2a027e5389fdeb2f59e9acbdcacb8a8cdfb4
[ "MIT" ]
4
2015-02-25T16:54:00.000Z
2016-09-07T20:10:09.000Z
from __future__ import absolute_import __version__ = '0.0.25' import numbers # noqa import collections # noqa from equals.equals import Equals as instance_of # noqa from equals.constraints.anything_true import AnythingTrue # noqa from equals.constraints.anything_false import AnythingFalse # noqa anything = ins...
28.846154
67
0.804
from __future__ import absolute_import __version__ = '0.0.25' import numbers import collections from equals.equals import Equals as instance_of from equals.constraints.anything_true import AnythingTrue from equals.constraints.anything_false import AnythingFalse anything = instance_of() try: any_string = in...
true
true
1c057639a2f757a11d50c2915302f90a21187fdf
1,421
py
Python
mturk/story_hit2json.py
didi/MEEP
eb668fe598e40d244f204363d360babbe1fe0dc2
[ "Apache-2.0" ]
17
2020-09-09T02:32:14.000Z
2021-10-01T09:46:40.000Z
mturk/story_hit2json.py
didi/MEEP
eb668fe598e40d244f204363d360babbe1fe0dc2
[ "Apache-2.0" ]
2
2020-12-02T09:10:03.000Z
2020-12-02T20:31:05.000Z
mturk/story_hit2json.py
didi/MEEP
eb668fe598e40d244f204363d360babbe1fe0dc2
[ "Apache-2.0" ]
3
2020-10-10T09:14:43.000Z
2022-01-18T02:36:31.000Z
import argparse import logging import csv import json logging.basicConfig(format='%(asctime)s: %(levelname)s: %(message)s', datefmt='%m/%d/%Y %H:%M:%S', level=logging.INFO) logger = logging.getLogger() def story_hit2json(args): out = [] with open(args.story_hit_csv) as...
30.234043
98
0.581281
import argparse import logging import csv import json logging.basicConfig(format='%(asctime)s: %(levelname)s: %(message)s', datefmt='%m/%d/%Y %H:%M:%S', level=logging.INFO) logger = logging.getLogger() def story_hit2json(args): out = [] with open(args.story_hit_csv) as...
true
true
1c05763b53c8f2e4d4cd2965e3d35755eb54314f
4,141
py
Python
ucsmsdk/mometa/mgmt/MgmtKmip.py
thinkitdata/ucsmsdk
da6599e1dbc1207a30eabe548a7e5791af5f476b
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/mgmt/MgmtKmip.py
thinkitdata/ucsmsdk
da6599e1dbc1207a30eabe548a7e5791af5f476b
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/mgmt/MgmtKmip.py
thinkitdata/ucsmsdk
da6599e1dbc1207a30eabe548a7e5791af5f476b
[ "Apache-2.0" ]
null
null
null
"""This module contains the general information for MgmtKmip ManagedObject.""" from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class MgmtKmipConsts: CERT_STATUS_CERT_CHAIN_TOO_LONG = "certChainTooLong" CERT_STATUS_EMPTY_CERT = "emptyCert...
59.157143
330
0.680753
from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class MgmtKmipConsts: CERT_STATUS_CERT_CHAIN_TOO_LONG = "certChainTooLong" CERT_STATUS_EMPTY_CERT = "emptyCert" CERT_STATUS_EXPIRED = "expired" CERT_STATUS_FAILED_TO_VERIFY_WITH_PRI...
true
true
1c0576790e3137628ada688f11cd56ce8161627c
14,799
py
Python
retrieval_mod/simulation.py
bzohidov/TomoRain
a894249a666ff71289fbd878dbc31f6d2bd82701
[ "MIT" ]
null
null
null
retrieval_mod/simulation.py
bzohidov/TomoRain
a894249a666ff71289fbd878dbc31f6d2bd82701
[ "MIT" ]
null
null
null
retrieval_mod/simulation.py
bzohidov/TomoRain
a894249a666ff71289fbd878dbc31f6d2bd82701
[ "MIT" ]
null
null
null
#------------------------------------------------------------------------------- # Name: simulation.py # Purpose: This module provides simulation class for rainfall field retrieval. # # Information for one link: # one_link = [ "ID" , "Caf", "Frequency", "Recx", "Recy", "Trx", # "Try", "RecAzimut...
47.130573
86
0.500777
import numpy as np import copy import os from copy import deepcopy from pandas import Series, DataFrame import rain_atten.attenuation_model as att_model from antenna_processing.link_process import get_link_length from inverse_technique.nestingmethod import inverse_nesting_grid from forward_process import discretiz...
false
true
1c0576d9b57c20e6b3a3eef997851edf3499c2a7
285
py
Python
myuw/templatetags/settings_value.py
timtim17/myuw
d59702a8095daf049d7e57cbb1f7f2a5bebc69af
[ "Apache-2.0" ]
null
null
null
myuw/templatetags/settings_value.py
timtim17/myuw
d59702a8095daf049d7e57cbb1f7f2a5bebc69af
[ "Apache-2.0" ]
null
null
null
myuw/templatetags/settings_value.py
timtim17/myuw
d59702a8095daf049d7e57cbb1f7f2a5bebc69af
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from django import template from django.conf import settings register = template.Library() # settings value @register.simple_tag def settings_value(name): return getattr(settings, name, "")
20.357143
48
0.77193
from django import template from django.conf import settings register = template.Library() @register.simple_tag def settings_value(name): return getattr(settings, name, "")
true
true
1c0576e88519a459a07e76c73d4c6eaaae8a975a
10,495
py
Python
Library/utils.py
bkerler/edl_emulate
d9a6b7ecc2077b602ed575242056cb01ec6891e8
[ "MIT" ]
13
2020-11-13T16:54:29.000Z
2022-03-11T19:08:40.000Z
Library/utils.py
bkerler/edl_emulate
d9a6b7ecc2077b602ed575242056cb01ec6891e8
[ "MIT" ]
null
null
null
Library/utils.py
bkerler/edl_emulate
d9a6b7ecc2077b602ed575242056cb01ec6891e8
[ "MIT" ]
3
2020-11-19T16:10:38.000Z
2021-02-20T09:47:16.000Z
import sys import struct import logging logging.basicConfig(level=logging.INFO,format="%(name)s - %(message)s") import codecs from binascii import hexlify, unhexlify import struct import os import shutil import stat def del_rw(action, name, exc): os.chmod(name, stat.S_IWRITE) os.remove(name) def rmrf(path):...
33.637821
154
0.516055
import sys import struct import logging logging.basicConfig(level=logging.INFO,format="%(name)s - %(message)s") import codecs from binascii import hexlify, unhexlify import struct import os import shutil import stat def del_rw(action, name, exc): os.chmod(name, stat.S_IWRITE) os.remove(name) def rmrf(path):...
true
true
1c057800dd909da8e031534243f5a08876c72343
16,508
py
Python
main.py
ansjin/multi-serverless-deployment
d4bb6f65db01c6b6fd2085de17f8cfad2cba9bb8
[ "MIT" ]
1
2021-03-08T20:17:46.000Z
2021-03-08T20:17:46.000Z
main.py
ansjin/multi-serverless-deployment
d4bb6f65db01c6b6fd2085de17f8cfad2cba9bb8
[ "MIT" ]
null
null
null
main.py
ansjin/multi-serverless-deployment
d4bb6f65db01c6b6fd2085de17f8cfad2cba9bb8
[ "MIT" ]
null
null
null
#!/usr/bin/env python import yaml import sys, getopt from typing import List import traceback import asyncio import json from Clusters import BaseDeployment from Clusters import OpenWhiskDeployment from Clusters import GoogleDeployment from Clusters import AWSDeployment from Clusters import BaseCollector from Clusters...
49.130952
129
0.462321
import yaml import sys, getopt from typing import List import traceback import asyncio import json from Clusters import BaseDeployment from Clusters import OpenWhiskDeployment from Clusters import GoogleDeployment from Clusters import AWSDeployment from Clusters import BaseCollector from Clusters import GCFCollector f...
true
true
1c0578031db21a7fb43772869e9118ff223a84ac
3,202
py
Python
tests/gamestonk_terminal/stocks/technical_analysis/test_finnhub_model.py
minhhoang1023/GamestonkTerminal
195dc19b491052df080178c0cc6a9d535a91a704
[ "MIT" ]
1,835
2021-05-09T02:55:06.000Z
2022-03-29T12:37:05.000Z
tests/gamestonk_terminal/stocks/technical_analysis/test_finnhub_model.py
minhhoang1023/GamestonkTerminal
195dc19b491052df080178c0cc6a9d535a91a704
[ "MIT" ]
569
2021-05-09T15:59:41.000Z
2022-03-29T12:25:16.000Z
tests/gamestonk_terminal/stocks/technical_analysis/test_finnhub_model.py
minhhoang1023/GamestonkTerminal
195dc19b491052df080178c0cc6a9d535a91a704
[ "MIT" ]
268
2021-05-10T21:46:50.000Z
2022-03-28T09:18:38.000Z
# IMPORTATION STANDARD import json # IMPORTATION THIRDPARTY import pytest import requests # IMPORTATION INTERNAL from gamestonk_terminal.stocks.technical_analysis import finnhub_model RESPONSE_SAMPLE = """{ "points": [ { "aprice": 1.09236, "atime": 1567458000, "bprice": 1.1109, ...
26.46281
84
0.602436
import json import pytest import requests from gamestonk_terminal.stocks.technical_analysis import finnhub_model RESPONSE_SAMPLE = """{ "points": [ { "aprice": 1.09236, "atime": 1567458000, "bprice": 1.1109, "btime": 1568322000, "cprice": 1.09897, "ctime": ...
true
true
1c0578839c6e0c415d1a8c28930a9934c2fa28b3
478
py
Python
src/blog/migrations/0006_post_image.py
Sabrigan/mysite
f01290e820c2666d8572d0d2ba2deeb7ff8f350c
[ "Apache-2.0" ]
null
null
null
src/blog/migrations/0006_post_image.py
Sabrigan/mysite
f01290e820c2666d8572d0d2ba2deeb7ff8f350c
[ "Apache-2.0" ]
null
null
null
src/blog/migrations/0006_post_image.py
Sabrigan/mysite
f01290e820c2666d8572d0d2ba2deeb7ff8f350c
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.1.7 on 2019-04-21 13:36 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('blog', '0005_auto_20190421_1332'), ] operations = [ migrations.AddField( model_name='post', ...
22.761905
85
0.619247
from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('blog', '0005_auto_20190421_1332'), ] operations = [ migrations.AddField( model_name='post', name='image', field=models.Imag...
true
true
1c05795fb547163c054c7f0ca400bff4eb789315
964
py
Python
rodan/test/models/test_output.py
carrieeex/Rodan
458e72990c2571fa727a0d026fb235faf30bffec
[ "MIT" ]
31
2015-01-06T17:23:45.000Z
2022-03-30T02:46:16.000Z
rodan/test/models/test_output.py
carrieeex/Rodan
458e72990c2571fa727a0d026fb235faf30bffec
[ "MIT" ]
258
2015-01-02T19:34:57.000Z
2022-01-19T16:34:21.000Z
rodan/test/models/test_output.py
carrieeex/Rodan
458e72990c2571fa727a0d026fb235faf30bffec
[ "MIT" ]
8
2015-08-19T16:09:31.000Z
2021-10-03T23:46:46.000Z
from django.test import TestCase # from rodan.models.resource import Resource # from rodan.models.outputport import OutputPort # from rodan.models.runjob import RunJob from rodan.models.output import Output from model_mommy import mommy from rodan.test.helpers import RodanTestTearDownMixin, RodanTestSetUpMixin class ...
35.703704
76
0.726141
from django.test import TestCase from rodan.models.output import Output from model_mommy import mommy from rodan.test.helpers import RodanTestTearDownMixin, RodanTestSetUpMixin class OutputTestCase(RodanTestTearDownMixin, TestCase, RodanTestSetUpMixin): def setUp(self): self.setUp_rodan() self.tes...
true
true
1c057a128b5cef804ac847ecd686b98519b9ee56
393
py
Python
conmeter/wsgi.py
conmeter/web-application
f9cbdc358773a749aa15353665c53f8fc4e07556
[ "Apache-2.0" ]
null
null
null
conmeter/wsgi.py
conmeter/web-application
f9cbdc358773a749aa15353665c53f8fc4e07556
[ "Apache-2.0" ]
null
null
null
conmeter/wsgi.py
conmeter/web-application
f9cbdc358773a749aa15353665c53f8fc4e07556
[ "Apache-2.0" ]
null
null
null
""" WSGI config for conmeter project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETT...
23.117647
78
0.78626
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'conmeter.settings') application = get_wsgi_application()
true
true
1c057a359c47399aca141f887b6fb4f8b67b6d21
2,798
py
Python
docs/source/conf.py
Gr8ayu/SPCPortal
1aaaff36b5db6d1f5d4eb6a5aa483f4c61720a2e
[ "MIT" ]
5
2021-11-22T08:03:41.000Z
2021-12-18T10:46:41.000Z
docs/source/conf.py
Gr8ayu/SPCPortal
1aaaff36b5db6d1f5d4eb6a5aa483f4c61720a2e
[ "MIT" ]
2
2021-09-26T06:33:12.000Z
2021-09-26T08:07:35.000Z
docs/source/conf.py
Gr8ayu/SPCPortal
1aaaff36b5db6d1f5d4eb6a5aa483f4c61720a2e
[ "MIT" ]
3
2020-12-06T14:09:25.000Z
2022-01-23T10:34:18.000Z
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
31.795455
80
0.654039
project = "spcportal" copyright = "2021, Ayush Kumar" author = "Ayush Kumar" release = "1.0.0" extensions = [] templates_path = ["_templates"] exclude_patterns = [] html_theme = "sphinx_rtd_theme" extensions = [ "sphinx.ext.autosectionlabel", "sphinx.ext.autodoc", "sphinx.ext.intersphinx", ...
true
true
1c057b0abaa29780256031adc245404ebedc7a31
15,838
py
Python
advisors/gitee.py
openeuler-mirror/openEuler-Advisor
108b5e50f254ba914583e244f863ef05ff4731fa
[ "MulanPSL-1.0" ]
1
2021-11-09T06:49:48.000Z
2021-11-09T06:49:48.000Z
advisors/gitee.py
openeuler-mirror/openEuler-Advisor
108b5e50f254ba914583e244f863ef05ff4731fa
[ "MulanPSL-1.0" ]
null
null
null
advisors/gitee.py
openeuler-mirror/openEuler-Advisor
108b5e50f254ba914583e244f863ef05ff4731fa
[ "MulanPSL-1.0" ]
null
null
null
#!/usr/bin/python3 #****************************************************************************** # Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved. # licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. # You may obtain a co...
38.723716
98
0.593004
import os import json import base64 import urllib import urllib.request import urllib.parse import urllib.error import threading from datetime import datetime import yaml class Gitee(): _instance_lock = threading.Lock() _first_init = True def __new__(cls): if not hasattr(Gitee, "_instance"): ...
true
true
1c057b6220b5b5fff3c6197170a2b151621334d6
2,603
py
Python
oniapy/hello2.py
gasparka/oniapy
a58f68244c730041a034b91fd417bd3968d46cc7
[ "Apache-2.0" ]
null
null
null
oniapy/hello2.py
gasparka/oniapy
a58f68244c730041a034b91fd417bd3968d46cc7
[ "Apache-2.0" ]
null
null
null
oniapy/hello2.py
gasparka/oniapy
a58f68244c730041a034b91fd417bd3968d46cc7
[ "Apache-2.0" ]
null
null
null
''' Present an interactive function explorer with slider widgets. Scrub the sliders to change the properties of the ``sin`` curve, or type into the title text box to update the title of the plot. Use the ``bokeh serve`` command to run the example by executing: bokeh serve sliders.py at your command prompt. Then...
26.561224
104
0.679216
import numpy as np from bokeh.io import curdoc from bokeh.layouts import row, widgetbox from bokeh.models import ColumnDataSource from bokeh.models.widgets import Slider, TextInput from bokeh.plotting import figure N = 200 x = np.linspace(0, 4*np.pi, N) y = np.sin(x) source = ColumnDataSource(data=dict(x=x, y=y)) p...
true
true
1c057b64c4725341149c8e7b69628dfd2afe2312
4,159
py
Python
openstack/tests/unit/network/v2/test_floating_ip.py
horion/openstacksdk
cbb0e12e1dc944847f2ba0e67bf35b9c7a67b3a3
[ "Apache-2.0" ]
99
2018-03-28T15:41:45.000Z
2022-01-23T17:22:13.000Z
openstack/tests/unit/network/v2/test_floating_ip.py
horion/openstacksdk
cbb0e12e1dc944847f2ba0e67bf35b9c7a67b3a3
[ "Apache-2.0" ]
5
2018-05-25T16:54:23.000Z
2021-11-21T02:27:16.000Z
openstack/tests/unit/network/v2/test_floating_ip.py
horion/openstacksdk
cbb0e12e1dc944847f2ba0e67bf35b9c7a67b3a3
[ "Apache-2.0" ]
104
2018-04-06T14:33:54.000Z
2022-03-01T01:58:09.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
39.235849
78
0.675643
from unittest import mock from openstack.network.v2 import floating_ip from openstack import proxy from openstack.tests.unit import base IDENTIFIER = 'IDENTIFIER' EXAMPLE = { 'created_at': '0', 'fixed_ip_address': '1', 'floating_ip_address': '127.0.0.1', 'floating_network_id': '3', 'id': IDENTIFI...
true
true
1c057cbe8ece079bf06e28fb52026f2740d0fcc6
782
py
Python
tests/examples/networking/onprem_google_access_dns/test_plan.py
Kiranug/cloud-foundation-fabric
c4b2f85a3b197a6386081431d8e00d69f4b1ccfb
[ "Apache-2.0" ]
84
2022-01-12T21:25:12.000Z
2022-03-31T05:40:02.000Z
tests/examples/networking/onprem_google_access_dns/test_plan.py
Kiranug/cloud-foundation-fabric
c4b2f85a3b197a6386081431d8e00d69f4b1ccfb
[ "Apache-2.0" ]
77
2022-01-12T18:49:05.000Z
2022-03-29T13:05:17.000Z
tests/examples/networking/onprem_google_access_dns/test_plan.py
Kiranug/cloud-foundation-fabric
c4b2f85a3b197a6386081431d8e00d69f4b1ccfb
[ "Apache-2.0" ]
55
2022-01-15T13:47:30.000Z
2022-03-31T17:35:48.000Z
# Copyright 2022 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, ...
39.1
74
0.757033
def test_resources(e2e_plan_runner): modules, resources = e2e_plan_runner() assert len(modules) == 14 assert len(resources) == 48
true
true
1c057d114c1e40e49d83f4b6ac10ef053dfef693
11,727
py
Python
nltk/corpus/reader/comparative_sents.py
Bharat123rox/nltk
ba989e5d568f007718cbe69272c885b4a7d1168d
[ "Apache-2.0" ]
9,747
2015-01-01T05:47:33.000Z
2022-03-31T19:36:28.000Z
nltk/corpus/reader/comparative_sents.py
Bharat123rox/nltk
ba989e5d568f007718cbe69272c885b4a7d1168d
[ "Apache-2.0" ]
2,155
2015-01-01T15:16:55.000Z
2022-03-31T07:44:43.000Z
nltk/corpus/reader/comparative_sents.py
Bharat123rox/nltk
ba989e5d568f007718cbe69272c885b4a7d1168d
[ "Apache-2.0" ]
2,846
2015-01-03T23:16:34.000Z
2022-03-29T17:54:34.000Z
# Natural Language Toolkit: Comparative Sentence Corpus Reader # # Copyright (C) 2001-2021 NLTK Project # Author: Pierpaolo Pantone <24alsecondo@gmail.com> # URL: <https://www.nltk.org/> # For license information, see LICENSE.TXT """ CorpusReader for the Comparative Sentence Dataset. - Comparative Sentence Dataset in...
37.829032
87
0.573378
import re from nltk.corpus.reader.api import * from nltk.tokenize import * STARS = re.compile(r"^\*+$") COMPARISON = re.compile(r"<cs-[1234]>") CLOSE_COMPARISON = re.compile(r"</cs-[1234]>") GRAD_COMPARISON = re.compile(r"<cs-[123]>") NON_GRAD_COMPARISON = re.compile(r"<cs-4>") ENTITIES_FEATS = re.compile(r"(\d)_((?...
true
true
1c057fcf64448e5e4a6c23e7e6157e1cb29b6220
2,188
py
Python
mundiapi/models/create_apple_pay_header_request.py
hugocpolos/MundiAPI-PYTHON
164545cc58bf18c946d5456e9ba4d55a378a339a
[ "MIT" ]
10
2017-08-30T15:53:00.000Z
2021-02-11T18:06:56.000Z
mundiapi/models/create_apple_pay_header_request.py
hugocpolos/MundiAPI-PYTHON
164545cc58bf18c946d5456e9ba4d55a378a339a
[ "MIT" ]
4
2018-05-05T15:15:09.000Z
2021-12-22T00:52:41.000Z
mundiapi/models/create_apple_pay_header_request.py
hugocpolos/MundiAPI-PYTHON
164545cc58bf18c946d5456e9ba4d55a378a339a
[ "MIT" ]
7
2017-04-27T13:46:52.000Z
2021-04-14T13:44:23.000Z
# -*- coding: utf-8 -*- """ mundiapi This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). """ class CreateApplePayHeaderRequest(object): """Implementation of the 'CreateApplePayHeaderRequest' model. The ApplePay header request Attributes: pub...
30.816901
84
0.624771
class CreateApplePayHeaderRequest(object): _names = { "ephemeral_public_key":'ephemeral_public_key', "public_key_hash":'public_key_hash', "transaction_id":'transaction_id' } def __init__(self, ephemeral_public_key=None, public...
true
true
1c0580fa7d2d1a13e6450a476d8ac1338c9feeac
3,528
py
Python
Facemask_trainer.py
aravindrajamani/final-year-project
e9159b4e9fe7eed11a7a245044106f574518bab1
[ "MIT" ]
null
null
null
Facemask_trainer.py
aravindrajamani/final-year-project
e9159b4e9fe7eed11a7a245044106f574518bab1
[ "MIT" ]
null
null
null
Facemask_trainer.py
aravindrajamani/final-year-project
e9159b4e9fe7eed11a7a245044106f574518bab1
[ "MIT" ]
null
null
null
from tensorflow.keras.preprocessing.image import ImageDataGenerator from tensorflow.keras.applications import MobileNetV2 from tensorflow.keras.layers import AveragePooling2D from tensorflow.keras.layers import Dropout from tensorflow.keras.layers import Flatten from tensorflow.keras.layers import Dense from tensorflow...
29.898305
71
0.764739
from tensorflow.keras.preprocessing.image import ImageDataGenerator from tensorflow.keras.applications import MobileNetV2 from tensorflow.keras.layers import AveragePooling2D from tensorflow.keras.layers import Dropout from tensorflow.keras.layers import Flatten from tensorflow.keras.layers import Dense from tensorflow...
true
true
1c058100bf9a011395f032623764e65a0048a261
287
py
Python
application/entities/education_information.py
AVKrepo/LearningManagementSystem
7b6f6e426154dd096610c5841d962ff4c8fc74b5
[ "MIT" ]
null
null
null
application/entities/education_information.py
AVKrepo/LearningManagementSystem
7b6f6e426154dd096610c5841d962ff4c8fc74b5
[ "MIT" ]
null
null
null
application/entities/education_information.py
AVKrepo/LearningManagementSystem
7b6f6e426154dd096610c5841d962ff4c8fc74b5
[ "MIT" ]
null
null
null
import enum class EducationDegree(enum.Enum): nan = 1 bachelor = 2 specialist = 3 master = 4 class EducationBasis(enum.Enum): nan = 1 budget = 2 contract = 3 class EducationForm(enum.Enum): nan = 1 full_time = 2 distance = 3 evening = 4
13.045455
33
0.602787
import enum class EducationDegree(enum.Enum): nan = 1 bachelor = 2 specialist = 3 master = 4 class EducationBasis(enum.Enum): nan = 1 budget = 2 contract = 3 class EducationForm(enum.Enum): nan = 1 full_time = 2 distance = 3 evening = 4
true
true
1c05812b2278dbbbaf08ae8e18c7f45c89285c6a
1,817
py
Python
notifications/upcoming_match.py
BookWorm0103/the-blue-alliance
39b2f33531308b19218d58c726d51f020ee9d8b5
[ "MIT" ]
null
null
null
notifications/upcoming_match.py
BookWorm0103/the-blue-alliance
39b2f33531308b19218d58c726d51f020ee9d8b5
[ "MIT" ]
null
null
null
notifications/upcoming_match.py
BookWorm0103/the-blue-alliance
39b2f33531308b19218d58c726d51f020ee9d8b5
[ "MIT" ]
null
null
null
import calendar import datetime from consts.notification_type import NotificationType from helpers.webcast_online_helper import WebcastOnlineHelper from notifications.base_notification import BaseNotification class UpcomingMatchNotification(BaseNotification): _priority = 'high' def __init__(self, match, ev...
35.627451
122
0.674188
import calendar import datetime from consts.notification_type import NotificationType from helpers.webcast_online_helper import WebcastOnlineHelper from notifications.base_notification import BaseNotification class UpcomingMatchNotification(BaseNotification): _priority = 'high' def __init__(self, match, ev...
true
true
1c05818ace9381f56d2d034391734dccd09a8b7a
4,323
py
Python
sciencebirdsagents/HeuristicAgents/PigShooter.py
phy-q/benchmark
0a0fd31614039f3620369582017d9bd0a1c88b11
[ "MIT" ]
24
2021-09-01T09:50:06.000Z
2022-02-01T16:10:23.000Z
sciencebirdsagents/HeuristicAgents/PigShooter.py
phy-q/benchmark
0a0fd31614039f3620369582017d9bd0a1c88b11
[ "MIT" ]
4
2021-10-06T04:55:39.000Z
2021-12-07T03:56:46.000Z
sciencebirdsagents/HeuristicAgents/PigShooter.py
phy-q/benchmark
0a0fd31614039f3620369582017d9bd0a1c88b11
[ "MIT" ]
3
2021-09-15T05:48:58.000Z
2021-10-18T06:07:13.000Z
import random import numpy as np from SBAgent import SBAgent from SBEnvironment.SBEnvironmentWrapper import SBEnvironmentWrapper from StateReader.SymbolicStateDevReader import SymbolicStateDevReader from StateReader.game_object import GameObjectType from Utils.point2D import Point2D from Utils.trajectory_planner impo...
43.666667
116
0.591487
import random import numpy as np from SBAgent import SBAgent from SBEnvironment.SBEnvironmentWrapper import SBEnvironmentWrapper from StateReader.SymbolicStateDevReader import SymbolicStateDevReader from StateReader.game_object import GameObjectType from Utils.point2D import Point2D from Utils.trajectory_planner impo...
true
true
1c05820ceb4d6a965d2a2bf5241dfaa5ea8ab498
830
py
Python
tests/journal.pkg/info_example.py
PyreFramework/pyre
345c7449a3416eea1c1affa74fb32faff30a6aaa
[ "BSD-3-Clause" ]
null
null
null
tests/journal.pkg/info_example.py
PyreFramework/pyre
345c7449a3416eea1c1affa74fb32faff30a6aaa
[ "BSD-3-Clause" ]
null
null
null
tests/journal.pkg/info_example.py
PyreFramework/pyre
345c7449a3416eea1c1affa74fb32faff30a6aaa
[ "BSD-3-Clause" ]
null
null
null
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # # michael a.g. aïvázis <michael.aivazis@para-sim.com> # (c) 1998-2022 all rights reserved def test(): """ Exercise the info channel with a realistic example """ # get the trash can from journal.Trash import Trash as trash # and the channel ...
20.243902
59
0.637349
def test(): from journal.Trash import Trash as trash from journal.Informational import Informational as info channel = info(name="tests.journal.info") channel.device = trash() channel.notes["time"] = "now" channel.line("info channel:") channel.log(" hello world...
true
true
1c05827412b8304970ce230e57ef8cbff14e0c69
3,382
py
Python
segmentation_models/losses.py
jsyzeng/segmentation_models
289606b7993883ebd7129645ce584971bb0bc030
[ "MIT" ]
1
2019-03-21T01:13:28.000Z
2019-03-21T01:13:28.000Z
segmentation_models/losses.py
jsyzeng/segmentation_models
289606b7993883ebd7129645ce584971bb0bc030
[ "MIT" ]
null
null
null
segmentation_models/losses.py
jsyzeng/segmentation_models
289606b7993883ebd7129645ce584971bb0bc030
[ "MIT" ]
null
null
null
import keras.backend as K from keras.losses import binary_crossentropy from keras.losses import categorical_crossentropy from keras.utils.generic_utils import get_custom_objects from .metrics import jaccard_score, f_score SMOOTH = 1e-12 __all__ = [ 'jaccard_loss', 'bce_jaccard_loss', 'cce_jaccard_loss', 'dic...
34.161616
115
0.666765
import keras.backend as K from keras.losses import binary_crossentropy from keras.losses import categorical_crossentropy from keras.utils.generic_utils import get_custom_objects from .metrics import jaccard_score, f_score SMOOTH = 1e-12 __all__ = [ 'jaccard_loss', 'bce_jaccard_loss', 'cce_jaccard_loss', 'dic...
true
true
1c058336f0b8d56f02f422bbfdba931fdc24f6e8
1,061
py
Python
leetcode/645_set-mismatch/Solution.py
tjeubaoit/algorithm
a1f2a30e0f736cc3d8b45ed845f724b9a4ed2e9a
[ "MIT" ]
null
null
null
leetcode/645_set-mismatch/Solution.py
tjeubaoit/algorithm
a1f2a30e0f736cc3d8b45ed845f724b9a4ed2e9a
[ "MIT" ]
null
null
null
leetcode/645_set-mismatch/Solution.py
tjeubaoit/algorithm
a1f2a30e0f736cc3d8b45ed845f724b9a4ed2e9a
[ "MIT" ]
null
null
null
class Solution: def findErrorNums(self, nums): return self.solution2(nums) def solution1(self, nums): """ Use XOR approach """ pass def solution2(self, nums): """ Use extra array/hash map approach """ ct = [0] * len(nums) for...
22.574468
41
0.419416
class Solution: def findErrorNums(self, nums): return self.solution2(nums) def solution1(self, nums): pass def solution2(self, nums): ct = [0] * len(nums) for num in nums: ct[num - 1] += 1 dup, missing = -1, -1 for i in range(0, len(nums)): ...
true
true
1c0583658051ed23e891e4b0b75c06ffd6c37136
844
py
Python
Problemset/shu-ju-liu-zhong-de-zhong-wei-shu-lcof/shu-ju-liu-zhong-de-zhong-wei-shu-lcof.py
worldwonderer/algorithm
083178b2d987de7f6020aceca869a353c0b4b1f3
[ "MIT" ]
1
2021-01-30T01:52:46.000Z
2021-01-30T01:52:46.000Z
Problemset/shu-ju-liu-zhong-de-zhong-wei-shu-lcof/shu-ju-liu-zhong-de-zhong-wei-shu-lcof.py
worldwonderer/algorithm
083178b2d987de7f6020aceca869a353c0b4b1f3
[ "MIT" ]
1
2021-12-15T14:54:06.000Z
2021-12-15T14:54:06.000Z
Problemset/shu-ju-liu-zhong-de-zhong-wei-shu-lcof/shu-ju-liu-zhong-de-zhong-wei-shu-lcof.py
worldwonderer/algorithm
083178b2d987de7f6020aceca869a353c0b4b1f3
[ "MIT" ]
2
2021-04-19T03:32:18.000Z
2021-06-22T07:06:01.000Z
# @Title: 数据流中的中位数 (数据流中的中位数 LCOF) # @Author: 18015528893 # @Date: 2021-01-21 22:25:58 # @Runtime: 212 ms # @Memory: 25.5 MB from heapq import heappush, heappop class MedianFinder: def __init__(self): """ initialize your data structure here. """ self.A = [] self.B = [] ...
22.210526
88
0.57346
from heapq import heappush, heappop class MedianFinder: def __init__(self): self.A = [] self.B = [] def addNum(self, num: int) -> None: if len(self.A) != len(self.B): heappush(self.A, num) heappush(self.B, -heappop(self.A)) else: heappush...
true
true
1c0584e3224c3f691563892dd3257296054dad5c
711
py
Python
neptune/new/internal/init/parameters.py
michalsustr/neptune-client
98858859f26d6b4e3aa59fbf6be63ff97e1abd9a
[ "Apache-2.0" ]
13
2019-02-11T13:18:38.000Z
2019-12-26T06:26:07.000Z
neptune/new/internal/init/parameters.py
michalsustr/neptune-client
98858859f26d6b4e3aa59fbf6be63ff97e1abd9a
[ "Apache-2.0" ]
39
2019-03-07T13:40:10.000Z
2020-01-07T17:19:24.000Z
neptune/new/internal/init/parameters.py
michalsustr/neptune-client
98858859f26d6b4e3aa59fbf6be63ff97e1abd9a
[ "Apache-2.0" ]
4
2019-02-11T13:07:23.000Z
2019-11-26T08:20:24.000Z
# # Copyright (c) 2022, Neptune Labs Sp. z o.o. # # 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...
35.55
74
0.762307
DEFAULT_FLUSH_PERIOD = 5 DEFAULT_NAME = "Untitled" OFFLINE_PROJECT_QUALIFIED_NAME = "offline/project-placeholder"
true
true
1c05865e9a4336c9104956e2435eaa615a4e0175
477
py
Python
env/Lib/site-packages/plotly/validators/layout/scene/yaxis/_tick0.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
11,750
2015-10-12T07:03:39.000Z
2022-03-31T20:43:15.000Z
venv/Lib/site-packages/plotly/validators/layout/scene/yaxis/_tick0.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
2,951
2015-10-12T00:41:25.000Z
2022-03-31T22:19:26.000Z
venv/Lib/site-packages/plotly/validators/layout/scene/yaxis/_tick0.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
2,623
2015-10-15T14:40:27.000Z
2022-03-28T16:05:50.000Z
import _plotly_utils.basevalidators class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="tick0", parent_name="layout.scene.yaxis", **kwargs): super(Tick0Validator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
36.692308
88
0.662474
import _plotly_utils.basevalidators class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="tick0", parent_name="layout.scene.yaxis", **kwargs): super(Tick0Validator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
true
true
1c0586a6a884f119e6c3cf985d623d0ffa8961c6
2,470
py
Python
Days/Day 8 - I Heard You Like Registers/Part 1.py
jamesjiang52/Advent-of-Code-2017
94c85696e1335d7b5b00717a0e5f31c3653ba394
[ "MIT" ]
null
null
null
Days/Day 8 - I Heard You Like Registers/Part 1.py
jamesjiang52/Advent-of-Code-2017
94c85696e1335d7b5b00717a0e5f31c3653ba394
[ "MIT" ]
null
null
null
Days/Day 8 - I Heard You Like Registers/Part 1.py
jamesjiang52/Advent-of-Code-2017
94c85696e1335d7b5b00717a0e5f31c3653ba394
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Dec 8 00:06:18 2017 @author: James Jiang """ all_lines = [line.rstrip('\n') for line in open('Data.txt')] instructions = [] for line in all_lines: strings = line.split() instructions.append(strings) values_dict = {} for i in range(len(instructions)): valu...
38
74
0.548583
all_lines = [line.rstrip('\n') for line in open('Data.txt')] instructions = [] for line in all_lines: strings = line.split() instructions.append(strings) values_dict = {} for i in range(len(instructions)): values_dict[instructions[i][0]] = 0 for i in range(len(instructions)): if instructions[i]...
true
true
1c0586c2c8dd465a0ae7f5e9116c1bf2f5320f2f
46
py
Python
examples/Tests/Misc/Resources/PythonFile/basic.py
esayui/mworks
0522e5afc1e30fdbf1e67cedd196ee50f7924499
[ "MIT" ]
null
null
null
examples/Tests/Misc/Resources/PythonFile/basic.py
esayui/mworks
0522e5afc1e30fdbf1e67cedd196ee50f7924499
[ "MIT" ]
null
null
null
examples/Tests/Misc/Resources/PythonFile/basic.py
esayui/mworks
0522e5afc1e30fdbf1e67cedd196ee50f7924499
[ "MIT" ]
null
null
null
setvar('nsamples', getvar('a') + getvar('b'))
23
45
0.608696
setvar('nsamples', getvar('a') + getvar('b'))
true
true
1c058717874f56278cb5e9501cf7d95fb777c8c8
1,699
py
Python
dataset_generator/learning/imitation/iil-dagger/test.py
rjean/duckie-segmentation
5e720e1a96ef61c4560823030549ac1d5d16e2a4
[ "Apache-2.0" ]
1
2021-02-03T02:23:34.000Z
2021-02-03T02:23:34.000Z
dataset_generator/learning/imitation/iil-dagger/test.py
rjean/mobile-segmentation
5e720e1a96ef61c4560823030549ac1d5d16e2a4
[ "Apache-2.0" ]
null
null
null
dataset_generator/learning/imitation/iil-dagger/test.py
rjean/mobile-segmentation
5e720e1a96ef61c4560823030549ac1d5d16e2a4
[ "Apache-2.0" ]
null
null
null
from .train import launch_env, teacher from .learner import NeuralNetworkPolicy from .model import Squeezenet from .algorithms import DAgger import argparse import os def process_args(): parser = argparse.ArgumentParser() parser.add_argument("--episode", "-i", default=10, type=int) parser.add_argument("--...
28.79661
81
0.6804
from .train import launch_env, teacher from .learner import NeuralNetworkPolicy from .model import Squeezenet from .algorithms import DAgger import argparse import os def process_args(): parser = argparse.ArgumentParser() parser.add_argument("--episode", "-i", default=10, type=int) parser.add_argument("--...
true
true
1c058772c22f6e2e73ed452cb53b282119103d7b
18,955
py
Python
tests/test_mvkde.py
vishalbelsare/cgpm
56a481829448bddc9cdfebd42f65023287d5b7c7
[ "Apache-2.0" ]
26
2016-12-17T10:39:30.000Z
2020-10-28T14:16:42.000Z
tests/test_mvkde.py
vishalbelsare/cgpm
56a481829448bddc9cdfebd42f65023287d5b7c7
[ "Apache-2.0" ]
120
2016-09-05T20:53:20.000Z
2021-11-24T18:32:27.000Z
tests/test_mvkde.py
vishalbelsare/cgpm
56a481829448bddc9cdfebd42f65023287d5b7c7
[ "Apache-2.0" ]
8
2017-08-02T23:12:50.000Z
2021-11-16T07:20:24.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2015-2016 MIT Probabilistic Computing Project # 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 # Unles...
35.166976
80
0.615563
import importlib import json import matplotlib.pyplot as plt import numpy as np import pytest from scipy.stats import chisquare from scipy.stats import ks_2samp from cgpm.kde.mvkde import MultivariateKde from cgpm.uncorrelated.linear import Linear from cgpm.utils import general as gu from cgpm.utils import test...
true
true
1c05889f6c6760430da39420ff899c44fdc47c2d
6,492
py
Python
nengo/tests/test_config.py
hunse/nengo
5fcd7b18aa9496e5c47c38c6408430cd9f68a720
[ "BSD-2-Clause" ]
null
null
null
nengo/tests/test_config.py
hunse/nengo
5fcd7b18aa9496e5c47c38c6408430cd9f68a720
[ "BSD-2-Clause" ]
null
null
null
nengo/tests/test_config.py
hunse/nengo
5fcd7b18aa9496e5c47c38c6408430cd9f68a720
[ "BSD-2-Clause" ]
null
null
null
import pytest import nengo import nengo.synapses from nengo.params import Parameter def test_config_basic(): model = nengo.Network() model.config[nengo.Ensemble].set_param('something', Parameter(None)) model.config[nengo.Ensemble].set_param('other', Parameter(default=0)) model.config[nengo.Connection...
34.531915
79
0.643715
import pytest import nengo import nengo.synapses from nengo.params import Parameter def test_config_basic(): model = nengo.Network() model.config[nengo.Ensemble].set_param('something', Parameter(None)) model.config[nengo.Ensemble].set_param('other', Parameter(default=0)) model.config[nengo.Connection...
true
true
1c0588cb80cf736b70062b9ff1f1a6c0cedbcfe9
5,807
py
Python
event_driven/darknet_orig.py
shovan777/landzone_detect_navigate
0ed58885ac2bd88a0b33c2ce0fab62504ce7c736
[ "MIT" ]
null
null
null
event_driven/darknet_orig.py
shovan777/landzone_detect_navigate
0ed58885ac2bd88a0b33c2ce0fab62504ce7c736
[ "MIT" ]
null
null
null
event_driven/darknet_orig.py
shovan777/landzone_detect_navigate
0ed58885ac2bd88a0b33c2ce0fab62504ce7c736
[ "MIT" ]
2
2020-05-22T15:59:28.000Z
2020-11-02T14:16:42.000Z
# Copyright (c) Prokura Innovations. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. from ctypes import * import math import random import numpy as np import cv2 def sample(probs): s = sum(probs) probs = [a/s for a in probs] r ...
28.605911
101
0.619597
from ctypes import * import math import random import numpy as np import cv2 def sample(probs): s = sum(probs) probs = [a/s for a in probs] r = random.uniform(0, 1) for i in range(len(probs)): r = r - probs[i] if r <= 0: return i return len(probs)-1 def c_array(cty...
false
true
1c058a85f42314f582e018024f5aa1a4021690bd
11,035
py
Python
python/onshape_client/oas/models/bt_parameter_spec_foreign_id172.py
toebes/onshape-clients
a26cf6a77cfc7901321e603d5a097e23eb51e35c
[ "MIT" ]
14
2019-06-23T08:47:41.000Z
2021-11-29T16:28:45.000Z
python/onshape_client/oas/models/bt_parameter_spec_foreign_id172.py
toebes/onshape-clients
a26cf6a77cfc7901321e603d5a097e23eb51e35c
[ "MIT" ]
40
2019-05-22T14:39:46.000Z
2022-03-10T10:36:17.000Z
python/onshape_client/oas/models/bt_parameter_spec_foreign_id172.py
toebes/onshape-clients
a26cf6a77cfc7901321e603d5a097e23eb51e35c
[ "MIT" ]
24
2019-06-02T01:03:41.000Z
2022-03-29T13:25:36.000Z
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: api-support@onshape.zendesk.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 im...
40.569853
131
0.624558
from __future__ import absolute_import import re import sys import six import nulltype from onshape_client.oas.model_utils import ( ModelComposed, ModelNormal, ModelSimple, date, datetime, file_type, int, none_type, str, validate_get_composed_info, ) try: from onsh...
true
true
1c058afda4594dba073d2fbcb23a189a1ec65884
3,509
py
Python
pbtranscript/tasks/gather_consensus_isoforms_of_cluster_bins.py
ylipacbio/pbtranscript
6b4ef164f191ffd4201feb62b951d9eeac3315b6
[ "BSD-3-Clause" ]
null
null
null
pbtranscript/tasks/gather_consensus_isoforms_of_cluster_bins.py
ylipacbio/pbtranscript
6b4ef164f191ffd4201feb62b951d9eeac3315b6
[ "BSD-3-Clause" ]
null
null
null
pbtranscript/tasks/gather_consensus_isoforms_of_cluster_bins.py
ylipacbio/pbtranscript
6b4ef164f191ffd4201feb62b951d9eeac3315b6
[ "BSD-3-Clause" ]
1
2021-02-26T10:08:09.000Z
2021-02-26T10:08:09.000Z
""" Combine consensus isoforms of all cluster bins. """ import logging import os.path as op import sys from pbcommand.pb_io.common import load_pipeline_chunks_from_json from pbcommand.models import get_gather_pbparser, FileTypes from pbcommand.cli import pbparser_runner from pbcommand.utils import setup_log from pbco...
33.740385
95
0.668567
import logging import os.path as op import sys from pbcommand.pb_io.common import load_pipeline_chunks_from_json from pbcommand.models import get_gather_pbparser, FileTypes from pbcommand.cli import pbparser_runner from pbcommand.utils import setup_log from pbcoretools.chunking.gather import get_datum_from_chunks_by_...
true
true
1c058c5254233c36f61e5aab80d1f9f26f03111f
7,670
py
Python
glimmer/processing/__init__.py
phip123/glimmer
5e7e1ac22379e69e869afa1d83a3c0d92ef91e7f
[ "MIT" ]
1
2020-02-27T12:03:31.000Z
2020-02-27T12:03:31.000Z
glimmer/processing/__init__.py
phip123/glimmer
5e7e1ac22379e69e869afa1d83a3c0d92ef91e7f
[ "MIT" ]
null
null
null
glimmer/processing/__init__.py
phip123/glimmer
5e7e1ac22379e69e869afa1d83a3c0d92ef91e7f
[ "MIT" ]
null
null
null
import abc import multiprocessing from typing import TypeVar, Generic, Dict, List, Callable from glimmer.util.context import Context Result = TypeVar("Result") In = TypeVar("In") Out = TypeVar("Out") A = TypeVar("A") B = TypeVar("B") C = TypeVar("C") class InvalidTopologyError(Exception): """Exception raised in...
26.267123
108
0.612647
import abc import multiprocessing from typing import TypeVar, Generic, Dict, List, Callable from glimmer.util.context import Context Result = TypeVar("Result") In = TypeVar("In") Out = TypeVar("Out") A = TypeVar("A") B = TypeVar("B") C = TypeVar("C") class InvalidTopologyError(Exception): def __init__(self, me...
true
true
1c058c9b2a33fe6709a6a1a7a709dcd49087e3c6
2,482
py
Python
tests/test_rw_minio.py
gva-jjoyce/mabel
eb99e02d0287b851e65ad9a75b5f4188805d4ec9
[ "Apache-2.0" ]
null
null
null
tests/test_rw_minio.py
gva-jjoyce/mabel
eb99e02d0287b851e65ad9a75b5f4188805d4ec9
[ "Apache-2.0" ]
2
2022-01-24T14:56:42.000Z
2022-01-24T16:04:20.000Z
tests/test_rw_minio.py
gva-jjoyce/mabel
eb99e02d0287b851e65ad9a75b5f4188805d4ec9
[ "Apache-2.0" ]
null
null
null
import os import sys sys.path.insert(1, os.path.join(sys.path[0], "..")) from mabel.adapters.minio import MinIoWriter, MinIoReader from mabel.operators.minio import MinIoBatchWriterOperator from mabel.data import BatchWriter from mabel.data import Reader from rich import traceback traceback.install() BUCKET_NAME = ...
25.587629
67
0.651491
import os import sys sys.path.insert(1, os.path.join(sys.path[0], "..")) from mabel.adapters.minio import MinIoWriter, MinIoReader from mabel.operators.minio import MinIoBatchWriterOperator from mabel.data import BatchWriter from mabel.data import Reader from rich import traceback traceback.install() BUCKET_NAME = ...
true
true
1c058d10b29dfe095c42d1f08adced1d15ec0e58
11,651
py
Python
twitter_stream.py
electromama/twitter-stream.py
423b90e4289a23fea48090ef66fb10d5db0269de
[ "MIT" ]
1
2021-02-20T04:19:39.000Z
2021-02-20T04:19:39.000Z
twitter_stream.py
tangent-tz/twitter-stream.py
4a58899ed3c9f30b0523d44547238907713f39cb
[ "MIT" ]
null
null
null
twitter_stream.py
tangent-tz/twitter-stream.py
4a58899ed3c9f30b0523d44547238907713f39cb
[ "MIT" ]
null
null
null
import json import os import requests import yaml from requests_oauthlib import OAuth1 from functools import wraps def auth(filename="~/.twitter-keys.yaml"): def inner_function(func): @wraps(func) def wrapper(args, **kwargs): try: with open(os.path.expanduser(filename...
28.417073
88
0.530598
import json import os import requests import yaml from requests_oauthlib import OAuth1 from functools import wraps def auth(filename="~/.twitter-keys.yaml"): def inner_function(func): @wraps(func) def wrapper(args, **kwargs): try: with open(os.path.expanduser(filename...
true
true
1c058d74b59c937421777d8a52def2225f8ff4f8
1,912
py
Python
regcore/models.py
ascott1/regulations-core
030efa7ac25876463d7e4604b56aa4160275f9e0
[ "CC0-1.0" ]
1
2019-12-29T17:52:27.000Z
2019-12-29T17:52:27.000Z
regcore/models.py
ascott1/regulations-core
030efa7ac25876463d7e4604b56aa4160275f9e0
[ "CC0-1.0" ]
null
null
null
regcore/models.py
ascott1/regulations-core
030efa7ac25876463d7e4604b56aa4160275f9e0
[ "CC0-1.0" ]
null
null
null
from django.db import models from regcore.fields import CompressedJSONField class Regulation(models.Model): version = models.SlugField(max_length=20) label_string = models.SlugField(max_length=200) text = models.TextField() title = models.TextField(blank=True) node_type = models.SlugField(max_len...
32.40678
79
0.695084
from django.db import models from regcore.fields import CompressedJSONField class Regulation(models.Model): version = models.SlugField(max_length=20) label_string = models.SlugField(max_length=200) text = models.TextField() title = models.TextField(blank=True) node_type = models.SlugField(max_len...
true
true
1c058f047b2c35ceac0c6accc9d4c6706a062f67
2,001
py
Python
xnmt/specialized_encoders/segmenting_encoder/priors.py
esalesky/xnmt-devel
90598d7cc8d22a7167acf88e29df81e130fc64fc
[ "Apache-2.0" ]
4
2020-07-20T08:53:32.000Z
2020-11-25T21:21:23.000Z
xnmt/specialized_encoders/segmenting_encoder/priors.py
esalesky/xnmt-devel
90598d7cc8d22a7167acf88e29df81e130fc64fc
[ "Apache-2.0" ]
null
null
null
xnmt/specialized_encoders/segmenting_encoder/priors.py
esalesky/xnmt-devel
90598d7cc8d22a7167acf88e29df81e130fc64fc
[ "Apache-2.0" ]
1
2020-09-04T07:19:10.000Z
2020-09-04T07:19:10.000Z
""" Priors classes that wraps us some probability distribution that can be used to draw samples and calculate the probability of an event. Supports 2 methods: - log_ll: Returns the log likelihood of an event (occurence) - sample: Draw samples with a size (batch_size x size) """ import math import numpy as np from...
27.410959
82
0.731634
import math import numpy as np from scipy.stats import poisson from xnmt.persistence import serializable_init, Serializable from xnmt.events import register_xnmt_handler, handle_xnmt_event class Prior(object): def log_ll(self, event): raise NotImplementedError() def sample(self, size): raise NotImplementedError(...
true
true
1c058fea1bf8c25f60f7edb9db5e84ec0e31cc77
3,456
py
Python
src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/_util.py
v-Ajnava/azure-cli
febec631d79bfca151e84267b5b409594bad598e
[ "MIT" ]
null
null
null
src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/_util.py
v-Ajnava/azure-cli
febec631d79bfca151e84267b5b409594bad598e
[ "MIT" ]
3
2021-03-26T00:48:20.000Z
2022-03-29T22:05:39.000Z
src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/_util.py
v-Ajnava/azure-cli
febec631d79bfca151e84267b5b409594bad598e
[ "MIT" ]
1
2017-12-28T04:51:44.000Z
2017-12-28T04:51:44.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
34.217822
94
0.792245
def get_sql_management_client(_): from azure.cli.core.commands.client_factory import get_mgmt_service_client from azure.mgmt.sql import SqlManagementClient from msrest.authentication import Authentication from os import getenv sql_rm_override = getenv('_AZURE_CLI_SQL_RM_URI') if s...
true
true
1c059015f1e1dbadcc7b6e33960b334e5d64a745
15,837
py
Python
my_plugins/YouCompleteMe/third_party/ycmd/ycmd/tests/clang/diagnostics_test.py
liutongliang/myVim
6c7ab36f25f4a5e2e1daeab8c43509975eb031e3
[ "MIT" ]
2
2018-04-16T03:08:42.000Z
2021-01-06T10:21:49.000Z
my_plugins/YouCompleteMe/third_party/ycmd/ycmd/tests/clang/diagnostics_test.py
liutongliang/myVim
6c7ab36f25f4a5e2e1daeab8c43509975eb031e3
[ "MIT" ]
null
null
null
my_plugins/YouCompleteMe/third_party/ycmd/ycmd/tests/clang/diagnostics_test.py
liutongliang/myVim
6c7ab36f25f4a5e2e1daeab8c43509975eb031e3
[ "MIT" ]
null
null
null
# Copyright (C) 2015 ycmd contributors # # This file is part of ycmd. # # ycmd 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 3 of the License, or # (at your option) any later version. # # ycmd...
34.058065
79
0.555977
from __future__ import absolute_import from __future__ import unicode_literals from __future__ import print_function from __future__ import division from builtins import * # noqa from hamcrest import ( assert_that, contains, contains_inanyorder, co...
true
true
1c0591a9ecffee0813b8ebd0232e2a47b2c32628
14,103
py
Python
examples/lightning_base.py
MaxatTezekbayev/transformers
47298757a390afa8b4b2c96fbd285737c63e66af
[ "Apache-2.0" ]
3
2020-12-22T07:15:00.000Z
2021-06-13T17:24:40.000Z
examples/lightning_base.py
MaxatTezekbayev/transformers
47298757a390afa8b4b2c96fbd285737c63e66af
[ "Apache-2.0" ]
null
null
null
examples/lightning_base.py
MaxatTezekbayev/transformers
47298757a390afa8b4b2c96fbd285737c63e66af
[ "Apache-2.0" ]
1
2021-03-22T14:50:59.000Z
2021-03-22T14:50:59.000Z
import argparse import logging import os from pathlib import Path from typing import Any, Dict import pytorch_lightning as pl from pytorch_lightning.utilities import rank_zero_info from transformers import ( AdamW, AutoConfig, AutoModel, AutoModelForPreTraining, AutoModelForQuestionAnswering, ...
38.219512
119
0.64972
import argparse import logging import os from pathlib import Path from typing import Any, Dict import pytorch_lightning as pl from pytorch_lightning.utilities import rank_zero_info from transformers import ( AdamW, AutoConfig, AutoModel, AutoModelForPreTraining, AutoModelForQuestionAnswering, ...
true
true
1c0591fbeaa3c99a4d476554266815bcd3fd8171
45,552
py
Python
demonstrations/learning2learn.py
jamesellis1999/qml
33c9d66712b36861dc098f9c789ba2c3ab897fdb
[ "Apache-2.0" ]
216
2020-08-01T03:18:37.000Z
2022-03-25T06:17:52.000Z
demonstrations/learning2learn.py
jamesellis1999/qml
33c9d66712b36861dc098f9c789ba2c3ab897fdb
[ "Apache-2.0" ]
173
2020-08-05T09:24:15.000Z
2022-03-30T13:37:05.000Z
demonstrations/learning2learn.py
jamesellis1999/qml
33c9d66712b36861dc098f9c789ba2c3ab897fdb
[ "Apache-2.0" ]
66
2020-08-01T05:02:45.000Z
2022-03-02T19:34:54.000Z
r""" Learning to learn with quantum neural networks ============================================== .. meta:: :property="og:description": Use a classical recurrent neural network to initilize the parameters of a variational quatum algorithm. :property="og:image": ../demonstrations/learning2learn/thumbnail.png ...
38.60339
163
0.622739
import pennylane as qml from pennylane import qaoa import tensorflow as tf import networkx as nx import numpy as np import matplotlib.pyplot as plt import random random.seed(42) np.random.seed(42) tf.random.set_seed(42) def generate_graphs(n_graphs, n_nodes, p_edge): datapoints = [] for _ in range(n_...
true
true
1c05944c42d25535bae08c3aabe2ba28b235d07b
123,478
py
Python
Lib/test/test_asyncio/test_tasks.py
StevenHsuYL/cpython
cf96c279ac960f2a5025e2ac887f9b932a4f1474
[ "0BSD" ]
null
null
null
Lib/test/test_asyncio/test_tasks.py
StevenHsuYL/cpython
cf96c279ac960f2a5025e2ac887f9b932a4f1474
[ "0BSD" ]
null
null
null
Lib/test/test_asyncio/test_tasks.py
StevenHsuYL/cpython
cf96c279ac960f2a5025e2ac887f9b932a4f1474
[ "0BSD" ]
null
null
null
"""Tests for tasks.py.""" import collections import contextlib import contextvars import functools import gc import io import random import re import sys import textwrap import traceback import types import unittest import weakref from unittest import mock import asyncio from asyncio import coroutines from asyncio im...
32.434463
105
0.586939
import collections import contextlib import contextvars import functools import gc import io import random import re import sys import textwrap import traceback import types import unittest import weakref from unittest import mock import asyncio from asyncio import coroutines from asyncio import futures from asyncio ...
true
true
1c05944ea83355b61d9bbefda3cfb154554d4f7a
24,112
py
Python
sirepo/template/warpvnd.py
bsmith39/CS595Project
96f4930ea2974f219432ab8b3e7f585b5554b367
[ "Apache-2.0" ]
null
null
null
sirepo/template/warpvnd.py
bsmith39/CS595Project
96f4930ea2974f219432ab8b3e7f585b5554b367
[ "Apache-2.0" ]
null
null
null
sirepo/template/warpvnd.py
bsmith39/CS595Project
96f4930ea2974f219432ab8b3e7f585b5554b367
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- u"""Warp VND/WARP execution template. :copyright: Copyright (c) 2017 RadiaSoft LLC. All Rights Reserved. :license: http://www.apache.org/licenses/LICENSE-2.0.html """ from __future__ import absolute_import, division, print_function from pykern import pkcollections from pykern import pkio from...
37.152542
145
0.619235
from __future__ import absolute_import, division, print_function from pykern import pkcollections from pykern import pkio from pykern.pkdebug import pkdc, pkdp, pkdlog from rswarp.cathode import sources from rswarp.utilities.file_utils import readparticles from scipy import constants from sirepo import simulation_db f...
true
true
1c059493f01a7452bc6e6c33f0f5c01286a76cde
30,507
py
Python
tests/test_ignore_order.py
dtorres-sf/deepdiff
1dd0aecbc8307842e54ce429ddb254ef4bc97724
[ "MIT" ]
null
null
null
tests/test_ignore_order.py
dtorres-sf/deepdiff
1dd0aecbc8307842e54ce429ddb254ef4bc97724
[ "MIT" ]
1
2021-10-31T13:38:35.000Z
2021-10-31T13:38:35.000Z
tests/test_ignore_order.py
dtorres-sf/deepdiff
1dd0aecbc8307842e54ce429ddb254ef4bc97724
[ "MIT" ]
1
2021-10-31T12:22:14.000Z
2021-10-31T12:22:14.000Z
import pytest from unittest import mock from deepdiff.helper import number_to_string, CannotCompare from deepdiff import DeepDiff from decimal import Decimal from deepdiff.deephash import sha256hex from tests import CustomClass2 class TestIgnoreOrder: @pytest.mark.parametrize("t1, t2, significant_digits, ignore_...
32.767991
278
0.442325
import pytest from unittest import mock from deepdiff.helper import number_to_string, CannotCompare from deepdiff import DeepDiff from decimal import Decimal from deepdiff.deephash import sha256hex from tests import CustomClass2 class TestIgnoreOrder: @pytest.mark.parametrize("t1, t2, significant_digits, ignore_...
true
true
1c0595c24d207163dd9dc1e5c30b9e8aab952879
57,539
py
Python
python/ccxt/async_support/bitfinex2.py
Huangyi5458/ccxt
1e01d03dac18633eb73998d7cb279535395368e9
[ "MIT" ]
null
null
null
python/ccxt/async_support/bitfinex2.py
Huangyi5458/ccxt
1e01d03dac18633eb73998d7cb279535395368e9
[ "MIT" ]
null
null
null
python/ccxt/async_support/bitfinex2.py
Huangyi5458/ccxt
1e01d03dac18633eb73998d7cb279535395368e9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.bitfinex import bitfinex import hashlib import math from ccxt.base.errors import ExchangeError from ccxt.base.error...
41.365205
207
0.459393
from ccxt.async_support.bitfinex import bitfinex import hashlib import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import ArgumentsRequired from ccxt.base.errors import BadRequest from ccxt.base.errors import BadSymbol from ccxt.base.errors im...
true
true
1c05961b8faa53b5a5ea23ee93398b556910e7e4
11,663
py
Python
game.py
Abhiseksah/Tic-tak-toe-3
cddeb5405f5629446711eb07c962ce6da9fafdc6
[ "MIT" ]
null
null
null
game.py
Abhiseksah/Tic-tak-toe-3
cddeb5405f5629446711eb07c962ce6da9fafdc6
[ "MIT" ]
null
null
null
game.py
Abhiseksah/Tic-tak-toe-3
cddeb5405f5629446711eb07c962ce6da9fafdc6
[ "MIT" ]
null
null
null
from tkinter import * from tkinter import messagebox import os import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText #---------------- import mysql.connector #------------------ import matplotlib.pyplot as plt import numpy as np #--------------------- mydb=mysql.connector.c...
22.13093
130
0.626425
from tkinter import * from tkinter import messagebox import os import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText import mysql.connector import matplotlib.pyplot as plt import numpy as np mydb=mysql.connector.connect(host="localhost",user="root",passwd="abhi",database="t...
true
true
1c059837c8b00b603d2682751d5ea4847f917b1f
12,642
py
Python
liberaforms/views/site.py
tomberek/liberaforms
5830acea9d456208ae612c6c548eb35c2d3c4106
[ "MIT" ]
3
2021-09-02T16:45:42.000Z
2022-02-21T19:06:25.000Z
liberaforms/views/site.py
tomberek/liberaforms
5830acea9d456208ae612c6c548eb35c2d3c4106
[ "MIT" ]
2
2021-08-17T04:13:10.000Z
2021-09-14T22:48:21.000Z
liberaforms/views/site.py
tomberek/liberaforms
5830acea9d456208ae612c6c548eb35c2d3c4106
[ "MIT" ]
1
2021-08-17T07:13:15.000Z
2021-08-17T07:13:15.000Z
""" This file is part of LiberaForms. # SPDX-FileCopyrightText: 2020 LiberaForms.org # SPDX-License-Identifier: AGPL-3.0-or-later """ import os, json import mimetypes from flask import g, request, render_template, redirect from flask import Blueprint, current_app from flask import session, flash from flask_babel impo...
36.857143
104
0.656304
import os, json import mimetypes from flask import g, request, render_template, redirect from flask import Blueprint, current_app from flask import session, flash from flask_babel import gettext as _ from liberaforms.models.site import Site from liberaforms.models.invite import Invite from liberaforms.models.user imp...
true
true
1c0598fb6dc38e477d87ceb864e555d7dfb6c897
8,942
py
Python
release/scripts/startup/bl_ui/properties_physics_rigidbody.py
naetherm/Bforartists
4d78856b76544b9eeb49e7dd388b4cf41d58d7e4
[ "Naumen", "Condor-1.1", "MS-PL" ]
3
2019-09-16T10:29:19.000Z
2022-02-11T14:43:18.000Z
engine/2.80/scripts/startup/bl_ui/properties_physics_rigidbody.py
byteinc/Phasor
f7d23a489c2b4bcc3c1961ac955926484ff8b8d9
[ "Unlicense" ]
null
null
null
engine/2.80/scripts/startup/bl_ui/properties_physics_rigidbody.py
byteinc/Phasor
f7d23a489c2b4bcc3c1961ac955926484ff8b8d9
[ "Unlicense" ]
null
null
null
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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. # # This program is distrib...
31.822064
110
0.669984
import bpy from bpy.types import ( Panel, ) def rigid_body_warning(layout): row = layout.row(align=True) row.alignment = 'RIGHT' row.label(text="Object does not have a Rigid Body") class PHYSICS_PT_rigidbody_panel: bl_space_type = 'PROPERTIES' bl_region_type = 'WINDOW' bl_context = "ph...
true
true
1c059adec3394abf039bf24fcd5d26e2ff0e24e1
4,534
py
Python
surrogate/selection/selDoubleTournament.py
liujiamingustc/phd
4f815a738abad43531d02ac66f5bd0d9a1def52a
[ "Apache-2.0" ]
3
2021-01-06T03:01:18.000Z
2022-03-21T03:02:55.000Z
surrogate/selection/selDoubleTournament.py
liujiamingustc/phd
4f815a738abad43531d02ac66f5bd0d9a1def52a
[ "Apache-2.0" ]
null
null
null
surrogate/selection/selDoubleTournament.py
liujiamingustc/phd
4f815a738abad43531d02ac66f5bd0d9a1def52a
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Quan Pan # # 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, s...
44.019417
97
0.697177
import random from functools import partial from operator import attrgetter from .selRandom import selRandom def selDoubleTournament(individuals, k=2, fitness_size=1, parsimony_size=1, fitness_first=True): assert (1 <= parsimony_size <= 2), "Parsimony tournament size has to be in the range [1, 2]." def _siz...
true
true
1c059b557b5c9038023ce500457daec407e4f450
789
py
Python
leetcode/setZeroes.py
KellyHwong/Algorithms
50cfc37c9b3694bb5ae9f13bb1e923e4f2142bca
[ "MIT" ]
3
2019-06-20T07:09:57.000Z
2019-07-01T07:04:46.000Z
leetcode/setZeroes.py
KellyHwong/Algorithms
50cfc37c9b3694bb5ae9f13bb1e923e4f2142bca
[ "MIT" ]
null
null
null
leetcode/setZeroes.py
KellyHwong/Algorithms
50cfc37c9b3694bb5ae9f13bb1e923e4f2142bca
[ "MIT" ]
1
2019-11-22T07:36:28.000Z
2019-11-22T07:36:28.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2019-06-06 02:03:55 # @Author : Your Name (you@example.org) # @Link : http://example.org # @Version : $Id$ import os class Solution: def setZeroes(self, matrix: list) -> None: """ Do not return anything, modify matrix in-place instead...
19.243902
63
0.557668
import os class Solution: def setZeroes(self, matrix: list) -> None: matrix = 0 class TestCase(object): def __init__(self, input, output): self.input = input self.output = output def main(): matrix = [[1, 2, 0], [4, 5, 6]] zero_loc = (0, 2) for j in range(len(matrix[...
true
true
1c059b7a9833cb0d867cf6ed1cc71e733fdc6dcb
1,591
py
Python
nova/tests/functional/api_sample_tests/test_suspend_server.py
zjzh/nova
7bb21723171c59b93e28f5d508c2b6df39220f13
[ "Apache-2.0" ]
1,874
2015-01-04T05:18:34.000Z
2022-03-31T03:30:28.000Z
nova/tests/functional/api_sample_tests/test_suspend_server.py
woraser/nova
fc3890667e4971e3f0f35ac921c2a6c25f72adec
[ "Apache-2.0" ]
132
2017-03-27T11:31:52.000Z
2022-03-30T08:45:02.000Z
nova/tests/functional/api_sample_tests/test_suspend_server.py
woraser/nova
fc3890667e4971e3f0f35ac921c2a6c25f72adec
[ "Apache-2.0" ]
1,996
2015-01-04T15:11:51.000Z
2022-03-31T11:03:13.000Z
# Copyright 2013 IBM Corp. # # 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 t...
38.804878
78
0.675676
from nova.tests.functional.api_sample_tests import test_servers class SuspendServerSamplesJsonTest(test_servers.ServersSampleBase): sample_dir = "os-suspend-server" def setUp(self): super(SuspendServerSamplesJsonTest, self).setUp() self.uuid = self._post_server() def test_post_suspend(s...
true
true
1c059ba824ec78aa949f5f08a1881825f66ea950
846
py
Python
casbin/util/expression.py
spravesh1818/asynccasbin
7bf45a9e6a356e606a6ef485feca5eb9702309e4
[ "Apache-2.0" ]
20
2021-07-23T18:18:56.000Z
2022-03-23T08:37:26.000Z
casbin/util/expression.py
spravesh1818/asynccasbin
7bf45a9e6a356e606a6ef485feca5eb9702309e4
[ "Apache-2.0" ]
null
null
null
casbin/util/expression.py
spravesh1818/asynccasbin
7bf45a9e6a356e606a6ef485feca5eb9702309e4
[ "Apache-2.0" ]
3
2021-08-02T11:54:30.000Z
2021-09-22T03:13:45.000Z
from casbin.simpleeval.simpleeval import SimpleEval import ast class SimpleEval(SimpleEval): """Rewrite SimpleEval. >>> s = SimpleEval("20 + 30 - ( 10 * 5)") >>> s.eval() 0 """ ast_parsed_value = None def __init__(self, expr, functions=None): """Create the evaluator instance. Se...
28.2
76
0.613475
from casbin.simpleeval.simpleeval import SimpleEval import ast class SimpleEval(SimpleEval): ast_parsed_value = None def __init__(self, expr, functions=None): super(SimpleEval, self).__init__(functions=functions) if expr != "": self.expr = expr self.expr_parsed_value ...
true
true
1c059bb48c1b59a84f11e9b38d77e2ec1a54d693
19,073
py
Python
linepy/talk.py
light-technology/line-selfbot-sms
993b14aee37652f4e45e8ae1c61dead0d1a678e0
[ "MIT" ]
null
null
null
linepy/talk.py
light-technology/line-selfbot-sms
993b14aee37652f4e45e8ae1c61dead0d1a678e0
[ "MIT" ]
null
null
null
linepy/talk.py
light-technology/line-selfbot-sms
993b14aee37652f4e45e8ae1c61dead0d1a678e0
[ "MIT" ]
3
2021-04-12T07:16:16.000Z
2021-08-14T09:02:04.000Z
# -*- coding: utf-8 -*- from akad.ttypes import Message from random import randint import json, ntpath def loggedIn(func): def checkLogin(*args, **kwargs): if args[0].isLogin: return func(*args, **kwargs) else: args[0].callback.other('You want to call the function, you must...
33.402802
154
0.652808
from akad.ttypes import Message from random import randint import json, ntpath def loggedIn(func): def checkLogin(*args, **kwargs): if args[0].isLogin: return func(*args, **kwargs) else: args[0].callback.other('You want to call the function, you must login to LINE') ret...
true
true
1c059c929a8820e9cf6a349dffa15f1feda96286
6,998
py
Python
data/external/repositories_2to3/161279/otto_2015-master/otto-py/model.nnc.stack.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
null
null
null
data/external/repositories_2to3/161279/otto_2015-master/otto-py/model.nnc.stack.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
null
null
null
data/external/repositories_2to3/161279/otto_2015-master/otto-py/model.nnc.stack.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
1
2019-12-04T08:23:33.000Z
2019-12-04T08:23:33.000Z
import numpy as np import pandas as pd from sklearn.preprocessing import LabelEncoder from sklearn.preprocessing import StandardScaler from sklearn import feature_extraction from sklearn.cross_validation import StratifiedKFold from lasagne.layers import DenseLayer from lasagne.layers import InputLayer from lasa...
38.450549
161
0.600743
import numpy as np import pandas as pd from sklearn.preprocessing import LabelEncoder from sklearn.preprocessing import StandardScaler from sklearn import feature_extraction from sklearn.cross_validation import StratifiedKFold from lasagne.layers import DenseLayer from lasagne.layers import InputLayer from lasa...
true
true
1c059e0ece8de4515cbe41d6a91d9296a4e59319
7,419
py
Python
python_files/hadoop_conf.py
YashIndane/Web-Menu
2b33a51cb0bcd98fec9cdadcfd48fc3e54a1d6de
[ "MIT" ]
2
2020-10-09T09:48:25.000Z
2020-11-19T18:16:12.000Z
python_files/hadoop_conf.py
YashIndane/Web-Menu
2b33a51cb0bcd98fec9cdadcfd48fc3e54a1d6de
[ "MIT" ]
2
2021-07-13T07:57:22.000Z
2021-09-24T16:59:55.000Z
python_files/hadoop_conf.py
YashIndane/Web-Menu
2b33a51cb0bcd98fec9cdadcfd48fc3e54a1d6de
[ "MIT" ]
1
2021-05-28T08:00:27.000Z
2021-05-28T08:00:27.000Z
#!/usr/bin/python3 import subprocess as spb def putFiles(FILE , ip_) : sc = spb.getstatusoutput(f'ssh {ip_} rm /etc/hadoop/{FILE}.xml') sc = spb.getstatusoutput(f'scp {FILE}.xml {ip_}:/etc/hadoop') sc = spb.getstatusoutput(f'rm {FILE}.xml') def buildNode(mode , IP , PORT , IP2 = 'none', ...
34.995283
130
0.467988
import subprocess as spb def putFiles(FILE , ip_) : sc = spb.getstatusoutput(f'ssh {ip_} rm /etc/hadoop/{FILE}.xml') sc = spb.getstatusoutput(f'scp {FILE}.xml {ip_}:/etc/hadoop') sc = spb.getstatusoutput(f'rm {FILE}.xml') def buildNode(mode , IP , PORT , IP2 = 'none', file_='none' , filem...
true
true
1c059e66bac7953d841fd8f2fe20fec82ec6f7f5
931
py
Python
src/database.py
omerdeger/airquality
087532340243f3c62612cc673b07252e9c54b9a3
[ "MIT" ]
null
null
null
src/database.py
omerdeger/airquality
087532340243f3c62612cc673b07252e9c54b9a3
[ "MIT" ]
null
null
null
src/database.py
omerdeger/airquality
087532340243f3c62612cc673b07252e9c54b9a3
[ "MIT" ]
null
null
null
from sqlalchemy import Column, Integer, String from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import Session Base = declarative_base() engine = create_engine("sqlite:///src/data.sqlite3") session = Session(bind=engine) class Station(Base): __table...
24.5
62
0.712137
from sqlalchemy import Column, Integer, String from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import Session Base = declarative_base() engine = create_engine("sqlite:///src/data.sqlite3") session = Session(bind=engine) class Station(Base): __table...
true
true
1c059f0dfec6fd9030d43ed3502532081dad11bf
738
py
Python
bookofnova/__init__.py
cloudnull/bookofnova
ca18e1a46dc1afd71789cf1a30580cea6a5867f7
[ "Apache-2.0" ]
1
2017-03-21T17:46:45.000Z
2017-03-21T17:46:45.000Z
bookofnova/__init__.py
cloudnull/bookofnova
ca18e1a46dc1afd71789cf1a30580cea6a5867f7
[ "Apache-2.0" ]
null
null
null
bookofnova/__init__.py
cloudnull/bookofnova
ca18e1a46dc1afd71789cf1a30580cea6a5867f7
[ "Apache-2.0" ]
null
null
null
# ============================================================================== # Copyright [2013] [Kevin Carter] # # 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/l...
49.2
80
0.596206
true
true
1c05a0496679636f788b0875d45bbae9bb433868
282
py
Python
Bronze/Bronze_IV/2480.py
masterTyper/baekjoon_solved_ac
b9ce14d9bdaa5b5b06735ad075fb827de9f44b9c
[ "MIT" ]
null
null
null
Bronze/Bronze_IV/2480.py
masterTyper/baekjoon_solved_ac
b9ce14d9bdaa5b5b06735ad075fb827de9f44b9c
[ "MIT" ]
null
null
null
Bronze/Bronze_IV/2480.py
masterTyper/baekjoon_solved_ac
b9ce14d9bdaa5b5b06735ad075fb827de9f44b9c
[ "MIT" ]
null
null
null
from collections import Counter dice = list(map(int, input().split())) counter = Counter(dice) for i in range(1, 7): if counter[i] == 3: print(10000 + i * 1000) if counter[i] == 2: print(1000 + i * 100) if len(set(dice)) == 3: print(max(dice) * 100)
18.8
38
0.570922
from collections import Counter dice = list(map(int, input().split())) counter = Counter(dice) for i in range(1, 7): if counter[i] == 3: print(10000 + i * 1000) if counter[i] == 2: print(1000 + i * 100) if len(set(dice)) == 3: print(max(dice) * 100)
true
true
1c05a0d284f43282f12f9dc93926f2865bc6fca5
2,094
py
Python
code/cifar10.py
modestyachts/CIFAR-10.1
d9982abb0bfc4846b8d13a11e66b887d946205d0
[ "MIT" ]
189
2018-06-06T18:13:08.000Z
2022-03-30T19:28:27.000Z
CIFAR_modified/code/cifar10.py
goel96vibhor/semisup-adv
30576066663e999d6ae9cc06fd5016d5886dd0b2
[ "MIT" ]
2
2019-02-21T08:28:50.000Z
2021-07-02T15:23:42.000Z
code/cifar10.py
modestyachts/CIFAR-10.1
d9982abb0bfc4846b8d13a11e66b887d946205d0
[ "MIT" ]
16
2018-06-06T21:16:05.000Z
2022-03-13T22:17:31.000Z
# Derived from https://github.com/jaberg/skdata/blob/master/skdata/cifar10/dataset.py from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import pickle import numpy as np class CIFAR10Data(object): def __init__(self, path): train_filenames = ['...
40.269231
110
0.69914
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import pickle import numpy as np class CIFAR10Data(object): def __init__(self, path): train_filenames = ['data_batch_{}'.format(ii + 1) for ii in range(5)] eval_filename = 'test_batch' ...
true
true
1c05a11d1cbb2130cdda3215a7cd8ddf6cb68885
25,321
py
Python
lasagne/updates.py
cancan101/Lasagne
9f591a5f3a192028df9947ba1e4903b3b46e8fe0
[ "MIT" ]
null
null
null
lasagne/updates.py
cancan101/Lasagne
9f591a5f3a192028df9947ba1e4903b3b46e8fe0
[ "MIT" ]
null
null
null
lasagne/updates.py
cancan101/Lasagne
9f591a5f3a192028df9947ba1e4903b3b46e8fe0
[ "MIT" ]
null
null
null
""" Functions to generate Theano update dictionaries for training. The update functions implement different methods to control the learning rate for use with stochastic gradient descent. Update functions take a loss expression or a list of gradient expressions and a list of parameters as input and return an ordered d...
34.638851
79
0.662612
from collections import OrderedDict import numpy as np import theano import theano.tensor as T from . import utils __all__ = [ "sgd", "apply_momentum", "momentum", "apply_nesterov_momentum", "nesterov_momentum", "adagrad", "rmsprop", "adadelta", "adam", "norm_constraint", ...
true
true
1c05a2f17d936406ad701076c4239b6c67d8c493
3,791
py
Python
data/external/repositories/137656/blundercheck-master/combine/contest_20150301a/modeling/fit_rfr_pgmodel.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
null
null
null
data/external/repositories/137656/blundercheck-master/combine/contest_20150301a/modeling/fit_rfr_pgmodel.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
null
null
null
data/external/repositories/137656/blundercheck-master/combine/contest_20150301a/modeling/fit_rfr_pgmodel.py
Keesiu/meta-kaggle
87de739aba2399fd31072ee81b391f9b7a63f540
[ "MIT" ]
1
2019-12-04T08:23:33.000Z
2019-12-04T08:23:33.000Z
#!/usr/bin/env python import sys, time import numpy as np import cPickle as pickle from pandas import * from sklearn.ensemble import RandomForestRegressor from sklearn.cross_validation import cross_val_score from sklearn.externals import joblib from sklearn.metrics import mean_absolute_error from sklearn import tree i...
32.127119
133
0.717225
import sys, time import numpy as np import cPickle as pickle from pandas import * from sklearn.ensemble import RandomForestRegressor from sklearn.cross_validation import cross_val_score from sklearn.externals import joblib from sklearn.metrics import mean_absolute_error from sklearn import tree import pygraphviz as pg...
false
true
1c05a3118b57833cac45a500f0d9100f1845949c
2,594
py
Python
code/py_game/space.py
mys-anusha/NISB-Rosetta-Code
42df74a6f3744820df06643cadf0e7f8d79b29da
[ "MIT" ]
4
2020-10-04T08:19:16.000Z
2021-10-31T03:27:49.000Z
code/py_game/space.py
mys-anusha/NISB-Rosetta-Code
42df74a6f3744820df06643cadf0e7f8d79b29da
[ "MIT" ]
8
2020-10-01T13:43:46.000Z
2021-10-31T15:39:34.000Z
code/py_game/space.py
mys-anusha/NISB-Rosetta-Code
42df74a6f3744820df06643cadf0e7f8d79b29da
[ "MIT" ]
35
2020-10-01T12:53:02.000Z
2021-10-31T03:29:10.000Z
import os import turtle import math #init screen wn=turtle.Screen() wn.bgcolor("black") wn.title("Space Invaders") wn.register_shape("space_invaders_background.gif") wn.bgpic("space_invaders_background.gif") wn.register_shape("invader.gif") wn.register_shape("player.gif") # Draw border borderPen=turtle.Turtle() borde...
18.013889
84
0.726677
import os import turtle import math wn=turtle.Screen() wn.bgcolor("black") wn.title("Space Invaders") wn.register_shape("space_invaders_background.gif") wn.bgpic("space_invaders_background.gif") wn.register_shape("invader.gif") wn.register_shape("player.gif") borderPen=turtle.Turtle() borderPen.speed(0) borderPen.col...
true
true
1c05a3ec72c87bce2cf86dee5188f6cdfe3d16a3
3,614
py
Python
sdk/python/pulumi_azure_nextgen/machinelearningservices/v20200515preview/list_machine_learning_compute_nodes.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/machinelearningservices/v20200515preview/list_machine_learning_compute_nodes.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/machinelearningservices/v20200515preview/list_machine_learning_compute_nodes.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
38.042105
195
0.682346
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs __all__ = [ 'ListMachineLearningComputeNodesResult', 'AwaitableListMachineLearningComputeNodesResult', 'list_machine_learning_compute_nod...
true
true
1c05a452eb64538468a0b0e91b5084eca08e4969
8,183
py
Python
transformers4rec/torch/features/tabular.py
zanussbaum/Transformers4Rec
8a755e04968293b75ef3f489f74ecd70d8833a9d
[ "Apache-2.0" ]
null
null
null
transformers4rec/torch/features/tabular.py
zanussbaum/Transformers4Rec
8a755e04968293b75ef3f489f74ecd70d8833a9d
[ "Apache-2.0" ]
null
null
null
transformers4rec/torch/features/tabular.py
zanussbaum/Transformers4Rec
8a755e04968293b75ef3f489f74ecd70d8833a9d
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2021, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
37.195455
98
0.667604
from typing import List, Optional, Tuple, Type, Union from merlin_standard_lib import Schema, Tag from merlin_standard_lib.schema.tag import TagsType from merlin_standard_lib.utils.doc_utils import docstring_parameter from ..block.base import SequentialBlock from ..block.mlp import MLPBlock from ..tabular.base impor...
true
true
1c05a5e22add0bc09a7d9d6125322faf1956609c
1,839
py
Python
tests/generators.py
ppedemon/fplib
61c221e967e924b3fd0a3014e80b331574d45f0c
[ "MIT" ]
null
null
null
tests/generators.py
ppedemon/fplib
61c221e967e924b3fd0a3014e80b331574d45f0c
[ "MIT" ]
null
null
null
tests/generators.py
ppedemon/fplib
61c221e967e924b3fd0a3014e80b331574d45f0c
[ "MIT" ]
null
null
null
import itertools import operator import random import string from fplib.ident import Id from fplib.list import List from fplib.maybe import (Just, Nothing) from fplib.reader import Reader from fplib.state import State def repeatfunc(func, times=None, *args): if times is None: return itertools.starmap(fun...
22.156627
78
0.685699
import itertools import operator import random import string from fplib.ident import Id from fplib.list import List from fplib.maybe import (Just, Nothing) from fplib.reader import Reader from fplib.state import State def repeatfunc(func, times=None, *args): if times is None: return itertools.starmap(fun...
true
true
1c05a5e329261b26c247883a596ecc5a516aecc8
680
py
Python
blog/migrations/0013_auto_20181117_1614.py
darkLord19/blog
16c3b72fef9d22ccfa606934c8b94fc0feb82103
[ "MIT" ]
3
2018-08-05T06:40:39.000Z
2019-05-30T23:17:06.000Z
blog/migrations/0013_auto_20181117_1614.py
darkLord19/blog
16c3b72fef9d22ccfa606934c8b94fc0feb82103
[ "MIT" ]
3
2021-06-09T17:24:09.000Z
2021-09-22T17:43:59.000Z
blog/migrations/0013_auto_20181117_1614.py
darkLord19/ublog
16c3b72fef9d22ccfa606934c8b94fc0feb82103
[ "MIT" ]
null
null
null
# Generated by Django 2.1.1 on 2018-11-17 10:44 import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [('blog', '0012_auto_20181116_1752')] operations = [ migrations.AlterField( model_name='po...
26.153846
87
0.597059
import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [('blog', '0012_auto_20181116_1752')] operations = [ migrations.AlterField( model_name='post', name='created_date', ...
true
true
1c05a64f870557e5bef442ffccd5ad6e143eab5c
1,384
py
Python
core/ezybaas/serializers.py
bhavik1st/ezybaas
796db38e06c9ab6ac53987d86fd1a40e9a75fc63
[ "Apache-2.0" ]
17
2021-02-01T13:30:54.000Z
2022-02-15T02:30:27.000Z
core/ezybaas/serializers.py
bhavik1st/django-ezybaas
796db38e06c9ab6ac53987d86fd1a40e9a75fc63
[ "Apache-2.0" ]
4
2021-01-15T12:20:36.000Z
2021-06-07T04:36:21.000Z
core/ezybaas/serializers.py
bhavik1st/django-ezybaas
796db38e06c9ab6ac53987d86fd1a40e9a75fc63
[ "Apache-2.0" ]
1
2022-02-15T02:30:37.000Z
2022-02-15T02:30:37.000Z
# Copyright (c) 2019 Ezybaas by Bhavik Shah. # CTO @ Susthitsoft Technologies Private Limited. # All rights reserved. # Please see the LICENSE.txt included as part of this package. from rest_framework import serializers from .models import MetaModel, App, Table, Config, DbSettings class VersionSerializer(serializers....
24.280702
117
0.734827
from rest_framework import serializers from .models import MetaModel, App, Table, Config, DbSettings class VersionSerializer(serializers.Serializer): name = serializers.CharField() author = serializers.CharField() version = serializers.CharField() releasenotes = serializers.CharField() releasedate = seria...
true
true
1c05a6d9b471606ea11a315f1b35789c15442478
686
py
Python
tests/query_runner/test_mql.py
solutionrooms/testredash
8decda0b55defd24fa627b24e7c5fcd377062617
[ "BSD-2-Clause" ]
1
2016-08-08T17:44:35.000Z
2016-08-08T17:44:35.000Z
tests/query_runner/test_mql.py
solutionrooms/testredash
8decda0b55defd24fa627b24e7c5fcd377062617
[ "BSD-2-Clause" ]
2
2017-05-03T21:08:26.000Z
2017-05-04T00:02:22.000Z
tests/query_runner/test_mql.py
solutionrooms/testredash
8decda0b55defd24fa627b24e7c5fcd377062617
[ "BSD-2-Clause" ]
1
2021-06-03T00:34:29.000Z
2021-06-03T00:34:29.000Z
from datetime import datetime from unittest import TestCase from redash.query_runner import TYPE_DATETIME, TYPE_INTEGER, TYPE_STRING from redash.query_runner.mql import deduce_columns class TestMQL(TestCase): def test_deduce_columns(self): self.assertEquals(deduce_columns([{'a': 1}]), ...
45.733333
87
0.612245
from datetime import datetime from unittest import TestCase from redash.query_runner import TYPE_DATETIME, TYPE_INTEGER, TYPE_STRING from redash.query_runner.mql import deduce_columns class TestMQL(TestCase): def test_deduce_columns(self): self.assertEquals(deduce_columns([{'a': 1}]), ...
true
true
1c05a6ff4e3852f683c4c2684fdfe64b22983ef3
36,310
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/_gallery_image_versions_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2021-09-07T18:39:05.000Z
2021-09-07T18:39:05.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/_gallery_image_versions_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/operations/_gallery_image_versions_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-03-04T06:21:56.000Z
2022-03-04T06:21:56.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.330836
247
0.682319
import functools from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline imp...
true
true
1c05a70d562292f1550c20f965792fa816a77684
5,229
py
Python
vivisect/notes/vivisect/impapi/posix_i386_generator_gnuorg.py
pombredanne/vivisect
0274ff1dee066ccb9c9f5072fb7ac7b98655f854
[ "ECL-2.0", "Apache-2.0" ]
716
2015-01-01T14:41:11.000Z
2022-03-28T06:51:50.000Z
vivisect/notes/vivisect/impapi/posix_i386_generator_gnuorg.py
pombredanne/vivisect
0274ff1dee066ccb9c9f5072fb7ac7b98655f854
[ "ECL-2.0", "Apache-2.0" ]
266
2015-01-01T15:07:27.000Z
2022-03-30T15:19:26.000Z
vivisect/notes/vivisect/impapi/posix_i386_generator_gnuorg.py
pombredanne/vivisect
0274ff1dee066ccb9c9f5072fb7ac7b98655f854
[ "ECL-2.0", "Apache-2.0" ]
159
2015-01-01T16:19:44.000Z
2022-03-21T21:55:34.000Z
import os import bs4 import pickle import requests import tempfile ''' Downloads lots of pages, parses, and pulls out function declarations for impapi (210409) One problem: 7 functions from "Waiting with Specific Clocks" page don't have all their arguments fit in the <dt> tags. Rather than rework the script that wor...
32.478261
147
0.542742
import os import bs4 import pickle import requests import tempfile BASE_URL = "https://www.gnu.org/software/libc/manual/html_node/" def getAllFrontUrls(sess): frontpage = sess.get(BASE_URL + 'Function-Index.html') soup = bs4.BeautifulSoup(frontpage.text) urls = [] for link in soup.find_all('a'): ...
true
true
1c05a7473fe7e55677ba76712a2b19fd2955f3ed
1,611
py
Python
zvt/recorders/emquantapi/finance/china_stock_finance_per_share.py
markqiu/zvt
1bcfb71279f2652c3600f0f8e45d941f98ceaa10
[ "MIT" ]
6
2020-09-03T10:02:00.000Z
2021-02-04T02:51:47.000Z
zvt/recorders/emquantapi/finance/china_stock_finance_per_share.py
markqiu/zvt
1bcfb71279f2652c3600f0f8e45d941f98ceaa10
[ "MIT" ]
null
null
null
zvt/recorders/emquantapi/finance/china_stock_finance_per_share.py
markqiu/zvt
1bcfb71279f2652c3600f0f8e45d941f98ceaa10
[ "MIT" ]
2
2020-07-08T04:15:40.000Z
2021-06-08T08:51:31.000Z
# -*- coding: utf-8 -*- from zvt.domain import FinancePerShare from zvt.recorders.emquantapi.finance.base_china_stock_finance_recorder import EmBaseChinaStockFinanceRecorder from zvt.utils.utils import add_func_to_value, first_item_to_float finance_per_share_map = { 'eps_diluted_end': 'EPSDILUTEDEND', # 每股收益(期末摊...
33.5625
110
0.727498
from zvt.domain import FinancePerShare from zvt.recorders.emquantapi.finance.base_china_stock_finance_recorder import EmBaseChinaStockFinanceRecorder from zvt.utils.utils import add_func_to_value, first_item_to_float finance_per_share_map = { 'eps_diluted_end': 'EPSDILUTEDEND', 'eps': 'EPSBASIC', 'dilut...
true
true
1c05a860adec0a95282f52148b350a0583d0375c
8,075
py
Python
formsgdownloader/formsg_driver.py
YongJieYongJie/form-sg-downloader
cefabe0338ac8e0a705993be02fc5c5a98e95ae0
[ "MIT" ]
null
null
null
formsgdownloader/formsg_driver.py
YongJieYongJie/form-sg-downloader
cefabe0338ac8e0a705993be02fc5c5a98e95ae0
[ "MIT" ]
null
null
null
formsgdownloader/formsg_driver.py
YongJieYongJie/form-sg-downloader
cefabe0338ac8e0a705993be02fc5c5a98e95ae0
[ "MIT" ]
null
null
null
"""This selenium module contains helper function for automation of FormSG at https://forms.gov.sg. Usage: Call `login()` with the relevant email address, and enter the one-time password when prompted. Subsequently, call the required functions such as `activate_form()`, passing in the required argument(s). Dat...
31.791339
161
0.647678
import datetime as dt import os import time from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.common.exceptions import NoSuchElementException, TimeoutException from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.we...
true
true
1c05a88bd3d0155de706e3b17a9b60d088861197
8,632
py
Python
trax/trainer_lib_test.py
modyharshit23/trax
2e6783a4674209b57482ec41e1c533a420aa6fe6
[ "Apache-2.0" ]
null
null
null
trax/trainer_lib_test.py
modyharshit23/trax
2e6783a4674209b57482ec41e1c533a420aa6fe6
[ "Apache-2.0" ]
null
null
null
trax/trainer_lib_test.py
modyharshit23/trax
2e6783a4674209b57482ec41e1c533a420aa6fe6
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2019 The Trax 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 a...
32.208955
80
0.685357
from __future__ import absolute_import from __future__ import division from __future__ import print_function import contextlib import functools import tempfile from absl.testing import parameterized from jax import test_util from jax.config import config from jax.lib import xla_bridge import tensorflow as tf from...
true
true
1c05a8d4c6776dff9ccd92fcdd85118f31d2866c
2,209
py
Python
audax/training_utils/data_v2/transforms.py
guptarohit/audax
ad11059145afce150a1af870bee41c38a786d303
[ "BSD-2-Clause" ]
null
null
null
audax/training_utils/data_v2/transforms.py
guptarohit/audax
ad11059145afce150a1af870bee41c38a786d303
[ "BSD-2-Clause" ]
null
null
null
audax/training_utils/data_v2/transforms.py
guptarohit/audax
ad11059145afce150a1af870bee41c38a786d303
[ "BSD-2-Clause" ]
null
null
null
""" Data transforms in tensorflow for the tf.data based datasets Kept separate from core audax (since it's tensorflow based) Written for audax by / Copyright 2022, Sarthak Yadav """ import tensorflow as tf def pad_waveform(waveform, seg_length=16000): padding = tf.maximum(seg_length - tf.shape(waveform)[0], 0) ...
35.629032
102
0.71254
import tensorflow as tf def pad_waveform(waveform, seg_length=16000): padding = tf.maximum(seg_length - tf.shape(waveform)[0], 0) left_pad = padding // 2 right_pad = padding - left_pad padded_waveform = tf.pad(waveform, paddings=[[left_pad, right_pad]]) return padded_waveform def random_crop_sig...
true
true
1c05a92154fcd63b6988ba0748c3acc4bfb55497
1,681
py
Python
fluent_pages/pagetypes/fluentpage/models.py
bashu/sigmacms-fluent-pages
04bee029cd581c11012cdb66dbf603218be23e66
[ "Apache-2.0" ]
null
null
null
fluent_pages/pagetypes/fluentpage/models.py
bashu/sigmacms-fluent-pages
04bee029cd581c11012cdb66dbf603218be23e66
[ "Apache-2.0" ]
null
null
null
fluent_pages/pagetypes/fluentpage/models.py
bashu/sigmacms-fluent-pages
04bee029cd581c11012cdb66dbf603218be23e66
[ "Apache-2.0" ]
null
null
null
from django.db import models from django.utils.translation import ugettext_lazy as _ from fluent_pages.models import PageLayout from fluent_pages.integration.fluent_contents.models import FluentContentsPage # This all exists for backwards compatibility # The new v0.9 method is using fluent_pages.integration.fluent_co...
42.025
125
0.730518
from django.db import models from django.utils.translation import ugettext_lazy as _ from fluent_pages.models import PageLayout from fluent_pages.integration.fluent_contents.models import FluentContentsPage class AbstractFluentPage(FluentContentsPage): layout = models.ForeignKey(PageLayout, verbose_name=_('La...
true
true
1c05a948fae2892e051da06d504db7bc8d04828f
20,551
py
Python
log_complete_bcl2/model_790.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_complete_bcl2/model_790.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_complete_bcl2/model_790.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
# exported from PySB model 'model' from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU', 'C3pro']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', '...
95.143519
798
0.804146
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU', 'C3pro']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', 'BaxA']) Monomer('Apop', ['C3pro', '...
true
true