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
08fb07a809d99c72fedda530d7fc9b8215aa3ac9
138,387
py
Python
salt/modules/vsphere.py
borgstrom/salt
2f732b5e8cd0b2a13f133d02f70aba3ee9fc0169
[ "Apache-2.0" ]
1
2017-11-21T16:57:27.000Z
2017-11-21T16:57:27.000Z
salt/salt/modules/vsphere.py
smallyear/linuxLearn
342e5020bf24b5fac732c4275a512087b47e578d
[ "Apache-2.0" ]
null
null
null
salt/salt/modules/vsphere.py
smallyear/linuxLearn
342e5020bf24b5fac732c4275a512087b47e578d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Manage VMware vCenter servers and ESXi hosts. .. versionadded:: 2015.8.4 Dependencies ============ - pyVmomi Python Module - ESXCLI pyVmomi ------- PyVmomi can be installed via pip: .. code-block:: bash pip install pyVmomi .. note:: Version 6.0 of pyVmomi has some problems w...
38.133646
115
0.586544
from __future__ import absolute_import import datetime import logging import salt.ext.six as six import salt.utils import salt.utils.vmware import salt.utils.http from salt.exceptions import CommandExecutionError try: from pyVmomi import vim, vmodl HAS_PYVMOMI = True except ImportError: HAS_PYVMOMI = Fal...
true
true
08fb08288aa08f2e0b4aa288ded825b3af3fe692
8,260
py
Python
third_party/skia_m63/third_party/externals/spirv-tools/utils/check_copyright.py
kniefliu/WindowsSamples
c841268ef4a0f1c6f89b8e95bf68058ea2548394
[ "MIT" ]
6
2018-10-20T10:53:55.000Z
2021-12-25T07:58:57.000Z
third_party/skia_m63/third_party/externals/spirv-tools/utils/check_copyright.py
kniefliu/WindowsSamples
c841268ef4a0f1c6f89b8e95bf68058ea2548394
[ "MIT" ]
null
null
null
third_party/skia_m63/third_party/externals/spirv-tools/utils/check_copyright.py
kniefliu/WindowsSamples
c841268ef4a0f1c6f89b8e95bf68058ea2548394
[ "MIT" ]
9
2018-10-31T03:07:11.000Z
2021-08-06T08:53:21.000Z
#!/usr/bin/env python # Copyright (c) 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
38.064516
85
0.615012
from __future__ import print_function import argparse import fileinput import fnmatch import inspect import os import re import sys AUTHORS = ['The Khronos Group Inc.', 'LunarG Inc.', 'Google Inc.'] CURRENT_YEAR='2017' YEARS = '(2014-2016|2015-2016|2016|2016-2017|2017)' COPYRIGHT_RE = re.compil...
true
true
08fb091f06f9cbbb2a890b870a923d93959bb401
6,755
py
Python
tests/test_query_errors.py
VWS-Python/vws-cl
1a65dde93a0c550699b9b73d853ba2684dac9ef2
[ "MIT" ]
3
2019-10-14T08:02:43.000Z
2020-05-16T20:25:13.000Z
tests/test_query_errors.py
VWS-Python/vws-cl
1a65dde93a0c550699b9b73d853ba2684dac9ef2
[ "MIT" ]
343
2020-05-18T11:53:44.000Z
2022-03-31T22:18:16.000Z
tests/test_query_errors.py
adamtheturtle/vws-cli
c0b164952818c0f04545f5c71b4171f7eefe4f0e
[ "MIT" ]
1
2020-11-02T10:40:37.000Z
2020-11-02T10:40:37.000Z
""" Tests for how errors from the Cloud Reco Service are handled by the CLI. """ from __future__ import annotations import io import time import uuid from pathlib import Path from click.testing import CliRunner from freezegun import freeze_time from mock_vws import MockVWS from mock_vws.database import VuforiaDataba...
28.744681
79
0.654922
from __future__ import annotations import io import time import uuid from pathlib import Path from click.testing import CliRunner from freezegun import freeze_time from mock_vws import MockVWS from mock_vws.database import VuforiaDatabase from mock_vws.states import States from vws import VWS from vws_cli.query imp...
true
true
08fb09917d88c17229e1dc83fe2371ace0dd2ca5
12,576
py
Python
sdk/python/pulumi_azure_native/hybridnetwork/v20200101preview/device.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/hybridnetwork/v20200101preview/device.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/hybridnetwork/v20200101preview/device.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "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, overload from ... import _utilities fro...
41.098039
378
0.637723
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._enums import * from ._inputs import * __all__ = ['DeviceArgs', 'Device'] @pulumi.input_type class DeviceArgs: def __init__(__self__, *, ...
true
true
08fb09aa6f0eb13af428880c16895e8d0eb061de
602
py
Python
surplus/slackish.py
TapeWerm/surplus-bot
47f1cef603d26845350a9c2235f5ebce8799551a
[ "MIT" ]
1
2019-03-05T04:27:25.000Z
2019-03-05T04:27:25.000Z
surplus/slackish.py
TapeWerm/surplus-bot
47f1cef603d26845350a9c2235f5ebce8799551a
[ "MIT" ]
4
2019-07-10T00:33:58.000Z
2021-06-01T22:15:19.000Z
surplus/slackish.py
TapeWerm/surplus-bot
47f1cef603d26845350a9c2235f5ebce8799551a
[ "MIT" ]
2
2018-06-13T00:55:14.000Z
2019-07-02T01:30:18.000Z
import json import requests from emitter import Emitter class SlackishEmitter(Emitter): def __init__(self, name, webhook): self.webhook = webhook super().__init__(name) def post(self, event): data = self.parse(event) response = requests.post( self.webhook, data=j...
26.173913
117
0.611296
import json import requests from emitter import Emitter class SlackishEmitter(Emitter): def __init__(self, name, webhook): self.webhook = webhook super().__init__(name) def post(self, event): data = self.parse(event) response = requests.post( self.webhook, data=j...
true
true
08fb09e1751bc1d036d82e2eebce955482955cb6
2,361
py
Python
cccc/tests/ast/execute_tests.py
DasNaCl/old-university-projects
af1c82afec4805ea672e0c353369035b394cb69d
[ "Apache-2.0" ]
null
null
null
cccc/tests/ast/execute_tests.py
DasNaCl/old-university-projects
af1c82afec4805ea672e0c353369035b394cb69d
[ "Apache-2.0" ]
null
null
null
cccc/tests/ast/execute_tests.py
DasNaCl/old-university-projects
af1c82afec4805ea672e0c353369035b394cb69d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import os, sys from os import listdir from os.path import isfile, join, abspath source_dir = abspath(join("..", "..")) make_args = "-j8" if "--threads" in sys.argv else "" if not "--no-build" in sys.argv: os.system("cd {} ; make {} ; cd {}/tests/ast".format(source_dir, make_args, source_di...
42.927273
221
0.49767
import os, sys from os import listdir from os.path import isfile, join, abspath source_dir = abspath(join("..", "..")) make_args = "-j8" if "--threads" in sys.argv else "" if not "--no-build" in sys.argv: os.system("cd {} ; make {} ; cd {}/tests/ast".format(source_dir, make_args, source_dir)) onlyfiles = [f for ...
true
true
08fb0bd83d5e10c879097eb6cab2b26d418e750a
1,726
py
Python
tensorflow_model_analysis/addons/fairness/notebook/jupyter/renderer.py
BioGeek/model-analysis
03db02c21e21b092bc409c8bf263174b90c4e2ae
[ "Apache-2.0" ]
null
null
null
tensorflow_model_analysis/addons/fairness/notebook/jupyter/renderer.py
BioGeek/model-analysis
03db02c21e21b092bc409c8bf263174b90c4e2ae
[ "Apache-2.0" ]
null
null
null
tensorflow_model_analysis/addons/fairness/notebook/jupyter/renderer.py
BioGeek/model-analysis
03db02c21e21b092bc409c8bf263174b90c4e2ae
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
37.521739
80
0.742178
from tensorflow_model_analysis.addons.fairness.notebook.jupyter import widget def render_fairness_indicator(slicing_metrics=None, multi_slicing_metrics=None, event_handlers=None): if ((slicing_metrics and multi_slicing_metrics) or (not slicing_metri...
true
true
08fb0db98d445037093983fd3cd4bdc49fde17b7
1,002
py
Python
ngs_pipeline/__init__.py
JoeHarman/ngs_pipeline
0f64dd99ee140bcba996feedfb2d628ac305df2d
[ "MIT" ]
2
2021-07-14T15:45:30.000Z
2022-03-12T09:12:12.000Z
ngs_pipeline/__init__.py
JoeHarman/ngs_pipeline
0f64dd99ee140bcba996feedfb2d628ac305df2d
[ "MIT" ]
4
2021-07-22T11:38:30.000Z
2022-01-14T18:01:35.000Z
ngs_pipeline/__init__.py
JoeHarman/ngs_pipeline
0f64dd99ee140bcba996feedfb2d628ac305df2d
[ "MIT" ]
1
2021-07-26T18:28:02.000Z
2021-07-26T18:28:02.000Z
import click import os import subprocess file = os.path.abspath(__file__) dir_package = os.path.dirname(file) @click.command(context_settings=dict(ignore_unknown_options=True)) @click.option('-h', '--help', is_flag=True) @click.argument("method", type=click.Choice(['atac', 'chip', 'rna'])) @click.argument("mode", ty...
28.628571
78
0.660679
import click import os import subprocess file = os.path.abspath(__file__) dir_package = os.path.dirname(file) @click.command(context_settings=dict(ignore_unknown_options=True)) @click.option('-h', '--help', is_flag=True) @click.argument("method", type=click.Choice(['atac', 'chip', 'rna'])) @click.argument("mode", ty...
true
true
08fb0e0f42c55e3b5d8f27d6bf0e3c811834336d
22,344
py
Python
tests/frontend/compilers/test_xcov.py
SubhashishQPIT/strawberryfields
dae6ae8b1b3eb188fc2c874bd6c943bebf697ab9
[ "Apache-2.0" ]
646
2018-03-26T15:12:35.000Z
2022-03-21T18:52:42.000Z
tests/frontend/compilers/test_xcov.py
tonybruguier/strawberryfields
298601e409528f22c6717c2d816ab68ae8bda1fa
[ "Apache-2.0" ]
666
2018-03-27T20:21:27.000Z
2022-03-25T18:35:33.000Z
tests/frontend/compilers/test_xcov.py
tonybruguier/strawberryfields
298601e409528f22c6717c2d816ab68ae8bda1fa
[ "Apache-2.0" ]
182
2018-04-11T17:09:39.000Z
2022-03-29T15:38:43.000Z
# Copyright 2019-2020 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or...
39.9
107
0.597655
import textwrap import pytest import numpy as np import networkx as nx import blackbird import strawberryfields as sf import strawberryfields.ops as ops from strawberryfields.parameters import par_evaluate from strawberryfields.program_utils import CircuitError, list_to_DAG from strawberryfields.io import to_pro...
true
true
08fb0f4fb34cd57e4660e52f876fa28c6a6070ab
4,750
py
Python
boto/s3/acl.py
marshall/pynaries
52c0376b95de43ad9b910b1cab08c17d3600e070
[ "Apache-2.0" ]
1
2016-05-09T10:08:26.000Z
2016-05-09T10:08:26.000Z
boto/s3/acl.py
marshall/pynaries
52c0376b95de43ad9b910b1cab08c17d3600e070
[ "Apache-2.0" ]
null
null
null
boto/s3/acl.py
marshall/pynaries
52c0376b95de43ad9b910b1cab08c17d3600e070
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
32.312925
78
0.596421
from boto.s3.user import User import StringIO CannedACLStrings = ['private', 'public-read', 'public-read-write', 'authenticated-read'] class Policy: def __init__(self, parent=None): self.parent = parent self.acl = None def startElement(self, name, attrs, connection): ...
true
true
08fb0fd95824e0e897a65107c0a8fddb56c5ffa6
335
py
Python
demo/configdb.py
eddy-ojb/django-plotly-dash
00b60d80a5fdda1be186b3f35679a5b33fa2a86e
[ "MIT" ]
1
2019-12-19T16:55:52.000Z
2019-12-19T16:55:52.000Z
demo/configdb.py
eddy-ojb/django-plotly-dash
00b60d80a5fdda1be186b3f35679a5b33fa2a86e
[ "MIT" ]
null
null
null
demo/configdb.py
eddy-ojb/django-plotly-dash
00b60d80a5fdda1be186b3f35679a5b33fa2a86e
[ "MIT" ]
1
2020-06-12T07:53:04.000Z
2020-06-12T07:53:04.000Z
#!/usr/bin/env python # # Create a new superuser from django.contrib.auth import get_user_model UserModel = get_user_model() name="admin" password="admin" try: UserModel.objects.get(username=name) except: su = UserModel.objects.create_user(name,password=password) su.is_staff=True su.is_superuser=True...
18.611111
62
0.737313
from django.contrib.auth import get_user_model UserModel = get_user_model() name="admin" password="admin" try: UserModel.objects.get(username=name) except: su = UserModel.objects.create_user(name,password=password) su.is_staff=True su.is_superuser=True su.save()
true
true
08fb10a6d86e321bbb28284db50f4f8146a26c49
6,726
py
Python
database/ipeds_student_aid.py
jasonpcasey/public_comparative_data
38ac9fdd42d89a9c742eee0c092484b7aad42837
[ "MIT" ]
null
null
null
database/ipeds_student_aid.py
jasonpcasey/public_comparative_data
38ac9fdd42d89a9c742eee0c092484b7aad42837
[ "MIT" ]
56
2019-11-17T17:00:51.000Z
2020-05-28T18:48:11.000Z
database/ipeds_student_aid.py
jasonpcasey/public_comparative_data
38ac9fdd42d89a9c742eee0c092484b7aad42837
[ "MIT" ]
null
null
null
# coding=utf-8 from sqlalchemy import Column, ForeignKey, Index, String, Integer, Date, Numeric from .base import Base class IpedsStudentAid(Base): """ map to a table name in db """ __tablename__ = "ipeds_student_aid" """ create columns """ id = Column(Integer, primary_key = True) unitid = Colum...
60.053571
99
0.719744
from sqlalchemy import Column, ForeignKey, Index, String, Integer, Date, Numeric from .base import Base class IpedsStudentAid(Base): __tablename__ = "ipeds_student_aid" id = Column(Integer, primary_key = True) unitid = Column(Integer, nullable = False) date_key = Column(Date, ForeignKey('date_dimens...
true
true
08fb116c222c0bff9b3c35e7f1caa831d4a3a3d5
835
py
Python
biomart-gene/query_biomart_gene_features.py
wac/cmp-meshop
8418ac19b0faf43159be4d2c702b64a62f601c27
[ "0BSD" ]
1
2016-05-08T14:54:35.000Z
2016-05-08T14:54:35.000Z
biomart-gene/query_biomart_gene_features.py
wac/cmp-meshop
8418ac19b0faf43159be4d2c702b64a62f601c27
[ "0BSD" ]
null
null
null
biomart-gene/query_biomart_gene_features.py
wac/cmp-meshop
8418ac19b0faf43159be4d2c702b64a62f601c27
[ "0BSD" ]
null
null
null
# Assumes BioMart Results are TSV with fields # "entrezgene" # "start_position" # "end_position" # "transcript_start" # "transcript_end" # "transcript_count" # "percentage_gc_content" # import urllib import sys sep="|" file=sys.stdin query="" for line in file: query=query+line params=urllib.urlencode({'query' : qu...
26.09375
114
0.749701
import urllib import sys sep="|" file=sys.stdin query="" for line in file: query=query+line params=urllib.urlencode({'query' : query}) urlstring="http://www.biomart.org/biomart/martservice?" + params print "#gene_id"+sep+"genomic_length"+sep+"transcript_length"+sep+"num_transcripts"+sep+"gc_content"+sep+urlstring ...
false
true
08fb1239c70e2aba3bb065a3e40be35e71248c1b
6,287
py
Python
probe_lists.py
dingdang2012/tlsprober
927f6177939470235bf336bca27096369932fc66
[ "Apache-2.0" ]
1
2019-01-30T13:18:02.000Z
2019-01-30T13:18:02.000Z
probe_lists.py
dingdang2012/tlsprober
927f6177939470235bf336bca27096369932fc66
[ "Apache-2.0" ]
null
null
null
probe_lists.py
dingdang2012/tlsprober
927f6177939470235bf336bca27096369932fc66
[ "Apache-2.0" ]
null
null
null
# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; -*- # Copyright 2010-2012 Opera Software ASA # # 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/...
30.08134
113
0.724829
""" The prober engine, performs the actual probes, and insertion into the database. Started by cluster_start.py """ import socket import fileinput import libinit from optparse import OptionParser from probe_server import ProbeServer import time import probedb.standalone from db_list import db_list import probedb.pr...
false
true
08fb1267becf4734a3504db244973663215c1569
3,766
py
Python
test/IECoreScene/OBJReaderTest.py
ericmehl/cortex
054839cc709ce153d1bcaaefe7f340ebe641ec82
[ "BSD-3-Clause" ]
386
2015-01-02T11:10:43.000Z
2022-03-10T15:12:20.000Z
test/IECoreScene/OBJReaderTest.py
ericmehl/cortex
054839cc709ce153d1bcaaefe7f340ebe641ec82
[ "BSD-3-Clause" ]
484
2015-01-09T18:28:06.000Z
2022-03-31T16:02:04.000Z
test/IECoreScene/OBJReaderTest.py
ericmehl/cortex
054839cc709ce153d1bcaaefe7f340ebe641ec82
[ "BSD-3-Clause" ]
99
2015-01-28T23:18:04.000Z
2022-03-27T00:59:39.000Z
########################################################################## # # Copyright (c) 2007-2009, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redis...
36.211538
92
0.699416
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, import unittest import sys import os import IECore import IECoreScene class TestOBJReader( unittest.TestCase ) : def testRead( self ) : self.testfile = os.path.join( "test", "IECore", "data", "obj", "triangle.obj" ) r = IECore.Reader...
true
true
08fb12710191e9e575af9b3fd91e50c756a5e197
5,814
py
Python
tempest/api/compute/v3/servers/test_server_rescue_negative.py
NetApp/tempest
dd86b1517ec5ac16c26975ed0ce0d8b7ddcac6cc
[ "Apache-2.0" ]
null
null
null
tempest/api/compute/v3/servers/test_server_rescue_negative.py
NetApp/tempest
dd86b1517ec5ac16c26975ed0ce0d8b7ddcac6cc
[ "Apache-2.0" ]
null
null
null
tempest/api/compute/v3/servers/test_server_rescue_negative.py
NetApp/tempest
dd86b1517ec5ac16c26975ed0ce0d8b7ddcac6cc
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 Hewlett-Packard Development Company, L.P. # Copyright 2014 NEC Corporation. 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://...
42.75
79
0.639491
from tempest.api.compute import base from tempest.common.utils import data_utils from tempest import exceptions from tempest import test class ServerRescueNegativeV3Test(base.BaseV3ComputeTest): @classmethod @test.safe_setup def setUpClass(cls): super(ServerRescueNegativeV3Test, cls).setUpClass(...
true
true
08fb1297737cd9a8415c37e2428645c549971168
1,846
py
Python
tests/oracles/baseOracleTests.py
roiDaniela/AALpy
01d781af83178ddc0cd186654b3d392de20c7d31
[ "MIT" ]
61
2021-04-01T10:38:52.000Z
2022-03-28T13:44:23.000Z
tests/oracles/baseOracleTests.py
roiDaniela/AALpy
01d781af83178ddc0cd186654b3d392de20c7d31
[ "MIT" ]
16
2021-04-03T20:14:08.000Z
2022-02-16T10:21:48.000Z
tests/oracles/baseOracleTests.py
haubitzer/AALpy
e5b51742d886d5c5c72ab3e9c20eb349c56e2469
[ "MIT" ]
9
2021-04-05T13:43:17.000Z
2022-03-09T14:06:17.000Z
import unittest from aalpy.SULs import DfaSUL from aalpy.learning_algs import run_Lstar from aalpy.oracles import WMethodEqOracle from aalpy.utils import generate_random_dfa class BaseOracleTests(unittest.TestCase): """ Abstract class for testing oracles. """ def generate_dfa_suls(self, number_of_st...
33.563636
95
0.686349
import unittest from aalpy.SULs import DfaSUL from aalpy.learning_algs import run_Lstar from aalpy.oracles import WMethodEqOracle from aalpy.utils import generate_random_dfa class BaseOracleTests(unittest.TestCase): def generate_dfa_suls(self, number_of_states=10, alphabet_size=10, num_accepting_states=5): ...
true
true
08fb13601cdb6268029f746c513df8bba9607611
123
py
Python
matrix_registration/__init__.py
navyjosh/matrix-registration
1ac67b601b45328967661633b4a2dde2a379f961
[ "MIT" ]
null
null
null
matrix_registration/__init__.py
navyjosh/matrix-registration
1ac67b601b45328967661633b4a2dde2a379f961
[ "MIT" ]
null
null
null
matrix_registration/__init__.py
navyjosh/matrix-registration
1ac67b601b45328967661633b4a2dde2a379f961
[ "MIT" ]
null
null
null
from . import api from . import tokens from . import config __version__ = "v0.9.2.dev2-josh" name = "matrix_registration"
17.571429
32
0.739837
from . import api from . import tokens from . import config __version__ = "v0.9.2.dev2-josh" name = "matrix_registration"
true
true
08fb1377ffacbaea4f085260bc62566bc921e9c3
3,241
py
Python
amr_navi_center.py
spiderkiller13/mqtt_test
c136f1c4a91c9a95c922cb56e3f5db36961c9452
[ "MIT" ]
1
2020-03-03T12:20:02.000Z
2020-03-03T12:20:02.000Z
amr_navi_center.py
spiderkiller13/mqtt_test
c136f1c4a91c9a95c922cb56e3f5db36961c9452
[ "MIT" ]
null
null
null
amr_navi_center.py
spiderkiller13/mqtt_test
c136f1c4a91c9a95c922cb56e3f5db36961c9452
[ "MIT" ]
null
null
null
#!/usr/bin/env python import time import paho.mqtt.client as mqtt from global_logger import logger import json from MQTT.mqtt_template import MQTT_OBJ CLIENT_NAME = "AMR_4" # Tow different mqtt client MUST have different name, and '#' , '+' , '/' is NOT allow in topic name is_tc_available = "" #######################...
40.5125
150
0.603826
import time import paho.mqtt.client as mqtt from global_logger import logger import json from MQTT.mqtt_template import MQTT_OBJ CLIENT_NAME = "AMR_4" is_tc_available = "" def path_allowed_CB(client, userdata, message): logger.info("[MQTT] path_allowed_CB : " + str(message.payload) + "(Q" + str(message.qos) + ", R...
true
true
08fb137ca35d25611aff62db99651a7fceb4b570
241
py
Python
pgevents/context.py
peajayni/pgevents
546f9f37a2f92717a409fdf811e657dbd6886746
[ "MIT" ]
1
2021-12-23T23:07:55.000Z
2021-12-23T23:07:55.000Z
pgevents/context.py
peajayni/pgevents
546f9f37a2f92717a409fdf811e657dbd6886746
[ "MIT" ]
null
null
null
pgevents/context.py
peajayni/pgevents
546f9f37a2f92717a409fdf811e657dbd6886746
[ "MIT" ]
null
null
null
from pgevents import data_access class Context: def __init__(self, event, cursor): self.event = event self.cursor = cursor def create_event(self, event): return data_access.create_event(self.cursor, event)
21.909091
59
0.684647
from pgevents import data_access class Context: def __init__(self, event, cursor): self.event = event self.cursor = cursor def create_event(self, event): return data_access.create_event(self.cursor, event)
true
true
08fb13decc6a156852e0e8745ff67c95d01ae44b
12,000
py
Python
lib/rucio/daemons/conveyor/throttler.py
efajardo/rucio
460f394715568b937584ef671382b2b93add1758
[ "Apache-2.0" ]
1
2018-02-27T08:03:41.000Z
2018-02-27T08:03:41.000Z
lib/rucio/daemons/conveyor/throttler.py
efajardo/rucio
460f394715568b937584ef671382b2b93add1758
[ "Apache-2.0" ]
null
null
null
lib/rucio/daemons/conveyor/throttler.py
efajardo/rucio
460f394715568b937584ef671382b2b93add1758
[ "Apache-2.0" ]
null
null
null
# Copyright 2016-2018 CERN for the benefit of the ATLAS collaboration. # # 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...
52.401747
185
0.593917
import logging import math import os import socket import sys import threading import time import traceback from rucio.common.config import config_get from rucio.core import heartbeat from rucio.core.monitor import record_counter, record_gauge from rucio.core.request import get_stats_by_activity_dest_state, release...
true
true
08fb146c84b9d6c95af4ce0a35abda8fa26fb39c
5,937
py
Python
f8a_jobs/handlers/maven_releases.py
pombredanne/jobs-3
24ae883e0244135893550f25379ed3806479285a
[ "Apache-2.0" ]
5
2017-05-04T11:22:31.000Z
2018-08-24T16:12:30.000Z
f8a_jobs/handlers/maven_releases.py
pombredanne/jobs-3
24ae883e0244135893550f25379ed3806479285a
[ "Apache-2.0" ]
325
2017-05-03T08:44:03.000Z
2021-12-13T21:03:49.000Z
f8a_jobs/handlers/maven_releases.py
pombredanne/jobs-3
24ae883e0244135893550f25379ed3806479285a
[ "Apache-2.0" ]
28
2017-05-02T05:09:32.000Z
2021-03-11T09:42:34.000Z
"""Trigger analysis of newly released maven packages.""" import os import tempfile from shutil import rmtree from f8a_worker.utils import cwd from f8a_worker.utils import TimedCommand from f8a_worker.errors import TaskError from selinon import StoragePool from .base import BaseHandler class MavenReleasesAnalyses(B...
46.382813
99
0.561395
import os import tempfile from shutil import rmtree from f8a_worker.utils import cwd from f8a_worker.utils import TimedCommand from f8a_worker.errors import TaskError from selinon import StoragePool from .base import BaseHandler class MavenReleasesAnalyses(BaseHandler): def execute(self): self.log.inf...
true
true
08fb16b4e24051ff6acf5c0cdf2bd03eedafcdae
4,021
py
Python
configs/top_down/resnest/coco/resnest50_coco_256x192.py
jcwon0/BlurHPE
c97a57e92a8a7f171b0403aee640222a32513562
[ "Apache-2.0" ]
null
null
null
configs/top_down/resnest/coco/resnest50_coco_256x192.py
jcwon0/BlurHPE
c97a57e92a8a7f171b0403aee640222a32513562
[ "Apache-2.0" ]
null
null
null
configs/top_down/resnest/coco/resnest50_coco_256x192.py
jcwon0/BlurHPE
c97a57e92a8a7f171b0403aee640222a32513562
[ "Apache-2.0" ]
null
null
null
log_level = 'INFO' load_from = None resume_from = None dist_params = dict(backend='nccl') workflow = [('train', 1)] checkpoint_config = dict(interval=10) evaluation = dict(interval=10, metric='mAP', key_indicator='AP') optimizer = dict( type='Adam', lr=5e-4, ) optimizer_config = dict(grad_clip=None...
28.721429
80
0.605819
log_level = 'INFO' load_from = None resume_from = None dist_params = dict(backend='nccl') workflow = [('train', 1)] checkpoint_config = dict(interval=10) evaluation = dict(interval=10, metric='mAP', key_indicator='AP') optimizer = dict( type='Adam', lr=5e-4, ) optimizer_config = dict(grad_clip=None...
true
true
08fb1705bd89585ca8d569f83ebf3c7ce4515252
1,716
py
Python
firmwire/vendor/mtk/hw/AESPeripheral.py
j4s0n/FirmWire
d3a20e2429cb4827f538d1a16163afde8b45826b
[ "BSD-3-Clause" ]
null
null
null
firmwire/vendor/mtk/hw/AESPeripheral.py
j4s0n/FirmWire
d3a20e2429cb4827f538d1a16163afde8b45826b
[ "BSD-3-Clause" ]
null
null
null
firmwire/vendor/mtk/hw/AESPeripheral.py
j4s0n/FirmWire
d3a20e2429cb4827f538d1a16163afde8b45826b
[ "BSD-3-Clause" ]
null
null
null
## Copyright (c) 2022, Team FirmWire ## SPDX-License-Identifier: BSD-3-Clause import logging from . import PassthroughPeripheral # this is SEJ aka 'hacc' in the public linux kernel source class AES_TOP0_Periph(PassthroughPeripheral): def __init__(self, name, address, size, **kwargs): super().__init__(name...
35.75
58
0.567599
import logging from . import PassthroughPeripheral class AES_TOP0_Periph(PassthroughPeripheral): def __init__(self, name, address, size, **kwargs): super().__init__(name, address, size, **kwargs) def hw_read(self, offset, size): if offset == 0x8: self.log.debug("read AES_TOP0:8") ...
true
true
08fb1725a20e943ada13106dd5dc87377e6f902b
449
py
Python
Others/ManejoDeExcepciones.py
jaimeandrescatano/ekorre
d2e4ba6a4cdec4e3c796e18c172c4dbcf2f3ecbb
[ "MIT" ]
2
2017-10-08T08:46:44.000Z
2017-11-19T15:53:51.000Z
Others/ManejoDeExcepciones.py
jaimeandrescatano/ekorre
d2e4ba6a4cdec4e3c796e18c172c4dbcf2f3ecbb
[ "MIT" ]
null
null
null
Others/ManejoDeExcepciones.py
jaimeandrescatano/ekorre
d2e4ba6a4cdec4e3c796e18c172c4dbcf2f3ecbb
[ "MIT" ]
null
null
null
# import RPi.GPIO as GPIO """ Manejo de excepciones """ import sys try: import RPi.GPIO as GPIO except RuntimeError: falla0 = sys.exc_info()[0] # - me da el tipo del error falla1 = sys.exc_info()[1] # - me da el valor del error print falla0 print falla1 # print("Error importi...
20.409091
154
0.663697
""" Manejo de excepciones """ import sys try: import RPi.GPIO as GPIO except RuntimeError: falla0 = sys.exc_info()[0] falla1 = sys.exc_info()[1] print falla0 print falla1
false
true
08fb18638612e847d1dec27ebc054745774cede0
3,189
py
Python
lib/Grafana.py
jtaleric/browbeat
88f1762a73eeb8d86825a1b5d08fa51cb57f8559
[ "Apache-2.0" ]
23
2016-02-09T18:56:45.000Z
2017-10-06T19:34:21.000Z
lib/Grafana.py
jtaleric/browbeat
88f1762a73eeb8d86825a1b5d08fa51cb57f8559
[ "Apache-2.0" ]
6
2015-12-06T18:53:13.000Z
2016-05-20T14:47:31.000Z
lib/Grafana.py
jtaleric/browbeat
88f1762a73eeb8d86825a1b5d08fa51cb57f8559
[ "Apache-2.0" ]
15
2015-09-23T13:35:07.000Z
2019-05-28T07:44:35.000Z
import logging import subprocess class Grafana: def __init__(self, config): self.logger = logging.getLogger('browbeat.Grafana') self.config = config self.cloud_name = self.config['grafana']['cloud_name'] self.hosts_file = self.config['ansible']['hosts'] self.grafana_ip = s...
49.828125
97
0.600815
import logging import subprocess class Grafana: def __init__(self, config): self.logger = logging.getLogger('browbeat.Grafana') self.config = config self.cloud_name = self.config['grafana']['cloud_name'] self.hosts_file = self.config['ansible']['hosts'] self.grafana_ip = s...
true
true
08fb18e671b1f402d68cc13fa9f8b4c81d3fc6c4
8,914
py
Python
test/functional/wallet_import_rescan.py
pingboy/Tarian
19fe47d7cbd1476b4f952f2b0a5654db7dda92b8
[ "MIT" ]
1
2020-12-24T21:18:35.000Z
2020-12-24T21:18:35.000Z
test/functional/wallet_import_rescan.py
pingboy/Tarian
19fe47d7cbd1476b4f952f2b0a5654db7dda92b8
[ "MIT" ]
null
null
null
test/functional/wallet_import_rescan.py
pingboy/Tarian
19fe47d7cbd1476b4f952f2b0a5654db7dda92b8
[ "MIT" ]
1
2020-11-19T03:46:35.000Z
2020-11-19T03:46:35.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test wallet import RPCs. Test rescan behavior of importaddress, importpubkey, importprivkey, and impor...
47.414894
116
0.654588
from test_framework.test_framework import TarianTestFramework from test_framework.util import (assert_raises_rpc_error, connect_nodes, sync_blocks, assert_equal, set_node_times) import collections import enum import itertools Call = enum.Enum("Call", "single multi") Data = enum.Enum("Data", "address pub priv") Resca...
true
true
08fb1916f7ad3aa4bb04aeb8b821667619b4ba95
283
py
Python
podcast-ml/service/src/app/podcastml/controllers/__init__.py
cuappdev/archives
061d0f9cccf278363ffaeb27fc655743b1052ae5
[ "MIT" ]
null
null
null
podcast-ml/service/src/app/podcastml/controllers/__init__.py
cuappdev/archives
061d0f9cccf278363ffaeb27fc655743b1052ae5
[ "MIT" ]
null
null
null
podcast-ml/service/src/app/podcastml/controllers/__init__.py
cuappdev/archives
061d0f9cccf278363ffaeb27fc655743b1052ae5
[ "MIT" ]
null
null
null
from appdev.controllers import * from app.podcastml.utils.authorize import * from app.podcastml.dao import series_for_topic_dao from app.podcastml.dao import series_for_user_dao from app.podcastml.dao import episodes_for_topic_dao from app.podcastml.dao import episodes_for_user_dao
40.428571
52
0.865724
from appdev.controllers import * from app.podcastml.utils.authorize import * from app.podcastml.dao import series_for_topic_dao from app.podcastml.dao import series_for_user_dao from app.podcastml.dao import episodes_for_topic_dao from app.podcastml.dao import episodes_for_user_dao
true
true
08fb1983108fdd52d6e45f21177d34272e9fa7a1
9,349
py
Python
tornado/test/ioloop_test.py
plexinc/tornado
443c7f34b8eb5b77b82a04eb9b8575ad57744427
[ "Apache-2.0" ]
1
2019-12-27T00:36:48.000Z
2019-12-27T00:36:48.000Z
tornado/test/ioloop_test.py
plexinc/tornado
443c7f34b8eb5b77b82a04eb9b8575ad57744427
[ "Apache-2.0" ]
null
null
null
tornado/test/ioloop_test.py
plexinc/tornado
443c7f34b8eb5b77b82a04eb9b8575ad57744427
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from __future__ import absolute_import, division, print_function, with_statement import contextlib import datetime import functools import socket import sys import threading import time from tornado.ioloop import IOLoop from tornado.stack_context import ExceptionStackContext, StackContext, wrap...
36.952569
88
0.633544
from __future__ import absolute_import, division, print_function, with_statement import contextlib import datetime import functools import socket import sys import threading import time from tornado.ioloop import IOLoop from tornado.stack_context import ExceptionStackContext, StackContext, wrap, NullContext from tor...
true
true
08fb19b38942dc6c99381ebfb546735b16198f56
81,644
py
Python
tests/core/full_node/test_full_node.py
zcomputerwiz/sparev2-blockchain
ce4344321de909704ad8df9785299da25761059e
[ "Apache-2.0" ]
3
2021-11-20T16:21:45.000Z
2022-02-09T04:33:04.000Z
tests/core/full_node/test_full_node.py
zcomputerwiz/sparev2-blockchain
ce4344321de909704ad8df9785299da25761059e
[ "Apache-2.0" ]
null
null
null
tests/core/full_node/test_full_node.py
zcomputerwiz/sparev2-blockchain
ce4344321de909704ad8df9785299da25761059e
[ "Apache-2.0" ]
null
null
null
# flake8: noqa: F811, F401 import asyncio import dataclasses import logging import random import time from secrets import token_bytes from typing import Dict, Optional, List import pytest from spare.consensus.pot_iterations import is_overflow_block from spare.full_node.bundle_tools import detect_potential_template_ge...
44.908691
120
0.668843
import asyncio import dataclasses import logging import random import time from secrets import token_bytes from typing import Dict, Optional, List import pytest from spare.consensus.pot_iterations import is_overflow_block from spare.full_node.bundle_tools import detect_potential_template_generator from spare.full_nod...
true
true
08fb1a25c4fd1f46204279b40224e6c2a3bc2290
4,426
py
Python
examples/pytorch_simple.py
grassking100/optuna
3075a1cf6648b3a8f061f904177734a08bb3a3c3
[ "MIT" ]
null
null
null
examples/pytorch_simple.py
grassking100/optuna
3075a1cf6648b3a8f061f904177734a08bb3a3c3
[ "MIT" ]
null
null
null
examples/pytorch_simple.py
grassking100/optuna
3075a1cf6648b3a8f061f904177734a08bb3a3c3
[ "MIT" ]
null
null
null
""" Optuna example that optimizes multi-layer perceptrons using PyTorch. In this example, we optimize the validation accuracy of hand-written digit recognition using PyTorch and MNIST. We optimize the neural network architecture as well as the optimizer configuration. As it is too time consuming to use the whole MNIST...
30.524138
98
0.659286
import os import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torch.utils.data from torchvision import datasets from torchvision import transforms import optuna DEVICE = torch.device("cpu") BATCHSIZE = 128 CLASSES = 10 DIR = os.getcwd() EPOCHS = 10 LOG_INTERVAL = 10...
true
true
08fb1aa56b7a32cb21c0eeaf8972171e0d03bea3
3,204
py
Python
core/commands/index.py
salvatorecalo/nebula8
b63c0a1a98ccc955320449eb260b62f70ab5ce0a
[ "Apache-2.0" ]
null
null
null
core/commands/index.py
salvatorecalo/nebula8
b63c0a1a98ccc955320449eb260b62f70ab5ce0a
[ "Apache-2.0" ]
null
null
null
core/commands/index.py
salvatorecalo/nebula8
b63c0a1a98ccc955320449eb260b62f70ab5ce0a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright SquirrelNetwork from core.commands import public ,admin, owner from telegram.ext import (CommandHandler as CMH,CallbackQueryHandler as CQH) from core.utilities.functions import close_menu def user_command(dsp): function = dsp.add_handler #############...
43.297297
76
0.670412
from core.commands import public ,admin, owner from telegram.ext import (CommandHandler as CMH,CallbackQueryHandler as CQH) from core.utilities.functions import close_menu def user_command(dsp): function = dsp.add_handler function(CMH('start', public.start.init)) function(CMH('help', public.h...
true
true
08fb1b7676f138fe9eec6c602094153ba9cca9d8
5,836
py
Python
visuals.py
laxmena/titanic_survival_exploration
e299b10941854dbdaf274063fb00a1c39a4b679c
[ "MIT" ]
2
2018-03-24T23:11:19.000Z
2018-04-05T10:04:19.000Z
visuals.py
laxmena/titanic_survival_exploration
e299b10941854dbdaf274063fb00a1c39a4b679c
[ "MIT" ]
13
2020-11-13T17:59:17.000Z
2022-03-11T23:29:33.000Z
visuals.py
laxmena/titanic_survival_exploration
e299b10941854dbdaf274063fb00a1c39a4b679c
[ "MIT" ]
1
2019-10-12T09:14:27.000Z
2019-10-12T09:14:27.000Z
########################################### # Suppress matplotlib user warnings # Necessary for newer version of matplotlib import warnings warnings.filterwarnings("ignore", category = UserWarning, module = "matplotlib") # # Display inline matplotlib plots with IPython from IPython import get_ipython get_ipython().run_...
37.171975
105
0.586361
import warnings warnings.filterwarnings("ignore", category = UserWarning, module = "matplotlib") from IPython import get_ipython get_ipython().run_line_magic('matplotlib', 'inline') import numpy as np import pandas as pd import matplotlib.pyplot as plt def filter_data(data, condition): """ Remove elements tha...
false
true
08fb1bfac117e1c7d06a5742d6ce534c10a03759
2,129
py
Python
src/generators.py
sachithdickwella/python-tute
42583d04db0ab907288b9bef0b022730eec0aa7d
[ "Apache-2.0" ]
null
null
null
src/generators.py
sachithdickwella/python-tute
42583d04db0ab907288b9bef0b022730eec0aa7d
[ "Apache-2.0" ]
null
null
null
src/generators.py
sachithdickwella/python-tute
42583d04db0ab907288b9bef0b022730eec0aa7d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # ################################################################################################# # Generators using 'yield' keyword. # ################################################################################################# def create_cubes(n): for x in r...
26.283951
102
0.47675
def create_cubes(n): for x in range(n): yield x ** 3 cubes = create_cubes(10) print(cubes) print(list(cubes)) def fibonacci(n): a = 1 b = 1 for i in range(n): yield a a, b = b, a + b print(list(fibonacci(10))) def simple_gen(n): for x in range(n): yield x g...
true
true
08fb1c8ad796afde0047824940d5d990cc42462e
7,573
py
Python
tfx/examples/chicago_taxi_pipeline/taxi_pipeline_runtime_parameter.py
htahir1/tfx
6528292918bf746fb5e143a8e1b276a29bbdfe8f
[ "Apache-2.0" ]
null
null
null
tfx/examples/chicago_taxi_pipeline/taxi_pipeline_runtime_parameter.py
htahir1/tfx
6528292918bf746fb5e143a8e1b276a29bbdfe8f
[ "Apache-2.0" ]
null
null
null
tfx/examples/chicago_taxi_pipeline/taxi_pipeline_runtime_parameter.py
htahir1/tfx
6528292918bf746fb5e143a8e1b276a29bbdfe8f
[ "Apache-2.0" ]
null
null
null
# Lint as: python2, python3 # Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
36.584541
80
0.722963
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from typing import List, Text import kfp import tensorflow_model_analysis as tfma from tfx.components import CsvExampleGen from tfx.components import Evaluator from tfx.components import ExampleVali...
true
true
08fb1c8c798fe458073095801b5317aadbf61ffe
22,682
py
Python
main.py
harfang3d/snooker-python-hg2
605faedb57427c73135f28234dbaf3bac071f8d9
[ "MIT" ]
3
2022-03-30T14:59:36.000Z
2022-03-30T22:10:21.000Z
main.py
harfang3d/snooker-python-hg2
605faedb57427c73135f28234dbaf3bac071f8d9
[ "MIT" ]
null
null
null
main.py
harfang3d/snooker-python-hg2
605faedb57427c73135f28234dbaf3bac071f8d9
[ "MIT" ]
null
null
null
# Snooker demo import harfang as hg import sys from math import sin, cos, pi, atan2, sqrt from sprites import * from animations import * import subprocess import re # Game vars res_x, res_y = 1920, 1080 class Main: if len(sys.argv) >= 2: if sys.argv[1] == "--aaa": flag_AAA = True else: flag_AAA = False e...
35.946117
185
0.762234
import harfang as hg import sys from math import sin, cos, pi, atan2, sqrt from sprites import * from animations import * import subprocess import re res_x, res_y = 1920, 1080 class Main: if len(sys.argv) >= 2: if sys.argv[1] == "--aaa": flag_AAA = True else: flag_AAA = False else: flag_AAA = False fl...
true
true
08fb1d3f715a4d84ff40e69d7d74c8622708d7f1
1,849
py
Python
eval/rec/wide_and_deep_single_static/trainer.py
PaddlePaddle/Fleet
dd4c4c91e6c5720401f862a69861365b7226df6b
[ "Apache-2.0" ]
84
2019-04-04T08:26:05.000Z
2020-08-02T12:54:20.000Z
eval/rec/wide_and_deep_single_static/trainer.py
PaddlePaddle/Fleet
dd4c4c91e6c5720401f862a69861365b7226df6b
[ "Apache-2.0" ]
74
2019-06-03T16:09:40.000Z
2020-08-06T15:01:26.000Z
eval/rec/wide_and_deep_single_static/trainer.py
PaddlePaddle/Fleet
dd4c4c91e6c5720401f862a69861365b7226df6b
[ "Apache-2.0" ]
55
2018-12-17T07:32:13.000Z
2020-07-30T03:09:20.000Z
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
30.816667
99
0.691184
import paddle import os import paddle.nn as nn import time import sys from model import WideDeepModel from reader import WideDeepDataset paddle.enable_static() def main(): place = paddle.CPUPlace() exe = paddle.static.Executor(place) model = WideDeepModel() model.net(is_train=True) datas...
true
true
08fb1dad70aeaef6b62eae1f30996c1118ce0049
1,675
py
Python
flask/__init__.py
fphonor/flask
d8bf589d4835ab03daee3101a91c80ee648e72b6
[ "BSD-3-Clause" ]
3
2019-11-02T01:32:09.000Z
2021-08-12T19:48:56.000Z
flask/__init__.py
fphonor/flask
d8bf589d4835ab03daee3101a91c80ee648e72b6
[ "BSD-3-Clause" ]
null
null
null
flask/__init__.py
fphonor/flask
d8bf589d4835ab03daee3101a91c80ee648e72b6
[ "BSD-3-Clause" ]
1
2018-03-12T13:49:18.000Z
2018-03-12T13:49:18.000Z
# -*- coding: utf-8 -*- """ flask ~~~~~ A microframework based on Werkzeug. It's extensively documented and follows best practice patterns. :copyright: © 2010 by the Pallets team. :license: BSD, see LICENSE for more details. """ __version__ = '0.13-dev' # utilities we import from Werkzeug a...
33.5
78
0.776119
__version__ = '0.13-dev' from werkzeug.exceptions import abort from werkzeug.utils import redirect from jinja2 import Markup, escape from .app import Flask, Request, Response from .config import Config from .helpers import url_for, flash, send_file, send_from_directory, \ get_flashed_messages, get_template_attr...
true
true
08fb1e8851d95038488c862ef1d410a73a5bd56f
238
py
Python
skua/data/packages.py
getskua/skua
4a99625991acd2b03156cff929367078cb08a109
[ "BSD-3-Clause" ]
2
2020-01-13T16:26:22.000Z
2021-04-07T04:07:16.000Z
skua/data/packages.py
teymour-aldridge/skua
4a99625991acd2b03156cff929367078cb08a109
[ "BSD-3-Clause" ]
null
null
null
skua/data/packages.py
teymour-aldridge/skua
4a99625991acd2b03156cff929367078cb08a109
[ "BSD-3-Clause" ]
null
null
null
import git class RemotePackage: def __init__(self, url: str, name: str, download: bool = True): self.repo = git.Repo.clone_from(url, to_path=name) class LocalPackage: def __init__(self, path): self.path = path
19.833333
67
0.663866
import git class RemotePackage: def __init__(self, url: str, name: str, download: bool = True): self.repo = git.Repo.clone_from(url, to_path=name) class LocalPackage: def __init__(self, path): self.path = path
true
true
08fb1ea4ff911402bdd25f1fe1f1f880457dfd59
621
py
Python
CAN_IronPython/CAN/packing.py
ADoug4/NIXNET-IronPython-Wrapper
7758d8d45e21f959cdd8b0d1edf37667d9835db7
[ "MIT" ]
null
null
null
CAN_IronPython/CAN/packing.py
ADoug4/NIXNET-IronPython-Wrapper
7758d8d45e21f959cdd8b0d1edf37667d9835db7
[ "MIT" ]
null
null
null
CAN_IronPython/CAN/packing.py
ADoug4/NIXNET-IronPython-Wrapper
7758d8d45e21f959cdd8b0d1edf37667d9835db7
[ "MIT" ]
null
null
null
#https://stackoverflow.com/questions/54951492/issue-using-struct-pack-and-struct-unpack import struct class EnetFrame(): destination_addr = '' has_VLAN_tag = False priority = 0 VID = 0 EtherType = 0 payload = '' def pack(self): ...
20.7
87
0.58132
import struct class EnetFrame(): destination_addr = '' has_VLAN_tag = False priority = 0 VID = 0 EtherType = 0 payload = '' def pack(self): out = struct.pack() return out
true
true
08fb203dd8009dbcd15688ceb79d97ce050eea02
2,403
py
Python
demo/python/merge_bn_layers.py
ZhouKai90/object_detection_ssd_caffe
47ae0ab8a6dff53f46f6d6be46a17479471f444e
[ "MIT" ]
null
null
null
demo/python/merge_bn_layers.py
ZhouKai90/object_detection_ssd_caffe
47ae0ab8a6dff53f46f6d6be46a17479471f444e
[ "MIT" ]
1
2020-04-27T03:31:44.000Z
2020-04-27T03:31:44.000Z
demo/python/merge_bn_layers.py
ZhouKai90/object_detection_ssd_caffe
47ae0ab8a6dff53f46f6d6be46a17479471f444e
[ "MIT" ]
null
null
null
import numpy as np import sys, os import caffe train_proto = os.path.join(os.getcwd(), '../../', 'models/deploy/ssd_vgg16_512.prototxt') train_model = os.path.join(os.getcwd(), '../../', 'models/deploy/ssd_vgg16_512.prototxt') deploy_proto = os.path.join(os.getcwd(), '../../', 'models/deploy/deploy_ssd_vgg16_512.prot...
38.142857
99
0.488972
import numpy as np import sys, os import caffe train_proto = os.path.join(os.getcwd(), '../../', 'models/deploy/ssd_vgg16_512.prototxt') train_model = os.path.join(os.getcwd(), '../../', 'models/deploy/ssd_vgg16_512.prototxt') deploy_proto = os.path.join(os.getcwd(), '../../', 'models/deploy/deploy_ssd_vgg16_512.prot...
true
true
08fb2102336b60f4e49bac9c25ae589f1f5a9987
13,117
py
Python
selfdrive/car/fw_versions.py
mattbsea/openpilot
8e4a75ff48153701e743eb290609998d49602497
[ "MIT" ]
null
null
null
selfdrive/car/fw_versions.py
mattbsea/openpilot
8e4a75ff48153701e743eb290609998d49602497
[ "MIT" ]
null
null
null
selfdrive/car/fw_versions.py
mattbsea/openpilot
8e4a75ff48153701e743eb290609998d49602497
[ "MIT" ]
2
2020-07-29T21:32:11.000Z
2020-07-29T21:50:13.000Z
#!/usr/bin/env python3 import struct import traceback from typing import Any, List from collections import defaultdict from dataclasses import dataclass from tqdm import tqdm import panda.python.uds as uds from cereal import car from selfdrive.car.fingerprints import FW_VERSIONS, get_attr_from_cars from selfdrive.car...
33.291878
153
0.723946
import struct import traceback from typing import Any, List from collections import defaultdict from dataclasses import dataclass from tqdm import tqdm import panda.python.uds as uds from cereal import car from selfdrive.car.fingerprints import FW_VERSIONS, get_attr_from_cars from selfdrive.car.isotp_parallel_query i...
true
true
08fb212f1b4169c40ce2cd247546fd291bdcc80b
440
py
Python
utils/reproducibility.py
jankukacka/lwnet
5b91c1897e68021c1dac263645d1d3050190ab35
[ "MIT" ]
39
2020-09-03T01:45:25.000Z
2022-03-18T03:48:04.000Z
utils/reproducibility.py
jankukacka/lwnet
5b91c1897e68021c1dac263645d1d3050190ab35
[ "MIT" ]
3
2020-09-08T17:52:43.000Z
2022-02-20T17:34:34.000Z
utils/reproducibility.py
jankukacka/lwnet
5b91c1897e68021c1dac263645d1d3050190ab35
[ "MIT" ]
15
2020-09-08T07:43:37.000Z
2022-02-23T08:29:43.000Z
import numpy as np import random import torch def set_seeds(seed_value, use_cuda): np.random.seed(seed_value) # cpu vars torch.manual_seed(seed_value) # cpu vars random.seed(seed_value) # Python if use_cuda: torch.cuda.manual_seed(seed_value) # torch.cuda.manual_seed_all(seed_value)...
31.428571
60
0.704545
import numpy as np import random import torch def set_seeds(seed_value, use_cuda): np.random.seed(seed_value) torch.manual_seed(seed_value) random.seed(seed_value) if use_cuda: torch.cuda.manual_seed(seed_value) torch.backends.cudnn.deterministic = True torch.backend...
true
true
08fb217a8a9adbaebb04368ab0a08ac519c54bb0
6,108
py
Python
diayn_no_oh/main_diayn_no_oh.py
fgitmichael/SelfSupevisedSkillDiscovery
60eee11cfd67046190dd2784bf40e97bdbed9d40
[ "MIT" ]
null
null
null
diayn_no_oh/main_diayn_no_oh.py
fgitmichael/SelfSupevisedSkillDiscovery
60eee11cfd67046190dd2784bf40e97bdbed9d40
[ "MIT" ]
6
2021-02-02T23:00:02.000Z
2022-01-13T03:13:51.000Z
diayn_no_oh/main_diayn_no_oh.py
fgitmichael/SelfSupevisedSkillDiscovery
60eee11cfd67046190dd2784bf40e97bdbed9d40
[ "MIT" ]
null
null
null
import gym import argparse import torch import numpy as np import copy #from gym.envs.mujoco import HalfCheetahEnv import rlkit.torch.pytorch_util as ptu from rlkit.torch.sac.diayn.diayn_env_replay_buffer import DIAYNEnvReplayBuffer from rlkit.envs.wrappers import NormalizedBoxEnv from rlkit.launchers.launcher_util im...
31.647668
90
0.704813
import gym import argparse import torch import numpy as np import copy import rlkit.torch.pytorch_util as ptu from rlkit.torch.sac.diayn.diayn_env_replay_buffer import DIAYNEnvReplayBuffer from rlkit.envs.wrappers import NormalizedBoxEnv from rlkit.launchers.launcher_util import setup_logger from rlkit.torch.sac.diayn...
true
true
08fb21a3705b28683508324ba501608e0bd343bb
299
py
Python
changerequest/forms.py
ghdpro/django-changerequest
8d86d9881affb2f1ffdee8010da3e4f1b942c833
[ "MIT" ]
null
null
null
changerequest/forms.py
ghdpro/django-changerequest
8d86d9881affb2f1ffdee8010da3e4f1b942c833
[ "MIT" ]
null
null
null
changerequest/forms.py
ghdpro/django-changerequest
8d86d9881affb2f1ffdee8010da3e4f1b942c833
[ "MIT" ]
null
null
null
"""django-changerequest forms""" from django import forms class HistoryCommentOptionalForm(forms.Form): comment = forms.CharField(label='Comment / Source', required=False) class HistoryCommentMandatoryForm(forms.Form): comment = forms.CharField(label='Comment / Source', required=True)
24.916667
71
0.765886
from django import forms class HistoryCommentOptionalForm(forms.Form): comment = forms.CharField(label='Comment / Source', required=False) class HistoryCommentMandatoryForm(forms.Form): comment = forms.CharField(label='Comment / Source', required=True)
true
true
08fb21e9760267ac3f1859523e452dbdf5dbe5df
38,641
py
Python
tensorflow/python/kernel_tests/distributions/util_test.py
sokian/tensorflow
359f53686c87ee76e80353c32a3d22cfb1cf0989
[ "Apache-2.0" ]
1
2019-01-22T01:14:30.000Z
2019-01-22T01:14:30.000Z
tensorflow/python/kernel_tests/distributions/util_test.py
sokian/tensorflow
359f53686c87ee76e80353c32a3d22cfb1cf0989
[ "Apache-2.0" ]
null
null
null
tensorflow/python/kernel_tests/distributions/util_test.py
sokian/tensorflow
359f53686c87ee76e80353c32a3d22cfb1cf0989
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
36.836034
80
0.63914
from __future__ import absolute_import from __future__ import division from __future__ import print_function import importlib import numpy as np from tensorflow.python.eager import context from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.frame...
true
true
08fb2384d03e077655614a75bbe8cd854bc36db2
80
py
Python
ads/apps.py
dragonrathony/zed_market
c73f17501608c8fe86692c3c4f6e03fc8ba03286
[ "bzip2-1.0.6" ]
1
2020-06-17T13:45:54.000Z
2020-06-17T13:45:54.000Z
ads/apps.py
Honey4251996/zed_market
c73f17501608c8fe86692c3c4f6e03fc8ba03286
[ "bzip2-1.0.6" ]
11
2021-03-19T07:55:39.000Z
2022-03-12T00:34:55.000Z
ads/apps.py
Honey4251996/zed_market
c73f17501608c8fe86692c3c4f6e03fc8ba03286
[ "bzip2-1.0.6" ]
null
null
null
from django.apps import AppConfig class AdsConfig(AppConfig): name = 'ads'
16
33
0.7375
from django.apps import AppConfig class AdsConfig(AppConfig): name = 'ads'
true
true
08fb23abfaa8af5da4008affbb23e0bdf78bf8b8
626
py
Python
catalog/bindings/wfs/dcp.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
catalog/bindings/wfs/dcp.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
catalog/bindings/wfs/dcp.py
NIVANorge/s-enda-playground
56ae0a8978f0ba8a5546330786c882c31e17757a
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass, field from typing import Optional from bindings.wfs.http import Http __NAMESPACE__ = "http://www.opengis.net/ows/1.1" @dataclass class Dcp: """Information for one distributed Computing Platform (DCP) supported for this operation. At present, only the HTTP DCP is define...
22.357143
77
0.623003
from dataclasses import dataclass, field from typing import Optional from bindings.wfs.http import Http __NAMESPACE__ = "http://www.opengis.net/ows/1.1" @dataclass class Dcp: class Meta: name = "DCP" namespace = "http://www.opengis.net/ows/1.1" http: Optional[Http] = field( default=...
true
true
08fb2400250e86a67480a408ded230cb3ca4b473
1,177
py
Python
test_theano_gpu.py
hunse/speedtest
6e0edcd42d113a141b262d8d105c8f611dae63c4
[ "MIT" ]
null
null
null
test_theano_gpu.py
hunse/speedtest
6e0edcd42d113a141b262d8d105c8f611dae63c4
[ "MIT" ]
null
null
null
test_theano_gpu.py
hunse/speedtest
6e0edcd42d113a141b262d8d105c8f611dae63c4
[ "MIT" ]
null
null
null
from __future__ import print_function import os import timeit import numpy as np gpuflags = 'device=gpu,floatX=float32' if os.environ.has_key('THEANO_FLAGS'): os.environ['THEANO_FLAGS'] += gpuflags else: os.environ['THEANO_FLAGS'] = gpuflags import theano import theano.tensor as T dtype = theano.config.float...
24.520833
78
0.64401
from __future__ import print_function import os import timeit import numpy as np gpuflags = 'device=gpu,floatX=float32' if os.environ.has_key('THEANO_FLAGS'): os.environ['THEANO_FLAGS'] += gpuflags else: os.environ['THEANO_FLAGS'] = gpuflags import theano import theano.tensor as T dtype = theano.config.float...
true
true
08fb244516c2a3ebaf0bc988ce36b819b18323f1
6,197
py
Python
tests/test_helpers.py
wayfair-incubator/gbq
6843c999a9969c3a70c562b43efb349f2adc4ad6
[ "MIT" ]
6
2021-01-16T00:56:39.000Z
2022-01-01T18:19:54.000Z
tests/test_helpers.py
wayfair-incubator/gbq
6843c999a9969c3a70c562b43efb349f2adc4ad6
[ "MIT" ]
229
2021-01-14T17:36:41.000Z
2022-03-31T08:09:43.000Z
tests/test_helpers.py
wayfair-incubator/gbq
6843c999a9969c3a70c562b43efb349f2adc4ad6
[ "MIT" ]
1
2022-02-04T07:44:28.000Z
2022-02-04T07:44:28.000Z
from typing import List import pytest from google.cloud.bigquery import SchemaField from gbq.helpers import ( _check_if_map, _map_raw_dictionary_to_bq_schema, get_bq_credentials, get_bq_schema_from_json_schema, get_bq_schema_from_record, ) @pytest.fixture() def key_value_schema() -> List[SchemaF...
28.168182
81
0.621914
from typing import List import pytest from google.cloud.bigquery import SchemaField from gbq.helpers import ( _check_if_map, _map_raw_dictionary_to_bq_schema, get_bq_credentials, get_bq_schema_from_json_schema, get_bq_schema_from_record, ) @pytest.fixture() def key_value_schema() -> List[SchemaF...
true
true
08fb2498ed70058517f0fa9701a9649e6ece6dd6
8,184
py
Python
src/genie/libs/parser/iosxe/tests/ShowBgpAllNeighborsAdvertisedRoutes/cli/equal/golden_output3_expected.py
jmedina0911/genieparser
2fcd6d3e44891551af4b9d05e2c053218ee25c32
[ "Apache-2.0" ]
204
2018-06-27T00:55:27.000Z
2022-03-06T21:12:18.000Z
src/genie/libs/parser/iosxe/tests/ShowBgpAllNeighborsAdvertisedRoutes/cli/equal/golden_output3_expected.py
jmedina0911/genieparser
2fcd6d3e44891551af4b9d05e2c053218ee25c32
[ "Apache-2.0" ]
468
2018-06-19T00:33:18.000Z
2022-03-31T23:23:35.000Z
src/genie/libs/parser/iosxe/tests/ShowBgpAllNeighborsAdvertisedRoutes/cli/equal/golden_output3_expected.py
jmedina0911/genieparser
2fcd6d3e44891551af4b9d05e2c053218ee25c32
[ "Apache-2.0" ]
309
2019-01-16T20:21:07.000Z
2022-03-30T12:56:41.000Z
expected_output = { "vrf": { "default": { "neighbor": { "10.4.6.6": { "address_family": { "ipv4 unicast": { "advertised": { "10.1.1.0/24": { ...
51.471698
84
0.154692
expected_output = { "vrf": { "default": { "neighbor": { "10.4.6.6": { "address_family": { "ipv4 unicast": { "advertised": { "10.1.1.0/24": { ...
true
true
08fb25de730e288f1d90484d64f0fa838aaaa959
6,219
py
Python
qcreporter.py
kajeet1305/AfterQC
3c7016e893b9134e0c33178f7a988285f18949a0
[ "MIT" ]
188
2016-04-26T17:17:56.000Z
2022-03-10T12:25:20.000Z
qcreporter.py
kajeet1305/AfterQC
3c7016e893b9134e0c33178f7a988285f18949a0
[ "MIT" ]
40
2016-05-02T13:54:55.000Z
2022-01-12T22:09:12.000Z
qcreporter.py
kajeet1305/AfterQC
3c7016e893b9134e0c33178f7a988285f18949a0
[ "MIT" ]
66
2016-05-08T11:05:55.000Z
2021-09-17T12:15:22.000Z
import os,sys def formatDivID(str): str = str.replace(" ", "-") str = str.replace(".", "-") str = str.replace("/", "-") return str def formatNumber(num): num = float(num) unit = ["", "K", "M", "G", "T", "P"] order = 0 while num > 1024.0: order += 1 num /= 1024.0 if...
44.741007
400
0.553787
import os,sys def formatDivID(str): str = str.replace(" ", "-") str = str.replace(".", "-") str = str.replace("/", "-") return str def formatNumber(num): num = float(num) unit = ["", "K", "M", "G", "T", "P"] order = 0 while num > 1024.0: order += 1 num /= 1024.0 if...
true
true
08fb2606b000253294146a3428c66aa52adf179f
4,660
py
Python
hw3/hw3.py
benvcarr/algorithms_course
dc49e8abbb0be16ff43abf93f9b1e1fa5d9fe001
[ "Apache-2.0" ]
null
null
null
hw3/hw3.py
benvcarr/algorithms_course
dc49e8abbb0be16ff43abf93f9b1e1fa5d9fe001
[ "Apache-2.0" ]
null
null
null
hw3/hw3.py
benvcarr/algorithms_course
dc49e8abbb0be16ff43abf93f9b1e1fa5d9fe001
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python TEST_ARRAY = [-6, 12, -7, 0, 14, -7, 5] def main(): print largestSum(TEST_ARRAY) print getMinSteps(10) return def largestSum(array): # Initialize our two vars current_largest_sum = 0 sum_of_cur_subarray = 0 # Inspect each value of the array. for i in range(0, len(array)): # E...
35.037594
283
0.657082
TEST_ARRAY = [-6, 12, -7, 0, 14, -7, 5] def main(): print largestSum(TEST_ARRAY) print getMinSteps(10) return def largestSum(array): current_largest_sum = 0 sum_of_cur_subarray = 0 for i in range(0, len(array)): sum_of_cur_subarray = sum_of_cur_subarray + array[i] # If our addition ma...
false
true
08fb2768d2d5874de885f5d43d7256095d5a9669
483
py
Python
leads/migrations/0008_auto_20210304_1514.py
dEvBranco/django_CRM
0506916763a43029a512144b8032f5e59ea5b9a5
[ "MIT" ]
null
null
null
leads/migrations/0008_auto_20210304_1514.py
dEvBranco/django_CRM
0506916763a43029a512144b8032f5e59ea5b9a5
[ "MIT" ]
null
null
null
leads/migrations/0008_auto_20210304_1514.py
dEvBranco/django_CRM
0506916763a43029a512144b8032f5e59ea5b9a5
[ "MIT" ]
null
null
null
# Generated by Django 3.1.6 on 2021-03-04 15:14 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('leads', '0007_category_organization'), ] operations = [ migrations.AlterField( model_name='cate...
24.15
105
0.648033
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('leads', '0007_category_organization'), ] operations = [ migrations.AlterField( model_name='category', name='organization', ...
true
true
08fb28ae8f95974d844977d95ac923d211cb3057
3,307
py
Python
libraries/abstractions/ble_hal/test/ble_test_scipts/startTests_integration.py
dhrishi/amazon-freertos
1ca46178ed96c96f615328dec3bebb40c95ee02f
[ "MIT" ]
null
null
null
libraries/abstractions/ble_hal/test/ble_test_scipts/startTests_integration.py
dhrishi/amazon-freertos
1ca46178ed96c96f615328dec3bebb40c95ee02f
[ "MIT" ]
null
null
null
libraries/abstractions/ble_hal/test/ble_test_scipts/startTests_integration.py
dhrishi/amazon-freertos
1ca46178ed96c96f615328dec3bebb40c95ee02f
[ "MIT" ]
null
null
null
# # Amazon FreeRTOS BLE HAL V2.0.0 # Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, includ...
39.369048
82
0.762927
import Queue import sys import os import threading import securityAgent import testutils import time from testClass import runTest from bleAdapter import bleAdapter def main(): scan_filter = dict() bleAdapter.init() agent = securityAgent.createSecurityAgent() isTestSuccessFull = runTest.Advertise_Wi...
true
true
08fb2a3248b3cf77585f9130e4db68b7c154813f
4,094
py
Python
userbot/plugins/carbonRGB.py
udhay018777/ReaperUserbot
e69913dfde4e208352c12fe4ba23e01b2dbd7e32
[ "MIT" ]
null
null
null
userbot/plugins/carbonRGB.py
udhay018777/ReaperUserbot
e69913dfde4e208352c12fe4ba23e01b2dbd7e32
[ "MIT" ]
null
null
null
userbot/plugins/carbonRGB.py
udhay018777/ReaperUserbot
e69913dfde4e208352c12fe4ba23e01b2dbd7e32
[ "MIT" ]
2
2020-04-28T13:06:10.000Z
2020-07-01T13:48:28.000Z
"""Carbon Scraper Plugin for Userbot. //text in creative way. usage: .karb //as a reply to any text message Thanks to @pureindialover for THIS PLUGIN""" from selenium.webdriver.support.ui import Select from selenium.webdriver.chrome.options import Options from selenium import webdriver from telethon import events fro...
36.882883
235
0.604299
from selenium.webdriver.support.ui import Select from selenium.webdriver.chrome.options import Options from selenium import webdriver from telethon import events from urllib.parse import quote_plus from urllib.error import HTTPError from time import sleep import asyncio import os import random from userbot.utils impor...
true
true
08fb2a9b488ce550dabecbff1e9079cca8da41a9
1,029
py
Python
env/Road.py
byq-luo/Lane_change_RL
3409238db939e6722441219b4c2dc66033611069
[ "MIT" ]
4
2021-03-11T03:05:31.000Z
2022-03-22T08:45:20.000Z
env/Road.py
byq-luo/Lane_change_RL
3409238db939e6722441219b4c2dc66033611069
[ "MIT" ]
null
null
null
env/Road.py
byq-luo/Lane_change_RL
3409238db939e6722441219b4c2dc66033611069
[ "MIT" ]
5
2021-06-18T11:32:34.000Z
2021-12-31T08:10:51.000Z
import os, sys if 'SUMO_HOME' in os.environ: tools = os.path.join(os.environ['SUMO_HOME'], 'tools') sys.path.append(tools) print('success') else: sys.exit("please declare environment variable 'SUMO_HOME'") import traci class Road: def __init__(self): """ assume all lanes have the s...
34.3
78
0.680272
import os, sys if 'SUMO_HOME' in os.environ: tools = os.path.join(os.environ['SUMO_HOME'], 'tools') sys.path.append(tools) print('success') else: sys.exit("please declare environment variable 'SUMO_HOME'") import traci class Road: def __init__(self): self.warmupEdge = 'warm_up' sel...
true
true
08fb2ab7ad960369d1dff4c2668b10546c9e6ecf
16,114
py
Python
tests/profiles/name_test.py
eliheuer/fontbakery
4d69dd9ec69bea297139746559977a7821312bbe
[ "Apache-2.0" ]
null
null
null
tests/profiles/name_test.py
eliheuer/fontbakery
4d69dd9ec69bea297139746559977a7821312bbe
[ "Apache-2.0" ]
null
null
null
tests/profiles/name_test.py
eliheuer/fontbakery
4d69dd9ec69bea297139746559977a7821312bbe
[ "Apache-2.0" ]
null
null
null
import os import fontTools.ttLib from fontTools.ttLib import TTFont from fontbakery.utils import TEST_FILE, portable_path from fontbakery.constants import (NameID, PlatformID, WindowsEncodingID, WindowsLanguageID, ...
38.004717
126
0.694055
import os import fontTools.ttLib from fontTools.ttLib import TTFont from fontbakery.utils import TEST_FILE, portable_path from fontbakery.constants import (NameID, PlatformID, WindowsEncodingID, WindowsLanguageID, ...
true
true
08fb2acee08754dc15121dbb80052c47fc289db3
5,851
py
Python
ovl/visions/multi_vision.py
frc1937/ovl
1954edf0ab946dbb42d90eba1dac97eeb157c567
[ "Apache-2.0" ]
1
2021-05-13T12:15:29.000Z
2021-05-13T12:15:29.000Z
ovl/visions/multi_vision.py
frc1937/ovl
1954edf0ab946dbb42d90eba1dac97eeb157c567
[ "Apache-2.0" ]
null
null
null
ovl/visions/multi_vision.py
frc1937/ovl
1954edf0ab946dbb42d90eba1dac97eeb157c567
[ "Apache-2.0" ]
null
null
null
import numpy as np from typing import Union, List, Any, Generator, Tuple, Dict from ..utils.types import VisionLike from .ambient_vision import AmbientVision from ..connections.connection import * from ..connections.network_location import NetworkLocation class MultiVision: """ An object used to switch betwe...
35.676829
110
0.648436
import numpy as np from typing import Union, List, Any, Generator, Tuple, Dict from ..utils.types import VisionLike from .ambient_vision import AmbientVision from ..connections.connection import * from ..connections.network_location import NetworkLocation class MultiVision: def __init__(self, visions: Union[Lis...
true
true
08fb2b18b7c95803a31454c5f7aeca9be28c5426
104
py
Python
profetorch/core.py
sachinruk/ProFeTorch1
900ee134d824d9f6c8fc4b058053a9f6c7aa57eb
[ "Apache-2.0" ]
19
2019-11-15T07:30:58.000Z
2021-11-01T07:25:00.000Z
profetorch/core.py
sachinruk/ProFeTorch1
900ee134d824d9f6c8fc4b058053a9f6c7aa57eb
[ "Apache-2.0" ]
7
2019-12-18T02:47:19.000Z
2022-03-12T00:50:00.000Z
insights/core.py
saschahofmann/insights
5eccabb623f6ad02f98e94d11307e536d212016f
[ "Apache-2.0" ]
6
2019-12-18T00:15:12.000Z
2021-03-02T15:51:23.000Z
#AUTOGENERATED! DO NOT EDIT! File to edit: dev/00_core.ipynb (unless otherwise specified). __all__ = []
34.666667
90
0.75
__all__ = []
true
true
08fb2b18c30040bff7824b01f69dcacad9eed9ab
2,152
py
Python
tensor2tensor/models/neural_gpu_test.py
spacegoing/t2t_caps
ded708b738fa8966eb7544708c4a785479da4c3c
[ "Apache-2.0" ]
1
2019-03-02T15:59:06.000Z
2019-03-02T15:59:06.000Z
tensor2tensor/models/neural_gpu_test.py
spacegoing/t2t_caps
ded708b738fa8966eb7544708c4a785479da4c3c
[ "Apache-2.0" ]
null
null
null
tensor2tensor/models/neural_gpu_test.py
spacegoing/t2t_caps
ded708b738fa8966eb7544708c4a785479da4c3c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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...
34.15873
74
0.699349
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from tensor2tensor.data_generators import problem_hparams from tensor2tensor.layers import common_hparams from tensor2tensor.models import neural_gpu import tensorflow as tf class Neura...
true
true
08fb2b1be1ffb0a923eb2c40600b010b5ea6cd69
57,029
py
Python
thespian/system/admin/test/test_localConvention.py
godaddy/Thespian
2341eae2928a861820e9d71c3f7974bee3e34388
[ "MIT" ]
210
2015-08-31T19:39:34.000Z
2020-01-10T08:07:48.000Z
thespian/system/admin/test/test_localConvention.py
godaddy/Thespian
2341eae2928a861820e9d71c3f7974bee3e34388
[ "MIT" ]
55
2015-10-13T22:12:59.000Z
2018-07-24T22:21:21.000Z
thespian/system/admin/test/test_localConvention.py
godaddy/Thespian
2341eae2928a861820e9d71c3f7974bee3e34388
[ "MIT" ]
47
2015-09-01T19:24:20.000Z
2020-01-02T20:03:05.000Z
from thespian.actors import ActorAddress, ActorSystemConventionUpdate from thespian.system.messages.convention import (ConventionRegister, ConventionDeRegister, ConventionInvite) from thespian.system.admin.convention impor...
39.964261
106
0.597801
from thespian.actors import ActorAddress, ActorSystemConventionUpdate from thespian.system.messages.convention import (ConventionRegister, ConventionDeRegister, ConventionInvite) from thespian.system.admin.convention impor...
true
true
08fb2bacf68f689c586b9820d4eff54428bf060b
12,862
py
Python
SelfTest/Util/test_number.py
BarryYBL/Cryptos
dcb118d49f3568ed6bbad9919e29c33ce03c2f95
[ "Apache-2.0" ]
1
2019-12-23T03:35:06.000Z
2019-12-23T03:35:06.000Z
SelfTest/Util/test_number.py
BarryYBL/Cryptos
dcb118d49f3568ed6bbad9919e29c33ce03c2f95
[ "Apache-2.0" ]
null
null
null
SelfTest/Util/test_number.py
BarryYBL/Cryptos
dcb118d49f3568ed6bbad9919e29c33ce03c2f95
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # SelfTest/Util/test_number.py: Self-test for parts of the Crypro.Util.number module # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # th...
43.452703
303
0.612269
__revision__ = "$Id$" import sys if sys.version_info[0] == 2 and sys.version_info[1] == 1: from Crypro.Util.py21compat import * import unittest class MiscTests(unittest.TestCase): def setUp(self): global number, math from Crypro.Util import number import math def test_ceil_shi...
true
true
08fb2c8389df27d331ae998e15913c6dc21d7522
4,632
py
Python
vit/task.py
nfraprado/vit
7200949214362139e8073b6ca1a58cc756b2ebd0
[ "MIT" ]
1
2020-01-20T10:38:17.000Z
2020-01-20T10:38:17.000Z
vit/task.py
nfraprado/vit
7200949214362139e8073b6ca1a58cc756b2ebd0
[ "MIT" ]
null
null
null
vit/task.py
nfraprado/vit
7200949214362139e8073b6ca1a58cc756b2ebd0
[ "MIT" ]
null
null
null
import os from functools import reduce import tasklib from tasklib.task import Task from vit import util class TaskListModel(object): def __init__(self, task_config, reports, report=None, data_location=None): if not data_location: data_location = task_config.subtree('data.location') ...
30.473684
99
0.558506
import os from functools import reduce import tasklib from tasklib.task import Task from vit import util class TaskListModel(object): def __init__(self, task_config, reports, report=None, data_location=None): if not data_location: data_location = task_config.subtree('data.location') ...
true
true
08fb2ee2f8971e75179f25e82b084f4e688f69bb
19,775
py
Python
open_words/parse.py
ArchimedesDigital/open_words
c2792ba6022c9cb9a04f565f58805ef7e3223a02
[ "MIT" ]
27
2018-01-10T10:57:54.000Z
2022-03-12T15:51:32.000Z
open_words/parse.py
ArchimedesDigital/open_words
c2792ba6022c9cb9a04f565f58805ef7e3223a02
[ "MIT" ]
9
2017-11-12T17:07:27.000Z
2020-07-27T14:19:32.000Z
open_words/parse.py
ArchimedesDigital/open_words
c2792ba6022c9cb9a04f565f58805ef7e3223a02
[ "MIT" ]
7
2018-04-27T19:32:40.000Z
2020-10-26T18:27:44.000Z
""" Parse.py (relating to Words's parse.adb) Parse a word or list of input words and return word form and definition """ __author__ = "Luke Hollis <luke@archimedes.digital>" __license__ = "MIT License. See LICENSE." import string import re import pdb from copy import deepcopy from open_words.dict_line import WordsD...
26.978172
138
0.584678
__author__ = "Luke Hollis <luke@archimedes.digital>" __license__ = "MIT License. See LICENSE." import string import re import pdb from copy import deepcopy from open_words.dict_line import WordsDict from open_words.addons import LatinAddons from open_words.stem_list import Stems from open_words.uniques import Uniques...
true
true
08fb2f7f1ec22b6e1bb67e627043fe1061842aae
998
py
Python
CIFAR/tools.py
THUYimingLi/Open-sourced_Dataset_Protection
910962c57e7d132497443b26c8e5da1dcb5ba4eb
[ "Apache-2.0" ]
14
2020-11-16T03:57:19.000Z
2022-03-30T01:44:53.000Z
CIFAR/tools.py
THUYimingLi/Open-sourced_Dataset_Protection
910962c57e7d132497443b26c8e5da1dcb5ba4eb
[ "Apache-2.0" ]
null
null
null
CIFAR/tools.py
THUYimingLi/Open-sourced_Dataset_Protection
910962c57e7d132497443b26c8e5da1dcb5ba4eb
[ "Apache-2.0" ]
5
2020-11-16T03:56:00.000Z
2022-03-19T06:37:02.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from __future__ import print_function import torch import torch.nn as nn import torch.optim as optim import numpy as np from PIL import Image # Define the trigger appending transformation class TriggerAppending(object): ''' Args: trigger: the trigger ...
26.263158
98
0.617234
from __future__ import print_function import torch import torch.nn as nn import torch.optim as optim import numpy as np from PIL import Image class TriggerAppending(object): def __init__(self, trigger, alpha): self.trigger = np.array(trigger.clone().detach().permute(1, 2, 0)*255) self.alpha = n...
true
true
08fb2fba5e87b382279ede3f4888e6c68e1fbc8a
2,450
py
Python
keras_layers/keras_layer_L2Normalization.py
off99555/ssd_keras
363ba6b47d0e631e7272031f9054f7c7ebc0615e
[ "Apache-2.0" ]
null
null
null
keras_layers/keras_layer_L2Normalization.py
off99555/ssd_keras
363ba6b47d0e631e7272031f9054f7c7ebc0615e
[ "Apache-2.0" ]
null
null
null
keras_layers/keras_layer_L2Normalization.py
off99555/ssd_keras
363ba6b47d0e631e7272031f9054f7c7ebc0615e
[ "Apache-2.0" ]
null
null
null
''' A custom Keras layer to perform L2-normalization. Copyright (C) 2018 Pierluigi Ferrari 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 req...
34.507042
86
0.686531
from __future__ import division import numpy as np import tensorflow.keras.backend as K from tensorflow.keras.layers import InputSpec from tensorflow.keras.layers import Layer class L2Normalization(Layer): def __init__(self, gamma_init=20, **kwargs): if K.image_data_format() == 'channels_last': ...
true
true
08fb2ff68facf491dd7ad898c6df39844ebd1252
1,091
py
Python
waypoint2.py
tharunsnest/multi-robot-motion-capture-integration
fe333f616884d478b64bc6cf5a79430540817810
[ "BSD-2-Clause" ]
null
null
null
waypoint2.py
tharunsnest/multi-robot-motion-capture-integration
fe333f616884d478b64bc6cf5a79430540817810
[ "BSD-2-Clause" ]
null
null
null
waypoint2.py
tharunsnest/multi-robot-motion-capture-integration
fe333f616884d478b64bc6cf5a79430540817810
[ "BSD-2-Clause" ]
null
null
null
import rospy from nav_msgs.msg import Odometry from tf.transformations import euler_from_quaternion from geometry_msgs.msg import Point, Twist from math import atan2 x = 0.0 y = 0.0 theta = 0.0 def newOdom (msg): global x global y global theta x = msg.pose.pose.position.x y = msg.pose....
20.584906
89
0.614115
import rospy from nav_msgs.msg import Odometry from tf.transformations import euler_from_quaternion from geometry_msgs.msg import Point, Twist from math import atan2 x = 0.0 y = 0.0 theta = 0.0 def newOdom (msg): global x global y global theta x = msg.pose.pose.position.x y = msg.pose....
false
true
08fb3159aa3f0a3ace96ee5fda9a795498401931
3,663
py
Python
tests/test_functional.py
chrcoe/ccflasktest
613a9617cbb23db737ec0101316c74843404ad82
[ "BSD-3-Clause" ]
null
null
null
tests/test_functional.py
chrcoe/ccflasktest
613a9617cbb23db737ec0101316c74843404ad82
[ "BSD-3-Clause" ]
null
null
null
tests/test_functional.py
chrcoe/ccflasktest
613a9617cbb23db737ec0101316c74843404ad82
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Functional tests using WebTest. See: http://webtest.readthedocs.org/ """ import pytest from flask import url_for from ccflasktest.user.models import User from .factories import UserFactory class TestLoggingIn: def test_can_log_in_returns_200(self, user, testapp): # Goes to h...
32.415929
80
0.596506
import pytest from flask import url_for from ccflasktest.user.models import User from .factories import UserFactory class TestLoggingIn: def test_can_log_in_returns_200(self, user, testapp): res = testapp.get("/") form = res.forms['loginForm'] form['username'] = user.use...
true
true
08fb322c555e17d0f65e86e827c8b9862d1cf5e7
1,434
py
Python
tests/unit/test_sync_write_cache.py
iwanbolzern/mongodb-write-cache
cebe3bee9b2674aa5996838d661e72f8b442ffa1
[ "MIT" ]
null
null
null
tests/unit/test_sync_write_cache.py
iwanbolzern/mongodb-write-cache
cebe3bee9b2674aa5996838d661e72f8b442ffa1
[ "MIT" ]
null
null
null
tests/unit/test_sync_write_cache.py
iwanbolzern/mongodb-write-cache
cebe3bee9b2674aa5996838d661e72f8b442ffa1
[ "MIT" ]
null
null
null
from datetime import timedelta from threading import Event from unittest import TestCase from unittest.mock import Mock from pymongo_write_cache import SyncWriteCache class TestSyncCache(TestCase): def setUp(self) -> None: self.collection = Mock() self.subject = SyncWriteCache(self.collection, 1...
31.173913
80
0.688982
from datetime import timedelta from threading import Event from unittest import TestCase from unittest.mock import Mock from pymongo_write_cache import SyncWriteCache class TestSyncCache(TestCase): def setUp(self) -> None: self.collection = Mock() self.subject = SyncWriteCache(self.collection, 1...
true
true
08fb330b8c681c41ef0bd205bcad25d0b5756b6b
5,087
py
Python
docs/conf.py
brycefrank/treeseg
fee448712ee9bb4f582d9ea933bac37aaa7dc42f
[ "MIT" ]
13
2019-06-09T16:07:19.000Z
2021-09-23T07:44:16.000Z
docs/conf.py
brycefrank/treeseg
fee448712ee9bb4f582d9ea933bac37aaa7dc42f
[ "MIT" ]
null
null
null
docs/conf.py
brycefrank/treeseg
fee448712ee9bb4f582d9ea933bac37aaa7dc42f
[ "MIT" ]
5
2019-04-27T01:23:56.000Z
2020-09-21T08:32:23.000Z
# -*- coding: utf-8 -*- # # treeseg documentation build configuration file, created by # sphinx-quickstart on Sun May 19 13:25:03 2019. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
30.100592
79
0.681738
import os import sys sys.path.insert(0, os.path.abspath('..')) extensions = ['sphinx.ext.autodoc'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'treeseg' copyright = u'2019, Bryce Frank' author = u'Bryce Frank' # |version| and |release|, also used in various other pla...
true
true
08fb331a03770199bb531355f58cc562661a7f49
29,105
py
Python
framework/utils/mathUtils.py
sonatsen/raven
30764491e7ecaa16de2a4e0ddab3bc9e169e5f95
[ "Apache-2.0" ]
2
2019-10-11T15:59:10.000Z
2021-04-08T18:23:57.000Z
framework/utils/mathUtils.py
sonatsen/raven
30764491e7ecaa16de2a4e0ddab3bc9e169e5f95
[ "Apache-2.0" ]
1
2018-03-27T13:06:00.000Z
2018-03-27T13:06:00.000Z
framework/utils/mathUtils.py
sonatsen/raven
30764491e7ecaa16de2a4e0ddab3bc9e169e5f95
[ "Apache-2.0" ]
1
2017-08-29T16:09:13.000Z
2017-08-29T16:09:13.000Z
# Copyright 2017 Battelle Energy Alliance, 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 t...
40.763305
253
0.661089
from __future__ import division, print_function, unicode_literals, absolute_import import warnings warnings.simplefilter('default',DeprecationWarning) import sys import math import functools import copy import scipy from scipy import interpolate, stats, integrate import numpy as np import six from utils.utils import ...
true
true
08fb343b6335fa52bbfddf7edb22cb9438af007e
1,719
py
Python
experiments/manual_play/v2/random_defense/manual_vs_random/run.py
FredericoNesti/gym-idsgame
4170cb5cb3ec787adf5911364e0c6395412b9de9
[ "MIT" ]
15
2020-10-07T12:28:37.000Z
2022-03-10T01:23:46.000Z
experiments/manual_play/v2/random_defense/manual_vs_random/run.py
FredericoNesti/gym-idsgame
4170cb5cb3ec787adf5911364e0c6395412b9de9
[ "MIT" ]
2
2020-10-07T01:44:05.000Z
2022-03-10T12:07:43.000Z
experiments/manual_play/v2/random_defense/manual_vs_random/run.py
FredericoNesti/gym-idsgame
4170cb5cb3ec787adf5911364e0c6395412b9de9
[ "MIT" ]
5
2021-02-11T15:47:26.000Z
2022-03-30T17:42:25.000Z
import os from gym_idsgame.config.runner_mode import RunnerMode from gym_idsgame.agents.dao.agent_type import AgentType from gym_idsgame.config.client_config import ClientConfig from gym_idsgame.runnner import Runner from experiments.util import util def default_output_dir() -> str: """ :return: the default ou...
28.180328
104
0.687609
import os from gym_idsgame.config.runner_mode import RunnerMode from gym_idsgame.agents.dao.agent_type import AgentType from gym_idsgame.config.client_config import ClientConfig from gym_idsgame.runnner import Runner from experiments.util import util def default_output_dir() -> str: script_dir = os.path.dirname(__...
true
true
08fb3629e6358af2863cc63276f89504af04edaa
16,738
py
Python
taming/models/vqgan.py
basanovase/taming-transformers
c30d4c0be67428fb63d0188b658d83a12fb4595f
[ "MIT" ]
null
null
null
taming/models/vqgan.py
basanovase/taming-transformers
c30d4c0be67428fb63d0188b658d83a12fb4595f
[ "MIT" ]
null
null
null
taming/models/vqgan.py
basanovase/taming-transformers
c30d4c0be67428fb63d0188b658d83a12fb4595f
[ "MIT" ]
null
null
null
import torch import torch.nn.functional as F import pytorch_lightning as pl from taming_transformers.main import instantiate_from_config from taming.modules.diffusionmodules.model import Encoder, Decoder from taming.modules.vqvae.quantize import VectorQuantizer2 as VectorQuantizer from taming.modules.vqvae.quantize i...
41.328395
120
0.553232
import torch import torch.nn.functional as F import pytorch_lightning as pl from taming_transformers.main import instantiate_from_config from taming.modules.diffusionmodules.model import Encoder, Decoder from taming.modules.vqvae.quantize import VectorQuantizer2 as VectorQuantizer from taming.modules.vqvae.quantize i...
true
true
08fb362ef46efdb4c2ef48beae6d0fbe23bd5567
1,249
py
Python
robot/robot.py
frc1418/newboty
41ec47bfd3a3c98313ad59a8517037407c9617f9
[ "MIT" ]
null
null
null
robot/robot.py
frc1418/newboty
41ec47bfd3a3c98313ad59a8517037407c9617f9
[ "MIT" ]
null
null
null
robot/robot.py
frc1418/newboty
41ec47bfd3a3c98313ad59a8517037407c9617f9
[ "MIT" ]
null
null
null
import magicbot import wpilib from robotpy_ext.control.button_debouncer import ButtonDebouncer from wpilib.buttons import JoystickButton from components import drive import wpilib.drive class Bot(magicbot.MagicRobot): drive: drive.Drive def createObjects(self): # Joysticks self.joystick = wp...
26.020833
115
0.6253
import magicbot import wpilib from robotpy_ext.control.button_debouncer import ButtonDebouncer from wpilib.buttons import JoystickButton from components import drive import wpilib.drive class Bot(magicbot.MagicRobot): drive: drive.Drive def createObjects(self): self.joystick = wpilib.Joystic...
true
true
08fb36697e5299297524493dd8f47c041ac2a2f0
6,649
py
Python
kubernetes/client/models/v1alpha1_audit_sink.py
palnabarun/Python
6b01c95e1673c0787d3d688b361bfd995d62dd98
[ "Apache-2.0" ]
null
null
null
kubernetes/client/models/v1alpha1_audit_sink.py
palnabarun/Python
6b01c95e1673c0787d3d688b361bfd995d62dd98
[ "Apache-2.0" ]
7
2020-11-07T10:35:21.000Z
2022-02-07T03:06:25.000Z
kubernetes/client/models/v1alpha1_audit_sink.py
palnabarun/python
6b01c95e1673c0787d3d688b361bfd995d62dd98
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.18 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
32.753695
312
0.623252
import pprint import re import six from kubernetes.client.configuration import Configuration class V1alpha1AuditSink(object): openapi_types = { 'api_version': 'str', 'kind': 'str', 'metadata': 'V1ObjectMeta', 'spec': 'V1alpha1AuditSinkSpec' } attribute_map = { ...
true
true
08fb36883ec060b9eee34dbe7445b2fdc9681a9a
1,228
py
Python
randomizer/hacks.py
hmsjayne/ffr-hmsj
2fdae0788c1a6f5d6ac57c05ebbf7ba3c4e31f99
[ "Apache-2.0" ]
3
2020-01-19T03:42:46.000Z
2021-07-29T02:22:27.000Z
randomizer/hacks.py
hmsjayne/ffr-hmsj
2fdae0788c1a6f5d6ac57c05ebbf7ba3c4e31f99
[ "Apache-2.0" ]
25
2019-06-16T02:17:17.000Z
2021-08-07T03:25:03.000Z
randomizer/hacks.py
hmsjayne/ffr-hmsj
2fdae0788c1a6f5d6ac57c05ebbf7ba3c4e31f99
[ "Apache-2.0" ]
1
2020-04-02T01:48:28.000Z
2020-04-02T01:48:28.000Z
# Copyright 2020 Nicole Borrelli # # 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...
34.111111
75
0.724756
from stream.outputstream import OutputStream def trivial_enemies(enemies: list): for index in range(0x80): enemies[index].max_hp = 1 enemies[index].exp_reward = max(enemies[index].exp_reward, 1000) enemies[index].gil_reward = max(enemies[index].gil_reward, 1000) def enable_early_magic_b...
true
true
08fb36d08e1fb1ce393edffd80ac2da5148ce68f
1,990
py
Python
tfc_web/traffic/migrations/0001_initial.py
SmartCambridge/tfc_web
ac16b3c2aa5200320e9ffa9d270fb409b98ed55d
[ "MIT" ]
2
2018-10-28T20:15:23.000Z
2019-03-29T09:06:09.000Z
tfc_web/traffic/migrations/0001_initial.py
SmartCambridge/tfc_web
ac16b3c2aa5200320e9ffa9d270fb409b98ed55d
[ "MIT" ]
107
2018-10-22T06:57:07.000Z
2020-09-15T14:43:03.000Z
tfc_web/traffic/migrations/0001_initial.py
SmartCambridge/tfc_web
ac16b3c2aa5200320e9ffa9d270fb409b98ed55d
[ "MIT" ]
1
2020-03-20T19:49:29.000Z
2020-03-20T19:49:29.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-03-24 20:16 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Trip'...
40.612245
114
0.570352
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Trip', fields=[ ('id', models.AutoField(auto_create...
true
true
08fb38aa3c2707686d9e2d6ac0288da65267126d
1,642
py
Python
setup.py
codejamninja/sphinx-to-jekyll
d3e6f48da9d6f48d74b1b050dae3096ae7eaf294
[ "MIT" ]
null
null
null
setup.py
codejamninja/sphinx-to-jekyll
d3e6f48da9d6f48d74b1b050dae3096ae7eaf294
[ "MIT" ]
null
null
null
setup.py
codejamninja/sphinx-to-jekyll
d3e6f48da9d6f48d74b1b050dae3096ae7eaf294
[ "MIT" ]
null
null
null
from codecs import open from os import path from setuptools import setup, find_packages here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() install_requires = list() with open(path.join(here, 'requirements.txt'), 'r', encoding='u...
33.510204
75
0.648599
from codecs import open from os import path from setuptools import setup, find_packages here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() install_requires = list() with open(path.join(here, 'requirements.txt'), 'r', encoding='u...
true
true
08fb3a99c9f519d378acb022ca7ea2631acb3f7f
1,056
py
Python
gr/model/atividades/Atividade.py
Aresjr/Guerreiro
c378836d8d5b41cba8585170459a070eed673356
[ "Apache-2.0" ]
null
null
null
gr/model/atividades/Atividade.py
Aresjr/Guerreiro
c378836d8d5b41cba8585170459a070eed673356
[ "Apache-2.0" ]
4
2020-07-11T00:20:57.000Z
2020-08-06T11:58:23.000Z
gr/model/atividades/Atividade.py
Aresjr/Guerreiro
c378836d8d5b41cba8585170459a070eed673356
[ "Apache-2.0" ]
null
null
null
from app import db from gr.model.atividades.Estagio import Estagio from gr.model.atividades.Projeto import Projeto from gr.model.atividades.TipoAtividade import TipoAtividade from gr.model.usuario.Usuario import Usuario class Atividade(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) ...
40.615385
74
0.751894
from app import db from gr.model.atividades.Estagio import Estagio from gr.model.atividades.Projeto import Projeto from gr.model.atividades.TipoAtividade import TipoAtividade from gr.model.usuario.Usuario import Usuario class Atividade(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) ...
true
true
08fb3adf2bc06dbc4f055dfbdfb8476d2b28eaf3
564
py
Python
pandas_ml/skaccessors/pipeline.py
matsavage/pandas-ml
794cddc8dc5d0a49fbc9734d826d9465078f376e
[ "BSD-3-Clause" ]
305
2016-02-21T06:35:25.000Z
2022-03-30T11:53:31.000Z
pandas_ml/skaccessors/pipeline.py
matsavage/pandas-ml
794cddc8dc5d0a49fbc9734d826d9465078f376e
[ "BSD-3-Clause" ]
69
2016-02-16T08:10:46.000Z
2022-03-04T14:36:12.000Z
pandas_ml/skaccessors/pipeline.py
matsavage/pandas-ml
794cddc8dc5d0a49fbc9734d826d9465078f376e
[ "BSD-3-Clause" ]
73
2016-02-16T08:27:28.000Z
2022-03-10T06:57:51.000Z
#!/usr/bin/env python from pandas_ml.core.accessor import _AccessorMethods class PipelineMethods(_AccessorMethods): """ Accessor to ``sklearn.pipeline``. """ _module_name = 'sklearn.pipeline' @property def make_pipeline(self): """``sklearn.pipeline.make_pipeline``""" ...
23.5
53
0.625887
from pandas_ml.core.accessor import _AccessorMethods class PipelineMethods(_AccessorMethods): _module_name = 'sklearn.pipeline' @property def make_pipeline(self): return self._module.make_pipeline @property def make_union(self): return self._module...
true
true
08fb3b0f09bef69859f2f466045ffb7c3ea80ac0
4,856
py
Python
mindspore/python/mindspore/nn/reinforcement/tensor_array.py
zhz44/mindspore
6044d34074c8505dd4b02c0a05419cbc32a43f86
[ "Apache-2.0" ]
1
2022-03-05T02:59:21.000Z
2022-03-05T02:59:21.000Z
mindspore/python/mindspore/nn/reinforcement/tensor_array.py
zhz44/mindspore
6044d34074c8505dd4b02c0a05419cbc32a43f86
[ "Apache-2.0" ]
null
null
null
mindspore/python/mindspore/nn/reinforcement/tensor_array.py
zhz44/mindspore
6044d34074c8505dd4b02c0a05419cbc32a43f86
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Huawei Technologies Co., Ltd # # 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...
33.722222
113
0.616763
from mindspore.nn.cell import Cell from mindspore.ops.operations import _tensor_array as ta from mindspore._checkparam import Rel, Validator from mindspore.common import dtype as mstype class TensorArray(Cell): def __init__(self, dtype, element_shape, dynamic_size=True, size=0, name="TA"): super(TensorArr...
true
true
08fb3b127cee3733b25c71985e03b17f1d2f0ed6
5,074
py
Python
django_sms_toolkit/models.py
pascal-financial/django-sms-toolkit
04018e9515c4a2e58baa10d63a59bab0883aafbd
[ "Apache-2.0" ]
null
null
null
django_sms_toolkit/models.py
pascal-financial/django-sms-toolkit
04018e9515c4a2e58baa10d63a59bab0883aafbd
[ "Apache-2.0" ]
null
null
null
django_sms_toolkit/models.py
pascal-financial/django-sms-toolkit
04018e9515c4a2e58baa10d63a59bab0883aafbd
[ "Apache-2.0" ]
null
null
null
import uuid from django.conf import settings from django.contrib.auth import get_user_model from django.core.exceptions import ValidationError from django.db import models from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from .settings import DJANGO_SMS_TOOLKIT_SETTINGS clas...
37.036496
142
0.677375
import uuid from django.conf import settings from django.contrib.auth import get_user_model from django.core.exceptions import ValidationError from django.db import models from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from .settings import DJANGO_SMS_TOOLKIT_SETTINGS clas...
true
true
08fb3b4362501ed12463053e41ec4a48692ae94d
1,570
py
Python
app/application.py
anonamousemapper/genderratiomap
a0f969d3b977c6231b3b5fe1efbb9dfa1bce9d9d
[ "MIT" ]
1
2020-04-12T15:44:36.000Z
2020-04-12T15:44:36.000Z
app/application.py
anonamousemapper/genderratiomap
a0f969d3b977c6231b3b5fe1efbb9dfa1bce9d9d
[ "MIT" ]
null
null
null
app/application.py
anonamousemapper/genderratiomap
a0f969d3b977c6231b3b5fe1efbb9dfa1bce9d9d
[ "MIT" ]
null
null
null
import datetime from geometry import get_geometry from models import application from stats import get_stats from util import get_fidelity from flask import jsonify, render_template, request @application.route('/') def index(): return render_template('index.html') @application.route('/json/update_criteria', method...
29.074074
76
0.732484
import datetime from geometry import get_geometry from models import application from stats import get_stats from util import get_fidelity from flask import jsonify, render_template, request @application.route('/') def index(): return render_template('index.html') @application.route('/json/update_criteria', method...
true
true
08fb3ca261d8b6a7911e310605611f2142715b6f
434
py
Python
data/scripts/templates/object/tangible/bank/shared_character_bank.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/tangible/bank/shared_character_bank.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/tangible/bank/shared_character_bank.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/bank/shared_character_bank.iff" result.attribute_template_id = -1 ...
25.529412
67
0.718894
from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/bank/shared_character_bank.iff" result.attribute_template_id = -1 result.stfName("item_n","bank") return result
true
true
08fb3dd31b93c0b044c415860a25a5f9c8475e58
16,354
py
Python
anionRecogniser.py
chemiczny/PDB_supramolecular_search
524ebad2c979779b20dcd90c2657fd725b1051d0
[ "Beerware" ]
null
null
null
anionRecogniser.py
chemiczny/PDB_supramolecular_search
524ebad2c979779b20dcd90c2657fd725b1051d0
[ "Beerware" ]
null
null
null
anionRecogniser.py
chemiczny/PDB_supramolecular_search
524ebad2c979779b20dcd90c2657fd725b1051d0
[ "Beerware" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Apr 21 14:04:23 2018 @author: michal """ from configure import configure configure() from Bio.PDB import Selection, NeighborSearch from ringDetection import getSubstituents, isFlat, isFlatPrimitive, molecule2graph from anionTemplateCreator import a...
37.682028
135
0.576678
from configure import configure configure() from Bio.PDB import Selection, NeighborSearch from ringDetection import getSubstituents, isFlat, isFlatPrimitive, molecule2graph from anionTemplateCreator import anionMatcher import json from os.path import join from glob import glob from networkx.readwrite.json_graph im...
true
true
08fb3fa4e17a5533fb322038a2dd4c113ca9732b
3,379
py
Python
dash_carbon_components/MultiSelectFilterable.py
Matheus-Rangel/dash-carbon-components
e3f4aa4a8d649e2740db32677040f2548ef5da48
[ "Apache-2.0" ]
4
2021-04-25T22:55:25.000Z
2021-12-10T04:52:30.000Z
dash_carbon_components/MultiSelectFilterable.py
Matheus-Rangel/dash-carbon-components
e3f4aa4a8d649e2740db32677040f2548ef5da48
[ "Apache-2.0" ]
null
null
null
dash_carbon_components/MultiSelectFilterable.py
Matheus-Rangel/dash-carbon-components
e3f4aa4a8d649e2740db32677040f2548ef5da48
[ "Apache-2.0" ]
null
null
null
# AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class MultiSelectFilterable(Component): """A MultiSelectFilterable component. MultiSelect Keyword arguments: - disabled (boolean; optional): Disable the control - style (dict; optional) - locale (string;...
63.754717
439
0.717668
from dash.development.base_component import Component, _explicitize_args class MultiSelectFilterable(Component): @_explicitize_args def __init__(self, disabled=Component.UNDEFINED, style=Component.UNDEFINED, locale=Component.UNDEFINED, light=Component.UNDEFINED, selectionFeedback=Component.UNDEFINED, directi...
true
true
08fb3fe02f277fc356de4aefc054ce8e0e50eb5a
7,021
py
Python
tests/test_server.py
skalarproduktraum/synapse
c831748f4d243d74e9a3fd2042bc2b35cc30f961
[ "Apache-2.0" ]
1
2019-05-01T11:05:51.000Z
2019-05-01T11:05:51.000Z
tests/test_server.py
skalarproduktraum/synapse
c831748f4d243d74e9a3fd2042bc2b35cc30f961
[ "Apache-2.0" ]
null
null
null
tests/test_server.py
skalarproduktraum/synapse
c831748f4d243d74e9a3fd2042bc2b35cc30f961
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 New Vector Ltd # # 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 writin...
34.586207
88
0.65062
import logging import re from six import StringIO from twisted.internet.defer import Deferred from twisted.python.failure import Failure from twisted.test.proto_helpers import AccumulatingProtocol from twisted.web.resource import Resource from twisted.web.server import NOT_DONE_YET from synapse.api.errors import Co...
true
true
08fb408f23e2581101143d2861f86923d07a53a2
1,823
py
Python
flypy/runtime/obj/typeobject.py
filmackay/flypy
d64e70959c5c8af9e914dcc3ce1068fb99859c3a
[ "BSD-2-Clause" ]
null
null
null
flypy/runtime/obj/typeobject.py
filmackay/flypy
d64e70959c5c8af9e914dcc3ce1068fb99859c3a
[ "BSD-2-Clause" ]
null
null
null
flypy/runtime/obj/typeobject.py
filmackay/flypy
d64e70959c5c8af9e914dcc3ce1068fb99859c3a
[ "BSD-2-Clause" ]
1
2020-01-01T00:43:24.000Z
2020-01-01T00:43:24.000Z
# -*- coding: utf-8 -*- """ Number interfaces. """ from __future__ import print_function, division, absolute_import from flypy import jit, cjit from flypy.compiler import lltype from ..lowlevel_impls import add_impl_cls __all__ = ['Type'] #===------------------------------------------------------------------=== # ...
26.42029
77
0.500274
from __future__ import print_function, division, absolute_import from flypy import jit, cjit from flypy.compiler import lltype from ..lowlevel_impls import add_impl_cls __all__ = ['Type'] def index_type(argtypes): ctor, ty = argtypes ctor = type(ctor.parameters[0]).impl ty = ty.parameters[0] retur...
true
true
08fb40abb8203bc5d4e13a67f9b6786ec9841bf7
339
py
Python
ocs_ci/cleanup/aws/defaults.py
anubhav-here/ocs-ci
cf922411c721922f58d852167ff9ab8a8a6e15a6
[ "MIT" ]
null
null
null
ocs_ci/cleanup/aws/defaults.py
anubhav-here/ocs-ci
cf922411c721922f58d852167ff9ab8a8a6e15a6
[ "MIT" ]
null
null
null
ocs_ci/cleanup/aws/defaults.py
anubhav-here/ocs-ci
cf922411c721922f58d852167ff9ab8a8a6e15a6
[ "MIT" ]
null
null
null
""" Defaults module for AWS cleanup """ AWS_REGION = 'us-east-2' CLUSTER_PREFIXES_SPECIAL_RULES = { 'jnk': 36, 'dnd': 'never', 'lr1': 24, 'lr2': 48, 'lr3': 72, 'lr4': 96, 'lr5': 120 } MINIMUM_CLUSTER_RUNNING_TIME = 10 AWS_CLOUDFORMATION_TAG = 'aws:cloudformation:stack-name' CONFIRMATION_ANSWER = 'yes-i-am-sure-...
28.25
74
0.690265
AWS_REGION = 'us-east-2' CLUSTER_PREFIXES_SPECIAL_RULES = { 'jnk': 36, 'dnd': 'never', 'lr1': 24, 'lr2': 48, 'lr3': 72, 'lr4': 96, 'lr5': 120 } MINIMUM_CLUSTER_RUNNING_TIME = 10 AWS_CLOUDFORMATION_TAG = 'aws:cloudformation:stack-name' CONFIRMATION_ANSWER = 'yes-i-am-sure-i-want-to-proceed'
true
true
08fb4160bd55459318006668ce13eff0a05f3682
2,164
py
Python
rex/exploit/techniques/shellcode_leak_address.py
SiameseJuly/rex
15fccefc20eb1413a04d5ef0dbc0e6f501856b8a
[ "BSD-2-Clause" ]
1
2021-01-22T11:25:40.000Z
2021-01-22T11:25:40.000Z
rex/exploit/techniques/shellcode_leak_address.py
SiameseJuly/rex
15fccefc20eb1413a04d5ef0dbc0e6f501856b8a
[ "BSD-2-Clause" ]
null
null
null
rex/exploit/techniques/shellcode_leak_address.py
SiameseJuly/rex
15fccefc20eb1413a04d5ef0dbc0e6f501856b8a
[ "BSD-2-Clause" ]
1
2018-07-17T03:00:20.000Z
2018-07-17T03:00:20.000Z
import logging import claripy from rex import Vulnerability from rex.exploit import CannotExploit from rex.exploit.cgc import CGCType2ShellcodeExploit from ..technique import Technique l = logging.getLogger("rex.exploit.techniques.shellcode_leak_address") class ShellcodeLeakAddress(Technique): name = "shellcode_...
34.903226
99
0.691312
import logging import claripy from rex import Vulnerability from rex.exploit import CannotExploit from rex.exploit.cgc import CGCType2ShellcodeExploit from ..technique import Technique l = logging.getLogger("rex.exploit.techniques.shellcode_leak_address") class ShellcodeLeakAddress(Technique): name = "shellcode_...
true
true
08fb4204846ddfd38001119604f95cd31a2b5922
5,905
py
Python
src/modules/critics/pair_coma.py
johannestreutlein/op-tie-breaking
ef9dada6c14efa416ecb4f1fcf48a7e4b344ba27
[ "Apache-1.1" ]
2
2021-06-17T16:31:23.000Z
2021-06-20T07:34:31.000Z
src/modules/critics/pair_coma.py
johannestreutlein/op-tie-breaking
ef9dada6c14efa416ecb4f1fcf48a7e4b344ba27
[ "Apache-1.1" ]
null
null
null
src/modules/critics/pair_coma.py
johannestreutlein/op-tie-breaking
ef9dada6c14efa416ecb4f1fcf48a7e4b344ba27
[ "Apache-1.1" ]
null
null
null
import torch as th import torch.nn as nn import torch.nn.functional as F class PairComaCritic(nn.Module): def __init__(self, scheme, args): super(PairComaCritic, self).__init__() self.args = args self.n_actions = args.n_actions self.n_agents = args.n_agents input_shape = ...
41.879433
142
0.607113
import torch as th import torch.nn as nn import torch.nn.functional as F class PairComaCritic(nn.Module): def __init__(self, scheme, args): super(PairComaCritic, self).__init__() self.args = args self.n_actions = args.n_actions self.n_agents = args.n_agents input_shape = ...
true
true
08fb42b493ca2a6bd7e4d0193de68dbf8309d6ca
972
py
Python
migrations/versions/4303e8fe15ab_.py
kirankumarsripati/udacity-nd0044-01-fyyur
23cbef9725286adb86f0bcb0fc027e9a7161f1b2
[ "MIT" ]
null
null
null
migrations/versions/4303e8fe15ab_.py
kirankumarsripati/udacity-nd0044-01-fyyur
23cbef9725286adb86f0bcb0fc027e9a7161f1b2
[ "MIT" ]
null
null
null
migrations/versions/4303e8fe15ab_.py
kirankumarsripati/udacity-nd0044-01-fyyur
23cbef9725286adb86f0bcb0fc027e9a7161f1b2
[ "MIT" ]
null
null
null
"""empty message Revision ID: 4303e8fe15ab Revises: a62871231f34 Create Date: 2020-05-09 16:03:42.330221 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '4303e8fe15ab' down_revision = 'a62871231f34' branch_labels = None depends_on = None def upgrade(): # ...
26.27027
65
0.673868
from alembic import op import sqlalchemy as sa revision = '4303e8fe15ab' down_revision = 'a62871231f34' branch_labels = None depends_on = None def upgrade(): op.create_table('Show', sa.Column('id', sa.Integer(), nullable=False), sa.Column('venue_id', sa.Integer(), nullable=False), sa.Column('art...
true
true
08fb42cf864c96c80e775c42dcc33e0f40c7620c
898
py
Python
vendor/pygments/tests/test_clexer.py
ooyala/pastedown
d0f74f7f1c4e870390b830a5c2a35a507f0b7bfb
[ "MIT" ]
88
2015-03-26T21:40:48.000Z
2022-02-27T05:21:41.000Z
thirdparty/pygments/tests/test_clexer.py
ipwnosx/hatebin
cafb8d34adeb13fc2187b6fb2b6fea34ad4c64ef
[ "MIT" ]
3
2017-12-28T16:49:19.000Z
2021-03-31T05:15:51.000Z
thirdparty/pygments/tests/test_clexer.py
ipwnosx/hatebin
cafb8d34adeb13fc2187b6fb2b6fea34ad4c64ef
[ "MIT" ]
13
2015-03-26T21:24:22.000Z
2022-01-10T13:23:14.000Z
# -*- coding: utf-8 -*- """ Basic CLexer Test ~~~~~~~~~~~~~~~~~ :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import unittest import os from pygments.token import Text, Number from pygments.lexers import CLexer class CLexerTest(unitte...
28.0625
70
0.580178
import unittest import os from pygments.token import Text, Number from pygments.lexers import CLexer class CLexerTest(unittest.TestCase): def setUp(self): self.lexer = CLexer() def testNumbers(self): code = '42 23.42 23. .42 023 0xdeadbeef 23e+42 42e-23' wanted = [] for ite...
true
true
08fb437f59a7e47cfaef3c6c74e2cb2a7374a83c
539
py
Python
src/package/test/test_hridya_rectangle.py
h-varma/actions-example-iulusoy
bbfbc35a1ae4d90dd982d174a63853622d9c4a7e
[ "MIT" ]
2
2021-03-11T12:21:28.000Z
2021-03-22T08:15:42.000Z
src/package/test/test_hridya_rectangle.py
h-varma/actions-example-iulusoy
bbfbc35a1ae4d90dd982d174a63853622d9c4a7e
[ "MIT" ]
7
2021-03-11T14:55:12.000Z
2021-04-12T11:01:20.000Z
src/package/test/test_hridya_rectangle.py
h-varma/actions-example-iulusoy
bbfbc35a1ae4d90dd982d174a63853622d9c4a7e
[ "MIT" ]
null
null
null
import unittest import hridya_rectangle as hr class TestHridyaRectangle(unittest.TestCase): def test_positivity(self): self.assertRaises(ValueError, hr.rectangle, -1, 0) self.assertRaises(ValueError, hr.rectangle, 2, -2) self.assertRaises(ValueError, hr.rectangle, -2, 2) def test_valu...
26.95
68
0.686456
import unittest import hridya_rectangle as hr class TestHridyaRectangle(unittest.TestCase): def test_positivity(self): self.assertRaises(ValueError, hr.rectangle, -1, 0) self.assertRaises(ValueError, hr.rectangle, 2, -2) self.assertRaises(ValueError, hr.rectangle, -2, 2) def test_valu...
true
true
08fb4479231b0ddf241b19ea7bf824a6c5f7ee28
343
py
Python
plugins/labels/kivy.py
cmmpay/cpwallet-cmm
44b96d7c5ec500d13dbd128dd472c55eb4e0b2a8
[ "MIT" ]
null
null
null
plugins/labels/kivy.py
cmmpay/cpwallet-cmm
44b96d7c5ec500d13dbd128dd472c55eb4e0b2a8
[ "MIT" ]
1
2021-11-15T17:48:48.000Z
2021-11-15T17:48:48.000Z
plugins/labels/kivy.py
cmmpay/cpwallet-cmm
44b96d7c5ec500d13dbd128dd472c55eb4e0b2a8
[ "MIT" ]
null
null
null
from .labels import LabelsPlugin from electrum_commercium.plugins import hook class Plugin(LabelsPlugin): @hook def load_wallet(self, wallet, window): self.window = window self.start_wallet(wallet) def on_pulled(self, wallet): self.print_error('on pulled') self.window._tri...
22.866667
45
0.702624
from .labels import LabelsPlugin from electrum_commercium.plugins import hook class Plugin(LabelsPlugin): @hook def load_wallet(self, wallet, window): self.window = window self.start_wallet(wallet) def on_pulled(self, wallet): self.print_error('on pulled') self.window._tri...
true
true
08fb4578ed163126f5a38b267d9d7fc027b0d094
725
py
Python
app/services/default_image.py
Poketnans/capstone-q3
38d550a54ff41387534241df85eb8aa8c9b6ba7e
[ "MIT" ]
null
null
null
app/services/default_image.py
Poketnans/capstone-q3
38d550a54ff41387534241df85eb8aa8c9b6ba7e
[ "MIT" ]
4
2022-03-03T12:47:02.000Z
2022-03-08T18:10:34.000Z
app/services/default_image.py
Poketnans/capstone-q3
38d550a54ff41387534241df85eb8aa8c9b6ba7e
[ "MIT" ]
1
2022-03-17T14:21:30.000Z
2022-03-17T14:21:30.000Z
from PIL import Image from app.classes.image_file import ImageFile def generate_image_default() -> ImageFile: ''' Gera uma imagem automaticamente para a instancia da classe e retorna um objeto de `ImageFile` com image_mimetype,image_bin e image_filename. ''' url_image = "./app/assets/image_defaul...
27.884615
148
0.677241
from PIL import Image from app.classes.image_file import ImageFile def generate_image_default() -> ImageFile: url_image = "./app/assets/image_default.png" image_mimetype: str = None image_bin = None image_filename = "filename" image = Image.open(url_image) image_mimetype = image.get_format_m...
true
true
08fb458851df40b1ab689ca49c65f7c392de3740
866
py
Python
core/config.py
Saphyel/recipes
b1b67ffe9ed5ddd27bc67a3887a8e9a82614e89a
[ "MIT" ]
null
null
null
core/config.py
Saphyel/recipes
b1b67ffe9ed5ddd27bc67a3887a8e9a82614e89a
[ "MIT" ]
null
null
null
core/config.py
Saphyel/recipes
b1b67ffe9ed5ddd27bc67a3887a8e9a82614e89a
[ "MIT" ]
null
null
null
import os import secrets from pathlib import Path from typing import Final from fastapi.security import OAuth2PasswordBearer from fastapi.templating import Jinja2Templates from passlib.context import CryptContext BASE_PATH = Path(__file__).resolve().parent.parent templates = Jinja2Templates(directory=f"{BASE_PATH}/te...
29.862069
118
0.736721
import os import secrets from pathlib import Path from typing import Final from fastapi.security import OAuth2PasswordBearer from fastapi.templating import Jinja2Templates from passlib.context import CryptContext BASE_PATH = Path(__file__).resolve().parent.parent templates = Jinja2Templates(directory=f"{BASE_PATH}/te...
true
true
08fb45bd8ab24a5770234e031ea399908bfa98a8
1,674
py
Python
opt1.py
dineshresearch/Real_time_vehicle_tracking
310d9cad9d151675c96fec3e5a103489ee9b2f46
[ "MIT" ]
null
null
null
opt1.py
dineshresearch/Real_time_vehicle_tracking
310d9cad9d151675c96fec3e5a103489ee9b2f46
[ "MIT" ]
null
null
null
opt1.py
dineshresearch/Real_time_vehicle_tracking
310d9cad9d151675c96fec3e5a103489ee9b2f46
[ "MIT" ]
null
null
null
import numpy as np import cv2 cap = cv2.VideoCapture('vtest.avi') # params for ShiTomasi corner detection feature_params = dict( maxCorners = 100, qualityLevel = 0.3, minDistance = 7, blockSize = 7 ) # Parameters for lucas kanade optical flow lk_pa...
27.9
89
0.625448
import numpy as np import cv2 cap = cv2.VideoCapture('vtest.avi') feature_params = dict( maxCorners = 100, qualityLevel = 0.3, minDistance = 7, blockSize = 7 ) lk_params = dict( winSize = (15,15), maxLevel = 2, ...
true
true
08fb462e5a3fc8737abfaff9220462a0fd1b2582
7,269
py
Python
applications/popart/faster-rcnn/check_tput.py
payoto/graphcore_examples
46d2b7687b829778369fc6328170a7b14761e5c6
[ "MIT" ]
260
2019-11-18T01:50:00.000Z
2022-03-28T23:08:53.000Z
applications/popart/faster-rcnn/check_tput.py
payoto/graphcore_examples
46d2b7687b829778369fc6328170a7b14761e5c6
[ "MIT" ]
27
2020-01-28T23:07:50.000Z
2022-02-14T15:37:06.000Z
applications/popart/faster-rcnn/check_tput.py
payoto/graphcore_examples
46d2b7687b829778369fc6328170a7b14761e5c6
[ "MIT" ]
56
2019-11-18T02:13:12.000Z
2022-02-28T14:36:09.000Z
# Copyright (c) 2021 Graphcore Ltd. All rights reserved. # Written by Hu Di import argparse import torch import time import numpy as np import os import sys sys.path.append('./IPU') import shutil import cv2 import random from models.get_model import make_model from gc_session import Session from ipu_tensor import gcop ...
33.652778
142
0.713991
import argparse import torch import time import numpy as np import os import sys sys.path.append('./IPU') import shutil import cv2 import random from models.get_model import make_model from gc_session import Session from ipu_tensor import gcop from datasets.data_loader import get_data_loader from utils import logger fr...
true
true