hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
7907f9f16e61e6d3d77348c8c036aab74d3205b1
723
py
Python
renovation_service_provider_manager/api/__init__.py
leam-tech/renovation_service_provider_manager
353125e3d332d841495f93bf154b76f2cef75d3f
[ "MIT" ]
null
null
null
renovation_service_provider_manager/api/__init__.py
leam-tech/renovation_service_provider_manager
353125e3d332d841495f93bf154b76f2cef75d3f
[ "MIT" ]
null
null
null
renovation_service_provider_manager/api/__init__.py
leam-tech/renovation_service_provider_manager
353125e3d332d841495f93bf154b76f2cef75d3f
[ "MIT" ]
null
null
null
import frappe, re from renovation_service_provider_manager import invoke_mediator @frappe.whitelist(allow_guest=True) def get_service_provider_client_id(provider): k = f"client_id_{re.sub('[^0-9a-zA-Z]+', '_', provider.lower())}" client_id = frappe.cache().get_value(k) if client_id: return client_id clien...
31.434783
117
0.749654
import frappe, re from renovation_service_provider_manager import invoke_mediator @frappe.whitelist(allow_guest=True) def get_service_provider_client_id(provider): k = f"client_id_{re.sub('[^0-9a-zA-Z]+', '_', provider.lower())}" client_id = frappe.cache().get_value(k) if client_id: return client_id clien...
true
true
7907fafcb079d191c0e965019b8286b4c02cb7f0
2,514
py
Python
virtual/lib/python3.8/site-packages/setuptools/extern/__init__.py
ShaviyaVictor/nyumbakumi-
933d825844da139998867594c1e21b09ba5c8e63
[ "MIT" ]
3
2022-03-02T12:13:02.000Z
2022-03-02T12:38:46.000Z
virtual/lib/python3.8/site-packages/setuptools/extern/__init__.py
ShaviyaVictor/nyumbakumi-
933d825844da139998867594c1e21b09ba5c8e63
[ "MIT" ]
1
2022-03-15T12:10:47.000Z
2022-03-15T12:10:47.000Z
virtual/lib/python3.8/site-packages/setuptools/extern/__init__.py
ShaviyaVictor/nyumbakumi-
933d825844da139998867594c1e21b09ba5c8e63
[ "MIT" ]
null
null
null
import importlib.util import sys class VendorImporter: """ A PEP 302 meta path importer for finding optionally-vendored or otherwise naturally-installed packages from root_name. """ def __init__(self, root_name, vendored_names=(), vendor_pkg=None): self.root_name = root_name self....
32.649351
84
0.604614
import importlib.util import sys class VendorImporter: def __init__(self, root_name, vendored_names=(), vendor_pkg=None): self.root_name = root_name self.vendored_names = set(vendored_names) self.vendor_pkg = vendor_pkg or root_name.replace('extern', '_vendor') @property def sear...
true
true
7907fb1a03f455a7370cb9f215000397fc06da34
2,382
py
Python
python/atlassian/config-report.py
oldD0g/code-snippets
68325d63122a5bbbab68dd726ea3add096380e12
[ "CC0-1.0" ]
null
null
null
python/atlassian/config-report.py
oldD0g/code-snippets
68325d63122a5bbbab68dd726ea3add096380e12
[ "CC0-1.0" ]
null
null
null
python/atlassian/config-report.py
oldD0g/code-snippets
68325d63122a5bbbab68dd726ea3add096380e12
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python """ Object-oriented implementation of backup reporting code. Defines a class called 'Backup' that records all backups of a device """ import os, sys, argparse import glob from configparser import ConfigParser from atlassian import Confluence class Backup: def __init__(sel...
32.630137
82
0.585642
import os, sys, argparse import glob from configparser import ConfigParser from atlassian import Confluence class Backup: def __init__(self, device, backup_root): self.device = device self.root = backup_root config_pattern = "{}/*/{}".format(self.root, device) configs...
true
true
7907fb69542584c044bb901f0348ed8fd6ad0055
2,662
py
Python
nnunet/training/network_training/competitions_with_custom_Trainers/MMS/nnUNetTrainerV2_MMS.py
nasyxx/nnUNet
92d5f2352349eed278e22f7a38cb86b0fccd7c75
[ "Apache-2.0" ]
72
2020-10-30T08:55:17.000Z
2022-03-30T03:15:55.000Z
nnunet/training/network_training/competitions_with_custom_Trainers/MMS/nnUNetTrainerV2_MMS.py
nasyxx/nnUNet
92d5f2352349eed278e22f7a38cb86b0fccd7c75
[ "Apache-2.0" ]
16
2021-01-13T03:39:47.000Z
2022-03-31T21:35:32.000Z
nnunet/training/network_training/competitions_with_custom_Trainers/MMS/nnUNetTrainerV2_MMS.py
nasyxx/nnUNet
92d5f2352349eed278e22f7a38cb86b0fccd7c75
[ "Apache-2.0" ]
20
2020-10-29T20:47:28.000Z
2022-03-26T07:18:00.000Z
import torch from nnunet.network_architecture.generic_UNet import Generic_UNet from nnunet.network_architecture.initialization import InitWeights_He from nnunet.training.network_training.nnUNet_variants.data_augmentation.nnUNetTrainerV2_insaneDA import \ nnUNetTrainerV2_insaneDA from nnunet.utilities.nd_softmax imp...
43.639344
117
0.657776
import torch from nnunet.network_architecture.generic_UNet import Generic_UNet from nnunet.network_architecture.initialization import InitWeights_He from nnunet.training.network_training.nnUNet_variants.data_augmentation.nnUNetTrainerV2_insaneDA import \ nnUNetTrainerV2_insaneDA from nnunet.utilities.nd_softmax imp...
true
true
7907fb94af616116405a175738be8418ab426188
1,294
py
Python
7.py
Nikolas-01/Lesson_7
dfbc8306bf9858b85253e5bf2066bb147b93ece0
[ "MIT" ]
null
null
null
7.py
Nikolas-01/Lesson_7
dfbc8306bf9858b85253e5bf2066bb147b93ece0
[ "MIT" ]
null
null
null
7.py
Nikolas-01/Lesson_7
dfbc8306bf9858b85253e5bf2066bb147b93ece0
[ "MIT" ]
null
null
null
from docxtpl import DocxTemplate import csv import json import random #случайный авто with open('Car_info.txt') as file: car_rand = [] reader = csv.reader(file) for row in file: car_rand.append(row) report_car = car_rand[random.randint(0, len(car_rand)-1)] car_info = report_car.split() #О авто def g...
30.809524
70
0.665379
from docxtpl import DocxTemplate import csv import json import random with open('Car_info.txt') as file: car_rand = [] reader = csv.reader(file) for row in file: car_rand.append(row) report_car = car_rand[random.randint(0, len(car_rand)-1)] car_info = report_car.split() def get_data (Brand, Model,...
true
true
7907fb9f3bf5ec2da1ef4ed0d8d5e4c7860ac719
1,228
py
Python
examples/undocumented/python/structure_discrete_hmsvm_bmrm.py
gf712/shogun
ca2afb8f092288455701539aa58952dbf6743378
[ "BSD-3-Clause" ]
2,753
2015-01-02T11:34:13.000Z
2022-03-25T07:04:27.000Z
examples/undocumented/python/structure_discrete_hmsvm_bmrm.py
gf712/shogun
ca2afb8f092288455701539aa58952dbf6743378
[ "BSD-3-Clause" ]
2,404
2015-01-02T19:31:41.000Z
2022-03-09T10:58:22.000Z
examples/undocumented/python/structure_discrete_hmsvm_bmrm.py
gf712/shogun
ca2afb8f092288455701539aa58952dbf6743378
[ "BSD-3-Clause" ]
1,156
2015-01-03T01:57:21.000Z
2022-03-26T01:06:28.000Z
#!/usr/bin/env python import numpy import scipy from scipy import io data_dict = scipy.io.loadmat('../data/hmsvm_data_large_integer.mat', struct_as_record=False) parameter_list=[[data_dict]] def structure_discrete_hmsvm_bmrm (m_data_dict=data_dict): import shogun as sg try: _ = sg.create_machine("DualLibQPBMSO...
27.909091
92
0.754886
import numpy import scipy from scipy import io data_dict = scipy.io.loadmat('../data/hmsvm_data_large_integer.mat', struct_as_record=False) parameter_list=[[data_dict]] def structure_discrete_hmsvm_bmrm (m_data_dict=data_dict): import shogun as sg try: _ = sg.create_machine("DualLibQPBMSOSVM") except: prin...
true
true
7907fc90c49114bc8b1bda121717a23b62b78812
5,390
py
Python
topi/python/topi/cuda/conv2d_hwcn.py
peterjc123/tvm
d6dcd6c56febfbb12efe67884c188f045f435893
[ "Apache-2.0" ]
48
2020-07-29T18:09:23.000Z
2021-10-09T01:53:33.000Z
topi/python/topi/cuda/conv2d_hwcn.py
peterjc123/tvm
d6dcd6c56febfbb12efe67884c188f045f435893
[ "Apache-2.0" ]
9
2021-04-02T02:28:07.000Z
2022-03-26T18:23:59.000Z
Fujitsu/benchmarks/resnet/implementations/implementation_open/mxnet/3rdparty/tvm/topi/python/topi/cuda/conv2d_hwcn.py
lablup/training_results_v0.7
f5bb59aa0f8b18b602763abe47d1d24d0d54b197
[ "Apache-2.0" ]
42
2020-08-01T06:41:24.000Z
2022-01-20T10:33:08.000Z
# 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 u...
37.957746
79
0.601299
import tvm from .. import tag def schedule_conv2d_hwcn(outs): outs = [outs] if isinstance(outs, tvm.tensor.Tensor) else outs sch = tvm.create_schedule([x.op for x in outs]) def schedule(Apad, W, B): sch[Apad].compute_inline() AA = sch.cache_read(Apad, "shared", [B]) ...
true
true
7907fcd9d8b5f016e33c1b2eeafd3a39be62d79e
3,299
py
Python
data/make_hdf5_files.py
pisalore/pointnet_shrec17-classificator
4c2288d16b953f466967a3deb569bba059a156f8
[ "MIT" ]
3
2019-11-13T09:16:47.000Z
2021-02-17T08:48:48.000Z
data/make_hdf5_files.py
pisalore/pointnet_shrec17-classificator
4c2288d16b953f466967a3deb569bba059a156f8
[ "MIT" ]
null
null
null
data/make_hdf5_files.py
pisalore/pointnet_shrec17-classificator
4c2288d16b953f466967a3deb569bba059a156f8
[ "MIT" ]
null
null
null
import h5py import numpy as np import os from plyfile import PlyData, PlyElement HDF5_DATA = 'hdf5_data' print('Generating .h5 files...', '\n') if not os.path.exists(HDF5_DATA): os.mkdir(HDF5_DATA) filenames_training = [line.rstrip() for line in open("filelist_training.txt", 'r')] filenames_testing = [line.rstr...
41.759494
113
0.631403
import h5py import numpy as np import os from plyfile import PlyData, PlyElement HDF5_DATA = 'hdf5_data' print('Generating .h5 files...', '\n') if not os.path.exists(HDF5_DATA): os.mkdir(HDF5_DATA) filenames_training = [line.rstrip() for line in open("filelist_training.txt", 'r')] filenames_testing = [line.rstr...
true
true
7907fd6c2e4e2f3c44e4478178b44dc4ccb98a8e
1,390
py
Python
tareas/3/ManzanaresJorge-SalazarJesus/spn.py
jorgelmp/sistop-2022-1
5c3b7e5215247533446aa006affe6cc64a48d989
[ "CC-BY-4.0" ]
6
2021-08-30T19:11:57.000Z
2021-09-05T01:30:59.000Z
tareas/3/ManzanaresJorge-SalazarJesus/spn.py
jorgelmp/sistop-2022-1
5c3b7e5215247533446aa006affe6cc64a48d989
[ "CC-BY-4.0" ]
13
2021-09-07T22:24:47.000Z
2021-11-23T05:26:38.000Z
tareas/3/ManzanaresJorge-SalazarJesus/spn.py
jorgelmp/sistop-2022-1
5c3b7e5215247533446aa006affe6cc64a48d989
[ "CC-BY-4.0" ]
33
2021-09-01T00:44:27.000Z
2022-02-09T06:17:55.000Z
from scheduler import Scheduler from collections import deque class Spn(Scheduler): name = "Shortest Process Next (SPN)" ejecutados = [] ejecutados_visual = "" def __init__(self,procesos=[]): self.spn_queue = deque() self.t = procesos[0].arrvl_time self.procesos = procesos ...
32.325581
57
0.539568
from scheduler import Scheduler from collections import deque class Spn(Scheduler): name = "Shortest Process Next (SPN)" ejecutados = [] ejecutados_visual = "" def __init__(self,procesos=[]): self.spn_queue = deque() self.t = procesos[0].arrvl_time self.procesos = procesos ...
true
true
7907fdd7386241163ed033444bcaddf34a68b930
5,414
py
Python
tests/test_visualizer.py
bjtuyxc/detectron2
ebb9f8c9166765c508f8ac53d9ed2004739b28d1
[ "Apache-2.0" ]
null
null
null
tests/test_visualizer.py
bjtuyxc/detectron2
ebb9f8c9166765c508f8ac53d9ed2004739b28d1
[ "Apache-2.0" ]
null
null
null
tests/test_visualizer.py
bjtuyxc/detectron2
ebb9f8c9166765c508f8ac53d9ed2004739b28d1
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # File: import numpy as np import unittest import torch from detectron2.data import MetadataCatalog from detectron2.structures import Instances, RotatedBoxes, BoxMode from detectron2.utils.visualizer import Visualizer cla...
40.402985
96
0.602143
import numpy as np import unittest import torch from detectron2.data import MetadataCatalog from detectron2.structures import Instances, RotatedBoxes, BoxMode from detectron2.utils.visualizer import Visualizer class TestVisualizer(unittest.TestCase): def _random_data(self): H, W = 100, 100 N ...
true
true
7907fdda48e28d327e2b86a5e1a99f1449f54f4a
1,778
py
Python
Scripts/mybar.py
jovanzac/Captain
3e410aa22eec4f72274b9bf4f0f2b3c91936356d
[ "MIT" ]
null
null
null
Scripts/mybar.py
jovanzac/Captain
3e410aa22eec4f72274b9bf4f0f2b3c91936356d
[ "MIT" ]
null
null
null
Scripts/mybar.py
jovanzac/Captain
3e410aa22eec4f72274b9bf4f0f2b3c91936356d
[ "MIT" ]
1
2020-12-25T08:21:37.000Z
2020-12-25T08:21:37.000Z
import tkinter as tk from PIL import Image, ImageTk # The Custom Variable Widgets class MyBar(tk.Canvas) : def __init__(self, master:object, shape:object, value=0, maximum=100, bg="#231303", trough_color='#8a7852', bar_color='#f7f4bf'): """Creating the alpha mask and creating a custom wid...
40.409091
120
0.644544
import tkinter as tk from PIL import Image, ImageTk class MyBar(tk.Canvas) : def __init__(self, master:object, shape:object, value=0, maximum=100, bg="#231303", trough_color='#8a7852', bar_color='#f7f4bf'): im_shape_alpha = Image.open(shape).convert('L') im_shap...
true
true
7907fed5bbfcfa6e7035b885995f9b21d8943f56
610
py
Python
v_python/fixture/admin_catalog.py
spcartman/selenium_full_course
673f25dcf2340c0c14666c7a91f774fd7659f0b1
[ "MIT" ]
null
null
null
v_python/fixture/admin_catalog.py
spcartman/selenium_full_course
673f25dcf2340c0c14666c7a91f774fd7659f0b1
[ "MIT" ]
null
null
null
v_python/fixture/admin_catalog.py
spcartman/selenium_full_course
673f25dcf2340c0c14666c7a91f774fd7659f0b1
[ "MIT" ]
null
null
null
class AdminCatalogHelper: def __init__(self, app): self.app = app def go_though_each_product_and_print_browser_log(self): for i in range(len(self.app.wd.find_elements_by_css_selector('.dataTable td:nth-of-type(3) a[href*="&product_id="]'))): self.app.wd.find_elements_by_css_selecto...
50.833333
127
0.678689
class AdminCatalogHelper: def __init__(self, app): self.app = app def go_though_each_product_and_print_browser_log(self): for i in range(len(self.app.wd.find_elements_by_css_selector('.dataTable td:nth-of-type(3) a[href*="&product_id="]'))): self.app.wd.find_elements_by_css_selecto...
true
true
7907fee4677a36aa4ecc2aa9a88cbdfe69077ec6
687
py
Python
setup.py
arthurcgusmao/py-mcc-f1
d1b7cb856fbf03faad6a9eeeaea08da049c603c0
[ "MIT" ]
7
2020-10-26T21:33:40.000Z
2022-02-14T10:56:06.000Z
setup.py
arthurcgusmao/py-mcc-f1
d1b7cb856fbf03faad6a9eeeaea08da049c603c0
[ "MIT" ]
1
2022-02-13T19:17:15.000Z
2022-02-13T19:17:15.000Z
setup.py
arthurcgusmao/py-mcc-f1
d1b7cb856fbf03faad6a9eeeaea08da049c603c0
[ "MIT" ]
1
2022-02-14T10:56:08.000Z
2022-02-14T10:56:08.000Z
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="py-mcc-f1", version="0.1.0", author="Arthur Colombini Gusmão", description="MCC-F1 Curve", long_description=long_description, long_description_content_type="text/markdown", url="ht...
26.423077
53
0.630277
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="py-mcc-f1", version="0.1.0", author="Arthur Colombini Gusmão", description="MCC-F1 Curve", long_description=long_description, long_description_content_type="text/markdown", url="ht...
true
true
7907ffa028fa0010a06fc93cf03a76362f49f5c9
1,127
py
Python
udemy-data-structures-and-algorithms/15-recursion/15.8_string_permutation.py
washimimizuku/python-data-structures-and-algorithms
537f4eabaf31888ae48004d153088fb28bb684ab
[ "MIT" ]
null
null
null
udemy-data-structures-and-algorithms/15-recursion/15.8_string_permutation.py
washimimizuku/python-data-structures-and-algorithms
537f4eabaf31888ae48004d153088fb28bb684ab
[ "MIT" ]
null
null
null
udemy-data-structures-and-algorithms/15-recursion/15.8_string_permutation.py
washimimizuku/python-data-structures-and-algorithms
537f4eabaf31888ae48004d153088fb28bb684ab
[ "MIT" ]
null
null
null
''' Given a string, write a function that uses recursion to output a list of all the possible permutations of that string. For example, given s='abc' the function should return ['abc', 'acb', 'bac', 'bca', 'cab', 'cba'] Note: If a character is repeated, treat each occurence as distinct, for example an input of 'xxx' ...
23
96
0.573203
from nose.tools import assert_equal def permute(s): out = [] if (len(s) == 1): out = [s] else: for i, let in enumerate(s): for perm in permute(s[:i] + s[i + 1:]): out += [let + perm] return out class TestPe...
true
true
7908015094df0f7d24b375510cc3e85e33122519
11,743
py
Python
PNet/train_pnet.py
mangye16/ReID-Label-Noise
89aa11f68c275a0bcff232d9a5c3ae152c9276af
[ "MIT" ]
11
2020-04-03T09:01:36.000Z
2022-03-11T08:12:16.000Z
PNet/train_pnet.py
mangye16/ReID-Label-Noise
89aa11f68c275a0bcff232d9a5c3ae152c9276af
[ "MIT" ]
null
null
null
PNet/train_pnet.py
mangye16/ReID-Label-Noise
89aa11f68c275a0bcff232d9a5c3ae152c9276af
[ "MIT" ]
3
2020-12-18T11:53:05.000Z
2022-01-12T16:35:45.000Z
# -*- coding: UTF-8 -*- from __future__ import print_function, division import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.optim import lr_scheduler from torch.autograd import Variable from torchvision import datasets, models, transforms from tensorboardX import ...
38.755776
154
0.664311
from __future__ import print_function, division import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.optim import lr_scheduler from torch.autograd import Variable from torchvision import datasets, models, transforms from tensorboardX import SummaryWriter import s...
true
true
79080274d654c3494c58716d1acbc6511f150845
2,436
py
Python
tools/mo/openvino/tools/mo/front/kaldi/extractors/tdnncomponent_ext.py
ryanloney/openvino-1
4e0a740eb3ee31062ba0df88fcf438564f67edb7
[ "Apache-2.0" ]
1,127
2018-10-15T14:36:58.000Z
2020-04-20T09:29:44.000Z
tools/mo/openvino/tools/mo/front/kaldi/extractors/tdnncomponent_ext.py
ryanloney/openvino-1
4e0a740eb3ee31062ba0df88fcf438564f67edb7
[ "Apache-2.0" ]
439
2018-10-20T04:40:35.000Z
2020-04-19T05:56:25.000Z
tools/mo/openvino/tools/mo/front/kaldi/extractors/tdnncomponent_ext.py
ryanloney/openvino-1
4e0a740eb3ee31062ba0df88fcf438564f67edb7
[ "Apache-2.0" ]
414
2018-10-17T05:53:46.000Z
2020-04-16T17:29:53.000Z
# Copyright (C) 2018-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import numpy as np from openvino.tools.mo.front.common.partial_infer.utils import mo_array from openvino.tools.mo.front.extractor import FrontExtractorOp from openvino.tools.mo.front.kaldi.loader.utils import read_binary_bool_token, rea...
40.6
130
0.719212
import numpy as np from openvino.tools.mo.front.common.partial_infer.utils import mo_array from openvino.tools.mo.front.extractor import FrontExtractorOp from openvino.tools.mo.front.kaldi.loader.utils import read_binary_bool_token, read_binary_integer32_token, collect_until_token, \ read_binary_float_token fro...
true
true
790802f077454ad281ac4d77e36901e0b7c8bf8b
70,452
py
Python
rasa/nlu/classifiers/diet_classifier.py
mukulbalodi/rasa
3126ef1148c165f2402f3c7203138d429e46c68c
[ "Apache-2.0" ]
null
null
null
rasa/nlu/classifiers/diet_classifier.py
mukulbalodi/rasa
3126ef1148c165f2402f3c7203138d429e46c68c
[ "Apache-2.0" ]
null
null
null
rasa/nlu/classifiers/diet_classifier.py
mukulbalodi/rasa
3126ef1148c165f2402f3c7203138d429e46c68c
[ "Apache-2.0" ]
1
2022-02-22T12:35:19.000Z
2022-02-22T12:35:19.000Z
from __future__ import annotations import copy import logging from collections import defaultdict from pathlib import Path from rasa.nlu.featurizers.featurizer import Featurizer import numpy as np import scipy.sparse import tensorflow as tf from typing import Any, Dict, List, Optional, Text, Tuple, Union, Type from ...
38.309951
88
0.625901
from __future__ import annotations import copy import logging from collections import defaultdict from pathlib import Path from rasa.nlu.featurizers.featurizer import Featurizer import numpy as np import scipy.sparse import tensorflow as tf from typing import Any, Dict, List, Optional, Text, Tuple, Union, Type from ...
true
true
79080353a2b4abcea79550828a093d0dd73b34c5
2,964
py
Python
src/imagedata/transports/abstracttransport.py
erling6232/imagedata
69226b317ff43eb52ed48503582e5770bcb47ec4
[ "MIT" ]
1
2021-09-02T07:20:19.000Z
2021-09-02T07:20:19.000Z
src/imagedata/transports/abstracttransport.py
erling6232/imagedata
69226b317ff43eb52ed48503582e5770bcb47ec4
[ "MIT" ]
3
2018-02-28T09:54:21.000Z
2022-03-22T10:05:39.000Z
src/imagedata/transports/abstracttransport.py
erling6232/imagedata
69226b317ff43eb52ed48503582e5770bcb47ec4
[ "MIT" ]
null
null
null
"""Abstract class for image transports. Defines generic functions. """ # Copyright (c) 2018 Erling Andersen, Haukeland University Hospital, Bergen, Norway from abc import ABCMeta, abstractmethod # , abstractproperty # import imagedata.transports class NoOtherInstance(Exception): pass class AbstractTransport...
23.52381
83
0.592105
from abc import ABCMeta, abstractmethod class NoOtherInstance(Exception): pass class AbstractTransport(object, metaclass=ABCMeta): plugin_type = 'transport' def __init__(self, name, description, authors, version, url, schemes): object.__init__(self) self.__name = name sel...
true
true
790803d1ca6e878f6c564a575b45f035b7ac69cb
4,789
py
Python
tests/pools/test_wallet_pool_store.py
duderino999/ceres-combineharvester
f63ab6c4d0e33c3b6550c1f5641f28ab2c68b001
[ "Apache-2.0" ]
39
2021-08-04T14:49:27.000Z
2022-03-29T16:30:19.000Z
tests/pools/test_wallet_pool_store.py
rickguo216/ceres-combineharvester
e93b26a77b1fc4fe9de80d10f745b09a13f9c288
[ "Apache-2.0" ]
30
2021-08-19T22:44:31.000Z
2022-03-29T19:09:26.000Z
tests/pools/test_wallet_pool_store.py
rickguo216/ceres-combineharvester
e93b26a77b1fc4fe9de80d10f745b09a13f9c288
[ "Apache-2.0" ]
23
2021-08-07T07:33:20.000Z
2022-03-27T11:15:00.000Z
import asyncio from pathlib import Path from secrets import token_bytes from typing import Optional import aiosqlite import pytest from clvm_tools import binutils from ceres.types.blockchain_format.coin import Coin from ceres.types.blockchain_format.program import Program, SerializedProgram from ceres.types.blockchai...
36.557252
93
0.640426
import asyncio from pathlib import Path from secrets import token_bytes from typing import Optional import aiosqlite import pytest from clvm_tools import binutils from ceres.types.blockchain_format.coin import Coin from ceres.types.blockchain_format.program import Program, SerializedProgram from ceres.types.blockchai...
true
true
7908048c54c17fc631ebe3c58b705e6febe60f67
5,593
py
Python
google-cloud-sdk/lib/googlecloudsdk/command_lib/crash_handling.py
bopopescu/searchparty
afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6
[ "Apache-2.0" ]
null
null
null
google-cloud-sdk/lib/googlecloudsdk/command_lib/crash_handling.py
bopopescu/searchparty
afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6
[ "Apache-2.0" ]
null
null
null
google-cloud-sdk/lib/googlecloudsdk/command_lib/crash_handling.py
bopopescu/searchparty
afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6
[ "Apache-2.0" ]
3
2017-07-27T18:44:13.000Z
2020-07-25T17:48:53.000Z
# Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
37.039735
79
0.734311
import sys import traceback from apitools.base.py import exceptions as apitools_exceptions from googlecloudsdk.api_lib.error_reporting import util from googlecloudsdk.api_lib.util import apis as core_apis from googlecloudsdk.calliope import backend from googlecloudsdk.command_lib import error_reporting_...
true
true
790804b88401ab86c218f1bb24640bb1070e042d
353,326
py
Python
src/sage/graphs/graph.py
cffbots/sage
226937dfa9b8b335e873c3c65a796ae1b0924ff2
[ "BSL-1.0" ]
null
null
null
src/sage/graphs/graph.py
cffbots/sage
226937dfa9b8b335e873c3c65a796ae1b0924ff2
[ "BSL-1.0" ]
null
null
null
src/sage/graphs/graph.py
cffbots/sage
226937dfa9b8b335e873c3c65a796ae1b0924ff2
[ "BSL-1.0" ]
null
null
null
# -*- coding: utf-8 -*- r""" Undirected graphs This module implements functions and operations involving undirected graphs. {INDEX_OF_METHODS} AUTHORS: - Robert L. Miller (2006-10-22): initial version - William Stein (2006-12-05): Editing - Robert L. Miller (2007-01-13): refactoring, adjusting for NetworkX-0.33, ...
37.325798
157
0.553028
import itertools from copy import copy from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.rings.integer import Integer from sage.rings.integer_ring import ZZ import sage.graphs.generic_graph_pyx as generic_graph_pyx from sage.graphs.generic_graph import GenericGraph fro...
true
true
790804c1eadbae957866f5c47caf26a4baebcb69
2,111
py
Python
integration_tests/test_update_ranges.py
FlexiGroBots-H2020/datacube-ows
8e3e1343582c00ae46b498247ac98d8e98bd000f
[ "Apache-2.0" ]
4
2017-11-02T04:22:30.000Z
2018-05-01T14:16:23.000Z
integration_tests/test_update_ranges.py
FlexiGroBots-H2020/datacube-ows
8e3e1343582c00ae46b498247ac98d8e98bd000f
[ "Apache-2.0" ]
33
2018-05-23T01:32:06.000Z
2018-11-05T01:07:09.000Z
integration_tests/test_update_ranges.py
FlexiGroBots-H2020/datacube-ows
8e3e1343582c00ae46b498247ac98d8e98bd000f
[ "Apache-2.0" ]
7
2017-10-09T00:09:44.000Z
2018-07-27T00:41:19.000Z
# This file is part of datacube-ows, part of the Open Data Cube project. # See https://opendatacube.org for more information. # # Copyright (c) 2017-2021 OWS Contributors # SPDX-License-Identifier: Apache-2.0 """Test update ranges on DB using Click testing https://click.palletsprojects.com/en/7.x/testing/ """ from data...
32.476923
85
0.721933
from datacube_ows.update_ranges_impl import main def test_updates_ranges_schema(runner, role_name): result = runner.invoke(main, ["--schema", "--role", role_name]) assert "Cannot find SQL resource" not in result.output assert result.exit_code == 0 def test_update_ranges_views(runner): result = ...
true
true
790804e9fda8749313f013440a5d152a18eb296b
397
py
Python
tests/test_calvestbr.py
IsaacHiguchi/calvestbr
ebf702e9e67299c822a6cc21cad60b247446fcfa
[ "MIT" ]
null
null
null
tests/test_calvestbr.py
IsaacHiguchi/calvestbr
ebf702e9e67299c822a6cc21cad60b247446fcfa
[ "MIT" ]
null
null
null
tests/test_calvestbr.py
IsaacHiguchi/calvestbr
ebf702e9e67299c822a6cc21cad60b247446fcfa
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Tests for `calvestbr` package.""" import unittest from calvestbr import calvestbr class TestCalvestbr(unittest.TestCase): """Tests for `calvestbr` package.""" def setUp(self): """Set up test fixtures, if any.""" def tearDown(self): """Tear down test fixtures,...
18.045455
46
0.632242
import unittest from calvestbr import calvestbr class TestCalvestbr(unittest.TestCase): def setUp(self): def tearDown(self): def test_000_something(self):
true
true
790804f388e72af2f2b67453edb3a003c8e8aa74
576
py
Python
test/rules/test_fires_child.py
rileyhazard/SmartVA-Analyze-1
0573eeff27d03f54e7506db4f1631c0cd9f54bbb
[ "MIT" ]
4
2019-01-23T12:57:47.000Z
2020-04-18T17:13:08.000Z
test/rules/test_fires_child.py
rileyhazard/SmartVA-Analyze-1
0573eeff27d03f54e7506db4f1631c0cd9f54bbb
[ "MIT" ]
4
2019-01-09T22:10:07.000Z
2022-02-16T04:57:06.000Z
test/rules/test_fires_child.py
rileyhazard/SmartVA-Analyze-1
0573eeff27d03f54e7506db4f1631c0cd9f54bbb
[ "MIT" ]
11
2018-12-11T22:01:13.000Z
2022-01-07T11:38:02.000Z
from smartva.rules import fires_child as fires from smartva.data.constants import * VA = Child def test_pass(): row = { VA.BURN: YES, VA.INJURY_DAYS: 0, } assert fires.logic_rule(row) is True def test_fail_fires(): row = { VA.BURN: NO, VA.INJURY_DAYS: 0, } ...
15.157895
46
0.604167
from smartva.rules import fires_child as fires from smartva.data.constants import * VA = Child def test_pass(): row = { VA.BURN: YES, VA.INJURY_DAYS: 0, } assert fires.logic_rule(row) is True def test_fail_fires(): row = { VA.BURN: NO, VA.INJURY_DAYS: 0, } ...
true
true
79080530baf43a4ccb2acf223fe275c811cda025
8,136
py
Python
myvenv/lib/python3.5/site-packages/psycopg2/pool.py
tuvapp/tuvappcom
5ca2be19f4b0c86a1d4a9553711a4da9d3f32841
[ "MIT" ]
1
2019-01-10T16:43:38.000Z
2019-01-10T16:43:38.000Z
myvenv/lib/python3.5/site-packages/psycopg2/pool.py
tuvapp/tuvappcom
5ca2be19f4b0c86a1d4a9553711a4da9d3f32841
[ "MIT" ]
7
2020-06-05T18:33:09.000Z
2021-09-20T23:07:52.000Z
myvenv/lib/python3.5/site-packages/psycopg2/pool.py
tuvapp/tuvappcom
5ca2be19f4b0c86a1d4a9553711a4da9d3f32841
[ "MIT" ]
null
null
null
"""Connection pooling for psycopg2 This module implements thread-safe (and not) connection pools. """ # psycopg/pool.py - pooling code for psycopg # # Copyright (C) 2003-2010 Federico Di Gregorio <fog@debian.org> # # psycopg2 is free software: you can redistribute it and/or modify it # under the terms of the GNU Less...
34.474576
78
0.615044
import psycopg2 import psycopg2.extensions as _ext class PoolError(psycopg2.Error): pass class AbstractConnectionPool(object): def __init__(self, minconn, maxconn, *args, **kwargs): self.minconn = int(minconn) self.maxconn = int(maxconn) self.closed = False ...
true
true
79080633244efcc19454c598305cafbf94d51929
35,911
py
Python
vertica_python/vertica/connection.py
uber/vertica-python
bd28d2dc473a017daa92933f7864bab7346f8b14
[ "Apache-2.0" ]
183
2015-01-20T14:57:22.000Z
2018-08-09T21:13:19.000Z
vertica_python/vertica/connection.py
uber/vertica-python
bd28d2dc473a017daa92933f7864bab7346f8b14
[ "Apache-2.0" ]
139
2015-01-09T18:37:53.000Z
2018-08-13T07:09:26.000Z
vertica_python/vertica/connection.py
uber/vertica-python
bd28d2dc473a017daa92933f7864bab7346f8b14
[ "Apache-2.0" ]
110
2015-03-02T15:46:11.000Z
2018-07-27T15:50:29.000Z
# Copyright (c) 2018-2022 Micro Focus or one of its affiliates. # Copyright (c) 2018 Uber Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licen...
42.904421
124
0.599649
from __future__ import print_function, division, absolute_import import base64 import logging import socket import ssl import getpass import uuid from struct import unpack from collections import deque, namedtuple import random from six import raise_from, string_types, integer_typ...
true
true
790806fc7e64af17b5a7f763354c486df50043d9
6,142
py
Python
src/dev/arm/css/Scmi.py
fei-shan/gem5-experiment
70781db30d42b1fe50e495bd04f7755a4b0e0e59
[ "BSD-3-Clause" ]
2
2021-01-15T17:32:18.000Z
2021-12-21T02:53:58.000Z
src/dev/arm/css/Scmi.py
fei-shan/gem5-experiment
70781db30d42b1fe50e495bd04f7755a4b0e0e59
[ "BSD-3-Clause" ]
3
2021-03-26T20:33:59.000Z
2022-01-24T22:54:03.000Z
src/dev/arm/css/Scmi.py
fei-shan/gem5-experiment
70781db30d42b1fe50e495bd04f7755a4b0e0e59
[ "BSD-3-Clause" ]
3
2021-03-27T16:36:19.000Z
2022-03-28T18:32:57.000Z
# Copyright (c) 2020 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 functionality ...
40.143791
79
0.712146
from m5.params import * from m5.proxy import * from m5.objects.Scp import Scp from m5.objects.Doorbell import Doorbell from m5.util.fdthelper import * from m5.SimObject import SimObject class ScmiChannel(SimObject): type = 'ScmiChannel' cxx_header = "dev/arm/css/scmi_platform...
true
true
790809721ce85f4566e4aa149b960fd755db4dae
6,842
py
Python
indico/core/cache.py
errikos/indico
72b75d63a896e5defb8e9acf64fe147748c7ccce
[ "MIT" ]
null
null
null
indico/core/cache.py
errikos/indico
72b75d63a896e5defb8e9acf64fe147748c7ccce
[ "MIT" ]
null
null
null
indico/core/cache.py
errikos/indico
72b75d63a896e5defb8e9acf64fe147748c7ccce
[ "MIT" ]
null
null
null
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from flask_caching import Cache from flask_caching.backends.rediscache import RedisCache from flask_cachin...
31.971963
83
0.653464
from flask_caching import Cache from flask_caching.backends.rediscache import RedisCache from flask_caching.backends.simplecache import SimpleCache from redis import RedisError from indico.core.logger import Logger _logger = Logger.get('cache') class CachedNone: __slots__ = () @classmethod def ...
true
true
79080ab85c70df8806700fcfe98355dc711038da
2,184
py
Python
lib/surface/service_management/operations/describe.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
lib/surface/service_management/operations/describe.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
lib/surface/service_management/operations/describe.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
33.6
78
0.708333
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from googlecloudsdk.calliope import base from googlecloudsdk.command_lib.endpoints import common_flags _ERROR = ('The `service-management operations describe` command has been ' 're...
true
true
79080c9dea72eb3be5c8bd55f7e41768a8ebb07d
11,319
py
Python
packages/python/plotly/plotly/validators/volume/_colorbar.py
adehad/plotly.py
bca292530c400c61e8b7f8a6571262a9dde43ee3
[ "MIT" ]
7
2021-09-29T09:46:36.000Z
2022-03-24T08:30:41.000Z
packages/python/plotly/plotly/validators/volume/_colorbar.py
adehad/plotly.py
bca292530c400c61e8b7f8a6571262a9dde43ee3
[ "MIT" ]
1
2021-09-30T16:56:21.000Z
2021-10-15T09:14:12.000Z
packages/python/plotly/plotly/validators/volume/_colorbar.py
adehad/plotly.py
bca292530c400c61e8b7f8a6571262a9dde43ee3
[ "MIT" ]
1
2021-09-29T22:34:05.000Z
2021-09-29T22:34:05.000Z
import _plotly_utils.basevalidators class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="volume", **kwargs): super(ColorbarValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
47.359833
79
0.526372
import _plotly_utils.basevalidators class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="volume", **kwargs): super(ColorbarValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
true
true
79080d194f59b7ebce045ab3e3d262ca948d9391
22,561
py
Python
tensorflow/contrib/linalg/python/ops/linear_operator_kronecker.py
tucaiyong/tensorflow
3cc3c87f375f1bc292bd58db4928b810ac888bc6
[ "Apache-2.0" ]
5
2018-09-22T20:16:46.000Z
2022-02-28T10:35:19.000Z
tensorflow/contrib/linalg/python/ops/linear_operator_kronecker.py
tucaiyong/tensorflow
3cc3c87f375f1bc292bd58db4928b810ac888bc6
[ "Apache-2.0" ]
10
2018-02-04T18:41:52.000Z
2018-05-02T09:00:46.000Z
tensorflow/contrib/linalg/python/ops/linear_operator_kronecker.py
tucaiyong/tensorflow
3cc3c87f375f1bc292bd58db4928b810ac888bc6
[ "Apache-2.0" ]
4
2018-01-17T14:22:49.000Z
2018-02-27T15:06:41.000Z
# Copyright 2018 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.215686
80
0.673685
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.framework import common_shapes from tensorflow.python.framework import errors from tensorflow.python.framework import ops from tensorflow.python.framework import tensor_sha...
true
true
79080d455b977e90b4d287d5c1fbf40379286d55
1,431
py
Python
dajare_detector/featurize/make_decide_kana_feature.py
vaaaaanquish/dajare-detector
e8f2d6c861dc0e03b6bc38ba64463bf95376f949
[ "MIT" ]
14
2020-12-11T01:42:53.000Z
2021-06-22T06:14:03.000Z
dajare_detector/featurize/make_decide_kana_feature.py
vaaaaanquish/dajare-detector
e8f2d6c861dc0e03b6bc38ba64463bf95376f949
[ "MIT" ]
null
null
null
dajare_detector/featurize/make_decide_kana_feature.py
vaaaaanquish/dajare-detector
e8f2d6c861dc0e03b6bc38ba64463bf95376f949
[ "MIT" ]
null
null
null
from logging import getLogger import gokart import luigi import swifter # noqa from dajare_detector.utils.base_task import DajareTask from dajare_detector.preprocessing.make_kana_pattern import MakeKanaPattern from dajare_detector.preprocessing.make_splited_pattern import MakeSplitedPattern from dajare_detector.prep...
39.75
85
0.715584
from logging import getLogger import gokart import luigi import swifter from dajare_detector.utils.base_task import DajareTask from dajare_detector.preprocessing.make_kana_pattern import MakeKanaPattern from dajare_detector.preprocessing.make_splited_pattern import MakeSplitedPattern from dajare_detector.preprocess...
true
true
79080dd0aea28217f017a0122279bc4a555f92ba
7,766
py
Python
analysis/opensimulator-stats-analyzer/src/osta/osta.py
second-life/opensimulator-tools
0a0bee66dee0fc93fd0b2dd5043675dc9ec305f1
[ "BSD-3-Clause-Clear" ]
11
2016-01-05T14:25:18.000Z
2022-01-08T07:45:09.000Z
analysis/opensimulator-stats-analyzer/src/osta/osta.py
ConnectionMaster/opensimulator-tools
0a0bee66dee0fc93fd0b2dd5043675dc9ec305f1
[ "BSD-3-Clause-Clear" ]
1
2021-05-30T07:54:55.000Z
2021-12-26T02:26:51.000Z
analysis/opensimulator-stats-analyzer/src/osta/osta.py
ConnectionMaster/opensimulator-tools
0a0bee66dee0fc93fd0b2dd5043675dc9ec305f1
[ "BSD-3-Clause-Clear" ]
14
2016-04-13T01:15:54.000Z
2021-01-07T19:50:14.000Z
import argparse import collections import fnmatch import os.path import pprint import re import sys ####################### ### OSimStatsHelper ### ####################### class OSimStatsHelper: """Takes a list of stats and returns a stat containing their summation by each sample.""" @staticmethod def sumS...
38.068627
109
0.425573
import argparse import collections import fnmatch import os.path import pprint import re import sys .sumStatsToValues(stats, 'abs') if 'delta' in stats[0]: totalStat['delta'] = { 'units' : stats[0]['delta']['units'] } totalStat['delta']['values'] = OSimStatsHelper.sumS...
false
true
79080edfb9a52d85dbd60d7c0e19866dcde15e5c
2,446
py
Python
traffic_monitor/services/detectors/detector_cvlib.py
mcdomx/monitor
55082a3ea985224b819e4e2b7e13f44e70ac0b74
[ "MIT" ]
1
2020-09-23T14:36:30.000Z
2020-09-23T14:36:30.000Z
traffic_monitor/services/detectors/detector_cvlib.py
mcdomx/monitor
55082a3ea985224b819e4e2b7e13f44e70ac0b74
[ "MIT" ]
3
2021-09-08T02:32:20.000Z
2022-03-12T00:49:29.000Z
traffic_monitor/services/detectors/detector_cvlib.py
mcdomx/monitor
55082a3ea985224b819e4e2b7e13f44e70ac0b74
[ "MIT" ]
null
null
null
import logging import numpy as np from cvlib.object_detection import populate_class_labels, draw_bbox, detect_common_objects from traffic_monitor.services.detectors.detector_abstract import DetectorAbstract logger = logging.getLogger('detector') class DetectorCVlib(DetectorAbstract): """ Implementation of ...
41.457627
125
0.674571
import logging import numpy as np from cvlib.object_detection import populate_class_labels, draw_bbox, detect_common_objects from traffic_monitor.services.detectors.detector_abstract import DetectorAbstract logger = logging.getLogger('detector') class DetectorCVlib(DetectorAbstract): def __init__(self, monito...
true
true
79080f4461a4c72524ec43c35bb46daf03bb2d9a
523
py
Python
manual/unicos/src-groups/script/is_sundanese_unicos.py
Tikubonn/unico
c76de5309f8a3a6fda3110e463b7e9718ea530e3
[ "MIT" ]
null
null
null
manual/unicos/src-groups/script/is_sundanese_unicos.py
Tikubonn/unico
c76de5309f8a3a6fda3110e463b7e9718ea530e3
[ "MIT" ]
null
null
null
manual/unicos/src-groups/script/is_sundanese_unicos.py
Tikubonn/unico
c76de5309f8a3a6fda3110e463b7e9718ea530e3
[ "MIT" ]
null
null
null
import json from lib import node from lib.generator import predicate_function from lib.generator import predicate_function_declaration with open("json/sundanese.json", "r") as stream: data = json.load(stream) nd = node.RootNode() for dat in data: nd.extend(dat, True) with open("dist/is_sundanese_unicos.h", "w...
26.15
69
0.772467
import json from lib import node from lib.generator import predicate_function from lib.generator import predicate_function_declaration with open("json/sundanese.json", "r") as stream: data = json.load(stream) nd = node.RootNode() for dat in data: nd.extend(dat, True) with open("dist/is_sundanese_unicos.h", "w...
true
true
79080f8192b6248770f4f2ca0ce09d129cf8bebf
2,933
py
Python
tests/core/test_visualization.py
n01deas/rasa
79f0feeb02919142eb06b8c52da5632f1c25c251
[ "Apache-2.0" ]
5
2019-06-06T08:59:15.000Z
2020-01-19T10:56:45.000Z
tests/core/test_visualization.py
RakibulAsheeque/rasa
7d3804cd081c73d78ab5e973f95a55845eed1e89
[ "Apache-2.0" ]
21
2019-12-16T17:37:54.000Z
2020-07-06T06:19:04.000Z
tests/core/test_visualization.py
RakibulAsheeque/rasa
7d3804cd081c73d78ab5e973f95a55845eed1e89
[ "Apache-2.0" ]
4
2019-05-19T21:19:32.000Z
2021-01-06T14:26:37.000Z
from rasa.core.events import ActionExecuted, SlotSet, UserUttered from rasa.core.training import visualization def test_style_transfer(): r = visualization._transfer_style({"class": "dashed great"}, {"class": "myclass"}) assert r["class"] == "myclass dashed" def test_style_transfer_empty(): r = visualiz...
28.754902
87
0.65837
from rasa.core.events import ActionExecuted, SlotSet, UserUttered from rasa.core.training import visualization def test_style_transfer(): r = visualization._transfer_style({"class": "dashed great"}, {"class": "myclass"}) assert r["class"] == "myclass dashed" def test_style_transfer_empty(): r = visualiz...
true
true
79080f9e4ddf161342b46cc0970ccca738e03a30
17,390
py
Python
openmdao/test_suite/components/cycle_comps.py
hwangjt/blue
609defbe476c86a4a2eddd12977b47e649ea7f50
[ "Apache-2.0" ]
null
null
null
openmdao/test_suite/components/cycle_comps.py
hwangjt/blue
609defbe476c86a4a2eddd12977b47e649ea7f50
[ "Apache-2.0" ]
null
null
null
openmdao/test_suite/components/cycle_comps.py
hwangjt/blue
609defbe476c86a4a2eddd12977b47e649ea7f50
[ "Apache-2.0" ]
null
null
null
"""Components for use in `CycleGroup`. For details, see `CycleGroup`.""" from __future__ import division, print_function from six.moves import range import numpy as np import scipy.sparse as sparse import unittest from openmdao.core.explicitcomponent import ExplicitComponent PSI = 1. _vec_terms = {} def _compu...
41.802885
103
0.552444
from __future__ import division, print_function from six.moves import range import numpy as np import scipy.sparse as sparse import unittest from openmdao.core.explicitcomponent import ExplicitComponent PSI = 1. _vec_terms = {} def _compute_vector_terms(system_size): try: return _vec_term...
true
true
790810188028addd63ebdc7a6d382463b54b3059
10,719
py
Python
ab3dmot.py
johnwlambert/argoverse_cbgs_kf_tracker
9268cb6dd9844f80eb107a0cc5e77e880d3b3e76
[ "BSD-Source-Code" ]
27
2020-04-24T07:45:20.000Z
2022-03-08T09:17:34.000Z
ab3dmot.py
johnwlambert/argoverse_cbgs_kf_tracker
9268cb6dd9844f80eb107a0cc5e77e880d3b3e76
[ "BSD-Source-Code" ]
4
2020-07-16T07:15:12.000Z
2022-02-17T01:24:56.000Z
ab3dmot.py
johnwlambert/argoverse_cbgs_kf_tracker
9268cb6dd9844f80eb107a0cc5e77e880d3b3e76
[ "BSD-Source-Code" ]
22
2020-05-21T07:35:03.000Z
2021-12-24T05:24:17.000Z
#!/usr/bin/env python3 from filterpy.kalman import KalmanFilter import matplotlib.pyplot as plt import numpy as np import pdb from sklearn.utils.linear_assignment_ import linear_assignment import sys import time from transform_utils import convert_3dbox_to_8corner from iou_utils import compute_iou_2d_bboxes class K...
38.836957
160
0.566844
from filterpy.kalman import KalmanFilter import matplotlib.pyplot as plt import numpy as np import pdb from sklearn.utils.linear_assignment_ import linear_assignment import sys import time from transform_utils import convert_3dbox_to_8corner from iou_utils import compute_iou_2d_bboxes class KalmanBoxTracker(object...
true
true
7908102323cd6d3ecb96ace4c798612538fe5146
3,242
py
Python
worktickets.py
benhg/work-tickets
dda344084736f9446cb6a1a49406754861aca19a
[ "MIT" ]
1
2017-11-23T01:39:07.000Z
2017-11-23T01:39:07.000Z
worktickets.py
benhg/work-tickets
dda344084736f9446cb6a1a49406754861aca19a
[ "MIT" ]
null
null
null
worktickets.py
benhg/work-tickets
dda344084736f9446cb6a1a49406754861aca19a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import json import argparse import datetime class TicketManager: ticketfile = '/Users/ben/ticketing/tickets.json' def __init__(self: object, ticketfile: str='/Users/ben/Google Drive/code/ticketing/tickets.json')->object: self.ticketfille = ticketfile self.read_tickets(...
35.23913
110
0.588834
import json import argparse import datetime class TicketManager: ticketfile = '/Users/ben/ticketing/tickets.json' def __init__(self: object, ticketfile: str='/Users/ben/Google Drive/code/ticketing/tickets.json')->object: self.ticketfille = ticketfile self.read_tickets() def read_ticket...
true
true
7908104c7294138f801d289a8830574b608a1b70
3,354
py
Python
tint/peer.py
bmuller/tint
e74a3e4c46f71dfcb2574920467ad791d29de6fe
[ "MIT" ]
1
2015-02-18T18:33:44.000Z
2015-02-18T18:33:44.000Z
tint/peer.py
8468/tint
e74a3e4c46f71dfcb2574920467ad791d29de6fe
[ "MIT" ]
null
null
null
tint/peer.py
8468/tint
e74a3e4c46f71dfcb2574920467ad791d29de6fe
[ "MIT" ]
null
null
null
from tint.ssl.context import PFSContextFactory from tint.log import Logger from tint.protocols.tintp import ConnectionPool from tint.protocols.tintp import TintProtocolFactory from tint.friends import FriendsList class Peer(object): def __init__(self, keyStore, storage, resolver): self.keyStore = keyStor...
39
94
0.651163
from tint.ssl.context import PFSContextFactory from tint.log import Logger from tint.protocols.tintp import ConnectionPool from tint.protocols.tintp import TintProtocolFactory from tint.friends import FriendsList class Peer(object): def __init__(self, keyStore, storage, resolver): self.keyStore = keyStor...
true
true
790810ef3cb25b64b82b046ed9c5a60d5c9d539f
463
py
Python
provision/onboarding/onboard_namespaces.py
hamshif/dags
6daf6313d35824b58efa7f61f90e30a169946532
[ "Apache-2.0" ]
null
null
null
provision/onboarding/onboard_namespaces.py
hamshif/dags
6daf6313d35824b58efa7f61f90e30a169946532
[ "Apache-2.0" ]
null
null
null
provision/onboarding/onboard_namespaces.py
hamshif/dags
6daf6313d35824b58efa7f61f90e30a169946532
[ "Apache-2.0" ]
null
null
null
from data_common.config.configurer import get_conf from data_common.provision.gs_buckets import confirm_bucket def init_namespace_poc(): conf = get_conf() project_id = conf.cloud.gcp.project namespaces = conf.namespaces for namespace, v in namespaces.items(): print(f'namespace: {namespace}...
22.047619
59
0.678186
from data_common.config.configurer import get_conf from data_common.provision.gs_buckets import confirm_bucket def init_namespace_poc(): conf = get_conf() project_id = conf.cloud.gcp.project namespaces = conf.namespaces for namespace, v in namespaces.items(): print(f'namespace: {namespace}...
true
true
79081130720823c2bd9ee0cb306dd1540e6b5886
401
py
Python
etnapy/__init__.py
Astropilot/etnapy
6b97f4deca095a820e420b59fc0eaaadd054d771
[ "MIT" ]
null
null
null
etnapy/__init__.py
Astropilot/etnapy
6b97f4deca095a820e420b59fc0eaaadd054d771
[ "MIT" ]
null
null
null
etnapy/__init__.py
Astropilot/etnapy
6b97f4deca095a820e420b59fc0eaaadd054d771
[ "MIT" ]
null
null
null
""" ETNA School API Wrapper ~~~~~~~~~~~~~~~~~~~~~~~ A python wrapper to help make python3 apps/bots using the ETNA API. :copyright: (c) 2019 Yohann MARTIN :license: MIT, see LICENSE for more details. """ __title__ = 'etnapy' __author__ = 'Yohann MARTIN' __license__ = 'MIT' __version__ = "1.0.0" from .user import Us...
20.05
67
0.698254
__title__ = 'etnapy' __author__ = 'Yohann MARTIN' __license__ = 'MIT' __version__ = "1.0.0" from .user import User from .promo import Promo from .trophy import Trophy from .etnapy import Intra
true
true
79081164975c8271a4a95835b01770ed32e72d4f
14,437
py
Python
segmentation_models_pytorch/encoders/zerocenter.py
vinnamkim/segmentation_models.pytorch
f967ded34df6fb536e8e8cba9b6491ae63b939f5
[ "MIT" ]
null
null
null
segmentation_models_pytorch/encoders/zerocenter.py
vinnamkim/segmentation_models.pytorch
f967ded34df6fb536e8e8cba9b6491ae63b939f5
[ "MIT" ]
null
null
null
segmentation_models_pytorch/encoders/zerocenter.py
vinnamkim/segmentation_models.pytorch
f967ded34df6fb536e8e8cba9b6491ae63b939f5
[ "MIT" ]
null
null
null
import torch import torch.nn as nn #from .utils import load_state_dict_from_url from .utils import zerocenter __all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101', 'resnet152', 'resnext50_32x4d', 'resnext101_32x8d', 'wide_resnet50_2', 'wide_resnet101_2'] model_urls = { 'res...
38.396277
107
0.626377
import torch import torch.nn as nn from .utils import zerocenter __all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101', 'resnet152', 'resnext50_32x4d', 'resnext101_32x8d', 'wide_resnet50_2', 'wide_resnet101_2'] model_urls = { 'resnet18': 'https://download.pytorch.org/models...
true
true
79081216f75f33759b780ec16eb23dc9dac30bc1
7,185
py
Python
backend/shiny_lake_28693/settings.py
crowdbotics-apps/shiny-lake-28693
be8eac9d53473f5251f4e1a091caf4cd54beb62e
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/shiny_lake_28693/settings.py
crowdbotics-apps/shiny-lake-28693
be8eac9d53473f5251f4e1a091caf4cd54beb62e
[ "FTL", "AML", "RSA-MD" ]
20
2021-07-10T18:43:17.000Z
2021-07-10T18:43:19.000Z
backend/shiny_lake_28693/settings.py
crowdbotics-apps/shiny-lake-28693
be8eac9d53473f5251f4e1a091caf4cd54beb62e
[ "FTL", "AML", "RSA-MD" ]
null
null
null
""" Django settings for shiny_lake_28693 project. Generated by 'django-admin startproject' using Django 2.2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ imp...
28.971774
112
0.730689
import os import environ import logging from modules.manifest import get_modules env = environ.Env() DEBUG = env.bool("DEBUG", default=False) # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development se...
true
true
79081276f4271dbca464776a1324868d791594cf
26,254
py
Python
Common/ComputationalGeometry/Testing/Python/TestParametricFunctions.py
biddisco/VTK
80fa7c3a767ce306586a596a6c6f3518a34e2f11
[ "BSD-3-Clause" ]
1
2021-10-13T01:57:14.000Z
2021-10-13T01:57:14.000Z
Common/ComputationalGeometry/Testing/Python/TestParametricFunctions.py
heartvalve/VTK
b90a7749fc1491d53aadce5fb460f69713b14837
[ "BSD-3-Clause" ]
null
null
null
Common/ComputationalGeometry/Testing/Python/TestParametricFunctions.py
heartvalve/VTK
b90a7749fc1491d53aadce5fb460f69713b14837
[ "BSD-3-Clause" ]
5
2015-10-09T04:12:29.000Z
2021-12-15T16:57:11.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import vtk import vtk.test.Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # ------------------------------------------------------------ # Purpose: Test the parametric functions. # --------------------------------------------------------...
46.221831
119
0.634418
import vtk import vtk.test.Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() class TestParametricFunctions(vtk.test.Testing.vtkTest): def testParametricFunctions(self): textureReader = vtk.vtkJPEGReader() textureReader.SetFileName(VT...
true
true
790814a2bac30de6a65438a4a744bdc0de13f2d6
1,727
py
Python
perfrunner/tests/fio.py
bochun/perfrunner
e215c73240381cf82fddc40856f560369c9b75a8
[ "Apache-2.0" ]
18
2015-10-28T23:12:07.000Z
2022-01-04T14:23:37.000Z
perfrunner/tests/fio.py
bochun/perfrunner
e215c73240381cf82fddc40856f560369c9b75a8
[ "Apache-2.0" ]
11
2019-03-19T12:02:31.000Z
2022-02-11T03:39:44.000Z
perfrunner/tests/fio.py
bochun/perfrunner
e215c73240381cf82fddc40856f560369c9b75a8
[ "Apache-2.0" ]
39
2015-06-07T09:17:16.000Z
2022-03-06T20:32:01.000Z
from collections import defaultdict import requests from logger import logger from perfrunner.helpers.misc import pretty_dict from perfrunner.helpers.remote import RemoteHelper from perfrunner.tests import PerfTest class FIOTest(PerfTest): TRACKER = 'fio.sc.couchbase.com' TEMPLATE = { 'group': '{}...
28.783333
80
0.600463
from collections import defaultdict import requests from logger import logger from perfrunner.helpers.misc import pretty_dict from perfrunner.helpers.remote import RemoteHelper from perfrunner.tests import PerfTest class FIOTest(PerfTest): TRACKER = 'fio.sc.couchbase.com' TEMPLATE = { 'group': '{}...
true
true
790818afe12e30c308b59599db9c9a02a9c4f36c
7,317
py
Python
checkov/terraform/plan_runner.py
BenjaDiaz/checkov
c53e32f1654e4ee771abf2001b3cb7df16752f6e
[ "Apache-2.0" ]
1
2022-02-20T21:20:39.000Z
2022-02-20T21:20:39.000Z
checkov/terraform/plan_runner.py
BenjaDiaz/checkov
c53e32f1654e4ee771abf2001b3cb7df16752f6e
[ "Apache-2.0" ]
3
2022-03-07T20:37:31.000Z
2022-03-21T20:20:14.000Z
checkov/terraform/plan_runner.py
BenjaDiaz/checkov
c53e32f1654e4ee771abf2001b3cb7df16752f6e
[ "Apache-2.0" ]
null
null
null
import json import logging import os from typing import Optional, List from checkov.common.checks_infra.registry import get_graph_checks_registry from checkov.common.graph.graph_builder.graph_components.attribute_names import CustomAttributes from checkov.common.output.record import Record from checkov.common.output....
50.116438
129
0.632636
import json import logging import os from typing import Optional, List from checkov.common.checks_infra.registry import get_graph_checks_registry from checkov.common.graph.graph_builder.graph_components.attribute_names import CustomAttributes from checkov.common.output.record import Record from checkov.common.output....
true
true
7908194a286eaf38694ca25eb254c4b4b6db95fd
1,829
py
Python
CNN/code/filter_visualiton.py
Zeng-WH/ML2020
f467a6260cd782968696950ef74f3780933cdcdd
[ "MIT" ]
2
2020-11-26T14:46:18.000Z
2021-02-06T06:25:43.000Z
CNN/code/filter_visualiton.py
Zeng-WH/ML2020
f467a6260cd782968696950ef74f3780933cdcdd
[ "MIT" ]
null
null
null
CNN/code/filter_visualiton.py
Zeng-WH/ML2020
f467a6260cd782968696950ef74f3780933cdcdd
[ "MIT" ]
null
null
null
import os import sys import argparse import numpy as np from PIL import Image import matplotlib.pyplot as plt import torch import torch.nn as nn import torch.nn.functional as F from torch.optim import Adam from torch.utils.data import Dataset import torchvision.transforms as transforms import pickle de...
28.578125
77
0.697649
import os import sys import argparse import numpy as np from PIL import Image import matplotlib.pyplot as plt import torch import torch.nn as nn import torch.nn.functional as F from torch.optim import Adam from torch.utils.data import Dataset import torchvision.transforms as transforms import pickle de...
true
true
790819ac744c6466b16fd5e4429510da065b78dc
3,550
py
Python
bsm/audit_record.py
haginara/openbsm-python
54d3127f69e1af216344540d46696aad12e95c12
[ "MIT" ]
3
2019-11-18T18:32:21.000Z
2021-05-12T18:23:00.000Z
bsm/audit_record.py
haginara/openbsm-python
54d3127f69e1af216344540d46696aad12e95c12
[ "MIT" ]
null
null
null
bsm/audit_record.py
haginara/openbsm-python
54d3127f69e1af216344540d46696aad12e95c12
[ "MIT" ]
null
null
null
# Token type identifiers. AUT_INVALID = 0x00 AUT_OTHER_FILE32 = 0x11 AUT_OHEADER = 0x12 AUT_TRAILER = 0x13 AUT_HEADER32 = 0x14 AUT_HEADER32_EX = 0x15 AUT_DATA = 0x21 AUT_IPC = 0x22 AUT_PATH = 0x23 AUT_SUBJECT32 = 0x24 AUT_XATPATH = 0x25 AUT_PROCESS32 = 0x26 AUT_RETURN32 = 0x27 AUT_TEXT = 0x28 AUT_OPAQUE = 0x29 AUT_IN_A...
23.825503
76
0.773803
AUT_INVALID = 0x00 AUT_OTHER_FILE32 = 0x11 AUT_OHEADER = 0x12 AUT_TRAILER = 0x13 AUT_HEADER32 = 0x14 AUT_HEADER32_EX = 0x15 AUT_DATA = 0x21 AUT_IPC = 0x22 AUT_PATH = 0x23 AUT_SUBJECT32 = 0x24 AUT_XATPATH = 0x25 AUT_PROCESS32 = 0x26 AUT_RETURN32 = 0x27 AUT_TEXT = 0x28 AUT_OPAQUE = 0x29 AUT_IN_ADDR = 0x2A AUT_IP = 0x2B ...
true
true
79081a406dcde59514362123ec47547ee87dcc3b
2,692
py
Python
scripts/SCZ_RNAseq/syn4590909/rank_individual_genes.py
omarmaddouri/GCNCC_cross_validated
89576ad2c8459f065604656fd38a786d042f09e0
[ "MIT" ]
1
2022-03-12T13:34:34.000Z
2022-03-12T13:34:34.000Z
scripts/SCZ_RNAseq/syn4590909/rank_individual_genes.py
omarmaddouri/GCNCC_cross_validated
89576ad2c8459f065604656fd38a786d042f09e0
[ "MIT" ]
3
2022-02-09T23:28:07.000Z
2022-02-11T19:08:53.000Z
scripts/SCZ_RNAseq/syn4590909/rank_individual_genes.py
omarmaddouri/GCNCC_cross_validated
89576ad2c8459f065604656fd38a786d042f09e0
[ "MIT" ]
null
null
null
import sys from os.path import dirname, abspath sys.path.append(dirname(dirname(abspath(__file__)))) from SCZ_RNAseq.syn4590909.utils import * path="../../data/SCZ_RNAseq/output/syn4590909/" dataset="PPI" features = np.genfromtxt("{}{}.GE_Features.txt".format(path, dataset), dtype=np.dtype(np.float32)) labels = get_c...
42.0625
115
0.69948
import sys from os.path import dirname, abspath sys.path.append(dirname(dirname(abspath(__file__)))) from SCZ_RNAseq.syn4590909.utils import * path="../../data/SCZ_RNAseq/output/syn4590909/" dataset="PPI" features = np.genfromtxt("{}{}.GE_Features.txt".format(path, dataset), dtype=np.dtype(np.float32)) labels = get_c...
true
true
79081ab4bea93de238d2c9a4070d4985b1833fb3
4,304
py
Python
libica/openapi/libgds/models/folder_update_request.py
umccr-illumina/libica
916d27eea499f29bee590268b84208effb0cc576
[ "MIT" ]
null
null
null
libica/openapi/libgds/models/folder_update_request.py
umccr-illumina/libica
916d27eea499f29bee590268b84208effb0cc576
[ "MIT" ]
4
2021-11-15T10:47:51.000Z
2022-02-22T04:43:20.000Z
libica/openapi/libgds/models/folder_update_request.py
umccr-illumina/libica
916d27eea499f29bee590268b84208effb0cc576
[ "MIT" ]
null
null
null
# coding: utf-8 """ Genomic Data Store Service No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 imp...
28.503311
124
0.58434
import pprint import re import six from libica.openapi.libgds.configuration import Configuration class FolderUpdateRequest(object): openapi_types = { 'metadata': 'object', 'acl': 'list[str]' } attribute_map = { 'metadata': 'metadata', 'acl': 'acl' } def _...
true
true
79081ad7c255e11da14b60003ca7937ed73bd33a
5,841
py
Python
ccws/base.py
applezjm/testsub
051348bb852d8e3cefe764a6315f53da66cd413e
[ "MIT" ]
null
null
null
ccws/base.py
applezjm/testsub
051348bb852d8e3cefe764a6315f53da66cd413e
[ "MIT" ]
null
null
null
ccws/base.py
applezjm/testsub
051348bb852d8e3cefe764a6315f53da66cd413e
[ "MIT" ]
null
null
null
# coding=utf-8 import websocket import datetime import csv import time import logging import redis import json import copy import pytz from hftcoin.mdagent.ccws.configs import REDIS_HOST from hftcoin.mdagent.ccws.configs import TIMEZONE from hftcoin.mdagent.ccws.configs import ExConfigs from hftcoin.mdagent.ccws.confi...
32.631285
103
0.546995
import websocket import datetime import csv import time import logging import redis import json import copy import pytz from hftcoin.mdagent.ccws.configs import REDIS_HOST from hftcoin.mdagent.ccws.configs import TIMEZONE from hftcoin.mdagent.ccws.configs import ExConfigs from hftcoin.mdagent.ccws.configs import HOME...
true
true
79081d4f882fb3db9f68d5af7078fe845f869a13
12,493
py
Python
src/interface_py/h2o4gpu/solvers/factorization.py
aaron8tang/h2o4gpu
602275375cb0dfb4acd070a8c86c3ded0bef1156
[ "Apache-2.0" ]
null
null
null
src/interface_py/h2o4gpu/solvers/factorization.py
aaron8tang/h2o4gpu
602275375cb0dfb4acd070a8c86c3ded0bef1156
[ "Apache-2.0" ]
null
null
null
src/interface_py/h2o4gpu/solvers/factorization.py
aaron8tang/h2o4gpu
602275375cb0dfb4acd070a8c86c3ded0bef1156
[ "Apache-2.0" ]
null
null
null
# - * - encoding : utf - 8 - * - # pylint: disable=fixme, line-too-long """ Matrix factorization solver. :copyright: 2017-2019 H2O.ai, Inc. :license: Apache License Version 2.0 (see LICENSE for details) """ import numpy as np import scipy import scipy.sparse def _get_sparse_matrixes(X): '''Create csc, csr and ...
39.410095
137
0.574802
import numpy as np import scipy import scipy.sparse def _get_sparse_matrixes(X): X_coo = X_csc = X_csr = None if scipy.sparse.isspmatrix_coo(X): X_coo = X X_csr = X_coo.tocsr(True) X_csc = X_coo.tocsc(True) elif scipy.sparse.isspmatrix_csr(X): X_csr = X X_csc = X...
true
true
79081dd13c1cbd7c95a5b2b85e279978b4920270
961
py
Python
infoblox/komand_infoblox/actions/delete_host/schema.py
xhennessy-r7/insightconnect-plugins
59268051313d67735b5dd3a30222eccb92aca8e9
[ "MIT" ]
null
null
null
infoblox/komand_infoblox/actions/delete_host/schema.py
xhennessy-r7/insightconnect-plugins
59268051313d67735b5dd3a30222eccb92aca8e9
[ "MIT" ]
null
null
null
infoblox/komand_infoblox/actions/delete_host/schema.py
xhennessy-r7/insightconnect-plugins
59268051313d67735b5dd3a30222eccb92aca8e9
[ "MIT" ]
null
null
null
# GENERATED BY KOMAND SDK - DO NOT EDIT import komand import json class Input: _REF = "_ref" class Output: _REF = "_ref" class DeleteHostInput(komand.Input): schema = json.loads(""" { "type": "object", "title": "Variables", "properties": { "_ref": { "type": "string", "...
16.568966
62
0.546306
import komand import json class Input: _REF = "_ref" class Output: _REF = "_ref" class DeleteHostInput(komand.Input): schema = json.loads(""" { "type": "object", "title": "Variables", "properties": { "_ref": { "type": "string", "title": "Ref", "description": "Ob...
true
true
79081efb431e116d29c7b9895c23c30c45fb6063
553
py
Python
pythons/pythons/pythons_auth/migrations/0002_auto_20210723_1847.py
BoyanPeychinov/python_web_framework
bb3a78c36790821d8b3a2b847494a1138d063193
[ "MIT" ]
null
null
null
pythons/pythons/pythons_auth/migrations/0002_auto_20210723_1847.py
BoyanPeychinov/python_web_framework
bb3a78c36790821d8b3a2b847494a1138d063193
[ "MIT" ]
null
null
null
pythons/pythons/pythons_auth/migrations/0002_auto_20210723_1847.py
BoyanPeychinov/python_web_framework
bb3a78c36790821d8b3a2b847494a1138d063193
[ "MIT" ]
null
null
null
# Generated by Django 3.2.4 on 2021-07-23 15:47 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pythons_auth', '0001_initial'), ] operations = [ migrations.AddField( model_name='pythonsuser', name='is_staff', ...
23.041667
53
0.584087
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pythons_auth', '0001_initial'), ] operations = [ migrations.AddField( model_name='pythonsuser', name='is_staff', field=models.BooleanField(default=Fals...
true
true
79081f127977d650f3c97bab5df425b5b4db4a4c
4,384
py
Python
data/prepare_data_2d_h36m_sh.py
fullmoonhalf/SemGCN
ce1dce98f8b7cc600ba7e733d17d71192c24b596
[ "Apache-2.0" ]
null
null
null
data/prepare_data_2d_h36m_sh.py
fullmoonhalf/SemGCN
ce1dce98f8b7cc600ba7e733d17d71192c24b596
[ "Apache-2.0" ]
null
null
null
data/prepare_data_2d_h36m_sh.py
fullmoonhalf/SemGCN
ce1dce98f8b7cc600ba7e733d17d71192c24b596
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function, absolute_import, division import argparse import os import zipfile import tarfile import numpy as np import h5py from glob import glob from shutil import rmtree import sys sys.path.append('../') from common.h36m_dataset import H36M_NAMES output_filename_pt = 'data_2d_h36m_sh_...
31.768116
119
0.62979
from __future__ import print_function, absolute_import, division import argparse import os import zipfile import tarfile import numpy as np import h5py from glob import glob from shutil import rmtree import sys sys.path.append('../') from common.h36m_dataset import H36M_NAMES output_filename_pt = 'data_2d_h36m_sh_...
true
true
79081fd3189187f98d1e806a77b8e869d24c78a8
8,388
py
Python
lpp/newlpp/lppTransform.py
exoplanetvetting/DAVE
aea19a30d987b214fb4c0cf01aa733f127c411b9
[ "MIT" ]
7
2019-05-07T02:01:51.000Z
2022-03-16T08:09:39.000Z
lpp/newlpp/lppTransform.py
barentsen/dave
45ba97b7b535ad26dd555c33c963c6224a9af23c
[ "MIT" ]
18
2015-12-09T22:18:59.000Z
2017-04-26T13:11:44.000Z
lpp/newlpp/lppTransform.py
barentsen/dave
45ba97b7b535ad26dd555c33c963c6224a9af23c
[ "MIT" ]
5
2017-03-08T11:42:53.000Z
2020-05-07T00:10:37.000Z
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Thu Aug 23 20:32:12 2018 Functions to correctly fold and bin a light curve. Calculate the lpp metric: transform to lower dimensions, knn Depends on class from reading in a previously created LPP metric Map Depends on reading in the light curve to data stru...
28.627986
92
0.66762
from __future__ import division import numpy as np from sklearn.neighbors import NearestNeighbors from lpproj import LocalityPreservingProjection import copy def computeLPPTransitMetric(data,mapInfo): binFlux, binPhase=foldBinLightCurve(data,mapInfo.ntrfr,mapInfo.npts) rawT...
true
true
790820f81db747211f4813bf9cfafdfa5ae0200d
33,180
py
Python
tests/cases/item_test.py
RemiCecchinato/girder
455d5c60d59112b65b45daf51c2d2ccda2e84a9a
[ "Apache-2.0" ]
null
null
null
tests/cases/item_test.py
RemiCecchinato/girder
455d5c60d59112b65b45daf51c2d2ccda2e84a9a
[ "Apache-2.0" ]
null
null
null
tests/cases/item_test.py
RemiCecchinato/girder
455d5c60d59112b65b45daf51c2d2ccda2e84a9a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import os import io import json import shutil import six import zipfile from .. import base from girder.constants import AccessType from girder.models.assetstore import Assetstore from girder.models.folder import Folder from girder.models.item import Item from girder.models.token import Token ...
42.053232
98
0.555787
import os import io import json import shutil import six import zipfile from .. import base from girder.constants import AccessType from girder.models.assetstore import Assetstore from girder.models.folder import Folder from girder.models.item import Item from girder.models.token import Token from girder.models.user...
true
true
7908217b6d7c51a3f3fffc389aafce8ac0d0ade8
6,934
py
Python
armi/materials/tests/test_water.py
youngmit/armi
67688e4e67d2a217dfc7b1ccfa64028c20b57a5b
[ "Apache-2.0" ]
null
null
null
armi/materials/tests/test_water.py
youngmit/armi
67688e4e67d2a217dfc7b1ccfa64028c20b57a5b
[ "Apache-2.0" ]
null
null
null
armi/materials/tests/test_water.py
youngmit/armi
67688e4e67d2a217dfc7b1ccfa64028c20b57a5b
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 TerraPower, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
36.114583
88
0.675224
import unittest from armi.materials.water import SaturatedWater, SaturatedSteam class Test_Water(unittest.TestCase): def test_water_at_freezing(self): water = SaturatedWater() steam = SaturatedSteam() Tk = 273.16 ref_vapor_pressure = 611.657 ref_dp_dT = 44...
true
true
790822218d5379c4992da6a0efed925359e649a9
125
py
Python
assets/student-resources/blank_template.py
chaoryan5/website
931ff3ace728cfb54089665a5d2cfbb48c488530
[ "Apache-2.0" ]
18
2016-09-22T03:24:43.000Z
2019-11-21T02:30:41.000Z
assets/student-resources/blank_template.py
chaoryan5/website
931ff3ace728cfb54089665a5d2cfbb48c488530
[ "Apache-2.0" ]
395
2016-08-28T01:26:06.000Z
2020-06-17T19:33:59.000Z
assets/student-resources/blank_template.py
chaoryan5/website
931ff3ace728cfb54089665a5d2cfbb48c488530
[ "Apache-2.0" ]
60
2015-10-09T00:58:06.000Z
2021-07-31T21:16:29.000Z
def autonomous_setup(): pass def autonomous_main(): pass def teleop_setup(): pass def teleop_main(): pass
10.416667
23
0.656
def autonomous_setup(): pass def autonomous_main(): pass def teleop_setup(): pass def teleop_main(): pass
true
true
7908224bb67a898e3c14c3d3fcd61729cf70005f
87
py
Python
test_app/apps.py
eamigo86/django3_asgi
deb6d2d7ff8faee24a78af1b570900b7e7062263
[ "MIT" ]
1
2020-08-25T15:51:14.000Z
2020-08-25T15:51:14.000Z
test_app/apps.py
eamigo86/django3_asgi
deb6d2d7ff8faee24a78af1b570900b7e7062263
[ "MIT" ]
3
2021-03-30T12:40:19.000Z
2021-09-22T18:33:48.000Z
test_app/apps.py
eamigo86/django3_asgi
deb6d2d7ff8faee24a78af1b570900b7e7062263
[ "MIT" ]
null
null
null
from django.apps import AppConfig class TestConfig(AppConfig): name = "test_app"
14.5
33
0.747126
from django.apps import AppConfig class TestConfig(AppConfig): name = "test_app"
true
true
790822df11cab707b156199dcde4cff72d1aa112
1,320
py
Python
qa327_test/frontend/geek_base.py
nicoleooi/cmpe327
73f6bdcbd2f382a54dfec3e0e79120bd60c9513f
[ "Apache-2.0", "MIT" ]
null
null
null
qa327_test/frontend/geek_base.py
nicoleooi/cmpe327
73f6bdcbd2f382a54dfec3e0e79120bd60c9513f
[ "Apache-2.0", "MIT" ]
null
null
null
qa327_test/frontend/geek_base.py
nicoleooi/cmpe327
73f6bdcbd2f382a54dfec3e0e79120bd60c9513f
[ "Apache-2.0", "MIT" ]
2
2021-01-14T02:58:39.000Z
2021-02-04T19:18:47.000Z
from seleniumbase import BaseCase from werkzeug.security import generate_password_hash from qa327_test.conftest import base_url from qa327.models import User, Ticket # Mock a sample user TEST_USER = User( email='test_frontend@test.com', name='test_frontend', password=generate_password_hash('test_frontend')...
26.938776
79
0.669697
from seleniumbase import BaseCase from werkzeug.security import generate_password_hash from qa327_test.conftest import base_url from qa327.models import User, Ticket TEST_USER = User( email='test_frontend@test.com', name='test_frontend', password=generate_password_hash('test_frontend'), balance=500 ) ...
true
true
7908247a89be8fd5b33d6849b6918ba0cbfb6699
685
py
Python
telemetryPlugin/forms.py
YangKaiting/kiwitcms-telemetry-failed-test-cases
10ccd6db1ed0d3a08af87da8411baed0b822ef4d
[ "MIT" ]
1
2019-05-28T09:21:42.000Z
2019-05-28T09:21:42.000Z
telemetryPlugin/forms.py
YangKaiting/kiwitcms-telemetry-failed-test-cases
10ccd6db1ed0d3a08af87da8411baed0b822ef4d
[ "MIT" ]
null
null
null
telemetryPlugin/forms.py
YangKaiting/kiwitcms-telemetry-failed-test-cases
10ccd6db1ed0d3a08af87da8411baed0b822ef4d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from django import forms from django.contrib.auth import get_user_model from django.utils.translation import ugettext_lazy as _ from tcms.core.utils import string_to_list from tcms.core.forms.fields import UserField from tcms.management.models import Product, Version, Build from tcms.testplans....
34.25
83
0.734307
from django import forms from django.contrib.auth import get_user_model from django.utils.translation import ugettext_lazy as _ from tcms.core.utils import string_to_list from tcms.core.forms.fields import UserField from tcms.management.models import Product, Version, Build from tcms.testplans.models import TestPlan ...
true
true
7908247cbd31c734c39dfaae689b0ec2312ffaa5
1,576
py
Python
Parsers/vcru.py
OverFitted/hacksai2021spb
552cfe3f5d1d0f89770bdf8e99414ec01e1f4145
[ "MIT" ]
null
null
null
Parsers/vcru.py
OverFitted/hacksai2021spb
552cfe3f5d1d0f89770bdf8e99414ec01e1f4145
[ "MIT" ]
null
null
null
Parsers/vcru.py
OverFitted/hacksai2021spb
552cfe3f5d1d0f89770bdf8e99414ec01e1f4145
[ "MIT" ]
null
null
null
import aiohttp, asyncio from bs4 import BeautifulSoup import json import time VC_SEARCH = "https://vc.ru/search/v2/content/new" async def parse_urls(key_word): async with aiohttp.ClientSession() as session: async with session.get(VC_SEARCH, params={ "query": key_word, "target_type...
31.52
113
0.636421
import aiohttp, asyncio from bs4 import BeautifulSoup import json import time VC_SEARCH = "https://vc.ru/search/v2/content/new" async def parse_urls(key_word): async with aiohttp.ClientSession() as session: async with session.get(VC_SEARCH, params={ "query": key_word, "target_type...
true
true
790825a7f680576fc366b31d156e124340ea5bf2
745
py
Python
cool.py
anay97/python-scraper
a09cb319448eae271833eaf59cd3372e8ff71a08
[ "MIT" ]
null
null
null
cool.py
anay97/python-scraper
a09cb319448eae271833eaf59cd3372e8ff71a08
[ "MIT" ]
null
null
null
cool.py
anay97/python-scraper
a09cb319448eae271833eaf59cd3372e8ff71a08
[ "MIT" ]
null
null
null
#For the whatsapp statuses url given below #COOL import requests from bs4 import BeautifulSoup url_to_scrape = 'https://www.appstatustxt.com/cool-whatsapp-status/' r = requests.get(url_to_scrape) soup = BeautifulSoup(r.text,"html5lib") status_object=[] statuses=[] title=soup.title.string print(title) status_...
29.8
69
0.695302
import requests from bs4 import BeautifulSoup url_to_scrape = 'https://www.appstatustxt.com/cool-whatsapp-status/' r = requests.get(url_to_scrape) soup = BeautifulSoup(r.text,"html5lib") status_object=[] statuses=[] title=soup.title.string print(title) status_object=soup.find_all('span',style="color: #008000...
true
true
7908272c12fc9d8c42fdfc8035c17f9a72cf1243
7,515
py
Python
rajk_appman/invoke_rajk.py
rajk-apps/rajk-appman
2053aa15b6dc17747022f15840cfaead06e6e8c6
[ "MIT" ]
null
null
null
rajk_appman/invoke_rajk.py
rajk-apps/rajk-appman
2053aa15b6dc17747022f15840cfaead06e6e8c6
[ "MIT" ]
null
null
null
rajk_appman/invoke_rajk.py
rajk-apps/rajk-appman
2053aa15b6dc17747022f15840cfaead06e6e8c6
[ "MIT" ]
null
null
null
import requests import json import datetime import os import io from invoke import task from .invoke_utils import ServerConnection, use_dump_modifier_function RAJK_PASSWORD = os.environ.get("RAJK_PASSWORD") RAJK_RSA = os.environ.get("RAJK_RSA") TEST_DEPLOY_DIRECTORY = os.getcwd() + "/build" rajk_server_connection ...
29.703557
102
0.637126
import requests import json import datetime import os import io from invoke import task from .invoke_utils import ServerConnection, use_dump_modifier_function RAJK_PASSWORD = os.environ.get("RAJK_PASSWORD") RAJK_RSA = os.environ.get("RAJK_RSA") TEST_DEPLOY_DIRECTORY = os.getcwd() + "/build" rajk_server_connection ...
true
true
79082733e0ac70c4f98e69a85757ce7e81ebe486
1,216
py
Python
bcs-ui/backend/tests/components/test_cm.py
kayinli/bk-bcs
93a0856175f7b066ef835921572c1cac590dbd8e
[ "Apache-2.0" ]
null
null
null
bcs-ui/backend/tests/components/test_cm.py
kayinli/bk-bcs
93a0856175f7b066ef835921572c1cac590dbd8e
[ "Apache-2.0" ]
null
null
null
bcs-ui/backend/tests/components/test_cm.py
kayinli/bk-bcs
93a0856175f7b066ef835921572c1cac590dbd8e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
46.769231
115
0.763158
from requests_mock import ANY from backend.components.cluster_manager import ClusterManagerClient class TestClusterManagerClient: def test_get_nodes(self, cluster_id, request_user, requests_mock): expected_data = [{"innerIP": "127.0.0.1"}] requests_mock.get(ANY, json={"code": 0, "data": expected...
true
true
7908280647d27b78811c8534d7906da5a4299fad
2,312
py
Python
official/gnn/gat/preprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/gnn/gat/preprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/gnn/gat/preprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
44.461538
103
0.645329
import argparse import os import numpy as np from src.dataset import load_and_process def generate_bin(): parser = argparse.ArgumentParser() parser.add_argument('--data_dir', type=str, default='./data/cora/cora_mr', help='Data dir') parser.add_argument('--train_nodes_num', type=int, default...
true
true
790828ca9c00194932cd39def66cd6c4ddcbb404
559
py
Python
Python_proficiency_test/latex/codes/17b.py
ALFA-group/neural_program_comprehension
0253911f376cf282af5a5627e38e0a591ad38860
[ "MIT" ]
6
2020-04-24T08:16:51.000Z
2021-11-01T09:50:46.000Z
Python_proficiency_test/latex/codes/17b.py
ALFA-group/neural_program_comprehension
0253911f376cf282af5a5627e38e0a591ad38860
[ "MIT" ]
null
null
null
Python_proficiency_test/latex/codes/17b.py
ALFA-group/neural_program_comprehension
0253911f376cf282af5a5627e38e0a591ad38860
[ "MIT" ]
4
2021-02-17T20:21:31.000Z
2022-02-14T12:43:23.000Z
File "test.py", line 15, in <module> print(find_lowest(a)) File "test.py", line 12, in find_lowest return lowest(lst[0], lst[1:]) File "test.py", line 9, in lowest return lowest(rest[0], rest[1:]) File "test.py", line 9, in lowest return lowest(rest[0], rest[1:]) File "test.py", line 13, in lowest return lo...
34.9375
62
0.697674
File "test.py", line 15, in <module> print(find_lowest(a)) File "test.py", line 12, in find_lowest return lowest(lst[0], lst[1:]) File "test.py", line 9, in lowest return lowest(rest[0], rest[1:]) File "test.py", line 9, in lowest return lowest(rest[0], rest[1:]) File "test.py", line 13, in lowest return lo...
false
true
790828ffc0a860859b4ae454d22ab9603f5c2c72
10,550
py
Python
sdk/python/pulumi_azure_nextgen/devtestlab/schedule.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/devtestlab/schedule.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/devtestlab/schedule.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables from ...
42.712551
325
0.645308
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables from . import outputs from ._enums import * from ._inputs import * __all__ = ['Schedule'] class Schedule(pulumi.CustomResource): def __init__(__self__, ...
true
true
79082c61a21e15c0ea4ab2ea19ffb90a66c8cd64
1,271
py
Python
cmsplugin_cascade/sphinx/cms_menus.py
beeduino/djangocms-cascade
42424dfa40d887491d37c0a34386e8c1c94e1b14
[ "MIT" ]
null
null
null
cmsplugin_cascade/sphinx/cms_menus.py
beeduino/djangocms-cascade
42424dfa40d887491d37c0a34386e8c1c94e1b14
[ "MIT" ]
null
null
null
cmsplugin_cascade/sphinx/cms_menus.py
beeduino/djangocms-cascade
42424dfa40d887491d37c0a34386e8c1c94e1b14
[ "MIT" ]
null
null
null
import io import json import os from django.conf import settings from django.urls import reverse_lazy from django.utils.translation import gettext_lazy as _ from cms.menu_bases import CMSAttachMenu from menus.base import NavigationNode from menus.menu_pool import menu_pool class DocumentationMenu(CMSAttachMenu): ...
32.589744
94
0.623131
import io import json import os from django.conf import settings from django.urls import reverse_lazy from django.utils.translation import gettext_lazy as _ from cms.menu_bases import CMSAttachMenu from menus.base import NavigationNode from menus.menu_pool import menu_pool class DocumentationMenu(CMSAttachMenu): ...
true
true
79082c89d257459ac7585963e578cfc156a719da
393
py
Python
infosafe/asgi.py
royaleagle-dev/infosafe
fcb00a67d6a8fdd3d2e032b53b56bbcf35d844b6
[ "Apache-2.0" ]
null
null
null
infosafe/asgi.py
royaleagle-dev/infosafe
fcb00a67d6a8fdd3d2e032b53b56bbcf35d844b6
[ "Apache-2.0" ]
null
null
null
infosafe/asgi.py
royaleagle-dev/infosafe
fcb00a67d6a8fdd3d2e032b53b56bbcf35d844b6
[ "Apache-2.0" ]
null
null
null
""" ASGI config for infosafe project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETT...
23.117647
78
0.78626
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'infosafe.settings') application = get_asgi_application()
true
true
79082dd5ad44d03f1472ba27987080642ff0d733
3,126
py
Python
transcribe.py
chenchy/onsets-and-frames
af7ac2d2e65cba1f6442b81317328d96b3700b26
[ "MIT" ]
149
2019-01-22T23:39:27.000Z
2022-03-30T17:57:57.000Z
transcribe.py
chenchy/onsets-and-frames
af7ac2d2e65cba1f6442b81317328d96b3700b26
[ "MIT" ]
27
2019-03-05T01:17:21.000Z
2022-03-06T07:10:29.000Z
transcribe.py
chenchy/onsets-and-frames
af7ac2d2e65cba1f6442b81317328d96b3700b26
[ "MIT" ]
61
2019-04-09T08:07:05.000Z
2022-02-23T03:49:18.000Z
import argparse import os import sys import numpy as np import soundfile from mir_eval.util import midi_to_hz from onsets_and_frames import * def load_and_process_audio(flac_path, sequence_length, device): random = np.random.RandomState(seed=42) audio, sr = soundfile.read(flac_path, dtype='int16') ass...
34.733333
146
0.680742
import argparse import os import sys import numpy as np import soundfile from mir_eval.util import midi_to_hz from onsets_and_frames import * def load_and_process_audio(flac_path, sequence_length, device): random = np.random.RandomState(seed=42) audio, sr = soundfile.read(flac_path, dtype='int16') ass...
true
true
79082e1284ddd2cfd157e322ff9b49d4d7a692b5
2,018
py
Python
app/blog/models.py
jayjodev/oncollegehub
5633df8beaef232d58025c4407bd9e25bd349e49
[ "MIT" ]
2
2018-11-14T17:08:05.000Z
2018-11-14T17:08:38.000Z
app/blog/models.py
jayjodev/oncollegehub
5633df8beaef232d58025c4407bd9e25bd349e49
[ "MIT" ]
16
2020-01-11T04:09:50.000Z
2022-03-12T00:11:19.000Z
app/blog/models.py
jayjodev/oncollegehub
5633df8beaef232d58025c4407bd9e25bd349e49
[ "MIT" ]
2
2018-11-14T17:08:07.000Z
2018-11-28T21:38:16.000Z
from django.db import models from django.utils import timezone from django.core.exceptions import ValidationError # from django.contrib.auth.models import User from users.models import Student, College from django.urls import reverse from django.core import validators class AbstractPostModel(models.Model): title ...
35.403509
91
0.733399
from django.db import models from django.utils import timezone from django.core.exceptions import ValidationError from users.models import Student, College from django.urls import reverse from django.core import validators class AbstractPostModel(models.Model): title = models.CharField(validators=[validators.Min...
true
true
79082ed18ca17e046b01b7f68ba9c15e03e31ff6
8,102
py
Python
connectomics/config/config.py
divyam-goel/pytorch_connectomics
a2c70a7cc60fd84d67be6f225c123ff11daadb83
[ "MIT" ]
null
null
null
connectomics/config/config.py
divyam-goel/pytorch_connectomics
a2c70a7cc60fd84d67be6f225c123ff11daadb83
[ "MIT" ]
null
null
null
connectomics/config/config.py
divyam-goel/pytorch_connectomics
a2c70a7cc60fd84d67be6f225c123ff11daadb83
[ "MIT" ]
null
null
null
import os from yacs.config import CfgNode as CN # ----------------------------------------------------------------------------- # Config definition # ----------------------------------------------------------------------------- _C = CN() # ----------------------------------------------------------------------------- ...
25.639241
86
0.619477
import os from yacs.config import CfgNode as CN _C = CN() _C.SYSTEM = CN() _C.SYSTEM.NUM_GPUS = 4 _C.SYSTEM.NUM_CPUS = 4 _C.MODEL = CN() _C.MODEL.ARCHITECTURE = 'unet_residual_3d' _C.MODEL.FILTERS = [28, 36, 48, 64, 80] _C.MODEL.TARGET_OPT = ['0'] _C.MODEL.WEIGHT_OPT = [['1']] _C.MODEL.LOSS_OPT...
true
true
79083036c4c19017232d49b3487ba0475de179c0
625
py
Python
indra/tests/test_tas.py
djinnome/indra
382b7f236e0b1422c96a268ef873530b5e92d48f
[ "BSD-2-Clause" ]
null
null
null
indra/tests/test_tas.py
djinnome/indra
382b7f236e0b1422c96a268ef873530b5e92d48f
[ "BSD-2-Clause" ]
null
null
null
indra/tests/test_tas.py
djinnome/indra
382b7f236e0b1422c96a268ef873530b5e92d48f
[ "BSD-2-Clause" ]
null
null
null
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str from indra.sources.tas.api import _load_data, process_csv def test_load_data(): data = _load_data() assert len(data) > 100, len(data) def test_processor(): tp = process_csv(affinity_class_limit=10) ...
29.761905
72
0.7296
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str from indra.sources.tas.api import _load_data, process_csv def test_load_data(): data = _load_data() assert len(data) > 100, len(data) def test_processor(): tp = process_csv(affinity_class_limit=10) ...
true
true
790830a9b7852a95bdc8b5052dbca110443dd94f
808
py
Python
simulator/Planners/Planner.py
ciarakamahele/sasy
fd0d50785561f188c5e9b6fa5e928673457be772
[ "Apache-2.0" ]
null
null
null
simulator/Planners/Planner.py
ciarakamahele/sasy
fd0d50785561f188c5e9b6fa5e928673457be772
[ "Apache-2.0" ]
null
null
null
simulator/Planners/Planner.py
ciarakamahele/sasy
fd0d50785561f188c5e9b6fa5e928673457be772
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 Ciara Kamahele-Sanfratello # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
36.727273
85
0.75
class Planner: def __init__(self): pass def next_action(self, initial_state, goal_state, prev_obs): pass
true
true
790830d45db35356a0999260c2f11654a788d8bd
5,102
py
Python
scripts/cartesian_experiments.py
mikelibg/yap
eb46baf91f0e52918e77f1693a280e0796cdfb8e
[ "Apache-2.0" ]
68
2019-02-27T18:03:57.000Z
2022-03-23T14:42:47.000Z
scripts/cartesian_experiments.py
mikelibg/yap
eb46baf91f0e52918e77f1693a280e0796cdfb8e
[ "Apache-2.0" ]
9
2017-05-30T11:41:53.000Z
2021-10-13T11:45:43.000Z
scripts/cartesian_experiments.py
mikelibg/yap
eb46baf91f0e52918e77f1693a280e0796cdfb8e
[ "Apache-2.0" ]
20
2017-06-10T09:23:58.000Z
2021-09-06T23:06:38.000Z
#!/usr/bin/python """Cartesian execution of options for experiments""" import itertools from pprint import pprint import os # GROUPS = [ # ('train', {'type': 'option', # 'order': 0, # 'values': ['train5k']}), # ('lang', {'type': 'option', # 'order': 1, # ...
43.237288
393
0.571541
"""Cartesian execution of options for experiments""" import itertools from pprint import pprint import os GROUPS = [ ('train', {'type': 'option', 'order': 0, 'values': ['train', 'train5k']}), ('lang', {'type': 'option', 'order': 1, 'value...
false
true
790832d52d892c0e0e2e96d4e52396dcf213b110
21,384
py
Python
ppoPolicyTraining.py
britig/S2RL-Policies
b9c74b7f5efec225920c09f7e8e82d8555d61bd9
[ "MIT" ]
1
2022-03-24T07:26:37.000Z
2022-03-24T07:26:37.000Z
ppoPolicyTraining.py
britig/S2RL-Policies
b9c74b7f5efec225920c09f7e8e82d8555d61bd9
[ "MIT" ]
null
null
null
ppoPolicyTraining.py
britig/S2RL-Policies
b9c74b7f5efec225920c09f7e8e82d8555d61bd9
[ "MIT" ]
null
null
null
""" The file contains the PPO class to train with. NOTE: All "ALG STEP"s are following the numbers from the original PPO pseudocode. It can be found here: https://spinningup.openai.com/en/latest/_images/math/e62a8971472597f4b014c2da064f636ffe365ba3.svg """ import gym import numpy as np import torch i...
40.42344
164
0.681444
import gym import numpy as np import torch import torch.nn as nn from torch.optim import Adam from torch.distributions import MultivariateNormal from torch.distributions import Categorical from network import FeedForwardActorNN, FeedForwardCriticNN import sys from cbf_clf_helper import clf_control, cbf...
true
true
7908335aa2af1e5d85aef8db310ddcc5fdffd88a
1,670
py
Python
tests/models_tests/test_log.py
chainer/chainerui
91c5c26d9154a008079dbb0bcbf69b5590d105f7
[ "MIT" ]
185
2017-12-15T09:24:07.000Z
2022-01-20T11:20:13.000Z
tests/models_tests/test_log.py
chainer/chainerui
91c5c26d9154a008079dbb0bcbf69b5590d105f7
[ "MIT" ]
191
2017-12-15T09:14:52.000Z
2022-02-17T14:09:19.000Z
tests/models_tests/test_log.py
chainer/chainerui
91c5c26d9154a008079dbb0bcbf69b5590d105f7
[ "MIT" ]
29
2017-12-15T09:40:45.000Z
2022-03-13T11:21:11.000Z
from chainerui.models.log import Log def get_test_json(): return [ { "loss": 100, "epoch": 1, }, { "loss": 90, "epoch": 2, } ] def test_log_serialize_numbers(): json_data = get_test_json() logs = [Log(data) for data in j...
25.692308
63
0.573653
from chainerui.models.log import Log def get_test_json(): return [ { "loss": 100, "epoch": 1, }, { "loss": 90, "epoch": 2, } ] def test_log_serialize_numbers(): json_data = get_test_json() logs = [Log(data) for data in j...
true
true
79083384cf791c8f6babf1e15ace4d5a35dd72b3
14,114
py
Python
detection.py
kaylajanos1/TeamSpark-L3Detection
ecc2b4ca3588f989add309439feac33014447a32
[ "BSD-3-Clause" ]
null
null
null
detection.py
kaylajanos1/TeamSpark-L3Detection
ecc2b4ca3588f989add309439feac33014447a32
[ "BSD-3-Clause" ]
1
2021-04-28T03:14:17.000Z
2021-04-28T03:14:17.000Z
detection.py
kaylajanos1/TeamSpark-L3Detection
ecc2b4ca3588f989add309439feac33014447a32
[ "BSD-3-Clause" ]
null
null
null
#Importing Libraries import os import csv import sys, getopt import uuid import SimpleITK as sitk import cv2 import numpy as np import tensorflow as tf from flask import Flask, flash, request, redirect, render_template from flask import jsonify from flask import send_from_directory from flask_materialize import Mat...
39.205556
159
0.540315
import os import csv import sys, getopt import uuid import SimpleITK as sitk import cv2 import numpy as np import tensorflow as tf from flask import Flask, flash, request, redirect, render_template from flask import jsonify from flask import send_from_directory from flask_materialize import Material from tensorflow...
true
true
790834027a8e823b24e0363e5e21439e4d9c23cf
6,867
py
Python
tests/bitmovin/services/filters/text_filter_tests.py
camberbridge/bitmovin-python
3af4c6e79b0291fda05fd1ceeb5bed1bba9f3c95
[ "Unlicense" ]
44
2016-12-12T17:37:23.000Z
2021-03-03T09:48:48.000Z
tests/bitmovin/services/filters/text_filter_tests.py
camberbridge/bitmovin-python
3af4c6e79b0291fda05fd1ceeb5bed1bba9f3c95
[ "Unlicense" ]
38
2017-01-09T14:45:45.000Z
2022-02-27T18:04:33.000Z
tests/bitmovin/services/filters/text_filter_tests.py
camberbridge/bitmovin-python
3af4c6e79b0291fda05fd1ceeb5bed1bba9f3c95
[ "Unlicense" ]
27
2017-02-02T22:49:31.000Z
2019-11-21T07:04:57.000Z
import json import unittest from bitmovin import Bitmovin, Response, TextFilter, Font from bitmovin.errors import BitmovinApiError from tests.bitmovin import BitmovinTestCase class TextFilterTests(BitmovinTestCase): @classmethod def setUpClass(cls): super().setUpClass() @classmethod def tea...
44.590909
108
0.722732
import json import unittest from bitmovin import Bitmovin, Response, TextFilter, Font from bitmovin.errors import BitmovinApiError from tests.bitmovin import BitmovinTestCase class TextFilterTests(BitmovinTestCase): @classmethod def setUpClass(cls): super().setUpClass() @classmethod def tea...
true
true
790834cc3bfa3eafdda0ce74e90d581d6ba9a7c3
667
py
Python
tools/perf/contrib/media_router_benchmarks/media_router_measurements.py
sarang-apps/darshan_browser
173649bb8a7c656dc60784d19e7bb73e07c20daa
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
575
2015-06-18T23:58:20.000Z
2022-03-23T09:32:39.000Z
tools/perf/contrib/media_router_benchmarks/media_router_measurements.py
sarang-apps/darshan_browser
173649bb8a7c656dc60784d19e7bb73e07c20daa
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
113
2015-05-04T09:58:14.000Z
2022-01-31T19:35:03.000Z
tools/perf/contrib/media_router_benchmarks/media_router_measurements.py
sarang-apps/darshan_browser
173649bb8a7c656dc60784d19e7bb73e07c20daa
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
52
2015-07-14T10:40:50.000Z
2022-03-15T01:11:49.000Z
# Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from contrib.media_router_benchmarks import media_router_cpu_memory_metric from telemetry.page import legacy_page_test class MediaRouterCPUMemoryTest(legac...
37.055556
78
0.803598
from contrib.media_router_benchmarks import media_router_cpu_memory_metric from telemetry.page import legacy_page_test class MediaRouterCPUMemoryTest(legacy_page_test.LegacyPageTest): def __init__(self): super(MediaRouterCPUMemoryTest, self).__init__() self._metric = media_router_cpu_memory_metric.Medi...
true
true
790835f22ff39732dc36c4e09154deb638a51290
2,839
py
Python
speech/samples/v1/speech_transcribe_multichannel.py
hugovk/google-cloud-python
b387134827dbc3be0e1b431201e0875798002fda
[ "Apache-2.0" ]
1
2019-03-26T21:44:51.000Z
2019-03-26T21:44:51.000Z
speech/samples/v1/speech_transcribe_multichannel.py
hugovk/google-cloud-python
b387134827dbc3be0e1b431201e0875798002fda
[ "Apache-2.0" ]
6
2019-05-27T22:05:58.000Z
2019-08-05T16:46:16.000Z
speech/samples/v1/speech_transcribe_multichannel.py
hugovk/google-cloud-python
b387134827dbc3be0e1b431201e0875798002fda
[ "Apache-2.0" ]
1
2019-03-29T18:26:16.000Z
2019-03-29T18:26:16.000Z
# -*- coding: utf-8 -*- # # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
32.632184
105
0.726664
from google.cloud import speech_v1 import io def sample_recognize(local_file_path): client = speech_v1.SpeechClient() audio_channel_count = 2 enable_separate_recognition_per_channel = True language_code = "en-US" config = { "aud...
true
true
790837f0eda32c46f86435beb0818e3c2221053d
27,255
py
Python
pipenv/cli.py
mlhamel/pipenv
22445858766a1f92c5ad87c90662ba260c8b750b
[ "MIT" ]
null
null
null
pipenv/cli.py
mlhamel/pipenv
22445858766a1f92c5ad87c90662ba260c8b750b
[ "MIT" ]
null
null
null
pipenv/cli.py
mlhamel/pipenv
22445858766a1f92c5ad87c90662ba260c8b750b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import sys from click import ( argument, command, echo, edit, group, Group, option, pass_context, Option, version_option, BadParameter, ) from click_completion import init as init_completion from click_completion import get_code from click_di...
25.212766
116
0.60444
import os import sys from click import ( argument, command, echo, edit, group, Group, option, pass_context, Option, version_option, BadParameter, ) from click_completion import init as init_completion from click_completion import get_code from click_didyoumean import DYMComm...
true
true
7908385035473f24ddc095eb1f402ff08512b2ba
1,007
py
Python
pyvisdk/do/license_server_source.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
pyvisdk/do/license_server_source.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
pyvisdk/do/license_server_source.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def LicenseServerSource(vim, *args, **kwargs): '''Specify a license server reachable via ...
30.515152
124
0.60576
import logging from pyvisdk.exceptions import InvalidArgumentError
true
true
790838bbfa2f5448a91ac1a3564d8b9310969a11
929
py
Python
2015/11/solve.py
lamperi/aoc
1781dcbac0be18a086c10a9b76fb6a2d3595523c
[ "MIT" ]
null
null
null
2015/11/solve.py
lamperi/aoc
1781dcbac0be18a086c10a9b76fb6a2d3595523c
[ "MIT" ]
null
null
null
2015/11/solve.py
lamperi/aoc
1781dcbac0be18a086c10a9b76fb6a2d3595523c
[ "MIT" ]
null
null
null
data = "cqjxjnds" import string import re lc = string.ascii_lowercase next = dict(zip(lc[:-1], lc[1:])) three_seq = ["".join(z) for z in zip(lc[:-2], lc[1:-1], lc[2:])] def check(pw): if "i" in pw or "o" in pw or "l" in pw: return False three_match = False for seq in three_seq: if seq in...
17.865385
64
0.557589
data = "cqjxjnds" import string import re lc = string.ascii_lowercase next = dict(zip(lc[:-1], lc[1:])) three_seq = ["".join(z) for z in zip(lc[:-2], lc[1:-1], lc[2:])] def check(pw): if "i" in pw or "o" in pw or "l" in pw: return False three_match = False for seq in three_seq: if seq in...
true
true
7908390b1e8b8ba76d42ea51f64cbfcd2c7e8784
818
py
Python
DSA 450 GFG/next_permutation.py
siddhi-244/CompetitiveProgrammingQuestionBank
4c265d41b82a7d4370c14d367f78effa9ed95d3c
[ "MIT" ]
931
2020-04-18T11:57:30.000Z
2022-03-31T15:15:39.000Z
DSA 450 GFG/next_permutation.py
vanishasamriddhi/CompetitiveProgrammingQuestionBank
b5160a66013bda17c98070d24d3a932b833692f8
[ "MIT" ]
661
2020-12-13T04:31:48.000Z
2022-03-15T19:11:54.000Z
DSA 450 GFG/next_permutation.py
Mayuri-cell/CompetitiveProgrammingQuestionBank
eca2257d7da5346f45bdd7a351cc95bde6ed5c7d
[ "MIT" ]
351
2020-08-10T06:49:21.000Z
2022-03-25T04:02:12.000Z
# Link for the problem : https://leetcode.com/problems/next-permutation/ class Solution(object): def nextPermutation(self, nums): found = False i = len(nums)-2 while i >=0: if nums[i] < nums[i+1]: found =True break i-=1 if not found: ...
23.371429
72
0.462103
class Solution(object): def nextPermutation(self, nums): found = False i = len(nums)-2 while i >=0: if nums[i] < nums[i+1]: found =True break i-=1 if not found: nums.sort() else: m = self.findMaxIndex(i+1,nums,nums[i])...
true
true
79083937510863dae48a6665d4b274273be38709
8,908
py
Python
secedgar/core/company.py
Ahrvo-Trading-Systems/sec-edgar
b22f9aa2de0cafd98ecab884ece1e7d0f2be3381
[ "Apache-2.0" ]
null
null
null
secedgar/core/company.py
Ahrvo-Trading-Systems/sec-edgar
b22f9aa2de0cafd98ecab884ece1e7d0f2be3381
[ "Apache-2.0" ]
null
null
null
secedgar/core/company.py
Ahrvo-Trading-Systems/sec-edgar
b22f9aa2de0cafd98ecab884ece1e7d0f2be3381
[ "Apache-2.0" ]
null
null
null
import asyncio import os import warnings from datetime import date from secedgar.cik_lookup import CIKLookup from secedgar.client import NetworkClient from secedgar.core._base import AbstractFiling from secedgar.core.filing_types import FilingType from secedgar.exceptions import FilingTypeError from secedgar.utils imp...
36.359184
99
0.60586
import asyncio import os import warnings from datetime import date from secedgar.cik_lookup import CIKLookup from secedgar.client import NetworkClient from secedgar.core._base import AbstractFiling from secedgar.core.filing_types import FilingType from secedgar.exceptions import FilingTypeError from secedgar.utils imp...
true
true
790839ac243e96c58a803971d7e398d0e116d55a
2,109
py
Python
var/spack/repos/builtin/packages/meme/package.py
MiddelkoopT/spack
4d94c4c4600f42a7a3bb3d06ec879140bc259304
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/meme/package.py
MiddelkoopT/spack
4d94c4c4600f42a7a3bb3d06ec879140bc259304
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/meme/package.py
MiddelkoopT/spack
4d94c4c4600f42a7a3bb3d06ec879140bc259304
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1
2022-01-18T23:39:24.000Z
2022-01-18T23:39:24.000Z
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * from spack.version import Version class Meme(AutotoolsPackage): """The MEME Suite allows the bio...
44.87234
96
0.697013
from spack import * from spack.version import Version class Meme(AutotoolsPackage): homepage = "http://meme-suite.org" url = "http://meme-suite.org/meme-software/5.1.1/meme-5.1.1.tar.gz" version('5.3.0', sha256='b2ddec9db972fcf77b29c7deb62df8b1dd8a6638c13c1aa06a5d563c4a7ff756') version('5....
true
true
79083aa16d5d92fd67caba5eb952e4b0176daeb1
6,233
py
Python
agent.py
cisc474projectgroup/cartpole-q-learning
d7215990c8bdf8c1ff20cdfa3a7530e1a2c641b5
[ "MIT" ]
null
null
null
agent.py
cisc474projectgroup/cartpole-q-learning
d7215990c8bdf8c1ff20cdfa3a7530e1a2c641b5
[ "MIT" ]
null
null
null
agent.py
cisc474projectgroup/cartpole-q-learning
d7215990c8bdf8c1ff20cdfa3a7530e1a2c641b5
[ "MIT" ]
null
null
null
import random import copy from collections import defaultdict from collections import deque from collections import namedtuple from matplotlib import pyplot as plt import numpy as np class Q(): def __init__(self, n_actions, observation_space, bin_size, low_bound=None, high_bound=None, initial_mean=0.0, initial_s...
36.664706
145
0.574683
import random import copy from collections import defaultdict from collections import deque from collections import namedtuple from matplotlib import pyplot as plt import numpy as np class Q(): def __init__(self, n_actions, observation_space, bin_size, low_bound=None, high_bound=None, initial_mean=0.0, initial_s...
true
true
79083dc89001dad5e8c587aa8fb669efa87334d8
274
py
Python
resources/cipher_suite_grabber.py
berney/TLS-Attacker
32c5bcb87a57f9a3b1ff3f126e6432010421875b
[ "ECL-2.0", "Apache-2.0" ]
593
2016-04-20T16:19:52.000Z
2020-11-05T01:22:01.000Z
resources/cipher_suite_grabber.py
berney/TLS-Attacker
32c5bcb87a57f9a3b1ff3f126e6432010421875b
[ "ECL-2.0", "Apache-2.0" ]
75
2016-05-02T22:34:02.000Z
2020-11-06T11:02:36.000Z
resources/cipher_suite_grabber.py
berney/TLS-Attacker
32c5bcb87a57f9a3b1ff3f126e6432010421875b
[ "ECL-2.0", "Apache-2.0" ]
130
2016-04-21T05:16:09.000Z
2020-10-26T01:09:52.000Z
#!/usr/bin/env python2 import sys import re import datetime import hashlib import optparse import urllib2 # cheers Dirk :) url = 'https://testssl.sh/mapping-rfc.txt' for line in urllib2.urlopen(url): cipher = line.split() print cipher[1]+'(0'+cipher[0]+'),'
16.117647
42
0.686131
import sys import re import datetime import hashlib import optparse import urllib2 url = 'https://testssl.sh/mapping-rfc.txt' for line in urllib2.urlopen(url): cipher = line.split() print cipher[1]+'(0'+cipher[0]+'),'
false
true
79083f031ae30d50fc4d6738156e85935cf331f0
9,102
py
Python
homeassistant/components/homematicip_cloud/light.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
23
2017-11-15T21:03:53.000Z
2021-03-29T21:33:48.000Z
homeassistant/components/homematicip_cloud/light.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
6
2021-02-08T20:59:36.000Z
2022-03-12T00:52:11.000Z
homeassistant/components/homematicip_cloud/light.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
10
2018-01-01T00:12:51.000Z
2021-12-21T23:08:05.000Z
"""Support for HomematicIP Cloud lights.""" import logging from typing import Any, Dict from homematicip.aio.device import ( AsyncBrandDimmer, AsyncBrandSwitchMeasuring, AsyncBrandSwitchNotificationLight, AsyncDimmer, AsyncFullFlushDimmer, AsyncPluggableDimmer, ) from homematicip.base.enums imp...
32.391459
88
0.652054
import logging from typing import Any, Dict from homematicip.aio.device import ( AsyncBrandDimmer, AsyncBrandSwitchMeasuring, AsyncBrandSwitchNotificationLight, AsyncDimmer, AsyncFullFlushDimmer, AsyncPluggableDimmer, ) from homematicip.base.enums import RGBColorState from homematicip.base.func...
true
true
79083f742da3f3eee14c296fe653dcc7712b69ac
2,167
py
Python
data/check_apogee_spectra.py
andycasey/stellar-twins
9b3cfbf608e3e15a2358bbd33aa5ae21cfc1d0dd
[ "MIT" ]
null
null
null
data/check_apogee_spectra.py
andycasey/stellar-twins
9b3cfbf608e3e15a2358bbd33aa5ae21cfc1d0dd
[ "MIT" ]
null
null
null
data/check_apogee_spectra.py
andycasey/stellar-twins
9b3cfbf608e3e15a2358bbd33aa5ae21cfc1d0dd
[ "MIT" ]
1
2016-09-28T20:47:21.000Z
2016-09-28T20:47:21.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Test the quoted APOGEE uncertainties from individual (rebinned) spectra. """ __author__ = "Andy Casey <arc@ast.cam.ac.uk>" import numpy as np import matplotlib.pyplot as plt from astropy.io import fits from glob import glob from itertools import combinations def ge...
28.142857
87
0.606368
__author__ = "Andy Casey <arc@ast.cam.ac.uk>" import numpy as np import matplotlib.pyplot as plt from astropy.io import fits from glob import glob from itertools import combinations def get_differences(apStar_filename): image = fits.open(apStar_filename) N_visits = image[0].header["NVISITS"] data_...
true
true
790840947ae7244ad5ef3eab016a7359ff9c3924
4,032
py
Python
ezgal/scripts/convert_basti.py
dpgettings/ezgal
de4a58879eaee0bddbcdb42dddfa2b398dbc3ea9
[ "MIT" ]
5
2015-07-15T21:05:22.000Z
2017-10-05T19:16:09.000Z
ezgal/scripts/convert_basti.py
dpgettings/ezgal
de4a58879eaee0bddbcdb42dddfa2b398dbc3ea9
[ "MIT" ]
1
2015-09-12T12:37:29.000Z
2015-09-12T12:37:29.000Z
ezgal/scripts/convert_basti.py
dpgettings/ezgal
de4a58879eaee0bddbcdb42dddfa2b398dbc3ea9
[ "MIT" ]
2
2015-05-14T14:34:19.000Z
2019-03-22T02:17:22.000Z
#!/usr/bin/python import glob,re,sys,math,pyfits import numpy as np import utils if len(sys.argv) < 2: print '\nconvert basti SSP models to ez_gal fits format' print 'Run in directory with SED models for one metallicity' print 'Usage: convert_basti.py ez_gal.ascii\n' sys.exit(2) fileout = sys.argv[1]...
30.545455
112
0.657738
import glob,re,sys,math,pyfits import numpy as np import utils if len(sys.argv) < 2: print '\nconvert basti SSP models to ez_gal fits format' print 'Run in directory with SED models for one metallicity' print 'Usage: convert_basti.py ez_gal.ascii\n' sys.exit(2) fileout = sys.argv[1] sfh = ''; tau ...
false
true
7908410bd7bc8c885dca9b63f878d01401772eb0
2,963
py
Python
python_vuejs/vuejs.py
Timtech4u/python-vuejs
7634726ad7fc5ab02a6159e7f150360ededca250
[ "MIT" ]
null
null
null
python_vuejs/vuejs.py
Timtech4u/python-vuejs
7634726ad7fc5ab02a6159e7f150360ededca250
[ "MIT" ]
null
null
null
python_vuejs/vuejs.py
Timtech4u/python-vuejs
7634726ad7fc5ab02a6159e7f150360ededca250
[ "MIT" ]
1
2018-11-24T02:05:28.000Z
2018-11-24T02:05:28.000Z
# -*- coding: utf-8 -*- from collections import namedtuple from subprocess import check_output import click from .utils import cd try: from subprocess import call as run except ImportError: from subprocess import run class VueJs(object): """ Provide subprocess call to `npm` and `vue-cli` """ ...
22.792308
82
0.600405
from collections import namedtuple from subprocess import check_output import click from .utils import cd try: from subprocess import call as run except ImportError: from subprocess import run class VueJs(object): @staticmethod def node_check(): node_ver = check_output('node -v'.split())...
true
true
7908411e8ba2d90f953b5dd55f4a6f78d9db403d
259
py
Python
Practice1.py
anayakoti/FirstSample
8ef05772991644e63a4fd6759458f449cd2b00c0
[ "bzip2-1.0.6" ]
null
null
null
Practice1.py
anayakoti/FirstSample
8ef05772991644e63a4fd6759458f449cd2b00c0
[ "bzip2-1.0.6" ]
null
null
null
Practice1.py
anayakoti/FirstSample
8ef05772991644e63a4fd6759458f449cd2b00c0
[ "bzip2-1.0.6" ]
null
null
null
createNewFile=open('dummy.txt', 'w'); grades=0; print("Enter a rollnumber"); grades=input(); while(grades!='*'): createNewFile.write(grades +"\n"); print("Enter a rollnumber"); grades=input(); createNewFile.close();
19.923077
38
0.583012
createNewFile=open('dummy.txt', 'w'); grades=0; print("Enter a rollnumber"); grades=input(); while(grades!='*'): createNewFile.write(grades +"\n"); print("Enter a rollnumber"); grades=input(); createNewFile.close();
true
true
790841b06ba83dce9101ed02863786dd32d19090
147
py
Python
treasury_yield_analysis/task/__init__.py
samsea18/Treasury-Yield-Analysis
8746adee93a995089d3c6dc1eb371ecef9cd942c
[ "MIT" ]
null
null
null
treasury_yield_analysis/task/__init__.py
samsea18/Treasury-Yield-Analysis
8746adee93a995089d3c6dc1eb371ecef9cd942c
[ "MIT" ]
1
2021-06-29T16:34:26.000Z
2021-06-29T16:34:26.000Z
treasury_yield_analysis/task/__init__.py
samsea18/Treasury-Yield-Analysis
8746adee93a995089d3c6dc1eb371ecef9cd942c
[ "MIT" ]
null
null
null
from .treasury_yields import Treasury_Yield_Task from .mariadb import Mariadb_Task from .bea import BEA_Task from .yfinance import Yfinance_Task
36.75
49
0.85034
from .treasury_yields import Treasury_Yield_Task from .mariadb import Mariadb_Task from .bea import BEA_Task from .yfinance import Yfinance_Task
true
true
790841b8809171e06dadf551f38dccc196d0b33e
7,094
py
Python
.install/.backup/lib/apitools/base/py/extra_types.py
bopopescu/google-cloud-sdk
b34e6a18f1e89673508166acce816111c3421e4b
[ "Apache-2.0" ]
null
null
null
.install/.backup/lib/apitools/base/py/extra_types.py
bopopescu/google-cloud-sdk
b34e6a18f1e89673508166acce816111c3421e4b
[ "Apache-2.0" ]
null
null
null
.install/.backup/lib/apitools/base/py/extra_types.py
bopopescu/google-cloud-sdk
b34e6a18f1e89673508166acce816111c3421e4b
[ "Apache-2.0" ]
1
2020-07-24T20:04:47.000Z
2020-07-24T20:04:47.000Z
"""Extra types understood by apitools. This file will be replaced by a .proto file when we switch to proto2 from protorpc. """ import collections import json import numbers from protorpc import message_types from protorpc import messages from protorpc import protojson from apitools.base.py import encoding from apit...
30.577586
78
0.762193
import collections import json import numbers from protorpc import message_types from protorpc import messages from protorpc import protojson from apitools.base.py import encoding from apitools.base.py import exceptions from apitools.base.py import util __all__ = [ 'DateTimeMessage', 'JsonArray', 'JsonO...
true
true
7908421b2547ace9920792b02f8c54541379d1a7
4,664
py
Python
server.py
catarinaacsilva/pacman
940823f4654dfc01e63361aa2ca17a275aa7b1fa
[ "MIT" ]
null
null
null
server.py
catarinaacsilva/pacman
940823f4654dfc01e63361aa2ca17a275aa7b1fa
[ "MIT" ]
null
null
null
server.py
catarinaacsilva/pacman
940823f4654dfc01e63361aa2ca17a275aa7b1fa
[ "MIT" ]
null
null
null
import requests import argparse import asyncio import json import logging import websockets import os.path from collections import namedtuple from game import Game logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') wslogger = logging.getLogger('websockets') wslogger...
42.018018
109
0.595197
import requests import argparse import asyncio import json import logging import websockets import os.path from collections import namedtuple from game import Game logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') wslogger = logging.getLogger('websockets') wslogger...
true
true