hexsha
stringlengths
40
40
size
int64
10
805k
ext
stringclasses
6 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
176
max_stars_repo_name
stringlengths
7
114
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
176
max_issues_repo_name
stringlengths
7
114
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
48.5k
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
176
max_forks_repo_name
stringlengths
7
114
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
10
805k
avg_line_length
float64
5.53
11k
max_line_length
int64
10
129k
alphanum_fraction
float64
0.13
0.93
content_no_comment
stringlengths
0
449k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f70108704eabc1b138d4f8106e24514584746298
10,157
py
Python
NeuroEvolution/evolution.py
berkott/SpaceInvadersAI
0d1d095f60b06f09b337bd3abf7bb46a08a8ed70
[ "Apache-2.0" ]
4
2019-04-12T09:46:58.000Z
2021-08-09T16:30:26.000Z
NeuroEvolution/evolution.py
berkott/SpaceInvadersAI
0d1d095f60b06f09b337bd3abf7bb46a08a8ed70
[ "Apache-2.0" ]
1
2018-08-13T23:00:46.000Z
2018-08-13T23:00:46.000Z
NeuroEvolution/evolution.py
berkott/SpaceInvadersAI
0d1d095f60b06f09b337bd3abf7bb46a08a8ed70
[ "Apache-2.0" ]
2
2019-12-28T08:50:55.000Z
2021-11-26T02:09:37.000Z
import gym import keras as k from keras.models import Sequential from keras.layers import Conv2D, Activation, MaxPooling2D, Flatten, Dense, Dropout from keras.optimizers import Adam import numpy as np from datetime import datetime from matplotlib import pyplot as PLT import time import csv import os # You can adjust t...
33.744186
190
0.686915
import gym import keras as k from keras.models import Sequential from keras.layers import Conv2D, Activation, MaxPooling2D, Flatten, Dense, Dropout from keras.optimizers import Adam import numpy as np from datetime import datetime from matplotlib import pyplot as PLT import time import csv import os POPULATION_SIZE =...
true
true
f70109e1cbe5617c07cf5ee77cb41dc2d8d444c4
4,657
py
Python
ssd/modeling/backbone/vgg.py
BeibinLi/SSD
2cd30f02c21b0a8731a34dca2a89d6e099ca3442
[ "MIT" ]
null
null
null
ssd/modeling/backbone/vgg.py
BeibinLi/SSD
2cd30f02c21b0a8731a34dca2a89d6e099ca3442
[ "MIT" ]
null
null
null
ssd/modeling/backbone/vgg.py
BeibinLi/SSD
2cd30f02c21b0a8731a34dca2a89d6e099ca3442
[ "MIT" ]
null
null
null
import torch.nn as nn import torch.nn.functional as F from ssd.layers import L2Norm from ssd.modeling import registry from ssd.utils.model_zoo import load_state_dict_from_url model_urls = { 'vgg': 'https://s3.amazonaws.com/amdegroot-models/vgg16_reducedfc.pth', } # borrowed from https://github.com/amdegroot/ssd...
35.280303
109
0.582564
import torch.nn as nn import torch.nn.functional as F from ssd.layers import L2Norm from ssd.modeling import registry from ssd.utils.model_zoo import load_state_dict_from_url model_urls = { 'vgg': 'https://s3.amazonaws.com/amdegroot-models/vgg16_reducedfc.pth', } def add_vgg(cfg, batch_norm=False): layers ...
true
true
f7010a582d05fcd97300b6f85b1ecb9b1d89f6e1
516
py
Python
sfa/custom_function.py
erpsonic/en_sfa
2b5f52ec063571c30e147610ceb4d8baa76121e4
[ "MIT" ]
null
null
null
sfa/custom_function.py
erpsonic/en_sfa
2b5f52ec063571c30e147610ceb4d8baa76121e4
[ "MIT" ]
null
null
null
sfa/custom_function.py
erpsonic/en_sfa
2b5f52ec063571c30e147610ceb4d8baa76121e4
[ "MIT" ]
null
null
null
from __future__ import unicode_literals import frappe def set_default_address(doc,method): if doc.is_primary_address: for row in doc.links: if row.link_doctype=="Customer": cust = frappe.get_doc("Customer",row.link_name) cust.default_address=doc.name cust.save() def set_default_contact(doc,method): ...
28.666667
51
0.75
from __future__ import unicode_literals import frappe def set_default_address(doc,method): if doc.is_primary_address: for row in doc.links: if row.link_doctype=="Customer": cust = frappe.get_doc("Customer",row.link_name) cust.default_address=doc.name cust.save() def set_default_contact(doc,method): ...
true
true
f7010a60f3944ab782eeb8876e4d862fb8afe60d
1,026
py
Python
src/core/Nav/Nav.py
airportmarc/bondy
de574b69d33576359b089471406f6447cd4a87df
[ "MIT" ]
null
null
null
src/core/Nav/Nav.py
airportmarc/bondy
de574b69d33576359b089471406f6447cd4a87df
[ "MIT" ]
null
null
null
src/core/Nav/Nav.py
airportmarc/bondy
de574b69d33576359b089471406f6447cd4a87df
[ "MIT" ]
null
null
null
class MenuItem(object): TEXT_NAME = 'name' TEXT_URL = 'url_name' TEXT_SUBMENU = 'submenu' def __init__(self, name, url=None, *args): super(MenuItem, self).__init__() self.name = name self.url = url self.url_args = args self.sub_menu = [] def add_sub_menu_ite...
23.318182
57
0.57115
class MenuItem(object): TEXT_NAME = 'name' TEXT_URL = 'url_name' TEXT_SUBMENU = 'submenu' def __init__(self, name, url=None, *args): super(MenuItem, self).__init__() self.name = name self.url = url self.url_args = args self.sub_menu = [] def add_sub_menu_ite...
true
true
f7010ac3c7a794ae315e8b6b29a246ee58f835ee
1,907
py
Python
oiasg_base/lib/game.py
will7101/OIASG
44badff57689da99a2c9896d176b32e7b51d42b5
[ "BSD-3-Clause" ]
1
2018-03-17T10:07:11.000Z
2018-03-17T10:07:11.000Z
oiasg_base/lib/game.py
will7101/OIASG
44badff57689da99a2c9896d176b32e7b51d42b5
[ "BSD-3-Clause" ]
1
2018-03-17T11:35:54.000Z
2018-03-17T11:35:54.000Z
oiasg_base/lib/game.py
will7101/OIASG
44badff57689da99a2c9896d176b32e7b51d42b5
[ "BSD-3-Clause" ]
null
null
null
import os import time import traceback # import functools def getobj(s): return open(s, "r", encoding='utf-8').read() def getobjs(s): objs = [] fs = os.listdir(s) for f in fs: absf = os.path.join(s, f) if os.path.isfile(absf) and os.path.splitext(f)[1] == '.py': objs.append(absf) elif ...
22.435294
77
0.625066
import os import time import traceback def getobj(s): return open(s, "r", encoding='utf-8').read() def getobjs(s): objs = [] fs = os.listdir(s) for f in fs: absf = os.path.join(s, f) if os.path.isfile(absf) and os.path.splitext(f)[1] == '.py': objs.append(absf) elif os.path.isdir(absf)...
true
true
f7010bd75a5a5416d81aa889093286f6e47a1c7d
6,120
py
Python
songbird/util.py
fedarko/songbird
44827596bc9ca16d8046aeafee24ee1dd74dcc0b
[ "BSD-2-Clause", "BSD-3-Clause" ]
1
2020-08-03T11:23:29.000Z
2020-08-03T11:23:29.000Z
songbird/util.py
fedarko/songbird
44827596bc9ca16d8046aeafee24ee1dd74dcc0b
[ "BSD-2-Clause", "BSD-3-Clause" ]
1
2019-09-23T20:15:24.000Z
2019-09-23T20:42:15.000Z
songbird/util.py
fedarko/songbird
44827596bc9ca16d8046aeafee24ee1dd74dcc0b
[ "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
import os import tensorflow as tf import numpy as np import pandas as pd from sklearn.utils import check_random_state from skbio.stats.composition import clr_inv as softmax from biom import Table from patsy import dmatrix def random_multinomial_model(num_samples, num_features, reps=1, ...
28.867925
74
0.625327
import os import tensorflow as tf import numpy as np import pandas as pd from sklearn.utils import check_random_state from skbio.stats.composition import clr_inv as softmax from biom import Table from patsy import dmatrix def random_multinomial_model(num_samples, num_features, reps=1, ...
true
true
f7010e09db939d4517fbc2b1a250bb4262658b1d
22,716
py
Python
letsencrypt/client.py
impressiver/letsencrypt
f2a83e9e942e9f5776a2e9f8c76d7a21bbbf27aa
[ "Apache-2.0" ]
1
2017-02-19T12:38:23.000Z
2017-02-19T12:38:23.000Z
letsencrypt/client.py
ingochris/letsencrypt
f2a83e9e942e9f5776a2e9f8c76d7a21bbbf27aa
[ "Apache-2.0" ]
null
null
null
letsencrypt/client.py
ingochris/letsencrypt
f2a83e9e942e9f5776a2e9f8c76d7a21bbbf27aa
[ "Apache-2.0" ]
1
2015-12-03T23:58:41.000Z
2015-12-03T23:58:41.000Z
"""Let's Encrypt client API.""" import logging import os from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.asymmetric import rsa import OpenSSL import zope.component from acme import client as acme_client from acme import jose from acme import messages import letsencrypt f...
37.923205
84
0.655045
"""Let's Encrypt client API.""" import logging import os from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.asymmetric import rsa import OpenSSL import zope.component from acme import client as acme_client from acme import jose from acme import messages import letsencrypt f...
false
true
f7010e635fd165d115aeb280622b39b947f59dc1
2,239
py
Python
tests/models/test_full_frame_model.py
lsst-sitcom/spot_motion_monitor
3d0242276198126240667ba13e95b7bdf901d053
[ "BSD-3-Clause" ]
null
null
null
tests/models/test_full_frame_model.py
lsst-sitcom/spot_motion_monitor
3d0242276198126240667ba13e95b7bdf901d053
[ "BSD-3-Clause" ]
5
2020-01-08T23:50:22.000Z
2020-02-14T18:15:20.000Z
tests/models/test_full_frame_model.py
lsst-com/spot_motion_monitor
3d0242276198126240667ba13e95b7bdf901d053
[ "MIT" ]
null
null
null
# This file is part of spot_motion_monitor. # # Developed for LSST System Integration, Test and Commissioning. # # See the LICENSE file at the top-level directory of this distribution # for details of code ownership. # # Use of this source code is governed by a 3-clause BSD-style # license that can be found in the LICE...
35.539683
72
0.6954
import numpy as np import pytest from spot_motion_monitor.camera.gaussian_camera import GaussianCamera from spot_motion_monitor.models import FullFrameModel from spot_motion_monitor.utils import FrameRejected, TimeHandler class TestFullFrameModel(): def setup_class(cls): cls.model = FullFrameMo...
true
true
f7010e9f11d3af9bdc7566f2be0adab9c6000069
6,529
py
Python
addons14/github_connector_odoo/models/odoo_module.py
odoochain/addons_oca
55d456d798aebe16e49b4a6070765f206a8885ca
[ "MIT" ]
1
2021-06-10T14:59:13.000Z
2021-06-10T14:59:13.000Z
addons14/github_connector_odoo/models/odoo_module.py
odoochain/addons_oca
55d456d798aebe16e49b4a6070765f206a8885ca
[ "MIT" ]
null
null
null
addons14/github_connector_odoo/models/odoo_module.py
odoochain/addons_oca
55d456d798aebe16e49b4a6070765f206a8885ca
[ "MIT" ]
1
2021-04-09T09:44:44.000Z
2021-04-09T09:44:44.000Z
# Copyright (C) 2016-Today: Odoo Community Association (OCA) # @author: Sylvain LE GAL (https://twitter.com/legalsylvain) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import _, api, fields, models from odoo.tools import html_sanitize class OdooModule(models.Model): _inherit = "a...
35.873626
88
0.642824
from odoo import _, api, fields, models from odoo.tools import html_sanitize class OdooModule(models.Model): _inherit = "abstract.action.mixin" _name = "odoo.module" _description = "Odoo Module" _order = "technical_name, name" name = fields.Char( string="Name", store=True, readon...
true
true
f7010ed84f58c84788493d098b72557b60251c87
3,678
py
Python
loss/general_adaptive_loss.py
jmendozais/SDSSDepth
7a4d0c5affef3eda7056876ccb2365ac883c08eb
[ "MIT" ]
null
null
null
loss/general_adaptive_loss.py
jmendozais/SDSSDepth
7a4d0c5affef3eda7056876ccb2365ac883c08eb
[ "MIT" ]
null
null
null
loss/general_adaptive_loss.py
jmendozais/SDSSDepth
7a4d0c5affef3eda7056876ccb2365ac883c08eb
[ "MIT" ]
null
null
null
import sys import math import os import torch import torchvision import numpy as np from pkg_resources import resource_stream def interpolate1d(x, values, tangents): ''' Returns: Returns the interpolated or extrapolated values for each query point, depending on whether or not the query lies w...
30.907563
132
0.63404
import sys import math import os import torch import torchvision import numpy as np from pkg_resources import resource_stream def interpolate1d(x, values, tangents): assert torch.is_tensor(x) assert torch.is_tensor(values) assert torch.is_tensor(tangents) float_dtype = x.dtype assert values.dtype...
true
true
f701108071e5e40645215cbd4bf739ccb6950fce
10,977
py
Python
topi/python/topi/x86/conv2d_int8.py
byungchul/tvm
ce72e9b552c14e9636e43782ccb3732d00fa0b6b
[ "Apache-2.0" ]
1
2019-10-17T02:08:41.000Z
2019-10-17T02:08:41.000Z
topi/python/topi/x86/conv2d_int8.py
byungchul/tvm
ce72e9b552c14e9636e43782ccb3732d00fa0b6b
[ "Apache-2.0" ]
null
null
null
topi/python/topi/x86/conv2d_int8.py
byungchul/tvm
ce72e9b552c14e9636e43782ccb3732d00fa0b6b
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
41.422642
99
0.620388
import re import tvm from tvm import autotvm from tvm.autotvm.task import get_config from tvm.autotvm.task.topi_integration import deserialize_args from ..nn.conv2d import _get_workload as _get_conv2d_workload from .. import generic, tag from ..generic import conv2d as conv2d_generic from ..util impor...
true
true
f701112398e218e571982191d312507cf5df31ed
3,344
py
Python
scripts/us_census/acs5yr/subject_tables/s2201/process_test.py
rpatil524/data
9e76c7f22a75ad4e52522444a080ed3f5c6da7dd
[ "Apache-2.0" ]
null
null
null
scripts/us_census/acs5yr/subject_tables/s2201/process_test.py
rpatil524/data
9e76c7f22a75ad4e52522444a080ed3f5c6da7dd
[ "Apache-2.0" ]
null
null
null
scripts/us_census/acs5yr/subject_tables/s2201/process_test.py
rpatil524/data
9e76c7f22a75ad4e52522444a080ed3f5c6da7dd
[ "Apache-2.0" ]
null
null
null
"""Tests for py. for S2201""" import csv import json import os import tempfile import sys import unittest _CODEDIR = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(1, os.path.join(_CODEDIR, '.')) from .process import * _FEATURES = os.path.join(_CODEDIR, 'features.json') _STAT_VAR_LIST = os.path.join(_C...
37.573034
80
0.60945
import csv import json import os import tempfile import sys import unittest _CODEDIR = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(1, os.path.join(_CODEDIR, '.')) from .process import * _FEATURES = os.path.join(_CODEDIR, 'features.json') _STAT_VAR_LIST = os.path.join(_CODEDIR, 'stat_vars.csv') _TEST...
true
true
f7011160286db7888ac43e640bc9ad5f0b9698f2
661
py
Python
endpoints/get_news/get_news_validator.py
Maurck/fisinius
15b05c5f4dfcef1adb96e3d862ceab0cb557eae2
[ "Apache-2.0" ]
null
null
null
endpoints/get_news/get_news_validator.py
Maurck/fisinius
15b05c5f4dfcef1adb96e3d862ceab0cb557eae2
[ "Apache-2.0" ]
null
null
null
endpoints/get_news/get_news_validator.py
Maurck/fisinius
15b05c5f4dfcef1adb96e3d862ceab0cb557eae2
[ "Apache-2.0" ]
null
null
null
from utils.utils import validate_parameters get_news_query_schema = { "from": { "type": "integer", 'coerce': int, "min": 0, "max": 10000, "required": False, "default": 0 }, "limit": { "type": "integer", 'coerce': int, "min": 0, ...
22.033333
96
0.535552
from utils.utils import validate_parameters get_news_query_schema = { "from": { "type": "integer", 'coerce': int, "min": 0, "max": 10000, "required": False, "default": 0 }, "limit": { "type": "integer", 'coerce': int, "min": 0, ...
true
true
f7011278b1528d3d413eabf108ce7a8df5d2333a
1,543
py
Python
dataset/cut_chime.py
dzungcamlang/noise_adversarial_tacotron
7a7fda49eb8bf82f5139743d55639d48ff204e9e
[ "MIT" ]
11
2019-11-25T12:16:39.000Z
2020-11-05T15:47:13.000Z
dataset/cut_chime.py
yqlihust/noise_adversarial_tacotron
7a7fda49eb8bf82f5139743d55639d48ff204e9e
[ "MIT" ]
null
null
null
dataset/cut_chime.py
yqlihust/noise_adversarial_tacotron
7a7fda49eb8bf82f5139743d55639d48ff204e9e
[ "MIT" ]
3
2021-04-28T04:59:04.000Z
2022-01-05T12:22:03.000Z
import hp from pathlib import Path import numpy as np from tqdm import tqdm import librosa import torch import librosa.filters import numpy as np import scipy from random import randint from os import makedirs def load_wav(path, sample_rate): return librosa.core.load(path, sr=sample_rate)[0] def save_wav(wav, p...
24.492063
98
0.659106
import hp from pathlib import Path import numpy as np from tqdm import tqdm import librosa import torch import librosa.filters import numpy as np import scipy from random import randint from os import makedirs def load_wav(path, sample_rate): return librosa.core.load(path, sr=sample_rate)[0] def save_wav(wav, p...
true
true
f70112c4c7f82558c05500b63c0f7f128ba47bdd
282
py
Python
testsuite/render-material-layer/run.py
LongerVision/OpenShadingLanguage
30d2a4a089c5c9d521b27519329c205763dfe483
[ "BSD-3-Clause" ]
1,105
2015-01-02T20:47:19.000Z
2021-01-25T13:20:56.000Z
testsuite/render-material-layer/run.py
LongerVision/OpenShadingLanguage
30d2a4a089c5c9d521b27519329c205763dfe483
[ "BSD-3-Clause" ]
696
2015-01-07T23:42:08.000Z
2021-01-25T03:55:08.000Z
testsuite/render-material-layer/run.py
LongerVision/OpenShadingLanguage
30d2a4a089c5c9d521b27519329c205763dfe483
[ "BSD-3-Clause" ]
248
2015-01-05T13:41:28.000Z
2021-01-24T23:29:55.000Z
# Copyright Contributors to the Open Shading Language project. # SPDX-License-Identifier: BSD-3-Clause # https://github.com/AcademySoftwareFoundation/OpenShadingLanguage #!/usr/bin/python outputs = [ "out.exr" ] command = testrender("-r 320 240 -aa 4 material-layer.xml out.exr")
35.25
67
0.762411
outputs = [ "out.exr" ] command = testrender("-r 320 240 -aa 4 material-layer.xml out.exr")
true
true
f7011338d453f21f4330747e8cafd3b46da5df53
28,469
py
Python
openaset/dpupr/admin.py
muntaza/Open-Aset
f5eb6770a9f7184e3860a18cd655b35b248a9dd5
[ "BSD-2-Clause" ]
null
null
null
openaset/dpupr/admin.py
muntaza/Open-Aset
f5eb6770a9f7184e3860a18cd655b35b248a9dd5
[ "BSD-2-Clause" ]
null
null
null
openaset/dpupr/admin.py
muntaza/Open-Aset
f5eb6770a9f7184e3860a18cd655b35b248a9dd5
[ "BSD-2-Clause" ]
2
2019-02-18T05:25:23.000Z
2021-02-01T16:45:23.000Z
### $Id: admin.py,v 1.5 2017/12/18 09:12:51 muntaza Exp $ from django.contrib import admin from umum.models import Provinsi, Kabupaten, LokasiBidang, SKPD, SUBSKPD, KodeBarang, HakTanah, SatuanBarang, KeadaanBarang, SKPenghapusan, MutasiBerkurang, JenisPemanfaatan, AsalUsul, Tahun, GolonganBarang, Tanah, KontrakTanah,...
40.496444
357
0.801012
deBarang, HakTanah, SatuanBarang, KeadaanBarang, SKPenghapusan, MutasiBerkurang, JenisPemanfaatan, AsalUsul, Tahun, GolonganBarang, Tanah, KontrakTanah, PenghapusanTanah, TanahPenghapusan, PemanfaatanTanah, TanahPemanfaatan, HargaTanah, TahunBerkurangUsulHapusTanah, TanahUsulHapus TanahDPUPR, KontrakTanahDPUPR, Harga...
true
true
f70113c43d8703cf4d54d5b5d27b33e786dc3768
6,757
py
Python
Detector_1/fusion_detecting.py
JaeyoonSSim/Design-Project
8a0037bec50b44b3f5d92da5254e79964fdaf9cf
[ "MIT" ]
null
null
null
Detector_1/fusion_detecting.py
JaeyoonSSim/Design-Project
8a0037bec50b44b3f5d92da5254e79964fdaf9cf
[ "MIT" ]
null
null
null
Detector_1/fusion_detecting.py
JaeyoonSSim/Design-Project
8a0037bec50b44b3f5d92da5254e79964fdaf9cf
[ "MIT" ]
null
null
null
import cv2 import sys import os import numpy as np import time # Initialize the parameters confThreshold = 0.5 # Confidence threshold nmsThreshold = 0.4 # Non-maximum suppression threshold inpWidth = 416 # Width of network's input image inpHeight = 416 # Height of network's input image startin...
34.829897
115
0.637413
import cv2 import sys import os import numpy as np import time confThreshold = 0.5 nmsThreshold = 0.4 inpWidth = 416 inpHeight = 416 # Height of network's input image starting_time = 0 frame_id = 0 font = cv2.FONT_HERSHEY_PLAIN classesFile = "coco.names" classes = None with open(classe...
true
true
f701144532a32d57093b84a8487c8cd5c89881c1
166,327
py
Python
eventstore_grpc/proto/ClientMessageDtos_pb2.py
jmshnds/eventstore_grpc
cf6a5978bcdf5bb725a569b7373ce15ee4babb25
[ "MIT" ]
6
2021-02-04T15:48:28.000Z
2021-12-26T03:04:26.000Z
eventstore_grpc/proto/ClientMessageDtos_pb2.py
jmshnds/eventstore_grpc
cf6a5978bcdf5bb725a569b7373ce15ee4babb25
[ "MIT" ]
1
2021-04-14T00:06:25.000Z
2021-04-14T07:28:34.000Z
eventstore_grpc/proto/ClientMessageDtos_pb2.py
jmshnds/eventstore_grpc
cf6a5978bcdf5bb725a569b7373ce15ee4babb25
[ "MIT" ]
1
2021-04-14T17:22:54.000Z
2021-04-14T17:22:54.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: ClientMessageDtos.proto """Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from goo...
47.671826
14,798
0.775046
from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() ...
true
true
f70114a063899ff6cb8eac32ecc128bfe7a8b6c9
1,626
py
Python
mmdet3d/datasets/pipelines/__init__.py
Bachmvp/mmdetection3d
b5b1a15a885eee92749e60a5837e2ce4918119f8
[ "Apache-2.0" ]
10
2021-09-13T13:07:37.000Z
2022-03-15T06:46:30.000Z
mmdet3d/datasets/pipelines/__init__.py
Bachmvp/mmdetection3d
b5b1a15a885eee92749e60a5837e2ce4918119f8
[ "Apache-2.0" ]
1
2021-11-10T07:14:32.000Z
2021-11-10T07:14:32.000Z
mmdet3d/datasets/pipelines/__init__.py
Bachmvp/mmdetection3d
b5b1a15a885eee92749e60a5837e2ce4918119f8
[ "Apache-2.0" ]
1
2021-09-01T08:27:24.000Z
2021-09-01T08:27:24.000Z
from mmdet.datasets.pipelines import Compose from .dbsampler import DataBaseSampler from .formating import Collect3D, DefaultFormatBundle, DefaultFormatBundle3D from .loading import (LoadAnnotations3D, LoadImageFromFileMono3D, LoadMultiViewImageFromFiles, LoadPointsFromFile, ...
56.068966
77
0.706027
from mmdet.datasets.pipelines import Compose from .dbsampler import DataBaseSampler from .formating import Collect3D, DefaultFormatBundle, DefaultFormatBundle3D from .loading import (LoadAnnotations3D, LoadImageFromFileMono3D, LoadMultiViewImageFromFiles, LoadPointsFromFile, ...
true
true
f70116b8f8fe8a44b68b426b5ed9ac2fcd18afd4
3,784
py
Python
tests/unit/test_views.py
awhileback/wagtail-personalisation
b84b5f9f9e29b8c6efa60b4002af8d8529565a5e
[ "MIT" ]
68
2018-01-26T22:02:09.000Z
2022-03-23T08:08:54.000Z
tests/unit/test_views.py
awhileback/wagtail-personalisation
b84b5f9f9e29b8c6efa60b4002af8d8529565a5e
[ "MIT" ]
46
2018-05-26T09:26:30.000Z
2022-02-04T15:17:45.000Z
tests/unit/test_views.py
awhileback/wagtail-personalisation
b84b5f9f9e29b8c6efa60b4002af8d8529565a5e
[ "MIT" ]
27
2018-03-28T10:14:26.000Z
2022-02-08T20:54:00.000Z
import pytest from django.core.exceptions import PermissionDenied from django.urls import reverse from wagtail.core.models import Page from wagtail_personalisation.models import Segment from wagtail_personalisation.rules import VisitCountRule from wagtail_personalisation.views import ( SegmentModelAdmin, SegmentMo...
34.09009
91
0.732558
import pytest from django.core.exceptions import PermissionDenied from django.urls import reverse from wagtail.core.models import Page from wagtail_personalisation.models import Segment from wagtail_personalisation.rules import VisitCountRule from wagtail_personalisation.views import ( SegmentModelAdmin, SegmentMo...
true
true
f701181c6eef70d93952ea9363a6ca7cc7ec5a6b
892
py
Python
sa/profiles/HP/1910/get_chassis_id.py
xUndero/noc
9fb34627721149fcf7064860bd63887e38849131
[ "BSD-3-Clause" ]
1
2019-09-20T09:36:48.000Z
2019-09-20T09:36:48.000Z
sa/profiles/HP/1910/get_chassis_id.py
ewwwcha/noc
aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb
[ "BSD-3-Clause" ]
null
null
null
sa/profiles/HP/1910/get_chassis_id.py
ewwwcha/noc
aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # --------------------------------------------------------------------- # HP.1910.get_chassis_id # --------------------------------------------------------------------- # Copyright (C) 2007-2018 The NOC Project # See LICENSE for details # ---------------------------------------------------------...
30.758621
74
0.516816
import re from noc.core.script.base import BaseScript from noc.sa.interfaces.igetchassisid import IGetChassisID class Script(BaseScript): name = "HP.1910.get_chassis_id" interface = IGetChassisID cache = True rx_mac = re.compile(r"^MAC_ADDRESS\s+:\s+(?P<mac>\S+)$", re.MULTILINE) def e...
true
true
f701185265bce3cd160efe75f4ec708cd0600c87
1,661
py
Python
day-14/part-2/skasch.py
lypnol/adventofcode-2021
8ba277d698e8c59ca9cd554acc135473f5964b87
[ "MIT" ]
6
2021-11-29T15:32:27.000Z
2021-12-10T12:24:26.000Z
day-14/part-2/skasch.py
lypnol/adventofcode-2021
8ba277d698e8c59ca9cd554acc135473f5964b87
[ "MIT" ]
9
2021-11-29T15:38:04.000Z
2021-12-13T14:54:16.000Z
day-14/part-2/skasch.py
lypnol/adventofcode-2021
8ba277d698e8c59ca9cd554acc135473f5964b87
[ "MIT" ]
3
2021-12-02T19:11:44.000Z
2021-12-22T20:52:47.000Z
import collections import functools from typing import Dict, List, Tuple, Counter from tool.runners.python import SubmissionPy def parse(s: str) -> Tuple[List[str], Dict[Tuple[str, str], str]]: lines = s.splitlines() initial = list(lines[0].strip()) mapping = {} for line in lines[2:]: if strip...
22.753425
85
0.562914
import collections import functools from typing import Dict, List, Tuple, Counter from tool.runners.python import SubmissionPy def parse(s: str) -> Tuple[List[str], Dict[Tuple[str, str], str]]: lines = s.splitlines() initial = list(lines[0].strip()) mapping = {} for line in lines[2:]: if strip...
true
true
f70118caf8da746f26ed1648131b1be816543fa5
575
py
Python
alembic_dvc/versions/7fb7364b821a_add_username_to_loadtbl.py
ASUPychron/pychron
dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76
[ "Apache-2.0" ]
31
2016-03-07T02:38:17.000Z
2022-02-14T18:23:43.000Z
alembic_dvc/versions/7fb7364b821a_add_username_to_loadtbl.py
ASUPychron/pychron
dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76
[ "Apache-2.0" ]
1,626
2015-01-07T04:52:35.000Z
2022-03-25T19:15:59.000Z
alembic_dvc/versions/7fb7364b821a_add_username_to_loadtbl.py
UIllinoisHALPychron/pychron
f21b79f4592a9fb9dc9a4cb2e4e943a3885ededc
[ "Apache-2.0" ]
26
2015-05-23T00:10:06.000Z
2022-03-07T16:51:57.000Z
"""add username to LoadTbl Revision ID: 7fb7364b821a Revises: 090128c02529 Create Date: 2018-10-24 17:10:03.781293 """ # revision identifiers, used by Alembic. revision = '7fb7364b821a' down_revision = '090128c02529' import sqlalchemy as sa from alembic import op def upgrade(): op.add_column('LoadTbl', sa.Col...
23
89
0.721739
revision = '7fb7364b821a' down_revision = '090128c02529' import sqlalchemy as sa from alembic import op def upgrade(): op.add_column('LoadTbl', sa.Column('username', sa.String(45))) op.create_foreign_key('LoadTbl_ibfk_2', 'LoadTbl', 'UserTbl', ['username'], ['name']) def downgrade(): op.drop_constrai...
true
true
f701193abbbd8212633c24070a0c820f58c3a73c
877
py
Python
test/run/t519.py
timmartin/skulpt
2e3a3fbbaccc12baa29094a717ceec491a8a6750
[ "MIT" ]
2,671
2015-01-03T08:23:25.000Z
2022-03-31T06:15:48.000Z
test/run/t519.py
timmartin/skulpt
2e3a3fbbaccc12baa29094a717ceec491a8a6750
[ "MIT" ]
972
2015-01-05T08:11:00.000Z
2022-03-29T13:47:15.000Z
test/run/t519.py
timmartin/skulpt
2e3a3fbbaccc12baa29094a717ceec491a8a6750
[ "MIT" ]
845
2015-01-03T19:53:36.000Z
2022-03-29T18:34:22.000Z
l = ['h','e','l','l','o'] print (l.index('l')) print (l.index('l', 2)) print (l.index('l', 3)) print (l.index('l', 2, 3)) print (l.index('l', 3, 4)) print (l.index('l', 2, -1)) print (l.index('l', 2, -2)) print (l.index('l', 3, -1)) try: print (l.index('l', 4)) except ValueError as e: print (repr(e)) try: ...
17.196078
32
0.54618
l = ['h','e','l','l','o'] print (l.index('l')) print (l.index('l', 2)) print (l.index('l', 3)) print (l.index('l', 2, 3)) print (l.index('l', 3, 4)) print (l.index('l', 2, -1)) print (l.index('l', 2, -2)) print (l.index('l', 3, -1)) try: print (l.index('l', 4)) except ValueError as e: print (repr(e)) try: ...
true
true
f7011a28257c086b1275554dce2bc8bf4e03d72f
3,972
py
Python
src/genie/libs/parser/ios/c7600/tests/ShowModule/cli/equal/golden_output_expected.py
danielgraziano/genieparser
74d5e1ded9794561af1ac3284307c58365617673
[ "Apache-2.0" ]
4
2020-08-20T12:23:12.000Z
2021-06-15T14:10:02.000Z
src/genie/libs/parser/ios/c7600/tests/ShowModule/cli/equal/golden_output_expected.py
dalwar23/genieparser
a9df45d3ee23f107bfb55915068e90782f92fc99
[ "Apache-2.0" ]
119
2020-07-10T22:37:51.000Z
2021-03-18T02:40:05.000Z
src/genie/libs/parser/ios/c7600/tests/ShowModule/cli/equal/golden_output_expected.py
dalwar23/genieparser
a9df45d3ee23f107bfb55915068e90782f92fc99
[ "Apache-2.0" ]
2
2021-10-18T20:13:11.000Z
2022-02-07T06:05:28.000Z
expected_output = { 'slot': { '1': { 'lc': { 'card_type': 'CEF720 48 port 10/100/1000mb Ethernet', 'fw_ver': '12.2(14r)S', 'hw_ver': '2.7', 'mac_address_from': '001e.4aff.ee89', 'mac_a...
39.326733
73
0.293807
expected_output = { 'slot': { '1': { 'lc': { 'card_type': 'CEF720 48 port 10/100/1000mb Ethernet', 'fw_ver': '12.2(14r)S', 'hw_ver': '2.7', 'mac_address_from': '001e.4aff.ee89', 'mac_a...
true
true
f7011ccadfb0c0ea55e55f9439fd1c6e5b3146e0
2,473
py
Python
pbutils/test_helpers.py
phonybone/phonybone_utils
d95f226ddfc62a1d69b5ff6f53de86188fe0c8f9
[ "MIT" ]
null
null
null
pbutils/test_helpers.py
phonybone/phonybone_utils
d95f226ddfc62a1d69b5ff6f53de86188fe0c8f9
[ "MIT" ]
null
null
null
pbutils/test_helpers.py
phonybone/phonybone_utils
d95f226ddfc62a1d69b5ff6f53de86188fe0c8f9
[ "MIT" ]
null
null
null
import unittest import importlib from pbutils.streams import warn # Try to import flask settings module: settings = None try: pkg_root = __name__.split('.')[0] settings_modname = '{}.settings'.format(pkg_root) settings = importlib.import_module(settings_modname) except ImportError as e: warn('Unable t...
37.469697
113
0.631217
import unittest import importlib from pbutils.streams import warn settings = None try: pkg_root = __name__.split('.')[0] settings_modname = '{}.settings'.format(pkg_root) settings = importlib.import_module(settings_modname) except ImportError as e: warn('Unable to import {}: {}'.format(settings_modna...
true
true
f7011cec1969964cb938511820c7656d516bea92
22,444
py
Python
azure-mgmt-batch/tests/test_mgmt_batch.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-mgmt-batch/tests/test_mgmt_batch.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-batch/tests/test_mgmt_batch.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2019-06-17T22:18:23.000Z
2019-06-17T22:18:23.000Z
# coding: utf-8 #------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #----------------------------------------------------------------------...
57.255102
2,141
0.740866
import io import logging import time import unittest import requests import azure.mgmt.batch from azure.mgmt.batch import models from azure.common.exceptions import CloudError from mgmt_batch_preparers import KeyVaultPreparer, SimpleBatchPreparer from devtools_testutils import ( AzureMgmtTestCase, Res...
true
true
f7011e2f58481d64d3b47d08cd59dda7a5d57e00
1,021
py
Python
tests/kit/timestamp.py
untzag/WrightTools
05480d2f91ceeca422d9e5ac381fce1840207cb0
[ "MIT" ]
12
2017-07-11T15:58:12.000Z
2021-05-10T20:33:26.000Z
tests/kit/timestamp.py
untzag/WrightTools
05480d2f91ceeca422d9e5ac381fce1840207cb0
[ "MIT" ]
808
2015-04-12T00:36:08.000Z
2022-03-27T21:06:06.000Z
tests/kit/timestamp.py
untzag/WrightTools
05480d2f91ceeca422d9e5ac381fce1840207cb0
[ "MIT" ]
9
2017-07-22T18:54:23.000Z
2022-02-17T20:31:05.000Z
"""Test timestamp.""" # --- import ------------------------------------------------------------------------------------- import WrightTools as wt # --- test --------------------------------------------------------------------------------------- def test_now(): wt.kit.TimeStamp() # exception will be raised ...
20.42
98
0.540646
import WrightTools as wt def test_now(): wt.kit.TimeStamp() def test_utc(): wt.kit.timestamp_from_RFC3339("2017-11-13 16:09:17Z") def test_date(): ts = wt.kit.timestamp_from_RFC3339("2017-11-13 16:09:17-6") assert len(ts.date) == 10 def test_hms(): ts = wt.kit.timestamp_from_RFC3...
true
true
f7011e34147f8bf8224865d41dddee78c3e658d3
4,960
py
Python
hack/release/wizard/poll-mirrors.py
LaudateCorpus1/solr-operator
86107e4c3d2945a15d7f08bbb081eb1418bd6ead
[ "Apache-2.0" ]
103
2019-06-14T20:36:28.000Z
2021-01-12T23:47:54.000Z
hack/release/wizard/poll-mirrors.py
Enterprism/solr-operator
e06464994dbb963db564f65a7d9bec8d0a7fca30
[ "Apache-2.0" ]
127
2019-06-21T16:04:02.000Z
2021-01-12T15:41:42.000Z
hack/release/wizard/poll-mirrors.py
Enterprism/solr-operator
e06464994dbb963db564f65a7d9bec8d0a7fca30
[ "Apache-2.0" ]
44
2019-06-19T23:12:46.000Z
2021-01-06T12:11:41.000Z
#!/usr/bin/env python3 # # vim: softtabstop=2 shiftwidth=2 expandtab # # Python port of poll-mirrors.pl # # This script is designed to poll download sites after posting a release # and print out notice as each becomes available. The RM can use this # script to delay the release announcement until the release can be # ...
29.879518
135
0.688306
import argparse import datetime import ftplib import re import sys import time from urllib.parse import urlparse from multiprocessing import Pool import http.client as http def p(s): sys.stdout.write(s) sys.stdout.flush() def mirror_contains_file(url): url = urlparse(url) if url...
true
true
f7011e8857c6587e833bd628c80b1cdb7915be5c
1,324
py
Python
yb_sysprocs_column_stats.py
eloemosynator/YbEasyCli
b35ebe03da07898cfa06ff687cba29cd83268c31
[ "MIT" ]
null
null
null
yb_sysprocs_column_stats.py
eloemosynator/YbEasyCli
b35ebe03da07898cfa06ff687cba29cd83268c31
[ "MIT" ]
4
2020-06-03T18:11:29.000Z
2022-03-07T20:41:16.000Z
yb_sysprocs_column_stats.py
eloemosynator/YbEasyCli
b35ebe03da07898cfa06ff687cba29cd83268c31
[ "MIT" ]
2
2020-05-27T23:43:03.000Z
2022-03-03T23:16:15.000Z
#!/usr/bin/env python3 """ USAGE: yb_sysprocs_column_stats.py [options] PURPOSE: Table column metdata including estimates from statistics. OPTIONS: See the command line help message for all options. (yb_sysprocs_column_stats.py --help) Output: The report as a formatted table, pipe seper...
33.948718
109
0.674471
from yb_sp_report_util import SPReportUtil class report_column_stats(SPReportUtil): config = { 'description': 'Table column metdata including estimates from statistics.' , 'report_sp_location': 'sysviews' , 'report_default_order': 'table_schema|table_name' , 'required_args_single':...
true
true
f7011fcabf6ac4b97fa6842e6d6194f74077db62
12,668
py
Python
sdk/python/pulumi_azure_nextgen/network/v20171101/virtual_network.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/network/v20171101/virtual_network.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/network/v20171101/virtual_network.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
55.078261
2,437
0.68748
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._inputs import * __all__ = ['VirtualNetwork'] class VirtualNetwork(pulumi.CustomResource): def __init__(__self__, res...
true
true
f70120e6a200f8a97e0c72c99bfc18970159cb7d
18,984
py
Python
tests/units/cli/test_cli_utils.py
NiallRees/pipelinewise
47126592ada914e43014f601e237bdbe67f3c581
[ "Apache-2.0" ]
null
null
null
tests/units/cli/test_cli_utils.py
NiallRees/pipelinewise
47126592ada914e43014f601e237bdbe67f3c581
[ "Apache-2.0" ]
null
null
null
tests/units/cli/test_cli_utils.py
NiallRees/pipelinewise
47126592ada914e43014f601e237bdbe67f3c581
[ "Apache-2.0" ]
null
null
null
import os import re import pipelinewise.cli as cli import pytest VIRTUALENVS_DIR = './virtualenvs-dummy' # pylint: disable=no-self-use,fixme class TestUtils: """ Unit Tests for PipelineWise CLI utility functions """ def test_json_detectors(self): """Testing JSON detector functions""" ...
50.08971
119
0.619838
import os import re import pipelinewise.cli as cli import pytest VIRTUALENVS_DIR = './virtualenvs-dummy' class TestUtils: def test_json_detectors(self): assert cli.utils.is_json('{Invalid JSON}') is False assert cli.utils.is_json('[]') is True assert cli.utils.is_json('{}') is True ...
true
true
f701215b2d9a89de6d65a883700283d7fc6edbc1
16,911
py
Python
salt/states/boto_kinesis.py
l2ol33rt/salt
ff68bbd9f4bda992a3e039822fb32f141e94347c
[ "Apache-2.0" ]
1
2021-04-05T19:46:35.000Z
2021-04-05T19:46:35.000Z
salt/states/boto_kinesis.py
dv-trading/salt
f5d4334178c50d0dfcd205d5a7fb9cfb27fd369e
[ "Apache-2.0" ]
null
null
null
salt/states/boto_kinesis.py
dv-trading/salt
f5d4334178c50d0dfcd205d5a7fb9cfb27fd369e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Manage Kinesis Streams ====================== .. versionadded:: Nitrogen Create and destroy Kinesis streams. Be aware that this interacts with Amazon's services, and so may incur charges. This module uses ``boto3``, which can be installed via package, or pip. This module accepts explicit...
37.747768
117
0.567619
from __future__ import absolute_import import logging log = logging.getLogger(__name__) def __virtual__(): ret = 'boto_kinesis' if 'boto_kinesis.exists' in __salt__ else False return ret def present(name, retention_hours=None, enhanced_monitoring=None, num_shards=Non...
true
true
f701218da6eab26ef7dfeb0b8ee6c6c220ede8c3
1,890
py
Python
tensorflow_model_optimization/python/core/internal/tensor_encoding/utils/__init__.py
akarmi/model-optimization
2d3faaa361ecb3639f4a29da56e0e6ed52336318
[ "Apache-2.0" ]
1
2019-10-10T06:14:45.000Z
2019-10-10T06:14:45.000Z
tensorflow_model_optimization/python/core/internal/tensor_encoding/utils/__init__.py
akarmi/model-optimization
2d3faaa361ecb3639f4a29da56e0e6ed52336318
[ "Apache-2.0" ]
null
null
null
tensorflow_model_optimization/python/core/internal/tensor_encoding/utils/__init__.py
akarmi/model-optimization
2d3faaa361ecb3639f4a29da56e0e6ed52336318
[ "Apache-2.0" ]
1
2020-01-01T04:38:34.000Z
2020-01-01T04:38:34.000Z
# Copyright 2019, 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 appli...
60.967742
123
0.855556
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow_model_optimization.python.core.internal.tensor_encoding.utils.py_utils import assert_compatible from tensorflow_model_optimization.python.core.internal.tensor_encoding.utils.py_uti...
true
true
f70122a218251691a381f37023a3eb25286312ae
4,584
py
Python
experiments/do_data_generation.py
grisoniFr/virtual_libraries
0aac0ce249f6f3bc529abb3cbdf2d3f49be84388
[ "MIT" ]
null
null
null
experiments/do_data_generation.py
grisoniFr/virtual_libraries
0aac0ce249f6f3bc529abb3cbdf2d3f49be84388
[ "MIT" ]
null
null
null
experiments/do_data_generation.py
grisoniFr/virtual_libraries
0aac0ce249f6f3bc529abb3cbdf2d3f49be84388
[ "MIT" ]
null
null
null
import os, sys import time import warnings import argparse import configparser import ast import numpy as np from math import log from rdkit import Chem from rdkit import rdBase rdBase.DisableLog('rdApp.*') from rdkit.Chem import Draw from keras.models import load_model sys.path.append('../src/') from python import h...
30.972973
105
0.602749
import os, sys import time import warnings import argparse import configparser import ast import numpy as np from math import log from rdkit import Chem from rdkit import rdBase rdBase.DisableLog('rdApp.*') from rdkit.Chem import Draw from keras.models import load_model sys.path.append('../src/') from python import h...
true
true
f70122bf0cb6430caec966b97431b6569aafddfc
831
py
Python
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/jdfusion/models/VpcSecurityGroupCreateTask.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
14
2018-04-19T09:53:56.000Z
2022-01-27T06:05:48.000Z
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/jdfusion/models/VpcSecurityGroupCreateTask.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
15
2018-09-11T05:39:54.000Z
2021-07-02T12:38:02.000Z
python_code/vnev/Lib/site-packages/jdcloud_sdk/services/jdfusion/models/VpcSecurityGroupCreateTask.py
Ureimu/weather-robot
7634195af388538a566ccea9f8a8534c5fb0f4b6
[ "MIT" ]
33
2018-04-20T05:29:16.000Z
2022-02-17T09:10:05.000Z
# coding=utf8 # Copyright 2018 JDCLOUD.COM # # 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 ...
29.678571
75
0.719615
class VpcSecurityGroupCreateTask(object): def __init__(self, task=None): self.task = task
true
true
f701237fe9e15e39fca212a577bb10928413d4e7
31,565
py
Python
yolact.py
JosmarSuarez/yolact
43b694603638562ffcdc81df7b04783c9990291c
[ "MIT" ]
3
2020-04-30T06:52:52.000Z
2021-04-29T11:07:26.000Z
yolact.py
JosmarSuarez/yolact
43b694603638562ffcdc81df7b04783c9990291c
[ "MIT" ]
null
null
null
yolact.py
JosmarSuarez/yolact
43b694603638562ffcdc81df7b04783c9990291c
[ "MIT" ]
1
2021-06-18T14:00:21.000Z
2021-06-18T14:00:21.000Z
import torch, torchvision import torch.nn as nn import torch.nn.functional as F from torchvision.models.resnet import Bottleneck import numpy as np from itertools import product from math import sqrt from typing import List from collections import defaultdict from data.config import cfg, mask_type from layers import D...
42.945578
137
0.569555
import torch, torchvision import torch.nn as nn import torch.nn.functional as F from torchvision.models.resnet import Bottleneck import numpy as np from itertools import product from math import sqrt from typing import List from collections import defaultdict from data.config import cfg, mask_type from layers import D...
true
true
f70124509333b85e75d5c224c99a12dd0db65945
5,013
py
Python
jupyterlab_primehub/jupyterlab_primehub/handlers.py
InfuseAI/primehub-job
7a68ac9ff8452c4faa72adf3b73a70270aa5ac65
[ "Apache-2.0" ]
null
null
null
jupyterlab_primehub/jupyterlab_primehub/handlers.py
InfuseAI/primehub-job
7a68ac9ff8452c4faa72adf3b73a70270aa5ac65
[ "Apache-2.0" ]
3
2020-10-26T08:21:02.000Z
2021-07-14T06:06:58.000Z
jupyterlab_primehub/jupyterlab_primehub/handlers.py
InfuseAI/primehub-job
7a68ac9ff8452c4faa72adf3b73a70270aa5ac65
[ "Apache-2.0" ]
null
null
null
import json from jupyterlab.labapp import LabApp from notebook.base.handlers import APIHandler from notebook.utils import url_path_join import tornado from .api import group_info, submit_job, get_env, check_function_set from .utils import get_group_volume_path import os.path from shutil import copyfile from datetime i...
36.064748
167
0.668263
import json from jupyterlab.labapp import LabApp from notebook.base.handlers import APIHandler from notebook.utils import url_path_join import tornado from .api import group_info, submit_job, get_env, check_function_set from .utils import get_group_volume_path import os.path from shutil import copyfile from datetime i...
true
true
f701253b3bcdb175ffd1c5366a57b88a739349f6
572
py
Python
setup.py
bamps53/runai
0c868160f64e1e063c6eb6f660d42917322d40c5
[ "MIT" ]
null
null
null
setup.py
bamps53/runai
0c868160f64e1e063c6eb6f660d42917322d40c5
[ "MIT" ]
null
null
null
setup.py
bamps53/runai
0c868160f64e1e063c6eb6f660d42917322d40c5
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r") as f: long_description = f.read() setuptools.setup( name="runai", version="0.1.2", author="Run:AI", author_email="pypi@run.ai", description="Run:AI Python library", long_description=long_description, long_description_content_type="text/mark...
26
50
0.645105
import setuptools with open("README.md", "r") as f: long_description = f.read() setuptools.setup( name="runai", version="0.1.2", author="Run:AI", author_email="pypi@run.ai", description="Run:AI Python library", long_description=long_description, long_description_content_type="text/mark...
true
true
f70125880c12638569fbea6a73e05ddc5db89908
167
py
Python
majestic-monolith-django/user/urls.py
kokospapa8/majestic-monolith-django
a0879989a651ecef6761ee7fce619ab17738bb35
[ "Apache-2.0" ]
1
2022-03-12T09:55:36.000Z
2022-03-12T09:55:36.000Z
majestic-monolith-django/user/urls.py
kokospapa8/majestic-monolith-django
a0879989a651ecef6761ee7fce619ab17738bb35
[ "Apache-2.0" ]
6
2022-03-09T10:42:44.000Z
2022-03-31T08:27:25.000Z
majestic-monolith-django/user/urls.py
kokospapa8/majestic-monolith-django
a0879989a651ecef6761ee7fce619ab17738bb35
[ "Apache-2.0" ]
null
null
null
from django.urls import path from .views import ( UserSelfView, ) urlpatterns = [ path("users/self/profile/", UserSelfView.as_view(), name="user_self"), ]
13.916667
74
0.682635
from django.urls import path from .views import ( UserSelfView, ) urlpatterns = [ path("users/self/profile/", UserSelfView.as_view(), name="user_self"), ]
true
true
f70125e4f534b2c8fcba77529a3348f860a0cdaf
9,160
py
Python
examples/Nolan/AFRL/Carts/cart106.py
Rapid-Design-of-Systems-Laboratory/beluga-legacy
d14713d8211b64293c4427005cf02fbd58630598
[ "MIT" ]
1
2019-03-26T03:00:03.000Z
2019-03-26T03:00:03.000Z
examples/Nolan/AFRL/Carts/cart106.py
Rapid-Design-of-Systems-Laboratory/beluga-legacy
d14713d8211b64293c4427005cf02fbd58630598
[ "MIT" ]
null
null
null
examples/Nolan/AFRL/Carts/cart106.py
Rapid-Design-of-Systems-Laboratory/beluga-legacy
d14713d8211b64293c4427005cf02fbd58630598
[ "MIT" ]
1
2019-07-14T22:53:52.000Z
2019-07-14T22:53:52.000Z
if __name__ == "__main__": import numpy as np import beluga.Beluga as Beluga import beluga.bvpsol as bvpsol import beluga.bvpsol.algorithms as algorithms import beluga.optim.Problem from beluga.optim.problem import * from beluga.continuation import * import logging # Import Librari...
30.032787
288
0.504476
if __name__ == "__main__": import numpy as np import beluga.Beluga as Beluga import beluga.bvpsol as bvpsol import beluga.bvpsol.algorithms as algorithms import beluga.optim.Problem from beluga.optim.problem import * from beluga.continuation import * import logging from sympy...
true
true
f701263075037165544928938c50df33a6f178da
881
py
Python
src/airbnb_priceforecaster/manage.py
andersbogsnes/airbnb_priceforecaster
f397c16a08fe7eba9977611f4af5352d234a4624
[ "MIT" ]
null
null
null
src/airbnb_priceforecaster/manage.py
andersbogsnes/airbnb_priceforecaster
f397c16a08fe7eba9977611f4af5352d234a4624
[ "MIT" ]
null
null
null
src/airbnb_priceforecaster/manage.py
andersbogsnes/airbnb_priceforecaster
f397c16a08fe7eba9977611f4af5352d234a4624
[ "MIT" ]
null
null
null
from airbnb_priceforecaster.models import train_model from airbnb_priceforecaster.models import build_model from airbnb_priceforecaster.data import AirBnBDataset import click @click.group() def cli(): pass @cli.command() @click.option("-y", "--year", default=2020, type=int) @click.option("-m", "--month", defaul...
25.171429
60
0.692395
from airbnb_priceforecaster.models import train_model from airbnb_priceforecaster.models import build_model from airbnb_priceforecaster.data import AirBnBDataset import click @click.group() def cli(): pass @cli.command() @click.option("-y", "--year", default=2020, type=int) @click.option("-m", "--month", defaul...
true
true
f7012653b3bd41290d7516ca434157dbd84824a7
69,373
py
Python
sympy/functions/elementary/tests/test_trigonometric.py
MarcPartensky/sympy
ca53aee92788e81958fae1ce53a9d9e58bbdadaa
[ "BSD-3-Clause" ]
null
null
null
sympy/functions/elementary/tests/test_trigonometric.py
MarcPartensky/sympy
ca53aee92788e81958fae1ce53a9d9e58bbdadaa
[ "BSD-3-Clause" ]
null
null
null
sympy/functions/elementary/tests/test_trigonometric.py
MarcPartensky/sympy
ca53aee92788e81958fae1ce53a9d9e58bbdadaa
[ "BSD-3-Clause" ]
null
null
null
from sympy import (symbols, Symbol, nan, oo, zoo, I, sinh, sin, pi, atan, acos, Rational, sqrt, asin, acot, coth, E, S, tan, tanh, cos, cosh, atan2, exp, log, asinh, acoth, atanh, O, cancel, Matrix, re, im, Float, Pow, gcd, sec, csc, cot, diff, simplify, Heaviside, arg, conjugate, series...
37.970991
144
0.555346
from sympy import (symbols, Symbol, nan, oo, zoo, I, sinh, sin, pi, atan, acos, Rational, sqrt, asin, acot, coth, E, S, tan, tanh, cos, cosh, atan2, exp, log, asinh, acoth, atanh, O, cancel, Matrix, re, im, Float, Pow, gcd, sec, csc, cot, diff, simplify, Heaviside, arg, conjugate, series...
true
true
f70126b5191645e11ab83f366d3774b7a8cd4bef
27,829
py
Python
contrib/fsl_integration/sct_plugin.py
kousu-1/spinalcordtoolbox
9b1c2179fe31be489dab7f08c43e9bd5902931c0
[ "MIT" ]
null
null
null
contrib/fsl_integration/sct_plugin.py
kousu-1/spinalcordtoolbox
9b1c2179fe31be489dab7f08c43e9bd5902931c0
[ "MIT" ]
null
null
null
contrib/fsl_integration/sct_plugin.py
kousu-1/spinalcordtoolbox
9b1c2179fe31be489dab7f08c43e9bd5902931c0
[ "MIT" ]
null
null
null
# coding=utf-8 ######################################################################################### # This code provides SCT integration into FSLeyes for the following tools: # # - sct_propseg # - sct_deepseg_gm # - sct_deepseg_sc # - sct_label_vertebrae # - sct_register_to_template # - sct_proce...
38.705146
153
0.622839
png = wx.Image(logo_file, wx.BITMAP_TYPE_ANY).ConvertToBitmap() img_logo = wx.StaticBitmap(self, -1, png, wx.DefaultPosition, (png.GetWidth(), png.GetHeight())) return img_logo def get_description(self): txt_style = wx.VSCROL...
true
true
f70127728f34971adc084ca3467eeab69cdeec01
2,441
py
Python
huaweicloud-sdk-sms/huaweicloudsdksms/v3/model/update_task_status_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
64
2020-06-12T07:05:07.000Z
2022-03-30T03:32:50.000Z
huaweicloud-sdk-sms/huaweicloudsdksms/v3/model/update_task_status_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
11
2020-07-06T07:56:54.000Z
2022-01-11T11:14:40.000Z
huaweicloud-sdk-sms/huaweicloudsdksms/v3/model/update_task_status_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
24
2020-06-08T11:42:13.000Z
2022-03-04T06:44:08.000Z
# coding: utf-8 import re import six from huaweicloudsdkcore.sdk_response import SdkResponse from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class UpdateTaskStatusResponse(SdkResponse): """ Attributes: openapi_types (dict): The key is attribute name ...
28.383721
79
0.552233
import re import six from huaweicloudsdkcore.sdk_response import SdkResponse from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class UpdateTaskStatusResponse(SdkResponse): sensitive_list = [] openapi_types = { } attribute_map = { } def __init__(self): ...
true
true
f701278cdccca27a655b9dcb4c115270db374458
1,472
py
Python
freshmaker/handlers/internal/__init__.py
mulaievaRH/freshmaker
809b435d7cab1907eb74ecd898693835a92db9d8
[ "MIT" ]
5
2020-06-17T11:29:16.000Z
2022-03-24T07:20:16.000Z
freshmaker/handlers/internal/__init__.py
ronnyhlim/freshmaker
b7635dcfe631759e917c85e6ef6654024a3fb91c
[ "MIT" ]
96
2020-06-29T15:01:23.000Z
2022-03-30T08:07:06.000Z
freshmaker/handlers/internal/__init__.py
ronnyhlim/freshmaker
b7635dcfe631759e917c85e6ef6654024a3fb91c
[ "MIT" ]
20
2020-06-16T01:30:08.000Z
2022-02-19T15:34:55.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2017 Red Hat, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modi...
56.615385
100
0.799592
from .update_db_on_advisory_change import UpdateDBOnAdvisoryChange from .generate_advisory_signed_event_on_rpm_sign import GenerateAdvisorySignedEventOnRPMSign from .update_db_on_odcs_compose_fail import UpdateDBOnODCSComposeFail from .cancel_event_on_freshmaker_manage_request import CancelEv...
true
true
f701278f4a4a911c0820ec5f68a982b36d79019f
219
py
Python
ppr-api/src/utils/datetime.py
gh2os/ppr
9f67321baa5bbb450ac5e06755e2838497a2cf96
[ "Apache-2.0" ]
null
null
null
ppr-api/src/utils/datetime.py
gh2os/ppr
9f67321baa5bbb450ac5e06755e2838497a2cf96
[ "Apache-2.0" ]
2
2020-03-18T23:26:53.000Z
2020-03-18T23:40:19.000Z
ppr-api/src/utils/datetime.py
gh2os/ppr
9f67321baa5bbb450ac5e06755e2838497a2cf96
[ "Apache-2.0" ]
null
null
null
import datetime import time import pytz PACIFIC_TZ = pytz.timezone('America/Vancouver') def today_pacific(): now_pacific = datetime.datetime.fromtimestamp(time.time(), PACIFIC_TZ) return now_pacific.date()
16.846154
74
0.762557
import datetime import time import pytz PACIFIC_TZ = pytz.timezone('America/Vancouver') def today_pacific(): now_pacific = datetime.datetime.fromtimestamp(time.time(), PACIFIC_TZ) return now_pacific.date()
true
true
f701283274220115b63b69d493059573a505dd5c
4,698
py
Python
pybrain/tools/functions.py
metabacchi/FuzzyClassificator
f59c10364b872edce342403db6ef26e30d7f69b8
[ "MIT" ]
48
2015-01-02T12:52:58.000Z
2022-02-21T01:05:10.000Z
pybrain/tools/functions.py
metabacchi/FuzzyClassificator
f59c10364b872edce342403db6ef26e30d7f69b8
[ "MIT" ]
null
null
null
pybrain/tools/functions.py
metabacchi/FuzzyClassificator
f59c10364b872edce342403db6ef26e30d7f69b8
[ "MIT" ]
10
2015-04-05T03:44:59.000Z
2022-03-30T02:19:10.000Z
__author__ = 'Tom Schaul, tom@idsia.ch' from scipy import array, exp, tanh, clip, log, dot, sqrt, power, pi, tan, diag, rand, real_if_close from scipy.linalg import inv, det, svd, logm, expm2 def semilinear(x): """ This function ensures that the values of the array are always positive. It is x+1 for x=>0...
30.115385
107
0.578118
__author__ = 'Tom Schaul, tom@idsia.ch' from scipy import array, exp, tanh, clip, log, dot, sqrt, power, pi, tan, diag, rand, real_if_close from scipy.linalg import inv, det, svd, logm, expm2 def semilinear(x): try: shape = x.shape x.flatten() x = x.tolist() except AttributeE...
true
true
f7012832763745f5716873aa165b3bd66774aa82
9,525
py
Python
opacus/tests/ddp_hook_check.py
RQuispeC/opacus
5c83d59fc169e93667946204f7a6859827a38ace
[ "Apache-2.0" ]
null
null
null
opacus/tests/ddp_hook_check.py
RQuispeC/opacus
5c83d59fc169e93667946204f7a6859827a38ace
[ "Apache-2.0" ]
null
null
null
opacus/tests/ddp_hook_check.py
RQuispeC/opacus
5c83d59fc169e93667946204f7a6859827a38ace
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import os import sys import unittest import torch import torch.distributed as dist import torch.multiprocessing as mp import torch.nn as nn import torch.optim as optim from opacus import PrivacyEngine from opacus.distributed ...
31.026059
113
0.64357
import os import sys import unittest import torch import torch.distributed as dist import torch.multiprocessing as mp import torch.nn as nn import torch.optim as optim from opacus import PrivacyEngine from opacus.distributed import DifferentiallyPrivateDistributedDataParallel as DPDDP from torch.nn.parallel import D...
true
true
f70128589f0532bb05af79995e8f8a3a096cb6b4
2,081
py
Python
motion_sensor.py
arkochatterjee/motion-sensor
69366d5f5ad33ce2a8e26dedb57074a1f40ca603
[ "MIT" ]
1
2020-05-14T07:16:01.000Z
2020-05-14T07:16:01.000Z
motion_sensor.py
arkochatterjee/motion-sensor
69366d5f5ad33ce2a8e26dedb57074a1f40ca603
[ "MIT" ]
null
null
null
motion_sensor.py
arkochatterjee/motion-sensor
69366d5f5ad33ce2a8e26dedb57074a1f40ca603
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sat Dec 16 19:55:29 2017 @author: Arko Chatterjee """ import datetime import imutils import time import cv2 camera = cv2.VideoCapture(0) time.sleep(0.50) print("Hello!") firstFrame = None # loop over the frames of the video while True: # grab the current fr...
25.378049
91
0.658818
import datetime import imutils import time import cv2 camera = cv2.VideoCapture(0) time.sleep(0.50) print("Hello!") firstFrame = None while True: (grabbed, frame) = camera.read() text = "Unossssccupied" if not grabbed: break frame = imutils.resize(frame, width=500) gray = cv2....
true
true
f70128e8a84d420b105cc3b9c456a7da52f802bb
1,507
py
Python
dev/Gems/CloudGemFramework/v1/AWS/common-code/ServiceClient_Python/test/test_unit_service_client.py
brianherrera/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
[ "AML" ]
1,738
2017-09-21T10:59:12.000Z
2022-03-31T21:05:46.000Z
dev/Gems/CloudGemFramework/v1/AWS/common-code/ServiceClient_Python/test/test_unit_service_client.py
olivier-be/lumberyard
3d688932f919dbf5821f0cb8a210ce24abe39e9e
[ "AML" ]
427
2017-09-29T22:54:36.000Z
2022-02-15T19:26:50.000Z
dev/Gems/CloudGemFramework/v1/AWS/common-code/ServiceClient_Python/test/test_unit_service_client.py
olivier-be/lumberyard
3d688932f919dbf5821f0cb8a210ce24abe39e9e
[ "AML" ]
671
2017-09-21T08:04:01.000Z
2022-03-29T14:30:07.000Z
# # All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or # its licensors. # # For complete copyright and license terms please see the LICENSE at the root of this # distribution (the "License"). All use of this software is governed by the License, # or, if provided, by the license below or th...
36.756098
85
0.752488
ort unittest from unittest import mock import cgf_service_client class UnitTest_CloudGemFramework_ServiceClient_service_client(unittest.TestCase): def test_service_client_imports(self): self.assertIsNotNone(cgf_service_client.Data) self.assertIsNotNone(cgf_service_client.Path) ...
true
true
f70128eaa726355d32230de7fc3c58190f5ad3f0
163
py
Python
aspc/wsgi.py
DDKZ/mainsite
425a8e147a17b6bdd1af420460a9ea83462252fc
[ "MIT" ]
8
2015-09-27T07:57:32.000Z
2018-10-28T06:08:40.000Z
aspc/wsgi.py
DDKZ/mainsite
425a8e147a17b6bdd1af420460a9ea83462252fc
[ "MIT" ]
132
2015-01-17T01:22:09.000Z
2018-11-13T22:05:32.000Z
aspc/wsgi.py
DDKZ/mainsite
425a8e147a17b6bdd1af420460a9ea83462252fc
[ "MIT" ]
20
2015-01-16T04:32:30.000Z
2018-09-03T22:55:05.000Z
import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "aspc.settings") from django.core.wsgi import get_wsgi_application application = get_wsgi_application()
27.166667
64
0.834356
import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "aspc.settings") from django.core.wsgi import get_wsgi_application application = get_wsgi_application()
true
true
f70129a6d927002f9ee9bd1305429827f5cd6c84
1,712
py
Python
mnist/app/app/mnist.py
scpepper69/ml
13ad41dd7b22d3fa152cf3665fc4dc7c1c747917
[ "MIT" ]
null
null
null
mnist/app/app/mnist.py
scpepper69/ml
13ad41dd7b22d3fa152cf3665fc4dc7c1c747917
[ "MIT" ]
null
null
null
mnist/app/app/mnist.py
scpepper69/ml
13ad41dd7b22d3fa152cf3665fc4dc7c1c747917
[ "MIT" ]
null
null
null
from datetime import datetime import cv2 import re import base64 from flask import Flask, render_template, request, jsonify from flask_cors import CORS import numpy as np from io import BytesIO from PIL import Image, ImageOps import os,sys import requests from graphpipe import remote from matplotlib import pylab as pl...
31.703704
81
0.643107
from datetime import datetime import cv2 import re import base64 from flask import Flask, render_template, request, jsonify from flask_cors import CORS import numpy as np from io import BytesIO from PIL import Image, ImageOps import os,sys import requests from graphpipe import remote from matplotlib import pylab as pl...
true
true
f7012b0cf43442a9c11a24292ca2dd8a8e267c50
3,203
py
Python
buildtrigger/test/test_githubhandler.py
anwarchk/quay
23c5120790c619174e7d36784ca5aab7f4eece5c
[ "Apache-2.0" ]
1
2021-05-30T01:54:21.000Z
2021-05-30T01:54:21.000Z
buildtrigger/test/test_githubhandler.py
anwarchk/quay
23c5120790c619174e7d36784ca5aab7f4eece5c
[ "Apache-2.0" ]
20
2019-12-26T17:32:34.000Z
2022-03-21T22:18:06.000Z
buildtrigger/test/test_githubhandler.py
anwarchk/quay
23c5120790c619174e7d36784ca5aab7f4eece5c
[ "Apache-2.0" ]
1
2020-05-31T16:28:40.000Z
2020-05-31T16:28:40.000Z
import json import pytest from buildtrigger.test.githubmock import get_github_trigger from buildtrigger.triggerutil import (SkipRequestException, ValidationRequestException, InvalidPayloadException) from endpoints.building import PreparedBuild from util.morecollections import Attr...
27.144068
92
0.656884
import json import pytest from buildtrigger.test.githubmock import get_github_trigger from buildtrigger.triggerutil import (SkipRequestException, ValidationRequestException, InvalidPayloadException) from endpoints.building import PreparedBuild from util.morecollections import Attr...
true
true
f7012b92e6dafbeed00ef8bafd0ecc45538ef7bf
2,706
py
Python
instruments/Opus/QOpus.py
davidgrier/QInstrument
339b4c855017db2c10c7f283c48e5fa0d50cc286
[ "BSD-3-Clause" ]
null
null
null
instruments/Opus/QOpus.py
davidgrier/QInstrument
339b4c855017db2c10c7f283c48e5fa0d50cc286
[ "BSD-3-Clause" ]
null
null
null
instruments/Opus/QOpus.py
davidgrier/QInstrument
339b4c855017db2c10c7f283c48e5fa0d50cc286
[ "BSD-3-Clause" ]
null
null
null
from QInstrument.lib import QInstrumentInterface from QInstrument.instruments.Opus.Opus import Opus from PyQt5.QtCore import (pyqtSlot, QTimer) import logging logging.basicConfig() logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) class QOpusWidget(QInstrumentInterface): def __init__(self, *ar...
27.896907
67
0.613452
from QInstrument.lib import QInstrumentInterface from QInstrument.instruments.Opus.Opus import Opus from PyQt5.QtCore import (pyqtSlot, QTimer) import logging logging.basicConfig() logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) class QOpusWidget(QInstrumentInterface): def __init__(self, *ar...
true
true
f7012c1387aa97777a625149b41ef2c6e1c926f4
690
py
Python
DQM/EcalPreshowerMonitorModule/python/es_dqm_source_offline_cff.py
pasmuss/cmssw
566f40c323beef46134485a45ea53349f59ae534
[ "Apache-2.0" ]
null
null
null
DQM/EcalPreshowerMonitorModule/python/es_dqm_source_offline_cff.py
pasmuss/cmssw
566f40c323beef46134485a45ea53349f59ae534
[ "Apache-2.0" ]
null
null
null
DQM/EcalPreshowerMonitorModule/python/es_dqm_source_offline_cff.py
pasmuss/cmssw
566f40c323beef46134485a45ea53349f59ae534
[ "Apache-2.0" ]
null
null
null
import FWCore.ParameterSet.Config as cms from DQM.EcalPreshowerMonitorModule.ESRawDataTask_cfi import * from DQM.EcalPreshowerMonitorModule.ESIntegrityTask_cfi import * ecalPreshowerIntegrityTask.DoLumiAnalysis = True from DQM.EcalPreshowerMonitorModule.ESFEDIntegrityTask_cfi import * from DQM.EcalPreshowerMonitorModu...
46
169
0.876812
import FWCore.ParameterSet.Config as cms from DQM.EcalPreshowerMonitorModule.ESRawDataTask_cfi import * from DQM.EcalPreshowerMonitorModule.ESIntegrityTask_cfi import * ecalPreshowerIntegrityTask.DoLumiAnalysis = True from DQM.EcalPreshowerMonitorModule.ESFEDIntegrityTask_cfi import * from DQM.EcalPreshowerMonitorModu...
true
true
f7012caea091390e3c93212966f0b19844281957
4,495
py
Python
fastai2/callback/progress.py
Tato14/fastai2
0ce2ffc95ac3a7b1dc5eaf90fc7c3997e7125651
[ "Apache-2.0" ]
1
2020-07-09T22:01:29.000Z
2020-07-09T22:01:29.000Z
fastai2/callback/progress.py
Tato14/fastai2
0ce2ffc95ac3a7b1dc5eaf90fc7c3997e7125651
[ "Apache-2.0" ]
1
2020-02-22T05:15:19.000Z
2020-02-22T05:15:19.000Z
fastai2/callback/progress.py
Tato14/fastai2
0ce2ffc95ac3a7b1dc5eaf90fc7c3997e7125651
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/16_callback.progress.ipynb (unless otherwise specified). __all__ = ['ProgressCallback', 'no_bar', 'ShowGraphCallback', 'CSVLogger'] # Cell from ..basics import * # Cell @docs class ProgressCallback(Callback): "A `Callback` to handle the display of progress bars" ...
39.429825
131
0.663404
__all__ = ['ProgressCallback', 'no_bar', 'ShowGraphCallback', 'CSVLogger'] from ..basics import * @docs class ProgressCallback(Callback): run_after=Recorder def begin_fit(self): assert hasattr(self.learn, 'recorder') if self.create_mbar: self.mbar = master_bar(list(range(self.n_epoch))) ...
true
true
f7012cda035aa7f66c1ab45c72651ee5cbf96751
460
py
Python
bin/rehex.py
genterium-project/sentinel
05eef4d70ab66d269407e06175e24e5e01014c21
[ "MIT" ]
1
2019-09-04T03:01:45.000Z
2019-09-04T03:01:45.000Z
bin/rehex.py
genterium-project/sentinel
05eef4d70ab66d269407e06175e24e5e01014c21
[ "MIT" ]
null
null
null
bin/rehex.py
genterium-project/sentinel
05eef4d70ab66d269407e06175e24e5e01014c21
[ "MIT" ]
null
null
null
import simplejson import binascii import sys import pdb from pprint import pprint import sys import os sys.path.append(os.path.normpath(os.path.join(os.path.dirname(__file__), '../lib'))) import gentariumlib # ============================================================================ usage = "%s <hex>" % sys.argv[0] ...
20.909091
84
0.591304
import simplejson import binascii import sys import pdb from pprint import pprint import sys import os sys.path.append(os.path.normpath(os.path.join(os.path.dirname(__file__), '../lib'))) import gentariumlib usage = "%s <hex>" % sys.argv[0] obj = None if len(sys.argv) < 2: print(usage) sys.exit(1) else: o...
true
true
f7012d2f2373077fcd2146095ef27c15ebf9f16e
421
pyde
Python
sketches/Bouncing_Ball_Simulator_Stage_5/Bouncing_Ball_Simulator_Stage_5.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
4
2018-06-03T02:11:46.000Z
2021-08-18T19:55:15.000Z
sketches/Bouncing_Ball_Simulator_Stage_5/Bouncing_Ball_Simulator_Stage_5.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
null
null
null
sketches/Bouncing_Ball_Simulator_Stage_5/Bouncing_Ball_Simulator_Stage_5.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
3
2019-12-23T19:12:51.000Z
2021-04-30T14:00:31.000Z
from bouncingball import BouncingBall, BouncingBox balls = [] boxes = [] def setup(): size(600, 600) for _ in range(60): if random(10) < 5: balls.append(BouncingBall()) else: boxes.append(BouncingBox()) def draw(): background("#2b3e50") for ball in balls: ...
19.136364
50
0.551069
from bouncingball import BouncingBall, BouncingBox balls = [] boxes = [] def setup(): size(600, 600) for _ in range(60): if random(10) < 5: balls.append(BouncingBall()) else: boxes.append(BouncingBox()) def draw(): background("#2b3e50") for ball in balls: ...
true
true
f7012f4b52647b1313d4cde5987a00ed3870b14b
2,912
py
Python
Lib/site-packages/pyglet/debug.py
caiyongji/tf2.3.1-py3.7.9-full-built
ace4efcbf05b2b494388739718a18c13eab83c71
[ "CNRI-Python-GPL-Compatible" ]
1
2021-05-24T10:08:51.000Z
2021-05-24T10:08:51.000Z
Lib/site-packages/pyglet/debug.py
caiyongji/tf2.3.1-py3.7.9-full-built
ace4efcbf05b2b494388739718a18c13eab83c71
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
Lib/site-packages/pyglet/debug.py
caiyongji/tf2.3.1-py3.7.9-full-built
ace4efcbf05b2b494388739718a18c13eab83c71
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # Copyright (c) 2008-2020 pyglet contributors # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the follo...
38.826667
90
0.683723
import pyglet def debug_print(enabled_or_option='debug'): if isinstance(enabled_or_option, bool): enabled = enabled_or_option else: enabled = pyglet.options.get(enabled_or_option, False) if enabled: def _debug_print(*args, **kwargs): ...
true
true
f7012faf22e24f1a9e4fdccb8629b5da8c37dd02
31,523
py
Python
python/ccxt/cobinhood.py
victor95pc/ccxt
5c3e606296a1b15852a35f1330b645f451fa08d6
[ "MIT" ]
1
2019-03-17T22:44:30.000Z
2019-03-17T22:44:30.000Z
python/ccxt/cobinhood.py
Lara-Bell/ccxt
e09230b4b60d5c33e3f6ebc044002bab6f733553
[ "MIT" ]
null
null
null
python/ccxt/cobinhood.py
Lara-Bell/ccxt
e09230b4b60d5c33e3f6ebc044002bab6f733553
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import json from ccxt.base.errors import ExchangeError from ccxt.base.errors import PermissionDenie...
39.801768
126
0.498842
ge import Exchange import json from ccxt.base.errors import ExchangeError from ccxt.base.errors import PermissionDenied from ccxt.base.errors import InsufficientFunds from ccxt.base.errors import InvalidAddress from ccxt.base.errors import InvalidOrder from ccxt.base.errors import InvalidNonce class cobinhood (Exc...
true
true
f7012febf5c582c921ff95fa96e32ca022810de8
833
py
Python
backend/model/Corpus.py
CiprianBodnar/DeftEval
7afbaa9013873c91e4f209311ed499005080e131
[ "MIT" ]
null
null
null
backend/model/Corpus.py
CiprianBodnar/DeftEval
7afbaa9013873c91e4f209311ed499005080e131
[ "MIT" ]
null
null
null
backend/model/Corpus.py
CiprianBodnar/DeftEval
7afbaa9013873c91e4f209311ed499005080e131
[ "MIT" ]
1
2019-10-15T15:48:13.000Z
2019-10-15T15:48:13.000Z
import abc from backend.model.SentenceTokenise import SentenceTokenise from backend.service.ExtractSentences import extract_sentences from backend.service.ReadCorpus import read_corpus class Corpus: def __init__(self): self.receive_text = "" self.input_file = "t1_biology_0_0.txt" self.bas...
26.870968
82
0.710684
import abc from backend.model.SentenceTokenise import SentenceTokenise from backend.service.ExtractSentences import extract_sentences from backend.service.ReadCorpus import read_corpus class Corpus: def __init__(self): self.receive_text = "" self.input_file = "t1_biology_0_0.txt" self.bas...
true
true
f701300168d70aab345ae6b11215023d9be8143b
18,474
py
Python
release_test/_version.py
psyplot/ci-release-test
cc21e2749fa39a9b810abb47ecfbc2062c1f5e70
[ "MIT" ]
null
null
null
release_test/_version.py
psyplot/ci-release-test
cc21e2749fa39a9b810abb47ecfbc2062c1f5e70
[ "MIT" ]
null
null
null
release_test/_version.py
psyplot/ci-release-test
cc21e2749fa39a9b810abb47ecfbc2062c1f5e70
[ "MIT" ]
null
null
null
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
35.458733
79
0.584876
import errno import os import re import subprocess import sys def get_keywords(): git_refnames = "$Format:%d$" git_full = "$Format:%H$" git_date = "$Format:%ci$" keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} return keywords class Version...
true
true
f701300b81bbc9afd41de7d74fc9c00b50ca96e8
206
py
Python
scripts/6-num.py
bfhq/lists
bb402ed71f1c2b20b5d7640b2dab162891a8d75c
[ "MIT" ]
null
null
null
scripts/6-num.py
bfhq/lists
bb402ed71f1c2b20b5d7640b2dab162891a8d75c
[ "MIT" ]
null
null
null
scripts/6-num.py
bfhq/lists
bb402ed71f1c2b20b5d7640b2dab162891a8d75c
[ "MIT" ]
null
null
null
sys.stdout = open("6-num.txt", "w") data = "1234567890" for a in data: for b in data: for c in data: for d in data: for e in data: for f in data: print(a+b+c+d+e+f) sys.stdout.close()
18.727273
35
0.582524
sys.stdout = open("6-num.txt", "w") data = "1234567890" for a in data: for b in data: for c in data: for d in data: for e in data: for f in data: print(a+b+c+d+e+f) sys.stdout.close()
true
true
f7013157fcb57127232d1789c4abece01a2d173b
299
py
Python
digitaloxford/settings/__init__.py
digitaloxford/do-wagtail
49dd75b95109ebb38bf66aca13d3fdeb8e25d319
[ "MIT" ]
2
2021-04-11T11:59:51.000Z
2021-04-12T06:56:23.000Z
digitaloxford/settings/__init__.py
digitaloxford/do-wagtail
49dd75b95109ebb38bf66aca13d3fdeb8e25d319
[ "MIT" ]
8
2021-04-10T10:40:27.000Z
2022-01-25T16:32:22.000Z
digitaloxford/settings/__init__.py
digitaloxford/do-wagtail
49dd75b95109ebb38bf66aca13d3fdeb8e25d319
[ "MIT" ]
null
null
null
import os from dotenv import load_dotenv # Load environment variables load_dotenv() # Set hosting environment, if not set, default to production for security HOSTING_ENV = os.getenv("HOSTING_ENV", "production") if HOSTING_ENV == "dev": from .dev import * else: from .production import *
19.933333
73
0.742475
import os from dotenv import load_dotenv load_dotenv() HOSTING_ENV = os.getenv("HOSTING_ENV", "production") if HOSTING_ENV == "dev": from .dev import * else: from .production import *
true
true
f70131b5a4b1638a0ebec960b0e6d3ac3970019e
88,180
py
Python
great_expectations/data_context/types/base.py
annuupadhyayPS/great_expectations
3b3833881bfc5dd6aada9396dba4e08d097dabc7
[ "Apache-2.0" ]
null
null
null
great_expectations/data_context/types/base.py
annuupadhyayPS/great_expectations
3b3833881bfc5dd6aada9396dba4e08d097dabc7
[ "Apache-2.0" ]
null
null
null
great_expectations/data_context/types/base.py
annuupadhyayPS/great_expectations
3b3833881bfc5dd6aada9396dba4e08d097dabc7
[ "Apache-2.0" ]
null
null
null
import abc import enum import itertools import logging import uuid from copy import deepcopy from typing import Any, Dict, List, MutableMapping, Optional, Union from ruamel.yaml import YAML from ruamel.yaml.comments import CommentedMap from ruamel.yaml.compat import StringIO import great_expectations.exceptions as ge...
38.76044
460
0.647868
import abc import enum import itertools import logging import uuid from copy import deepcopy from typing import Any, Dict, List, MutableMapping, Optional, Union from ruamel.yaml import YAML from ruamel.yaml.comments import CommentedMap from ruamel.yaml.compat import StringIO import great_expectations.exceptions as ge...
true
true
f70131e5c3a3a3b91e5f27031da8d1afb2dc99b3
545
py
Python
source/openwarpgui/openwarp/__init__.py
NREL/OpenWARP
ca49c4cbde17e0cead69bd9e55a81d5c0fafe4df
[ "Apache-2.0" ]
22
2015-06-22T07:35:04.000Z
2021-07-23T05:10:09.000Z
source/openwarpgui/openwarp/__init__.py
yuyihsiang/OpenWARP
d3f8c9c377e5dbe4f838888667f37b975b924c7c
[ "Apache-2.0" ]
9
2015-07-30T20:01:35.000Z
2020-08-28T17:29:18.000Z
source/openwarpgui/openwarp/__init__.py
NREL/OpenWARP
ca49c4cbde17e0cead69bd9e55a81d5c0fafe4df
[ "Apache-2.0" ]
13
2016-04-01T07:45:27.000Z
2021-04-06T08:33:33.000Z
# -*- coding: utf-8 -*- """ This is initialization module of openwarp. """ __author__ = "caoweiquan322" __copyright__ = "Copyright (C) 2014 TopCoder Inc. All rights reserved." __version__ = "1.0" #import logging # Create a base logger for the whole module. #logger = logging.getLogger(__name__) #logger.s...
27.25
87
0.699083
__author__ = "caoweiquan322" __copyright__ = "Copyright (C) 2014 TopCoder Inc. All rights reserved." __version__ = "1.0"
true
true
f70131fe3a88f9e91df9791720516f24afa634b9
69
py
Python
vizualize.py
Heyjuke58/frcnn-wind-turbine-detection
29311020188d3a26c8935cae710bd2c5013653ab
[ "Apache-2.0" ]
null
null
null
vizualize.py
Heyjuke58/frcnn-wind-turbine-detection
29311020188d3a26c8935cae710bd2c5013653ab
[ "Apache-2.0" ]
null
null
null
vizualize.py
Heyjuke58/frcnn-wind-turbine-detection
29311020188d3a26c8935cae710bd2c5013653ab
[ "Apache-2.0" ]
null
null
null
# https://github.com/albermax/innvestigate # http://heatmapping.org/
34.5
43
0.753623
true
true
f70133067d6e6cc538d38dd7974efe692aa5fd65
1,920
py
Python
phase2_recognition_only/architectures/vgg.py
Manish-rai21bit/deep_learning_for_camera_trap_images
f9d9fd50824ece4743b39d5136f67235871cc0ef
[ "MIT" ]
85
2018-03-12T16:55:18.000Z
2022-03-29T12:41:46.000Z
phase2_recognition_only/architectures/vgg.py
Manish-rai21bit/deep_learning_for_camera_trap_images
f9d9fd50824ece4743b39d5136f67235871cc0ef
[ "MIT" ]
11
2018-06-11T09:29:46.000Z
2022-01-16T20:18:19.000Z
phase2_recognition_only/architectures/vgg.py
Manish-rai21bit/deep_learning_for_camera_trap_images
f9d9fd50824ece4743b39d5136f67235871cc0ef
[ "MIT" ]
46
2018-05-26T02:38:22.000Z
2022-03-20T17:37:35.000Z
import tensorflow as tf import common def inference(x, num_output, wd, dropout_rate, is_training, transfer_mode= False, model_type= 'A'): # Create tables describing VGG configurations A, B, D, E if model_type == 'A': config = [64, 'M', 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512, 'M'] elif model_ty...
40.851064
118
0.627604
import tensorflow as tf import common def inference(x, num_output, wd, dropout_rate, is_training, transfer_mode= False, model_type= 'A'): if model_type == 'A': config = [64, 'M', 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512, 'M'] elif model_type == 'B': config = [64, 64, 'M', 128, 128, 'M', 2...
true
true
f701331f418b271808b257dda1cf537ba3ca9082
1,887
py
Python
utils/mix-mono-wav-scp.py
texpomru13/espnet
7ef005e832e2fb033f356c16f54e0f08762fb4b0
[ "Apache-2.0" ]
5,053
2017-12-13T06:21:41.000Z
2022-03-31T13:38:29.000Z
utils/mix-mono-wav-scp.py
texpomru13/espnet
7ef005e832e2fb033f356c16f54e0f08762fb4b0
[ "Apache-2.0" ]
3,666
2017-12-14T05:58:50.000Z
2022-03-31T22:11:49.000Z
utils/mix-mono-wav-scp.py
texpomru13/espnet
7ef005e832e2fb033f356c16f54e0f08762fb4b0
[ "Apache-2.0" ]
1,709
2017-12-13T01:02:42.000Z
2022-03-31T11:57:45.000Z
#!/usr/bin/env python3 import argparse import io import sys PY2 = sys.version_info[0] == 2 if PY2: from itertools import izip_longest as zip_longest else: from itertools import zip_longest def get_parser(): parser = argparse.ArgumentParser( formatter_class=argparse.ArgumentDefaultsHelpFormatter,...
27.347826
86
0.532061
import argparse import io import sys PY2 = sys.version_info[0] == 2 if PY2: from itertools import izip_longest as zip_longest else: from itertools import zip_longest def get_parser(): parser = argparse.ArgumentParser( formatter_class=argparse.ArgumentDefaultsHelpFormatter, description="...
true
true
f70133a40efab14cc0b7890e3dea48a3baaccc21
728
py
Python
kmeans/fish.py
innovator-zero/Python
f776eb081c6688c2f5a98b0050b33582c1769391
[ "Apache-2.0" ]
null
null
null
kmeans/fish.py
innovator-zero/Python
f776eb081c6688c2f5a98b0050b33582c1769391
[ "Apache-2.0" ]
3
2020-03-09T03:40:53.000Z
2020-11-12T15:36:03.000Z
kmeans/fish.py
innovator-zero/Python
f776eb081c6688c2f5a98b0050b33582c1769391
[ "Apache-2.0" ]
null
null
null
import numpy as np import random import matplotlib.pyplot as plt points=np.loadtxt('points.txt') herring_r = np.loadtxt('distribution.txt') herring=np.zeros((802,350)) for i in range(350): for j in range(802): herring[j,349-i]=herring_r[i,j] # s=np.zeros(10) # # for i in range(10): # x=int(round(point...
20.222222
42
0.56456
import numpy as np import random import matplotlib.pyplot as plt points=np.loadtxt('points.txt') herring_r = np.loadtxt('distribution.txt') herring=np.zeros((802,350)) for i in range(350): for j in range(802): herring[j,349-i]=herring_r[i,j] s=0 for i in range(802): for j in range(350):...
true
true
f7013521dadc939389f624dadd24f24188547bb7
1,702
py
Python
general/chainerrl/baselines/branched_action_values.py
marioyc/baselines
587e66cbc409dcb7b6def0c2f1c444a548375caa
[ "MIT" ]
127
2019-08-06T13:56:53.000Z
2022-02-21T08:48:15.000Z
general/chainerrl/baselines/branched_action_values.py
marioyc/baselines
587e66cbc409dcb7b6def0c2f1c444a548375caa
[ "MIT" ]
12
2019-08-03T04:40:33.000Z
2020-08-31T06:37:31.000Z
general/chainerrl/baselines/branched_action_values.py
marioyc/baselines
587e66cbc409dcb7b6def0c2f1c444a548375caa
[ "MIT" ]
33
2019-08-06T05:06:07.000Z
2022-01-20T18:27:14.000Z
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from builtins import * # NOQA from future import standard_library standard_library.install_aliases() # NOQA from cached_property import cached_property from chainer imp...
27.451613
79
0.682139
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from builtins import * from future import standard_library standard_library.install_aliases() from cached_property import cached_property from chainer import function...
true
true
f7013540106d82345f673369326f21c8329a90c1
2,681
py
Python
vlasisku/models.py
lojban/vlasisku
a1f69fd12f206785a4635db2aa839394844250a0
[ "Unlicense" ]
17
2015-02-13T00:30:46.000Z
2022-02-20T19:54:35.000Z
vlasisku/models.py
lojban/vlasisku
a1f69fd12f206785a4635db2aa839394844250a0
[ "Unlicense" ]
16
2015-02-15T05:18:37.000Z
2021-10-08T06:03:37.000Z
vlasisku/models.py
lojban/vlasisku
a1f69fd12f206785a4635db2aa839394844250a0
[ "Unlicense" ]
6
2015-10-10T19:38:34.000Z
2020-05-30T04:58:13.000Z
from vlasisku.utils import compound2affixes class Entry(object): """Container for jbovlaste entry data.""" #: The word (or compound) this entry describes. word = None #: The type of the word, such as ``'gismu'``. type = None #: A list of three-letter affix forms for the word. affixes = ...
27.080808
78
0.560239
from vlasisku.utils import compound2affixes class Entry(object): word = None type = None affixes = None searchaffixes = None grammarclass = None terminator = None terminates = None cll = None definition = None notes = ...
true
true
f70135f112f3979c1fcdbeb445078fc5e5ba0002
1,398
py
Python
acregnet/train_acregnet.py
luoyi1hao/ACRN_Chest_X-ray_IA
b2ecaf88e6b1bb59101fd2d611bf9d1e6716367a
[ "MIT" ]
1
2021-09-23T10:37:53.000Z
2021-09-23T10:37:53.000Z
acregnet/train_acregnet.py
luoyi1hao/ACRN_Chest_X-ray_IA
b2ecaf88e6b1bb59101fd2d611bf9d1e6716367a
[ "MIT" ]
null
null
null
acregnet/train_acregnet.py
luoyi1hao/ACRN_Chest_X-ray_IA
b2ecaf88e6b1bb59101fd2d611bf9d1e6716367a
[ "MIT" ]
null
null
null
from data import DataHandler from models import ACRegNet import tensorflow as tf from utils import get_random_batch, read_config_file, create_dir RUN_IN_GPU = False def train_acregnet_model(config): tf.reset_default_graph() tf_config = tf.ConfigProto() if RUN_IN_GPU: tf_config.gpu_options.allow...
29.125
78
0.690272
from data import DataHandler from models import ACRegNet import tensorflow as tf from utils import get_random_batch, read_config_file, create_dir RUN_IN_GPU = False def train_acregnet_model(config): tf.reset_default_graph() tf_config = tf.ConfigProto() if RUN_IN_GPU: tf_config.gpu_options.allow...
true
true
f7013784c179db6e1336c8feef0d98ad0bd7c810
4,346
py
Python
test_gr_nlp_toolkit/test_pipeline/test_pipeline.py
nlpaueb/gr-nlp-toolkit
fce7985a0e51d0924350d161626a11fa3f2e9e4e
[ "Apache-2.0" ]
16
2021-09-23T14:01:32.000Z
2022-03-21T20:13:40.000Z
test_gr_nlp_toolkit/test_pipeline/test_pipeline.py
nlpaueb/gr-nlp-toolkit
fce7985a0e51d0924350d161626a11fa3f2e9e4e
[ "Apache-2.0" ]
3
2021-07-15T12:21:53.000Z
2022-02-24T20:59:49.000Z
test_gr_nlp_toolkit/test_pipeline/test_pipeline.py
nlpaueb/gr-nlp-toolkit
fce7985a0e51d0924350d161626a11fa3f2e9e4e
[ "Apache-2.0" ]
2
2022-02-24T19:20:55.000Z
2022-03-17T01:08:11.000Z
import unittest from gr_nlp_toolkit.labels.dp_labels import dp_labels from gr_nlp_toolkit.labels.ner_labels import ner_labels from gr_nlp_toolkit.labels.pos_labels import pos_labels, pos_properties from gr_nlp_toolkit.pipeline.pipeline import Pipeline class TestPipeline(unittest.TestCase): def test_using_all_pro...
41
99
0.61942
import unittest from gr_nlp_toolkit.labels.dp_labels import dp_labels from gr_nlp_toolkit.labels.ner_labels import ner_labels from gr_nlp_toolkit.labels.pos_labels import pos_labels, pos_properties from gr_nlp_toolkit.pipeline.pipeline import Pipeline class TestPipeline(unittest.TestCase): def test_using_all_pro...
true
true
f701396b8b37e360dab733759a1eec188404061e
3,447
py
Python
ucsmsdk/mometa/initiator/InitiatorFcInitiatorEp.py
thinkitdata/ucsmsdk
da6599e1dbc1207a30eabe548a7e5791af5f476b
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/initiator/InitiatorFcInitiatorEp.py
thinkitdata/ucsmsdk
da6599e1dbc1207a30eabe548a7e5791af5f476b
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/initiator/InitiatorFcInitiatorEp.py
thinkitdata/ucsmsdk
da6599e1dbc1207a30eabe548a7e5791af5f476b
[ "Apache-2.0" ]
null
null
null
"""This module contains the general information for InitiatorFcInitiatorEp ManagedObject.""" from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class InitiatorFcInitiatorEpConsts: PREF_ALTERNATE = "alternate" PREF_PREFERRED = "preferred" ...
53.030769
248
0.629823
from ...ucsmo import ManagedObject from ...ucscoremeta import MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class InitiatorFcInitiatorEpConsts: PREF_ALTERNATE = "alternate" PREF_PREFERRED = "preferred" PROT_DERIVED = "derived" PROT_FC = "fc" PROT_ISCSI = "iscsi" class InitiatorFcIni...
true
true
f7013a927d89ff620e05d8a99d6d0cc4f8c43d01
13,583
py
Python
examples/classification_modelnet40.py
NNstorm/MinkowskiEngine
443b37a58c379b2482b5d160d9e874b356b4bf2f
[ "MIT" ]
851
2020-07-09T21:35:06.000Z
2022-03-31T14:35:57.000Z
examples/classification_modelnet40.py
NNstorm/MinkowskiEngine
443b37a58c379b2482b5d160d9e874b356b4bf2f
[ "MIT" ]
301
2020-07-09T21:51:23.000Z
2022-03-30T12:23:24.000Z
examples/classification_modelnet40.py
NNstorm/MinkowskiEngine
443b37a58c379b2482b5d160d9e874b356b4bf2f
[ "MIT" ]
151
2020-07-15T09:22:09.000Z
2022-03-23T21:32:47.000Z
# Copyright (c) 2020 NVIDIA CORPORATION. # Copyright (c) 2018-2020 Chris Choy (chrischoy@ai.stanford.edu). # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including wit...
30.730769
87
0.596628
# Networks", CVPR'19 (https://arxiv.org/abs/1904.08755) if you use any part # of the code. import argparse import sklearn.metrics as metrics import numpy as np import torch import torch.nn as nn import torch.utils.data from torch.utils.data import DataLoader import torch.optim as optim import tor...
true
true
f7013b07af9877903da335d65ccea7f54b94087f
455
py
Python
computescore.py
serook/coursera_python4everybody
4886543abd77b3001dca6a16f7edb5a29474380f
[ "Apache-2.0" ]
null
null
null
computescore.py
serook/coursera_python4everybody
4886543abd77b3001dca6a16f7edb5a29474380f
[ "Apache-2.0" ]
null
null
null
computescore.py
serook/coursera_python4everybody
4886543abd77b3001dca6a16f7edb5a29474380f
[ "Apache-2.0" ]
null
null
null
def computescore(s): if s >= 0.9 and s <= 1.0: print 'grade is A' elif s >= 0.8 and s<=1.0 : print 'grade is B' elif s >= 0.7 and s<=1.0 : print 'grade is C' elif s >= 0.6 and s <= 1.0 : print 'grade is D' elif s >= 0.0 and s <= 0.6 : print 'grade is F' else : ...
22.75
32
0.540659
def computescore(s): if s >= 0.9 and s <= 1.0: print 'grade is A' elif s >= 0.8 and s<=1.0 : print 'grade is B' elif s >= 0.7 and s<=1.0 : print 'grade is C' elif s >= 0.6 and s <= 1.0 : print 'grade is D' elif s >= 0.0 and s <= 0.6 : print 'grade is F' else : ...
false
true
f7013b119a6edae5d60d9e763ae96f9479d984f6
781
py
Python
googlemaps/__init__.py
billyhoe22/google-maps-services-python
98c0375dcdc9d8606ca408b8e13081b03757b6bc
[ "Apache-2.0" ]
null
null
null
googlemaps/__init__.py
billyhoe22/google-maps-services-python
98c0375dcdc9d8606ca408b8e13081b03757b6bc
[ "Apache-2.0" ]
null
null
null
googlemaps/__init__.py
billyhoe22/google-maps-services-python
98c0375dcdc9d8606ca408b8e13081b03757b6bc
[ "Apache-2.0" ]
null
null
null
# # Copyright 2014 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 ...
31.24
79
0.759283
__version__ = "2.4.5-dev" from googlemaps.client import Client import googlemaps.exceptions __all__ = ["Client"]
true
true
f7013b41ca99a41d0c49aaab4c74a26c3e55845b
1,111
py
Python
crimsobot/models/wordle_results.py
h-anjru/crimsoBOT
8e678a6408ae99e740abfc8ab337543c666c1fb1
[ "MIT" ]
4
2019-12-26T11:09:30.000Z
2020-02-17T23:40:04.000Z
crimsobot/models/wordle_results.py
crimso4547/crimsoBOT
2867eeaff2df8b693daee74d644733c446f8156e
[ "MIT" ]
5
2019-11-19T01:24:59.000Z
2020-02-09T18:54:45.000Z
crimsobot/models/wordle_results.py
h-anjru/crimsoBOT
8e678a6408ae99e740abfc8ab337543c666c1fb1
[ "MIT" ]
2
2019-12-14T05:42:03.000Z
2020-01-11T05:49:30.000Z
from typing import Any from tortoise import fields from tortoise.models import Model from crimsobot.models import DiscordUser from crimsobot.models.user import User class WordleResults(Model): uuid = fields.UUIDField(pk=True) name = fields.TextField(default='wordle result') user = fields.ForeignKeyFiel...
30.027027
93
0.717372
from typing import Any from tortoise import fields from tortoise.models import Model from crimsobot.models import DiscordUser from crimsobot.models.user import User class WordleResults(Model): uuid = fields.UUIDField(pk=True) name = fields.TextField(default='wordle result') user = fields.ForeignKeyFiel...
true
true
f7013bc44a2ffbfdf74f6e376e79f89f9dcbc2c0
34,836
py
Python
tests/test_feedexport.py
KevvKo/scrapy
3d027fb578532d504b3dbfaa77a06c3560f85d3c
[ "BSD-3-Clause" ]
1
2021-07-25T19:45:24.000Z
2021-07-25T19:45:24.000Z
tests/test_feedexport.py
zhangjinrong/scrapy
3d027fb578532d504b3dbfaa77a06c3560f85d3c
[ "BSD-3-Clause" ]
null
null
null
tests/test_feedexport.py
zhangjinrong/scrapy
3d027fb578532d504b3dbfaa77a06c3560f85d3c
[ "BSD-3-Clause" ]
null
null
null
import csv import json import os import random import shutil import string import tempfile import warnings from io import BytesIO from logging import getLogger from pathlib import Path from string import ascii_letters, digits from unittest import mock from urllib.parse import urljoin, urlparse, quote from urllib.reques...
33.88716
95
0.556292
import csv import json import os import random import shutil import string import tempfile import warnings from io import BytesIO from logging import getLogger from pathlib import Path from string import ascii_letters, digits from unittest import mock from urllib.parse import urljoin, urlparse, quote from urllib.reques...
true
true
f7013d0c15568153ebe3a74156ce34b8ce74602d
224
py
Python
extraesia/extraesia/doctype/extraesia_settings/test_extraesia_settings.py
jamesriady/extraesia
036a8fa09467b4119a13875cfa79d4a56f7ee78b
[ "MIT" ]
null
null
null
extraesia/extraesia/doctype/extraesia_settings/test_extraesia_settings.py
jamesriady/extraesia
036a8fa09467b4119a13875cfa79d4a56f7ee78b
[ "MIT" ]
null
null
null
extraesia/extraesia/doctype/extraesia_settings/test_extraesia_settings.py
jamesriady/extraesia
036a8fa09467b4119a13875cfa79d4a56f7ee78b
[ "MIT" ]
1
2020-10-16T08:45:48.000Z
2020-10-16T08:45:48.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2020, Youssef Restom and Contributors # See license.txt from __future__ import unicode_literals # import frappe import unittest class TestExtraesiaSettings(unittest.TestCase): pass
20.363636
53
0.772321
from __future__ import unicode_literals import unittest class TestExtraesiaSettings(unittest.TestCase): pass
true
true
f7013db89cca1bbd790d811b072435b06291b762
1,053
py
Python
setup.py
goerz/better-apidoc
99bec799618cc5cf4ea6d062a0027094c4e06632
[ "BSD-2-Clause" ]
25
2017-03-28T09:48:15.000Z
2021-10-15T08:58:30.000Z
setup.py
goerz/better-apidoc
99bec799618cc5cf4ea6d062a0027094c4e06632
[ "BSD-2-Clause" ]
15
2017-03-28T14:03:56.000Z
2021-05-10T20:29:48.000Z
setup.py
goerz/better-apidoc
99bec799618cc5cf4ea6d062a0027094c4e06632
[ "BSD-2-Clause" ]
6
2017-03-28T09:48:18.000Z
2021-05-09T21:27:49.000Z
#!/usr/bin/env python import setuptools def get_version(filename): with open(filename) as in_fh: for line in in_fh: if line.startswith('__version__'): return line.split('=')[1].strip()[1:-1] raise ValueError("Cannot extract version from %s" % filename) setuptools.setup( ...
28.459459
73
0.619183
import setuptools def get_version(filename): with open(filename) as in_fh: for line in in_fh: if line.startswith('__version__'): return line.split('=')[1].strip()[1:-1] raise ValueError("Cannot extract version from %s" % filename) setuptools.setup( name="better-apido...
true
true
f7013e240cd599786e4b94fb704df0ca4ddfeb5b
388
py
Python
StackApp/env/lib/python2.7/site-packages/pylint/test/functional/raising_non_exception_py3.py
jonathanmusila/StackOverflow-Lite
a9a03f129592c6f741eb4d1e608ca2db0e40bf11
[ "MIT" ]
35
2016-09-22T22:53:14.000Z
2020-02-13T15:12:21.000Z
virtual/lib/python3.6/site-packages/pylint/test/functional/raising_non_exception_py3.py
evantoh/patient-management-system
6637eb1344775633759165260ed99843581c0e72
[ "Unlicense" ]
32
2018-05-01T05:24:43.000Z
2022-03-11T23:20:39.000Z
virtual/lib/python3.6/site-packages/pylint/test/functional/raising_non_exception_py3.py
evantoh/patient-management-system
6637eb1344775633759165260ed99843581c0e72
[ "Unlicense" ]
88
2016-11-27T02:16:11.000Z
2020-02-28T05:10:26.000Z
"""The following code should emit a raising-non-exception. Previously, it didn't, due to a bug in the check for bad-exception-context, which prevented further checking on the Raise node. """ # pylint: disable=import-error, too-few-public-methods from missing_module import missing class Exc(object): """Not an act...
27.714286
75
0.755155
from missing_module import missing class Exc(object): raise Exc from missing
true
true
f7013e3219432a2fa9878be3fd59a8559b4bbcd8
709
py
Python
django_daraja/urls.py
martinmogusu/django-daraja
8a4788d3da9d7b0794a472b5320897480ec73ee6
[ "MIT" ]
14
2019-02-25T07:31:28.000Z
2022-02-09T13:48:11.000Z
django_daraja/urls.py
martinmogusu/django-daraja
8a4788d3da9d7b0794a472b5320897480ec73ee6
[ "MIT" ]
2
2019-12-14T20:20:52.000Z
2022-02-18T08:08:31.000Z
django_daraja/urls.py
martinmogusu/django-daraja
8a4788d3da9d7b0794a472b5320897480ec73ee6
[ "MIT" ]
11
2019-09-15T18:53:28.000Z
2022-03-10T06:12:04.000Z
from django.conf.urls import url, include from . import views test_patterns = [ url(r'^$', views.index, name='django_daraja_index'), url(r'^oauth/success', views.oauth_success, name='test_oauth_success'), url(r'^stk-push/success', views.stk_push_success, name='test_stk_push_success'), url(r'^business-payment/succe...
39.388889
108
0.765867
from django.conf.urls import url, include from . import views test_patterns = [ url(r'^$', views.index, name='django_daraja_index'), url(r'^oauth/success', views.oauth_success, name='test_oauth_success'), url(r'^stk-push/success', views.stk_push_success, name='test_stk_push_success'), url(r'^business-payment/succe...
true
true
f7013ee950543f8a9cca0d5c76ee787cb943881b
52,341
py
Python
tests/test_api_build.py
eklitzke/conda-build
5229bf972511e506548b77113ad5deb9856c2130
[ "BSD-3-Clause" ]
null
null
null
tests/test_api_build.py
eklitzke/conda-build
5229bf972511e506548b77113ad5deb9856c2130
[ "BSD-3-Clause" ]
null
null
null
tests/test_api_build.py
eklitzke/conda-build
5229bf972511e506548b77113ad5deb9856c2130
[ "BSD-3-Clause" ]
null
null
null
""" This module tests the build API. These are high-level integration tests. """ import base64 from collections import OrderedDict from glob import glob import logging import os import re import subprocess import sys import json import uuid # for version import conda from conda_build.conda_interface import PY3, url...
43.726817
102
0.690701
import base64 from collections import OrderedDict from glob import glob import logging import os import re import subprocess import sys import json import uuid import conda from conda_build.conda_interface import PY3, url_path, LinkError, CondaError, cc_conda_build import conda_build from binstar_client.commands i...
true
true
f7013f86b94d5e56f39839b5756b3e7af44ab29e
1,213
py
Python
backend/app/tests/tests.py
Edinburgh-Genome-Foundry/dab
7eabf76adf3a0b9332c3651b5d0e5e6d98237d2b
[ "MIT" ]
7
2019-04-11T20:36:07.000Z
2020-03-24T07:12:13.000Z
backend/app/tests/tests.py
Edinburgh-Genome-Foundry/dab
7eabf76adf3a0b9332c3651b5d0e5e6d98237d2b
[ "MIT" ]
null
null
null
backend/app/tests/tests.py
Edinburgh-Genome-Foundry/dab
7eabf76adf3a0b9332c3651b5d0e5e6d98237d2b
[ "MIT" ]
null
null
null
"""Tests for the backend""" from .tools import logprint, AppTestCase, load_file_to_dict, load_json class GetConstructsAsGenbankTests(AppTestCase): endpoint = 'get_constructs_as_genbanks' defaults = dict( database_token='', constructsData={} ) def test_emma_2_constructs_with_one_combin...
33.694444
73
0.720528
from .tools import logprint, AppTestCase, load_file_to_dict, load_json class GetConstructsAsGenbankTests(AppTestCase): endpoint = 'get_constructs_as_genbanks' defaults = dict( database_token='', constructsData={} ) def test_emma_2_constructs_with_one_combinatorial(self): json ...
true
true
f7013f89ddf7249cb8c21753c974a4e817c0eaa2
45,183
py
Python
archetypal/schedule.py
brunomarct/archetypal
ce8daf4e18ef3ec92967e5d6837b392199caf83b
[ "MIT" ]
null
null
null
archetypal/schedule.py
brunomarct/archetypal
ce8daf4e18ef3ec92967e5d6837b392199caf83b
[ "MIT" ]
null
null
null
archetypal/schedule.py
brunomarct/archetypal
ce8daf4e18ef3ec92967e5d6837b392199caf83b
[ "MIT" ]
null
null
null
################################################################################ # Module: schedule.py # Description: Functions for handling conversion of EnergyPlus schedule objects # License: MIT, see full license in LICENSE.txt # Web: https://github.com/samuelduchesne/archetypal #####################################...
39.808811
100
0.535799
periods=168, freq='1H') slicer_ = pd.Series([False] * (len(idx)), index=idx) else: slicer_ = pd.Series([False] * (len(index)), index=index) if sch_name is None: sch_name = self.schName values = self.idf.getobject('schedule:week:compact'.upper(), sch_name) ...
true
true
f70140c6982875c8447bb9e230f4d9b63c3ecaf0
44
py
Python
pupa/__init__.py
opencivicdata/pupa
8087e221fc527a80262192d22c2f50966c20604d
[ "BSD-3-Clause" ]
62
2015-01-08T05:46:46.000Z
2022-01-31T03:27:14.000Z
pupa/__init__.py
opencivicdata/pupa
8087e221fc527a80262192d22c2f50966c20604d
[ "BSD-3-Clause" ]
199
2015-01-10T03:19:37.000Z
2021-05-21T20:34:58.000Z
pupa/__init__.py
opencivicdata/pupa
8087e221fc527a80262192d22c2f50966c20604d
[ "BSD-3-Clause" ]
35
2015-03-09T19:41:42.000Z
2021-06-22T20:01:35.000Z
__version__ = '0.10.2' # pragma: no cover
22
43
0.636364
__version__ = '0.10.2'
true
true
f701410e9b48a170183eb9219ab8738113958f1d
84
py
Python
tests/requesters/__init__.py
Tberdy/python-amazon-mws-tools
2925118ce113851a2d8db98ad7f99163154f4151
[ "Unlicense" ]
9
2017-03-28T12:58:36.000Z
2020-03-02T14:42:32.000Z
tests/requesters/__init__.py
Tberdy/python-amazon-mws-tools
2925118ce113851a2d8db98ad7f99163154f4151
[ "Unlicense" ]
5
2017-01-05T19:36:18.000Z
2021-12-13T19:43:42.000Z
tests/requesters/__init__.py
Tberdy/python-amazon-mws-tools
2925118ce113851a2d8db98ad7f99163154f4151
[ "Unlicense" ]
5
2017-02-15T17:29:02.000Z
2019-03-06T07:30:55.000Z
from reports import suite as reports_suite from orders import suite as orders_suite
28
42
0.857143
from reports import suite as reports_suite from orders import suite as orders_suite
true
true
f70141ddaaf55ae4bb906ac7ae26d0faa94aa511
12,461
py
Python
magenta/models/score2perf/music_encoders_test.py
sleep-yearning/magenta
a03a14ef5a691ee9e3d336aa621281028dc5af32
[ "Apache-2.0" ]
1
2020-02-24T06:12:09.000Z
2020-02-24T06:12:09.000Z
magenta/models/score2perf/music_encoders_test.py
sleep-yearning/magenta
a03a14ef5a691ee9e3d336aa621281028dc5af32
[ "Apache-2.0" ]
null
null
null
magenta/models/score2perf/music_encoders_test.py
sleep-yearning/magenta
a03a14ef5a691ee9e3d336aa621281028dc5af32
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
33.497312
84
0.590001
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tempfile import magenta from magenta.models.score2perf import music_encoders from magenta.music import testing_lib from magenta.music.protobuf import music_pb2 import tensorflow.compat.v1...
true
true
f701420d7e91f4bcbdb6b47908438c20bcf682cc
73,843
py
Python
release/e2e.py
behnamh217rn21/ray-master
5fabd6c80a2dd7b8c259a98c149df430b16379b4
[ "Apache-2.0" ]
1
2021-12-21T17:57:21.000Z
2021-12-21T17:57:21.000Z
release/e2e.py
MaximumProgrammer/ray
1047914ee0ec27d0e7b8fc3599f8a0a573ba2dd7
[ "Apache-2.0" ]
10
2021-11-20T08:10:57.000Z
2022-03-19T07:11:59.000Z
release/e2e.py
MaximumProgrammer/ray
1047914ee0ec27d0e7b8fc3599f8a0a573ba2dd7
[ "Apache-2.0" ]
null
null
null
""" This is an end to end release test automation script used to kick off periodic release tests, running on Anyscale. The tool leverages app configs and compute templates. Calling this script will run a single release test. Example: python e2e.py --test-config ~/ray/release/xgboost_tests/xgboost_tests.yaml --test-...
36.340059
155
0.589643
import argparse import boto3 import collections import copy import datetime import hashlib import jinja2 import json import logging import multiprocessing import os import requests import shutil import subprocess import sys import tempfile import time from queue import Empty from typing import Any, Dict, Optional, Tupl...
true
true
f70143280a7d3e0800ab0318774e9f82ec6c1c84
2,014
py
Python
read_groups_from_bam.py
DReichLab/adna-workflow
07c6da8e64234decb7373fe7109e09395a45cb58
[ "BSD-3-Clause" ]
9
2019-05-28T11:16:14.000Z
2022-02-24T01:22:47.000Z
read_groups_from_bam.py
DReichLab/adna-workflow
07c6da8e64234decb7373fe7109e09395a45cb58
[ "BSD-3-Clause" ]
3
2020-01-09T20:12:02.000Z
2020-11-17T14:50:28.000Z
read_groups_from_bam.py
DReichLab/adna-workflow
07c6da8e64234decb7373fe7109e09395a45cb58
[ "BSD-3-Clause" ]
1
2019-08-04T12:46:01.000Z
2019-08-04T12:46:01.000Z
import argparse import pysam # parse the read group strings from a bam/sam header # return array of read group strings def read_groups_from_bam(bam_filename, use_libraries=False): bam = pysam.AlignmentFile(bam_filename, "rb") header = bam.header results = {} if 'RG' in header: read_groups = header['RG'] if...
29.617647
117
0.735849
import argparse import pysam def read_groups_from_bam(bam_filename, use_libraries=False): bam = pysam.AlignmentFile(bam_filename, "rb") header = bam.header results = {} if 'RG' in header: read_groups = header['RG'] if use_libraries: field = 'LB' else: field = 'ID' for read_group in re...
true
true
f701433e2b27650c2062d7a20ec39b804434334b
750
py
Python
alembic/versions/18b9d421fbde_add_initial_models.py
maskducks/garlic-bot
cf8e30fcaeb99cc8877f65eacd07504a9970bf45
[ "MIT" ]
4
2022-03-19T16:53:09.000Z
2022-03-19T23:42:25.000Z
alembic/versions/18b9d421fbde_add_initial_models.py
maskducks/garlic-bot
cf8e30fcaeb99cc8877f65eacd07504a9970bf45
[ "MIT" ]
3
2022-03-20T11:58:30.000Z
2022-03-26T09:16:33.000Z
alembic/versions/18b9d421fbde_add_initial_models.py
maskducks/garlic-bot
cf8e30fcaeb99cc8877f65eacd07504a9970bf45
[ "MIT" ]
2
2022-03-21T05:22:47.000Z
2022-03-28T04:40:11.000Z
"""add initial models Revision ID: 18b9d421fbde Revises: Create Date: 2022-03-19 12:36:16.067795 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "18b9d421fbde" down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto...
22.058824
65
0.656
import sqlalchemy as sa from alembic import op revision = "18b9d421fbde" down_revision = None branch_labels = None depends_on = None def upgrade(): Constraint("user"), )
true
true
f701439a3be07ffe80c7e22fe838ba3e56ff4b67
2,705
py
Python
suites/Scenarios/CreateManyContractsInOneTrx.py
echoprotocol/pytests
5dce698558c2ba703aea03aab79906af1437da5d
[ "MIT" ]
1
2021-03-12T05:17:02.000Z
2021-03-12T05:17:02.000Z
suites/Scenarios/CreateManyContractsInOneTrx.py
echoprotocol/pytests
5dce698558c2ba703aea03aab79906af1437da5d
[ "MIT" ]
1
2019-11-19T12:10:59.000Z
2019-11-19T12:10:59.000Z
suites/Scenarios/CreateManyContractsInOneTrx.py
echoprotocol/pytests
5dce698558c2ba703aea03aab79906af1437da5d
[ "MIT" ]
2
2019-04-29T10:46:48.000Z
2019-10-29T10:01:03.000Z
# -*- coding: utf-8 -*- from common.base_test import BaseTest import lemoncheesecake.api as lcc from lemoncheesecake.matching import check_that, has_length SUITE = { "description": "Creating many contracts in a single transaction" } @lcc.prop("main", "type") @lcc.tags("scenarios", "many_contracts_in_one_trx") @...
40.984848
120
0.697967
from common.base_test import BaseTest import lemoncheesecake.api as lcc from lemoncheesecake.matching import check_that, has_length SUITE = { "description": "Creating many contracts in a single transaction" } @lcc.prop("main", "type") @lcc.tags("scenarios", "many_contracts_in_one_trx") @lcc.suite("Check scenar...
true
true
f70144df36bfb120c94c043c99c51af609fbbdea
39,698
py
Python
sbaas/analysis/analysis_stage00/stage00_query.py
SBRG/sbaas
9df76bbffdd620cf8566744a2b0503935998fbe0
[ "Apache-2.0" ]
1
2017-05-13T04:35:08.000Z
2017-05-13T04:35:08.000Z
sbaas/analysis/analysis_stage00/stage00_query.py
SBRG/sbaas
9df76bbffdd620cf8566744a2b0503935998fbe0
[ "Apache-2.0" ]
null
null
null
sbaas/analysis/analysis_stage00/stage00_query.py
SBRG/sbaas
9df76bbffdd620cf8566744a2b0503935998fbe0
[ "Apache-2.0" ]
2
2017-02-23T19:32:38.000Z
2020-01-14T19:13:05.000Z
from sbaas.analysis.analysis_base import * class stage00_query(base_analysis): def get_structureFile_standards(self,met_id_I): '''Querry structure file and extension from metabolomics standards''' try: structure = self.session.query(standards.structure_file, standard...
52.580132
191
0.58018
from sbaas.analysis.analysis_base import * class stage00_query(base_analysis): def get_structureFile_standards(self,met_id_I): try: structure = self.session.query(standards.structure_file, standards.structure_file_extention).filter( standards.met_id.like(...
true
true
f701454a3029889fb15ae188e49b88eafbc88eec
35,148
py
Python
localstack/utils/common.py
efritz/localstack
8163592b4de16508769030017d1022dbc1d89327
[ "Apache-2.0" ]
null
null
null
localstack/utils/common.py
efritz/localstack
8163592b4de16508769030017d1022dbc1d89327
[ "Apache-2.0" ]
null
null
null
localstack/utils/common.py
efritz/localstack
8163592b4de16508769030017d1022dbc1d89327
[ "Apache-2.0" ]
null
null
null
import io import os import re import pwd import grp import sys import json import uuid import time import glob import base64 import socket import hashlib import decimal import logging import tarfile import zipfile import binascii import calendar import tempfile import threading import subprocess import six import shuti...
31.750678
120
0.61682
import io import os import re import pwd import grp import sys import json import uuid import time import glob import base64 import socket import hashlib import decimal import logging import tarfile import zipfile import binascii import calendar import tempfile import threading import subprocess import six import shuti...
true
true
f70145979560947fad4d5d5d28ecfce2f2944135
36,046
py
Python
pymongo/client_session.py
slatermethuen/mongo-python-driver
923e83cd1a04674c8e4f6b8fe178dcf84fbe5a7d
[ "Apache-2.0" ]
null
null
null
pymongo/client_session.py
slatermethuen/mongo-python-driver
923e83cd1a04674c8e4f6b8fe178dcf84fbe5a7d
[ "Apache-2.0" ]
null
null
null
pymongo/client_session.py
slatermethuen/mongo-python-driver
923e83cd1a04674c8e4f6b8fe178dcf84fbe5a7d
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
38.926566
80
0.645065
import collections import os import sys import uuid from bson.binary import Binary from bson.int64 import Int64 from bson.py3compat import abc, integer_types, reraise_instance from bson.son import SON from bson.timestamp import Timestamp from pymongo import monotonic from pymongo.errors import (Configu...
true
true
f70145c5b8f64068fa4b5ed2fd23a6953ff95a4f
136
py
Python
ARC027/ARC027f.py
VolgaKurvar/AtCoder
21acb489f1594bbb1cdc64fbf8421d876b5b476d
[ "Unlicense" ]
null
null
null
ARC027/ARC027f.py
VolgaKurvar/AtCoder
21acb489f1594bbb1cdc64fbf8421d876b5b476d
[ "Unlicense" ]
null
null
null
ARC027/ARC027f.py
VolgaKurvar/AtCoder
21acb489f1594bbb1cdc64fbf8421d876b5b476d
[ "Unlicense" ]
null
null
null
#ARC027f def main(): import sys input=sys.stdin.readline sys.setrecursionlimit(10**6) if __name__ == '__main__': main()
17
32
0.654412
def main(): import sys input=sys.stdin.readline sys.setrecursionlimit(10**6) if __name__ == '__main__': main()
true
true
f70147505fc19c403669681d5e9f657e0d325321
877
py
Python
src/helper/parseCorpus.py
BookGin/ntuir
fc88e955b26fc0279e94c8998c4d624e6be67661
[ "MIT" ]
null
null
null
src/helper/parseCorpus.py
BookGin/ntuir
fc88e955b26fc0279e94c8998c4d624e6be67661
[ "MIT" ]
null
null
null
src/helper/parseCorpus.py
BookGin/ntuir
fc88e955b26fc0279e94c8998c4d624e6be67661
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import json import sys import bigram # usage: ./parseJson.py "corpus.json path" "output directory" def concatString(path): corpus = "" with open(path, 'r', encoding='UTF-8') as f: for line in f.readlines(): corpus += line return corpus ...
23.702703
61
0.639681
import json import sys import bigram def concatString(path): corpus = "" with open(path, 'r', encoding='UTF-8') as f: for line in f.readlines(): corpus += line return corpus corpus = concatString(sys.argv[1]) data = json.loads(corpus) output_path = sys.argv[2] topics = {} for doc...
true
true