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
1c244b543a2bdec30a86aec6fa44e2a8aba7397c
8,728
py
Python
CM3D2 Converter/mate_export.py
yknD-CM3D2/Blender-CM3D2-Converter
c0f0fb62b684d4325ce5917617b3bdcb5b75c7a9
[ "Apache-2.0" ]
65
2019-02-15T14:49:56.000Z
2022-03-12T20:18:41.000Z
CM3D2 Converter/mate_export.py
yknD-CM3D2/Blender-CM3D2-Converter
c0f0fb62b684d4325ce5917617b3bdcb5b75c7a9
[ "Apache-2.0" ]
23
2015-09-19T01:54:48.000Z
2018-12-21T02:14:20.000Z
CM3D2 Converter/mate_export.py
CM3D2user/Blender-CM3D2-Converter
add1bc104633837cb7a0574ca30b73992de1dc6f
[ "Apache-2.0" ]
20
2019-05-15T17:53:08.000Z
2022-03-19T09:55:36.000Z
import bpy import os import re import struct from . import common class export_cm3d2_mate(bpy.types.Operator): bl_idname = 'material.export_cm3d2_mate' bl_label = "mateとして保存" bl_description = "表示しているマテリアルをmateファイルとして保存します" bl_options = {'REGISTER', 'UNDO'} filepath = bpy.props.StringProperty(subtype='FILE_PATH'...
33.829457
122
0.69363
import bpy import os import re import struct from . import common class export_cm3d2_mate(bpy.types.Operator): bl_idname = 'material.export_cm3d2_mate' bl_label = "mateとして保存" bl_description = "表示しているマテリアルをmateファイルとして保存します" bl_options = {'REGISTER', 'UNDO'} filepath = bpy.props.StringProperty(subtype='FILE_PATH'...
true
true
1c244b62cf1b6c4246b4b5078355641baee77d5f
628
py
Python
src/alerta/views.py
furthz/Colegio
573e9e4006c0d1cd33190b53da5988fdc0c9ca4c
[ "MIT" ]
2
2017-09-26T14:15:43.000Z
2018-03-19T01:03:28.000Z
src/alerta/views.py
furthz/Colegio
573e9e4006c0d1cd33190b53da5988fdc0c9ca4c
[ "MIT" ]
1
2017-10-21T22:30:39.000Z
2017-10-21T22:30:39.000Z
src/alerta/views.py
furthz/Colegio
573e9e4006c0d1cd33190b53da5988fdc0c9ca4c
[ "MIT" ]
9
2017-07-22T16:13:29.000Z
2020-11-12T21:03:36.000Z
from django.shortcuts import render # Create your views here. from django.core.urlresolvers import reverse_lazy from django.views.generic import ListView from django.views.generic.detail import DetailView from django.views.generic.edit import ( CreateView, UpdateView, DeleteView ) from .models import * fro...
24.153846
53
0.767516
from django.shortcuts import render from django.core.urlresolvers import reverse_lazy from django.views.generic import ListView from django.views.generic.detail import DetailView from django.views.generic.edit import ( CreateView, UpdateView, DeleteView ) from .models import * from .forms import * class...
true
true
1c244badeb9d742c546fb1c6a653132de63b581a
1,927
py
Python
thread_helpers/queueables.py
willwybrow/ActuatorUpdater
9017b93300bb5d8b8afe4c3e5ff15ddb1dcad667
[ "MIT" ]
null
null
null
thread_helpers/queueables.py
willwybrow/ActuatorUpdater
9017b93300bb5d8b8afe4c3e5ff15ddb1dcad667
[ "MIT" ]
null
null
null
thread_helpers/queueables.py
willwybrow/ActuatorUpdater
9017b93300bb5d8b8afe4c3e5ff15ddb1dcad667
[ "MIT" ]
null
null
null
import datetime import pytz class StatusMessage: CATEGORY_INFO = "info" CATEGORY_ERROR = "error" CATEGORY_WARNING = "warning" CATEGORY_SUCCESS = "success" def __init__(self, message, category=CATEGORY_INFO): self._message = message self._category = category self._timestamp...
26.040541
77
0.70576
import datetime import pytz class StatusMessage: CATEGORY_INFO = "info" CATEGORY_ERROR = "error" CATEGORY_WARNING = "warning" CATEGORY_SUCCESS = "success" def __init__(self, message, category=CATEGORY_INFO): self._message = message self._category = category self._timestamp...
true
true
1c244bfaa184d209fa620e923010c8425bc44282
6,977
py
Python
Processor/tsne.py
george200150/Licenta
9c3f7d86abf3cc5d90204db0acc956eb8bee26dc
[ "MIT" ]
null
null
null
Processor/tsne.py
george200150/Licenta
9c3f7d86abf3cc5d90204db0acc956eb8bee26dc
[ "MIT" ]
null
null
null
Processor/tsne.py
george200150/Licenta
9c3f7d86abf3cc5d90204db0acc956eb8bee26dc
[ "MIT" ]
null
null
null
import argparse from tqdm import tqdm import cv2 import torch import random import numpy as np from sklearn.manifold import TSNE import matplotlib.pyplot as plt from ResNeSt.encoding.models.backbone import resnet101, resnest101, resnest200 from animals10 import AnimalsDataset, collate_skip_empty, colors_per_class de...
31.858447
116
0.686971
import argparse from tqdm import tqdm import cv2 import torch import random import numpy as np from sklearn.manifold import TSNE import matplotlib.pyplot as plt from ResNeSt.encoding.models.backbone import resnet101, resnest101, resnest200 from animals10 import AnimalsDataset, collate_skip_empty, colors_per_class de...
true
true
1c244c1b29793dbb1e3a902d4f264bc4cf178a86
80,898
py
Python
tensorflow/python/client/session_test.py
fwtan/tensorflow
efa3fb28d94b7937edaafb5874c191ad0e2149ca
[ "Apache-2.0" ]
2
2020-06-16T22:01:14.000Z
2020-06-20T10:10:26.000Z
tensorflow/python/client/session_test.py
fwtan/tensorflow
efa3fb28d94b7937edaafb5874c191ad0e2149ca
[ "Apache-2.0" ]
203
2019-06-14T23:53:10.000Z
2022-02-10T02:27:23.000Z
tensorflow/python/client/session_test.py
taotesea/tensorflow
5e6479904941624cf7ce58ab3d236375c8012ef4
[ "Apache-2.0" ]
1
2020-05-19T23:48:24.000Z
2020-05-19T23:48:24.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
39.213766
92
0.647086
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import random import os import sys import threading import time import warnings import numpy as np import six from six.moves import xrange from tensorflow.core.framework imp...
true
true
1c244c987729ec1b37e8e3903a430a0864917d5d
870
py
Python
mxnet/inference/docker/artifacts/mms-entrypoint.py
Elizaaaaa/deep-learning-containers
6274ecb264645070d11b27e5c7e60d2e4110537d
[ "Apache-2.0" ]
383
2020-05-19T18:09:10.000Z
2022-03-29T22:41:05.000Z
mxnet/inference/docker/artifacts/mms-entrypoint.py
Elizaaaaa/deep-learning-containers
6274ecb264645070d11b27e5c7e60d2e4110537d
[ "Apache-2.0" ]
551
2020-05-27T17:25:50.000Z
2022-03-31T18:00:35.000Z
mxnet/inference/docker/artifacts/mms-entrypoint.py
Elizaaaaa/deep-learning-containers
6274ecb264645070d11b27e5c7e60d2e4110537d
[ "Apache-2.0" ]
263
2020-05-19T18:17:12.000Z
2022-03-29T22:41:10.000Z
# Copyright 2019-2020 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fil...
32.222222
78
0.737931
import shlex import subprocess import sys import os.path if sys.argv[1] == 'serve': from sagemaker_mxnet_serving_container import serving serving.main() else: subprocess.check_call(shlex.split(' '.join(sys.argv[1:]))) subprocess.call(['tail', '-f', '/dev/null'])
true
true
1c244cd227f4af660c332c62de627e8cec95daf0
863
py
Python
app/core/admin.py
sibelkahraman/recipe-app-api
2132ed21783ab1aaf57520a610505898abca14e5
[ "MIT" ]
null
null
null
app/core/admin.py
sibelkahraman/recipe-app-api
2132ed21783ab1aaf57520a610505898abca14e5
[ "MIT" ]
null
null
null
app/core/admin.py
sibelkahraman/recipe-app-api
2132ed21783ab1aaf57520a610505898abca14e5
[ "MIT" ]
null
null
null
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.utils.translation import gettext as _ from core import models class UserAdmin(BaseUserAdmin): ordering = ['id'] list_display = ['email', 'name'] fieldsets = ( (None, {'fields': ('email', ...
27.83871
67
0.600232
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.utils.translation import gettext as _ from core import models class UserAdmin(BaseUserAdmin): ordering = ['id'] list_display = ['email', 'name'] fieldsets = ( (None, {'fields': ('email', ...
true
true
1c244d230b93d327be1d9c9ae7ebb00c260e7bdf
22,580
py
Python
venv/lib/python3.6/site-packages/pip-19.0.3-py3.6.egg/pip/_internal/commands/install.py
xiegudong45/typeidea
db6504a232d120d6ffa185730bd35b9b9ecffa6c
[ "Apache-2.0" ]
9,953
2019-04-03T23:41:04.000Z
2022-03-31T11:54:44.000Z
venv/lib/python3.6/site-packages/pip-19.0.3-py3.6.egg/pip/_internal/commands/install.py
xiegudong45/typeidea
db6504a232d120d6ffa185730bd35b9b9ecffa6c
[ "Apache-2.0" ]
123
2019-09-10T14:48:01.000Z
2019-11-28T21:24:06.000Z
bot/lib/python3.7/site-packages/pip/_internal/commands/install.py
carlosrh18/DavinciBot
d73a6b7f68d7bab25d134d3f85c6b63a86c206c5
[ "MIT" ]
2,803
2019-04-06T13:15:33.000Z
2022-03-31T07:42:01.000Z
from __future__ import absolute_import import errno import logging import operator import os import shutil from optparse import SUPPRESS_HELP from pip._vendor import pkg_resources from pip._internal.cache import WheelCache from pip._internal.cli import cmdoptions from pip._internal.cli.base_command import Requiremen...
39.823633
79
0.543534
from __future__ import absolute_import import errno import logging import operator import os import shutil from optparse import SUPPRESS_HELP from pip._vendor import pkg_resources from pip._internal.cache import WheelCache from pip._internal.cli import cmdoptions from pip._internal.cli.base_command import Requiremen...
true
true
1c244db6fcbc187cf6af4d945f014f84e3637efe
3,175
py
Python
VOCgrowth/ACGTparse.py
alex1770/Covid-19
0212593bf5d9bcbb7009c7d1fb1710116ad8bf32
[ "MIT" ]
5
2021-06-26T09:22:45.000Z
2021-12-20T21:29:22.000Z
VOCgrowth/ACGTparse.py
alex1770/Covid-19
0212593bf5d9bcbb7009c7d1fb1710116ad8bf32
[ "MIT" ]
1
2021-12-21T09:45:17.000Z
2021-12-21T09:45:17.000Z
VOCgrowth/ACGTparse.py
alex1770/Covid-19
0212593bf5d9bcbb7009c7d1fb1710116ad8bf32
[ "MIT" ]
2
2021-06-25T18:27:56.000Z
2021-12-12T17:49:31.000Z
from stuff import * genes={ 'ORF1a': [266, 13467], 'ORF1b': [13468, 21556], 'S': [21563, 25385], 'ORF3a': [25393, 26221], 'E': [26245, 26473], 'M': [26523, 27192], 'ORF6': [27202, 27388], 'ORF7a': [27394, 27760], 'ORF7b': [27756, 27888], 'ORF8': [27894, 28260], 'N': [28274, 29534], 'ORF10': [29...
29.672897
109
0.537953
from stuff import * genes={ 'ORF1a': [266, 13467], 'ORF1b': [13468, 21556], 'S': [21563, 25385], 'ORF3a': [25393, 26221], 'E': [26245, 26473], 'M': [26523, 27192], 'ORF6': [27202, 27388], 'ORF7a': [27394, 27760], 'ORF7b': [27756, 27888], 'ORF8': [27894, 28260], 'N': [28274, 29534], 'ORF10': [29...
true
true
1c244dd2da219557ef7aaee14ce025325ecaa444
1,107
py
Python
rlutils/agent/ValueFunctionAgent.py
lucaslehnert/rlutils
77597f0596ff907c3dcae131a2fb51971949e634
[ "MIT" ]
2
2021-03-21T22:33:30.000Z
2021-04-18T21:00:18.000Z
rlutils/agent/ValueFunctionAgent.py
lucaslehnert/rlutils
77597f0596ff907c3dcae131a2fb51971949e634
[ "MIT" ]
null
null
null
rlutils/agent/ValueFunctionAgent.py
lucaslehnert/rlutils
77597f0596ff907c3dcae131a2fb51971949e634
[ "MIT" ]
null
null
null
# # Copyright (c) 2020 The rlutils authors # # This source code is licensed under an MIT license found in the LICENSE file in the root directory of this project. # from .Agent import Agent class ValueFunctionAgent(Agent): """ ValueFunctionAgent can be used to construct an agent the follows a specified value ...
29.131579
120
0.680217
from .Agent import Agent class ValueFunctionAgent(Agent): def __init__(self, q_fun): self._q_fun = q_fun def reset(self, *params, **kwargs): pass def q_values(self, state): return self._q_fun(state) def update_transition(self, state, action, reward, next_state, term, ...
true
true
1c244fee7065ebdef16b246149ee2a3220a0187b
2,876
py
Python
tddfa/utils/uv.py
lukassnoek/3DDFA_V2
4a37541cb1d21480aa4a70c82416fcfdc95eacd9
[ "MIT" ]
null
null
null
tddfa/utils/uv.py
lukassnoek/3DDFA_V2
4a37541cb1d21480aa4a70c82416fcfdc95eacd9
[ "MIT" ]
null
null
null
tddfa/utils/uv.py
lukassnoek/3DDFA_V2
4a37541cb1d21480aa4a70c82416fcfdc95eacd9
[ "MIT" ]
null
null
null
# coding: utf-8 __author__ = 'cleardusk' import cv2 import numpy as np import os.path as osp import scipy.io as sio from ..Sim3DR import rasterize from .functions import plot_image from .io import _load from .tddfa_util import _to_ctype make_abs_path = lambda fn: osp.join(osp.dirname(osp.realpath(__file__)), fn) ...
29.649485
120
0.61057
__author__ = 'cleardusk' import cv2 import numpy as np import os.path as osp import scipy.io as sio from ..Sim3DR import rasterize from .functions import plot_image from .io import _load from .tddfa_util import _to_ctype make_abs_path = lambda fn: osp.join(osp.dirname(osp.realpath(__file__)), fn) def load_uv_coo...
true
true
1c24500140ff0cd972638a5a5ce38c3b7f07810a
22,764
py
Python
onnxruntime/python/onnxruntime_inference_collection.py
mrshu/onnxruntime
335edaa2c485ba0dec877bf4cdbd652e2d5d105c
[ "MIT" ]
null
null
null
onnxruntime/python/onnxruntime_inference_collection.py
mrshu/onnxruntime
335edaa2c485ba0dec877bf4cdbd652e2d5d105c
[ "MIT" ]
null
null
null
onnxruntime/python/onnxruntime_inference_collection.py
mrshu/onnxruntime
335edaa2c485ba0dec877bf4cdbd652e2d5d105c
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # -------------------------------------------------------------------------- import collections import collections.abc import os import warnings from...
43.36
120
0.654279
import collections import collections.abc import os import warnings from onnxruntime.capi import _pybind_state as C def get_ort_device_type(device): device = device.lower() if device == 'cuda': return C.OrtDevice.cuda() elif device == 'cpu': return C.OrtDevice.cpu() else: ...
true
true
1c245042ee198cf7c9c12b9eb7f8728c8c119351
2,136
py
Python
tests/test_order_HexOrderParameter.py
phmalek/freud
cb0781f2009758638cd79a0bb6d44801e5473774
[ "BSD-3-Clause" ]
null
null
null
tests/test_order_HexOrderParameter.py
phmalek/freud
cb0781f2009758638cd79a0bb6d44801e5473774
[ "BSD-3-Clause" ]
null
null
null
tests/test_order_HexOrderParameter.py
phmalek/freud
cb0781f2009758638cd79a0bb6d44801e5473774
[ "BSD-3-Clause" ]
null
null
null
import numpy.testing as npt import numpy as np import freud import unittest from util import make_box_and_random_points class TestHexOrderParameter(unittest.TestCase): def test_getK(self): rmax = 3 hop = freud.order.HexOrderParameter(rmax) npt.assert_equal(hop.K, 6) def test_getK_pass...
27.384615
66
0.576779
import numpy.testing as npt import numpy as np import freud import unittest from util import make_box_and_random_points class TestHexOrderParameter(unittest.TestCase): def test_getK(self): rmax = 3 hop = freud.order.HexOrderParameter(rmax) npt.assert_equal(hop.K, 6) def test_getK_pass...
true
true
1c24539f3e6a6d5b02c75f7e981e45b3d8f30196
1,451
py
Python
_unittests/ut_sql/test_database_df.py
sdpython/pyensae
ada4dbb0b9901bf481eff2ea239e74ed964d93b0
[ "MIT" ]
28
2015-07-19T21:20:51.000Z
2022-02-16T11:50:53.000Z
_unittests/ut_sql/test_database_df.py
sdpython/pyensae
ada4dbb0b9901bf481eff2ea239e74ed964d93b0
[ "MIT" ]
34
2015-06-16T15:38:25.000Z
2021-12-29T11:04:01.000Z
_unittests/ut_sql/test_database_df.py
sdpython/pyensae
ada4dbb0b9901bf481eff2ea239e74ed964d93b0
[ "MIT" ]
27
2015-01-13T08:24:22.000Z
2022-03-31T14:51:23.000Z
""" @brief test log(time=10s) You should indicate a time in seconds. The program ``run_unittests.py`` will sort all test files by increasing time and run them. """ import os import unittest import pandas from pyquickhelper.loghelper import fLOG from pyensae.sql.database_main import Database class TestDatabaseDF...
30.229167
71
0.566506
import os import unittest import pandas from pyquickhelper.loghelper import fLOG from pyensae.sql.database_main import Database class TestDatabaseDF (unittest.TestCase): def test_import_df(self): fLOG( __file__, self._testMethodName, OutputPrint=__name__ == "__main__")...
true
true
1c2454019682f2e2ae047e3d13750e193115fcd2
454
py
Python
rl/offpolicy/scripts/load_redis.py
dbrainio/catalyst
d6c0908f17f2a53e360b50415b4849354c40e3fc
[ "MIT" ]
1
2019-03-23T19:58:11.000Z
2019-03-23T19:58:11.000Z
rl/offpolicy/scripts/load_redis.py
dbrainio/catalyst
d6c0908f17f2a53e360b50415b4849354c40e3fc
[ "MIT" ]
1
2019-01-07T12:50:04.000Z
2019-01-07T12:50:04.000Z
rl/offpolicy/scripts/load_redis.py
dbrainio/catalyst
d6c0908f17f2a53e360b50415b4849354c40e3fc
[ "MIT" ]
null
null
null
import argparse import pickle from tqdm import tqdm from redis import StrictRedis parser = argparse.ArgumentParser() parser.add_argument( "--port", type=int, default=12000) parser.add_argument( "--in-pkl", type=str, required=True) args = parser.parse_args() redis = StrictRedis(port=args.port...
18.16
47
0.704846
import argparse import pickle from tqdm import tqdm from redis import StrictRedis parser = argparse.ArgumentParser() parser.add_argument( "--port", type=int, default=12000) parser.add_argument( "--in-pkl", type=str, required=True) args = parser.parse_args() redis = StrictRedis(port=args.port...
true
true
1c2455368048e2a85c740f5ba10b9c9f6e99da3d
2,038
py
Python
helps/deap/deap-master/examples/es/cma_1+l_minfct.py
GrimRanger/GeneticAlgorithm
93fa476e82d610f8622276526baa269303a058e0
[ "MIT" ]
null
null
null
helps/deap/deap-master/examples/es/cma_1+l_minfct.py
GrimRanger/GeneticAlgorithm
93fa476e82d610f8622276526baa269303a058e0
[ "MIT" ]
null
null
null
helps/deap/deap-master/examples/es/cma_1+l_minfct.py
GrimRanger/GeneticAlgorithm
93fa476e82d610f8622276526baa269303a058e0
[ "MIT" ]
null
null
null
# This file is part of DEAP. # # DEAP is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation, either version 3 of # the License, or (at your option) any later version. # # DEAP is distributed ...
35.137931
83
0.727674
import array import numpy from deap import algorithms from deap import base from deap import benchmarks from deap import cma from deap import creator from deap import tools N=5 creator.create("FitnessMin", base.Fitness, weights=(-1.0,)) creator.create("Individual", array.array, typecode='d', fitness=c...
true
true
1c24557a759a3e8df590b12fd6a59f4974eccfc7
1,675
py
Python
tests/test_client.py
QingTannerLi/HttpRunner
d4048c066c8702254693d9adbec0d37f283f4091
[ "MIT" ]
null
null
null
tests/test_client.py
QingTannerLi/HttpRunner
d4048c066c8702254693d9adbec0d37f283f4091
[ "MIT" ]
null
null
null
tests/test_client.py
QingTannerLi/HttpRunner
d4048c066c8702254693d9adbec0d37f283f4091
[ "MIT" ]
null
null
null
from httprunner.client import HttpSession, prepare_kwargs from tests.base import ApiServerUnittest class TestHttpClient(ApiServerUnittest): def setUp(self): super(TestHttpClient, self).setUp() self.api_client = HttpSession(self.host) self.headers = self.get_authenticated_headers() s...
32.211538
73
0.575522
from httprunner.client import HttpSession, prepare_kwargs from tests.base import ApiServerUnittest class TestHttpClient(ApiServerUnittest): def setUp(self): super(TestHttpClient, self).setUp() self.api_client = HttpSession(self.host) self.headers = self.get_authenticated_headers() s...
true
true
1c24569ce6bd84d082b453fd810ec75cbb2c26ae
6,424
py
Python
nitro/resource/config/audit/auditsyslogpolicy_systemglobal_binding.py
HanseMerkur/nitro-python
d03eb11f492a35a2a8b2a140322fbce22d25a8f7
[ "Apache-2.0" ]
2
2020-08-24T18:04:22.000Z
2020-08-24T18:04:47.000Z
nitro/resource/config/audit/auditsyslogpolicy_systemglobal_binding.py
HanseMerkur/nitro-python
d03eb11f492a35a2a8b2a140322fbce22d25a8f7
[ "Apache-2.0" ]
null
null
null
nitro/resource/config/audit/auditsyslogpolicy_systemglobal_binding.py
HanseMerkur/nitro-python
d03eb11f492a35a2a8b2a140322fbce22d25a8f7
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2008-2015 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 l...
30.590476
149
0.595735
from nitro.resource.base.base_resource import base_resource from nitro.resource.base.base_resource import base_response from nitro.service.options import options from nitro.exception.nitro_exception import nitro_exception from nitro.util.nitro_util import nitro_util class auditsyslogpolicy_systemgloba...
true
true
1c2456a1b326f979751fac4f4c513a28c82544c8
405
py
Python
env/Lib/site-packages/plotly/validators/carpet/aaxis/_showgrid.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
11,750
2015-10-12T07:03:39.000Z
2022-03-31T20:43:15.000Z
venv/Lib/site-packages/plotly/validators/carpet/aaxis/_showgrid.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
2,951
2015-10-12T00:41:25.000Z
2022-03-31T22:19:26.000Z
venv/Lib/site-packages/plotly/validators/carpet/aaxis/_showgrid.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
2,623
2015-10-15T14:40:27.000Z
2022-03-28T16:05:50.000Z
import _plotly_utils.basevalidators class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__(self, plotly_name="showgrid", parent_name="carpet.aaxis", **kwargs): super(ShowgridValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
33.75
85
0.679012
import _plotly_utils.basevalidators class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__(self, plotly_name="showgrid", parent_name="carpet.aaxis", **kwargs): super(ShowgridValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
true
true
1c245793fa5f8c7be3703b6d4a26be4267e5d443
11,151
py
Python
python/ray/experimental/shuffle.py
77loopin/ray
9322f6aab53f4ca5baf5a3573e1ffde12feae519
[ "Apache-2.0" ]
21,382
2016-09-26T23:12:52.000Z
2022-03-31T21:47:45.000Z
python/ray/experimental/shuffle.py
77loopin/ray
9322f6aab53f4ca5baf5a3573e1ffde12feae519
[ "Apache-2.0" ]
19,689
2016-09-17T08:21:25.000Z
2022-03-31T23:59:30.000Z
python/ray/experimental/shuffle.py
77loopin/ray
9322f6aab53f4ca5baf5a3573e1ffde12feae519
[ "Apache-2.0" ]
4,114
2016-09-23T18:54:01.000Z
2022-03-31T15:07:32.000Z
"""A simple distributed shuffle implementation in Ray. This utility provides a `simple_shuffle` function that can be used to redistribute M input partitions into N output partitions. It does this with a single wave of shuffle map tasks followed by a single wave of shuffle reduce tasks. Each shuffle map task generates ...
34.956113
79
0.659134
import time from typing import List, Iterable, Tuple, Callable, Any, Union import ray from ray.cluster_utils import Cluster from ray import ObjectRef # The type produced by the input reader function. InType = Any # The type produced by the output writer function. OutType = Any # Integer identifying the partition nu...
true
true
1c2457ad3d9dc47a5f45470508225824337317ad
8,004
py
Python
assignments/coding1/fem.py
jaredthomas68/FEM
e96d6109e5b30ac527bcd48e0a3e3bf4fdc51054
[ "MIT" ]
1
2021-10-13T11:49:53.000Z
2021-10-13T11:49:53.000Z
assignments/coding1/fem.py
jaredthomas68/FEM
e96d6109e5b30ac527bcd48e0a3e3bf4fdc51054
[ "MIT" ]
null
null
null
assignments/coding1/fem.py
jaredthomas68/FEM
e96d6109e5b30ac527bcd48e0a3e3bf4fdc51054
[ "MIT" ]
null
null
null
import numpy as np import scipy.sparse as sparse from scipy.sparse.linalg import spsolve import time import matplotlib.pylab as plt def define_stiffness_matrix(Nell, he): k_basis = np.zeros((2,2)) K = np.zeros((Nell, Nell)) LM = get_lm(Nell) for e in np.arange(0, Nell): # get base k matrix f...
24.780186
114
0.517491
import numpy as np import scipy.sparse as sparse from scipy.sparse.linalg import spsolve import time import matplotlib.pylab as plt def define_stiffness_matrix(Nell, he): k_basis = np.zeros((2,2)) K = np.zeros((Nell, Nell)) LM = get_lm(Nell) for e in np.arange(0, Nell): for a in np....
false
true
1c245804ec2b60851eb22d38b1d7e26c7c254fc5
3,064
py
Python
optbeam/_3d/helpers.py
DanielKotik/Optical-beams-MEEP
ca145119e5bd0f0804d846ea42e35e4c3daa91de
[ "MIT" ]
9
2020-04-27T10:14:50.000Z
2022-03-13T19:03:49.000Z
optbeam/_3d/helpers.py
DanielKotik/Optical-beams-MEEP
ca145119e5bd0f0804d846ea42e35e4c3daa91de
[ "MIT" ]
13
2019-05-10T01:53:25.000Z
2021-08-20T16:10:54.000Z
optbeam/_3d/helpers.py
DanielKotik/Optical-beams-MEEP
ca145119e5bd0f0804d846ea42e35e4c3daa91de
[ "MIT" ]
6
2019-04-08T04:03:32.000Z
2021-08-23T01:40:04.000Z
import sys try: import cython cython_imported = True except ModuleNotFoundError: cython_imported = False if cython_imported: if cython.compiled: from scipy import LowLevelCallable else: print("\nPlease consider compiling `%s.py` via Cython: " "`$ cythonize -3 -i %s.p...
30.949495
79
0.599869
import sys try: import cython cython_imported = True except ModuleNotFoundError: cython_imported = False if cython_imported: if cython.compiled: from scipy import LowLevelCallable else: print("\nPlease consider compiling `%s.py` via Cython: " "`$ cythonize -3 -i %s.p...
true
true
1c2459491e09d21ccdef1d6fed47cf3c2454667e
19,179
py
Python
pylib/gyp/common.py
luguocfw/GYP-Tools
41414159d032530acbf5e426954e1020ea1aa740
[ "BSD-3-Clause" ]
34
2015-01-14T03:21:08.000Z
2020-04-26T10:06:56.000Z
pylib/gyp/common.py
luguocfw/GYP-Tools
41414159d032530acbf5e426954e1020ea1aa740
[ "BSD-3-Clause" ]
1
2019-02-03T09:45:13.000Z
2019-02-03T09:45:13.000Z
pylib/gyp/common.py
luguocfw/GYP-Tools
41414159d032530acbf5e426954e1020ea1aa740
[ "BSD-3-Clause" ]
29
2015-02-13T00:18:53.000Z
2021-02-10T23:38:58.000Z
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import with_statement import collections import errno import filecmp import os.path import re import tempfile import sys # A minimal memoizing d...
32.561969
83
0.676417
from __future__ import with_statement import collections import errno import filecmp import os.path import re import tempfile import sys class memoize(object): def __init__(self, func): self.func = func self.cache = {} def __call__(self, *args): try: return self.cache[args] except Key...
false
true
1c245a090d7f1cf639d3bc51f0c146ba47d6295f
259
py
Python
config.py
sumpfralle/politik-bei-uns-scraper
a3a38c6a00f8e8e179789baa383fbc6eae2b7444
[ "BSD-3-Clause" ]
5
2015-01-04T16:22:34.000Z
2016-03-09T18:59:31.000Z
config.py
sumpfralle/politik-bei-uns-scraper
a3a38c6a00f8e8e179789baa383fbc6eae2b7444
[ "BSD-3-Clause" ]
8
2015-01-07T07:37:28.000Z
2015-12-04T11:27:58.000Z
config.py
sumpfralle/politik-bei-uns-scraper
a3a38c6a00f8e8e179789baa383fbc6eae2b7444
[ "BSD-3-Clause" ]
4
2016-07-07T12:10:22.000Z
2016-11-19T17:13:13.000Z
# encoding: utf-8 # Currently, only "mongodb" is supported DB_TYPE = 'mongodb' # Name of the MongoDB database DB_NAME = 'ris' # Use "localhost" if MongoDB is running on the same machine DB_HOST = 'localhost' # MongoDB default port is 27017 DB_PORT = 27017
19.923077
59
0.733591
DB_TYPE = 'mongodb' DB_NAME = 'ris' DB_HOST = 'localhost' DB_PORT = 27017
true
true
1c245a26b1ebfcd8b7a3b880617ecb0ee8c6377d
2,793
py
Python
src/tests/sensor_test.py
mattskone/robot_maze
448394b90325518c987ce81222230cd7fef64000
[ "MIT" ]
3
2016-12-22T09:16:59.000Z
2018-07-09T23:01:48.000Z
src/tests/sensor_test.py
mattskone/robot_maze
448394b90325518c987ce81222230cd7fef64000
[ "MIT" ]
4
2015-10-04T05:05:53.000Z
2015-12-18T17:16:48.000Z
src/tests/sensor_test.py
mattskone/robot_maze
448394b90325518c987ce81222230cd7fef64000
[ "MIT" ]
2
2015-09-29T02:46:23.000Z
2019-11-21T19:18:56.000Z
"""Unit tests for the sensor module.""" import unittest from mock import call, MagicMock, patch import sensor SENSOR_PIN = 0 class BaseSensorTest(unittest.TestCase): """Unit tests for the BaseSensor class.""" def setUp(self): self.driver = MagicMock() self.mount = MagicMock() self.s = sensor.BaseSensor(d...
29.09375
71
0.746151
import unittest from mock import call, MagicMock, patch import sensor SENSOR_PIN = 0 class BaseSensorTest(unittest.TestCase): def setUp(self): self.driver = MagicMock() self.mount = MagicMock() self.s = sensor.BaseSensor(driver=self.driver, mount=self.mount, pin=SENSOR_PIN, ...
true
true
1c245a76e3c4a7e0376eb912ed57d1e2a3818d32
3,362
py
Python
sanitized_dump/utils/db.py
Thrillberg/django-sanitized-dump
bb3d667d5f9c90d281ac60eeb67b6a706226d1a9
[ "MIT" ]
null
null
null
sanitized_dump/utils/db.py
Thrillberg/django-sanitized-dump
bb3d667d5f9c90d281ac60eeb67b6a706226d1a9
[ "MIT" ]
null
null
null
sanitized_dump/utils/db.py
Thrillberg/django-sanitized-dump
bb3d667d5f9c90d281ac60eeb67b6a706226d1a9
[ "MIT" ]
null
null
null
from six.moves.urllib import parse as urlparse try: from ConfigParser import SafeConfigParser except ImportError: # pragma: no cover python 2 vs 3 issue from configparser import ConfigParser as SafeConfigParser DATABASE_TYPES = ['mysql', 'postgres', 'postgis'] def get_database_engine_from_django_database(dj...
32.326923
74
0.620761
from six.moves.urllib import parse as urlparse try: from ConfigParser import SafeConfigParser except ImportError: from configparser import ConfigParser as SafeConfigParser DATABASE_TYPES = ['mysql', 'postgres', 'postgis'] def get_database_engine_from_django_database(django_database): engine_module = dj...
true
true
1c245b3e5d62f1e419fa915b7c72e0f87883715c
1,919
py
Python
test/test_parsers/test_empty_xml_base.py
gtfierro/rdflib
be3d026e9065c8f60f59ac79a70da9f3199f5f43
[ "BSD-3-Clause" ]
1
2022-02-02T23:04:51.000Z
2022-02-02T23:04:51.000Z
test/test_parsers/test_empty_xml_base.py
gtfierro/rdflib
be3d026e9065c8f60f59ac79a70da9f3199f5f43
[ "BSD-3-Clause" ]
6
2021-11-22T19:10:32.000Z
2022-01-31T19:16:37.000Z
test/test_parsers/test_empty_xml_base.py
jjon/rdflib
4c2ab7b392b353bf3c6088017ec9351ce8ac3db6
[ "BSD-3-Clause" ]
null
null
null
""" Test for empty xml:base values xml:base='' should resolve to the given publicID per XML Base specification and RDF/XML dependence on it """ from rdflib.graph import ConjunctiveGraph from rdflib.namespace import FOAF, RDF from rdflib.term import URIRef test_data = """ <rdf:RDF xmlns:foaf="http://xmlns.com/foa...
29.984375
87
0.630537
from rdflib.graph import ConjunctiveGraph from rdflib.namespace import FOAF, RDF from rdflib.term import URIRef test_data = """ <rdf:RDF xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xml:base=""> <rdf:Description rdf:about=""> <rdf:type rdf:resou...
true
true
1c245bb9f12c18581a3c0f8f320d7e2f0d45632a
42
py
Python
rn/__init__.py
vikneswaran20/rn
33e0bfaf58bb8a5ec54c6d010035693b35e9909d
[ "BSD-3-Clause" ]
null
null
null
rn/__init__.py
vikneswaran20/rn
33e0bfaf58bb8a5ec54c6d010035693b35e9909d
[ "BSD-3-Clause" ]
null
null
null
rn/__init__.py
vikneswaran20/rn
33e0bfaf58bb8a5ec54c6d010035693b35e9909d
[ "BSD-3-Clause" ]
null
null
null
__version__ = '0.0.1' __license__ = 'BSD'
14
21
0.666667
__version__ = '0.0.1' __license__ = 'BSD'
true
true
1c245bf1140244c4f5eb6686ccf7c83021f48826
8,191
py
Python
kubernetes/client/models/v1_pod_affinity.py
venukarnati92/python-1
3fabf9ed9f4758fb5133975a58fc147471e91d9d
[ "Apache-2.0" ]
1
2022-02-07T21:57:20.000Z
2022-02-07T21:57:20.000Z
kubernetes/client/models/v1_pod_affinity.py
venukarnati92/python-1
3fabf9ed9f4758fb5133975a58fc147471e91d9d
[ "Apache-2.0" ]
1
2022-03-01T03:37:57.000Z
2022-03-01T03:37:57.000Z
kubernetes/client/models/v1_pod_affinity.py
venukarnati92/python-1
3fabf9ed9f4758fb5133975a58fc147471e91d9d
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.22 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
54.245033
644
0.732267
import pprint import re import six from kubernetes.client.configuration import Configuration class V1PodAffinity(object): openapi_types = { 'preferred_during_scheduling_ignored_during_execution': 'list[V1WeightedPodAffinityTerm]', 'required_during_scheduling_ignored_during_execution': 'li...
true
true
1c245c396e93e5e505e706ee994d5e10505158e0
36,730
py
Python
metaflow/runtime.py
oavdeev/metaflow
a655de9ef62870a668d68a1f656bd7b9b92b7a71
[ "Apache-2.0" ]
null
null
null
metaflow/runtime.py
oavdeev/metaflow
a655de9ef62870a668d68a1f656bd7b9b92b7a71
[ "Apache-2.0" ]
null
null
null
metaflow/runtime.py
oavdeev/metaflow
a655de9ef62870a668d68a1f656bd7b9b92b7a71
[ "Apache-2.0" ]
1
2021-03-31T09:55:30.000Z
2021-03-31T09:55:30.000Z
""" Local backend Execute the flow with a native runtime using local / remote processes """ from __future__ import print_function import json import os import sys import fcntl import time import select import subprocess from io import BytesIO from functools import partial from . import get_namespace from .metaflow_c...
39.880565
96
0.53817
from __future__ import print_function import json import os import sys import fcntl import time import select import subprocess from io import BytesIO from functools import partial from . import get_namespace from .metaflow_config import MAX_ATTEMPTS from .exception import MetaflowException,\ MetaflowInternalErro...
true
true
1c245c85f557230cb8edee51334bd4156b5fba3e
1,454
py
Python
solveLinearEquation/gauss.py
terasakisatoshi/pythonCodes
baee095ecee96f6b5ec6431267cdc6c40512a542
[ "MIT" ]
null
null
null
solveLinearEquation/gauss.py
terasakisatoshi/pythonCodes
baee095ecee96f6b5ec6431267cdc6c40512a542
[ "MIT" ]
null
null
null
solveLinearEquation/gauss.py
terasakisatoshi/pythonCodes
baee095ecee96f6b5ec6431267cdc6c40512a542
[ "MIT" ]
null
null
null
import numpy as np import sympy as sy def solveeq_gauss(a, b, x): """ solve equation ax=b using simple gauss method """ # define extended coefficient matrix as 'a' a = np.concatenate([a, b], axis=1) # push forward (row, col) = a.shape for j in range(row): print("a=\n", a) ...
21.701493
70
0.474553
import numpy as np import sympy as sy def solveeq_gauss(a, b, x): a = np.concatenate([a, b], axis=1) (row, col) = a.shape for j in range(row): print("a=\n", a) for i in range(j+1, row): p = a[i, j] / a[j, j] a[i] -= p*a[j] for i in range(row)[::-1...
true
true
1c245dabc13c5511e27012e25ad70e3af7e58b80
8,453
py
Python
ariadne/tracknet_v2/processor.py
t3hseus/ariadne
b4471a37741000e22281c4d6ff647d65ab9e1914
[ "MIT" ]
6
2020-08-28T22:44:07.000Z
2022-01-24T20:53:00.000Z
ariadne/tracknet_v2/processor.py
t3hseus/ariadne
b4471a37741000e22281c4d6ff647d65ab9e1914
[ "MIT" ]
1
2021-02-20T09:38:46.000Z
2021-02-20T09:38:46.000Z
ariadne/tracknet_v2/processor.py
t3hseus/ariadne
b4471a37741000e22281c4d6ff647d65ab9e1914
[ "MIT" ]
2
2021-10-04T09:25:06.000Z
2022-02-09T09:09:09.000Z
import logging import os from typing import List, Tuple, Optional, Iterable import gin import pandas as pd import numpy as np from ariadne.preprocessing import ( BaseTransformer, DataProcessor, DataChunk, ProcessedDataChunk, ProcessedData ) LOGGER = logging.getLogger('ariadne.prepare') @gin.con...
40.061611
126
0.612564
import logging import os from typing import List, Tuple, Optional, Iterable import gin import pandas as pd import numpy as np from ariadne.preprocessing import ( BaseTransformer, DataProcessor, DataChunk, ProcessedDataChunk, ProcessedData ) LOGGER = logging.getLogger('ariadne.prepare') @gin.con...
true
true
1c245db312ac7dcc6c1ffa2d909800bdd9cf14d1
1,168
py
Python
Scripts/characters.py
tecninja/Python-PasswordCreator
8bac7ae932145a5bb97aa96a2bd2e3ade1ef50cf
[ "MIT" ]
null
null
null
Scripts/characters.py
tecninja/Python-PasswordCreator
8bac7ae932145a5bb97aa96a2bd2e3ade1ef50cf
[ "MIT" ]
null
null
null
Scripts/characters.py
tecninja/Python-PasswordCreator
8bac7ae932145a5bb97aa96a2bd2e3ade1ef50cf
[ "MIT" ]
null
null
null
letters_low = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] letters_upper = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', ...
37.677419
81
0.481164
letters_low = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] letters_upper = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', ...
true
true
1c245ee7e096cc17cf4fd1826ee2fb239f8992f8
389
py
Python
[Kaleido-subs]/Completed/FGO - Absolute Demonic Front - Babylonia [BD]/ac_FGOBD_NCED_E16.py
tuilakhanh/Encoding-Projects
8b254913457cb28e7d0890ad6b974d0d8f0cbecc
[ "MIT" ]
null
null
null
[Kaleido-subs]/Completed/FGO - Absolute Demonic Front - Babylonia [BD]/ac_FGOBD_NCED_E16.py
tuilakhanh/Encoding-Projects
8b254913457cb28e7d0890ad6b974d0d8f0cbecc
[ "MIT" ]
null
null
null
[Kaleido-subs]/Completed/FGO - Absolute Demonic Front - Babylonia [BD]/ac_FGOBD_NCED_E16.py
tuilakhanh/Encoding-Projects
8b254913457cb28e7d0890ad6b974d0d8f0cbecc
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import ntpath import os import lvsfunc as lvf from acsuite import eztrim path = r'BDMV/[BDMV][ANZX-15510][Fate Grand Order - Absolute Demonic Front Babylonia][Vol.4][JP]/BDROM/DISC2/BDMV/STREAM/00009.m2ts' src = lvf.src(path) if __name__ == "__main__": eztrim(src, (24, -24), f"{os.path.sp...
27.785714
132
0.709512
import ntpath import os import lvsfunc as lvf from acsuite import eztrim path = r'BDMV/[BDMV][ANZX-15510][Fate Grand Order - Absolute Demonic Front Babylonia][Vol.4][JP]/BDROM/DISC2/BDMV/STREAM/00009.m2ts' src = lvf.src(path) if __name__ == "__main__": eztrim(src, (24, -24), f"{os.path.splitext(path)[0]}.wav",...
true
true
1c245f3a6192731feb78b33480fcf6ac6d800a7f
467
py
Python
models.py
qz267/django-google-analytics
2cfac88bcafd6446f3c0642ce5405843fcb2d3d7
[ "BSD-3-Clause" ]
1
2016-02-13T15:35:05.000Z
2016-02-13T15:35:05.000Z
models.py
qz267/django-google-analytics
2cfac88bcafd6446f3c0642ce5405843fcb2d3d7
[ "BSD-3-Clause" ]
null
null
null
models.py
qz267/django-google-analytics
2cfac88bcafd6446f3c0642ce5405843fcb2d3d7
[ "BSD-3-Clause" ]
null
null
null
from django.db import models from django.conf import settings from django.contrib.sites.models import Site if getattr(settings, 'GOOGLE_ANALYTICS_MODEL', False): class Analytics(models.Model): site = models.ForeignKey(Site, edit_inline=models.TABULAR, max_num_in_admin=1, min_num_in_admin=1) analyti...
38.916667
106
0.736617
from django.db import models from django.conf import settings from django.contrib.sites.models import Site if getattr(settings, 'GOOGLE_ANALYTICS_MODEL', False): class Analytics(models.Model): site = models.ForeignKey(Site, edit_inline=models.TABULAR, max_num_in_admin=1, min_num_in_admin=1) analyti...
true
true
1c245f53d3a5bf23f6f4acbb0ce1e53ef77e88ec
1,168
py
Python
My files/dipw/dp.py
Alpha-Demon404/RE-14
b5b46a9f0eee218f2a642b615c77135c33c6f4ad
[ "MIT" ]
39
2020-02-26T09:44:36.000Z
2022-03-23T00:18:25.000Z
My files/dipw/dp.py
B4BY-DG/reverse-enginnering
b5b46a9f0eee218f2a642b615c77135c33c6f4ad
[ "MIT" ]
15
2020-05-14T10:07:26.000Z
2022-01-06T02:55:32.000Z
My files/dipw/dp.py
B4BY-DG/reverse-enginnering
b5b46a9f0eee218f2a642b615c77135c33c6f4ad
[ "MIT" ]
41
2020-03-16T22:36:38.000Z
2022-03-17T14:47:19.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import marshal, zlib, base64,dis #disc x = (zlib.decompress(base64.b64decode('eJyNVktv00AQXm/eL0igiaFA01IO4cIVCUGFBBJwqRAckLhEIQmtRfPwI0QIeio/hRO/hJ/CiStH2M/prj07diGRP43Hs9+MZ2fWMxbnP6mux+oK9xVMHPFViLdCTB0xkeKDFEFfTIU4E8KZq8dCvB4UlN3hGEsdddXU9QTLv1eFiGKGM4cKUgsFCNLFH7dFrS...
106.181818
991
0.903253
import marshal, zlib, base64,dis x = (zlib.decompress(base64.b64decode('eJyNVktv00AQXm/eL0igiaFA01IO4cIVCUGFBBJwqRAckLhEIQmtRfPwI0QIeio/hRO/hJ/CiStH2M/prj07diGRP43Hs9+MZ2fWMxbnP6mux+oK9xVMHPFViLdCTB0xkeKDFEFfTIU4E8KZq8dCvB4UlN3hGEsdddXU9QTLv1eFiGKGM4cKUgsFCNLFH7dFrS9poayFYmIZm1b0gyqxMOwJaU3r6xs9sW1ooakXuRv+un7Q0sI...
true
true
1c246069ca4eb3ae4707c3bd7091f98f32473945
285
py
Python
synaps-api/doc/ext/synaps_autodoc.py
gochist/synaps
a5d7f0428aa30e4d1e96cc29fd80f42c32aed1e8
[ "Apache-2.0" ]
null
null
null
synaps-api/doc/ext/synaps_autodoc.py
gochist/synaps
a5d7f0428aa30e4d1e96cc29fd80f42c32aed1e8
[ "Apache-2.0" ]
null
null
null
synaps-api/doc/ext/synaps_autodoc.py
gochist/synaps
a5d7f0428aa30e4d1e96cc29fd80f42c32aed1e8
[ "Apache-2.0" ]
null
null
null
import gettext import os gettext.install('synaps') from synaps import utils def setup(app): rootdir = os.path.abspath(app.srcdir + '/..') print "**Autodocumenting from %s" % rootdir os.chdir(rootdir) rv = utils.execute('./generate_autodoc_index.sh') print rv[0]
20.357143
53
0.680702
import gettext import os gettext.install('synaps') from synaps import utils def setup(app): rootdir = os.path.abspath(app.srcdir + '/..') print "**Autodocumenting from %s" % rootdir os.chdir(rootdir) rv = utils.execute('./generate_autodoc_index.sh') print rv[0]
false
true
1c2460ce8656ba9ad1e1433b52a86aea3690dbb0
8,168
py
Python
src/sim/System.py
rtitos/gem5
a9668f91d9f96aafc4a36453e3ba1242c60776a6
[ "BSD-3-Clause" ]
null
null
null
src/sim/System.py
rtitos/gem5
a9668f91d9f96aafc4a36453e3ba1242c60776a6
[ "BSD-3-Clause" ]
1
2022-01-31T13:15:08.000Z
2022-01-31T13:15:08.000Z
src/sim/System.py
rtitos/gem5
a9668f91d9f96aafc4a36453e3ba1242c60776a6
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2017, 2019 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the function...
48.047059
80
0.714006
from m5.SimObject import * from m5.defines import buildEnv from m5.params import * from m5.proxy import * from m5.objects.DVFSHandler import * from m5.objects.SimpleMemory import * class MemoryMode(Enum): vals = ['invalid', 'atomic', 'timing', 'at...
true
true
1c2463eb3a21ae31490937beaec288216aa3f8ea
536
py
Python
nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/responder/__init__.py
culbertm/NSttyPython
ff9f6aedae3fb8495342cd0fc4247c819cf47397
[ "Apache-2.0" ]
2
2020-08-24T18:04:22.000Z
2020-08-24T18:04:47.000Z
nitro/resource/config/responder/__init__.py
HanseMerkur/nitro-python
d03eb11f492a35a2a8b2a140322fbce22d25a8f7
[ "Apache-2.0" ]
null
null
null
nitro/resource/config/responder/__init__.py
HanseMerkur/nitro-python
d03eb11f492a35a2a8b2a140322fbce22d25a8f7
[ "Apache-2.0" ]
null
null
null
__all__ = ['responderaction', 'responderglobal_binding', 'responderglobal_responderpolicy_binding', 'responderhtmlpage', 'responderparam', 'responderpolicy', 'responderpolicy_binding', 'responderpolicy_crvserver_binding', 'responderpolicy_csvserver_binding', 'responderpolicy_lbvserver_binding', 'responderpolicy_respond...
536
536
0.875
__all__ = ['responderaction', 'responderglobal_binding', 'responderglobal_responderpolicy_binding', 'responderhtmlpage', 'responderparam', 'responderpolicy', 'responderpolicy_binding', 'responderpolicy_crvserver_binding', 'responderpolicy_csvserver_binding', 'responderpolicy_lbvserver_binding', 'responderpolicy_respond...
true
true
1c246523d4856e139c8378d5932bb64801f823c7
3,569
py
Python
test/test_01.py
syegulalp/akitest
7ce65842f6c9bca5e8b3c0100aba1740a7218eac
[ "MIT" ]
2
2021-08-07T05:24:35.000Z
2021-08-24T19:25:41.000Z
test/test_01.py
syegulalp/akitest
7ce65842f6c9bca5e8b3c0100aba1740a7218eac
[ "MIT" ]
null
null
null
test/test_01.py
syegulalp/akitest
7ce65842f6c9bca5e8b3c0100aba1740a7218eac
[ "MIT" ]
null
null
null
from utils import BaseTest from errors import AkiTypeError from math import isnan, isinf all_binops = ("==", "!=", ">=", "<=", ">", "<") all_unops = "-" class TestA(BaseTest): def test_a(self): pass class TestBaseValues(BaseTest): def test_boolean(self): self.eq("True", True) self.e...
25.492857
83
0.520314
from utils import BaseTest from errors import AkiTypeError from math import isnan, isinf all_binops = ("==", "!=", ">=", "<=", ">", "<") all_unops = "-" class TestA(BaseTest): def test_a(self): pass class TestBaseValues(BaseTest): def test_boolean(self): self.eq("True", True) self.e...
true
true
1c2465f3141bf242c859f4a21c5007f8cf2e3474
1,803
py
Python
tutorial/views.py
evanshih1999/IoTHW
068f2fbe9fde82e20b0bc4a6e44a876546335fc4
[ "MIT" ]
null
null
null
tutorial/views.py
evanshih1999/IoTHW
068f2fbe9fde82e20b0bc4a6e44a876546335fc4
[ "MIT" ]
null
null
null
tutorial/views.py
evanshih1999/IoTHW
068f2fbe9fde82e20b0bc4a6e44a876546335fc4
[ "MIT" ]
null
null
null
from django.shortcuts import render from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import permissions import json import os import os.path as osp import sys BUILD_DIR = osp.join(osp.dirname(osp.abspath(__file__)), "../build/service/") sys.path.insert(0, BUILD_...
26.910448
77
0.656129
from django.shortcuts import render from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import permissions import json import os import os.path as osp import sys BUILD_DIR = osp.join(osp.dirname(osp.abspath(__file__)), "../build/service/") sys.path.insert(0, BUILD_...
true
true
1c2466a570c6ceecea41fa2272b11a6650e5c1cf
19,571
py
Python
Apps/phpassivetotal/passivetotal_connector.py
socologize/phantom-apps
3e6dafaea87376ea3aa5edb7cb5475693e41ef53
[ "Apache-2.0" ]
1
2021-01-18T16:56:55.000Z
2021-01-18T16:56:55.000Z
Apps/phpassivetotal/passivetotal_connector.py
socologize/phantom-apps
3e6dafaea87376ea3aa5edb7cb5475693e41ef53
[ "Apache-2.0" ]
1
2019-10-24T20:49:40.000Z
2019-10-24T20:49:40.000Z
Apps/phpassivetotal/passivetotal_connector.py
socologize/phantom-apps
3e6dafaea87376ea3aa5edb7cb5475693e41ef53
[ "Apache-2.0" ]
1
2022-01-23T17:30:14.000Z
2022-01-23T17:30:14.000Z
# File: passivetotal_connector.py # Copyright (c) 2016-2020 Splunk Inc. # # Licensed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) # # Phantom imports import phantom.app as phantom from phantom.base_connector import BaseConnector from phantom.action_result import ActionResult import phantom.utils ...
36.787594
131
0.648153
import phantom.app as phantom from phantom.base_connector import BaseConnector from phantom.action_result import ActionResult import phantom.utils as ph_utils from passivetotal_consts import * from datetime import datetime from datetime import timedelta import requests import json import ipaddress class Pas...
true
true
1c2466f09383e2dbeac82dd73cd28b690b460184
22,846
py
Python
src/tests/ftest/util/pool_security_test_base.py
fedepad/daos
ac71a320b8426b1eeb1457b0b6f5e6e115dfc9aa
[ "BSD-2-Clause-Patent" ]
429
2016-09-28T20:43:20.000Z
2022-03-25T01:22:50.000Z
src/tests/ftest/util/pool_security_test_base.py
fedepad/daos
ac71a320b8426b1eeb1457b0b6f5e6e115dfc9aa
[ "BSD-2-Clause-Patent" ]
6,341
2016-11-24T12:34:26.000Z
2022-03-31T23:53:46.000Z
src/tests/ftest/util/pool_security_test_base.py
fedepad/daos
ac71a320b8426b1eeb1457b0b6f5e6e115dfc9aa
[ "BSD-2-Clause-Patent" ]
202
2016-10-30T14:47:53.000Z
2022-03-30T21:29:11.000Z
#!/usr/bin/python3 """ (C) Copyright 2020-2021 Intel Corporation. SPDX-License-Identifier: BSD-2-Clause-Patent """ import os import random import grp import re from apricot import TestWithServers from daos_utils import DaosCommand import agent_utils as agu import security_test_base as secTestBase PERMISSIONS = [...
40.796429
80
0.583691
import os import random import grp import re from apricot import TestWithServers from daos_utils import DaosCommand import agent_utils as agu import security_test_base as secTestBase PERMISSIONS = ["", "r", "w", "rw"] DENY_ACCESS = "-1001" class PoolSecurityTestBase(TestWithServers): def modify_acl_file_e...
true
true
1c246717c29b8c48098991a3dd0ee0fcccc9d534
7,737
py
Python
subliminal/providers/tvsubtitles.py
oxan/subliminal
1c59932d8afa45ff828761f6869c662d899d7f7c
[ "MIT" ]
null
null
null
subliminal/providers/tvsubtitles.py
oxan/subliminal
1c59932d8afa45ff828761f6869c662d899d7f7c
[ "MIT" ]
null
null
null
subliminal/providers/tvsubtitles.py
oxan/subliminal
1c59932d8afa45ff828761f6869c662d899d7f7c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import io import logging import re from zipfile import ZipFile from babelfish import Language from requests import Session from . import ParserBeautifulSoup, Provider, get_version from .. import __version__ from ..cache import EPISODE_EXPIRATION_TIME, SH...
38.1133
120
0.607212
from __future__ import unicode_literals import io import logging import re from zipfile import ZipFile from babelfish import Language from requests import Session from . import ParserBeautifulSoup, Provider, get_version from .. import __version__ from ..cache import EPISODE_EXPIRATION_TIME, SHOW_EXPIRATION_TIME, reg...
true
true
1c2467ab22b70faa9e7044deae7debdff1b2dba2
771
py
Python
h2o-py/tests/testdir_apis/H2O_Module/pyunit_h2omodels.py
vishalbelsare/h2o-3
9322fb0f4c0e2358449e339a434f607d524c69fa
[ "Apache-2.0" ]
6,098
2015-05-22T02:46:12.000Z
2022-03-31T16:54:51.000Z
h2o-py/tests/testdir_apis/H2O_Module/pyunit_h2omodels.py
vishalbelsare/h2o-3
9322fb0f4c0e2358449e339a434f607d524c69fa
[ "Apache-2.0" ]
2,517
2015-05-23T02:10:54.000Z
2022-03-30T17:03:39.000Z
h2o-py/tests/testdir_apis/H2O_Module/pyunit_h2omodels.py
vishalbelsare/h2o-3
9322fb0f4c0e2358449e339a434f607d524c69fa
[ "Apache-2.0" ]
2,199
2015-05-22T04:09:55.000Z
2022-03-28T22:20:45.000Z
from __future__ import print_function import sys sys.path.insert(1,"../../../") from tests import pyunit_utils import h2o from h2o.estimators.glm import H2OGeneralizedLinearEstimator from h2o.estimators import H2OXGBoostEstimator def h2omodels(): training_data = h2o.import_file(pyunit_utils.locate("smalldata/logr...
28.555556
87
0.757458
from __future__ import print_function import sys sys.path.insert(1,"../../../") from tests import pyunit_utils import h2o from h2o.estimators.glm import H2OGeneralizedLinearEstimator from h2o.estimators import H2OXGBoostEstimator def h2omodels(): training_data = h2o.import_file(pyunit_utils.locate("smalldata/logr...
true
true
1c24680b5b5cb135ac4c0c25077b507f42f9b48b
7,636
py
Python
r2_hash_func_decoder.py
countercept/radare2-scripts
6587867fc7f4a8df50b1f940b1dbfa407a42448d
[ "BSD-3-Clause" ]
28
2017-04-26T17:00:40.000Z
2021-07-23T20:25:02.000Z
r2_hash_func_decoder.py
countercept/radare2-scripts
6587867fc7f4a8df50b1f940b1dbfa407a42448d
[ "BSD-3-Clause" ]
null
null
null
r2_hash_func_decoder.py
countercept/radare2-scripts
6587867fc7f4a8df50b1f940b1dbfa407a42448d
[ "BSD-3-Clause" ]
13
2017-04-26T15:54:18.000Z
2022-02-08T07:08:21.000Z
#!/usr/bin/env python # # Name: r2_hash_func_decoder.py # Description: A script that will decode hashed functions names. This is a # common technique used in injection based shellcode. # import argparse import os import sys try: import pefile import r2pipe import sqlite3 except ImportError as err: ...
28.706767
167
0.517025
import argparse import os import sys try: import pefile import r2pipe import sqlite3 except ImportError as err: print("Error while importing module: %s" % str(err)) sys.exit(0) CALLING_CONVENTIONS = { 'doublepulsar': [ ('movabs', 'call') ], 'metasploit': [ ('p...
true
true
1c2469b0c61104d7c375721bf9a6057d957edbbb
151
py
Python
src/ventas/forms.py
jhernandez18p/mobyapp
4add7bd3b3f1e933bbb6941674bf84f4c4462685
[ "MIT" ]
null
null
null
src/ventas/forms.py
jhernandez18p/mobyapp
4add7bd3b3f1e933bbb6941674bf84f4c4462685
[ "MIT" ]
7
2020-06-05T17:31:06.000Z
2022-03-11T23:16:34.000Z
src/ventas/forms.py
jhernandez18p/mobyapp
4add7bd3b3f1e933bbb6941674bf84f4c4462685
[ "MIT" ]
null
null
null
from django import forms from .models import Photo class PhotoForm(forms.ModelForm): class Meta: model = Photo fields = ('file', )
21.571429
33
0.655629
from django import forms from .models import Photo class PhotoForm(forms.ModelForm): class Meta: model = Photo fields = ('file', )
true
true
1c2469c3a8e1028c486c3284b05b01238bc618bc
2,015
py
Python
scripts/e47.py
JackKelly/neuralnilm_prototype
2119292e7d5c8a137797ad3c9abf9f37e7f749af
[ "MIT" ]
38
2015-08-14T14:38:52.000Z
2021-12-15T03:21:04.000Z
scripts/e47.py
VidipG/neuralnilm_prototype
2119292e7d5c8a137797ad3c9abf9f37e7f749af
[ "MIT" ]
null
null
null
scripts/e47.py
VidipG/neuralnilm_prototype
2119292e7d5c8a137797ad3c9abf9f37e7f749af
[ "MIT" ]
26
2015-09-24T20:55:26.000Z
2021-12-07T15:42:09.000Z
from __future__ import print_function, division from neuralnilm import Net, RealApplianceSource, BLSTMLayer, SubsampleLayer from lasagne.nonlinearities import sigmoid from lasagne.objectives import crossentropy from lasagne.init import Uniform, Normal from lasagne.layers import LSTMLayer, DenseLayer """ Setup: * in_t...
25.1875
84
0.633747
from __future__ import print_function, division from neuralnilm import Net, RealApplianceSource, BLSTMLayer, SubsampleLayer from lasagne.nonlinearities import sigmoid from lasagne.objectives import crossentropy from lasagne.init import Uniform, Normal from lasagne.layers import LSTMLayer, DenseLayer source = RealApp...
true
true
1c246a550777f13a0693ded5b4e269a637158255
801
py
Python
tests/test_layers_basic.py
lllcho/tensorlayer
87591b4945a6a67dfb4ea797a575efae997fd9d2
[ "Apache-2.0" ]
null
null
null
tests/test_layers_basic.py
lllcho/tensorlayer
87591b4945a6a67dfb4ea797a575efae997fd9d2
[ "Apache-2.0" ]
null
null
null
tests/test_layers_basic.py
lllcho/tensorlayer
87591b4945a6a67dfb4ea797a575efae997fd9d2
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf import tensorlayer as tl x = tf.placeholder(tf.float32, [None, 100]) n = tl.layers.InputLayer(x, name='in') n = tl.layers.DenseLayer(n, 80, name='d1') n = tl.layers.DenseLayer(n, 80, name='d2') print(n) n.print_layers() n.print_params(False) print(n.count_params()) if n.count_params() != 14560...
20.538462
43
0.670412
import tensorflow as tf import tensorlayer as tl x = tf.placeholder(tf.float32, [None, 100]) n = tl.layers.InputLayer(x, name='in') n = tl.layers.DenseLayer(n, 80, name='d1') n = tl.layers.DenseLayer(n, 80, name='d2') print(n) n.print_layers() n.print_params(False) print(n.count_params()) if n.count_params() != 14560...
true
true
1c246a8ed1c389ec18e961c5303b96acb132b7f3
2,979
py
Python
ui/web_gui.py
mdegans/smart-social-distancing
91d52c4fe4fa8baba77596980ae84e79346a0a8f
[ "Apache-2.0" ]
null
null
null
ui/web_gui.py
mdegans/smart-social-distancing
91d52c4fe4fa8baba77596980ae84e79346a0a8f
[ "Apache-2.0" ]
null
null
null
ui/web_gui.py
mdegans/smart-social-distancing
91d52c4fe4fa8baba77596980ae84e79346a0a8f
[ "Apache-2.0" ]
null
null
null
import time from fastapi import FastAPI from fastapi.staticfiles import StaticFiles from fastapi.responses import RedirectResponse, FileResponse, StreamingResponse import uvicorn import os from libs import pubsub class WebGUI: """ The Webgui object implements a fastapi application and acts as an interface fo...
36.329268
116
0.596173
import time from fastapi import FastAPI from fastapi.staticfiles import StaticFiles from fastapi.responses import RedirectResponse, FileResponse, StreamingResponse import uvicorn import os from libs import pubsub class WebGUI: def __init__(self, config): self.config = config self._host = self.co...
true
true
1c246ae753b74c8235215fa6ee37e57aad410931
13,247
py
Python
homeassistant/components/hassio/__init__.py
AdmiralStipe/core
e9334347eb8354795cdb17f1401a80ef3abfb269
[ "Apache-2.0" ]
4
2016-06-22T12:00:41.000Z
2018-06-11T20:31:25.000Z
homeassistant/components/hassio/__init__.py
AdmiralStipe/core
e9334347eb8354795cdb17f1401a80ef3abfb269
[ "Apache-2.0" ]
54
2016-06-15T04:52:32.000Z
2022-03-22T06:02:16.000Z
homeassistant/components/hassio/__init__.py
AdmiralStipe/core
e9334347eb8354795cdb17f1401a80ef3abfb269
[ "Apache-2.0" ]
6
2019-07-06T00:43:13.000Z
2021-01-16T13:27:06.000Z
"""Support for Hass.io.""" from datetime import timedelta import logging import os from typing import Optional import voluptuous as vol from homeassistant.auth.const import GROUP_ID_ADMIN from homeassistant.components.homeassistant import SERVICE_CHECK_CONFIG import homeassistant.config as conf_util from homeassistan...
28.860566
87
0.694044
from datetime import timedelta import logging import os from typing import Optional import voluptuous as vol from homeassistant.auth.const import GROUP_ID_ADMIN from homeassistant.components.homeassistant import SERVICE_CHECK_CONFIG import homeassistant.config as conf_util from homeassistant.const import ( EVENT_...
true
true
1c246b2da7ab41dd595fbf139ce2458877b7e2b0
295
py
Python
tests/test_greeter.py
jeremydimond/python-hello-world
381623eaa4a451f8b0b0a15dfb3a8c44c78bb087
[ "MIT" ]
null
null
null
tests/test_greeter.py
jeremydimond/python-hello-world
381623eaa4a451f8b0b0a15dfb3a8c44c78bb087
[ "MIT" ]
null
null
null
tests/test_greeter.py
jeremydimond/python-hello-world
381623eaa4a451f8b0b0a15dfb3a8c44c78bb087
[ "MIT" ]
null
null
null
from unittest import TestCase from helloworld.greeter import say_hello class TestSayHello(TestCase): def test_say_hello(self): self.assertEqual( 'Hello, Bob!', say_hello('Bob') ) def test_no_name(self): self.assertIsNone(say_hello())
18.4375
40
0.633898
from unittest import TestCase from helloworld.greeter import say_hello class TestSayHello(TestCase): def test_say_hello(self): self.assertEqual( 'Hello, Bob!', say_hello('Bob') ) def test_no_name(self): self.assertIsNone(say_hello())
true
true
1c246bd7dd80b33593863f2b720752fb90229c12
41,231
py
Python
empire_connector.py
splunk-soar-connectors/empire
12e317680995e64fdbf6bab528b685e08c37fe8a
[ "Apache-2.0" ]
null
null
null
empire_connector.py
splunk-soar-connectors/empire
12e317680995e64fdbf6bab528b685e08c37fe8a
[ "Apache-2.0" ]
null
null
null
empire_connector.py
splunk-soar-connectors/empire
12e317680995e64fdbf6bab528b685e08c37fe8a
[ "Apache-2.0" ]
null
null
null
# File: empire_connector.py # # Copyright (c) 2018 Splunk 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 applic...
42.993743
160
0.651427
import phantom.app as phantom from phantom.base_connector import BaseConnector from phantom.action_result import ActionResult import ast import requests import json from bs4 import BeautifulSoup from time import sleep class RetVal(tuple): def __new__(cls, val1, val2): return tuple.__n...
false
true
1c246c13c59702dc031959f8d3e38e6fc52319b7
14,732
py
Python
subway/extensions/sqlalchemy/engine.py
15696/async-web-framework
a8e11039e03d85673a132d97f11b10ce7724dcaa
[ "MIT" ]
4
2022-02-06T13:56:14.000Z
2022-02-08T03:44:48.000Z
subway/extensions/sqlalchemy/engine.py
15696/async-web-framework
a8e11039e03d85673a132d97f11b10ce7724dcaa
[ "MIT" ]
1
2022-02-19T17:02:10.000Z
2022-02-19T17:02:10.000Z
subway/extensions/sqlalchemy/engine.py
15696/async-web-framework
a8e11039e03d85673a132d97f11b10ce7724dcaa
[ "MIT" ]
2
2022-02-06T14:12:21.000Z
2022-02-19T16:50:31.000Z
from __future__ import annotations from typing import TYPE_CHECKING, Any, Callable, Dict, Generator, Tuple, Type, TypeVar, Union, Optional, List from sqlalchemy.ext.asyncio import create_async_engine, AsyncConnection, AsyncEngine from sqlalchemy.engine.interfaces import Dialect as _Dialect from sqlalchemy.ext.asyncio....
28.330769
110
0.593606
from __future__ import annotations from typing import TYPE_CHECKING, Any, Callable, Dict, Generator, Tuple, Type, TypeVar, Union, Optional, List from sqlalchemy.ext.asyncio import create_async_engine, AsyncConnection, AsyncEngine from sqlalchemy.engine.interfaces import Dialect as _Dialect from sqlalchemy.ext.asyncio....
true
true
1c246c45672ddc2f499421d5a6f81d7d58f05fc7
2,189
py
Python
lighttpd/tests/test_check.py
glasser/integrations-core
1dd515d49b1690a1369ee5195713605b1b072b1f
[ "BSD-3-Clause" ]
null
null
null
lighttpd/tests/test_check.py
glasser/integrations-core
1dd515d49b1690a1369ee5195713605b1b072b1f
[ "BSD-3-Clause" ]
4
2019-07-03T02:53:19.000Z
2019-07-10T14:52:14.000Z
lighttpd/tests/test_check.py
glasser/integrations-core
1dd515d49b1690a1369ee5195713605b1b072b1f
[ "BSD-3-Clause" ]
1
2019-12-23T13:35:17.000Z
2019-12-23T13:35:17.000Z
# (C) Datadog, Inc. 2010-2017 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) from __future__ import unicode_literals import pytest from datadog_checks.lighttpd import Lighttpd from . import common CHECK_GAUGES = [ 'lighttpd.net.bytes', 'lighttpd.net.bytes_per_s', 'lighttpd.n...
37.101695
98
0.747373
from __future__ import unicode_literals import pytest from datadog_checks.lighttpd import Lighttpd from . import common CHECK_GAUGES = [ 'lighttpd.net.bytes', 'lighttpd.net.bytes_per_s', 'lighttpd.net.hits', 'lighttpd.net.request_per_s', 'lighttpd.performance.busy_servers', 'lighttpd.perf...
true
true
1c246d32b0250c3720cb9aa6681e219b5b5b4610
1,912
py
Python
remuneration_cmsp/middlewares.py
vitorbaptista/remuneracao_cmsp
2e43715e13c515de882e34307498f7dbb8cb1a7b
[ "MIT" ]
2
2017-11-22T10:52:00.000Z
2017-12-01T17:20:33.000Z
remuneration_cmsp/middlewares.py
vitorbaptista/remuneracao_cmsp
2e43715e13c515de882e34307498f7dbb8cb1a7b
[ "MIT" ]
null
null
null
remuneration_cmsp/middlewares.py
vitorbaptista/remuneracao_cmsp
2e43715e13c515de882e34307498f7dbb8cb1a7b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Define here the models for your spider middleware # # See documentation in: # http://doc.scrapy.org/en/latest/topics/spider-middleware.html from scrapy import signals class RemunerationCMSPSpiderMiddleware(object): # Not all methods need to be defined. If a method is not defined, #...
33.54386
78
0.674686
from scrapy import signals class RemunerationCMSPSpiderMiddleware(object): @classmethod def from_crawler(cls, crawler): s = cls() crawler.signals.connect(s.spider_opened, signal=signals.spider_opened) return s def process_spider_input(self, response...
true
true
1c246e4e801798c510c115732ecc258d39b4c41b
12,966
py
Python
python/ray/tune/suggest/bohb.py
max0x7ba/ray
7e95f330d56d15fd96bb3426af652b7f8c213f4e
[ "Apache-2.0" ]
1
2021-09-22T17:10:21.000Z
2021-09-22T17:10:21.000Z
python/ray/tune/suggest/bohb.py
eth-easl/ray
2e99fb215fb3b064cbbff47dd38f52e1f3bdda55
[ "Apache-2.0" ]
77
2021-06-05T07:04:56.000Z
2022-03-26T07:04:33.000Z
python/ray/tune/suggest/bohb.py
eth-easl/ray
2e99fb215fb3b064cbbff47dd38f52e1f3bdda55
[ "Apache-2.0" ]
null
null
null
"""BOHB (Bayesian Optimization with HyperBand)""" import copy import logging import math from typing import Dict, List, Optional, Union from ray.tune.result import DEFAULT_METRIC from ray.tune.sample import Categorical, Domain, Float, Integer, LogUniform, \ Normal, \ Quantized, \ Uniform from ray.tune.sug...
39.172205
79
0.580981
import copy import logging import math from typing import Dict, List, Optional, Union from ray.tune.result import DEFAULT_METRIC from ray.tune.sample import Categorical, Domain, Float, Integer, LogUniform, \ Normal, \ Quantized, \ Uniform from ray.tune.suggest import Searcher from ray.tune.suggest.suggest...
true
true
1c246fe35f07f5d6728737d0c58270706ed6dc4c
3,879
py
Python
affine_solver.py
JTSeltzer/AffineCipherSolver
02d846c9a0fc3bd336599bc509959f1429569a4e
[ "MIT" ]
null
null
null
affine_solver.py
JTSeltzer/AffineCipherSolver
02d846c9a0fc3bd336599bc509959f1429569a4e
[ "MIT" ]
1
2019-01-31T16:45:50.000Z
2019-01-31T16:45:50.000Z
affine_solver.py
JTSeltzer/AffineCipherSolver
02d846c9a0fc3bd336599bc509959f1429569a4e
[ "MIT" ]
null
null
null
# This is my solution to this daily programmer challenge - # https://www.reddit.com/r/dailyprogrammer/comments/6k123x/20170629_challenge_321_intermediate_affine_cipher/ import sys # Takes a word, and values for a and b and applys the following rule: y = a * x + b, where # x is a character converted to number (a = 0,...
43.1
109
0.701212
import sys def singleWordAffine(word, a, b): asciiWord = [(((a * (ord(letter) - 97)) + b) % 26) for letter in word.lower()] outputWord = [chr(number + 97) for number in asciiWord] return ''.join(outputWord) def recursiveSearch(wordList, aVals, bVals): if ((len(wordList) <= 0) or (len(wo...
false
true
1c246fe840fbc81a6e1453f9f92ae2fa2c7664f1
3,787
py
Python
web/endpoint.py
hugoren/asgi-logan
b4d04c682a0275fd28abab90e4e0c0c665e85faf
[ "MIT" ]
4
2020-01-16T09:12:40.000Z
2020-01-16T09:12:50.000Z
web/endpoint.py
hugoren/asgi-logan
b4d04c682a0275fd28abab90e4e0c0c665e85faf
[ "MIT" ]
1
2021-03-25T23:19:19.000Z
2021-03-25T23:19:19.000Z
web/endpoint.py
hugoren/asgi-logan
b4d04c682a0275fd28abab90e4e0c0c665e85faf
[ "MIT" ]
null
null
null
""" Author: Hugo Date: 2020-01-07 21:29 Desc: """ import time from functools import wraps from starlette.templating import Jinja2Templates from starlette.responses import JSONResponse from web.utils import TTL from web.utils import config_info from web.utils import hmac_salt from web.utils import exception_custom fro...
27.244604
124
0.584632
import time from functools import wraps from starlette.templating import Jinja2Templates from starlette.responses import JSONResponse from web.utils import TTL from web.utils import config_info from web.utils import hmac_salt from web.utils import exception_custom from web.service import audit_record from web.model i...
true
true
1c24707c4a1b18db59863f2e2b348bbffb0d1d01
21,756
py
Python
src/geneflow/extend/agave_wrapper.py
jhphan/geneflow2
a39ab97e6425ee45584cfc15b5740e94a5bf7512
[ "Apache-2.0" ]
null
null
null
src/geneflow/extend/agave_wrapper.py
jhphan/geneflow2
a39ab97e6425ee45584cfc15b5740e94a5bf7512
[ "Apache-2.0" ]
null
null
null
src/geneflow/extend/agave_wrapper.py
jhphan/geneflow2
a39ab97e6425ee45584cfc15b5740e94a5bf7512
[ "Apache-2.0" ]
null
null
null
"""This module contains the GeneFlow AgaveWrapper class.""" import itertools import os import time import urllib.parse try: from agavepy.agave import Agave from agavepy.asynchronous import AgaveAsyncResponse except ImportError: pass from geneflow.log import Log class AgaveWrapper: """ Agave wrapper...
31.994118
101
0.467181
import itertools import os import time import urllib.parse try: from agavepy.agave import Agave from agavepy.asynchronous import AgaveAsyncResponse except ImportError: pass from geneflow.log import Log class AgaveWrapper: class AgaveRetry: def __init__(self, func_key, silent_404=False): ...
true
true
1c2471e9a02d9a0ccaa37721992758e170b8b23a
60
py
Python
{{ cookiecutter.project_name }}/{{cookiecutter.project_name.lower().replace('-', '_')}}/__init__.py
fire-squad/autodonate-plugin-template
3ef9df480b76dc050e9c35632bd2bdcd764968d3
[ "MIT" ]
null
null
null
{{ cookiecutter.project_name }}/{{cookiecutter.project_name.lower().replace('-', '_')}}/__init__.py
fire-squad/autodonate-plugin-template
3ef9df480b76dc050e9c35632bd2bdcd764968d3
[ "MIT" ]
7
2022-02-20T10:22:30.000Z
2022-03-30T09:35:39.000Z
{{ cookiecutter.project_name }}/{{cookiecutter.project_name.lower().replace('-', '_')}}/__init__.py
fire-squad/autodonate-plugin-template
3ef9df480b76dc050e9c35632bd2bdcd764968d3
[ "MIT" ]
null
null
null
"""Main package for ``{{ cookiecutter.project_name }}``."""
30
59
0.633333
true
true
1c2472adb1a6b929886dabadf459b52f6f034000
4,804
py
Python
azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/recipe_py3.py
NMijat1024/azure-sdk-for-python
c49e1d6d797dceaca81813cafb1a486d67185182
[ "MIT" ]
1
2018-07-23T08:59:24.000Z
2018-07-23T08:59:24.000Z
azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/recipe_py3.py
NMijat1024/azure-sdk-for-python
c49e1d6d797dceaca81813cafb1a486d67185182
[ "MIT" ]
1
2018-11-29T14:46:42.000Z
2018-11-29T14:46:42.000Z
azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/recipe_py3.py
NMijat1024/azure-sdk-for-python
c49e1d6d797dceaca81813cafb1a486d67185182
[ "MIT" ]
1
2018-08-28T14:36:47.000Z
2018-08-28T14:36:47.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
41.413793
79
0.610533
from .creative_work import CreativeWork class Recipe(CreativeWork): _validation = { '_type': {'required': True}, 'id': {'readonly': True}, 'read_link': {'readonly': True}, 'web_search_url': {'readonly': True}, 'name': {'readonly': True}, 'url': {'readonl...
true
true
1c24731f212cb9532f6cf5a973d17066efcc4eda
6,707
py
Python
jc/parsers/ntpq.py
amintong/jc
4140939bbf74bada6e062143ceba777c129f1955
[ "MIT" ]
null
null
null
jc/parsers/ntpq.py
amintong/jc
4140939bbf74bada6e062143ceba777c129f1955
[ "MIT" ]
null
null
null
jc/parsers/ntpq.py
amintong/jc
4140939bbf74bada6e062143ceba777c129f1955
[ "MIT" ]
null
null
null
"""jc - JSON Convert `ntpq -p` command output parser Usage (cli): $ ntpq -p | jc --ntpq or $ jc ntpq -p Usage (module): import jc result = jc.parse('ntpq', ntpq_command_output) Schema: [ { "state": string, # space/~ converted to null "remote": ...
22.582492
74
0.422991
import jc.utils import jc.parsers.universal class info(): version = '1.6' description = '`ntpq -p` command parser' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' compatible = ['linux', 'freebsd'] magic_commands = ['ntpq'] __version__ = info.version def _process(proc_data...
true
true
1c2474759f6544a1484575f710f36b53e4b34a32
32,244
py
Python
tests/test_api.py
geonlp-platform/pygeonlp-webapi
a1d1b66ec57e89a0d552f7e491545746441866d8
[ "BSD-2-Clause" ]
null
null
null
tests/test_api.py
geonlp-platform/pygeonlp-webapi
a1d1b66ec57e89a0d552f7e491545746441866d8
[ "BSD-2-Clause" ]
1
2021-08-04T07:57:41.000Z
2021-08-05T05:40:14.000Z
tests/test_api.py
geonlp-platform/pygeonlp-webapi
a1d1b66ec57e89a0d552f7e491545746441866d8
[ "BSD-2-Clause" ]
null
null
null
from tests.helpers import validate_jsonrpc, write_resreq """ GDAL がインストールされているかどうかをチェックします """ """ gdal_not_installed = False try: import gdal except ModuleNotFoundErrlr: gdal_not_installed = True """ class TestBasicApi: """ 基本的な API のテスト """ def test_parse(self, client): """ ...
31.093539
1,222
0.506761
from tests.helpers import validate_jsonrpc, write_resreq class TestBasicApi: def test_parse(self, client): query = { 'method': 'geonlp.parse', 'params': {'sentence': 'NIIは神保町駅から徒歩7分です。'}, 'id': 'test_parse', } expected = '*' result = validate_j...
true
true
1c24754aec5837038fb56055ad6754c3a07f0c5e
5,356
py
Python
piped/test/test_service.py
alexbrasetvik/Piped
0312c14d6c4c293df378c915cc9787bcc7faed36
[ "MIT" ]
3
2015-02-12T20:34:30.000Z
2016-08-06T06:54:48.000Z
piped/test/test_service.py
alexbrasetvik/Piped
0312c14d6c4c293df378c915cc9787bcc7faed36
[ "MIT" ]
null
null
null
piped/test/test_service.py
alexbrasetvik/Piped
0312c14d6c4c293df378c915cc9787bcc7faed36
[ "MIT" ]
2
2015-12-16T14:18:14.000Z
2019-04-12T01:43:10.000Z
# Copyright (c) 2010-2012, Found IT A/S and Piped Project Contributors. # See LICENSE for details. import weakref from twisted.internet import defer, reactor from twisted.trial import unittest from piped import processing, service from piped.test.plugins import services as service_plugins from piped.test.plugins.serv...
36.435374
100
0.724795
import weakref from twisted.internet import defer, reactor from twisted.trial import unittest from piped import processing, service from piped.test.plugins import services as service_plugins from piped.test.plugins.services import stub class StubServicePluginManager(service.ServicePluginManager): plugin_packa...
true
true
1c24754f0ac6e74c4a86647d0690cc153308fe41
4,159
py
Python
test/test_type_conversions.py
steffanschlein/cythonwrapper
ef30a3bc1a24024b9845dad4aa8a42e05219bd91
[ "BSD-3-Clause" ]
33
2016-04-17T21:26:17.000Z
2021-12-31T03:29:46.000Z
test/test_type_conversions.py
steffanschlein/cythonwrapper
ef30a3bc1a24024b9845dad4aa8a42e05219bd91
[ "BSD-3-Clause" ]
19
2016-04-12T22:28:11.000Z
2017-08-19T16:34:32.000Z
test/test_type_conversions.py
steffanschlein/cythonwrapper
ef30a3bc1a24024b9845dad4aa8a42e05219bd91
[ "BSD-3-Clause" ]
7
2018-04-29T18:46:59.000Z
2021-09-25T09:35:14.000Z
import numpy as np from pywrap.testing import cython_extension_from from nose.tools import assert_equal, assert_raises def test_bool_in_bool_out(): with cython_extension_from("boolinboolout.hpp"): from boolinboolout import A a = A() b = False assert_equal(not b, a.neg(b)) def tes...
31.992308
79
0.650397
import numpy as np from pywrap.testing import cython_extension_from from nose.tools import assert_equal, assert_raises def test_bool_in_bool_out(): with cython_extension_from("boolinboolout.hpp"): from boolinboolout import A a = A() b = False assert_equal(not b, a.neg(b)) def tes...
true
true
1c24783ac065713a3f5c53047fd55a698b682d39
29,888
py
Python
da/endpoint.py
yagrawal-sbu/distalgo
10e6db89b7db05d3b076dcf9295ce4f189558323
[ "MIT" ]
null
null
null
da/endpoint.py
yagrawal-sbu/distalgo
10e6db89b7db05d3b076dcf9295ce4f189558323
[ "MIT" ]
null
null
null
da/endpoint.py
yagrawal-sbu/distalgo
10e6db89b7db05d3b076dcf9295ce4f189558323
[ "MIT" ]
null
null
null
# Copyright (c) 2010-2016 Bo Lin # Copyright (c) 2010-2016 Yanhong Annie Liu # Copyright (c) 2010-2016 Stony Brook University # Copyright (c) 2010-2016 The Research Foundation of SUNY # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files #...
35.580952
83
0.552697
import sys import enum import time import random import socket import logging import threading import selectors import multiprocessing from collections import namedtuple from . import common from .common import get_runtime_option, LRU, WaitableQueue logger = logging.getLogger(__name__) HEADER...
true
true
1c2478d5f55c5f6606e1644a465476199b0dc60f
2,915
py
Python
train_ResNet152.py
DiNOV-Tokyo/uied-d
c15d7e003dda13c24cfd0c17b4efb058dcc3b292
[ "Apache-2.0" ]
null
null
null
train_ResNet152.py
DiNOV-Tokyo/uied-d
c15d7e003dda13c24cfd0c17b4efb058dcc3b292
[ "Apache-2.0" ]
null
null
null
train_ResNet152.py
DiNOV-Tokyo/uied-d
c15d7e003dda13c24cfd0c17b4efb058dcc3b292
[ "Apache-2.0" ]
null
null
null
# https://qiita.com/daichimizuno/items/d1a255fa56960302bcc5 from PIL import Image import numpy as np import glob import os from keras.utils import np_utils from keras.models import Sequential, Model from keras.layers import Flatten, Dense, Input, Dropout from sklearn.model_selection import train_test_split import matpl...
32.752809
120
0.73928
from PIL import Image import numpy as np import glob import os from keras.utils import np_utils from keras.models import Sequential, Model from keras.layers import Flatten, Dense, Input, Dropout from sklearn.model_selection import train_test_split import matplotlib.pyplot as plt from keras.applications.resnet import R...
true
true
1c2478fd732efcb21f59dcc040ac75cdb5559c85
8,247
py
Python
python_modules/libraries/dagster-postgres/dagster_postgres/event_log/event_log.py
JPeer264/dagster-fork
32cc87a36134be7c442fa85d6867eb1d3301aea0
[ "Apache-2.0" ]
1
2020-09-19T16:35:59.000Z
2020-09-19T16:35:59.000Z
python_modules/libraries/dagster-postgres/dagster_postgres/event_log/event_log.py
JPeer264/dagster-fork
32cc87a36134be7c442fa85d6867eb1d3301aea0
[ "Apache-2.0" ]
null
null
null
python_modules/libraries/dagster-postgres/dagster_postgres/event_log/event_log.py
JPeer264/dagster-fork
32cc87a36134be7c442fa85d6867eb1d3301aea0
[ "Apache-2.0" ]
null
null
null
import threading from collections import namedtuple from contextlib import contextmanager import psycopg2 import sqlalchemy as db from dagster import check from dagster.core.events.log import EventRecord from dagster.core.storage.event_log import ( AssetAwareSqlEventLogStorage, SqlEventLogStorageMetadata, ...
34.651261
114
0.647266
import threading from collections import namedtuple from contextlib import contextmanager import psycopg2 import sqlalchemy as db from dagster import check from dagster.core.events.log import EventRecord from dagster.core.storage.event_log import ( AssetAwareSqlEventLogStorage, SqlEventLogStorageMetadata, ...
true
true
1c247baeafeb3502e8469065266594439d9c642e
4,374
py
Python
ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py
fangxingli/mambari
6da9f6090d4d42623529b73413c8feb8b7f6fe45
[ "Apache-2.0", "MIT" ]
null
null
null
ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py
fangxingli/mambari
6da9f6090d4d42623529b73413c8feb8b7f6fe45
[ "Apache-2.0", "MIT" ]
null
null
null
ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py
fangxingli/mambari
6da9f6090d4d42623529b73413c8feb8b7f6fe45
[ "Apache-2.0", "MIT" ]
null
null
null
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
41.657143
115
0.755373
import functools from resource_management import Script from resource_management.libraries.functions.default import default from resource_management.libraries.resources.hdfs_resource import HdfsResource from resource_management.libraries.functions import get_kinit_path config = Script.get_config() def __get_compone...
true
true
1c247c5d1543a20cadb99235572b1d50b9e935a8
71,926
py
Python
Lib/test/test_urllib.py
gerph/cpython
98813cb03c2371789669c3d8debf8fca2a344de9
[ "CNRI-Python-GPL-Compatible" ]
1,886
2021-05-03T23:58:43.000Z
2022-03-31T19:15:58.000Z
Lib/test/test_urllib.py
gerph/cpython
98813cb03c2371789669c3d8debf8fca2a344de9
[ "CNRI-Python-GPL-Compatible" ]
70
2021-05-04T23:25:35.000Z
2022-03-31T18:42:08.000Z
Lib/test/test_urllib.py
gerph/cpython
98813cb03c2371789669c3d8debf8fca2a344de9
[ "CNRI-Python-GPL-Compatible" ]
52
2021-05-04T21:26:03.000Z
2022-03-08T18:02:56.000Z
"""Regression tests for what was in Python 2's "urllib" module""" import urllib.parse import urllib.request import urllib.error import http.client import email.message import io import unittest from unittest.mock import patch from test import support import os try: import ssl except ImportError: ssl = None imp...
41.793144
108
0.589509
import urllib.parse import urllib.request import urllib.error import http.client import email.message import io import unittest from unittest.mock import patch from test import support import os try: import ssl except ImportError: ssl = None import sys import tempfile from nturl2path import url2pathname, pathn...
true
true
1c247c982b11f78722ab37c35b45f2abf24e1fa1
217
py
Python
serpentime/app.py
xamcost/serpentime
b0517158fcd03f94ee0c35cd20a09402a64842d5
[ "MIT" ]
1
2021-02-21T01:18:32.000Z
2021-02-21T01:18:32.000Z
serpentime/app.py
xamcost/serpentime
b0517158fcd03f94ee0c35cd20a09402a64842d5
[ "MIT" ]
null
null
null
serpentime/app.py
xamcost/serpentime
b0517158fcd03f94ee0c35cd20a09402a64842d5
[ "MIT" ]
null
null
null
import sys from PyQt5.QtWidgets import QApplication from .ui.app_view import AppView def main(): app = QApplication(sys.argv) _ = AppView() sys.exit(app.exec_()) if __name__ == "__main__": main()
14.466667
40
0.672811
import sys from PyQt5.QtWidgets import QApplication from .ui.app_view import AppView def main(): app = QApplication(sys.argv) _ = AppView() sys.exit(app.exec_()) if __name__ == "__main__": main()
true
true
1c247f2c3a43b81a6d0e8eaf6ed4e0816eefc478
5,011
py
Python
operations/employees/migrations/0008_drivinglicence_historicaldrivinglicence.py
kaizer88/emps
2669b32c46befcf1a19390fb25013817e6b00980
[ "MIT" ]
null
null
null
operations/employees/migrations/0008_drivinglicence_historicaldrivinglicence.py
kaizer88/emps
2669b32c46befcf1a19390fb25013817e6b00980
[ "MIT" ]
null
null
null
operations/employees/migrations/0008_drivinglicence_historicaldrivinglicence.py
kaizer88/emps
2669b32c46befcf1a19390fb25013817e6b00980
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.db.models.deletion from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('employee...
84.932203
463
0.64099
from __future__ import unicode_literals from django.db import models, migrations import django.db.models.deletion from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('employees', '0007_employee_emai...
true
true
1c247f5a2e928df272078cffc8b48205f4768b10
47,780
py
Python
pyscf/solvent/ddcosmo.py
iliya-s/pyscf
81774efc036b721f7ab9963e21b1bd01e7472de0
[ "Apache-2.0" ]
2
2019-05-28T05:25:56.000Z
2019-11-09T02:16:43.000Z
pyscf/solvent/ddcosmo.py
iliya-s/pyscf
81774efc036b721f7ab9963e21b1bd01e7472de0
[ "Apache-2.0" ]
null
null
null
pyscf/solvent/ddcosmo.py
iliya-s/pyscf
81774efc036b721f7ab9963e21b1bd01e7472de0
[ "Apache-2.0" ]
1
2019-11-09T02:13:16.000Z
2019-11-09T02:13:16.000Z
#!/usr/bin/env python # Copyright 2014-2019 The PySCF Developers. 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 # # U...
40.837607
129
0.564881
import ctypes import copy import numpy from pyscf import lib from pyscf.lib import logger from pyscf import gto from pyscf import df from pyscf.dft import gen_grid, numint from pyscf.data import radii from pyscf.symm import sph def ddcosmo_for_scf(mf, solvent_obj=None, dm=None): if getattr(mf, '...
true
true
1c2480ba4474a59a93b9f421adbcaa2665c079fc
10,532
py
Python
samples/blenderpyluxcoredemo/blenderpyluxcoredemo.py
DavidBluecame/LuxRays
be0f5228b8b65268278a6c6a1c98564ebdc27c05
[ "Apache-2.0" ]
null
null
null
samples/blenderpyluxcoredemo/blenderpyluxcoredemo.py
DavidBluecame/LuxRays
be0f5228b8b65268278a6c6a1c98564ebdc27c05
[ "Apache-2.0" ]
null
null
null
samples/blenderpyluxcoredemo/blenderpyluxcoredemo.py
DavidBluecame/LuxRays
be0f5228b8b65268278a6c6a1c98564ebdc27c05
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/python # -*- coding: utf-8 -*- ################################################################################ # Copyright 1998-2015 by authors (see AUTHORS.txt) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may ...
37.347518
124
0.617736
true
true
1c24815e244bcb2e0c2a88ccd3e6982d5863890f
737
py
Python
timestamps.py
mjkrause/utils
eb2b6882eaa87ede8c3ce5b3b7928e90ca0179ae
[ "Apache-2.0" ]
null
null
null
timestamps.py
mjkrause/utils
eb2b6882eaa87ede8c3ce5b3b7928e90ca0179ae
[ "Apache-2.0" ]
null
null
null
timestamps.py
mjkrause/utils
eb2b6882eaa87ede8c3ce5b3b7928e90ca0179ae
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 def validate_iso8601(ts): """Check validity of a timestamp in ISO 8601 format.""" digits = [0, 1, 2, 3, 5, 6, 8, 9, 11, 12, 14, 15, 17, 18, 20, 21, 22] try: assert len(ts) == 24 assert all([ts[i].isdigit() for i in digits]) assert int(ts[5:7]) <= 12 a...
32.043478
73
0.500678
def validate_iso8601(ts): digits = [0, 1, 2, 3, 5, 6, 8, 9, 11, 12, 14, 15, 17, 18, 20, 21, 22] try: assert len(ts) == 24 assert all([ts[i].isdigit() for i in digits]) assert int(ts[5:7]) <= 12 assert int(ts[8:10]) < 32 assert int(ts[11:13]) < 24 assert all([i ...
true
true
1c24824be9f0740b9e18dcf68ed6ad559daaa3cd
9,839
py
Python
web_console_v2/api/fedlearner_webconsole/utils/fake_k8s_client.py
Hsy-Intel/fedlearner
d5d0bb5549e115eaf0dec5a00a78dcb21ac0909d
[ "Apache-2.0" ]
772
2020-01-21T13:59:42.000Z
2022-03-30T08:20:16.000Z
web_console_v2/api/fedlearner_webconsole/utils/fake_k8s_client.py
Hsy-Intel/fedlearner
d5d0bb5549e115eaf0dec5a00a78dcb21ac0909d
[ "Apache-2.0" ]
126
2020-03-03T07:54:39.000Z
2022-03-08T23:24:03.000Z
web_console_v2/api/fedlearner_webconsole/utils/fake_k8s_client.py
Hsy-Intel/fedlearner
d5d0bb5549e115eaf0dec5a00a78dcb21ac0909d
[ "Apache-2.0" ]
198
2020-01-22T02:16:17.000Z
2022-03-31T01:13:05.000Z
# Copyright 2021 The FedLearner Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
37.268939
78
0.456449
import logging import datetime from kubernetes import client _RAISE_EXCEPTION_KEY = 'raise_exception' class FakeK8sClient(object): def close(self): pass def create_or_update_secret(self, data, metadata, ...
true
true
1c248355460fd311b22783b614af2d182f15246c
15,351
py
Python
tensorflow_datasets/image/open_images.py
MyWhiteCastle/datasets
e75a54948bb8aaf9cf45933a538502d2f66c41a6
[ "Apache-2.0" ]
2
2019-11-23T18:41:58.000Z
2020-08-12T21:00:39.000Z
tensorflow_datasets/image/open_images.py
MyWhiteCastle/datasets
e75a54948bb8aaf9cf45933a538502d2f66c41a6
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/image/open_images.py
MyWhiteCastle/datasets
e75a54948bb8aaf9cf45933a538502d2f66c41a6
[ "Apache-2.0" ]
1
2020-04-07T00:59:22.000Z
2020-04-07T00:59:22.000Z
# coding=utf-8 # Copyright 2019 The TensorFlow Datasets 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 appl...
40.08094
143
0.65442
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import csv import functools import io import os from absl import logging import numpy as np import tensorflow as tf import tensorflow_datasets.public_api as tfds _DESCRIPTIO...
true
true
1c24864b499c2e8497109c560a69d6f1bdd369b1
1,829
py
Python
Optimizers/qhadam/code/qhadam.py
TannerGilbert/Machine-Learning-Explained
5309f44a38ce862f3f177e8d5de2e60eea44637b
[ "MIT" ]
24
2020-09-14T18:55:13.000Z
2022-03-22T22:14:30.000Z
Optimizers/qhadam/code/qhadam.py
TannerGilbert/Machine-Learning-Explained
5309f44a38ce862f3f177e8d5de2e60eea44637b
[ "MIT" ]
null
null
null
Optimizers/qhadam/code/qhadam.py
TannerGilbert/Machine-Learning-Explained
5309f44a38ce862f3f177e8d5de2e60eea44637b
[ "MIT" ]
6
2021-02-06T15:34:27.000Z
2022-01-31T23:16:07.000Z
# based on https://arxiv.org/pdf/1810.06801.pdf import numpy as np class QHAdam: """QHAdam - Quasi-Hyperbolic Adam Parameters: ----------- learning_rate: float = 0.001 The step length used when following the negative gradient. beta_1: float = 0.9 The exponential decay rate for the...
36.58
176
0.606342
import numpy as np class QHAdam: def __init__(self, learning_rate: float = 0.001, beta_1: float = 0.9, beta_2: float = 0.999, epsilon: float = 1e-7, v_1: float = 0.7, v_2: float = 1.0) -> None: self.learning_rate = learning_rate self.epsilon = epsilon self.beta_1 = beta_1 self.be...
true
true
1c2486f999d8932c73dda8434213ceb44cc568ac
109
py
Python
rl/core/__init__.py
gtrll/librl
39709c3e485e232865b3e08b7211cd9d871c666a
[ "MIT" ]
5
2020-07-14T23:01:53.000Z
2020-12-09T08:11:29.000Z
rl/core/__init__.py
chinganc/mamba
e8adf0cf91660aed2c025508137a14f9d062248c
[ "MIT" ]
1
2022-03-27T04:43:31.000Z
2022-03-27T04:43:31.000Z
rl/core/__init__.py
chinganc/mamba
e8adf0cf91660aed2c025508137a14f9d062248c
[ "MIT" ]
4
2020-08-05T14:13:26.000Z
2022-02-26T00:46:03.000Z
from . import oracles from . import function_approximators from . import online_learners from . import utils
21.8
36
0.816514
from . import oracles from . import function_approximators from . import online_learners from . import utils
true
true
1c24877943ba6883e63770083f0afb87cc826d92
852
py
Python
Introduction-to-Data-Science/code.py
nevinadalal/intro-to-ds
5ae7bd0f0f998961cc49552fc2fc79577603f514
[ "MIT" ]
null
null
null
Introduction-to-Data-Science/code.py
nevinadalal/intro-to-ds
5ae7bd0f0f998961cc49552fc2fc79577603f514
[ "MIT" ]
null
null
null
Introduction-to-Data-Science/code.py
nevinadalal/intro-to-ds
5ae7bd0f0f998961cc49552fc2fc79577603f514
[ "MIT" ]
null
null
null
# -------------- import pandas as pd from sklearn.model_selection import train_test_split # Read the data data = pd.read_csv(path) # print the first 5 rows of the dataset print(data.head()) # Split the data into independent and target variable X = data.drop(['G3'],1) y = data.G3 # Split the data into train and test d...
20.780488
69
0.739437
import pandas as pd from sklearn.model_selection import train_test_split data = pd.read_csv(path) print(data.head()) X = data.drop(['G3'],1) y = data.G3 X_train,X_test,y_train,y_test = train_test_split(X,y,test_size = 0.3) from sklearn.linear_model import LogisticRegression from sklearn.ensemble import Rando...
true
true
1c2488294baa0c69f099b7bd15ecbf6fb177908c
37,840
py
Python
demo/Lpassword/main_v1.py
Zber5/OpenRadar
701cf166203c3f3e1ba4873cd132a7ccba4f0863
[ "Apache-2.0" ]
1
2021-07-09T18:40:24.000Z
2021-07-09T18:40:24.000Z
demo/Lpassword/main_v1.py
Zber5/OpenRadar
701cf166203c3f3e1ba4873cd132a7ccba4f0863
[ "Apache-2.0" ]
null
null
null
demo/Lpassword/main_v1.py
Zber5/OpenRadar
701cf166203c3f3e1ba4873cd132a7ccba4f0863
[ "Apache-2.0" ]
1
2021-11-13T05:33:50.000Z
2021-11-13T05:33:50.000Z
# Copyright 2019 The OpenRadar 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 law...
43.796296
136
0.587289
import sys import numpy as np import mmwave.dsp as dsp import mmwave.clustering as clu from mmwave.dataloader import DCA1000 from demo.visualizer.visualize import ellipse_visualize import scipy from scipy import signal import os import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D pl...
true
true
1c248869d2ae0ce46f14f4b03ce82bd5412d8727
788
py
Python
odoo-13.0/addons/l10n_ch_qriban/__manifest__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
odoo-13.0/addons/l10n_ch_qriban/__manifest__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
odoo-13.0/addons/l10n_ch_qriban/__manifest__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': "Switzerland - QR-IBAN", 'description': """ Swiss localization ================== Added a QR-IBAN field on bank account. If this field is empty, but the bank account number itself is a valid QR-IBAN numb...
34.26087
131
0.638325
{ 'name': "Switzerland - QR-IBAN", 'description': """ Swiss localization ================== Added a QR-IBAN field on bank account. If this field is empty, but the bank account number itself is a valid QR-IBAN number, it will still be used as QR-IBAN as before. But if you fill in the new QR-IBAN field, that ...
true
true
1c24889850ba7ab4537e1c7c8172ef7ae38360b5
412
py
Python
instagram/users/migrations/0004_auto_20210304_0158.py
aliaskar25/instagram_copy
742ef58eba5377c9f48b4428d26f2cfe740ca1ca
[ "MIT" ]
null
null
null
instagram/users/migrations/0004_auto_20210304_0158.py
aliaskar25/instagram_copy
742ef58eba5377c9f48b4428d26f2cfe740ca1ca
[ "MIT" ]
null
null
null
instagram/users/migrations/0004_auto_20210304_0158.py
aliaskar25/instagram_copy
742ef58eba5377c9f48b4428d26f2cfe740ca1ca
[ "MIT" ]
2
2021-03-06T05:02:38.000Z
2021-04-01T13:34:09.000Z
# Generated by Django 3.1.7 on 2021-03-04 01:58 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0003_auto_20210304_0153'), ] operations = [ migrations.AlterField( model_name='user', name='avatar', ...
21.684211
80
0.601942
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0003_auto_20210304_0153'), ] operations = [ migrations.AlterField( model_name='user', name='avatar', field=models.ImageField(blank=True, null=...
true
true
1c2488c1da44b10cac0fd39352c245d981b2329d
4,276
py
Python
coremltools/test/sklearn_tests/test_glm_classifier.py
LaudateCorpus1/coremltools
777a4460d6823e5e91dea4fa3eacb0b11c7d5dfc
[ "BSD-3-Clause" ]
2,740
2017-10-03T23:19:01.000Z
2022-03-30T15:16:39.000Z
coremltools/test/sklearn_tests/test_glm_classifier.py
LaudateCorpus1/coremltools
777a4460d6823e5e91dea4fa3eacb0b11c7d5dfc
[ "BSD-3-Clause" ]
1,057
2017-10-05T22:47:01.000Z
2022-03-31T23:51:15.000Z
coremltools/test/sklearn_tests/test_glm_classifier.py
LaudateCorpus1/coremltools
777a4460d6823e5e91dea4fa3eacb0b11c7d5dfc
[ "BSD-3-Clause" ]
510
2017-10-04T19:22:28.000Z
2022-03-31T12:16:52.000Z
# Copyright (c) 2017, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import itertools import pandas as pd import os import unittest from coremltools._deps import _HAS_SKLEA...
36.547009
86
0.638213
import itertools import pandas as pd import os import unittest from coremltools._deps import _HAS_SKLEARN from coremltools.converters.sklearn import convert from coremltools.models.utils import ( evaluate_classifier, evaluate_classifier_with_probabilities, _macos_version, _is_macos, ) if _HAS_SKL...
true
true
1c248944e96eefcb0b8a3769cc121caabfd1d5a6
777
py
Python
Chapter02/mypackage_mains/pkgmain3.py
MichaelRW/Python-for-Geeks
a111f61f1a0b077fc0524431e1ccefd9214d5c53
[ "MIT" ]
31
2020-08-10T22:37:41.000Z
2022-03-09T21:35:56.000Z
Chapter02/mypackage_mains/pkgmain3.py
MichaelRW/Python-for-Geeks
a111f61f1a0b077fc0524431e1ccefd9214d5c53
[ "MIT" ]
null
null
null
Chapter02/mypackage_mains/pkgmain3.py
MichaelRW/Python-for-Geeks
a111f61f1a0b077fc0524431e1ccefd9214d5c53
[ "MIT" ]
21
2020-08-10T22:37:44.000Z
2022-03-07T07:26:28.000Z
# pkgmain3.py with with main function import masifutil def my_main(): """ This is a main function which generates two random numbers and then apply calculator functions on them """ x = masifutil.random_2d() y = masifutil.random_1d() sum = masifutil.add(x,y) diff = masifutil.subtract(x,y) sr...
28.777778
114
0.63964
import masifutil def my_main(): x = masifutil.random_2d() y = masifutil.random_1d() sum = masifutil.add(x,y) diff = masifutil.subtract(x,y) sroot = masifutil.sqrt(x) log10x = masifutil.log(x) log2x = masifutil.ln(x) print("x = {}, y = {}".format(x, y)) print("sum is {}".format...
true
true
1c2489932c6f935c272fefcdeccb18d409802ba0
5,030
py
Python
read10axis.py
howeverforever/beagle
d805561c2e87467ff2045c8ea1f9f7fb74b710fb
[ "MIT" ]
null
null
null
read10axis.py
howeverforever/beagle
d805561c2e87467ff2045c8ea1f9f7fb74b710fb
[ "MIT" ]
null
null
null
read10axis.py
howeverforever/beagle
d805561c2e87467ff2045c8ea1f9f7fb74b710fb
[ "MIT" ]
1
2018-10-06T09:01:45.000Z
2018-10-06T09:01:45.000Z
import beagle as bg import argparse import sys import time import csv import threading import socket import pickle from glob import glob class Beagle(object): def __init__(self, axis_10): self._axis_10 = axis_10 self._mpu = bg.MPU() self.__load_config() def __load_config(self): ...
30.858896
102
0.482704
import beagle as bg import argparse import sys import time import csv import threading import socket import pickle from glob import glob class Beagle(object): def __init__(self, axis_10): self._axis_10 = axis_10 self._mpu = bg.MPU() self.__load_config() def __load_config(self): ...
true
true
1c2489cb8c9c278c91b7a8960159ac3004e28bad
3,264
py
Python
tictactoe/__init__.py
SriMethan/python-tictactoe
40dcd64c7a42c1e4a94eb40d54e985f7165f46c2
[ "MIT" ]
null
null
null
tictactoe/__init__.py
SriMethan/python-tictactoe
40dcd64c7a42c1e4a94eb40d54e985f7165f46c2
[ "MIT" ]
null
null
null
tictactoe/__init__.py
SriMethan/python-tictactoe
40dcd64c7a42c1e4a94eb40d54e985f7165f46c2
[ "MIT" ]
null
null
null
import itertools import numpy X = 1 O = 2 class Board: def __init__(self, dimensions=(3, 3), x_in_a_row=3): self.dimensions = dimensions self.x_in_a_row = x_in_a_row self.board = self.create_board() self._directions = self.find_directions() self.move_count = 0...
31.384615
86
0.561581
import itertools import numpy X = 1 O = 2 class Board: def __init__(self, dimensions=(3, 3), x_in_a_row=3): self.dimensions = dimensions self.x_in_a_row = x_in_a_row self.board = self.create_board() self._directions = self.find_directions() self.move_count = 0...
true
true
1c2489f4abf7e1286577bd2d14a20af7a69437d6
9,001
py
Python
datasets/kitti.py
txsing/RobustNet
e5bc6f3234f2140a265279999d7ba91e6cd7011f
[ "BSD-3-Clause" ]
147
2021-03-26T08:08:42.000Z
2022-03-30T03:31:52.000Z
datasets/kitti.py
txsing/RobustNet
e5bc6f3234f2140a265279999d7ba91e6cd7011f
[ "BSD-3-Clause" ]
14
2021-05-08T14:20:39.000Z
2022-03-23T00:28:38.000Z
datasets/kitti.py
txsing/RobustNet
e5bc6f3234f2140a265279999d7ba91e6cd7011f
[ "BSD-3-Clause" ]
18
2021-06-24T15:12:34.000Z
2022-02-14T03:29:14.000Z
""" KITTI Dataset Loader """ import os import sys import numpy as np from PIL import Image from torch.utils import data import logging import datasets.uniform as uniform import datasets.cityscapes_labels as cityscapes_labels import json from config import cfg trainid_to_name = cityscapes_labels.train...
35.718254
134
0.55816
import os import sys import numpy as np from PIL import Image from torch.utils import data import logging import datasets.uniform as uniform import datasets.cityscapes_labels as cityscapes_labels import json from config import cfg trainid_to_name = cityscapes_labels.trainId2name id_to_trainid = citysca...
true
true
1c248a791fc8ed3c5b3c7a8a18e495120a454b8d
533
py
Python
apps/core/management/commands/dump_masked_data.py
developersociety/commonslibrary
38a77a8eea9d11e1819535ca98d577430b830c02
[ "BSD-3-Clause" ]
4
2018-03-20T06:32:16.000Z
2021-03-25T10:05:25.000Z
apps/core/management/commands/dump_masked_data.py
developersociety/commonslibrary
38a77a8eea9d11e1819535ca98d577430b830c02
[ "BSD-3-Clause" ]
22
2018-03-01T15:16:50.000Z
2020-04-16T10:51:29.000Z
apps/core/management/commands/dump_masked_data.py
developersociety/commonslibrary
38a77a8eea9d11e1819535ca98d577430b830c02
[ "BSD-3-Clause" ]
1
2019-02-20T09:40:41.000Z
2019-02-20T09:40:41.000Z
from maskpostgresdata import BasePostgresDataMaskingCommand class Command(BasePostgresDataMaskingCommand): """ Commons Library data masking. As all user profiles are public, we default to standard user data masking. The only other secret are API auth tokens - which we replace. """ def updat...
31.352941
78
0.701689
from maskpostgresdata import BasePostgresDataMaskingCommand class Command(BasePostgresDataMaskingCommand): def update_authtoken_token(self, queryset): for num, token in enumerate(queryset): queryset.filter(key=token.key).update(key='{:040d}'.format(num))
true
true
1c248c29bedc4ee070f391fa15916e505aab4ef1
3,001
py
Python
lib/atecml/gcforest/datasets/uci_semg.py
ogotaiking/anti_ml
bb40f75c918e20c49f27ce54029bc293a2d17f85
[ "MIT" ]
1
2021-05-02T21:10:52.000Z
2021-05-02T21:10:52.000Z
lib/atecml/gcforest/datasets/uci_semg.py
ogotaiking/anti_ml
bb40f75c918e20c49f27ce54029bc293a2d17f85
[ "MIT" ]
4
2020-08-17T16:18:44.000Z
2021-01-29T15:56:13.000Z
lib/atecml/gcforest/datasets/uci_semg.py
ogotaiking/anti_ml
bb40f75c918e20c49f27ce54029bc293a2d17f85
[ "MIT" ]
null
null
null
""" Description: A python 2.7 implementation of gcForest proposed in [1]. A demo implementation of gcForest library as well as some demo client scripts to demostrate how to use the code. The implementation is flexible enough for modifying the model or fit your own datasets. Reference: [1] Z.-H. Zhou and J. Feng. Deep ...
40.013333
247
0.66078
import os.path as osp import numpy as np import scipy.io as sio from sklearn.model_selection import train_test_split from .ds_base import ds_base from .ds_base import get_dataset_base move2label = {} move2label['spher_ch1'] = 0 move2label['spher_ch2'] = 0 move2label['tip_ch1'] = 1 move2label['tip_ch2'] = 1 move2label...
true
true
1c248c6aa19ea64f6775a19a9a615b5139972401
739
py
Python
care/facility/migrations/0186_auto_20200926_0001.py
gigincg/care
07be6a7982b5c46a854e3435a52662f32800c8ae
[ "MIT" ]
189
2020-03-17T17:18:58.000Z
2022-02-22T09:49:45.000Z
care/facility/migrations/0186_auto_20200926_0001.py
gigincg/care
07be6a7982b5c46a854e3435a52662f32800c8ae
[ "MIT" ]
598
2020-03-19T21:22:09.000Z
2022-03-30T05:08:37.000Z
care/facility/migrations/0186_auto_20200926_0001.py
gigincg/care
07be6a7982b5c46a854e3435a52662f32800c8ae
[ "MIT" ]
159
2020-03-19T18:45:56.000Z
2022-03-17T13:23:12.000Z
# Generated by Django 2.2.11 on 2020-09-25 18:31 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('facility', '0185_correct_blood_donation'), ] operations = [ migrations.AlterField( model_name='historicalpatientregistration', ...
30.791667
113
0.653586
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('facility', '0185_correct_blood_donation'), ] operations = [ migrations.AlterField( model_name='historicalpatientregistration', name='fit_for_blood_donation', ...
true
true
1c248cdfc9d6da8cb79d6e228159e07428c1a55d
3,774
py
Python
yearn/v2/strategies.py
0xkofee/yearn-exporter
b4f51c88f74ced31ecffbe5f4a52e5c5d5184a74
[ "MIT" ]
null
null
null
yearn/v2/strategies.py
0xkofee/yearn-exporter
b4f51c88f74ced31ecffbe5f4a52e5c5d5184a74
[ "MIT" ]
null
null
null
yearn/v2/strategies.py
0xkofee/yearn-exporter
b4f51c88f74ced31ecffbe5f4a52e5c5d5184a74
[ "MIT" ]
null
null
null
import logging import threading import time from typing import List from eth_utils import encode_hex, event_abi_to_log_topic from yearn.decorators import sentry_catch_all, wait_or_exit_after from yearn.events import create_filter, decode_logs from yearn.multicall2 import fetch_multicall from yearn.utils import contrac...
31.714286
114
0.608903
import logging import threading import time from typing import List from eth_utils import encode_hex, event_abi_to_log_topic from yearn.decorators import sentry_catch_all, wait_or_exit_after from yearn.events import create_filter, decode_logs from yearn.multicall2 import fetch_multicall from yearn.utils import contrac...
true
true
1c248d87285c57e90bc39c231e930f95b666eb0b
1,360
py
Python
pyqt5_fundamentals/window13_QGridLayout.py
a-yildiz/ROS-Simple-Sample-Packages
eb6b18adcd1fe26e2b5e644c42922e8102867cd9
[ "MIT" ]
1
2021-09-19T07:51:23.000Z
2021-09-19T07:51:23.000Z
pyqt5_fundamentals/window13_QGridLayout.py
a-yildiz/ROS-Simple-Sample-Packages
eb6b18adcd1fe26e2b5e644c42922e8102867cd9
[ "MIT" ]
null
null
null
pyqt5_fundamentals/window13_QGridLayout.py
a-yildiz/ROS-Simple-Sample-Packages
eb6b18adcd1fe26e2b5e644c42922e8102867cd9
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from PyQt5 import QtWidgets import sys """ QGridLayout: Allows easy grid-shape layout management. Buttons and other similar elements in the GUI are dynamically re-sized w.r.t. window dimensions. """ def create_window(): # Define window: obj = QtWidgets.QApplication(s...
30.909091
110
0.685294
from PyQt5 import QtWidgets import sys def create_window(): obj = QtWidgets.QApplication(sys.argv) window = QtWidgets.QWidget() window.setWindowTitle("My PyQt5 Interface") window.setGeometry(250, 100, 600, 300) button1 = QtWidgets.QPushButton(window) button2 = QtWidgets.Q...
true
true
1c248d929d386dca09de7b5aa84f446a0100b6a5
7,208
py
Python
prodj/gui/preview_waveform_qt.py
beauburrows/python-prodj-link
1cc6b6c19e38ac09fadb91420e45adbe2c9691bb
[ "Apache-2.0" ]
66
2018-01-16T09:25:30.000Z
2022-03-24T14:58:44.000Z
prodj/gui/preview_waveform_qt.py
beauburrows/python-prodj-link
1cc6b6c19e38ac09fadb91420e45adbe2c9691bb
[ "Apache-2.0" ]
25
2018-05-16T12:17:11.000Z
2021-02-06T11:09:03.000Z
prodj/gui/preview_waveform_qt.py
beauburrows/python-prodj-link
1cc6b6c19e38ac09fadb91420e45adbe2c9691bb
[ "Apache-2.0" ]
18
2018-03-15T13:54:40.000Z
2022-03-24T20:49:43.000Z
#!/usr/bin/env python3 import sys from threading import Lock from PyQt5.QtWidgets import QApplication, QHBoxLayout from PyQt5.QtWidgets import QWidget from PyQt5.QtGui import QColor, QPainter, QPixmap from PyQt5.QtCore import pyqtSignal, Qt, QSize from prodj.pdblib.usbanlzdatabase import UsbAnlzDatabase from .wavefor...
32.32287
116
0.632908
import sys from threading import Lock from PyQt5.QtWidgets import QApplication, QHBoxLayout from PyQt5.QtWidgets import QWidget from PyQt5.QtGui import QColor, QPainter, QPixmap from PyQt5.QtCore import pyqtSignal, Qt, QSize from prodj.pdblib.usbanlzdatabase import UsbAnlzDatabase from .waveform_blue_map import blue...
true
true
1c248e15942bbcb28cd458b527bf9ba9281f2215
577
py
Python
7-1.py
chrisguilbeau/aoc2021
d043f9da81343fc2e817884e7dfd36aa71632984
[ "MIT" ]
null
null
null
7-1.py
chrisguilbeau/aoc2021
d043f9da81343fc2e817884e7dfd36aa71632984
[ "MIT" ]
null
null
null
7-1.py
chrisguilbeau/aoc2021
d043f9da81343fc2e817884e7dfd36aa71632984
[ "MIT" ]
null
null
null
from sys import argv from collections import defaultdict def getCost(depths, pos): result = 0 for depth in depths: result += abs(pos - depth) return result def main(lines): depths = list(map(int, lines[0].split(','))) print(depths) print(min(depths)) print(max(depths)) costs =...
22.192308
49
0.601386
from sys import argv from collections import defaultdict def getCost(depths, pos): result = 0 for depth in depths: result += abs(pos - depth) return result def main(lines): depths = list(map(int, lines[0].split(','))) print(depths) print(min(depths)) print(max(depths)) costs =...
true
true
1c248e3232df199bcd429493c4b33459dd48e99d
9,589
py
Python
2_Training/Train_YOLO.py
TomasTrnkaPLC/TrainYourOwnYOLO
9c831d0c14046fe436378a7407a62dd247a3ef82
[ "MIT" ]
null
null
null
2_Training/Train_YOLO.py
TomasTrnkaPLC/TrainYourOwnYOLO
9c831d0c14046fe436378a7407a62dd247a3ef82
[ "MIT" ]
null
null
null
2_Training/Train_YOLO.py
TomasTrnkaPLC/TrainYourOwnYOLO
9c831d0c14046fe436378a7407a62dd247a3ef82
[ "MIT" ]
null
null
null
import os import sys import argparse import time import datetime def get_parent_dir(n=1): """ returns the n-th parent dicrectory of the current working directory """ current_path = os.path.dirname(os.path.abspath(__file__)) for k in range(n): current_path = os.path.dirname(current_path) re...
42.429204
143
0.68151
import os import sys import argparse import time import datetime def get_parent_dir(n=1): current_path = os.path.dirname(os.path.abspath(__file__)) for k in range(n): current_path = os.path.dirname(current_path) return current_path src_path = os.path.join(get_parent_dir(0),'src') sys.path.append(...
true
true
1c248f5bd6b167d0053089a920f731d8fa2c6c4a
5,054
py
Python
drapache/dbpy/execute.py
louissobel/Drapache
564aaba08ee6929043ccd68027c6b01920dbb40a
[ "MIT" ]
9
2015-03-20T05:48:37.000Z
2018-12-17T09:32:31.000Z
drapache/dbpy/execute.py
louissobel/Drapache
564aaba08ee6929043ccd68027c6b01920dbb40a
[ "MIT" ]
null
null
null
drapache/dbpy/execute.py
louissobel/Drapache
564aaba08ee6929043ccd68027c6b01920dbb40a
[ "MIT" ]
2
2018-01-28T11:23:58.000Z
2018-07-30T23:38:51.000Z
""" responsible for executing downloaded code """ import StringIO import sys import traceback import threading import trace import sandbox as pysandbox from drapache.util.http import Response from drapache import dbapi from drapache import util import builtins import environment class Timeout(Exception): pass c...
22.765766
88
0.712505
""" responsible for executing downloaded code """ import StringIO import sys import traceback import threading import trace import sandbox as pysandbox from drapache.util.http import Response from drapache import dbapi from drapache import util import builtins import environment class Timeout(Exception): pass c...
false
true
1c24900f6481b3777dad39320c94bf59e41bd902
656
py
Python
PortfolioProject/blog/migrations/0001_initial.py
anorgren/PortfolioProjectPublic
99b0dff283d952e8a0120a92c81e85c8d40fee05
[ "MIT" ]
null
null
null
PortfolioProject/blog/migrations/0001_initial.py
anorgren/PortfolioProjectPublic
99b0dff283d952e8a0120a92c81e85c8d40fee05
[ "MIT" ]
null
null
null
PortfolioProject/blog/migrations/0001_initial.py
anorgren/PortfolioProjectPublic
99b0dff283d952e8a0120a92c81e85c8d40fee05
[ "MIT" ]
null
null
null
# Generated by Django 3.0.2 on 2020-01-15 03:05 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Blog', fields=[ ('id', models.AutoField(aut...
26.24
114
0.554878
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Blog', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=Fal...
true
true
1c249035980be84d47adcf16049627eb128c9fab
19,433
py
Python
tensorflow/python/training/checkpoint_utils.py
joshz123/tensorflow
7841ca029060ab78e221e757d4b1ee6e3e0ffaa4
[ "Apache-2.0" ]
78
2020-08-04T12:36:25.000Z
2022-03-25T04:23:40.000Z
tensorflow/python/training/checkpoint_utils.py
sagol/tensorflow
04f2870814d2773e09dcfa00cbe76a66a2c4de88
[ "Apache-2.0" ]
203
2019-06-14T23:53:10.000Z
2022-02-10T02:27:23.000Z
tensorflow/python/training/checkpoint_utils.py
sagol/tensorflow
04f2870814d2773e09dcfa00cbe76a66a2c4de88
[ "Apache-2.0" ]
66
2020-05-15T10:05:12.000Z
2022-02-14T07:28:18.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
40.740042
92
0.701384
from __future__ import absolute_import from __future__ import division from __future__ import print_function import time import six from tensorflow.python.distribute import distribution_strategy_context from tensorflow.python.framework import ops from tensorflow.python.ops import io_ops from tensorflo...
true
true