hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f74bb88b3f6bfea079b96d46040340875f011c86
447
py
Python
Dataset/Leetcode/train/12/144.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
Dataset/Leetcode/train/12/144.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
Dataset/Leetcode/train/12/144.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
class Solution: def XXX(self, num: int) -> str: if num < 1 or num > 3999: return False a = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1] b = ['M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I'] r = [] for i in range(len(a)): ...
29.8
83
0.355705
class Solution: def XXX(self, num: int) -> str: if num < 1 or num > 3999: return False a = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1] b = ['M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I'] r = [] for i in range(len(a)): ...
false
true
f74bb92c85533fbf7b1bb2fea4d40653ba67bfa4
1,072
py
Python
tests/micropython/heapalloc.py
learnforpractice/micropython-cpp
004bc8382f74899e7b876cc29bfa6a9cc976ba10
[ "MIT" ]
198
2017-03-24T23:23:54.000Z
2022-01-07T07:14:00.000Z
tests/micropython/heapalloc.py
learnforpractice/micropython-cpp
004bc8382f74899e7b876cc29bfa6a9cc976ba10
[ "MIT" ]
509
2017-03-28T19:37:18.000Z
2022-03-31T20:31:43.000Z
tests/micropython/heapalloc.py
learnforpractice/micropython-cpp
004bc8382f74899e7b876cc29bfa6a9cc976ba10
[ "MIT" ]
187
2017-03-24T23:23:58.000Z
2022-02-25T01:48:45.000Z
# check that we can do certain things without allocating heap memory import micropython # Check for stackless build, which can't call functions without # allocating a frame on heap. try: def stackless(): pass micropython.heap_lock(); stackless(); micropython.heap_unlock() except RuntimeError: print("SKIP"...
24.363636
68
0.60541
import micropython # allocating a frame on heap. try: def stackless(): pass micropython.heap_lock(); stackless(); micropython.heap_unlock() except RuntimeError: print("SKIP") raise SystemExit def f1(a): print(a) def f2(a, b=2): print(a, b) def f3(a, b, c, d): x1 = x2 = a x3 = x4 = b...
true
true
f74bb9815c9a7ce29ad0c1bd1c39e0e73ce0f75a
307
py
Python
cmd/agent/dist/utils/subprocess_output.py
wowi42/datadog-agent
0e097f06104b44ea10e2834578b55471fd0ec6fb
[ "Apache-2.0" ]
1
2021-01-13T15:39:35.000Z
2021-01-13T15:39:35.000Z
cmd/agent/dist/utils/subprocess_output.py
wowi42/datadog-agent
0e097f06104b44ea10e2834578b55471fd0ec6fb
[ "Apache-2.0" ]
null
null
null
cmd/agent/dist/utils/subprocess_output.py
wowi42/datadog-agent
0e097f06104b44ea10e2834578b55471fd0ec6fb
[ "Apache-2.0" ]
null
null
null
# Unless explicitly stated otherwise all files in this repository are licensed # under the Apache License Version 2.0. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2018 Datadog, Inc. from datadog_checks.utils.subprocess_output import get_subprocess_output
51.166667
83
0.81759
from datadog_checks.utils.subprocess_output import get_subprocess_output
true
true
f74bb9b14b44dec57aec08c1c936308c1bec4e78
8,423
py
Python
deepcell/running.py
jizhouh/deepcell-tf
491ece59f5024d73429477ebdcb437a6e67d766b
[ "Apache-2.0" ]
250
2018-09-19T23:55:06.000Z
2022-03-30T02:20:52.000Z
deepcell/running.py
jizhouh/deepcell-tf
491ece59f5024d73429477ebdcb437a6e67d766b
[ "Apache-2.0" ]
251
2018-09-21T17:09:43.000Z
2022-02-28T19:04:50.000Z
deepcell/running.py
jizhouh/deepcell-tf
491ece59f5024d73429477ebdcb437a6e67d766b
[ "Apache-2.0" ]
64
2018-11-29T15:22:15.000Z
2022-03-21T03:37:43.000Z
# Copyright 2016-2021 The Van Valen Lab at the California Institute of # Technology (Caltech), with support from the Paul Allen Family Foundation, # Google, & National Institutes of Health (NIH) under Grant U24CA224309-01. # All rights reserved. # # Licensed under a modified Apache License, Version 2.0 (the "License");...
38.113122
86
0.611421
from __future__ import absolute_import from __future__ import print_function from __future__ import division import numpy as np from tensorflow.keras import backend as K from tensorflow.keras.models import Model from deepcell.utils.data_utils import trim_padding def get_cropped_input_shape(images, ...
true
true
f74bba68812e092250ad527ef3e3893b572aba8f
8,265
py
Python
src/poliastro/twobody/angles.py
wumpus/poliastro
6ef314f3b80528018ce489fd51d26db106daac91
[ "MIT" ]
null
null
null
src/poliastro/twobody/angles.py
wumpus/poliastro
6ef314f3b80528018ce489fd51d26db106daac91
[ "MIT" ]
1
2020-10-05T08:24:31.000Z
2020-10-05T08:24:31.000Z
src/poliastro/twobody/angles.py
wumpus/poliastro
6ef314f3b80528018ce489fd51d26db106daac91
[ "MIT" ]
null
null
null
"""Angles and anomalies. """ import numpy as np from astropy import coordinates, units as u from poliastro import constants from poliastro.core.angles import ( D_to_M as D_to_M_fast, D_to_nu as D_to_nu_fast, E_to_M as E_to_M_fast, E_to_nu as E_to_nu_fast, F_to_M as F_to_M_fast, F_to_nu as F_to...
22.958333
101
0.616334
import numpy as np from astropy import coordinates, units as u from poliastro import constants from poliastro.core.angles import ( D_to_M as D_to_M_fast, D_to_nu as D_to_nu_fast, E_to_M as E_to_M_fast, E_to_nu as E_to_nu_fast, F_to_M as F_to_M_fast, F_to_nu as F_to_nu_fast, M_to_D as M_to_D...
true
true
f74bbaf7bfecb372cbedc381abc8b93d38da4b9a
4,330
py
Python
GTSRB/eval_attribution_attack.py
jfc43/robust-attribution-regularization
fad85f40d4b1c2efcd851c32216b4549e7122421
[ "Apache-2.0" ]
13
2019-05-23T21:24:05.000Z
2022-01-20T20:10:25.000Z
GTSRB/eval_attribution_attack.py
jfc43/robust-attribution-regularization
fad85f40d4b1c2efcd851c32216b4549e7122421
[ "Apache-2.0" ]
2
2019-09-27T11:05:35.000Z
2020-02-18T05:52:26.000Z
GTSRB/eval_attribution_attack.py
jfc43/robust-attribution-regularization
fad85f40d4b1c2efcd851c32216b4549e7122421
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from datetime import datetime import numpy as np import shutil import json import math import os import sys import time import tensorflow as tf import gtsrb_input from model import Model os.environ["CUDA_VISI...
34.365079
126
0.671594
from __future__ import absolute_import from __future__ import division from __future__ import print_function from datetime import datetime import numpy as np import shutil import json import math import os import sys import time import tensorflow as tf import gtsrb_input from model import Model os.environ["CUDA_VISI...
true
true
f74bbbcfb9c27a67616600af448dfed00af3d0a1
2,725
py
Python
data/config.py
Ze-Yang/Context-Transformer
493fb6b3eb9f546dc172601de787fe89a1489065
[ "MIT" ]
86
2020-03-25T10:33:56.000Z
2022-03-24T04:11:43.000Z
data/config.py
Ze-Yang/Context-Transformer
493fb6b3eb9f546dc172601de787fe89a1489065
[ "MIT" ]
16
2020-04-03T08:43:40.000Z
2021-12-07T14:15:56.000Z
data/config.py
Ze-Yang/Context-Transformer
493fb6b3eb9f546dc172601de787fe89a1489065
[ "MIT" ]
12
2020-03-29T04:26:20.000Z
2021-12-21T04:33:52.000Z
# config.py __all__ = ['VOCroot', 'COCOroot', 'VOC_300', 'VOC_SSD_300', 'VOC_512', 'COCO_300', 'COCO_SSD_300', 'COCO_512', 'COCO_mobile_300'] VOCroot = "data/VOCdevkit" # path to VOCdevkit root dir COCOroot = "data/COCO" # path to COCO root dir # RFB CONFIGS VOC_300 = { 'feature_maps': [38, 19, ...
20.036765
82
0.480734
__all__ = ['VOCroot', 'COCOroot', 'VOC_300', 'VOC_SSD_300', 'VOC_512', 'COCO_300', 'COCO_SSD_300', 'COCO_512', 'COCO_mobile_300'] VOCroot = "data/VOCdevkit" COCOroot = "data/COCO" VOC_300 = { 'feature_maps': [38, 19, 10, 5, 3, 1], 'min_dim': 300, 'steps': [8, 16, 32, 64, 100, 300], ...
true
true
f74bbc0710b4d01524928caac65e83db86300605
1,647
py
Python
spirit/views/admin/user.py
benmurden/Spirit
168f6a603c24fe9e547b7c077677fea9518c0f28
[ "MIT" ]
3
2017-12-01T08:17:38.000Z
2021-01-29T15:40:06.000Z
spirit/views/admin/user.py
benmurden/Spirit
168f6a603c24fe9e547b7c077677fea9518c0f28
[ "MIT" ]
9
2020-06-05T17:44:02.000Z
2022-01-13T00:42:34.000Z
spirit/views/admin/user.py
benmurden/Spirit
168f6a603c24fe9e547b7c077677fea9518c0f28
[ "MIT" ]
1
2020-11-08T21:47:32.000Z
2020-11-08T21:47:32.000Z
#-*- coding: utf-8 -*- from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth import get_user_model from django.contrib import messages from django.utils.translation import ugettext as _ from spirit.utils.decorators import administrator_required from spirit.forms.admin import UserE...
30.5
86
0.72799
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth import get_user_model from django.contrib import messages from django.utils.translation import ugettext as _ from spirit.utils.decorators import administrator_required from spirit.forms.admin import UserEditForm User = get_us...
true
true
f74bbd8fe4ef752a7a8149ce53064aba644ac9d2
3,778
py
Python
mesonbuild/compilers/objcpp.py
inigomartinez/meson
e182dba61feb5b6872154e245014c58d99aa39d8
[ "Apache-2.0" ]
null
null
null
mesonbuild/compilers/objcpp.py
inigomartinez/meson
e182dba61feb5b6872154e245014c58d99aa39d8
[ "Apache-2.0" ]
null
null
null
mesonbuild/compilers/objcpp.py
inigomartinez/meson
e182dba61feb5b6872154e245014c58d99aa39d8
[ "Apache-2.0" ]
null
null
null
# Copyright 2012-2017 The Meson development team # 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 agree...
48.435897
126
0.66702
import os.path, subprocess import typing from ..mesonlib import EnvironmentException, MachineChoice from .clike import CLikeCompiler from .compilers import Compiler, ClangCompiler, GnuCompiler class ObjCPPCompiler(CLikeCompiler, Compiler): def __init__(self, exelist, version, for_machine: MachineChoice, is_c...
true
true
f74bc013ee5fffe2b91c5cc7db97bcc8f3395642
111
py
Python
dborm/ormbase.py
BuloZB/turhouse
e76db0cdc96d9c9acfc5bd99ed94d9ad1dfecfa1
[ "Apache-2.0" ]
null
null
null
dborm/ormbase.py
BuloZB/turhouse
e76db0cdc96d9c9acfc5bd99ed94d9ad1dfecfa1
[ "Apache-2.0" ]
null
null
null
dborm/ormbase.py
BuloZB/turhouse
e76db0cdc96d9c9acfc5bd99ed94d9ad1dfecfa1
[ "Apache-2.0" ]
1
2016-11-21T16:56:07.000Z
2016-11-21T16:56:07.000Z
# -*- coding: utf-8 -*- from sqlalchemy.ext.declarative import declarative_base OrmBase = declarative_base()
18.5
55
0.747748
from sqlalchemy.ext.declarative import declarative_base OrmBase = declarative_base()
true
true
f74bc0b244bc4d488c8c7f44c128310031163b8d
42,069
py
Python
tools/c7n_mailer/setup.py
tjstansell/cloud-custodian
830a1131537560e5032bc67e52b66e259630e899
[ "Apache-2.0" ]
1
2021-08-22T12:30:03.000Z
2021-08-22T12:30:03.000Z
tools/c7n_mailer/setup.py
tjstansell/cloud-custodian
830a1131537560e5032bc67e52b66e259630e899
[ "Apache-2.0" ]
8
2021-06-02T04:42:28.000Z
2022-03-10T19:25:52.000Z
tools/c7n_mailer/setup.py
tjstansell/cloud-custodian
830a1131537560e5032bc67e52b66e259630e899
[ "Apache-2.0" ]
null
null
null
# Automatically generated from poetry/pyproject.toml # flake8: noqa # -*- coding: utf-8 -*- from setuptools import setup packages = \ ['c7n_mailer', 'c7n_mailer.azure_mailer'] package_data = \ {'': ['*'], 'c7n_mailer': ['msg-templates/*']} install_requires = \ ['Jinja2>=3.0,<4.0', 'boto3>=1.11.12,<2.0.0', 'datadog...
764.890909
40,613
0.524448
from setuptools import setup packages = \ ['c7n_mailer', 'c7n_mailer.azure_mailer'] package_data = \ {'': ['*'], 'c7n_mailer': ['msg-templates/*']} install_requires = \ ['Jinja2>=3.0,<4.0', 'boto3>=1.11.12,<2.0.0', 'datadog>=0.34.0,<0.35.0', 'jsonpatch>=1.25,<2.0', 'jsonpointer>=2.0,<3.0', 'jsonschema>=3.2.0,<4...
true
true
f74bc1952016b9f6087ff50a16b6035a81ee2815
6,347
py
Python
stomp/adapter/multicast.py
AaronDMarasco/stomp.py
22f26087baf6206e531f0418125618bf553b3139
[ "Apache-2.0" ]
null
null
null
stomp/adapter/multicast.py
AaronDMarasco/stomp.py
22f26087baf6206e531f0418125618bf553b3139
[ "Apache-2.0" ]
null
null
null
stomp/adapter/multicast.py
AaronDMarasco/stomp.py
22f26087baf6206e531f0418125618bf553b3139
[ "Apache-2.0" ]
null
null
null
"""Multicast transport for stomp.py. Obviously not a typical message broker, but convenient if you don't have a broker, but still want to use stomp.py methods. """ import struct from stomp.connect import BaseConnection from stomp.protocol import * from stomp.transport import * from stomp.utils import * MCAST_GRP = ...
35.261111
113
0.600756
import struct from stomp.connect import BaseConnection from stomp.protocol import * from stomp.transport import * from stomp.utils import * MCAST_GRP = '224.1.1.1' MCAST_PORT = 5000 class MulticastTransport(Transport): def __init__(self, encoding): Transport.__init__(self, [], False, False, 0.0, 0.0, 0...
true
true
f74bc2301b6e3b66aebd76da2052726ff352be45
1,011
py
Python
anjou/config.py
donaldacmartin/anjou
27f35fc6c6a901e2e5093351e7318ddf9dae1519
[ "MIT" ]
null
null
null
anjou/config.py
donaldacmartin/anjou
27f35fc6c6a901e2e5093351e7318ddf9dae1519
[ "MIT" ]
null
null
null
anjou/config.py
donaldacmartin/anjou
27f35fc6c6a901e2e5093351e7318ddf9dae1519
[ "MIT" ]
null
null
null
"""anjou.config Reads and parses the configuration YAML. Functions: read_config(str) -> dict (throws ConfigException) """ from cerberus import Validator from cerberus.validator import DocumentError from yaml import safe_load from anjou.model import CONFIG_SCHEMA, ConfigException def _is_valid(config: dict) ->...
27.324324
76
0.699308
from cerberus import Validator from cerberus.validator import DocumentError from yaml import safe_load from anjou.model import CONFIG_SCHEMA, ConfigException def _is_valid(config: dict) -> bool: try: validator = Validator() return validator.validate(config, CONFIG_SCHEMA) except DocumentErro...
true
true
f74bc256a6ac39c2958fc3ff50df3ae3299ce9ec
4,082
py
Python
ProjectFiles/bin/Release/2.80/scripts/addons/uv_magic_uv/impl/flip_rotate_impl.py
BlazesRus/Bforartists
126bdd9e47cc984fd97ba5299bfb92ec5278e754
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2019-07-08T15:51:14.000Z
2019-07-08T15:51:14.000Z
ProjectFiles/bin/Release/2.80/scripts/addons/uv_magic_uv/impl/flip_rotate_impl.py
BlazesRus/Bforartists
126bdd9e47cc984fd97ba5299bfb92ec5278e754
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
ProjectFiles/bin/Release/2.80/scripts/addons/uv_magic_uv/impl/flip_rotate_impl.py
BlazesRus/Bforartists
126bdd9e47cc984fd97ba5299bfb92ec5278e754
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
# <pep8-80 compliant> # ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # ...
30.462687
76
0.562469
__author__ = "imdjs, Nutti <nutti.metro@gmail.com>" __status__ = "production" __version__ = "5.2" __date__ = "17 Nov 2018" __all__ = [ 'is_valid_context', 'get_uv_layer', 'get_src_face_info', ] def is_valid_context(context): obj = context.object if obj is None: return False if...
true
true
f74bc32183279cfce49aace28f27ea2b52eacb02
6,480
py
Python
mesh.py
weixiong-zheng-berkeley/BART-lite
ead39f757acab936af815352262080318163debb
[ "MIT" ]
null
null
null
mesh.py
weixiong-zheng-berkeley/BART-lite
ead39f757acab936af815352262080318163debb
[ "MIT" ]
null
null
null
mesh.py
weixiong-zheng-berkeley/BART-lite
ead39f757acab936af815352262080318163debb
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm import numpy as np class Mesh(object): def __init__(self, mesh_cells, domain_upper, mat_map): assert type(mesh_cells) == int, "mesh_cells must be an int" self._mesh_params = {'x_cell': mesh_cells, ...
32.4
87
0.5375
import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm import numpy as np class Mesh(object): def __init__(self, mesh_cells, domain_upper, mat_map): assert type(mesh_cells) == int, "mesh_cells must be an int" self._mesh_params = {'x_cell': mesh_cells, ...
true
true
f74bc3e5c81504c386b3c98a9dc3291466581761
490
py
Python
Curso Python/Mundo 1/Modulo3/Desafios/Desafio1/des017.py
catabimbas/Curso-Python
72549952db77fa9b0ea3746b83f94592e3fdeb30
[ "MIT" ]
null
null
null
Curso Python/Mundo 1/Modulo3/Desafios/Desafio1/des017.py
catabimbas/Curso-Python
72549952db77fa9b0ea3746b83f94592e3fdeb30
[ "MIT" ]
null
null
null
Curso Python/Mundo 1/Modulo3/Desafios/Desafio1/des017.py
catabimbas/Curso-Python
72549952db77fa9b0ea3746b83f94592e3fdeb30
[ "MIT" ]
null
null
null
# Meu código """ from math import sqrt co = float(input('Digite um valor pro cateto oposto: ')) ca = float(input('Digite um valor pro cateto adjacente: ')) co2 = co * co ca2 = ca * ca rqm = (ca2 + co2) rq = sqrt(rqm) print("O valor da hipotenusa é de {:.2f}".format(rq)) """ # Código do curso from math import hypot co =...
27.222222
59
0.677551
from math import hypot co = float(input('Comprimento do cateto oposto: ')) ca = float(input('Comprimento do cateto adjacente')) h1 = hypot(co, ca) print('A hipotenusa vai medir {:.2f}'.format(h1))
true
true
f74bc525824a8de83e8c6d7a0535a60784943e58
10,876
py
Python
alex/corpustools/ufal-transcriber2ufal-audio.py
cifkao/alex
9573ef5d24919b2b368b35f4dd02aa98f35f0f59
[ "Apache-2.0" ]
184
2015-02-11T04:14:41.000Z
2022-03-24T21:43:58.000Z
alex/corpustools/ufal-transcriber2ufal-audio.py
cifkao/alex
9573ef5d24919b2b368b35f4dd02aa98f35f0f59
[ "Apache-2.0" ]
69
2015-01-11T04:57:22.000Z
2019-04-24T10:25:56.000Z
alex/corpustools/ufal-transcriber2ufal-audio.py
cifkao/alex
9573ef5d24919b2b368b35f4dd02aa98f35f0f59
[ "Apache-2.0" ]
61
2015-03-04T10:52:13.000Z
2022-03-04T12:14:06.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This program processes transcribed audio in Transcriber files and copies all relevant speech segments into a destination directory. It also extracts transcriptions and saves them alongside the copied wavs. It scans for '*.trs' to extract transcriptions and names of wav...
35.083871
143
0.591578
""" This program processes transcribed audio in Transcriber files and copies all relevant speech segments into a destination directory. It also extracts transcriptions and saves them alongside the copied wavs. It scans for '*.trs' to extract transcriptions and names of wave files. ####################################...
false
true
f74bc584fa3f7f842ca2988f55f612e5139f9b02
7,270
py
Python
runtime/test/specs/V1_2/unidirectional_sequence_lstm_1step.mod.py
riscv-android-src/platform-packages-modules-NeuralNetworks
32a7fbe0cec3a17f9cdd8c6f11d94ae77e30add5
[ "Apache-2.0" ]
null
null
null
runtime/test/specs/V1_2/unidirectional_sequence_lstm_1step.mod.py
riscv-android-src/platform-packages-modules-NeuralNetworks
32a7fbe0cec3a17f9cdd8c6f11d94ae77e30add5
[ "Apache-2.0" ]
null
null
null
runtime/test/specs/V1_2/unidirectional_sequence_lstm_1step.mod.py
riscv-android-src/platform-packages-modules-NeuralNetworks
32a7fbe0cec3a17f9cdd8c6f11d94ae77e30add5
[ "Apache-2.0" ]
null
null
null
# # Copyright (C) 2019 The Android Open Source Project # # 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 la...
43.795181
91
0.601376
import copy model = Model() max_time = 1 n_batch = 2 n_input = 5 n_cell = 4 n_output = 3 input = Input("input", "TENSOR_FLOAT32", "{%d, %d, %d}" % (max_time, n_batch, n_input)) input_to_input_weights = Input("input_to_input_weights", "TENSOR_FLOAT32", "{%d, %d}" % (n_cell, n_input)) ...
true
true
f74bc5edd5925ad3309ec5e6bb22fc3b7efa245d
14,691
py
Python
tensorflow/python/training/experimental/loss_scale.py
PaulWang1905/tensorflow
ebf12d22b4801fb8dab5034cc94562bf7cc33fa0
[ "Apache-2.0" ]
9
2019-12-29T01:47:37.000Z
2021-12-21T13:47:41.000Z
tensorflow/python/training/experimental/loss_scale.py
PaulWang1905/tensorflow
ebf12d22b4801fb8dab5034cc94562bf7cc33fa0
[ "Apache-2.0" ]
1
2019-06-18T07:56:15.000Z
2019-06-18T07:56:15.000Z
tensorflow/python/training/experimental/loss_scale.py
PaulWang1905/tensorflow
ebf12d22b4801fb8dab5034cc94562bf7cc33fa0
[ "Apache-2.0" ]
2
2021-01-26T08:23:41.000Z
2021-07-13T16:23:18.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 applica...
36.91206
80
0.714791
from __future__ import absolute_import from __future__ import division from __future__ import print_function import abc import six from tensorflow.python.distribute import distribution_strategy_context from tensorflow.python.distribute import reduce_util from tensorflow.python.eager import context from tensorflow.py...
true
true
f74bc697fa71927b9e9ee28d5a097581877b550e
4,682
py
Python
styleclip_mapper.py
quickgrid/Chunkmogrify
998fb965a85e7286ab879086aa33ee93f95e9af4
[ "MIT" ]
13
2022-01-10T23:35:13.000Z
2022-03-19T15:49:02.000Z
styleclip_mapper.py
bycloudai/Chunkmogrify
10fb9ab3eef0fb50cec0e474ab48333032ee3c3b
[ "MIT" ]
null
null
null
styleclip_mapper.py
bycloudai/Chunkmogrify
10fb9ab3eef0fb50cec0e474ab48333032ee3c3b
[ "MIT" ]
null
null
null
import math import torch from torch import nn from torch.nn import functional as F from torch.nn import Module def fused_leaky_relu(input, bias, negative_slope=0.2, scale=2 ** 0.5): rest_dim = [1] * (input.ndim - bias.ndim - 1) input = input.cuda() if input.ndim == 3: return ( F.leaky_r...
26.908046
93
0.572832
import math import torch from torch import nn from torch.nn import functional as F from torch.nn import Module def fused_leaky_relu(input, bias, negative_slope=0.2, scale=2 ** 0.5): rest_dim = [1] * (input.ndim - bias.ndim - 1) input = input.cuda() if input.ndim == 3: return ( F.leaky_r...
true
true
f74bc6d75667c110776222ff403a0e8f56eaf904
17,834
py
Python
collie/metrics.py
RomaKoks/collie_recs
bc8979c8dbf68deefb030336d50f07f788cf1667
[ "BSD-3-Clause" ]
13
2021-07-14T10:37:24.000Z
2022-01-24T08:09:18.000Z
collie/metrics.py
RomaKoks/collie_recs
bc8979c8dbf68deefb030336d50f07f788cf1667
[ "BSD-3-Clause" ]
18
2021-07-13T22:06:11.000Z
2022-01-27T16:27:37.000Z
collie/metrics.py
RomaKoks/collie_recs
bc8979c8dbf68deefb030336d50f07f788cf1667
[ "BSD-3-Clause" ]
11
2021-07-14T04:58:49.000Z
2022-03-05T00:19:22.000Z
from typing import Any, Callable, Iterable, List, Optional, Tuple, Union import warnings import numpy as np import pytorch_lightning from scipy.sparse import csr_matrix import torch from torchmetrics import Metric from torchmetrics.functional import auroc from tqdm.auto import tqdm import collie from collie.interacti...
33.148699
100
0.642593
from typing import Any, Callable, Iterable, List, Optional, Tuple, Union import warnings import numpy as np import pytorch_lightning from scipy.sparse import csr_matrix import torch from torchmetrics import Metric from torchmetrics.functional import auroc from tqdm.auto import tqdm import collie from collie.interacti...
true
true
f74bc794e8189aead66280086bf2852344d77126
1,938
py
Python
OpenCV-Python/Intermediate/Custom Object Detection/objectDetectoin.py
mehulcparikh/ComputerVision
a5928eb00dd7bbec0f31c22b087af5d3c2a5e1dd
[ "MIT" ]
null
null
null
OpenCV-Python/Intermediate/Custom Object Detection/objectDetectoin.py
mehulcparikh/ComputerVision
a5928eb00dd7bbec0f31c22b087af5d3c2a5e1dd
[ "MIT" ]
null
null
null
OpenCV-Python/Intermediate/Custom Object Detection/objectDetectoin.py
mehulcparikh/ComputerVision
a5928eb00dd7bbec0f31c22b087af5d3c2a5e1dd
[ "MIT" ]
1
2021-07-16T05:42:26.000Z
2021-07-16T05:42:26.000Z
import cv2 ################################################################ path = 'haarcascades/haarcascade_frontalface_default.xml' # PATH OF THE CASCADE cameraNo = 1 # CAMERA NUMBER objectName = 'Arduino' # OBJECT NAME TO DISPLAY frameWidth= 640 # DISPLAY WIDTH...
35.236364
89
0.603715
import cv2 path = 'haarcascades/haarcascade_frontalface_default.xml' cameraNo = 1 objectName = 'Arduino' frameWidth= 640 frameHeight = 480 color= (255,0,255) cap = cv2.VideoCapture(cameraNo) cap.set(3, frameWidth) cap.set(4, frameHeight) def...
true
true
f74bc79549bda3c5f451d7162617180e056cf1ad
941
py
Python
sa/profiles/Eltex/LTE/get_config.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
84
2017-10-22T11:01:39.000Z
2022-02-27T03:43:48.000Z
sa/profiles/Eltex/LTE/get_config.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
22
2017-12-11T07:21:56.000Z
2021-09-23T02:53:50.000Z
sa/profiles/Eltex/LTE/get_config.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
23
2017-12-06T06:59:52.000Z
2022-02-24T00:02:25.000Z
# --------------------------------------------------------------------- # Eltex.LTE.get_config # --------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # --------------------------------------------------------------------- # NOC module...
33.607143
80
0.462274
from noc.core.script.base import BaseScript from noc.sa.interfaces.igetconfig import IGetConfig class Script(BaseScript): name = "Eltex.LTE.get_config" interface = IGetConfig def execute_cli(self, **kwargs): with self.profile.switch(self): conf = self.cli("show running-config") ...
true
true
f74bc958ff9049dd0b620bdaae52e4f34c7db349
2,162
py
Python
rpn/create_dataset/motion_planners/rrt_connect.py
cy5e/RPN
a45a6eb132489d565d8c28dcd441fbd4a2aa9be8
[ "MIT" ]
null
null
null
rpn/create_dataset/motion_planners/rrt_connect.py
cy5e/RPN
a45a6eb132489d565d8c28dcd441fbd4a2aa9be8
[ "MIT" ]
null
null
null
rpn/create_dataset/motion_planners/rrt_connect.py
cy5e/RPN
a45a6eb132489d565d8c28dcd441fbd4a2aa9be8
[ "MIT" ]
null
null
null
from .smoothing import smooth_path from .rrt import TreeNode, configs from .utils import irange, argmin, RRT_ITERATIONS, RRT_RESTARTS, RRT_SMOOTHING def rrt_connect(q1, q2, distance, sample, extend, collision, iterations=RRT_ITERATIONS): if collision(q1) or collision(q2): return None root1, root2 = Tr...
33.78125
88
0.599907
from .smoothing import smooth_path from .rrt import TreeNode, configs from .utils import irange, argmin, RRT_ITERATIONS, RRT_RESTARTS, RRT_SMOOTHING def rrt_connect(q1, q2, distance, sample, extend, collision, iterations=RRT_ITERATIONS): if collision(q1) or collision(q2): return None root1, root2 = Tr...
true
true
f74bca3e225f60a21d329b3d25b2768235ba98a8
5,510
py
Python
reading-datastore-backups/dsexport/crc32c.py
davidwtbuxton/google-cloud-demos
50cef03efc86c075a2a2e4b7f614586137ac97b0
[ "Apache-2.0" ]
null
null
null
reading-datastore-backups/dsexport/crc32c.py
davidwtbuxton/google-cloud-demos
50cef03efc86c075a2a2e4b7f614586137ac97b0
[ "Apache-2.0" ]
null
null
null
reading-datastore-backups/dsexport/crc32c.py
davidwtbuxton/google-cloud-demos
50cef03efc86c075a2a2e4b7f614586137ac97b0
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
33.192771
80
0.742105
import array CRC_TABLE = ( 0x00000000, 0xf26b8303, 0xe13b70f7, 0x1350f3f4, 0xc79a971f, 0x35f1141c, 0x26a1e7e8, 0xd4ca64eb, 0x8ad958cf, 0x78b2dbcc, 0x6be22838, 0x9989ab3b, 0x4d43cfd0, 0xbf284cd3, 0xac78bf27, 0x5e133c24, 0x105ec76f, 0xe235446c, 0xf165b798, 0x030e349b, 0xd7c45070, 0x25afd...
true
true
f74bca5dd25b9d571c23f42faebb11252995b56c
1,119
py
Python
main/codeSamples/DataStructures/graph.py
JKUATSES/dataStructuresAlgorithms
3989994e807fe74d33f6dfb6652633db5fc0c9b0
[ "MIT" ]
null
null
null
main/codeSamples/DataStructures/graph.py
JKUATSES/dataStructuresAlgorithms
3989994e807fe74d33f6dfb6652633db5fc0c9b0
[ "MIT" ]
1
2021-10-30T11:21:31.000Z
2021-10-30T11:21:31.000Z
main/codeSamples/DataStructures/graph.py
JKUATSES/dataStructuresAlgorithms
3989994e807fe74d33f6dfb6652633db5fc0c9b0
[ "MIT" ]
null
null
null
class Graph: graph_dict={} def addEdge(self,node,neighbour): if node not in self.graph_dict: self.graph_dict[node]=[neighbour] else: self.graph_dict[node].append(neighbour) def show_edges(self): for node in self.graph_dict: ...
26.023256
55
0.50849
class Graph: graph_dict={} def addEdge(self,node,neighbour): if node not in self.graph_dict: self.graph_dict[node]=[neighbour] else: self.graph_dict[node].append(neighbour) def show_edges(self): for node in self.graph_dict: ...
true
true
f74bcb05e4f6f81ea227d282c717279b6d38cb2a
1,571
py
Python
biostar/accounts/migrations/0011_logger.py
Oribyne/biostar-central-fork
89a459bc66d438518cf968c3f2e3ce1f50573b9e
[ "MIT" ]
477
2015-01-01T00:18:54.000Z
2022-03-21T10:29:29.000Z
biostar/accounts/migrations/0011_logger.py
coreydipsy/biostar-central
2b2f09199a6332877885ef54d9ac588ed0765770
[ "MIT" ]
247
2015-01-02T08:12:03.000Z
2022-02-24T15:20:58.000Z
biostar/accounts/migrations/0011_logger.py
coreydipsy/biostar-central
2b2f09199a6332877885ef54d9ac588ed0765770
[ "MIT" ]
251
2015-01-01T16:05:57.000Z
2022-03-25T21:32:44.000Z
# Generated by Django 2.2.7 on 2020-01-23 23:37 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('accounts', '0010_watched...
42.459459
251
0.590707
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('accounts', '0010_watched_tags'), ] operations = [ migra...
true
true
f74bcd5ba44dec5443b293f83896a801e3d87b46
387
py
Python
website/games/wsgi.py
KiOui/bussen
8d7d222ebd6eef9a008258456987ccc0490e4d67
[ "MIT" ]
null
null
null
website/games/wsgi.py
KiOui/bussen
8d7d222ebd6eef9a008258456987ccc0490e4d67
[ "MIT" ]
null
null
null
website/games/wsgi.py
KiOui/bussen
8d7d222ebd6eef9a008258456987ccc0490e4d67
[ "MIT" ]
null
null
null
""" WSGI config for games project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTING...
22.764706
78
0.782946
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "games.settings") application = get_wsgi_application()
true
true
f74bce29fa5725538d6b43fe81ed9c4921d1e50c
4,295
py
Python
backend/api/models.py
guillaumevincent/iswn
d539fbd1c933da0516bc26e79037bb3f812fe2fb
[ "MIT" ]
null
null
null
backend/api/models.py
guillaumevincent/iswn
d539fbd1c933da0516bc26e79037bb3f812fe2fb
[ "MIT" ]
null
null
null
backend/api/models.py
guillaumevincent/iswn
d539fbd1c933da0516bc26e79037bb3f812fe2fb
[ "MIT" ]
null
null
null
import uuid from django.db import models from django.contrib.auth.models import ( BaseUserManager, AbstractBaseUser ) from django.db.models.signals import post_save class MyUserManager(BaseUserManager): def create_user(self, email, password=None): if not email: raise ValueError('Users must...
29.217687
98
0.687544
import uuid from django.db import models from django.contrib.auth.models import ( BaseUserManager, AbstractBaseUser ) from django.db.models.signals import post_save class MyUserManager(BaseUserManager): def create_user(self, email, password=None): if not email: raise ValueError('Users must...
true
true
f74bcea9ca5c760856a4a0cd5cba00c3a50473b0
568
py
Python
primo.py
MrInternauta/Python-apuntes
c001c8f055955091af7f995ab2fd53b3c9d11a57
[ "MIT" ]
null
null
null
primo.py
MrInternauta/Python-apuntes
c001c8f055955091af7f995ab2fd53b3c9d11a57
[ "MIT" ]
null
null
null
primo.py
MrInternauta/Python-apuntes
c001c8f055955091af7f995ab2fd53b3c9d11a57
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- def run(): number = int(raw_input('Ingresa un numero: ')) state = is_prime(number) if state == True: print('Es primo') else: print('No es primo') def is_prime(number): if number < 2: return False elif number == 2: return True elif numb...
21.037037
50
0.492958
def run(): number = int(raw_input('Ingresa un numero: ')) state = is_prime(number) if state == True: print('Es primo') else: print('No es primo') def is_prime(number): if number < 2: return False elif number == 2: return True elif number > 2 and number % 2 ==...
true
true
f74bceb2687b918249ccc13a682b5c07ef3b2c04
1,231
py
Python
src/wxExtra/logpanel.py
Derfies/panda3d-editor
66a271c248b53f6b57d93cc0d2a7b4cbb0d37e4c
[ "MIT" ]
43
2015-01-29T12:28:21.000Z
2022-02-27T09:06:36.000Z
src/wxExtra/logpanel.py
Derfies/panda3d-editor
66a271c248b53f6b57d93cc0d2a7b4cbb0d37e4c
[ "MIT" ]
2
2022-02-15T01:26:35.000Z
2022-02-15T19:34:10.000Z
src/wxExtra/logpanel.py
Derfies/panda3d-editor
66a271c248b53f6b57d93cc0d2a7b4cbb0d37e4c
[ "MIT" ]
19
2015-02-25T16:24:29.000Z
2022-02-23T07:52:17.000Z
import logging import wx class LogPanel(wx.Panel): """ Simple wxPanel containing a text control which will display the root logger's stream. """ class CustomConsoleHandler(logging.StreamHandler): def __init__(self, text_ctrl, *args, **kwargs): super().__init__(*args, *...
27.977273
77
0.610073
import logging import wx class LogPanel(wx.Panel): class CustomConsoleHandler(logging.StreamHandler): def __init__(self, text_ctrl, *args, **kwargs): super().__init__(*args, **kwargs) self.text_ctrl = text_ctrl def emit(self, record): msg = self.format...
true
true
f74bd084e2ec0281ff856c34a75c853453b15ce0
449
py
Python
test_haystack/test_app_using_appconfig/tests.py
sgaist/django-haystack
471706a46d1c0d81ad4be5b8d7fd86d055dbe0f1
[ "BSD-3-Clause" ]
1
2019-04-21T17:23:23.000Z
2019-04-21T17:23:23.000Z
test_haystack/test_app_using_appconfig/tests.py
sgaist/django-haystack
471706a46d1c0d81ad4be5b8d7fd86d055dbe0f1
[ "BSD-3-Clause" ]
4
2015-09-25T13:14:49.000Z
2020-04-24T19:56:19.000Z
test_haystack/test_app_using_appconfig/tests.py
sgaist/django-haystack
471706a46d1c0d81ad4be5b8d7fd86d055dbe0f1
[ "BSD-3-Clause" ]
1
2019-07-22T14:24:11.000Z
2019-07-22T14:24:11.000Z
# encoding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals from django.test import TestCase from .models import MicroBlogPost class AppConfigTests(TestCase): def test_index_collection(self): from haystack import connections unified_index = connections[...
24.944444
82
0.761693
from __future__ import absolute_import, division, print_function, unicode_literals from django.test import TestCase from .models import MicroBlogPost class AppConfigTests(TestCase): def test_index_collection(self): from haystack import connections unified_index = connections['default'].get_uni...
true
true
f74bd12d7d4e22137523ec857496b79106d59c37
4,636
py
Python
test/test_md019.py
jackdewinter/pymarkdown
7ae408ba0b24506fa07552ffe520750bbff38c53
[ "MIT" ]
20
2021-01-14T17:39:09.000Z
2022-03-14T08:35:22.000Z
test/test_md019.py
jackdewinter/pymarkdown
7ae408ba0b24506fa07552ffe520750bbff38c53
[ "MIT" ]
304
2020-08-15T23:24:00.000Z
2022-03-31T23:34:03.000Z
test/test_md019.py
jackdewinter/pymarkdown
7ae408ba0b24506fa07552ffe520750bbff38c53
[ "MIT" ]
3
2021-08-11T10:26:26.000Z
2021-11-02T20:41:27.000Z
""" Module to provide tests related to the MD019 rule. """ from test.markdown_scanner import MarkdownScanner import pytest # pylint: disable=too-many-lines @pytest.mark.rules def test_md019_good_single_spacing(): """ Test to make sure this rule does not trigger with a document that contains an Atx Headi...
28.617284
109
0.690035
from test.markdown_scanner import MarkdownScanner import pytest @pytest.mark.rules def test_md019_good_single_spacing(): scanner = MarkdownScanner() supplied_arguments = [ "scan", "test/resources/rules/md019/single_spacing.md", ] expected_return_code = 0 expected_output = "...
true
true
f74bd15ade1f47ebd9209c14b4561db4592951e7
23,285
py
Python
SmartFoxServer_PRO_1.6.6/Server/lib/Lib/pstats.py
ChisdealHD/DetlasWorldLinux
336465a4df1a48c9a273329fc7a09d8099c4e4d5
[ "MIT" ]
8
2016-11-24T09:38:31.000Z
2021-04-23T13:04:48.000Z
SmartFoxServer_PRO_1.6.6/Server/lib/Lib/pstats.py
ChisdealHD/DetlasWorldLinux
336465a4df1a48c9a273329fc7a09d8099c4e4d5
[ "MIT" ]
4
2018-02-22T07:42:13.000Z
2021-12-13T10:53:09.000Z
SmartFoxServer_PRO_1.6.6/Server/lib/Lib/pstats.py
ChisdealHD/DetlasWorldLinux
336465a4df1a48c9a273329fc7a09d8099c4e4d5
[ "MIT" ]
4
2015-09-09T11:54:37.000Z
2018-05-26T05:08:14.000Z
"""Class for printing reports on profiled python code.""" # Class for printing reports on profiled python code. rev 1.0 4/1/94 # # Based on prior profile module by Sjoerd Mullender... # which was hacked somewhat by: Guido van Rossum # # see profile.doc and profile.py for more info. # Copyright 1994, by InfoSeek Co...
36.26947
88
0.538759
"""Class for printing reports on profiled python code.""" import os import time import marshal import re __all__ = ["Stats"] class Stats: """This class is used for creating reports from data generated by the Profile class. It is a "friend" of that class, and imports data either by direct access to me...
false
true
f74bd1e625ba2a1ef8849f7948361e4d8d607b03
2,175
py
Python
src/pipeline/validation/loocv/bagging_logistic_regression.py
RausellLab/tiresias
2acca303a0f6b4b1be784f597a59c1a883dbe43d
[ "Apache-2.0" ]
6
2019-07-03T16:11:15.000Z
2021-07-12T18:42:44.000Z
src/pipeline/validation/loocv/bagging_logistic_regression.py
RausellLab/tiresias
2acca303a0f6b4b1be784f597a59c1a883dbe43d
[ "Apache-2.0" ]
null
null
null
src/pipeline/validation/loocv/bagging_logistic_regression.py
RausellLab/tiresias
2acca303a0f6b4b1be784f597a59c1a883dbe43d
[ "Apache-2.0" ]
5
2019-10-16T09:40:58.000Z
2020-01-30T20:32:49.000Z
import ray import mlflow import torch from src.models import Bagging from src.models import LogisticRegression from src.evaluation import loocv from src.utils import data_loaders from src.utils import data_savers from src.utils import mlflow as u_mlflow RUN_NAME = "Bagging Logistic Regression" MODEL_NAME = "bagging-l...
31.071429
85
0.662069
import ray import mlflow import torch from src.models import Bagging from src.models import LogisticRegression from src.evaluation import loocv from src.utils import data_loaders from src.utils import data_savers from src.utils import mlflow as u_mlflow RUN_NAME = "Bagging Logistic Regression" MODEL_NAME = "bagging-l...
true
true
f74bd1fe3afe67ec44bf89577577b15d5af67c71
7,119
py
Python
kerasy/initializers.py
iwasakishuto/Keras-Imitation
8ac0cd7c8912d49d13b19a0182ad534c0781fbfe
[ "MIT" ]
4
2020-04-25T08:50:36.000Z
2020-04-26T04:49:16.000Z
kerasy/initializers.py
iwasakishuto/Keras-Imitation
8ac0cd7c8912d49d13b19a0182ad534c0781fbfe
[ "MIT" ]
null
null
null
kerasy/initializers.py
iwasakishuto/Keras-Imitation
8ac0cd7c8912d49d13b19a0182ad534c0781fbfe
[ "MIT" ]
null
null
null
# coding: utf-8 import re import numpy as np from scipy import stats from abc import ABCMeta, abstractmethod from .utils import mk_class_get from .utils import handleKeyError from .utils import handleRandomState class KerasyAbstInitializer(metaclass=ABCMeta): def __init__(self): self.name = re.sub(r"([a-z...
35.068966
102
0.613007
import re import numpy as np from scipy import stats from abc import ABCMeta, abstractmethod from .utils import mk_class_get from .utils import handleKeyError from .utils import handleRandomState class KerasyAbstInitializer(metaclass=ABCMeta): def __init__(self): self.name = re.sub(r"([a-z])([A-Z])", r"\1...
true
true
f74bd296354288d8bb977b9299a8c55a8605514e
1,367
py
Python
app/esper/caption_metadata.py
DanFu09/esper
ccc5547de3637728b8aaab059b6781baebc269ec
[ "Apache-2.0" ]
4
2018-12-27T07:21:38.000Z
2019-01-04T10:35:02.000Z
app/esper/caption_metadata.py
DanFu09/esper
ccc5547de3637728b8aaab059b6781baebc269ec
[ "Apache-2.0" ]
null
null
null
app/esper/caption_metadata.py
DanFu09/esper
ccc5547de3637728b8aaab059b6781baebc269ec
[ "Apache-2.0" ]
null
null
null
from operator import itemgetter, attrgetter from query.models import Video from esper.prelude import collect from rekall.interval_list import Interval, IntervalList import os import json import re CAPTION_METADATA_DIR = '/app/data/subs/meta' def clean_speaker(speaker): speaker = speaker.lower() speaker = re.s...
39.057143
204
0.625457
from operator import itemgetter, attrgetter from query.models import Video from esper.prelude import collect from rekall.interval_list import Interval, IntervalList import os import json import re CAPTION_METADATA_DIR = '/app/data/subs/meta' def clean_speaker(speaker): speaker = speaker.lower() speaker = re.s...
true
true
f74bd2be6117b394c1ad74affa44e0f66e398293
13,471
py
Python
mindmappings/costModel/timeloop/model_cnn.py
kartik-hegde/mindmappings
e96f2a287da2a93c4af0794a3bab1211bc95ba0a
[ "MIT" ]
17
2021-03-30T07:11:44.000Z
2022-03-08T11:06:39.000Z
mindmappings/costModel/timeloop/model_cnn.py
kartik-hegde/mindmappings
e96f2a287da2a93c4af0794a3bab1211bc95ba0a
[ "MIT" ]
1
2022-01-12T03:20:31.000Z
2022-01-30T17:24:30.000Z
mindmappings/costModel/timeloop/model_cnn.py
kartik-hegde/mindmappings
e96f2a287da2a93c4af0794a3bab1211bc95ba0a
[ "MIT" ]
4
2021-05-25T00:30:41.000Z
2022-02-09T13:57:21.000Z
import random import itertools import subprocess as sp import os import shutil from subprocess import STDOUT import os, sys import numpy as np from mindmappings.parameters import Parameters from mindmappings.costModel.timeloop.timeloop import Timeloop from mindmappings.utils.utils import factors, replicate examples = ...
42.22884
139
0.584738
import random import itertools import subprocess as sp import os import shutil from subprocess import STDOUT import os, sys import numpy as np from mindmappings.parameters import Parameters from mindmappings.costModel.timeloop.timeloop import Timeloop from mindmappings.utils.utils import factors, replicate examples = ...
true
true
f74bd3e6890ab791f72de5b1af4dc31306531daf
9,712
py
Python
twisted/python/logfile.py
ioggstream/twisted
34f9b1e3f097685839000c656332c66ee85be5d8
[ "Unlicense", "MIT" ]
3
2018-11-25T01:09:55.000Z
2021-08-24T01:56:36.000Z
twisted/python/logfile.py
ioggstream/twisted
34f9b1e3f097685839000c656332c66ee85be5d8
[ "Unlicense", "MIT" ]
1
2022-03-04T17:40:22.000Z
2022-03-04T17:40:22.000Z
twisted/python/logfile.py
ioggstream/twisted
34f9b1e3f097685839000c656332c66ee85be5d8
[ "Unlicense", "MIT" ]
3
2018-11-09T03:38:09.000Z
2020-02-24T06:26:10.000Z
# -*- test-case-name: twisted.test.test_logfile -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ A rotating, browsable log file. """ # System Imports import os, glob, time, stat from twisted.python import threadable class BaseLogFile: """ The base class for a log file that ...
29.975309
86
0.57187
import os, glob, time, stat from twisted.python import threadable class BaseLogFile: synchronized = ["write", "rotate"] def __init__(self, name, directory, defaultMode=None): self.directory = directory self.name = name self.path = os.path.join(directory, name) if default...
true
true
f74bd5230d676dac45a5289ff17a3fa97ede5a45
9,284
py
Python
dropbox_fs/crawler.py
JanHammerschmidt/dropbox-fs
d45b6b12cf3c02c406483dae21d217f110df871c
[ "MIT" ]
null
null
null
dropbox_fs/crawler.py
JanHammerschmidt/dropbox-fs
d45b6b12cf3c02c406483dae21d217f110df871c
[ "MIT" ]
null
null
null
dropbox_fs/crawler.py
JanHammerschmidt/dropbox-fs
d45b6b12cf3c02c406483dae21d217f110df871c
[ "MIT" ]
null
null
null
import logging import shutil import pickle import dropbox from datetime import datetime from pathlib import Path from threading import Event from requests.exceptions import ReadTimeout, ConnectionError from dropbox.exceptions import ApiError, AuthError from dropbox.files import FileMetadata, FolderMetadata fr...
40.541485
111
0.57346
import logging import shutil import pickle import dropbox from datetime import datetime from pathlib import Path from threading import Event from requests.exceptions import ReadTimeout, ConnectionError from dropbox.exceptions import ApiError, AuthError from dropbox.files import FileMetadata, FolderMetadata fr...
true
true
f74bd7f9d417495eba5939dfcbbe386a812d4e7d
4,710
py
Python
mlfromscratch/supervised_learning/bayesian_regression.py
Krishna00111/Machine-Learning-from-Scratch
5d6f5b1a2096acbb57a060385e471123b77b9a68
[ "MIT" ]
null
null
null
mlfromscratch/supervised_learning/bayesian_regression.py
Krishna00111/Machine-Learning-from-Scratch
5d6f5b1a2096acbb57a060385e471123b77b9a68
[ "MIT" ]
null
null
null
mlfromscratch/supervised_learning/bayesian_regression.py
Krishna00111/Machine-Learning-from-Scratch
5d6f5b1a2096acbb57a060385e471123b77b9a68
[ "MIT" ]
null
null
null
from __future__ import print_function, division import numpy as np from scipy.stats import chi2, multivariate_normal from mlfromscratch.utils import mean_squared_error, train_test_split, polynomial_features class BayesianRegression(object): """Bayesian regression model. If poly_degree is specified the fe...
40.603448
114
0.641614
from __future__ import print_function, division import numpy as np from scipy.stats import chi2, multivariate_normal from mlfromscratch.utils import mean_squared_error, train_test_split, polynomial_features class BayesianRegression(object): def __init__(self, n_draws, mu0, omega0, nu0, sigma_sq0, poly_de...
true
true
f74bd876d5af8e4097a12b465ac3c95a3164c116
2,781
py
Python
vsts/vsts/task_agent/v4_0/models/task_agent_pool.py
kenkuo/azure-devops-python-api
9e920bd25e938fa89ff7f60153e5b9e113ca839d
[ "MIT" ]
null
null
null
vsts/vsts/task_agent/v4_0/models/task_agent_pool.py
kenkuo/azure-devops-python-api
9e920bd25e938fa89ff7f60153e5b9e113ca839d
[ "MIT" ]
null
null
null
vsts/vsts/task_agent/v4_0/models/task_agent_pool.py
kenkuo/azure-devops-python-api
9e920bd25e938fa89ff7f60153e5b9e113ca839d
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
48.789474
170
0.602661
from .task_agent_pool_reference import TaskAgentPoolReference class TaskAgentPool(TaskAgentPoolReference): _attribute_map = { 'id': {'key': 'id', 'type': 'int'}, 'is_hosted': {'key': 'isHosted', 'type': 'bool'}, 'name': {'key': 'name', 'type': 'str'}, 'pool_type': {'key': 'poolTy...
true
true
f74bd8a8d5f21592bbeb180d4d73a97fdb02a9b1
381
py
Python
ask/ask/wsgi.py
kzn-bulat-s/abracadabra
25d582a3d6fc6587772776479ef2f1d284fbe0e9
[ "Unlicense" ]
null
null
null
ask/ask/wsgi.py
kzn-bulat-s/abracadabra
25d582a3d6fc6587772776479ef2f1d284fbe0e9
[ "Unlicense" ]
null
null
null
ask/ask/wsgi.py
kzn-bulat-s/abracadabra
25d582a3d6fc6587772776479ef2f1d284fbe0e9
[ "Unlicense" ]
null
null
null
""" WSGI config for ask project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ask.settings") from django.core.wsgi impo...
25.4
78
0.784777
import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ask.settings") from django.core.wsgi import get_wsgi_application application = get_wsgi_application()
true
true
f74bd8bb79cd61a265dbce382a969a66600d973b
10,174
py
Python
stog/data/dataset_readers/amr_parsing/preprocess/text_anonymizor.py
KiroSummer/AMR
49f4edc9e738ba3409d2d5e45e5e1881d8b338cc
[ "MIT" ]
2
2021-09-09T11:02:18.000Z
2021-10-04T12:18:16.000Z
stog/data/dataset_readers/amr_parsing/preprocess/text_anonymizor.py
KiroSummer/AMR
49f4edc9e738ba3409d2d5e45e5e1881d8b338cc
[ "MIT" ]
null
null
null
stog/data/dataset_readers/amr_parsing/preprocess/text_anonymizor.py
KiroSummer/AMR
49f4edc9e738ba3409d2d5e45e5e1881d8b338cc
[ "MIT" ]
null
null
null
import os import re import json from typing import List, Dict, Set from collections import defaultdict from stog.data.dataset_readers.amr_parsing.io import AMRIO from stog.data.dataset_readers.amr_parsing.amr import AMR def prev_token_is(index: int, k: int, amr: AMR, pattern: str): if index - k >= 0: ret...
40.696
140
0.518577
import os import re import json from typing import List, Dict, Set from collections import defaultdict from stog.data.dataset_readers.amr_parsing.io import AMRIO from stog.data.dataset_readers.amr_parsing.amr import AMR def prev_token_is(index: int, k: int, amr: AMR, pattern: str): if index - k >= 0: ret...
true
true
f74bd915a00e188a3e15b31d75e4fab5d0678942
3,486
py
Python
lego/apps/permissions/tests/migrations/0001_initial.py
ollfkaih/lego
b15aacaf09efe90e7f984d25b0e7bddbe12647e8
[ "MIT" ]
45
2017-10-24T12:09:06.000Z
2021-11-03T21:21:03.000Z
lego/apps/permissions/tests/migrations/0001_initial.py
ollfkaih/lego
b15aacaf09efe90e7f984d25b0e7bddbe12647e8
[ "MIT" ]
980
2017-10-24T12:29:07.000Z
2022-03-31T04:04:31.000Z
lego/apps/permissions/tests/migrations/0001_initial.py
ollfkaih/lego
b15aacaf09efe90e7f984d25b0e7bddbe12647e8
[ "MIT" ]
23
2018-04-11T16:34:22.000Z
2021-11-23T12:28:30.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-28 10:44 from __future__ import unicode_literals import django.db.models.deletion import django.utils.timezone from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): initial = True depe...
33.519231
88
0.403901
from __future__ import unicode_literals import django.db.models.deletion import django.utils.timezone from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ("users", "0001_initial"), migrations.swappa...
true
true
f74bdb6e8649c00dbb2ee80660d7a80dbe509e45
13,273
py
Python
pycatia/drafting_interfaces/drawing_dimensions.py
Tian-Jionglu/pycatia
b315aeb3a74846f134ff6b67b3a6334b9d3905fa
[ "MIT" ]
1
2020-04-27T13:59:10.000Z
2020-04-27T13:59:10.000Z
pycatia/drafting_interfaces/drawing_dimensions.py
Luanee/pycatia
ea5eef8178f73de12404561c00baf7a7ca30da59
[ "MIT" ]
null
null
null
pycatia/drafting_interfaces/drawing_dimensions.py
Luanee/pycatia
ea5eef8178f73de12404561c00baf7a7ca30da59
[ "MIT" ]
null
null
null
#! usr/bin/python3.6 """ Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-06-11 12:40:47.360445 .. warning:: The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. They are there as a guide as to how the visual basic / catscript function...
44.841216
117
0.497401
from pycatia.drafting_interfaces.drawing_dimension import DrawingDimension from pycatia.system_interfaces.collection import Collection from pycatia.types import cat_variant class DrawingDimensions(Collection): def __init__(self, com_object): super().__init__(com_object, child_object=DrawingDimension) ...
true
true
f74bdbf3375c85ff95b0b9e7244cb2146bc5864c
19,172
py
Python
build/python/modules/serialization/serialization.py
fabio-d/fuchsia-stardock
e57f5d1cf015fe2294fc2a5aea704842294318d2
[ "BSD-2-Clause" ]
5
2022-01-10T20:22:17.000Z
2022-01-21T20:14:17.000Z
build/python/modules/serialization/serialization.py
fabio-d/fuchsia-stardock
e57f5d1cf015fe2294fc2a5aea704842294318d2
[ "BSD-2-Clause" ]
null
null
null
build/python/modules/serialization/serialization.py
fabio-d/fuchsia-stardock
e57f5d1cf015fe2294fc2a5aea704842294318d2
[ "BSD-2-Clause" ]
null
null
null
# Copyright 2022 The Fuchsia Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Serialization Methods for Classes. This module is inspired by the `serde` crate in Rust, and the dataclasses python module. It provides a type-aware mecha...
31.326797
98
0.641248
import dataclasses import functools import inspect import json from typing import ( Any, Callable, Dict, List, Optional, Set, Type, TypeVar, Union, get_type_hints) import typing __all__ = [ 'instance_from_dict', 'instance_to_dict', 'json_dump', 'json_dumps', 'json_load', 'json_loads', 'serialize_dict...
true
true
f74bdd9420fd6baf1b039bb1ac2217c76dc61bfb
47
py
Python
Imaobong Tom/Phase 1/Python Basic 1/Day 6/No. 2.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
6
2020-05-23T19:53:25.000Z
2021-05-08T20:21:30.000Z
Imaobong Tom/Phase 1/Python Basic 1/Day 6/No. 2.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
8
2020-05-14T18:53:12.000Z
2020-07-03T00:06:20.000Z
Imaobong Tom/Phase 1/Python Basic 1/Day 6/No. 2.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
39
2020-05-10T20:55:02.000Z
2020-09-12T17:40:59.000Z
import struct print(struct.calcsize("P") * 8)
11.75
31
0.702128
import struct print(struct.calcsize("P") * 8)
true
true
f74bdd977c44a1ea574d1032415a11e74ee00b16
1,124
py
Python
forms.py
matheuszmz/RegressionAPI
715cf4874f95aa7d1be284c8a539dfa603823ee5
[ "MIT" ]
null
null
null
forms.py
matheuszmz/RegressionAPI
715cf4874f95aa7d1be284c8a539dfa603823ee5
[ "MIT" ]
null
null
null
forms.py
matheuszmz/RegressionAPI
715cf4874f95aa7d1be284c8a539dfa603823ee5
[ "MIT" ]
null
null
null
from wtforms import DecimalField, Form, RadioField from wtforms.validators import NumberRange class NCForm(Form): c8_0 = DecimalField('C8:0', validators=[NumberRange()]) c10_0 = DecimalField('C10:0', validators=[NumberRange()]) c12_0 = DecimalField('C12:0', validators=[NumberRange()]) c14_0 = DecimalF...
53.52381
133
0.689502
from wtforms import DecimalField, Form, RadioField from wtforms.validators import NumberRange class NCForm(Form): c8_0 = DecimalField('C8:0', validators=[NumberRange()]) c10_0 = DecimalField('C10:0', validators=[NumberRange()]) c12_0 = DecimalField('C12:0', validators=[NumberRange()]) c14_0 = DecimalF...
true
true
f74bde79f05a53edec10baff210864858e6aca9a
1,092
py
Python
bali/resources/model_resource.py
Ed-XCF/bali
ac2facd7390309fa9bbfe32c3ca33bd7556096d8
[ "MIT" ]
null
null
null
bali/resources/model_resource.py
Ed-XCF/bali
ac2facd7390309fa9bbfe32c3ca33bd7556096d8
[ "MIT" ]
null
null
null
bali/resources/model_resource.py
Ed-XCF/bali
ac2facd7390309fa9bbfe32c3ca33bd7556096d8
[ "MIT" ]
null
null
null
""" Bali ModelResource """ from .resource import Resource from ..db.operators import get_filters_expr from ..schemas import ListRequest __all__ = ['ModelResource'] class ModelResource(Resource): """ `ModelResource` is a fast way to implement resource layer for model objects """ model = None ...
25.395349
62
0.630952
from .resource import Resource from ..db.operators import get_filters_expr from ..schemas import ListRequest __all__ = ['ModelResource'] class ModelResource(Resource): model = None schema = None def list(self, schema_in: ListRequest = None): return self.model.query().filter( *get_fi...
true
true
f74bde956fb2d9433fffd0fd5c0c9f8a9df65bee
6,098
py
Python
qa/rpc-tests/proxy_test.py
LordSoylent/zoomba
ad06c0ce54186dcbe43de7be2e1a552c0e556ce9
[ "MIT" ]
9
2018-07-21T21:32:46.000Z
2020-05-10T05:11:18.000Z
qa/rpc-tests/proxy_test.py
LordSoylent/zoomba
ad06c0ce54186dcbe43de7be2e1a552c0e556ce9
[ "MIT" ]
2
2018-07-15T21:44:28.000Z
2018-09-18T18:13:24.000Z
qa/rpc-tests/proxy_test.py
LordSoylent/zoomba
ad06c0ce54186dcbe43de7be2e1a552c0e556ce9
[ "MIT" ]
7
2018-08-02T01:53:01.000Z
2018-12-24T16:46:47.000Z
#!/usr/bin/env python2 # Copyright (c) 2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import socket import traceback, sys from binascii import hexlify import time, os from socks5 import Socks5Conf...
41.767123
145
0.653001
import socket import traceback, sys from binascii import hexlify import time, os from socks5 import Socks5Configuration, Socks5Command, Socks5Server, AddressType from test_framework import BitcoinTestFramework from util import * class ProxyTest(BitcoinTestFramework): def __init__(self): se...
true
true
f74bdf2a2e61eede9a60e35fdbb36f5bfe27ceda
2,508
py
Python
official/mnist/mnist_eager_test.py
SimiaCryptus/models
c652a23a650070b71e286f1ded93726670161940
[ "Apache-2.0" ]
null
null
null
official/mnist/mnist_eager_test.py
SimiaCryptus/models
c652a23a650070b71e286f1ded93726670161940
[ "Apache-2.0" ]
null
null
null
official/mnist/mnist_eager_test.py
SimiaCryptus/models
c652a23a650070b71e286f1ded93726670161940
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
29.505882
80
0.714912
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import tensorflow.contrib.eager as tfe from official.mnist import mnist from official.mnist import mnist_eager from official.utils.misc import keras_utils def device(): return "/d...
true
true
f74bdf96750edb2270fb58d487d021fad7047165
1,368
py
Python
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/sql_database_get_properties_options_py3.py
limingu/azure-cli-extensions
1bc29f089f4da42ab8905e440f2f46d6b5b0aa97
[ "MIT" ]
2
2021-06-05T17:51:26.000Z
2021-11-17T11:17:56.000Z
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/sql_database_get_properties_options_py3.py
limingu/azure-cli-extensions
1bc29f089f4da42ab8905e440f2f46d6b5b0aa97
[ "MIT" ]
1
2020-06-12T01:39:40.000Z
2020-06-12T01:39:40.000Z
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/models/sql_database_get_properties_options_py3.py
anpaz-msft/azure-cli-extensions
847fd487fe61e83f2a4163a9393edc9555267bc2
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
41.454545
133
0.663743
from .options_resource_py3 import OptionsResource class SqlDatabaseGetPropertiesOptions(OptionsResource): _attribute_map = { 'throughput': {'key': 'throughput', 'type': 'int'}, 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, } def __init__(self, *, throu...
true
true
f74be077d7384048d6acf10a0956858edaf98acb
336
py
Python
ddtrace/contrib/django/compat.py
tophatmonocle/dd-trace-py
7db12f1c398c07cd5baf91c571aed672dbb6496d
[ "BSD-3-Clause" ]
null
null
null
ddtrace/contrib/django/compat.py
tophatmonocle/dd-trace-py
7db12f1c398c07cd5baf91c571aed672dbb6496d
[ "BSD-3-Clause" ]
null
null
null
ddtrace/contrib/django/compat.py
tophatmonocle/dd-trace-py
7db12f1c398c07cd5baf91c571aed672dbb6496d
[ "BSD-3-Clause" ]
null
null
null
import django if django.VERSION >= (1, 10, 1): def user_is_authenticated(user): # Explicit comparision due to the following bug # https://code.djangoproject.com/ticket/26988 return user.is_authenticated == True # noqa E712 else: def user_is_authenticated(user): return user.is_...
28
57
0.684524
import django if django.VERSION >= (1, 10, 1): def user_is_authenticated(user): return user.is_authenticated == True else: def user_is_authenticated(user): return user.is_authenticated()
true
true
f74be190470f45fcf04f2f476a0f2da49ebdeeef
1,887
py
Python
scikits/statsmodels/datasets/stackloss/data.py
matthew-brett/statsmodels
915c9dc2d762c5592ac17a7cf5f1cc957fcbde1c
[ "BSD-3-Clause" ]
null
null
null
scikits/statsmodels/datasets/stackloss/data.py
matthew-brett/statsmodels
915c9dc2d762c5592ac17a7cf5f1cc957fcbde1c
[ "BSD-3-Clause" ]
null
null
null
scikits/statsmodels/datasets/stackloss/data.py
matthew-brett/statsmodels
915c9dc2d762c5592ac17a7cf5f1cc957fcbde1c
[ "BSD-3-Clause" ]
null
null
null
"""Stack loss data""" __all__ = ['COPYRIGHT','TITLE','SOURCE','DESCRSHORT','DESCRLONG','NOTE', 'load'] __docformat__ = 'restructuredtext' COPYRIGHT = """This is public domain. """ TITLE = __doc__ SOURCE = """ Brownlee, K. A. (1965), "Statistical Theory and Methodology in Science and Engineering", 2nd e...
31.983051
80
0.688394
__all__ = ['COPYRIGHT','TITLE','SOURCE','DESCRSHORT','DESCRLONG','NOTE', 'load'] __docformat__ = 'restructuredtext' COPYRIGHT = """This is public domain. """ TITLE = __doc__ SOURCE = """ Brownlee, K. A. (1965), "Statistical Theory and Methodology in Science and Engineering", 2nd edition, New York:Wiley...
true
true
f74be1d30f3ec8db5133654af3b0a125460e39e9
2,131
py
Python
main_Hand_Tracking.py
arymandeshwal/Learn-Sign-Language
97728203ba2b654782b47001b4fb28b9bb14ce67
[ "MIT" ]
1
2021-06-14T11:57:27.000Z
2021-06-14T11:57:27.000Z
main_Hand_Tracking.py
arymandeshwal/Learn-Sign-Language
97728203ba2b654782b47001b4fb28b9bb14ce67
[ "MIT" ]
1
2021-06-16T13:41:43.000Z
2021-06-16T13:41:43.000Z
main_Hand_Tracking.py
arymandeshwal/Learn-Sign-Language
97728203ba2b654782b47001b4fb28b9bb14ce67
[ "MIT" ]
1
2021-06-17T11:08:35.000Z
2021-06-17T11:08:35.000Z
import cv2 import mediapipe as mp class handDetector(): """ Initiating: mode = False --> when using dynamic video capture maxHands --> How many hands to detect detectionCon --> success of detection trackCon --> used for tracking of hand, might have increased latency """ def __init__(sel...
29.191781
98
0.596903
import cv2 import mediapipe as mp class handDetector(): def __init__(self, mode=False, maxHands=1, detectionCon=0.5, trackCon=0.7): self.mode = mode self.maxHands = maxHands self.detectionCon = detectionCon self.trackCon = trackCon self.mpHands = mp.solutions.hands s...
true
true
f74be277f160e31d1e7f42eb00680377b1bec982
2,993
py
Python
win32con_client_tts.py
O8pen/MouseSelectTTS
724be8a434322cf73564a44d85f8372a24409610
[ "Apache-2.0" ]
null
null
null
win32con_client_tts.py
O8pen/MouseSelectTTS
724be8a434322cf73564a44d85f8372a24409610
[ "Apache-2.0" ]
null
null
null
win32con_client_tts.py
O8pen/MouseSelectTTS
724be8a434322cf73564a44d85f8372a24409610
[ "Apache-2.0" ]
null
null
null
import win32com.client import clipboard from win32api import SetCursorPos, mouse_event from win32con import MOUSEEVENTF_LEFTDOWN, MOUSEEVENTF_LEFTUP from time import sleep from pyautogui import hotkey from pynput import mouse import pythoncom #Select text #press mouse button #ctrl+c #remove new line char...
25.801724
164
0.553291
import win32com.client import clipboard from win32api import SetCursorPos, mouse_event from win32con import MOUSEEVENTF_LEFTDOWN, MOUSEEVENTF_LEFTUP from time import sleep from pyautogui import hotkey from pynput import mouse import pythoncom trashcan_position_x = 1500 trashcan_position_y = 1000 input...
true
true
f74be40541ed52d3d130d98259c4e9a4a54d3644
3,070
py
Python
office365/sharepoint/ui/applicationpages/clientPeoplePickerQueryParameters.py
wreiner/Office365-REST-Python-Client
476bbce4f5928a140b4f5d33475d0ac9b0783530
[ "MIT" ]
null
null
null
office365/sharepoint/ui/applicationpages/clientPeoplePickerQueryParameters.py
wreiner/Office365-REST-Python-Client
476bbce4f5928a140b4f5d33475d0ac9b0783530
[ "MIT" ]
null
null
null
office365/sharepoint/ui/applicationpages/clientPeoplePickerQueryParameters.py
wreiner/Office365-REST-Python-Client
476bbce4f5928a140b4f5d33475d0ac9b0783530
[ "MIT" ]
null
null
null
from office365.runtime.client_value import ClientValue from office365.sharepoint.principal.principalSource import PrincipalSource from office365.sharepoint.principal.principalType import PrincipalType class ClientPeoplePickerQueryParameters(ClientValue): def __init__(self, queryString, allowEmailAddresses=True, ...
60.196078
120
0.749511
from office365.runtime.client_value import ClientValue from office365.sharepoint.principal.principalSource import PrincipalSource from office365.sharepoint.principal.principalType import PrincipalType class ClientPeoplePickerQueryParameters(ClientValue): def __init__(self, queryString, allowEmailAddresses=True, ...
true
true
f74be41a0b82d16d29e9badfcc3f1f244d2e6282
320
py
Python
backend/src/app/schemas/bin.py
niikakralj/EESTEC-Team
be70366dfc249e200ade8deb84408e758123c499
[ "MIT" ]
null
null
null
backend/src/app/schemas/bin.py
niikakralj/EESTEC-Team
be70366dfc249e200ade8deb84408e758123c499
[ "MIT" ]
null
null
null
backend/src/app/schemas/bin.py
niikakralj/EESTEC-Team
be70366dfc249e200ade8deb84408e758123c499
[ "MIT" ]
null
null
null
import datetime from pydantic import BaseModel class BinsOpened(BaseModel): card_id: str bin_id: int bin_type: str timestamp: datetime.datetime weight: int recycle_status_ok: bool = False class BinsStatus(BaseModel): bin_id: int timestamp: datetime.datetime waste_status: int
14.545455
35
0.7125
import datetime from pydantic import BaseModel class BinsOpened(BaseModel): card_id: str bin_id: int bin_type: str timestamp: datetime.datetime weight: int recycle_status_ok: bool = False class BinsStatus(BaseModel): bin_id: int timestamp: datetime.datetime waste_status: int
true
true
f74be48cb52044a14c0a3ea505f710cf19254be9
41
py
Python
examples/example0.py
mtasic85/pynogil
4150aa655d6bafbb74b6eb5c10e058e8b56ebe54
[ "MIT" ]
null
null
null
examples/example0.py
mtasic85/pynogil
4150aa655d6bafbb74b6eb5c10e058e8b56ebe54
[ "MIT" ]
1
2020-05-01T19:19:11.000Z
2020-05-01T19:19:11.000Z
examples/example0.py
mtasic85/pynogil
4150aa655d6bafbb74b6eb5c10e058e8b56ebe54
[ "MIT" ]
null
null
null
print(sum([i for i in range(1_000_000)]))
41
41
0.707317
print(sum([i for i in range(1_000_000)]))
true
true
f74be6e3c98316c8b870632b82e79659b5263889
9,165
py
Python
codes/qtm/qcompilation.py
vutuanhai237/QuantumTomographyProject
78058e3faece2209e46c9f9e16a1c38cdb33e7e2
[ "MIT" ]
null
null
null
codes/qtm/qcompilation.py
vutuanhai237/QuantumTomographyProject
78058e3faece2209e46c9f9e16a1c38cdb33e7e2
[ "MIT" ]
null
null
null
codes/qtm/qcompilation.py
vutuanhai237/QuantumTomographyProject
78058e3faece2209e46c9f9e16a1c38cdb33e7e2
[ "MIT" ]
null
null
null
import qtm.base import qtm.optimizer import qtm.loss import qtm.utilities import numpy as np import typing, types import qiskit import matplotlib.pyplot as plt class QuantumCompilation(): def __init__(self) -> None: self.u = None self.vdagger = None self.is_trained = False self.opti...
44.0625
294
0.612111
import qtm.base import qtm.optimizer import qtm.loss import qtm.utilities import numpy as np import typing, types import qiskit import matplotlib.pyplot as plt class QuantumCompilation(): def __init__(self) -> None: self.u = None self.vdagger = None self.is_trained = False self.opti...
true
true
f74be735de37a6a243c191faa6f73ab9681e9b1f
706
py
Python
otcore/hit/migrations/0007_auto_20160606_1138.py
NYULibraries/dlts-enm-tct-backend
07455a660fb2cb8bc91a54f7f12d150923678157
[ "Apache-2.0" ]
null
null
null
otcore/hit/migrations/0007_auto_20160606_1138.py
NYULibraries/dlts-enm-tct-backend
07455a660fb2cb8bc91a54f7f12d150923678157
[ "Apache-2.0" ]
2
2017-10-30T21:19:07.000Z
2017-10-31T18:06:30.000Z
otcore/hit/migrations/0007_auto_20160606_1138.py
NYULibraries/dlts-enm-tct-backend
07455a660fb2cb8bc91a54f7f12d150923678157
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-06-06 15:38 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('hit', '0006_auto_20160520_1810'), ] operations = [ ...
27.153846
148
0.627479
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('hit', '0006_auto_20160520_1810'), ] operations = [ migrations.AlterModelOptions( name='basket', ...
true
true
f74be9dd6ed90e57efe87ec45ea05d67c564b29f
646
py
Python
outpass/leave/migrations/0004_auto_20181212_1442.py
Tlazypanda/outpass
bd52b8b91880471965b997fb4f494c0ad1aa2f20
[ "MIT" ]
null
null
null
outpass/leave/migrations/0004_auto_20181212_1442.py
Tlazypanda/outpass
bd52b8b91880471965b997fb4f494c0ad1aa2f20
[ "MIT" ]
null
null
null
outpass/leave/migrations/0004_auto_20181212_1442.py
Tlazypanda/outpass
bd52b8b91880471965b997fb4f494c0ad1aa2f20
[ "MIT" ]
null
null
null
# Generated by Django 2.0.9 on 2018-12-12 14:42 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('leave', '0003_auto_20181212_1214'), ] operations = [ migrations.AddField( model_name='request', name...
25.84
110
0.605263
import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('leave', '0003_auto_20181212_1214'), ] operations = [ migrations.AddField( model_name='request', name='perm', field=models.BooleanField(d...
true
true
f74bea1c448e46c8019bc0b074e3c0c4c5ffaab1
22,514
py
Python
omero/util_scripts/Combine_Images.py
snoopycrimecop/scripts
7ec5df31e83f1fda7efc02aca3f3426174547308
[ "OML" ]
1
2022-02-05T08:01:03.000Z
2022-02-05T08:01:03.000Z
omero/util_scripts/Combine_Images.py
snoopycrimecop/scripts
7ec5df31e83f1fda7efc02aca3f3426174547308
[ "OML" ]
37
2019-11-29T16:19:57.000Z
2022-03-29T10:20:40.000Z
omero/util_scripts/Combine_Images.py
snoopycrimecop/scripts
7ec5df31e83f1fda7efc02aca3f3426174547308
[ "OML" ]
3
2021-02-05T19:26:44.000Z
2022-03-28T09:07:01.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ----------------------------------------------------------------------------- Copyright (C) 2006-2014 University of Dundee. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Lic...
35.623418
79
0.583015
import re from numpy import zeros import omero import omero.scripts as scripts from omero.gateway import BlitzGateway import omero.constants from omero.rtypes import rstring, rlong, robject import omero.util.script_utils as script_utils COLOURS = script_utils.COLOURS DEFAULT_T_REGEX = "_T" DEFAULT_Z_REGEX = "_Z" DE...
true
true
f74bea409eba463bba013847a60ddf00deee2264
899
py
Python
dist_stepper_button.py
uniformlyMatt/halloween
741fb5792a5582d2d2a9100938dc413442eafa1e
[ "MIT" ]
null
null
null
dist_stepper_button.py
uniformlyMatt/halloween
741fb5792a5582d2d2a9100938dc413442eafa1e
[ "MIT" ]
null
null
null
dist_stepper_button.py
uniformlyMatt/halloween
741fb5792a5582d2d2a9100938dc413442eafa1e
[ "MIT" ]
null
null
null
from time import sleep, time import RPi.GPIO as gpio import physical_objects as ph gpio.setwarnings(False) gpio.setmode(gpio.BCM) # Initialize the physical objects in the system elevator = ph.Elevator(motor1 = 23, motor2 = 24, enable = 25, speed = 50) button = ph.Button(pin = 14) dispenser = ph.Dispenser(pulse = 17,...
28.09375
74
0.62069
from time import sleep, time import RPi.GPIO as gpio import physical_objects as ph gpio.setwarnings(False) gpio.setmode(gpio.BCM) elevator = ph.Elevator(motor1 = 23, motor2 = 24, enable = 25, speed = 50) button = ph.Button(pin = 14) dispenser = ph.Dispenser(pulse = 17, direction = 27, enable = 22) ultrasonic = ph.Ult...
true
true
f74beac9e2d185a0a94f273d3999d1b377f7a733
1,180
py
Python
airbyte-integrations/connectors/source-salesforce-singer/integration_tests/__init__.py
flpezet/airbyte
ea00397f2654cab5b7003df3a0a6895230a35d71
[ "MIT" ]
1
2021-01-07T12:25:45.000Z
2021-01-07T12:25:45.000Z
airbyte-integrations/connectors/source-salesforce-singer/integration_tests/__init__.py
flpezet/airbyte
ea00397f2654cab5b7003df3a0a6895230a35d71
[ "MIT" ]
null
null
null
airbyte-integrations/connectors/source-salesforce-singer/integration_tests/__init__.py
flpezet/airbyte
ea00397f2654cab5b7003df3a0a6895230a35d71
[ "MIT" ]
1
2021-05-28T01:12:10.000Z
2021-05-28T01:12:10.000Z
""" MIT License Copyright (c) 2020 Airbyte 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, modify, merge, publish, distr...
42.142857
78
0.805085
from .standard_source_test import SalesforceStandardSourceTest __all__ = ["SalesforceStandardSourceTest"]
true
true
f74beaf658a392dd4663ff966011f0ec168a4207
20,591
py
Python
readthedocs/rtd_tests/tests/test_post_commit_hooks.py
dbdaryl/readthedocs.org
09a14c7ffaf571fd136037c0f343926e275f6ce7
[ "MIT" ]
null
null
null
readthedocs/rtd_tests/tests/test_post_commit_hooks.py
dbdaryl/readthedocs.org
09a14c7ffaf571fd136037c0f343926e275f6ce7
[ "MIT" ]
null
null
null
readthedocs/rtd_tests/tests/test_post_commit_hooks.py
dbdaryl/readthedocs.org
09a14c7ffaf571fd136037c0f343926e275f6ce7
[ "MIT" ]
null
null
null
from __future__ import absolute_import from future import standard_library standard_library.install_aliases() import json import logging from urllib.parse import urlencode import mock from django_dynamic_fixture import get from django.test import TestCase from readthedocs.builds.models import Version from readthedocs...
41.936864
110
0.535331
from __future__ import absolute_import from future import standard_library standard_library.install_aliases() import json import logging from urllib.parse import urlencode import mock from django_dynamic_fixture import get from django.test import TestCase from readthedocs.builds.models import Version from readthedocs...
true
true
f74beb31536f604945904fe3ef93e3d1166f2a98
2,273
py
Python
database.py
Andyshome/untitled
769cdf0eec6a2154071ba8ec8263461c0153310e
[ "MIT" ]
null
null
null
database.py
Andyshome/untitled
769cdf0eec6a2154071ba8ec8263461c0153310e
[ "MIT" ]
null
null
null
database.py
Andyshome/untitled
769cdf0eec6a2154071ba8ec8263461c0153310e
[ "MIT" ]
1
2021-10-12T03:39:21.000Z
2021-10-12T03:39:21.000Z
import pymysql.cursors from apscheduler.schedulers.blocking import BlockingScheduler import pushNotification import time #I use the apscheduler to do schedule job, to prevent use too much system resource current_rowcount_result = {} first_check = True #This is the connection of database #This whole documentation cou...
33.426471
111
0.590849
import pymysql.cursors from apscheduler.schedulers.blocking import BlockingScheduler import pushNotification import time current_rowcount_result = {} first_check = True sched = BlockingScheduler() def checkUpdate(): try: global current_rowcount_result global first_check coon = pymysql.c...
true
true
f74beb322dbedf7ee5aeac9c1ed0249f14b47ba1
8,172
py
Python
keras_retinanet/bin/evaluate.py
yecharlie/keras-retinanet
abcc99ecb75293b895b4e1be274ddc84e76f9c84
[ "Apache-2.0" ]
null
null
null
keras_retinanet/bin/evaluate.py
yecharlie/keras-retinanet
abcc99ecb75293b895b4e1be274ddc84e76f9c84
[ "Apache-2.0" ]
null
null
null
keras_retinanet/bin/evaluate.py
yecharlie/keras-retinanet
abcc99ecb75293b895b4e1be274ddc84e76f9c84
[ "Apache-2.0" ]
1
2018-08-29T16:46:47.000Z
2018-08-29T16:46:47.000Z
#!/usr/bin/env python """ Copyright 2017-2018 Fizyr (https://fizyr.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 ...
41.482234
150
0.694077
import argparse import os import sys import numpy as np import yaml import keras import tensorflow as tf if __name__ == "__main__" and __package__ is None: sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..')) import keras_retinanet.bin __package__ = "keras_retinanet.bin" from keras_...
true
true
f74beb61744a54ce7b132f9783ab50ab12a82660
3,642
py
Python
venv/Lib/site-packages/pybrain2/rl/learners/valuebased/interface.py
ishatserka/MachineLearningAndDataAnalysisCoursera
e82e772df2f4aec162cb34ac6127df10d14a625a
[ "MIT" ]
48
2015-01-02T12:52:58.000Z
2022-02-21T01:05:10.000Z
pybrain/rl/learners/valuebased/interface.py
abhishekgahlot/pybrain
c54661f13857d5bcb0095ba2fb12f5a403a4a70f
[ "BSD-3-Clause" ]
23
2017-03-28T09:17:33.000Z
2020-03-17T08:46:02.000Z
pybrain/rl/learners/valuebased/interface.py
abhishekgahlot/pybrain
c54661f13857d5bcb0095ba2fb12f5a403a4a70f
[ "BSD-3-Clause" ]
13
2019-05-11T01:59:58.000Z
2022-03-15T14:12:40.000Z
__author__ = 'Thomas Rueckstiess, ruecksti@in.tum.de' from pybrain.utilities import abstractMethod from pybrain.structure.modules import Table, Module, TanhLayer, LinearLayer, BiasUnit from pybrain.structure.connections import FullConnection from pybrain.structure.networks import FeedForwardNetwork from pybrain.struct...
38.744681
120
0.698517
__author__ = 'Thomas Rueckstiess, ruecksti@in.tum.de' from pybrain.utilities import abstractMethod from pybrain.structure.modules import Table, Module, TanhLayer, LinearLayer, BiasUnit from pybrain.structure.connections import FullConnection from pybrain.structure.networks import FeedForwardNetwork from pybrain.struct...
true
true
f74bebdf0375f360906768e1b6c3b615ce95bfcc
3,277
py
Python
spotpy/examples/hymod_python/hymod.py
cheginit/spotpy
38feaf7dbb0ddcbf31e138519ef649f07ac0cded
[ "MIT" ]
182
2016-04-16T16:38:21.000Z
2022-03-18T16:12:57.000Z
spotpy/examples/hymod_python/hymod.py
cheginit/spotpy
38feaf7dbb0ddcbf31e138519ef649f07ac0cded
[ "MIT" ]
234
2015-12-08T10:58:52.000Z
2021-12-21T17:54:34.000Z
spotpy/examples/hymod_python/hymod.py
cheginit/spotpy
38feaf7dbb0ddcbf31e138519ef649f07ac0cded
[ "MIT" ]
137
2015-12-23T09:32:13.000Z
2022-03-31T13:44:29.000Z
# -*- coding: utf-8 -*- ''' Copyright (c) 2015 by Tobias Houska This file is part of Statistical Parameter Estimation Tool (SPOTPY). :author: Tobias Houska and Benjamin Manns :paper: Houska, T., Kraft, P., Chamorro-Chavez, A. and Breuer, L.: SPOTting Model Parameters Using a Ready-Made Python Package, PLoS ONE, 10...
32.127451
136
0.618554
from numba import jit def hymod(Precip, PET, cmax,bexp,alpha,Rs,Rq): x_loss = 0.0 x_slow = 2.3503 / (Rs * 22.5) x_slow = 0 x_quick = [0,0,0] t = 0 output = [] while t <= len(Precip)-1: Pval = Precip[t] PETval = PET[t] ER1, ER2, x_loss = e...
true
true
f74bebffe54780480d2345c4b54fd01c63664c1b
582
py
Python
python/mg0.py
epstabler/mgtdb
41e0018a2aebee90a5bdafe21dfac8d743aca4a7
[ "Apache-2.0" ]
9
2015-07-26T23:09:34.000Z
2021-01-20T23:54:55.000Z
python/python3/mg0.py
epstabler/mgtdb
41e0018a2aebee90a5bdafe21dfac8d743aca4a7
[ "Apache-2.0" ]
null
null
null
python/python3/mg0.py
epstabler/mgtdb
41e0018a2aebee90a5bdafe21dfac8d743aca4a7
[ "Apache-2.0" ]
7
2015-07-20T16:46:03.000Z
2021-08-14T02:01:17.000Z
g = [ ([],[('sel','V'),('cat','C')]), ([],[('sel','V'),('pos','wh'),('cat','C')]), (['the'],[('sel','N'),('cat','D')]), (['which'],[('sel','N'),('cat','D'),('neg','wh')]), (['king'],[('cat','N')]), (['queen'],[('cat','N')]), (['wine'],[('cat','N')]), (['beer'],[...
41.571429
60
0.264605
g = [ ([],[('sel','V'),('cat','C')]), ([],[('sel','V'),('pos','wh'),('cat','C')]), (['the'],[('sel','N'),('cat','D')]), (['which'],[('sel','N'),('cat','D'),('neg','wh')]), (['king'],[('cat','N')]), (['queen'],[('cat','N')]), (['wine'],[('cat','N')]), (['beer'],[...
true
true
f74bec3312a7a510de53952c12eb194f11ce1679
2,106
py
Python
lib/galaxy_test/base/testcase.py
Tiffany8/galaxy
f1d45a0fadf9a4b4c1be72af5b7356ebd9df467f
[ "CC-BY-3.0" ]
null
null
null
lib/galaxy_test/base/testcase.py
Tiffany8/galaxy
f1d45a0fadf9a4b4c1be72af5b7356ebd9df467f
[ "CC-BY-3.0" ]
6
2021-11-11T20:57:49.000Z
2021-12-10T15:30:33.000Z
lib/galaxy_test/base/testcase.py
Tiffany8/galaxy
f1d45a0fadf9a4b4c1be72af5b7356ebd9df467f
[ "CC-BY-3.0" ]
null
null
null
import logging import os import unittest from typing import ( Any, Optional, ) from galaxy.tool_util.verify.test_data import TestDataResolver from galaxy_test.base.env import ( setup_keep_outdir, target_url_parts, ) log = logging.getLogger(__name__) class FunctionalTestCase(unittest.TestCase): "...
31.909091
108
0.68661
import logging import os import unittest from typing import ( Any, Optional, ) from galaxy.tool_util.verify.test_data import TestDataResolver from galaxy_test.base.env import ( setup_keep_outdir, target_url_parts, ) log = logging.getLogger(__name__) class FunctionalTestCase(unittest.TestCase): ...
true
true
f74bedebd215676bae0d7f950912d4811e03c57f
817
py
Python
tienda/api/serializers.py
BaniMontoya/Django_api_store
9e58bce3efafdd821367522336caee0531a5410c
[ "MIT" ]
null
null
null
tienda/api/serializers.py
BaniMontoya/Django_api_store
9e58bce3efafdd821367522336caee0531a5410c
[ "MIT" ]
null
null
null
tienda/api/serializers.py
BaniMontoya/Django_api_store
9e58bce3efafdd821367522336caee0531a5410c
[ "MIT" ]
null
null
null
from rest_framework.serializers import ModelSerializer from api.models import Stock_En_Tienda, Tienda, Categoria, SubCategoria, Producto class Stock_En_TiendaSerializer(ModelSerializer): class Meta: model = Stock_En_Tienda depth = 2 fields = '__all__' class TiendaSerializer(ModelSeriali...
19
81
0.653611
from rest_framework.serializers import ModelSerializer from api.models import Stock_En_Tienda, Tienda, Categoria, SubCategoria, Producto class Stock_En_TiendaSerializer(ModelSerializer): class Meta: model = Stock_En_Tienda depth = 2 fields = '__all__' class TiendaSerializer(ModelSeriali...
true
true
f74bee1552bd5c2cfc1aa8d349bc38fa0414f8a1
1,866
py
Python
can-io-firmware/set_servo.py
greck2908/robot-software
2e1e8177148a089e8883967375dde7f8ed3d878b
[ "MIT" ]
40
2016-10-04T19:59:22.000Z
2020-12-25T18:11:35.000Z
can-io-firmware/set_servo.py
greck2908/robot-software
2e1e8177148a089e8883967375dde7f8ed3d878b
[ "MIT" ]
209
2016-09-21T21:54:28.000Z
2022-01-26T07:42:37.000Z
can-io-firmware/set_servo.py
greck2908/robot-software
2e1e8177148a089e8883967375dde7f8ed3d878b
[ "MIT" ]
21
2016-11-07T14:40:16.000Z
2021-11-02T09:53:37.000Z
#!/usr/bin/env python3 """ Sends a PWM via UAVCAN """ import argparse import uavcan import os DSDL_DIR = os.path.join(os.path.dirname(__file__), "../uavcan_data_types/cvra") def parse_args(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument( "port", help="SocketCAN i...
23.037037
88
0.608253
import argparse import uavcan import os DSDL_DIR = os.path.join(os.path.dirname(__file__), "../uavcan_data_types/cvra") def parse_args(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument( "port", help="SocketCAN interface (e.g. can0) or SLCAN serial port (e.g. /dev/t...
true
true
f74bf31b208b806796771125c7f9c93bab6095e4
815
py
Python
__init__.py
Goggin/Infoblox-API-Python
f6c4b075a1aee4fc137b68e75f3e1f4397b78a2f
[ "Apache-2.0" ]
2
2016-09-01T18:48:34.000Z
2016-10-06T22:15:23.000Z
__init__.py
Goggin/Infoblox-API-Python
f6c4b075a1aee4fc137b68e75f3e1f4397b78a2f
[ "Apache-2.0" ]
2
2021-08-03T17:12:38.000Z
2021-08-07T14:41:31.000Z
__init__.py
Goggin/Infoblox-API-Python
f6c4b075a1aee4fc137b68e75f3e1f4397b78a2f
[ "Apache-2.0" ]
2
2017-04-17T23:43:55.000Z
2018-06-28T18:33:23.000Z
# # Copyright 2014 "Igor Feoktistov" <ifeoktistov@yahoo.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 b...
42.894737
115
0.766871
from .infoblox import InfobloxNotFoundException, InfobloxNoIPavailableException, InfobloxGeneralException, Infoblox
true
true
f74bf51aae0693b846319822e18e59397efa906b
6,836
py
Python
tensorflow/python/keras/layers/serialization.py
joshz123/tensorflow
7841ca029060ab78e221e757d4b1ee6e3e0ffaa4
[ "Apache-2.0" ]
3
2019-04-01T09:22:17.000Z
2020-01-20T16:33:22.000Z
tensorflow/python/keras/layers/serialization.py
joshz123/tensorflow
7841ca029060ab78e221e757d4b1ee6e3e0ffaa4
[ "Apache-2.0" ]
3
2019-03-21T17:56:51.000Z
2019-11-13T21:02:35.000Z
tensorflow/python/keras/layers/serialization.py
joshz123/tensorflow
7841ca029060ab78e221e757d4b1ee6e3e0ffaa4
[ "Apache-2.0" ]
3
2019-04-01T09:22:18.000Z
2019-06-21T06:47:12.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
36.55615
108
0.775453
from __future__ import absolute_import from __future__ import division from __future__ import print_function import threading from tensorflow.python import tf2 from tensorflow.python.keras.engine import base_layer from tensorflow.python.keras.engine import input_layer from tensorflow.python.keras.engine import input...
true
true
f74bf5daccabb0e36f23c5221f9767a39de5ea76
17,834
py
Python
scripts/get-model-data.py
jonodrew/digitalmarketplace-scripts
bb4b3f06b2da7b279ff875b9eb73604da643e524
[ "MIT" ]
null
null
null
scripts/get-model-data.py
jonodrew/digitalmarketplace-scripts
bb4b3f06b2da7b279ff875b9eb73604da643e524
[ "MIT" ]
44
2018-11-27T15:33:44.000Z
2019-01-10T12:43:24.000Z
scripts/get-model-data.py
jonodrew/digitalmarketplace-scripts
bb4b3f06b2da7b279ff875b9eb73604da643e524
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Generate data export CSVs Load model data from the API or the existing CSV, process it according to the rules defined in the CONFIG and store the output in the CSV. CSV files are read from and saved to `<output-dir>/<model>.csv` If called without a model name the script will dump all defined...
33.272388
118
0.541606
import os import sys sys.path.insert(0, '.') from docopt import docopt from dmapiclient import DataAPIClient from dmscripts.helpers.auth_helpers import get_auth_token from dmscripts.helpers.logging_helpers import logging, configure_logger from dmscripts.models import queries from dmscripts.models.process_rules impor...
true
true
f74bf5fb58ed13cbcc5521ec913efa70204685e3
1,067
py
Python
horizon/templatetags/shellfilter.py
maofutian/horizon
dab92e7d2f576caea8f81c8e22a516fb45633794
[ "Apache-2.0" ]
null
null
null
horizon/templatetags/shellfilter.py
maofutian/horizon
dab92e7d2f576caea8f81c8e22a516fb45633794
[ "Apache-2.0" ]
null
null
null
horizon/templatetags/shellfilter.py
maofutian/horizon
dab92e7d2f576caea8f81c8e22a516fb45633794
[ "Apache-2.0" ]
null
null
null
# 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, software # distributed under the Li...
34.419355
75
0.686036
from django.template import base from django.template import defaultfilters from django.utils import safestring register = base.Library() @register.filter(is_safe=True) @defaultfilters.stringfilter def shellfilter(value): replacements = {'\\': '\\\\', '`': '\`', "'": "\\'",...
true
true
f74bf61d5c674fdac3cf87aa93323307372e65ff
6,689
py
Python
skyfield/tests/test_earth_satellites.py
zanzibar7/python-skyfield
332038d49ea5814061336cd70cad1d819e630f2b
[ "MIT" ]
null
null
null
skyfield/tests/test_earth_satellites.py
zanzibar7/python-skyfield
332038d49ea5814061336cd70cad1d819e630f2b
[ "MIT" ]
null
null
null
skyfield/tests/test_earth_satellites.py
zanzibar7/python-skyfield
332038d49ea5814061336cd70cad1d819e630f2b
[ "MIT" ]
1
2020-12-21T15:07:51.000Z
2020-12-21T15:07:51.000Z
# -*- coding: utf-8 -*- from numpy import array from skyfield import api from skyfield.api import EarthSatellite, load from skyfield.constants import AU_KM, AU_M from skyfield.sgp4lib import TEME_to_ITRF from skyfield.timelib import julian_date line1 = '1 25544U 98067A 18184.80969102 .00001614 00000-0 31745-4 0 ...
38.66474
79
0.683211
from numpy import array from skyfield import api from skyfield.api import EarthSatellite, load from skyfield.constants import AU_KM, AU_M from skyfield.sgp4lib import TEME_to_ITRF from skyfield.timelib import julian_date line1 = '1 25544U 98067A 18184.80969102 .00001614 00000-0 31745-4 0 9993' line2 = '2 25544 ...
true
true
f74bf7575baf128effb277e0cf37cb0087a375f0
2,687
py
Python
tool/wllvm/wllvm/filetype.py
SZU-SE/PERIOD
7636dc7cd8c97ea2fb7c13d6d068efc3872b9d03
[ "MIT" ]
16
2022-01-14T12:05:49.000Z
2022-03-10T07:57:26.000Z
tool/wllvm/wllvm/filetype.py
SZU-SE/PERIOD
7636dc7cd8c97ea2fb7c13d6d068efc3872b9d03
[ "MIT" ]
1
2022-03-08T13:19:07.000Z
2022-03-09T06:39:43.000Z
tool/wllvm/wllvm/filetype.py
SZU-SE/PERIOD
7636dc7cd8c97ea2fb7c13d6d068efc3872b9d03
[ "MIT" ]
2
2022-01-16T16:55:40.000Z
2022-03-07T10:20:55.000Z
""" A static class that allows the type of a file to be checked. """ import os from subprocess import PIPE from .popenwrapper import Popen class FileType(object): """ A hack to grok the type of input files. """ # These are just here to keep pylint happy. UNKNOWN = None ELF_EXECUTABLE = None ...
29.855556
75
0.533681
import os from subprocess import PIPE from .popenwrapper import Popen class FileType(object): UNKNOWN = None ELF_EXECUTABLE = None ELF_OBJECT = None ELF_SHARED = None MACH_EXECUTABLE = None MACH_OBJECT = None MACH_SHARED = None ARCHIVE = None THIN_ARCHIVE = None rev...
true
true
f74bf87a050aa2a37b5313b3d1dc35d0143280dc
20,261
py
Python
alignmentrs/aln/mixins/serde.py
yamasampo/alignmentrs
5f963d13ac2db72f4ef23b462de0836526f590b7
[ "MIT" ]
null
null
null
alignmentrs/aln/mixins/serde.py
yamasampo/alignmentrs
5f963d13ac2db72f4ef23b462de0836526f590b7
[ "MIT" ]
null
null
null
alignmentrs/aln/mixins/serde.py
yamasampo/alignmentrs
5f963d13ac2db72f4ef23b462de0836526f590b7
[ "MIT" ]
null
null
null
from collections import OrderedDict, ChainMap from copy import deepcopy import os import json import pickle import re import io import pandas from libalignmentrs.alignment import SeqMatrix from libalignmentrs.readers import fasta_to_dict from alignmentrs.utils import to_intlist __all__ = [ 'FastaSerdeMixin', 'D...
37.381919
141
0.594887
from collections import OrderedDict, ChainMap from copy import deepcopy import os import json import pickle import re import io import pandas from libalignmentrs.alignment import SeqMatrix from libalignmentrs.readers import fasta_to_dict from alignmentrs.utils import to_intlist __all__ = [ 'FastaSerdeMixin', 'D...
true
true
f74bf8e9556093a29db62dec97d4e383c58a1403
850
py
Python
mathgenerator/funcs/statistics/data_summary.py
ieshaan12/mathgenerator
d44a062c2c8f7af27355190432811f63fdd89568
[ "MIT" ]
1
2020-10-22T21:34:08.000Z
2020-10-22T21:34:08.000Z
mathgenerator/funcs/statistics/data_summary.py
ieshaan12/mathgenerator
d44a062c2c8f7af27355190432811f63fdd89568
[ "MIT" ]
null
null
null
mathgenerator/funcs/statistics/data_summary.py
ieshaan12/mathgenerator
d44a062c2c8f7af27355190432811f63fdd89568
[ "MIT" ]
null
null
null
from .__init__ import * def dataSummaryFunc(number_values=15, minval=5, maxval=50): random_list = [] for i in range(number_values): n = random.randint(minval, maxval) random_list.append(n) a = sum(random_list) mean = a / number_values var = 0 for i in range(number_values): ...
28.333333
82
0.636471
from .__init__ import * def dataSummaryFunc(number_values=15, minval=5, maxval=50): random_list = [] for i in range(number_values): n = random.randint(minval, maxval) random_list.append(n) a = sum(random_list) mean = a / number_values var = 0 for i in range(number_values): ...
true
true
f74bf8e95d163cec2ff162cc35ed2eb0cc02095c
1,629
py
Python
mendeleev/vis/seaborn.py
lmmentel/mendeleev
f6ac866c831e3041910ae97a7177301b1be5b3e7
[ "MIT" ]
105
2019-08-25T22:59:22.000Z
2022-03-29T07:18:01.000Z
mendeleev/vis/seaborn.py
lmmentel/mendeleev
f6ac866c831e3041910ae97a7177301b1be5b3e7
[ "MIT" ]
32
2019-08-25T23:03:19.000Z
2022-01-29T19:32:46.000Z
mendeleev/vis/seaborn.py
lmmentel/mendeleev
f6ac866c831e3041910ae97a7177301b1be5b3e7
[ "MIT" ]
29
2019-09-30T16:20:15.000Z
2022-03-09T02:28:55.000Z
from typing import Tuple import seaborn as sns import numpy as np import pandas as pd import matplotlib.pyplot as plt def heatmap( elements: pd.DataFrame, prop: str, style: str = "whitegrid", figsize: Tuple[int] = (16, 10), cmap: str = "RdBu_r", lw: int = 1, output: str = None, **kwarg...
31.326923
92
0.653161
from typing import Tuple import seaborn as sns import numpy as np import pandas as pd import matplotlib.pyplot as plt def heatmap( elements: pd.DataFrame, prop: str, style: str = "whitegrid", figsize: Tuple[int] = (16, 10), cmap: str = "RdBu_r", lw: int = 1, output: str = None, **kwarg...
true
true
f74bf94638f48758595e21f9ffacf84048d47cb8
746
py
Python
apps/urls.py
reimibeta/django-store-item-models
0be5fad0df0b3ebc7283fc6369f0e769a4743987
[ "Apache-2.0" ]
null
null
null
apps/urls.py
reimibeta/django-store-item-models
0be5fad0df0b3ebc7283fc6369f0e769a4743987
[ "Apache-2.0" ]
35
2020-10-24T22:14:41.000Z
2022-03-07T10:20:25.000Z
apps/urls.py
reimibeta/django-store-item-models
0be5fad0df0b3ebc7283fc6369f0e769a4743987
[ "Apache-2.0" ]
null
null
null
"""apps URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based vi...
33.909091
77
0.707775
from django.contrib import admin from django.urls import path urlpatterns = [ path('admin/', admin.site.urls), ]
true
true
f74bfa131d81c9465a3b010d0988ce370ac6534a
3,029
py
Python
rpi_src/src/nmea_navsat_driver/src/libnmea_navsat_driver/nodes/nmea_topic_driver.py
HyunCello/Tutorial
1254b2ce66a5fe7450e254ac636064877b2416f7
[ "Apache-2.0" ]
3
2020-07-31T07:10:46.000Z
2021-11-14T16:21:17.000Z
rpi_src/src/nmea_navsat_driver/src/libnmea_navsat_driver/nodes/nmea_topic_driver.py
HyunCello/Tutorial
1254b2ce66a5fe7450e254ac636064877b2416f7
[ "Apache-2.0" ]
6
2020-08-19T21:21:58.000Z
2020-10-05T13:33:19.000Z
rpi_src/src/nmea_navsat_driver/src/libnmea_navsat_driver/nodes/nmea_topic_driver.py
HyunCello/Tutorial
1254b2ce66a5fe7450e254ac636064877b2416f7
[ "Apache-2.0" ]
1
2021-04-17T14:10:43.000Z
2021-04-17T14:10:43.000Z
# Software License Agreement (BSD License) # # Copyright (c) 2013, Eric Perko # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyrigh...
38.833333
100
0.733245
from nmea_msgs.msg import Sentence import rospy from libnmea_navsat_driver.driver import RosNMEADriver def nmea_sentence_callback(nmea_sentence, driver): try: driver.add_sentence( nmea_sentence.sentence, frame_id=nmea_sentence.header.frame_id, timestamp=nmea_sentenc...
true
true
f74bfae14ea8e361bfd9a147cec9f55e5eecb5a2
5,197
py
Python
characterise_inauthentic_tweets.py
weberdc/socmed_repeatability
85da18cbffa53f18279844117b2aed226104ce11
[ "Apache-2.0" ]
2
2021-06-30T07:29:10.000Z
2022-01-20T15:17:26.000Z
characterise_inauthentic_tweets.py
weberdc/socmed_repeatability
85da18cbffa53f18279844117b2aed226104ce11
[ "Apache-2.0" ]
null
null
null
characterise_inauthentic_tweets.py
weberdc/socmed_repeatability
85da18cbffa53f18279844117b2aed226104ce11
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 from __future__ import print_function import gzip import json import re import sys # import time from argparse import ArgumentParser # from datetime import datetime class Options: def __init__(self): self.usage = 'characterise_inauthentic_tweets.py -i <file of tweets> [-v|--verbos...
31.307229
110
0.583414
from __future__ import print_function import gzip import json import re import sys from argparse import ArgumentParser class Options: def __init__(self): self.usage = 'characterise_inauthentic_tweets.py -i <file of tweets> [-v|--verbose]' self._init_parser() def _init_parser(self): ...
true
true
f74bfcbe7aa4c1adcbd1a3740b265b895417dc80
5,874
py
Python
dss_vae/structs/distance_tree.py
baoy-nlp/DSS-VAE
855f5722301b2d22aef622e7bb8fef74a759f9de
[ "Apache-2.0" ]
37
2019-07-05T16:20:13.000Z
2021-12-21T05:04:49.000Z
dss_vae/structs/distance_tree.py
baoy-nlp/DSS-VAE
855f5722301b2d22aef622e7bb8fef74a759f9de
[ "Apache-2.0" ]
2
2019-08-28T11:51:01.000Z
2021-06-06T11:39:21.000Z
dss_vae/structs/distance_tree.py
baoy-nlp/DSS-VAE
855f5722301b2d22aef622e7bb8fef74a759f9de
[ "Apache-2.0" ]
3
2020-01-03T06:17:13.000Z
2021-11-29T12:32:01.000Z
import re import nltk import numpy word_tags = ['CC', 'CD', 'DT', 'EX', 'FW', 'IN', 'JJ', 'JJR', 'JJS', 'LS', 'MD', 'NN', 'NNS', 'NNP', 'NNPS', 'PDT', 'POS', 'PRP', 'PRP$', 'RB', 'RBR', 'RBS', 'RP', 'SYM', 'TO', 'UH', 'VB', 'VBD', 'VBG', 'VBN', 'VBP', 'VBZ', 'WDT', ...
31.411765
86
0.486381
import re import nltk import numpy word_tags = ['CC', 'CD', 'DT', 'EX', 'FW', 'IN', 'JJ', 'JJR', 'JJS', 'LS', 'MD', 'NN', 'NNS', 'NNP', 'NNPS', 'PDT', 'POS', 'PRP', 'PRP$', 'RB', 'RBR', 'RBS', 'RP', 'SYM', 'TO', 'UH', 'VB', 'VBD', 'VBG', 'VBN', 'VBP', 'VBZ', 'WDT', ...
true
true
f74bfe051c273f30b8cd3727837b54f6af06595b
10,723
py
Python
util/ec3po/interpreter_unittest.py
Basavaraja-MS/ec_cadence
8d99bd934541cafc2a151bf4765877b10b4df0e9
[ "BSD-3-Clause" ]
null
null
null
util/ec3po/interpreter_unittest.py
Basavaraja-MS/ec_cadence
8d99bd934541cafc2a151bf4765877b10b4df0e9
[ "BSD-3-Clause" ]
null
null
null
util/ec3po/interpreter_unittest.py
Basavaraja-MS/ec_cadence
8d99bd934541cafc2a151bf4765877b10b4df0e9
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python2 # Copyright 2015 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for the EC-3PO interpreter.""" from __future__ import print_function # pylint: disable=cros-logging-import import loggi...
41.723735
80
0.680407
from __future__ import print_function import logging import mock import multiprocessing import tempfile import unittest import interpreter class TestEnhancedECBehaviour(unittest.TestCase): def setUp(self): logging.basicConfig(level=logging.DEBUG, format=('%(asctime)s - %(module)s ...
true
true
f74bfe258081dc7ecfb9590cd0666e46bdc4fed4
1,503
py
Python
src/infi/winapi/file_version_information/__init__.py
Infinidat/infi.winapi.file_version_information
d11a50fb8007c18338b522c142cbb07bad51a289
[ "BSD-3-Clause" ]
null
null
null
src/infi/winapi/file_version_information/__init__.py
Infinidat/infi.winapi.file_version_information
d11a50fb8007c18338b522c142cbb07bad51a289
[ "BSD-3-Clause" ]
1
2016-09-08T08:55:00.000Z
2016-09-08T08:55:00.000Z
src/infi/winapi/file_version_information/__init__.py
Infinidat/infi.winapi.file_version_information
d11a50fb8007c18338b522c142cbb07bad51a289
[ "BSD-3-Clause" ]
null
null
null
__import__("pkg_resources").declare_namespace(__name__) import ctypes import os from . import api class File(object): def __init__(self, filepath): super(File, self).__init__() self._path = filepath def _get_version_info_size(self): filepath = ctypes.create_unicode_buffer(self._path) ...
37.575
84
0.691949
__import__("pkg_resources").declare_namespace(__name__) import ctypes import os from . import api class File(object): def __init__(self, filepath): super(File, self).__init__() self._path = filepath def _get_version_info_size(self): filepath = ctypes.create_unicode_buffer(self._path) ...
true
true
f74bff23b6c97375131c2a5c986da23bef611c69
13,319
py
Python
utilities/lattice_parser/lattice_parser.py
WencaiCheng/IMPACT-Z
1d4445f024f821b705e164f9e8cb34599feb0def
[ "BSD-3-Clause-LBNL" ]
null
null
null
utilities/lattice_parser/lattice_parser.py
WencaiCheng/IMPACT-Z
1d4445f024f821b705e164f9e8cb34599feb0def
[ "BSD-3-Clause-LBNL" ]
null
null
null
utilities/lattice_parser/lattice_parser.py
WencaiCheng/IMPACT-Z
1d4445f024f821b705e164f9e8cb34599feb0def
[ "BSD-3-Clause-LBNL" ]
null
null
null
import sys import re from math import * class lattice_parser: ''' input: lines is lattice section lines, line is usedline ''' def __init__(self, fileName, lineName): self.fileName = fileName self.lineName = lineName.upper() # in code, upper case convention ...
34.775457
149
0.404535
import sys import re from math import * class lattice_parser: def __init__(self, fileName, lineName): self.fileName = fileName self.lineName = lineName.upper() self.trackline = [] def readfile(self): f = open(self.fileName,'r') lines = f.readlines(...
true
true
f74bffcf4287a98ea6d815459aed5f2d9c22ee21
2,820
py
Python
Exercises1.py
Neo-sunny/pythonProgs
a9d2359d8a09d005d0ba6f94d7d256bf91499793
[ "MIT" ]
null
null
null
Exercises1.py
Neo-sunny/pythonProgs
a9d2359d8a09d005d0ba6f94d7d256bf91499793
[ "MIT" ]
null
null
null
Exercises1.py
Neo-sunny/pythonProgs
a9d2359d8a09d005d0ba6f94d7d256bf91499793
[ "MIT" ]
null
null
null
def hello(): """ prints hello, world """ print("Hello, world!") def areacircle(radius): """ Computes the area of a circle of the given radius """ area = 3.14*radius**2 print("The area of a circle of radius",radius,"is", area) def areatriangle(b,h): area = 0.5*b*h print("The area of a triangl...
37.6
79
0.625532
def hello(): print("Hello, world!") def areacircle(radius): area = 3.14*radius**2 print("The area of a circle of radius",radius,"is", area) def areatriangle(b,h): area = 0.5*b*h print("The area of a triangle is", area) def fahrenheit_to_celsius(temp): newTemp = 5*(temp-32)/9 prin...
true
true
f74c0034e9fa060a615d8aea21b873235f67b1fb
2,667
py
Python
fintech/sitemanager/forms.py
fpark7/cs3240-s17-team31
5095e8ef29d5fa14917a4c542e021025d38b6123
[ "MIT" ]
null
null
null
fintech/sitemanager/forms.py
fpark7/cs3240-s17-team31
5095e8ef29d5fa14917a4c542e021025d38b6123
[ "MIT" ]
null
null
null
fintech/sitemanager/forms.py
fpark7/cs3240-s17-team31
5095e8ef29d5fa14917a4c542e021025d38b6123
[ "MIT" ]
null
null
null
from django import forms from django.contrib.auth.models import User from newsletter.models import Report from newsletter.models import SiteUser from django.contrib.auth.models import Group, Permission class ReportForm(forms.ModelForm): COUNTRIES = (('US', 'United States'), ('CA', 'Canada'), ...
50.320755
120
0.649419
from django import forms from django.contrib.auth.models import User from newsletter.models import Report from newsletter.models import SiteUser from django.contrib.auth.models import Group, Permission class ReportForm(forms.ModelForm): COUNTRIES = (('US', 'United States'), ('CA', 'Canada'), ...
true
true
f74c01186577a2d59b67f59bd297a10f61dee31a
1,351
py
Python
utility/read_proto.py
polltooh/TensorflowFramework
0c996c8ad98b32fc2c50f8dc0660038a65de312c
[ "Apache-2.0" ]
4
2017-03-04T02:30:27.000Z
2019-01-14T02:30:23.000Z
utility/read_proto.py
polltooh/TensorflowFramework
0c996c8ad98b32fc2c50f8dc0660038a65de312c
[ "Apache-2.0" ]
null
null
null
utility/read_proto.py
polltooh/TensorflowFramework
0c996c8ad98b32fc2c50f8dc0660038a65de312c
[ "Apache-2.0" ]
null
null
null
import file_io def check_bool(val): if val == 'true' or val == "True": val = True if val == 'false' or val == "False": val = False return val def check_digit(val): if val.replace(".","").isdigit(): val = float(val) if val.is_integer(): val = int(val) ret...
24.125
44
0.527757
import file_io def check_bool(val): if val == 'true' or val == "True": val = True if val == 'false' or val == "False": val = False return val def check_digit(val): if val.replace(".","").isdigit(): val = float(val) if val.is_integer(): val = int(val) ret...
true
true
f74c016129b09477da5d9c114067e451faecae86
14,539
py
Python
tests/test_api.py
Alchez/shipstation-client
5afaefc3161fa779d568211fa037e2a0fd2e0705
[ "MIT" ]
null
null
null
tests/test_api.py
Alchez/shipstation-client
5afaefc3161fa779d568211fa037e2a0fd2e0705
[ "MIT" ]
null
null
null
tests/test_api.py
Alchez/shipstation-client
5afaefc3161fa779d568211fa037e2a0fd2e0705
[ "MIT" ]
null
null
null
import datetime import json import os from decimal import Decimal from uuid import UUID import pytest import respx from conftest import * from shipstation.api import ShipStation from shipstation.models import * from shipstation.pagination import Page @respx.mock def test_get_carrier(ss: ShipStation, mocked_api: res...
36.076923
88
0.693033
import datetime import json import os from decimal import Decimal from uuid import UUID import pytest import respx from conftest import * from shipstation.api import ShipStation from shipstation.models import * from shipstation.pagination import Page @respx.mock def test_get_carrier(ss: ShipStation, mocked_api: res...
true
true
f74c018820ace67484b2be8025d5c105494d1880
1,667
py
Python
simul/hard_spheres.py
riccardoscheda/py-utils
6041b3b97ae2210580de9538d4d18a4d04687fa4
[ "MIT" ]
null
null
null
simul/hard_spheres.py
riccardoscheda/py-utils
6041b3b97ae2210580de9538d4d18a4d04687fa4
[ "MIT" ]
null
null
null
simul/hard_spheres.py
riccardoscheda/py-utils
6041b3b97ae2210580de9538d4d18a4d04687fa4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -* import numpy as np from vpython import sphere, vector, color, rate from box_utils import build_box, check_wall_hit def create_balls(N: int=1, r: float=.2) -> list[sphere]: balls = [] for i in range(N): ball = sphere(color=color.green, radius=r, make_tra...
23.478873
99
0.506899
import numpy as np from vpython import sphere, vector, color, rate from box_utils import build_box, check_wall_hit def create_balls(N: int=1, r: float=.2) -> list[sphere]: balls = [] for i in range(N): ball = sphere(color=color.green, radius=r, make_trail=False, pos=vector.random()*2) ball....
true
true
f74c031568335a03c9d2daa4922f8c9d6bcf5834
19,061
py
Python
gpMgmt/bin/gppylib/operations/test/regress/test_package/__init__.py
JunfengYang/gpdb
7f1589a786e7fd9cac950ee104a729e370ec3606
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
gpMgmt/bin/gppylib/operations/test/regress/test_package/__init__.py
JunfengYang/gpdb
7f1589a786e7fd9cac950ee104a729e370ec3606
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
gpMgmt/bin/gppylib/operations/test/regress/test_package/__init__.py
JunfengYang/gpdb
7f1589a786e7fd9cac950ee104a729e370ec3606
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
import os import shutil import unittest import tempfile import platform import getpass import tarfile from gppylib.db import dbconn from gppylib.gparray import GpArray from gppylib.gpversion import MAIN_VERSION from contextlib import closing from gppylib.commands import gp from gppylib.commands.unix import Scp from gp...
34.71949
145
0.642621
import os import shutil import unittest import tempfile import platform import getpass import tarfile from gppylib.db import dbconn from gppylib.gparray import GpArray from gppylib.gpversion import MAIN_VERSION from contextlib import closing from gppylib.commands import gp from gppylib.commands.unix import Scp from gp...
true
true
f74c03699d48af83cc21a739c52f9bdf1f27eece
271
py
Python
fireSummary/routes/api/v1/__init__.py
gfw-api/fires-summary-stats
3d5cc2030c9ac87d674dd99805a9b2c215aac05e
[ "MIT" ]
null
null
null
fireSummary/routes/api/v1/__init__.py
gfw-api/fires-summary-stats
3d5cc2030c9ac87d674dd99805a9b2c215aac05e
[ "MIT" ]
null
null
null
fireSummary/routes/api/v1/__init__.py
gfw-api/fires-summary-stats
3d5cc2030c9ac87d674dd99805a9b2c215aac05e
[ "MIT" ]
null
null
null
from fireSummary.routes.api.v1.fires_router import fires_endpoints, glad_endpoints from flask import jsonify # GENERIC Error def error(status=400, detail='Bad Request'): return jsonify(errors=[{ 'status': status, 'detail': detail }]), status
19.357143
82
0.697417
from fireSummary.routes.api.v1.fires_router import fires_endpoints, glad_endpoints from flask import jsonify def error(status=400, detail='Bad Request'): return jsonify(errors=[{ 'status': status, 'detail': detail }]), status
true
true
f74c04f2c6414ebbf1187eea865b3ccb8326122e
110
py
Python
Journal/summary_image.py
prabhanshu11/journal
f25bef15ddc8f81a7fb3f8fa73e79294460680cb
[ "Apache-2.0" ]
1
2020-08-18T06:14:47.000Z
2020-08-18T06:14:47.000Z
Journal/summary_image.py
prabhanshu11/journal
f25bef15ddc8f81a7fb3f8fa73e79294460680cb
[ "Apache-2.0" ]
2
2021-09-28T03:10:50.000Z
2022-02-26T08:07:39.000Z
Journal/summary_image.py
prabhanshu11/journal
f25bef15ddc8f81a7fb3f8fa73e79294460680cb
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: 04_summary image.ipynb (unless otherwise specified). __all__ = []
36.666667
96
0.754545
__all__ = []
true
true
f74c053c701de62f751a97d3c7c9904718eec168
30,972
py
Python
ansible/modules/files/xml.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2022-01-25T22:52:58.000Z
2022-01-25T22:52:58.000Z
ansible/modules/files/xml.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
ansible/modules/files/xml.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2014, Red Hat, Inc. # Tim Bielawa <tbielawa@redhat.com> # Magnus Hedemark <mhedemar@redhat.com> # Copyright 2017, Dag Wieers <dag@wieers.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ impo...
36.266979
151
0.634121
from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = r''' --- module: xml short_description: Manage bits and pieces of XML fi...
true
true