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
08f24fbaf67e197c6ad27bd050c9754e571892d6
234
py
Python
src/node/mod.py
onurkaraman/perseus
0adbacf4d98ac1ee20319be3e4189ebe6fb3ba94
[ "MIT" ]
3
2015-09-03T23:35:21.000Z
2021-02-28T13:13:59.000Z
src/node/mod.py
onurkaraman/perseus
0adbacf4d98ac1ee20319be3e4189ebe6fb3ba94
[ "MIT" ]
null
null
null
src/node/mod.py
onurkaraman/perseus
0adbacf4d98ac1ee20319be3e4189ebe6fb3ba94
[ "MIT" ]
1
2016-07-05T16:55:45.000Z
2016-07-05T16:55:45.000Z
from base import Base import helper class Module(Base): def compile(self): return helper.format( ''' (function(){ %(body)s }).call(this) ''', self )
18
29
0.435897
from base import Base import helper class Module(Base): def compile(self): return helper.format( ''' (function(){ %(body)s }).call(this) ''', self )
true
true
08f250b44c61409dccc51392c4d78a7058b50090
46,929
py
Python
nevow/test/test_newflat.py
schwabe/nevow
12fce8aed130aeab74352e232666f3c5a2223817
[ "MIT" ]
null
null
null
nevow/test/test_newflat.py
schwabe/nevow
12fce8aed130aeab74352e232666f3c5a2223817
[ "MIT" ]
null
null
null
nevow/test/test_newflat.py
schwabe/nevow
12fce8aed130aeab74352e232666f3c5a2223817
[ "MIT" ]
null
null
null
# Copyright (c) 2008 Divmod. # See LICENSE for details. """ Tests for L{nevow._flat}. """ import sys, traceback, io from zope.interface import implementer from twisted.trial.unittest import TestCase from twisted.internet.defer import Deferred, succeed from twisted.python import compat from nevow.inevow import IReq...
34.710799
90
0.603806
""" Tests for L{nevow._flat}. """ import sys, traceback, io from zope.interface import implementer from twisted.trial.unittest import TestCase from twisted.internet.defer import Deferred, succeed from twisted.python import compat from nevow.inevow import IRequest, IQ, IRenderable, IData from nevow._flat import Fla...
false
true
08f250da155c246a3295407533c44860d96da8b5
518
py
Python
function/function.py
pingszi/PythonDemo
119827001ad6e66b97922919a1cb319a7d627146
[ "Apache-2.0" ]
1
2019-05-21T09:07:29.000Z
2019-05-21T09:07:29.000Z
function/function.py
pingszi/PythonDemo
119827001ad6e66b97922919a1cb319a7d627146
[ "Apache-2.0" ]
null
null
null
function/function.py
pingszi/PythonDemo
119827001ad6e66b97922919a1cb319a7d627146
[ "Apache-2.0" ]
null
null
null
from functools import reduce from itertools import groupby """ @desc :函数式编程 @author Pings @date 2018/04/27 @version V1.0 """ # **把函数本身赋值给变量 f = abs print(f(-10)) # **map函数示例 def f(x): return x * x r = map(f, [1, 2, 3, 4, 5]) print(list(r)) # **reduce函数示例 def add(x, y): return x + y r = reduce(add, [1, 3...
13.631579
37
0.602317
from functools import reduce from itertools import groupby f = abs print(f(-10)) def f(x): return x * x r = map(f, [1, 2, 3, 4, 5]) print(list(r)) def add(x, y): return x + y r = reduce(add, [1, 3, 5, 7, 9]) print(r) s = '可减按cvcc征收车1234辆购置税的乘用车购置日期如何确定?' print(s[::-1]) s = "adfdfdr4tetewtrwetew3erwrwer"...
true
true
08f2510e6e680f42b1c8e30e75ff5ffa3bb4ec13
11,641
py
Python
tf_quant_finance/experimental/dates/date_tensor_test.py
kuangche-james/tf-quant-finance
25251a75ab19147e72f89704f841ed41fbc354db
[ "Apache-2.0" ]
1
2021-09-01T06:27:02.000Z
2021-09-01T06:27:02.000Z
tf_quant_finance/experimental/dates/date_tensor_test.py
bacoco/tf-quant-finance
25251a75ab19147e72f89704f841ed41fbc354db
[ "Apache-2.0" ]
null
null
null
tf_quant_finance/experimental/dates/date_tensor_test.py
bacoco/tf-quant-finance
25251a75ab19147e72f89704f841ed41fbc354db
[ "Apache-2.0" ]
1
2021-09-01T06:26:57.000Z
2021-09-01T06:26:57.000Z
# Lint as: python3 # Copyright 2019 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 agr...
42.330909
95
0.685422
import datetime import numpy as np import tensorflow.compat.v2 as tf from tf_quant_finance.experimental import dates as dateslib from tf_quant_finance.experimental.dates import test_data from tensorflow.python.framework import test_util @test_util.run_all_in_graph_and_eager_modes class DateTensorTest(tf.test.TestC...
true
true
08f25169f751b7eef94642a29cce942a62335d38
2,214
py
Python
nmdc_runtime/site/backup/nmdcdb_mongodump.py
microbiomedata/nmdc-runtime
c5f0e245b3d2bc3ae4ccb8d78c479de8c0c445db
[ "Apache-2.0" ]
2
2021-09-14T16:24:58.000Z
2022-02-22T21:45:08.000Z
nmdc_runtime/site/backup/nmdcdb_mongodump.py
microbiomedata/nmdc-runtime
c5f0e245b3d2bc3ae4ccb8d78c479de8c0c445db
[ "Apache-2.0" ]
79
2021-05-04T22:00:22.000Z
2022-03-31T16:35:46.000Z
nmdc_runtime/site/backup/nmdcdb_mongodump.py
microbiomedata/nmdc-runtime
c5f0e245b3d2bc3ae4ccb8d78c479de8c0c445db
[ "Apache-2.0" ]
1
2021-04-21T16:07:21.000Z
2021-04-21T16:07:21.000Z
""" Usage: $ export $(grep -v '^#' .env | xargs) $ nmdcdb-mongoexport """ import os import subprocess import warnings from datetime import datetime, timezone from pathlib import Path import dagster warnings.filterwarnings("ignore", category=dagster.ExperimentalWarning) from nmdc_runtime.site.repository import run_c...
34.061538
87
0.68925
import os import subprocess import warnings from datetime import datetime, timezone from pathlib import Path import dagster warnings.filterwarnings("ignore", category=dagster.ExperimentalWarning) from nmdc_runtime.site.repository import run_config_frozen__normal_env from nmdc_runtime.site.resources import get_mongo...
true
true
08f253371c5bd83ff64b36d1609021c82256fe4b
6,502
py
Python
utils/crappifiers.py
BPHO-Salk/PSSR
8cf5ae91a7716b365017441fb57e07d3b9631558
[ "BSD-3-Clause" ]
69
2019-08-18T11:33:40.000Z
2022-03-28T17:47:40.000Z
utils/crappifiers.py
Photonics-Precision-Technologies/PSSR
a90b7d208d4369946500a70a6f31c44e3367e4c7
[ "BSD-3-Clause" ]
3
2021-03-02T05:48:47.000Z
2021-06-17T12:51:26.000Z
utils/crappifiers.py
Photonics-Precision-Technologies/PSSR
a90b7d208d4369946500a70a6f31c44e3367e4c7
[ "BSD-3-Clause" ]
24
2019-09-03T14:27:26.000Z
2022-03-15T13:47:12.000Z
import numpy as np from skimage import filters from skimage.util import random_noise, img_as_ubyte, img_as_float from scipy.ndimage.interpolation import zoom as npzoom from skimage.transform import rescale import PIL def no_crap(img, scale=4, upsample=False): from skimage.transform import rescale x = np.array(...
32.348259
74
0.637342
import numpy as np from skimage import filters from skimage.util import random_noise, img_as_ubyte, img_as_float from scipy.ndimage.interpolation import zoom as npzoom from skimage.transform import rescale import PIL def no_crap(img, scale=4, upsample=False): from skimage.transform import rescale x = np.array(...
true
true
08f25352a554cdb5d546cb7ef5dc170b4115a1d7
2,346
py
Python
tests/cupy_tests/manipulation_tests/test_split.py
weareno1/cupy
ac52cce00b69d97b5d99bd1f91caed720b32b2d3
[ "MIT" ]
1
2019-04-15T00:06:09.000Z
2019-04-15T00:06:09.000Z
tests/cupy_tests/manipulation_tests/test_split.py
shreyasbapat/cupy
321ab5368ce6091bf7a4d86cfe1a63ff3352b1c4
[ "MIT" ]
null
null
null
tests/cupy_tests/manipulation_tests/test_split.py
shreyasbapat/cupy
321ab5368ce6091bf7a4d86cfe1a63ff3352b1c4
[ "MIT" ]
null
null
null
import unittest from cupy import testing @testing.gpu class TestSplit(unittest.TestCase): @testing.numpy_cupy_array_equal() def test_array_split1(self, xp): a = testing.shaped_arange((3, 11), xp) split = xp.array_split(a, 4, 1) return xp.concatenate(split, 1) @testing.numpy_cupy...
31.28
50
0.624467
import unittest from cupy import testing @testing.gpu class TestSplit(unittest.TestCase): @testing.numpy_cupy_array_equal() def test_array_split1(self, xp): a = testing.shaped_arange((3, 11), xp) split = xp.array_split(a, 4, 1) return xp.concatenate(split, 1) @testing.numpy_cupy...
true
true
08f2540936ffd40b1b9ae0fb2bd30489c9aa4bff
32,133
py
Python
autobahn/twisted/wamp.py
om26er/autobahn-python
467bc2f830bfbd8f572fc697e1137531b24f0b48
[ "MIT" ]
null
null
null
autobahn/twisted/wamp.py
om26er/autobahn-python
467bc2f830bfbd8f572fc697e1137531b24f0b48
[ "MIT" ]
1
2018-10-19T09:21:26.000Z
2018-10-19T09:21:26.000Z
autobahn/twisted/wamp.py
om26er/autobahn-python
467bc2f830bfbd8f572fc697e1137531b24f0b48
[ "MIT" ]
null
null
null
############################################################################### # # The MIT License (MIT) # # Copyright (c) Crossbar.io Technologies GmbH # # 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 ...
37.062284
150
0.604332
from __future__ import absolute_import import six import inspect import binascii import random import txaio txaio.use_twisted() from twisted.internet.defer import inlineCallbacks, succeed from autobahn.util import public from autobahn.websocket.util import parse_url as parse_ws_url from autobahn.rawsocket.util i...
true
true
08f255144783cd5740cdb918c56d2fb5cb0532ad
3,458
py
Python
tests/lm_plots_test.py
JoaoLages/ecco
0ef61c51b76c48cd8c21c7807c20510565f307de
[ "BSD-3-Clause" ]
1
2022-01-02T17:23:53.000Z
2022-01-02T17:23:53.000Z
tests/lm_plots_test.py
JoaoLages/ecco
0ef61c51b76c48cd8c21c7807c20510565f307de
[ "BSD-3-Clause" ]
null
null
null
tests/lm_plots_test.py
JoaoLages/ecco
0ef61c51b76c48cd8c21c7807c20510565f307de
[ "BSD-3-Clause" ]
null
null
null
import pytest import numpy as np from ecco import lm_plots import os class TestLMPlots: def test_save_rankings_plot(self, rankings_plot_data_1): lm_plots.plot_inner_token_rankings(**rankings_plot_data_1, save_file_path='./tmp/ranking_1.png') def test_save_ranking_watch_plot(self, ranking_watch_data_...
42.691358
116
0.291498
import pytest import numpy as np from ecco import lm_plots import os class TestLMPlots: def test_save_rankings_plot(self, rankings_plot_data_1): lm_plots.plot_inner_token_rankings(**rankings_plot_data_1, save_file_path='./tmp/ranking_1.png') def test_save_ranking_watch_plot(self, ranking_watch_data_...
true
true
08f2558c1f64cc50291edeba360e2c8820a2e350
3,197
py
Python
zairachem/automl/autogluon.py
ersilia-os/ersilia-automl-chem
fabb1f05d17cff11ec0e084495eed4c0152f2f63
[ "MIT" ]
null
null
null
zairachem/automl/autogluon.py
ersilia-os/ersilia-automl-chem
fabb1f05d17cff11ec0e084495eed4c0152f2f63
[ "MIT" ]
null
null
null
zairachem/automl/autogluon.py
ersilia-os/ersilia-automl-chem
fabb1f05d17cff11ec0e084495eed4c0152f2f63
[ "MIT" ]
null
null
null
import os import shutil import numpy as np import pandas as pd from ..tools.autogluon.multilabel import MultilabelPredictor, TabularDataset AUTOGLUON_TIME_BUDGET_SECONDS = 600 AUTOGLUON_MINIMUM_TIME_BUDGET_SECONDS = 600 AUTOGLUON_MAXIMUM_TIME_BUDGET_SECONDS = 1800 class AutoGluonEstimator(object): def __init__(s...
31.653465
77
0.585862
import os import shutil import numpy as np import pandas as pd from ..tools.autogluon.multilabel import MultilabelPredictor, TabularDataset AUTOGLUON_TIME_BUDGET_SECONDS = 600 AUTOGLUON_MINIMUM_TIME_BUDGET_SECONDS = 600 AUTOGLUON_MAXIMUM_TIME_BUDGET_SECONDS = 1800 class AutoGluonEstimator(object): def __init__(s...
true
true
08f2568353305c148b8b18d85acff21c3499f8bf
6,323
py
Python
graphql/__init__.py
tr11/graphql-asyncio
6e8e4ff0555b0d5b6668d5ada321a8899b753217
[ "MIT" ]
null
null
null
graphql/__init__.py
tr11/graphql-asyncio
6e8e4ff0555b0d5b6668d5ada321a8899b753217
[ "MIT" ]
null
null
null
graphql/__init__.py
tr11/graphql-asyncio
6e8e4ff0555b0d5b6668d5ada321a8899b753217
[ "MIT" ]
null
null
null
''' GraphQL.js provides a reference implementation for the GraphQL specification but is also a useful utility for operating on GraphQL files and building sophisticated tools. This primary module exports a general purpose function for fulfilling all steps of the GraphQL specification in a single operation, but also inc...
22.108392
81
0.695872
from .pyutils.version import get_version from .graphql import ( graphql ) from .type import ( GraphQLSchema, GraphQLScalarType, GraphQLObjectType, GraphQLInterfaceType, GraphQLUnionType, GraphQLEnumType, GraphQLInputObjectType, GraphQLList, GraphQLNonNull, GraphQLFiel...
true
true
08f25746f96c19dbdccfdeba715b70b5a5a3a540
10,598
py
Python
nltk/corpus/reader/bracket_parse.py
anonymityBoy/nltk
0372828498f9fc47835530c4db93ff0778602538
[ "Apache-2.0" ]
2
2020-12-24T16:00:48.000Z
2020-12-24T16:00:50.000Z
nltk/corpus/reader/bracket_parse.py
anonymityBoy/nltk
0372828498f9fc47835530c4db93ff0778602538
[ "Apache-2.0" ]
null
null
null
nltk/corpus/reader/bracket_parse.py
anonymityBoy/nltk
0372828498f9fc47835530c4db93ff0778602538
[ "Apache-2.0" ]
null
null
null
# Natural Language Toolkit: Penn Treebank Reader # # Copyright (C) 2001-2020 NLTK Project # Author: Steven Bird <stevenbird1@gmail.com> # Edward Loper <edloper@gmail.com> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ Corpus reader for corpora that consist of parenthesis-delineated par...
38.820513
87
0.594169
import sys from nltk.tree import Tree from nltk.tag import map_tag from nltk.corpus.reader.util import * from nltk.corpus.reader.api import * SORTTAGWRD = re.compile(r"\((\d+) ([^\s()]+) ([^\s()]+)\)") TAGWORD = re.compile(r"\(([^\s()]+) ([^\s()]+)\)") WORD = re.compile(r"\([^\s()]+ ([^\s()]+)\)") EMPTY_BRACKETS = ...
true
true
08f259539ae4030c2db1989f54fdd5546fe6329d
5,413
py
Python
colour/models/rgb/transfer_functions/tests/test_filmic_pro.py
BPearlstine/colour
40f0281295496774d2a19eee017d50fd0c265bd8
[ "Cube", "BSD-3-Clause" ]
2
2020-05-03T20:15:42.000Z
2021-04-09T18:19:06.000Z
colour/models/rgb/transfer_functions/tests/test_filmic_pro.py
BPearlstine/colour
40f0281295496774d2a19eee017d50fd0c265bd8
[ "Cube", "BSD-3-Clause" ]
null
null
null
colour/models/rgb/transfer_functions/tests/test_filmic_pro.py
BPearlstine/colour
40f0281295496774d2a19eee017d50fd0c265bd8
[ "Cube", "BSD-3-Clause" ]
1
2019-12-11T19:48:27.000Z
2019-12-11T19:48:27.000Z
# -*- coding: utf-8 -*- """ Defines unit tests for :mod:`colour.models.rgb.transfer_functions.filmic_pro` module. """ from __future__ import division, unicode_literals import numpy as np import unittest from colour.models.rgb.transfer_functions import (log_encoding_FilmicPro6, ...
32.220238
79
0.653057
from __future__ import division, unicode_literals import numpy as np import unittest from colour.models.rgb.transfer_functions import (log_encoding_FilmicPro6, log_decoding_FilmicPro6) from colour.utilities import domain_range_scale, ignore_numpy_errors __author__ =...
true
true
08f259c95099531dfe5c274d7198d03c0ca381ac
163
py
Python
cellartracker/const.py
Mccall85/cellartracker
02935ea91c9ec91bbb58773009f705e3bee78196
[ "MIT" ]
3
2020-05-26T00:47:42.000Z
2022-02-08T08:09:23.000Z
cellartracker/const.py
Mccall85/cellartracker
02935ea91c9ec91bbb58773009f705e3bee78196
[ "MIT" ]
8
2020-08-14T20:55:02.000Z
2022-01-31T03:16:38.000Z
cellartracker/const.py
mathroule/cellartracker
b3dd9b4be58e72528cc86b02efac692b8d76295e
[ "MIT" ]
1
2022-02-04T09:16:41.000Z
2022-02-04T09:16:41.000Z
"""Constants for CellarTracker.""" BASE_URL = "https://www.cellartracker.com/xlquery.asp" NOT_LOGGED_REPONSE = "You are currently not logged into CellarTracker."
32.6
71
0.773006
BASE_URL = "https://www.cellartracker.com/xlquery.asp" NOT_LOGGED_REPONSE = "You are currently not logged into CellarTracker."
true
true
08f25abe1f2a9a28cba65138f716a5a08d017450
22,061
py
Python
setup.py
bjonen/pandas
e7943458c0858227b3bd5d67583e0a2bca448f1d
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
2
2015-09-03T17:39:02.000Z
2017-12-31T15:39:02.000Z
setup.py
bjonen/pandas
e7943458c0858227b3bd5d67583e0a2bca448f1d
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
setup.py
bjonen/pandas
e7943458c0858227b3bd5d67583e0a2bca448f1d
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
1
2015-09-03T17:39:05.000Z
2015-09-03T17:39:05.000Z
#!/usr/bin/env python """ Parts of this file were taken from the pyzmq project (https://github.com/zeromq/pyzmq) which have been permitted for use under the BSD license. Parts are from lxml (https://github.com/lxml/lxml) """ import os import sys import shutil import warnings import re # may need to work around setup...
35.241214
97
0.574906
import os import sys import shutil import warnings import re try: import Cython sys.path.insert(0, os.path.join(os.path.dirname(__file__), "fake_pyrex")) except ImportError: pass try: import pkg_resources try: pkg_resources.require("setuptools>=0.6c5") except pkg_resources.VersionCon...
true
true
08f25ac88ab345627fbf0b5e192a9e2c0267deff
9,545
py
Python
support/db/mysql_db.py
emaste-r/doctor_spider
7527fb3010dbe1f52f4455d512080a094a62fa7b
[ "MIT" ]
null
null
null
support/db/mysql_db.py
emaste-r/doctor_spider
7527fb3010dbe1f52f4455d512080a094a62fa7b
[ "MIT" ]
null
null
null
support/db/mysql_db.py
emaste-r/doctor_spider
7527fb3010dbe1f52f4455d512080a094a62fa7b
[ "MIT" ]
null
null
null
# coding: utf8 import logging import MySQLdb import MySQLdb.cursors from common import config from common import constant from myutil import config_tool # logging = mylog.logging class DBConnection(object): def __init__(self, dbs_read, dbs_write=None): # logging.debug("will create db instance, callsta...
40.274262
119
0.542902
import logging import MySQLdb import MySQLdb.cursors from common import config from common import constant from myutil import config_tool class DBConnection(object): def __init__(self, dbs_read, dbs_write=None): print "will create db instance, callstack:>>>>>>>>>", dbs_read, dbs_write ...
false
true
08f25b1f26d37f2123560498ed7646a8c3efb7db
9,056
py
Python
src/js/macros.py
radimkohout/v8-new
f6dc1d17efcc695a6f2dd7bcc50c0c6321747613
[ "BSD-3-Clause" ]
5
2015-03-04T17:49:04.000Z
2017-04-17T10:10:13.000Z
src/js/macros.py
radimkohout/v8-new
f6dc1d17efcc695a6f2dd7bcc50c0c6321747613
[ "BSD-3-Clause" ]
null
null
null
src/js/macros.py
radimkohout/v8-new
f6dc1d17efcc695a6f2dd7bcc50c0c6321747613
[ "BSD-3-Clause" ]
1
2018-10-24T15:04:59.000Z
2018-10-24T15:04:59.000Z
# Copyright 2006-2009 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of co...
45.969543
161
0.729792
define NONE = 0; define READ_ONLY = 1; define DONT_ENUM = 2; define DONT_DELETE = 4; define kMaxSafeInteger = 9007199254740991; define kMaxUint32 = 4294967295; macro IS_ARRAY(arg) = (%_IsArray(arg)); macro IS_ARRAYBUFFER(arg) = (%_ClassOf(arg) === 'ArrayBuffer'); macro IS_BOOLEAN(arg) ...
false
true
08f25b971bf319779aff77b2daf5399f8da30448
4,559
py
Python
api/lib/cmdb/cache.py
lilixiang/cmdb
d60857c26b9b81c8a33b72548b637cbde8782fe1
[ "MIT" ]
1
2020-02-15T00:13:45.000Z
2020-02-15T00:13:45.000Z
api/lib/cmdb/cache.py
lilixiang/cmdb
d60857c26b9b81c8a33b72548b637cbde8782fe1
[ "MIT" ]
null
null
null
api/lib/cmdb/cache.py
lilixiang/cmdb
d60857c26b9b81c8a33b72548b637cbde8782fe1
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- import six if six.PY2: import sys reload(sys) sys.setdefaultencoding("utf-8") from api.extensions import cache from api.models.cmdb import Attribute from api.models.cmdb import CIType from api.models.cmdb import CITypeAttribute from api.models.cmdb import RelationType class Attrib...
32.798561
104
0.568765
import six if six.PY2: import sys reload(sys) sys.setdefaultencoding("utf-8") from api.extensions import cache from api.models.cmdb import Attribute from api.models.cmdb import CIType from api.models.cmdb import CITypeAttribute from api.models.cmdb import RelationType class AttributeCache(object): @...
true
true
08f25e1ad9ca3669a831e0048bfe908a0da53e69
759
py
Python
unisan/lemlit/migrations/0015_suratketeranganpenelitianmahasiswa.py
kurniantoska/ichsan_proj
f79cbcb896df902e129dcdb2affc89dc4f3844ef
[ "Apache-2.0" ]
null
null
null
unisan/lemlit/migrations/0015_suratketeranganpenelitianmahasiswa.py
kurniantoska/ichsan_proj
f79cbcb896df902e129dcdb2affc89dc4f3844ef
[ "Apache-2.0" ]
2
2022-02-12T05:49:41.000Z
2022-02-12T17:40:30.000Z
unisan/lemlit/migrations/0015_suratketeranganpenelitianmahasiswa.py
kurniantoska/ichsan_proj
f79cbcb896df902e129dcdb2affc89dc4f3844ef
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-09-04 15:28 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('lemlit', '0014_auto_20170904_0210'), ] operations ...
31.625
234
0.679842
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('lemlit', '0014_auto_20170904_0210'), ] operations = [ migrations.CreateModel( name='SuratKeteranganPene...
true
true
08f25ee674ace1888da15e2cdaef219909386491
5,709
py
Python
ocsw/api/connector.py
maxim-s-barabash/ocsw
c4be22624427f9dfa58a78cff1db85186803f4dc
[ "MIT" ]
1
2020-08-02T07:19:01.000Z
2020-08-02T07:19:01.000Z
ocsw/api/connector.py
maxim-s-barabash/ocsw
c4be22624427f9dfa58a78cff1db85186803f4dc
[ "MIT" ]
null
null
null
ocsw/api/connector.py
maxim-s-barabash/ocsw
c4be22624427f9dfa58a78cff1db85186803f4dc
[ "MIT" ]
null
null
null
"""Cloud Action. A Cloud Action transforms Events and routes them between Streams. Transformations are done via optional JavaScript. """ from ..errors import InvalidResource from ..utils.query_params import query_params OBJECT_TYPE = "connector" class ConnectorApiMixin: async def connectors(self, company_name=...
38.06
79
0.562971
from ..errors import InvalidResource from ..utils.query_params import query_params OBJECT_TYPE = "connector" class ConnectorApiMixin: async def connectors(self, company_name=None, **query): url = self._url( "{base_url}/{company_name}/{object_type}", company_name=company_name or s...
true
true
08f25eeee773af1512fc09fe6aaada67bdbf59d4
10,632
py
Python
cogs/m10s_games.py
mii-10/program-team
e8ff65c31a309b2c2aa56ffb143a582a1fa22aff
[ "MIT" ]
12
2020-01-06T11:49:53.000Z
2021-07-22T14:59:00.000Z
cogs/m10s_games.py
mii-10/program-team
e8ff65c31a309b2c2aa56ffb143a582a1fa22aff
[ "MIT" ]
30
2020-01-04T13:40:49.000Z
2022-01-17T11:49:52.000Z
cogs/m10s_games.py
mii-10/program-team
e8ff65c31a309b2c2aa56ffb143a582a1fa22aff
[ "MIT" ]
31
2020-01-04T13:22:19.000Z
2021-02-06T09:07:01.000Z
# -*- coding: utf-8 -*- import discord from discord.ext import commands import random import time import asyncio import m10s_util as ut class games(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command() async def game2(self, ctx): answer = random.randint(1, 100) ...
54.244898
260
0.509782
import discord from discord.ext import commands import random import time import asyncio import m10s_util as ut class games(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command() async def game2(self, ctx): answer = random.randint(1, 100) await ctx.send(ctx....
true
true
08f25f1dc229973c54d470e29a3ceb43843c9914
2,512
py
Python
pythonapi/common_tools.py
sunset768541/ctw-baseline
f303f9ae0477ef2aa1fe56426a28e0ed9a0a89f8
[ "MIT" ]
333
2018-03-09T12:50:49.000Z
2022-02-10T04:02:50.000Z
pythonapi/common_tools.py
sunset768541/ctw-baseline
f303f9ae0477ef2aa1fe56426a28e0ed9a0a89f8
[ "MIT" ]
43
2018-03-19T08:11:28.000Z
2021-03-03T08:19:35.000Z
pythonapi/common_tools.py
sunset768541/ctw-baseline
f303f9ae0477ef2aa1fe56426a28e0ed9a0a89f8
[ "MIT" ]
105
2018-03-15T10:17:50.000Z
2021-11-08T02:46:26.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import functools import json import operator import os import threading from six.moves import queue def synchronized(lock): def wrap(f): ...
25.896907
91
0.57922
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import functools import json import operator import os import threading from six.moves import queue def synchronized(lock): def wrap(f): def newFunction(*...
true
true
08f2605eb372db8969d3c4b562f3fd6b63e7e137
1,530
py
Python
examples/TRPO/real_nvp_cheetah.py
angelolovatto/raylab
ebaea8df1a391fb844e75df62ccf1e2e07311d88
[ "MIT" ]
29
2020-05-05T13:25:33.000Z
2022-01-03T14:12:29.000Z
examples/TRPO/real_nvp_cheetah.py
angelolovatto/raylab
ebaea8df1a391fb844e75df62ccf1e2e07311d88
[ "MIT" ]
215
2019-11-26T12:59:39.000Z
2022-02-01T12:38:31.000Z
examples/TRPO/real_nvp_cheetah.py
angelolovatto/raylab
ebaea8df1a391fb844e75df62ccf1e2e07311d88
[ "MIT" ]
7
2020-06-12T01:42:02.000Z
2021-05-27T03:40:42.000Z
from ray import tune def get_config(): return { # === Environment === "env": "HalfCheetah-v3", "env_config": {"max_episode_steps": 400, "time_aware": False}, # Trust region constraint "delta": 0.01, # Number of actions to sample per state for Fisher vector product a...
31.875
87
0.459477
from ray import tune def get_config(): return { "env": "HalfCheetah-v3", "env_config": {"max_episode_steps": 400, "time_aware": False}, "delta": 0.01, "fvp_samples": 10, "gamma": 0.995, "lambda": 0.96, "val_iters": 40,...
true
true
08f2614f2f0717138e6b04932d88c67b8bd07981
9,732
py
Python
tests/integration/states/pkg.py
bbinet/salt
b525e65d18b3ed734cea9792878df235c9aba36f
[ "Apache-2.0" ]
null
null
null
tests/integration/states/pkg.py
bbinet/salt
b525e65d18b3ed734cea9792878df235c9aba36f
[ "Apache-2.0" ]
null
null
null
tests/integration/states/pkg.py
bbinet/salt
b525e65d18b3ed734cea9792878df235c9aba36f
[ "Apache-2.0" ]
null
null
null
''' tests for pkg state ''' # Import Salt Testing libs from salttesting import skipIf from salttesting.helpers import ( destructiveTest, ensure_in_syspath, requires_system_grains, requires_salt_modules ) ensure_in_syspath('../../') # Import python libs import os import time # Import salt libs import ...
38.466403
81
0.633169
from salttesting import skipIf from salttesting.helpers import ( destructiveTest, ensure_in_syspath, requires_system_grains, requires_salt_modules ) ensure_in_syspath('../../') import os import time import integration import salt.utils _PKG_TARGETS = { 'Arch': ['python2-django', 'finch'], 'D...
true
true
08f262db50810c2c2559da54af441a87126dfbc0
1,698
py
Python
tests/multi_net/tcp_client_rst.py
sebastien-riou/micropython
116c15842fd48ddb77b0bc016341d936a0756573
[ "MIT" ]
4,538
2017-10-20T05:19:03.000Z
2022-03-30T02:29:30.000Z
tests/multi_net/tcp_client_rst.py
sebastien-riou/micropython
116c15842fd48ddb77b0bc016341d936a0756573
[ "MIT" ]
1,088
2017-10-21T07:57:22.000Z
2022-03-31T08:15:49.000Z
tests/multi_net/tcp_client_rst.py
sebastien-riou/micropython
116c15842fd48ddb77b0bc016341d936a0756573
[ "MIT" ]
1,860
2017-10-20T05:22:35.000Z
2022-03-27T10:54:14.000Z
# Test when client does a TCP RST on an open connection import struct, time, socket, select PORT = 8000 def convert_poll_list(l): # To be compatible across all ports/targets return [ev for _, ev in l] # Server def instance0(): multitest.globals(IP=multitest.get_network_ip()) s = socket.socket() ...
29.789474
95
0.659011
import struct, time, socket, select PORT = 8000 def convert_poll_list(l): return [ev for _, ev in l] def instance0(): multitest.globals(IP=multitest.get_network_ip()) s = socket.socket() s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind(socket.getaddrinfo("0.0.0.0", PORT)[0][-...
true
true
08f26546ab9026de487aae128285414978fd0812
16,965
py
Python
TENSORBOX/utils/slim_nets/inception_v1.py
DevJakobL/Face_detection
2b1227e237337ee6e010b938133d81cf7048641b
[ "MIT" ]
null
null
null
TENSORBOX/utils/slim_nets/inception_v1.py
DevJakobL/Face_detection
2b1227e237337ee6e010b938133d81cf7048641b
[ "MIT" ]
6
2019-12-16T20:59:48.000Z
2022-02-09T23:53:36.000Z
TENSORBOX/utils/slim_nets/inception_v1.py
DevJakobL/Face_detection
2b1227e237337ee6e010b938133d81cf7048641b
[ "MIT" ]
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 applicable ...
47.388268
80
0.638137
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import sys slim = tf.contrib.slim trunc_normal = lambda stddev: tf.truncated_normal_initializer(0.0, stddev) if 'darwin' in sys.platform: from TENSORBOX.utils import tf_concat els...
true
true
08f266b425484b6cb9719bda32887a57b7c05d45
1,002
py
Python
animation/a2.py
ztang4/codetest
d7019ae379ddaac2600fcf715b873552a8ba3715
[ "MIT" ]
null
null
null
animation/a2.py
ztang4/codetest
d7019ae379ddaac2600fcf715b873552a8ba3715
[ "MIT" ]
null
null
null
animation/a2.py
ztang4/codetest
d7019ae379ddaac2600fcf715b873552a8ba3715
[ "MIT" ]
null
null
null
#https://stackoverflow.com/questions/63589249/plotly-dash-display-real-time-data-in-smooth-animation/63681810 import dash import dash_html_components as html import dash_core_components as dcc import numpy as np from dash.dependencies import Input, Output # Example data (a circle). resolution = 20 t = np.linspace(0,...
35.785714
109
0.697605
import dash import dash_html_components as html import dash_core_components as dcc import numpy as np from dash.dependencies import Input, Output resolution = 20 t = np.linspace(0, np.pi * 2, resolution) x, y = np.cos(t), np.sin(t) figure = dict(data=[{'x': [], 'y': []}], layout=dict(xaxis=dict(range=[-1, 1]), yaxis...
true
true
08f267436d1cde5a92d2daa4f6dc5bd2114d31ba
3,286
py
Python
kubevirt/models/k8s_io_apimachinery_pkg_apis_meta_v1_root_paths.py
gabriel-samfira/client-python
c2e184c3cad6797af35b0160a36ffcbba77284a7
[ "Apache-2.0" ]
21
2018-02-21T23:59:28.000Z
2021-12-08T05:47:37.000Z
kubevirt/models/k8s_io_apimachinery_pkg_apis_meta_v1_root_paths.py
gabriel-samfira/client-python
c2e184c3cad6797af35b0160a36ffcbba77284a7
[ "Apache-2.0" ]
47
2018-02-01T15:35:01.000Z
2022-02-11T07:45:54.000Z
kubevirt/models/k8s_io_apimachinery_pkg_apis_meta_v1_root_paths.py
gabriel-samfira/client-python
c2e184c3cad6797af35b0160a36ffcbba77284a7
[ "Apache-2.0" ]
19
2018-04-03T09:20:52.000Z
2021-06-01T06:07:28.000Z
# coding: utf-8 """ KubeVirt API This is KubeVirt API an add-on for Kubernetes. OpenAPI spec version: 1.0.0 Contact: kubevirt-dev@googlegroups.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class K8sIoApi...
25.874016
80
0.55843
from pprint import pformat from six import iteritems import re class K8sIoApimachineryPkgApisMetaV1RootPaths(object): swagger_types = { 'paths': 'list[str]' } attribute_map = { 'paths': 'paths' } def __init__(self, paths=None): self._paths = None self.paths...
true
true
08f2680a842baa3194f3e4c830d0d3ef0f0afd2e
4,606
py
Python
scripts/mk_nuget_task.py
Certora/z3
26893005c7c88686e00ce4b073a98140d0364a84
[ "MIT" ]
null
null
null
scripts/mk_nuget_task.py
Certora/z3
26893005c7c88686e00ce4b073a98140d0364a84
[ "MIT" ]
null
null
null
scripts/mk_nuget_task.py
Certora/z3
26893005c7c88686e00ce4b073a98140d0364a84
[ "MIT" ]
null
null
null
# # Copyright (c) 2018 Microsoft Corporation # # 1. copy over dlls # 2. copy over libz3.dll for the different architectures # 3. copy over Microsoft.Z3.dll from suitable distribution # 4. copy nuspec file from packages # 5. call nuget pack # 6. sign package import json import os import zipfile import sys import os.p...
32.666667
113
0.584021
import json import os import zipfile import sys import os.path import shutil import subprocess def mk_dir(d): if not os.path.exists(d): os.makedirs(d) os_info = {"z64-ubuntu-14" : ('so', 'ubuntu.14.04-x64'), 'ubuntu-18' : ('so', 'ubuntu-x64'), 'ubuntu-20' : ('so', 'ubuntu-x64'), ...
true
true
08f26873bcd7f28f90c5643635be3bc52e19f78e
1,445
py
Python
8/870_advantage_shuffle/main.py
IronCore864/leetcode
a62a4cdde9814ae48997176debcaad537f7ad01f
[ "Apache-2.0" ]
4
2018-03-07T02:56:03.000Z
2021-06-15T05:43:31.000Z
8/870_advantage_shuffle/main.py
IronCore864/leetcode
a62a4cdde9814ae48997176debcaad537f7ad01f
[ "Apache-2.0" ]
null
null
null
8/870_advantage_shuffle/main.py
IronCore864/leetcode
a62a4cdde9814ae48997176debcaad537f7ad01f
[ "Apache-2.0" ]
1
2021-09-02T12:05:15.000Z
2021-09-02T12:05:15.000Z
from bisect import bisect_right from typing import List class Solution: def advantage_count_binarysearch(self, nums1: List[int], nums2: List[int]) -> List[int]: nums1.sort() res = [] for num in nums2: pos = bisect_right(nums1, num) if pos == len(nums1): ...
27.264151
92
0.550173
from bisect import bisect_right from typing import List class Solution: def advantage_count_binarysearch(self, nums1: List[int], nums2: List[int]) -> List[int]: nums1.sort() res = [] for num in nums2: pos = bisect_right(nums1, num) if pos == len(nums1): ...
true
true
08f268fffaf0ed59ede0be7789b72eed3e2f0afe
14,724
py
Python
benchmarks/block_store.py
bolshoytoster/chia-blockchain
1086fb255601de931dc771caa7327f4df5c87ace
[ "Apache-2.0" ]
null
null
null
benchmarks/block_store.py
bolshoytoster/chia-blockchain
1086fb255601de931dc771caa7327f4df5c87ace
[ "Apache-2.0" ]
null
null
null
benchmarks/block_store.py
bolshoytoster/chia-blockchain
1086fb255601de931dc771caa7327f4df5c87ace
[ "Apache-2.0" ]
null
null
null
import asyncio import random from time import time from pathlib import Path from chia.full_node.block_store import BlockStore import os import sys from chia.util.db_wrapper import DBWrapper from chia.util.ints import uint128, uint64, uint32, uint8 from chia.types.blockchain_format.classgroup import ClassgroupElement f...
33.848276
117
0.586865
import asyncio import random from time import time from pathlib import Path from chia.full_node.block_store import BlockStore import os import sys from chia.util.db_wrapper import DBWrapper from chia.util.ints import uint128, uint64, uint32, uint8 from chia.types.blockchain_format.classgroup import ClassgroupElement f...
true
true
08f26904d049acd1e7f06597ea4b942b44479bdc
1,791
py
Python
sunrise_sunset_clock/main.py
wmdestaf/Experiments
84df0f781117a99dd1ab1163e24a9fca31412d86
[ "MIT" ]
null
null
null
sunrise_sunset_clock/main.py
wmdestaf/Experiments
84df0f781117a99dd1ab1163e24a9fca31412d86
[ "MIT" ]
null
null
null
sunrise_sunset_clock/main.py
wmdestaf/Experiments
84df0f781117a99dd1ab1163e24a9fca31412d86
[ "MIT" ]
null
null
null
import requests as r import time import math import configparser from graphics import * base = "https://api.openweathermap.org/data/2.5/weather?q={}&appid={}" key = "" ##########YOUR KEY GOES HERE############# if not key: parser = configparser.ConfigParser() parser.read("../secrets.properties") key = parse...
31.421053
138
0.659966
import requests as r import time import math import configparser from graphics import * base = "https://api.openweathermap.org/data/2.5/weather?q={}&appid={}" key = "" if not key: parser = configparser.ConfigParser() parser.read("../secrets.properties") key = parser.get("sunrise-sunset-clock","key") clock...
true
true
08f26bccb1ee77e1616376070c06bd7b0560a13b
1,641
py
Python
fabfile/data.py
nprapps/trump270
acd886f16157927af9bacb6d2cea795d3d97d5b0
[ "FSFAP" ]
null
null
null
fabfile/data.py
nprapps/trump270
acd886f16157927af9bacb6d2cea795d3d97d5b0
[ "FSFAP" ]
2
2016-06-22T12:56:41.000Z
2016-06-22T15:36:07.000Z
fabfile/data.py
nprapps/trump270
acd886f16157927af9bacb6d2cea795d3d97d5b0
[ "FSFAP" ]
1
2021-02-18T11:30:08.000Z
2021-02-18T11:30:08.000Z
#!/usr/bin/env python """ Commands that update or process the application data. """ import app_config import codecs import copytext import json import locale from fabric.api import execute, task from slugify import slugify locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') DATA_GROUPS = ['white man', 'white woman', 'bl...
25.246154
72
0.585009
import app_config import codecs import copytext import json import locale from fabric.api import execute, task from slugify import slugify locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') DATA_GROUPS = ['white man', 'white woman', 'black', 'hispanic', 'other'] DATA_COLUMNS = ['r pct', 'd pct', 'turnout', 'eligible vo...
true
true
08f26c3fba4bed4ec5a4aebff278ece26c23f4b1
2,045
py
Python
datapack-ul/main.py
PixelTheKermit/minehut-scripts
46d4392ab4da366b63d5b1b38aa2623f5a28cf0a
[ "Apache-2.0" ]
null
null
null
datapack-ul/main.py
PixelTheKermit/minehut-scripts
46d4392ab4da366b63d5b1b38aa2623f5a28cf0a
[ "Apache-2.0" ]
null
null
null
datapack-ul/main.py
PixelTheKermit/minehut-scripts
46d4392ab4da366b63d5b1b38aa2623f5a28cf0a
[ "Apache-2.0" ]
null
null
null
def clear(): print('\n' * 250) def printname(): print('What is the name of your server? (ID will be grabbed automatically)') name = input() r = requests.get('{0}/server/{1}?byName=true'.format(BASE_URL, name)).json() try: r["server"]["_id"] id = r["server"]["_id"] clear() print('What is the name of the...
29.214286
149
0.644988
def clear(): print('\n' * 250) def printname(): print('What is the name of your server? (ID will be grabbed automatically)') name = input() r = requests.get('{0}/server/{1}?byName=true'.format(BASE_URL, name)).json() try: r["server"]["_id"] id = r["server"]["_id"] clear() print('What is the name of the...
true
true
08f26ccf0755a32d0b573ed7e79be1c93a5aedaa
700
py
Python
pub_data_visualization/global_tools/__init__.py
l-leo/pub-data-visualization
68eea00491424581b057495a7f0f69cf74e16e7d
[ "MIT" ]
1
2021-01-22T16:47:20.000Z
2021-01-22T16:47:20.000Z
pub_data_visualization/global_tools/__init__.py
l-leo/pub-data-visualization
68eea00491424581b057495a7f0f69cf74e16e7d
[ "MIT" ]
null
null
null
pub_data_visualization/global_tools/__init__.py
l-leo/pub-data-visualization
68eea00491424581b057495a7f0f69cf74e16e7d
[ "MIT" ]
null
null
null
""" Generic set of tools to manipulate the data. This module contains a set of tools used by the different subpackages of this project. """ from .compute_delivery_begin_date_local import * from .compute_delivery_end_date import * from .compute_delivery_period_index import * from .compute...
31.818182
48
0.637143
from .compute_delivery_begin_date_local import * from .compute_delivery_end_date import * from .compute_delivery_period_index import * from .compute_delivery_windows import * from .compute_nb_hours import * from .dt_exists_in_tz import * from .format_contract_na...
true
true
08f26e31718df645e06727df2aa4266a61b9011a
2,567
py
Python
userbot/plugins/alive.py
praveen368/CatUserbot
4b0cd970551ffaf86b9fdd5da584c1b3882821ff
[ "MIT" ]
1
2020-07-18T07:42:58.000Z
2020-07-18T07:42:58.000Z
userbot/plugins/alive.py
praveen368/CatUserbot
4b0cd970551ffaf86b9fdd5da584c1b3882821ff
[ "MIT" ]
null
null
null
userbot/plugins/alive.py
praveen368/CatUserbot
4b0cd970551ffaf86b9fdd5da584c1b3882821ff
[ "MIT" ]
null
null
null
"""Check if userbot alive or not . """ import os import time import asyncio from telethon import events from userbot import StartTime from userbot import ALIVE_NAME, CMD_HELP, catdef, catversion from userbot.utils import admin_cmd from telethon import version from platform import python_version, uname DEFAULTUSER = st...
46.672727
116
0.575769
import os import time import asyncio from telethon import events from userbot import StartTime from userbot import ALIVE_NAME, CMD_HELP, catdef, catversion from userbot.utils import admin_cmd from telethon import version from platform import python_version, uname DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "@Sur_...
true
true
08f270bec1d6ce3a502cc2b7687f052297533dd6
1,796
py
Python
Scripts/toolkit.py
rockbyo5/Skyrim-NX-Toolkit
0097c1da6f2b76751884355ee688d11dffd1172c
[ "MIT" ]
84
2018-08-07T12:37:35.000Z
2022-01-07T09:16:49.000Z
Scripts/toolkit.py
Lord-Akkrand/SkyrimNX
22d5054af694337e9e7665dde86cb5af5bb78192
[ "MIT" ]
32
2018-08-07T00:25:02.000Z
2021-10-06T03:25:56.000Z
Scripts/toolkit.py
Lord-Akkrand/SkyrimNX
22d5054af694337e9e7665dde86cb5af5bb78192
[ "MIT" ]
11
2018-09-12T00:05:08.000Z
2021-01-28T18:51:40.000Z
#! python3 import sys import multiprocessing import gui import util, download_file, unzip_file, toolkit_config import convert_mod, convert_path, load_order, pack_mod, packed_load_order, repack_mod, unpack_mod if __name__ == '__main__': multiprocessing.freeze_support() toolkit_config.check_clear() py_script = sys...
30.965517
97
0.731069
import sys import multiprocessing import gui import util, download_file, unzip_file, toolkit_config import convert_mod, convert_path, load_order, pack_mod, packed_load_order, repack_mod, unpack_mod if __name__ == '__main__': multiprocessing.freeze_support() toolkit_config.check_clear() py_script = sys.argv[1] p...
true
true
08f271c0dbf718b0f9dc426d1445142af4b44ce0
12,627
py
Python
code/datasets.py
habout632/AttnGAN
5450e8828fa91f22598838b0e8f21c123bd059fa
[ "MIT" ]
1
2020-04-13T07:41:55.000Z
2020-04-13T07:41:55.000Z
code/datasets.py
habout632/AttnGAN
5450e8828fa91f22598838b0e8f21c123bd059fa
[ "MIT" ]
null
null
null
code/datasets.py
habout632/AttnGAN
5450e8828fa91f22598838b0e8f21c123bd059fa
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from nltk.tokenize import RegexpTokenizer from collections import defaultdict from miscc.config import cfg import torch import torch.utils.data as data from torch.autogr...
33.582447
89
0.547161
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from nltk.tokenize import RegexpTokenizer from collections import defaultdict from miscc.config import cfg import torch import torch.utils.data as data from torch.autogr...
true
true
08f271d82207a95c96aeeb7c38193c3ac1139b86
6,262
py
Python
embyapi/models/notifications_notification_type_info.py
stanionascu/python-embyapi
a3f7aa49aea4052277cc43605c0d89bc6ff21913
[ "BSD-3-Clause" ]
null
null
null
embyapi/models/notifications_notification_type_info.py
stanionascu/python-embyapi
a3f7aa49aea4052277cc43605c0d89bc6ff21913
[ "BSD-3-Clause" ]
null
null
null
embyapi/models/notifications_notification_type_info.py
stanionascu/python-embyapi
a3f7aa49aea4052277cc43605c0d89bc6ff21913
[ "BSD-3-Clause" ]
null
null
null
# coding: utf-8 """ Emby Server API Explore the Emby Server API # noqa: E501 OpenAPI spec version: 4.1.1.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class NotificationsNotificationTypeInfo(object): """NOTE: This ...
29.125581
122
0.60412
import pprint import re import six class NotificationsNotificationTypeInfo(object): swagger_types = { 'type': 'str', 'name': 'str', 'enabled': 'bool', 'category': 'str', 'is_based_on_user_event': 'bool' } attribute_map = { 'type': 'Type', 'name':...
true
true
08f273b8db4cf1cecb6ded15493750dbd1c8720f
3,732
py
Python
scripts/ssc/deprecated/ssc_spheres_train.py
MrBellamonte/MT-VAEs-TDA
8881b5db607c673fb558f7b74ece27f244b16b77
[ "MIT" ]
null
null
null
scripts/ssc/deprecated/ssc_spheres_train.py
MrBellamonte/MT-VAEs-TDA
8881b5db607c673fb558f7b74ece27f244b16b77
[ "MIT" ]
1
2020-09-22T13:04:58.000Z
2020-09-22T13:05:23.000Z
scripts/ssc/deprecated/ssc_spheres_train.py
MrBellamonte/AEs-VAEs-TDA
8881b5db607c673fb558f7b74ece27f244b16b77
[ "MIT" ]
null
null
null
import datetime import os import torch from torch import Tensor from torch.utils.data import TensorDataset from src.datasets.datasets import create_sphere_dataset, Spheres from src.model.autoencoders import autoencoder from src.model.loss_collection import L1Loss from src.model.COREL.train_engine import ( train_n...
30.096774
112
0.448285
import datetime import os import torch from torch import Tensor from torch.utils.data import TensorDataset from src.datasets.datasets import create_sphere_dataset, Spheres from src.model.autoencoders import autoencoder from src.model.loss_collection import L1Loss from src.model.COREL.train_engine import ( train_n...
true
true
08f273b8fd9000411da7117ebd6e9ed20203cd2d
77
py
Python
8_kyu/All_Star_Code_Challenge_18.py
UlrichBerntien/Codewars-Katas
bbd025e67aa352d313564d3862db19fffa39f552
[ "MIT" ]
null
null
null
8_kyu/All_Star_Code_Challenge_18.py
UlrichBerntien/Codewars-Katas
bbd025e67aa352d313564d3862db19fffa39f552
[ "MIT" ]
null
null
null
8_kyu/All_Star_Code_Challenge_18.py
UlrichBerntien/Codewars-Katas
bbd025e67aa352d313564d3862db19fffa39f552
[ "MIT" ]
null
null
null
def str_count(strng: str, letter: str) -> int: return strng.count(letter)
38.5
46
0.701299
def str_count(strng: str, letter: str) -> int: return strng.count(letter)
true
true
08f273c65114a536221847094a6068de7014f6d7
882
py
Python
projects/project2_lc3_symbol_table_python/lc3_table_tester.py
pegurnee/2015-01-341
f7de0e905196083c2ce8068f258e7db6fa80fa28
[ "MIT" ]
null
null
null
projects/project2_lc3_symbol_table_python/lc3_table_tester.py
pegurnee/2015-01-341
f7de0e905196083c2ce8068f258e7db6fa80fa28
[ "MIT" ]
null
null
null
projects/project2_lc3_symbol_table_python/lc3_table_tester.py
pegurnee/2015-01-341
f7de0e905196083c2ce8068f258e7db6fa80fa28
[ "MIT" ]
null
null
null
import os import lc3_asm_reader def main(): filepath = input('Please enter the pathname of file to check: ') if not filepath: filepath = 'p1.asm' if not os.path.isfile(filepath): print('file path is not a file.') return actual = {} expected = {} table = lc3_asm_reader.get_symbol_table(...
21.512195
66
0.599773
import os import lc3_asm_reader def main(): filepath = input('Please enter the pathname of file to check: ') if not filepath: filepath = 'p1.asm' if not os.path.isfile(filepath): print('file path is not a file.') return actual = {} expected = {} table = lc3_asm_reader.get_symbol_table(...
true
true
08f275568545e3d1380fa46b12d4b4e1b4eef32a
1,466
py
Python
arize/examples/bulk_client.py
henryShelf/client_python
493af52ac2524e38fd7e05e0d365d02369c64ac1
[ "BSD-3-Clause" ]
12
2020-03-31T17:42:45.000Z
2022-03-31T07:30:24.000Z
arize/examples/bulk_client.py
henryShelf/client_python
493af52ac2524e38fd7e05e0d365d02369c64ac1
[ "BSD-3-Clause" ]
22
2021-08-18T20:16:09.000Z
2022-03-24T22:50:21.000Z
arize/examples/bulk_client.py
henryShelf/client_python
493af52ac2524e38fd7e05e0d365d02369c64ac1
[ "BSD-3-Clause" ]
2
2021-08-18T18:39:54.000Z
2021-08-30T23:14:59.000Z
import os import uuid import time import pandas as pd import numpy as np import concurrent.futures as cf from arize.api import Client from arize.types import ModelTypes ITERATIONS = 1 NUM_RECORDS = 100 arize = Client( organization_key=os.environ.get("ARIZE_ORG_KEY"), api_key=os.environ.get("ARIZE_API_KEY"), ...
27.148148
104
0.732606
import os import uuid import time import pandas as pd import numpy as np import concurrent.futures as cf from arize.api import Client from arize.types import ModelTypes ITERATIONS = 1 NUM_RECORDS = 100 arize = Client( organization_key=os.environ.get("ARIZE_ORG_KEY"), api_key=os.environ.get("ARIZE_API_KEY"), ...
true
true
08f27605a53586765bb61995e11cd55361080814
28,848
py
Python
third_party/blink/tools/blinkpy/w3c/test_importer.py
zipated/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
third_party/blink/tools/blinkpy/w3c/test_importer.py
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
third_party/blink/tools/blinkpy/w3c/test_importer.py
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Fetches a copy of the latest state of a W3C test repository and commits. If this script is given the argument --auto-update, it will also: 1. Upload a C...
44.656347
109
0.659318
import argparse import datetime import json import logging import re from blinkpy.common.net.buildbot import current_build_link from blinkpy.common.net.git_cl import GitCL from blinkpy.common.path_finder import PathFinder from blinkpy.common.system.log_utils import configure_logging from blinkpy.w3c.chromium_exporta...
true
true
08f276630841eacdd166157c7cd1a7b75b23cf3e
15,997
py
Python
source/scripts/m-ice-driver.py
jbassis/MICI-2021
5dd7db0d0563e7e673981724fab5e9f74be5c986
[ "MIT" ]
null
null
null
source/scripts/m-ice-driver.py
jbassis/MICI-2021
5dd7db0d0563e7e673981724fab5e9f74be5c986
[ "MIT" ]
null
null
null
source/scripts/m-ice-driver.py
jbassis/MICI-2021
5dd7db0d0563e7e673981724fab5e9f74be5c986
[ "MIT" ]
null
null
null
""" mpm testing """ from importlib import reload import meshModel reload(meshModel) from meshModel import * import material reload(material) from material import * from scipy.special import erfc import tempModel reload(tempModel) from tempModel import * import stokes2Dve reload(stokes2Dve) from stokes2Dve import...
33.536688
240
0.701444
from importlib import reload import meshModel reload(meshModel) from meshModel import * import material reload(material) from material import * from scipy.special import erfc import tempModel reload(tempModel) from tempModel import * import stokes2Dve reload(stokes2Dve) from stokes2Dve import * from leopart imp...
true
true
08f2771eb2e026410b2f0957c6dadd812cabaee9
994
py
Python
content/test/faceswap/plugins/extract/detect/manual.py
gwdgithubnom/gjgr
581957a296b13a4231ea1e67ec62083b7da445bf
[ "MIT" ]
3
2019-08-08T03:27:26.000Z
2020-08-17T13:11:24.000Z
content/test/faceswap/plugins/extract/detect/manual.py
gwdgithubnom/gjgr
581957a296b13a4231ea1e67ec62083b7da445bf
[ "MIT" ]
6
2020-03-04T23:21:03.000Z
2020-07-23T07:46:40.000Z
content/test/faceswap/plugins/extract/detect/manual.py
gwdgithubnom/gjgr
581957a296b13a4231ea1e67ec62083b7da445bf
[ "MIT" ]
2
2019-09-26T08:52:22.000Z
2020-03-27T00:33:00.000Z
#!/usr/bin/env python3 """ Manual face detection plugin """ from ._base import Detector, logger class Detect(Detector): """ Manual Detector """ def __init__(self, **kwargs): super().__init__(**kwargs) def initialize(self, *args, **kwargs): """ Create the mtcnn detector """ super(...
30.121212
90
0.573441
from ._base import Detector, logger class Detect(Detector): def __init__(self, **kwargs): super().__init__(**kwargs) def initialize(self, *args, **kwargs): super().initialize(*args, **kwargs) logger.info("Initializing Manual Detector...") self.init.set() logger.info("...
true
true
08f279410041e6f935cbeb2f7b3df6c7b1439c7f
965
py
Python
breakout_RL/exploration_policies/RandomPolicyWithDecay.py
MarcoFavorito/breakout-RL
31ae0794807b2917887665f62431b92097275f97
[ "MIT" ]
null
null
null
breakout_RL/exploration_policies/RandomPolicyWithDecay.py
MarcoFavorito/breakout-RL
31ae0794807b2917887665f62431b92097275f97
[ "MIT" ]
null
null
null
breakout_RL/exploration_policies/RandomPolicyWithDecay.py
MarcoFavorito/breakout-RL
31ae0794807b2917887665f62431b92097275f97
[ "MIT" ]
null
null
null
import random from breakout_RL.exploration_policies.ExplorationPolicy import ExplorationPolicy class RandomPolicyWithDecay(ExplorationPolicy): def __init__(self, n_actions, epsilon_start=1.0, epsilon_end=0.001, exploration_steps=6000): super().__init__() self.n_actions = n_actions self.e...
32.166667
96
0.666321
import random from breakout_RL.exploration_policies.ExplorationPolicy import ExplorationPolicy class RandomPolicyWithDecay(ExplorationPolicy): def __init__(self, n_actions, epsilon_start=1.0, epsilon_end=0.001, exploration_steps=6000): super().__init__() self.n_actions = n_actions self.e...
true
true
08f27977cfc26ab3abe1dfb57a75a4b4d8fd1610
2,383
py
Python
codesignal/interview-practice/tree_basic/isSubtree.py
stephanosterburg/coding_challenges
601cf1360a7fdf068487106ba995955407365983
[ "MIT" ]
null
null
null
codesignal/interview-practice/tree_basic/isSubtree.py
stephanosterburg/coding_challenges
601cf1360a7fdf068487106ba995955407365983
[ "MIT" ]
null
null
null
codesignal/interview-practice/tree_basic/isSubtree.py
stephanosterburg/coding_challenges
601cf1360a7fdf068487106ba995955407365983
[ "MIT" ]
1
2019-11-08T00:49:14.000Z
2019-11-08T00:49:14.000Z
""" Given two binary trees t1 and t2, determine whether the second tree is a subtree of the first tree. A subtree for vertex v in a binary tree t is a tree consisting of v and all its descendants in t. Determine whether or not there is a vertex v (possibly none) in tree t1 such that a subtree for vertex v (possibly ...
21.088496
100
0.427612
def isSubtree(t1, t2): if not t2: return True if not t1: return False return equals(t1, t2) or isSubtree(t1.left, t2) or isSubtree(t1.right, t2) def equals(t1, t2): if not t1 and not t2: return True if not t1 or not t2: return False if t1.value == t2.valu...
true
true
08f27ad42ea80ebe64dc059744f2797b81761c00
2,638
py
Python
trax/optimizers/momentum.py
dedsec-9/trax
c394f9df7ee9dfe918cd67f4af2217d361f0f733
[ "Apache-2.0" ]
7,220
2019-10-07T23:46:53.000Z
2022-03-31T16:28:05.000Z
trax/optimizers/momentum.py
dedsec-9/trax
c394f9df7ee9dfe918cd67f4af2217d361f0f733
[ "Apache-2.0" ]
301
2019-10-08T06:42:04.000Z
2022-03-12T07:03:46.000Z
trax/optimizers/momentum.py
dedsec-9/trax
c394f9df7ee9dfe918cd67f4af2217d361f0f733
[ "Apache-2.0" ]
783
2019-10-08T06:36:36.000Z
2022-03-25T02:00:29.000Z
# coding=utf-8 # Copyright 2021 The Trax Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
35.648649
80
0.706975
from trax.fastmath import numpy as jnp from trax.optimizers import base class Momentum(base.Optimizer): def __init__( self, learning_rate=0.01, mass=0.9, weight_decay_rate=1e-5, nesterov=True ): super().__init__( learning_rate=learning_rate, mass=mass, weight_decay_rate=weigh...
true
true
08f27b8179e6f6ec00e5bcf5292f137593343689
31,862
py
Python
luigi/task.py
miku/luigi
889ef2af64e2aa7d0cc65caef69a241ac91e5ff9
[ "Apache-2.0" ]
4
2017-03-21T20:01:19.000Z
2022-03-29T16:31:41.000Z
luigi/task.py
miku/luigi
889ef2af64e2aa7d0cc65caef69a241ac91e5ff9
[ "Apache-2.0" ]
1
2018-08-17T17:45:16.000Z
2018-08-17T17:45:16.000Z
luigi/task.py
miku/luigi
889ef2af64e2aa7d0cc65caef69a241ac91e5ff9
[ "Apache-2.0" ]
2
2015-05-04T22:46:20.000Z
2016-07-14T17:58:57.000Z
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
34.859956
151
0.646852
try: from itertools import imap as map except ImportError: pass from contextlib import contextmanager import logging import traceback import warnings import json import hashlib import re import copy import functools import luigi from luigi import six from luigi import parameter from luigi.task_register impor...
true
true
08f27c82d0c9139d34e3bbef211ce226d430cd76
998
py
Python
venv/share/doc/networkx-2.6.3/examples/drawing/plot_weighted_graph.py
AisahAlfiyatusR/Image_Retrieval_Heroku
5db06ebe95926810601a563ebf45d6f5b2cfc89f
[ "Apache-2.0" ]
10,024
2015-01-01T13:06:43.000Z
2022-03-31T12:45:25.000Z
venv/share/doc/networkx-2.6.3/examples/drawing/plot_weighted_graph.py
AisahAlfiyatusR/Image_Retrieval_Heroku
5db06ebe95926810601a563ebf45d6f5b2cfc89f
[ "Apache-2.0" ]
3,191
2015-01-01T18:13:11.000Z
2022-03-31T22:06:00.000Z
venv/share/doc/networkx-2.6.3/examples/drawing/plot_weighted_graph.py
AisahAlfiyatusR/Image_Retrieval_Heroku
5db06ebe95926810601a563ebf45d6f5b2cfc89f
[ "Apache-2.0" ]
3,272
2015-01-01T05:04:53.000Z
2022-03-31T17:46:35.000Z
""" ============== Weighted Graph ============== An example using Graph as a weighted network. """ import matplotlib.pyplot as plt import networkx as nx G = nx.Graph() G.add_edge("a", "b", weight=0.6) G.add_edge("a", "c", weight=0.2) G.add_edge("c", "d", weight=0.1) G.add_edge("c", "e", weight=0.7) G.add_edge("c", "...
23.761905
87
0.647295
import matplotlib.pyplot as plt import networkx as nx G = nx.Graph() G.add_edge("a", "b", weight=0.6) G.add_edge("a", "c", weight=0.2) G.add_edge("c", "d", weight=0.1) G.add_edge("c", "e", weight=0.7) G.add_edge("c", "f", weight=0.9) G.add_edge("a", "d", weight=0.3) elarge = [(u, v) for (u, v, d) in G.edges(data=Tru...
true
true
08f27d3ee0fe128c643516729ba0770bcdc32201
4,362
py
Python
tests/test_kmeans.py
sravyasri/dislib
58c3ebbf322464211bb1326668743c3629a62213
[ "Apache-2.0" ]
null
null
null
tests/test_kmeans.py
sravyasri/dislib
58c3ebbf322464211bb1326668743c3629a62213
[ "Apache-2.0" ]
null
null
null
tests/test_kmeans.py
sravyasri/dislib
58c3ebbf322464211bb1326668743c3629a62213
[ "Apache-2.0" ]
null
null
null
import unittest import numpy as np from scipy.sparse import csr_matrix from sklearn.cluster import KMeans as SKMeans from sklearn.datasets import make_blobs import dislib as ds from dislib.cluster import KMeans class KMeansTest(unittest.TestCase): def test_init_params(self): """ Tests that KMeans object...
31.839416
78
0.596745
import unittest import numpy as np from scipy.sparse import csr_matrix from sklearn.cluster import KMeans as SKMeans from sklearn.datasets import make_blobs import dislib as ds from dislib.cluster import KMeans class KMeansTest(unittest.TestCase): def test_init_params(self): n_clusters = 2 max_i...
true
true
08f27f5bd5bf0c2caf9c8783fd4c2ec0a14caf79
6,488
py
Python
tests/unit/test_client.py
casselt/salt
d8a2ef4e0cd544656489d23d161928879b1fc1c0
[ "Apache-2.0" ]
5
2017-02-07T05:39:29.000Z
2020-06-13T02:07:33.000Z
tests/unit/test_client.py
casselt/salt
d8a2ef4e0cd544656489d23d161928879b1fc1c0
[ "Apache-2.0" ]
86
2017-01-27T11:54:46.000Z
2020-05-20T06:25:26.000Z
tests/unit/test_client.py
casselt/salt
d8a2ef4e0cd544656489d23d161928879b1fc1c0
[ "Apache-2.0" ]
11
2017-01-26T19:36:29.000Z
2021-12-11T07:54:16.000Z
# -*- coding: utf-8 -*- ''' :codeauthor: Mike Place <mp@saltstack.com> ''' # Import python libs from __future__ import absolute_import, print_function, unicode_literals # Import Salt Testing libs import tests.integration as integration from tests.support.unit import TestCase, skipIf from tests.support.mock import...
50.294574
116
0.556104
from __future__ import absolute_import, print_function, unicode_literals import tests.integration as integration from tests.support.unit import TestCase, skipIf from tests.support.mock import patch, NO_MOCK, NO_MOCK_REASON from salt import client import salt.utils.platform from salt.exceptions import ( EauthAuth...
true
true
08f27f8eb4cd85a7a5eeab3bcd1e2b704deae8ac
1,403
py
Python
pyvisdk/do/virtual_serial_port_device_backing_info.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
pyvisdk/do/virtual_serial_port_device_backing_info.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
pyvisdk/do/virtual_serial_port_device_backing_info.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def VirtualSerialPortDeviceBackingInfo(vim, *args, **kwargs): '''The data object defines ...
36.921053
124
0.654312
import logging from pyvisdk.exceptions import InvalidArgumentError log = logging.getLogger(__name__) def VirtualSerialPortDeviceBackingInfo(vim, *args, **kwargs): obj = vim.client.factory.create('{urn:vim25}VirtualSerialPortDeviceBackingInfo') if (len(args) + len(kwargs)) < 1: raise IndexError...
true
true
08f280c8c1b73a2dcdb8e5ffc132c41b4a6f8b8f
6,464
py
Python
Configuration/StandardSequences/python/Eras.py
radla118/cmssw
f715847dadd52007a5903358efb5a022e80e0cdb
[ "Apache-2.0" ]
2
2020-10-26T18:40:32.000Z
2021-04-10T16:33:25.000Z
Configuration/StandardSequences/python/Eras.py
gartung/cmssw
3072dde3ce94dcd1791d778988198a44cde02162
[ "Apache-2.0" ]
30
2015-11-04T11:42:27.000Z
2021-12-01T07:56:34.000Z
Configuration/StandardSequences/python/Eras.py
gartung/cmssw
3072dde3ce94dcd1791d778988198a44cde02162
[ "Apache-2.0" ]
8
2016-03-25T07:17:43.000Z
2021-07-08T17:11:21.000Z
from __future__ import print_function import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.Config import ModifierChain,Modifier class Eras (object): """ Dummy container for all the cms.Modifier instances that config fragments can use to selectively configure depending on what scenario is acti...
44.888889
169
0.547339
from __future__ import print_function import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.Config import ModifierChain,Modifier class Eras (object): def __init__(self): allEras=['Run1_pA', 'Run1_peripheralPbPb', 'Run2_50ns', 'Run2_50ns_HIPM',...
true
true
08f284f2c6014736684f8f97c858c9f9065c72f6
3,392
py
Python
pychron/hardware/pychron_device.py
ael-noblegas/pychron
6ebbbb1f66a614972b62b7a9be4c784ae61b5d62
[ "Apache-2.0" ]
null
null
null
pychron/hardware/pychron_device.py
ael-noblegas/pychron
6ebbbb1f66a614972b62b7a9be4c784ae61b5d62
[ "Apache-2.0" ]
27
2019-10-07T17:43:35.000Z
2021-12-05T21:25:07.000Z
pychron/hardware/pychron_device.py
ael-noblegas/pychron
6ebbbb1f66a614972b62b7a9be4c784ae61b5d62
[ "Apache-2.0" ]
null
null
null
# =============================================================================== # Copyright 2014 Jake Ross # # 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...
33.254902
98
0.518278
from traits.api import CInt, Str, Bool from pychron.loggable import Loggable class RemoteDeviceMixin(Loggable): communicator = None connected = False kind = Str message_frame = Str use_end = Bool write_terminator = chr(10) def open(self): return self.setup_communicator() d...
true
true
08f28585afbe09131f0e1046fa6b155ca5b2b37b
8,273
py
Python
arjuna/interact/http/model/internal/processor/response.py
rahul-verma/arjuna
af74e0882216881ceca0a10f26442165ffc43287
[ "Apache-2.0" ]
13
2020-05-12T06:32:51.000Z
2022-01-24T18:21:19.000Z
arjuna/interact/http/model/internal/processor/response.py
rahul-verma/arjuna
af74e0882216881ceca0a10f26442165ffc43287
[ "Apache-2.0" ]
5
2020-02-14T12:51:07.000Z
2021-12-01T10:39:51.000Z
arjuna/interact/http/model/internal/processor/response.py
rahul-verma/arjuna
af74e0882216881ceca0a10f26442165ffc43287
[ "Apache-2.0" ]
25
2020-01-16T10:44:25.000Z
2022-02-24T13:22:22.000Z
# This file is a part of Arjuna # Copyright 2015-2021 Rahul Verma # Website: www.RahulVerma.net # 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...
36.285088
150
0.620815
import abc from .json.validator import ExpectedJsonValidator, UnexpectedJsonValidator from .cookie.validator import CookieValidator from .text.validator import ExpectedTextValidator, UnexpectedTextValidator from .header.store import HeaderExtractor from .text.store import TextExtractor from .xml.store import XmlEx...
true
true
08f2870ffa2c24d9df6123359ef2117383e1c2bd
329
py
Python
nimble/sinks/elementary.py
risteon/nimble
7ba28d3f2cc08501dc68ae4d63cf82980005df75
[ "MIT" ]
1
2017-01-20T14:04:39.000Z
2017-01-20T14:04:39.000Z
nimble/sinks/elementary.py
risteon/nimble
7ba28d3f2cc08501dc68ae4d63cf82980005df75
[ "MIT" ]
null
null
null
nimble/sinks/elementary.py
risteon/nimble
7ba28d3f2cc08501dc68ae4d63cf82980005df75
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function from ..core import Sink class ConsoleSink(Sink): """This sink prints all data.""" def __init__(self): super(ConsoleSink, self).__init__(name=u"ConsoleSink") def set_data(self, data): pri...
20.5625
62
0.683891
from __future__ import absolute_import from __future__ import print_function from ..core import Sink class ConsoleSink(Sink): def __init__(self): super(ConsoleSink, self).__init__(name=u"ConsoleSink") def set_data(self, data): print(data)
true
true
08f2876f7fb7e41c237cecec8ba6c3ea01958b1e
631
py
Python
sla_cli/tests/src/common/test_path.py
DavidWalshe93/SL-CLI
c92ca8a6e57eb51bf9c9433013ce16d443f8d152
[ "MIT" ]
2
2022-01-07T09:59:32.000Z
2022-01-25T12:04:06.000Z
sla_cli/tests/src/common/test_path.py
DavidWalshe93/SL-CLI
c92ca8a6e57eb51bf9c9433013ce16d443f8d152
[ "MIT" ]
null
null
null
sla_cli/tests/src/common/test_path.py
DavidWalshe93/SL-CLI
c92ca8a6e57eb51bf9c9433013ce16d443f8d152
[ "MIT" ]
1
2021-04-07T17:14:37.000Z
2021-04-07T17:14:37.000Z
""" Author: David Walshe Date: 07 April 2021 """ import os import sla_cli.src.common.path as sut def test_root_dir(): """ :GIVEN: Nothing. :WHEN: Getting the project root path. :THEN: Verify if the expected path is returned. """ expected = os.path.join(os.getcwd(), "sla_cli", "sr...
21.033333
68
0.606973
import os import sla_cli.src.common.path as sut def test_root_dir(): expected = os.path.join(os.getcwd(), "sla_cli", "src") assert sut.Path.src_root() == expected def test_db(): expected = os.path.join(os.getcwd(), "sla_cli", "db", "db.json") assert sut.Path.db() == expected
true
true
08f28ac555376490cf7aec529b2729ee4ce24b1b
10,084
py
Python
kernel/qemu_affinity.py
liva/node-replicated-kernel
2d953c3a984b0c3a48b6368062b6abdf5146da2a
[ "MIT" ]
2
2020-05-21T15:13:49.000Z
2021-01-16T19:44:02.000Z
qemu_affinity.py
gz/sv6
49e35fa60ef5e366219b0b2276cbedb8f15fea12
[ "MIT-0" ]
null
null
null
qemu_affinity.py
gz/sv6
49e35fa60ef5e366219b0b2276cbedb8f15fea12
[ "MIT-0" ]
null
null
null
#!/bin/env python import argparse from pathlib import Path import re import itertools from operator import itemgetter from collections import Counter, OrderedDict, namedtuple import os QEMU_COMM_RE = re.compile('qemu-system-.+$') QEMU_DEBUG_RE = re.compile('debug-threads=on') AFFINITY_SPEC_RE = re.compile('(\d+)(?:-(...
38.05283
255
0.687723
import argparse from pathlib import Path import re import itertools from operator import itemgetter from collections import Counter, OrderedDict, namedtuple import os QEMU_COMM_RE = re.compile('qemu-system-.+$') QEMU_DEBUG_RE = re.compile('debug-threads=on') AFFINITY_SPEC_RE = re.compile('(\d+)(?:-(\d+))?$') ALL_THR...
true
true
08f28ce27183089f8ea168b22e5225b02b2cb597
2,129
py
Python
pypd/models/service.py
thoughtfix/pagerduty-api-python-client
689ccb283e982dcd6ba1baa6947af97e7194ea3d
[ "MIT" ]
3
2017-10-18T19:25:59.000Z
2021-06-28T19:18:00.000Z
pypd/models/service.py
thoughtfix/pagerduty-api-python-client
689ccb283e982dcd6ba1baa6947af97e7194ea3d
[ "MIT" ]
2
2018-01-02T15:21:54.000Z
2018-01-23T16:11:44.000Z
pypd/models/service.py
thoughtfix/pagerduty-api-python-client
689ccb283e982dcd6ba1baa6947af97e7194ea3d
[ "MIT" ]
2
2017-10-18T19:15:45.000Z
2018-03-28T16:55:17.000Z
# Copyright (c) PagerDuty. # See LICENSE for details. from .entity import Entity from .integration import Integration from .vendor import Vendor class Service(Entity): """PagerDuty service entity.""" STR_OUTPUT_FIELDS = ('id', 'name',) integrationFactory = Integration vendorFactory = Vendor ALLO...
30.855072
87
0.643495
from .entity import Entity from .integration import Integration from .vendor import Vendor class Service(Entity): STR_OUTPUT_FIELDS = ('id', 'name',) integrationFactory = Integration vendorFactory = Vendor ALLOWED_SERVICE_TYPES = [ 'service_reference', ] @classmethod def...
true
true
08f28d9d1a2ae03f97f36331f7c611b88868d717
5,697
py
Python
sa/profiles/DCN/DCWL/get_interfaces.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
84
2017-10-22T11:01:39.000Z
2022-02-27T03:43:48.000Z
sa/profiles/DCN/DCWL/get_interfaces.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
22
2017-12-11T07:21:56.000Z
2021-09-23T02:53:50.000Z
sa/profiles/DCN/DCWL/get_interfaces.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
23
2017-12-06T06:59:52.000Z
2022-02-24T00:02:25.000Z
# --------------------------------------------------------------------- # DCN.DCWL.get_interfaces # --------------------------------------------------------------------- # Copyright (C) 2007-2020 The NOC Project # See LICENSE for details # --------------------------------------------------------------------- # Third-p...
37.98
93
0.444796
import codecs from noc.core.script.base import BaseScript from noc.sa.interfaces.igetinterfaces import IGetInterfaces from noc.core.ip import IPv4 from noc.core.comp import smart_text class Script(BaseScript): name = "DCN.DCWL.get_interfaces" cache = True interface = IGetInterfaces BLOCK_SPLITTER =...
true
true
08f28ef256e1ad61223661fa82a064e4144e5ca8
765
py
Python
omnizart/models/patch_cnn.py
nicolasanjoran/omnizart
b0e74af39b2e3a312ef32dbf0837626b2e043cb6
[ "MIT" ]
1,145
2020-11-13T10:07:47.000Z
2022-03-29T17:35:36.000Z
omnizart/models/patch_cnn.py
nicolasanjoran/omnizart
b0e74af39b2e3a312ef32dbf0837626b2e043cb6
[ "MIT" ]
44
2020-12-29T04:51:16.000Z
2022-03-15T06:52:04.000Z
omnizart/models/patch_cnn.py
nicolasanjoran/omnizart
b0e74af39b2e3a312ef32dbf0837626b2e043cb6
[ "MIT" ]
61
2020-12-19T09:09:42.000Z
2022-03-23T01:26:22.000Z
import tensorflow as tf def patch_cnn_model(patch_size=25): inputs = tf.keras.Input(shape=(patch_size, patch_size, 1)) out = tf.keras.layers.Conv2D(8, 5, activation="relu")(inputs) out = tf.keras.layers.Dropout(0.25)(out) out = tf.keras.layers.Conv2D(16, 3, activation="relu")(out) out = tf.keras....
38.25
65
0.677124
import tensorflow as tf def patch_cnn_model(patch_size=25): inputs = tf.keras.Input(shape=(patch_size, patch_size, 1)) out = tf.keras.layers.Conv2D(8, 5, activation="relu")(inputs) out = tf.keras.layers.Dropout(0.25)(out) out = tf.keras.layers.Conv2D(16, 3, activation="relu")(out) out = tf.keras....
true
true
08f28f2af9eae082baef871b0b1b7952c073658f
1,212
py
Python
fever-annotations-platform/src/annotation/flask_services/annotation_request.py
alexa/fever
9820e36054228c3d00bccd8891d7c927a0cb5b31
[ "Apache-2.0" ]
52
2018-03-28T10:56:22.000Z
2022-03-27T19:29:57.000Z
fever-annotations-platform/src/annotation/flask_services/annotation_request.py
alexa/fever
9820e36054228c3d00bccd8891d7c927a0cb5b31
[ "Apache-2.0" ]
1
2018-04-09T12:11:39.000Z
2018-04-09T12:11:39.000Z
fever-annotations-platform/src/annotation/flask_services/annotation_request.py
alexa/fever
9820e36054228c3d00bccd8891d7c927a0cb5b31
[ "Apache-2.0" ]
18
2018-03-21T07:50:24.000Z
2022-01-08T03:56:51.000Z
# Copyright 2018 Amazon Research Cambridge # # 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...
31.894737
74
0.693069
from flask import jsonify import random class AnnotationRequest: def __init__(self, dataset, claim=None): super().__init__() if claim is None: self.example = dataset[random.randint(0, len(dataset))] else: self.example = dataset[int(claim)] while len(self...
true
true
08f290c0e729e45471fd3af8b64a89d6c520b826
302
py
Python
output/models/sun_data/elem_decl/disallowed_subst/disallowed_subst00503m/disallowed_subst00503m2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/sun_data/elem_decl/disallowed_subst/disallowed_subst00503m/disallowed_subst00503m2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/sun_data/elem_decl/disallowed_subst/disallowed_subst00503m/disallowed_subst00503m2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.sun_data.elem_decl.disallowed_subst.disallowed_subst00503m.disallowed_subst00503m2_xsd.disallowed_subst00503m2 import ( Head, Member1, TypeType, DerivedFromType, Root, ) __all__ = [ "Head", "Member1", "TypeType", "DerivedFromType", "Root", ]
18.875
138
0.695364
from output.models.sun_data.elem_decl.disallowed_subst.disallowed_subst00503m.disallowed_subst00503m2_xsd.disallowed_subst00503m2 import ( Head, Member1, TypeType, DerivedFromType, Root, ) __all__ = [ "Head", "Member1", "TypeType", "DerivedFromType", "Root", ]
true
true
08f291b36d9876636178058dc7b0c5cf07a06d6c
124,988
py
Python
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/_models.py
hurtn/azure-sdk-for-python
64cc053e589691da22fed7a47611199818c99b2b
[ "MIT" ]
1
2020-12-10T03:17:51.000Z
2020-12-10T03:17:51.000Z
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/_models.py
hurtn/azure-sdk-for-python
64cc053e589691da22fed7a47611199818c99b2b
[ "MIT" ]
15
2019-07-12T18:18:04.000Z
2019-07-25T20:55:51.000Z
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/models/_models.py
hurtn/azure-sdk-for-python
64cc053e589691da22fed7a47611199818c99b2b
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
40.739244
188
0.665784
import msrest.serialization class AccountSasParameters(msrest.serialization.Model): _validation = { 'services': {'required': True}, 'resource_types': {'required': True}, 'permissions': {'required': True}, 'shared_access_expiry_time': {'required': True}, } _attribute_map ...
true
true
08f292312372bbb8de1bb3a9e44acd307630f0af
8,255
py
Python
test/functional/wallet_labels.py
phlsolo316/vidcoin
d6eec232378c329ebc2a31e7d21acf58cf62368d
[ "MIT" ]
null
null
null
test/functional/wallet_labels.py
phlsolo316/vidcoin
d6eec232378c329ebc2a31e7d21acf58cf62368d
[ "MIT" ]
null
null
null
test/functional/wallet_labels.py
phlsolo316/vidcoin
d6eec232378c329ebc2a31e7d21acf58cf62368d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2016-2020 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 label RPCs. RPCs tested are: - getaddressesbylabel - listaddressgroupings - setlabel ...
40.465686
111
0.648213
from collections import defaultdict from test_framework.test_framework import VIDCoinTestFramework from test_framework.util import assert_equal, assert_raises_rpc_error from test_framework.wallet_util import test_address class WalletLabelsTest(VIDCoinTestFramework): def set_test_params(self): self.setup_...
true
true
08f293559f0817aef34b8c27d48cdc93b1c64a3a
17,414
py
Python
rally_openstack/task/scenarios/glance/images.py
jogeo/rally-openstack
83437e7c5925d5d647cd28f1821b6d51687b0123
[ "Apache-2.0" ]
null
null
null
rally_openstack/task/scenarios/glance/images.py
jogeo/rally-openstack
83437e7c5925d5d647cd28f1821b6d51687b0123
[ "Apache-2.0" ]
null
null
null
rally_openstack/task/scenarios/glance/images.py
jogeo/rally-openstack
83437e7c5925d5d647cd28f1821b6d51687b0123
[ "Apache-2.0" ]
1
2021-08-10T03:11:51.000Z
2021-08-10T03:11:51.000Z
# Copyright 2014: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
46.811828
78
0.630412
from rally.common import logging from rally.task import types from rally.task import validation from rally_openstack.common import consts from rally_openstack.common.services.image import glance_v2 from rally_openstack.common.services.image import image from rally_openstack.task import scenario from rally_openstack.t...
true
true
08f2937ad9af0e74049c3c664b39af63be92c7d9
27,731
py
Python
stonesoup/platform/tests/test_platform_simple.py
SohSalari/Stone-Soup
e073d4145df18facad43e4ab7b0a34e8d65f67ee
[ "MIT" ]
1
2020-07-21T15:20:20.000Z
2020-07-21T15:20:20.000Z
stonesoup/platform/tests/test_platform_simple.py
SohSalari/Stone-Soup
e073d4145df18facad43e4ab7b0a34e8d65f67ee
[ "MIT" ]
null
null
null
stonesoup/platform/tests/test_platform_simple.py
SohSalari/Stone-Soup
e073d4145df18facad43e4ab7b0a34e8d65f67ee
[ "MIT" ]
null
null
null
# coding: utf-8 import datetime import numpy as np import pytest from ..tests import test_platform_base from ...types.state import State from ..base import MovingPlatform, FixedPlatform from ...models.transition.linear import ( ConstantVelocity, CombinedLinearGaussianTransitionModel) from ...sensor.radar.radar im...
41.638138
98
0.511846
import datetime import numpy as np import pytest from ..tests import test_platform_base from ...types.state import State from ..base import MovingPlatform, FixedPlatform from ...models.transition.linear import ( ConstantVelocity, CombinedLinearGaussianTransitionModel) from ...sensor.radar.radar import RadarRangeB...
true
true
08f29561c1d09a46558c708cf16aef122852505f
14,837
py
Python
tools/tf-script.py
gstearmit/netron
9989411c613fb91038dd5f505b970bff515d06f2
[ "MIT" ]
1
2020-06-23T12:47:04.000Z
2020-06-23T12:47:04.000Z
tools/tf-script.py
gstearmit/netron
9989411c613fb91038dd5f505b970bff515d06f2
[ "MIT" ]
null
null
null
tools/tf-script.py
gstearmit/netron
9989411c613fb91038dd5f505b970bff515d06f2
[ "MIT" ]
null
null
null
import io import json import os import sys from tensorflow.core.framework import api_def_pb2 from tensorflow.core.framework import op_def_pb2 from tensorflow.core.framework import types_pb2 from google.protobuf import text_format os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' def metadata(): categories = { 'A...
39.251323
170
0.569253
import io import json import os import sys from tensorflow.core.framework import api_def_pb2 from tensorflow.core.framework import op_def_pb2 from tensorflow.core.framework import types_pb2 from google.protobuf import text_format os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' def metadata(): categories = { 'A...
true
true
08f295d124957385f3748a2aa62f607e9035e567
4,362
py
Python
buildscripts/tests/task_generation/test_suite_split_strategies.py
benety/mongo
203430ac9559f82ca01e3cbb3b0e09149fec0835
[ "Apache-2.0" ]
null
null
null
buildscripts/tests/task_generation/test_suite_split_strategies.py
benety/mongo
203430ac9559f82ca01e3cbb3b0e09149fec0835
[ "Apache-2.0" ]
null
null
null
buildscripts/tests/task_generation/test_suite_split_strategies.py
benety/mongo
203430ac9559f82ca01e3cbb3b0e09149fec0835
[ "Apache-2.0" ]
null
null
null
"""Unit tests for suite_split_strategies.py.""" import unittest import buildscripts.task_generation.suite_split_strategies as under_test from buildscripts.util.teststats import TestRuntime # pylint: disable=missing-docstring,invalid-name,unused-argument,no-self-use,protected-access,no-value-for-parameter class Test...
33.813953
116
0.654746
import unittest import buildscripts.task_generation.suite_split_strategies as under_test from buildscripts.util.teststats import TestRuntime class TestDivideRemainingTestsAmongSuites(unittest.TestCase): @staticmethod def generate_tests_runtimes(n_tests): tests_runtimes = [] for idx i...
true
true
08f29756f75471b0a3f595d9e7d032c38a482c42
3,368
py
Python
python/dr1_fpackkeywords.py
dnidever/SMASHRED
241f11c7c7f83dcfaa76dd54c825fef45ab6033a
[ "MIT" ]
1
2017-06-09T03:36:05.000Z
2017-06-09T03:36:05.000Z
python/dr1_fpackkeywords.py
dnidever/SMASHRED
241f11c7c7f83dcfaa76dd54c825fef45ab6033a
[ "MIT" ]
null
null
null
python/dr1_fpackkeywords.py
dnidever/SMASHRED
241f11c7c7f83dcfaa76dd54c825fef45ab6033a
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys #import numpy as np #import scipy import warnings from astropy.io import fits from astropy.utils.exceptions import AstropyWarning #import photutils #from skimage import measure, morphology #from scipy.cluster import vq #import gaps #import matplotlib.pyplot as plt #import pyl...
41.580247
144
0.622328
import os import sys import warnings from astropy.io import fits from astropy.utils.exceptions import AstropyWarning import time if __name__ == "__main__": # since these are integers and will be automatically compressed # losslessly...
false
true
08f297d466d3f490634a59ea25768904112fc2c2
496
py
Python
2020/day01/two.py
geberl/advent-of-code
152ac94676830ac920bf06a1a3f1aa88377cd775
[ "MIT" ]
null
null
null
2020/day01/two.py
geberl/advent-of-code
152ac94676830ac920bf06a1a3f1aa88377cd775
[ "MIT" ]
null
null
null
2020/day01/two.py
geberl/advent-of-code
152ac94676830ac920bf06a1a3f1aa88377cd775
[ "MIT" ]
null
null
null
numbers = [] with open("input.txt") as file_handler: for line in file_handler: numbers.append(line.strip()) found = False for n in numbers: if found: break for m in numbers: if found: break for o in numbers: if int(n) + int(m) + int(o) == 2020: ...
22.545455
68
0.467742
numbers = [] with open("input.txt") as file_handler: for line in file_handler: numbers.append(line.strip()) found = False for n in numbers: if found: break for m in numbers: if found: break for o in numbers: if int(n) + int(m) + int(o) == 2020: ...
true
true
08f29829ac970d9374923fdd54465cb59d3a577e
743
py
Python
master/split-ne-master/split-ne-master/bin/cnec-remove-internal-structures.py
AlexRogalskiy/DevArtifacts
931aabb8cbf27656151c54856eb2ea7d1153203a
[ "MIT" ]
4
2018-09-07T15:35:24.000Z
2019-03-27T09:48:12.000Z
master/split-ne-master/split-ne-master/bin/cnec-remove-internal-structures.py
AlexRogalskiy/DevArtifacts
931aabb8cbf27656151c54856eb2ea7d1153203a
[ "MIT" ]
371
2020-03-04T21:51:56.000Z
2022-03-31T20:59:11.000Z
master/split-ne-master/split-ne-master/bin/cnec-remove-internal-structures.py
AlexRogalskiy/DevArtifacts
931aabb8cbf27656151c54856eb2ea7d1153203a
[ "MIT" ]
3
2019-06-18T19:57:17.000Z
2020-11-06T03:55:08.000Z
#!/usr/bin/python -tt ## Script to remove marking of named entities that are inside other named entity ## input: STDIN from sys import stdin for line in stdin: new_string = "" last_special = ">" inside = 0 tag = False for ch in line: if tag and ch in [" ", "<"]: tag = False if not tag: ...
20.638889
80
0.497981
from sys import stdin for line in stdin: new_string = "" last_special = ">" inside = 0 tag = False for ch in line: if tag and ch in [" ", "<"]: tag = False if not tag: if ch == "<" and inside == 0: new_string += "<" last_special = "<" inside += 1 tag ...
false
true
08f298bb9f928b14d7f26bd3ce4055a9482c0c65
234
py
Python
Task/Sorting-algorithms-Cocktail-sort/Python/sorting-algorithms-cocktail-sort-2.py
LaudateCorpus1/RosettaCodeData
9ad63ea473a958506c041077f1d810c0c7c8c18d
[ "Info-ZIP" ]
5
2021-01-29T20:08:05.000Z
2022-03-22T06:16:05.000Z
Task/Sorting-algorithms-Cocktail-sort/Python/sorting-algorithms-cocktail-sort-2.py
seanwallawalla-forks/RosettaCodeData
9ad63ea473a958506c041077f1d810c0c7c8c18d
[ "Info-ZIP" ]
null
null
null
Task/Sorting-algorithms-Cocktail-sort/Python/sorting-algorithms-cocktail-sort-2.py
seanwallawalla-forks/RosettaCodeData
9ad63ea473a958506c041077f1d810c0c7c8c18d
[ "Info-ZIP" ]
1
2021-04-13T04:19:31.000Z
2021-04-13T04:19:31.000Z
test1 = [7, 6, 5, 9, 8, 4, 3, 1, 2, 0] cocktailSort(test1) print test1 #>>> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] test2=list('big fjords vex quick waltz nymph') cocktailSort(test2) print ''.join(test2) #>>> abcdefghiijklmnopqrstuvwxyz
23.4
46
0.623932
test1 = [7, 6, 5, 9, 8, 4, 3, 1, 2, 0] cocktailSort(test1) print test1 test2=list('big fjords vex quick waltz nymph') cocktailSort(test2) print ''.join(test2)
false
true
08f298e6b58514bb609c6c53fd95d604fef90538
40,665
py
Python
spyder/plugins/plots/widgets/figurebrowser.py
akshay-akkipro/spyder
9efd8aeb1a115fbf61e32f82bbcb073594c51491
[ "MIT" ]
null
null
null
spyder/plugins/plots/widgets/figurebrowser.py
akshay-akkipro/spyder
9efd8aeb1a115fbf61e32f82bbcb073594c51491
[ "MIT" ]
null
null
null
spyder/plugins/plots/widgets/figurebrowser.py
akshay-akkipro/spyder
9efd8aeb1a115fbf61e32f82bbcb073594c51491
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) """ Figure browser widget This is the main widget used in the Plots plugin """ # Standard library imports import datetime import os.path as osp import sys # Third ...
35.765172
79
0.623509
import datetime import os.path as osp import sys from qtconsole.svg import svg_to_clipboard, svg_to_image from qtpy.compat import getexistingdirectory, getsavefilename from qtpy.QtCore import QEvent, QPoint, QRect, QSize, Qt, QTimer, Signal, Slot from qtpy.QtGui import QKeySequence, QPainter, QPixmap from qtpy.QtWid...
true
true
08f298f41a8139998fe01f9f3d7b8ee760ec9cde
457
py
Python
serverless/integration/sentry.py
captain-fox/serverless-builder
d79d120578d692dd34dd2f0a3bb75cc8ec719c81
[ "MIT" ]
null
null
null
serverless/integration/sentry.py
captain-fox/serverless-builder
d79d120578d692dd34dd2f0a3bb75cc8ec719c81
[ "MIT" ]
null
null
null
serverless/integration/sentry.py
captain-fox/serverless-builder
d79d120578d692dd34dd2f0a3bb75cc8ec719c81
[ "MIT" ]
null
null
null
from serverless.service.types import Integration class Sentry(Integration): def __init__(self, sentry_dsn): super().__init__() self.sentry_dsn = sentry_dsn def enable(self, service): service.provider.environment["envs"]["SENTRY_DSN"] = self.sentry_dsn service.provider.environm...
35.153846
85
0.680525
from serverless.service.types import Integration class Sentry(Integration): def __init__(self, sentry_dsn): super().__init__() self.sentry_dsn = sentry_dsn def enable(self, service): service.provider.environment["envs"]["SENTRY_DSN"] = self.sentry_dsn service.provider.environm...
true
true
08f29906e23ed96830a32bf2801847469040bd98
853
py
Python
example/rest.py
robertchase/spindrift
e1ee59fd6822558cc47738d3221815064117457c
[ "MIT" ]
1
2020-09-21T19:51:22.000Z
2020-09-21T19:51:22.000Z
example/rest.py
robertchase/spindrift
e1ee59fd6822558cc47738d3221815064117457c
[ "MIT" ]
null
null
null
example/rest.py
robertchase/spindrift
e1ee59fd6822558cc47738d3221815064117457c
[ "MIT" ]
null
null
null
import spindrift.network as network import spindrift.rest as rest import spindrift.rest_mapper as rest_mapper class Rest(rest.RESTHandler): def on_open(self): print('open cid=', self.id) def on_rest_data(self, request, *groups): print('rest cid=', self.id, 'method=', self.http_method, 'resou...
25.848485
105
0.682298
import spindrift.network as network import spindrift.rest as rest import spindrift.rest_mapper as rest_mapper class Rest(rest.RESTHandler): def on_open(self): print('open cid=', self.id) def on_rest_data(self, request, *groups): print('rest cid=', self.id, 'method=', self.http_method, 'resou...
true
true
08f299273b60e98f6e1a0604f6e8181b5d63d7f1
2,182
py
Python
api_app/migrations/0005_auto_20210320_2239.py
karolllus/geoip-jwt-postgres
721162980b022e3878926629d18fc2880abc82cb
[ "MIT" ]
null
null
null
api_app/migrations/0005_auto_20210320_2239.py
karolllus/geoip-jwt-postgres
721162980b022e3878926629d18fc2880abc82cb
[ "MIT" ]
null
null
null
api_app/migrations/0005_auto_20210320_2239.py
karolllus/geoip-jwt-postgres
721162980b022e3878926629d18fc2880abc82cb
[ "MIT" ]
null
null
null
# Generated by Django 3.1.7 on 2021-03-20 21:39 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api_app', '0004_auto_20210320_2137'), ] operations = [ migrations.AddField( model_name='geomodel', name='city', ...
31.623188
74
0.548579
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api_app', '0004_auto_20210320_2137'), ] operations = [ migrations.AddField( model_name='geomodel', name='city', field=models.CharField(default='', max_l...
true
true
08f299543a384d493e9f37f5ce0fa3ca61f3d936
2,954
py
Python
tests/test_ply.py
dmontagu/trimesh
80247d9870e3b7f3b8ce31c35d2a7589feebfd4f
[ "MIT" ]
1
2021-08-19T13:29:38.000Z
2021-08-19T13:29:38.000Z
tests/test_ply.py
dmontagu/trimesh
80247d9870e3b7f3b8ce31c35d2a7589feebfd4f
[ "MIT" ]
null
null
null
tests/test_ply.py
dmontagu/trimesh
80247d9870e3b7f3b8ce31c35d2a7589feebfd4f
[ "MIT" ]
3
2018-04-10T15:44:44.000Z
2021-07-23T07:19:10.000Z
try: from . import generic as g except BaseException: import generic as g class PlyTest(g.unittest.TestCase): def test_ply_dtype(self): # make sure all ply dtype strings are valid dtypes dtypes = g.trimesh.exchange.ply.dtypes for d in dtypes.values(): # will raise if d...
34.752941
89
0.596141
try: from . import generic as g except BaseException: import generic as g class PlyTest(g.unittest.TestCase): def test_ply_dtype(self): dtypes = g.trimesh.exchange.ply.dtypes for d in dtypes.values(): g.np.dtype(d) def test_ply(self): m = g.get...
true
true
08f29a1ae3fc2879c471acb9c39ed87616d858fa
8,451
py
Python
contrib/opencensus-ext-pyramid/tests/test_pyramid_middleware.py
samn/opencensus-python
d8709f141b67f7f5ba011c440b8ba8fb9cbc419a
[ "Apache-2.0" ]
null
null
null
contrib/opencensus-ext-pyramid/tests/test_pyramid_middleware.py
samn/opencensus-python
d8709f141b67f7f5ba011c440b8ba8fb9cbc419a
[ "Apache-2.0" ]
null
null
null
contrib/opencensus-ext-pyramid/tests/test_pyramid_middleware.py
samn/opencensus-python
d8709f141b67f7f5ba011c440b8ba8fb9cbc419a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2017, OpenCensus 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 # # Unle...
30.730909
74
0.660514
import unittest import mock from pyramid.registry import Registry from pyramid.response import Response from pyramid.testing import DummyRequest from opencensus.common.transports import sync from opencensus.ext.pyramid import pyramid_middleware from opencensus.ext.zipkin import trace_exporter as zipkin_exporter fro...
true
true
08f29a2de4a31e7d6f94107395de3fbacfc40013
5,060
py
Python
VQ2D/vq2d/tracking/kys.py
emulhall/episodic-memory
27bafec6e09c108f0efe5ac899eabde9d1ac40cc
[ "MIT" ]
27
2021-10-16T02:39:17.000Z
2022-03-31T11:16:11.000Z
VQ2D/vq2d/tracking/kys.py
emulhall/episodic-memory
27bafec6e09c108f0efe5ac899eabde9d1ac40cc
[ "MIT" ]
5
2022-03-23T04:53:36.000Z
2022-03-29T23:39:07.000Z
VQ2D/vq2d/tracking/kys.py
emulhall/episodic-memory
27bafec6e09c108f0efe5ac899eabde9d1ac40cc
[ "MIT" ]
13
2021-11-25T19:17:29.000Z
2022-03-25T14:01:47.000Z
import importlib import cv2 import numpy as np from pytracking.features.net_wrappers import NetWithBackbone from ..structures import BBox from .utils import draw_bbox class KYSTracker(object): def __init__(self, model_path): name, parameter_name = "kys", "default" # Load tracker parameters ...
30.853659
86
0.616996
import importlib import cv2 import numpy as np from pytracking.features.net_wrappers import NetWithBackbone from ..structures import BBox from .utils import draw_bbox class KYSTracker(object): def __init__(self, model_path): name, parameter_name = "kys", "default" param_module = importli...
true
true
08f29a9fb3ecda5d98431885112bd593ab4775b7
13,085
py
Python
homeassistant/helpers/entity_registry.py
sluggern67/home-assistant
756c36171d6ec0d0e8e1cb37789a7da5cc66b225
[ "Apache-2.0" ]
3
2020-05-18T10:18:16.000Z
2020-12-08T11:27:55.000Z
homeassistant/helpers/entity_registry.py
sluggern67/home-assistant
756c36171d6ec0d0e8e1cb37789a7da5cc66b225
[ "Apache-2.0" ]
3
2021-02-08T20:54:46.000Z
2021-09-08T02:30:04.000Z
homeassistant/helpers/entity_registry.py
sluggern67/home-assistant
756c36171d6ec0d0e8e1cb37789a7da5cc66b225
[ "Apache-2.0" ]
6
2020-04-10T06:21:11.000Z
2021-07-01T08:53:38.000Z
"""Provide a registry to track entity IDs. The Entity Registry keeps a registry of entities. Entities are uniquely identified by their domain, platform and a unique id provided by that platform. The Entity Registry will persist itself 10 seconds after a new entity is registered. Registering a new entity while a timer...
31.60628
87
0.600841
import asyncio from collections import OrderedDict from itertools import chain import logging from typing import Any, Dict, Iterable, List, Optional, cast import attr from homeassistant.core import Event, callback, split_entity_id, valid_entity_id from homeassistant.helpers.device_registry import EVENT_DEVICE_REGISTR...
true
true
08f29b2f14bdea8c1e4288c0514d4ab6d3e02663
10,478
py
Python
logcausality/logparser.py
cpflat/LogCausalAnalysis
f475f53cb683ab6ad55851c69129758e4ac89fc6
[ "BSD-3-Clause" ]
20
2016-11-22T03:21:20.000Z
2021-06-16T02:44:58.000Z
logcausality/logparser.py
arita37/LogCausalAnalysis
f475f53cb683ab6ad55851c69129758e4ac89fc6
[ "BSD-3-Clause" ]
1
2019-10-23T05:45:34.000Z
2019-11-01T04:56:01.000Z
logcausality/logparser.py
arita37/LogCausalAnalysis
f475f53cb683ab6ad55851c69129758e4ac89fc6
[ "BSD-3-Clause" ]
8
2015-11-13T03:33:04.000Z
2021-09-10T09:29:23.000Z
#!/usr/bin/env python # coding: utf-8 # Preprocessing for structuralizing log messages import sys import os import re import datetime import ipaddress import common import config DEFAULT_SYMDEF = "/".join((os.path.dirname(__file__), "symdef.txt.sample")) class LogParser(): re_time = re.compile(r"^\d{2}:\d{2}...
38.664207
1,097
0.497137
import sys import os import re import datetime import ipaddress import common import config DEFAULT_SYMDEF = "/".join((os.path.dirname(__file__), "symdef.txt.sample")) class LogParser(): re_time = re.compile(r"^\d{2}:\d{2}:\d{2}(\.\d+)?$") re_mac = re.compile(r"^[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{...
false
true
08f29bae44173450fa4b28abe0396df887cc48a4
4,117
py
Python
fondo_api/tests/test_file_views.py
Fonmon/Fondo-API
0c78eaab259df18219c01fceb67bd1b6ff8ec941
[ "MIT" ]
null
null
null
fondo_api/tests/test_file_views.py
Fonmon/Fondo-API
0c78eaab259df18219c01fceb67bd1b6ff8ec941
[ "MIT" ]
48
2018-01-13T14:52:52.000Z
2022-03-13T17:41:42.000Z
fondo_api/tests/test_file_views.py
Fonmon/Fondo-API
0c78eaab259df18219c01fceb67bd1b6ff8ec941
[ "MIT" ]
null
null
null
import json from django.urls import reverse from django.test.client import encode_multipart, BOUNDARY, MULTIPART_CONTENT from mock import patch, MagicMock from rest_framework import status from google.cloud.storage import Client from fondo_api.tests.abstract_test import AbstractTest from fondo_api.models import * vie...
32.674603
81
0.701967
import json from django.urls import reverse from django.test.client import encode_multipart, BOUNDARY, MULTIPART_CONTENT from mock import patch, MagicMock from rest_framework import status from google.cloud.storage import Client from fondo_api.tests.abstract_test import AbstractTest from fondo_api.models import * vie...
true
true
08f29bcfd31a00279ba2ad9040de32b4fd47f60a
7,912
py
Python
src/robot_learning/object_detect/scripts/CSPDarknet.py
janewen134/fyp
8fb93ac22d21d5d862035ba794fe9d264add2e63
[ "Apache-2.0" ]
null
null
null
src/robot_learning/object_detect/scripts/CSPDarknet.py
janewen134/fyp
8fb93ac22d21d5d862035ba794fe9d264add2e63
[ "Apache-2.0" ]
null
null
null
src/robot_learning/object_detect/scripts/CSPDarknet.py
janewen134/fyp
8fb93ac22d21d5d862035ba794fe9d264add2e63
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import torch import torch.nn.functional as F import torch.nn as nn import math from collections import OrderedDict import numpy as np from torch.nn.parameter import Parameter load_all_layers = True def load_model_pth(model, pth): print('Loading weights into state dic...
35.63964
116
0.532861
import torch import torch.nn.functional as F import torch.nn as nn import math from collections import OrderedDict import numpy as np from torch.nn.parameter import Parameter load_all_layers = True def load_model_pth(model, pth): print('Loading weights into state dict, name: %s'%(pth)) device = torch.device('...
true
true
08f29c1b4447834fbe6931c03a33a8ab3fb6a173
6,561
py
Python
tests/backends/local/translator_test.py
swinton/mopidy
c32c73f5112c29ef7ccccf36a508c571adb39759
[ "Apache-2.0" ]
null
null
null
tests/backends/local/translator_test.py
swinton/mopidy
c32c73f5112c29ef7ccccf36a508c571adb39759
[ "Apache-2.0" ]
null
null
null
tests/backends/local/translator_test.py
swinton/mopidy
c32c73f5112c29ef7ccccf36a508c571adb39759
[ "Apache-2.0" ]
null
null
null
# encoding: utf-8 import os import tempfile from mopidy.utils.path import path_to_uri from mopidy.backends.local.translator import parse_m3u, parse_mpd_tag_cache from mopidy.models import Track, Artist, Album from tests import unittest, path_to_data_dir data_dir = path_to_data_dir('') song1_path = path_to_data_dir(...
37.067797
79
0.672306
import os import tempfile from mopidy.utils.path import path_to_uri from mopidy.backends.local.translator import parse_m3u, parse_mpd_tag_cache from mopidy.models import Track, Artist, Album from tests import unittest, path_to_data_dir data_dir = path_to_data_dir('') song1_path = path_to_data_dir('song1.mp3') song2...
true
true
08f29c6d46d97c0c625787d3bc42909d2514ac54
9,399
py
Python
dragon/python/vm/onnx/core/backend/tensorrt.py
seetaresearch/Dragon
494774d3a545f807d483fd9e6e4563cedec6dda5
[ "BSD-2-Clause" ]
81
2018-03-13T13:08:37.000Z
2020-06-13T14:36:29.000Z
dragon/python/vm/onnx/core/backend/tensorrt.py
seetaresearch/Dragon
494774d3a545f807d483fd9e6e4563cedec6dda5
[ "BSD-2-Clause" ]
2
2019-08-07T09:26:07.000Z
2019-08-26T07:33:55.000Z
dragon/python/vm/onnx/core/backend/tensorrt.py
seetaresearch/Dragon
494774d3a545f807d483fd9e6e4563cedec6dda5
[ "BSD-2-Clause" ]
13
2018-03-13T13:08:50.000Z
2020-05-28T08:20:22.000Z
# ------------------------------------------------------------ # Copyright (c) 2017-present, SeetaTech, Co.,Ltd. # # Licensed under the BSD 2-Clause License. # You should have received a copy of the BSD 2-Clause License # along with the software. If not, See, # # <https://opensource.org/licenses/BSD-2-Clause> # # -...
32.863636
89
0.610065
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy try: import onnx from onnx.backend.base import Backend from onnx.backend.base import BackendRep as ONNXBackendRep from onnx.backend.base import Device from onnx.backend.base i...
true
true
08f29dcda1449f5060e84dd946fbb6b30fe8ab63
24,918
py
Python
villager-bot/cogs/commands/minecraft.py
villager-dev/Villager-Bot
35b82c9310c31aaa855f9124a1cf536a26f593bf
[ "MIT" ]
null
null
null
villager-bot/cogs/commands/minecraft.py
villager-dev/Villager-Bot
35b82c9310c31aaa855f9124a1cf536a26f593bf
[ "MIT" ]
null
null
null
villager-bot/cogs/commands/minecraft.py
villager-dev/Villager-Bot
35b82c9310c31aaa855f9124a1cf536a26f593bf
[ "MIT" ]
null
null
null
import asyncio import base64 import json import random from contextlib import suppress from urllib.parse import quote as urlquote import aiohttp import aiomcrcon as rcon import arrow import classyjson as cj import disnake from bot import VillagerBotCluster from cryptography.fernet import Fernet from disnake.ext import...
38.752722
126
0.581668
import asyncio import base64 import json import random from contextlib import suppress from urllib.parse import quote as urlquote import aiohttp import aiomcrcon as rcon import arrow import classyjson as cj import disnake from bot import VillagerBotCluster from cryptography.fernet import Fernet from disnake.ext import...
true
true
08f29e26abad41edee781e8dd5ad22908256e0a2
1,360
py
Python
bot/cogs/misc.py
RohanRadia/BaguetteBot
ae8ecd0ed765b5101227d3ff0cc78304956dd58e
[ "MIT" ]
1
2019-05-30T15:56:47.000Z
2019-05-30T15:56:47.000Z
bot/cogs/misc.py
RohanRadia/BaguetteBot
ae8ecd0ed765b5101227d3ff0cc78304956dd58e
[ "MIT" ]
null
null
null
bot/cogs/misc.py
RohanRadia/BaguetteBot
ae8ecd0ed765b5101227d3ff0cc78304956dd58e
[ "MIT" ]
2
2019-05-30T15:56:48.000Z
2021-03-28T13:55:16.000Z
import time from datetime import timedelta import discord from discord.ext import commands class Misc(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command(aliases=("ping", "pong", "lat", "latency", "uptime", "up")) async def stats(self, ctx): users = 0 for use...
35.789474
94
0.648529
import time from datetime import timedelta import discord from discord.ext import commands class Misc(commands.Cog): def __init__(self, bot): self.bot = bot @commands.command(aliases=("ping", "pong", "lat", "latency", "uptime", "up")) async def stats(self, ctx): users = 0 for use...
true
true
08f29e73ab0ad7a531c2339616c3539e93184e1d
427
py
Python
backend/testmobileapp123_de_23447/wsgi.py
crowdbotics-dev/testmobileapp123-de-23447
43cf73fc2439150cb5393a521b42855befda0e4f
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/testmobileapp123_de_23447/wsgi.py
crowdbotics-dev/testmobileapp123-de-23447
43cf73fc2439150cb5393a521b42855befda0e4f
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/testmobileapp123_de_23447/wsgi.py
crowdbotics-dev/testmobileapp123-de-23447
43cf73fc2439150cb5393a521b42855befda0e4f
[ "FTL", "AML", "RSA-MD" ]
null
null
null
""" WSGI config for testmobileapp123_de_23447 project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdef...
25.117647
85
0.803279
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testmobileapp123_de_23447.settings") application = get_wsgi_application()
true
true
08f29f1322893f2e96caf42ebc5c9d65bafb8487
8,023
py
Python
nssrc/com/citrix/netscaler/nitro/resource/config/ssl/sslcipher_sslprofile_binding.py
guardicore/nitro-python
5346a5086134aead80968f15a41ff527adaa0ec1
[ "Apache-2.0" ]
null
null
null
nssrc/com/citrix/netscaler/nitro/resource/config/ssl/sslcipher_sslprofile_binding.py
guardicore/nitro-python
5346a5086134aead80968f15a41ff527adaa0ec1
[ "Apache-2.0" ]
null
null
null
nssrc/com/citrix/netscaler/nitro/resource/config/ssl/sslcipher_sslprofile_binding.py
guardicore/nitro-python
5346a5086134aead80968f15a41ff527adaa0ec1
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2021 Citrix Systems, 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...
30.857692
163
0.731771
from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_resource from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_response from nssrc.com.citrix.netscaler.nitro.service.options import options from nssrc.com.citrix.netscaler.nitro.exception.nitro_exception import nitro...
true
true
08f2a148ecc535cfcee4cbf62f9826e40c0be68b
4,217
py
Python
consequence_minimal/settings.py
ronizzle/consequence-minimal
eb48aaa54d458133404c7a59cee3889dabc951e5
[ "Apache-2.0" ]
null
null
null
consequence_minimal/settings.py
ronizzle/consequence-minimal
eb48aaa54d458133404c7a59cee3889dabc951e5
[ "Apache-2.0" ]
null
null
null
consequence_minimal/settings.py
ronizzle/consequence-minimal
eb48aaa54d458133404c7a59cee3889dabc951e5
[ "Apache-2.0" ]
null
null
null
""" Django settings for consequence_minimal project. Generated by 'django-admin startproject' using Django 3.2.3. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settin...
25.403614
92
0.650937
import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = 'django-insecure-c3*=wdma8m21&ws-4lvv8w64b=^8v=sk1a6e74*7pc($v!snv)' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib....
true
true
08f2a172f8480d25e89c19fbe1e7d014fcff3303
751
py
Python
handler-lambda.py
fanout/serverless-websocket
e82de47a37759299b11049e3f6b601d247f7e874
[ "MIT" ]
24
2017-11-03T01:35:55.000Z
2021-03-21T14:16:24.000Z
handler-lambda.py
fanout/serverless-chat
e82de47a37759299b11049e3f6b601d247f7e874
[ "MIT" ]
null
null
null
handler-lambda.py
fanout/serverless-chat
e82de47a37759299b11049e3f6b601d247f7e874
[ "MIT" ]
2
2016-10-29T07:01:58.000Z
2017-10-06T20:30:28.000Z
from gripcontrol import WebSocketMessageFormat from faas_grip import lambda_get_websocket, publish def handler(event, context): try: ws = lambda_get_websocket(event) except ValueError: return { 'statusCode': 400, 'headers': {'Content-Type': 'text/plain'}, 'body': 'Not a WebSocket-over-HTTP request\n' ...
23.46875
71
0.713715
from gripcontrol import WebSocketMessageFormat from faas_grip import lambda_get_websocket, publish def handler(event, context): try: ws = lambda_get_websocket(event) except ValueError: return { 'statusCode': 400, 'headers': {'Content-Type': 'text/plain'}, 'body': 'Not a WebSocket-over-HTTP request\n' ...
true
true
08f2a2fcdbca0252686ea1cd9fdd975091dcc614
1,416
py
Python
miner_wiki_test.py
vcte/CS411-Miner
5b83c4467aae79f701e45873192cdd12acf8b8d1
[ "MIT" ]
null
null
null
miner_wiki_test.py
vcte/CS411-Miner
5b83c4467aae79f701e45873192cdd12acf8b8d1
[ "MIT" ]
null
null
null
miner_wiki_test.py
vcte/CS411-Miner
5b83c4467aae79f701e45873192cdd12acf8b8d1
[ "MIT" ]
null
null
null
## test functionality of miner_old.py ## from pyquery import PyQuery as pq import miner_old as m def test_text(): assert (m.text(pq("text")) == "text") assert (m.text(pq("<i>italics</i>")) == "italics") assert (m.text(pq("<a href=\"wikipedia.org\">link</a>")) == "link") assert (m.text(pq("<td...
37.263158
112
0.544492
from pyquery import PyQuery as pq import miner_old as m def test_text(): assert (m.text(pq("text")) == "text") assert (m.text(pq("<i>italics</i>")) == "italics") assert (m.text(pq("<a href=\"wikipedia.org\">link</a>")) == "link") assert (m.text(pq("<td><i>D & D: Slayer</i><br><i>D & D: Dungeon...
true
true
08f2a3af3c668b7eef42f89974d7087bbaff79ee
42,420
py
Python
sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client.py
iamvishnuks/azure-sdk-for-python
4df435651ab32f57b1e9f33fc65fd46632055704
[ "MIT" ]
null
null
null
sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client.py
iamvishnuks/azure-sdk-for-python
4df435651ab32f57b1e9f33fc65fd46632055704
[ "MIT" ]
null
null
null
sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client.py
iamvishnuks/azure-sdk-for-python
4df435651ab32f57b1e9f33fc65fd46632055704
[ "MIT" ]
1
2020-07-31T16:33:36.000Z
2020-07-31T16:33:36.000Z
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import functools import json import logging import time from azure_devtools.scenario_tests import RecordingProcessor, RequestUrlNormalizer from azure.keyvault.certific...
65.261538
7,583
0.698656
import functools import json import logging import time from azure_devtools.scenario_tests import RecordingProcessor, RequestUrlNormalizer from azure.keyvault.certificates import ( AdministratorContact, CertificateClient, CertificateContact, CertificatePolicyAction, CertificatePolicy, KeyType,...
true
true
08f2a571ea4a0792edd7fcf24ab5cf3e30cb2c06
89
py
Python
battle_tested/beta/__init__.py
CodyKochmann/battle_tested
6044d5988fdae9d1ead3fe42f2a93cc1a1d04a9b
[ "MIT" ]
91
2017-06-26T14:01:43.000Z
2022-02-15T11:41:20.000Z
battle_tested/beta/__init__.py
CodyKochmann/battle_tested
6044d5988fdae9d1ead3fe42f2a93cc1a1d04a9b
[ "MIT" ]
47
2017-05-20T12:51:05.000Z
2021-06-11T08:43:35.000Z
battle_tested/beta/__init__.py
CodyKochmann/battle_tested
6044d5988fdae9d1ead3fe42f2a93cc1a1d04a9b
[ "MIT" ]
1
2017-08-07T05:18:40.000Z
2017-08-07T05:18:40.000Z
''' dedicated namespace for the new beta :) ''' from battle_tested.beta.api import fuzz
22.25
47
0.730337
from battle_tested.beta.api import fuzz
true
true
08f2a5998ba07a6316246e8f9b8fac376d1917ca
6,430
py
Python
airsenal/scripts/airsenal_run_pipeline.py
JPKFin/AIrsenal
7824ae4c07c9f21336f2986c0439549e9c346433
[ "MIT" ]
null
null
null
airsenal/scripts/airsenal_run_pipeline.py
JPKFin/AIrsenal
7824ae4c07c9f21336f2986c0439549e9c346433
[ "MIT" ]
null
null
null
airsenal/scripts/airsenal_run_pipeline.py
JPKFin/AIrsenal
7824ae4c07c9f21336f2986c0439549e9c346433
[ "MIT" ]
null
null
null
import sys import multiprocessing import warnings import click from tqdm import TqdmWarning from airsenal.framework.schema import session_scope from airsenal.framework.utils import ( CURRENT_SEASON, NEXT_GAMEWEEK, fetcher, get_latest_prediction_tag, ) from airsenal.framework.optimization_utils import f...
30.619048
88
0.676827
import sys import multiprocessing import warnings import click from tqdm import TqdmWarning from airsenal.framework.schema import session_scope from airsenal.framework.utils import ( CURRENT_SEASON, NEXT_GAMEWEEK, fetcher, get_latest_prediction_tag, ) from airsenal.framework.optimization_utils import f...
true
true
08f2a61cee676b0b61bd34cf34847a7fbe3e9eb0
5,470
bzl
Python
nodejs/image.bzl
copymark/rules_docker
98a04dc204f04d2b80427af39ed7183f6e1cd986
[ "Apache-2.0" ]
1
2021-08-11T23:14:06.000Z
2021-08-11T23:14:06.000Z
nodejs/image.bzl
copymark/rules_docker
98a04dc204f04d2b80427af39ed7183f6e1cd986
[ "Apache-2.0" ]
null
null
null
nodejs/image.bzl
copymark/rules_docker
98a04dc204f04d2b80427af39ed7183f6e1cd986
[ "Apache-2.0" ]
1
2019-11-12T23:41:45.000Z
2019-11-12T23:41:45.000Z
# Copyright 2017 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
31.988304
131
0.661243
load("@bazel_skylib//lib:dicts.bzl", "dicts") load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary") load("@build_bazel_rules_nodejs//:providers.bzl", "NodeRuntimeDepsInfo", "NpmPackageInfo") load( "//container:container.bzl", "container_pull", ) load( "//lang:image.bzl", "app_layer", lang_...
true
true
08f2a645d3bfcadb22542aa142786e29b0b53ecf
3,880
py
Python
esp32/tools/lora/certification/certification.py
peterson79/pycom-micropython-sigfox
3f93fc2c02567c96f18cff4af9125db8fd7a6fb4
[ "MIT" ]
37
2017-12-07T15:49:29.000Z
2022-03-16T16:01:38.000Z
esp32/tools/lora/certification/certification.py
peterson79/pycom-micropython-sigfox
3f93fc2c02567c96f18cff4af9125db8fd7a6fb4
[ "MIT" ]
2
2018-04-05T13:51:44.000Z
2019-11-25T17:05:39.000Z
esp32/tools/lora/certification/certification.py
peterson79/pycom-micropython-sigfox
3f93fc2c02567c96f18cff4af9125db8fd7a6fb4
[ "MIT" ]
12
2018-01-25T21:48:58.000Z
2020-09-04T21:25:31.000Z
#!/usr/bin/env python # # Copyright (c) 2016, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information # see the Pycom Licence v1.0 document supplied with this file, or # available at https://www.pycom.io/opensource/licensing ...
40
112
0.546907
from network import LoRa import time import binascii import socket import struct APP_EUI = 'AD A4 DA E3 AC 12 67 6B' APP_KEY = '11 B0 28 2A 18 9B 75 B0 B4 D2 D8 C7 FA 38 54 8B' DEV_ADDR = '00 00 00 0A' NWK_SWKEY = '2B 7E 15 16 28 AE D2 A6 AB F7 15 88 09 CF 4F 3C' APP_SWKEY = '2B 7E 15 16 28 AE D2 A6 AB F7 15 88 09 ...
true
true