hexsha
stringlengths
40
40
size
int64
1
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
239
max_stars_repo_name
stringlengths
5
130
max_stars_repo_head_hexsha
stringlengths
40
78
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
3
239
max_issues_repo_name
stringlengths
5
130
max_issues_repo_head_hexsha
stringlengths
40
78
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
3
239
max_forks_repo_name
stringlengths
5
130
max_forks_repo_head_hexsha
stringlengths
40
78
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
1
1.03M
avg_line_length
float64
1
958k
max_line_length
int64
1
1.03M
alphanum_fraction
float64
0
1
7957fcd6e551a17a5937d8e9a1e0800613f5e28f
2,871
py
Python
fbpcp/gateway/costexplorer.py
corbantek/fbpcp
ed94bde5db40e4713f26dd7e0697c010a5d87e52
[ "MIT" ]
24
2021-08-24T09:30:18.000Z
2022-03-28T20:51:01.000Z
fbpcp/gateway/costexplorer.py
corbantek/fbpcp
ed94bde5db40e4713f26dd7e0697c010a5d87e52
[ "MIT" ]
142
2021-08-16T23:49:27.000Z
2022-03-31T21:05:04.000Z
fbpcp/gateway/costexplorer.py
corbantek/fbpcp
ed94bde5db40e4713f26dd7e0697c010a5d87e52
[ "MIT" ]
23
2021-09-10T22:55:04.000Z
2022-03-25T18:11:25.000Z
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # pyre-strict from typing import Optional, Dict, Any import boto3 from fbpcp.decorator.error_handler import error_h...
35.8875
160
0.591432
7957ff61236aa1c98e22ffd57273181deceb02e8
3,650
py
Python
tests/__init__.py
zyndagj/pymethyl
af2b05929c75965c3264ee101a2cf93875fdc164
[ "BSD-3-Clause" ]
null
null
null
tests/__init__.py
zyndagj/pymethyl
af2b05929c75965c3264ee101a2cf93875fdc164
[ "BSD-3-Clause" ]
1
2019-05-02T15:40:31.000Z
2019-05-06T22:29:33.000Z
tests/__init__.py
zyndagj/Meth5py
af2b05929c75965c3264ee101a2cf93875fdc164
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python import unittest, sys, os try: from StringIO import StringIO except: from io import StringIO # Import path to test the CLI #try: from unittest.mock import patch #except: from mock import patch # buffer for capturing log info logStream = StringIO() # Need to start logger BEFORE importing any pyPlateC...
45.061728
95
0.647945
7957ff67c64c3841e8a4b535a152ca1a0fc9095c
1,882
py
Python
client.py
HAKSOAT/Jumpy_GRPC
d5b6b035433d89e27dfb497308f1c53ed6816bb0
[ "Apache-2.0" ]
null
null
null
client.py
HAKSOAT/Jumpy_GRPC
d5b6b035433d89e27dfb497308f1c53ed6816bb0
[ "Apache-2.0" ]
null
null
null
client.py
HAKSOAT/Jumpy_GRPC
d5b6b035433d89e27dfb497308f1c53ed6816bb0
[ "Apache-2.0" ]
null
null
null
import grpc from protos_wrapper import jumpy_pb2 from protos_wrapper import jumpy_pb2_grpc def get_product(stub): product_request = jumpy_pb2.ProductRequest( category=jumpy_pb2.Category( link="https://www.jumia.com.ng/smart-watch-bands/xiaomi/" ), index=4 ) ...
27.676471
75
0.647715
7957ffa117d3c0992303d008c4eb0fa6a95696aa
483
py
Python
venv/Lib/site-packages/sklearn/svm/libsvm.py
Jos33y/student-performance-knn
4e965434f52dd6a1380904aa257df1edfaebb3c4
[ "MIT" ]
null
null
null
venv/Lib/site-packages/sklearn/svm/libsvm.py
Jos33y/student-performance-knn
4e965434f52dd6a1380904aa257df1edfaebb3c4
[ "MIT" ]
null
null
null
venv/Lib/site-packages/sklearn/svm/libsvm.py
Jos33y/student-performance-knn
4e965434f52dd6a1380904aa257df1edfaebb3c4
[ "MIT" ]
null
null
null
# THIS FILE WAS AUTOMATICALLY GENERATED BY deprecated_modules.py import sys from . import _libsvm from ..externals._pep562 import Pep562 from ..utils.deprecation import _raise_dep_warning_if_not_pytest deprecated_path = 'sklearn.svm.libsvm' correct_import_path = 'sklearn.svm' _raise_dep_warning_if_not_pyte...
26.833333
71
0.776398
7958015afa12b6f92196ca78d69790976a38b1ab
6,971
py
Python
tests/test_mail_views.py
dominicrodger/djohno
1b0891ee661eae4bd313b619fe2cc2b0965763c0
[ "BSD-2-Clause" ]
3
2015-04-07T13:19:05.000Z
2016-02-22T08:42:47.000Z
tests/test_mail_views.py
dominicrodger/djohno
1b0891ee661eae4bd313b619fe2cc2b0965763c0
[ "BSD-2-Clause" ]
2
2018-01-30T10:41:55.000Z
2018-03-12T07:15:51.000Z
tests/test_mail_views.py
dominicrodger/djohno
1b0891ee661eae4bd313b619fe2cc2b0965763c0
[ "BSD-2-Clause" ]
2
2018-01-30T07:50:06.000Z
2021-12-01T00:05:04.000Z
from django.core import mail from django.core.urlresolvers import reverse from django.test.utils import override_settings import socket from mock import Mock, patch from smtplib import SMTPConnectError from tests.utils import DjohnoBaseViewTests class DjohnoMailViewTests(DjohnoBaseViewTests): def test_djohno_emai...
44.120253
72
0.634916
7958021358b8497a9740cae1d6248424b99b99af
1,239
py
Python
geneticpython/core/operators/mutation/flip_bit_mutation.py
ngocjr7/geneticpython
4b4157523ce13b3da56cef61282cb0a984cd317b
[ "MIT" ]
null
null
null
geneticpython/core/operators/mutation/flip_bit_mutation.py
ngocjr7/geneticpython
4b4157523ce13b3da56cef61282cb0a984cd317b
[ "MIT" ]
null
null
null
geneticpython/core/operators/mutation/flip_bit_mutation.py
ngocjr7/geneticpython
4b4157523ce13b3da56cef61282cb0a984cd317b
[ "MIT" ]
null
null
null
""" # Problem: flip_bit_mutation.py # Description: # Created by ngocjr7 on [2020-03-31 16:49:14] """ from __future__ import absolute_import from geneticpython.models.binary_individual import BinaryIndividual from .mutation import Mutation from geneticpython.utils.validation import check_random_state from ...
31.769231
75
0.644875
79580223dbae06850bf8303693286aa45535a91d
4,335
py
Python
torchrppg/nets/blocks/blocks.py
TVS-AI/fed_rppg
88886554ace264d40b3e2fefd2ef22f61a1f1edf
[ "MIT" ]
null
null
null
torchrppg/nets/blocks/blocks.py
TVS-AI/fed_rppg
88886554ace264d40b3e2fefd2ef22f61a1f1edf
[ "MIT" ]
null
null
null
torchrppg/nets/blocks/blocks.py
TVS-AI/fed_rppg
88886554ace264d40b3e2fefd2ef22f61a1f1edf
[ "MIT" ]
null
null
null
import torch class ConvBlock2D(torch.nn.Module): def __init__(self, in_channel, out_channel, kernel_size, stride, padding): super(ConvBlock2D, self).__init__() self.conv_block_2d = torch.nn.Sequential( torch.nn.Conv2d(in_channel, out_channel, kernel_size, stride, padding), ...
37.051282
116
0.600923
795803a10f02c649834c1daed7a87804a8426305
2,732
py
Python
basicsr/data/single_image_dataset.py
Cospel/BasicSR
430dd1989f75b1400d77df97808b2c7896808a43
[ "Apache-2.0", "MIT" ]
3,168
2018-04-26T16:11:32.000Z
2022-03-31T09:37:39.000Z
basicsr/data/single_image_dataset.py
Cospel/BasicSR
430dd1989f75b1400d77df97808b2c7896808a43
[ "Apache-2.0", "MIT" ]
437
2018-06-14T02:05:58.000Z
2022-03-28T02:37:15.000Z
basicsr/data/single_image_dataset.py
Cospel/BasicSR
430dd1989f75b1400d77df97808b2c7896808a43
[ "Apache-2.0", "MIT" ]
837
2018-06-05T06:52:47.000Z
2022-03-31T09:58:20.000Z
from os import path as osp from torch.utils import data as data from torchvision.transforms.functional import normalize from basicsr.data.data_util import paths_from_lmdb from basicsr.utils import FileClient, imfrombytes, img2tensor, scandir from basicsr.utils.matlab_functions import rgb2ycbcr from basicsr.utils.regis...
39.028571
100
0.646779
795803a71b1cfba9a511acb0dfb44e60a702e0a4
151
py
Python
config.py
suger-luck/QQ-boot
4fabd400ecde1cbdf3961af1b34cdeed7dbecfc4
[ "MIT" ]
null
null
null
config.py
suger-luck/QQ-boot
4fabd400ecde1cbdf3961af1b34cdeed7dbecfc4
[ "MIT" ]
null
null
null
config.py
suger-luck/QQ-boot
4fabd400ecde1cbdf3961af1b34cdeed7dbecfc4
[ "MIT" ]
null
null
null
from nonebot.default_config import * #写可以下达指令的人,如果不填写就是所有人,就是可以在聊天中触发的 # SUPERUSERS ={2031058091} from nonebot.default_config import * SUPERUSERS = {}
25.166667
36
0.807947
7958050261b566d1d16d547c73ae0e2dffb95892
2,274
py
Python
moto/apigatewayv2/exceptions.py
symroe/moto
4e106995af6f2820273528fca8a4e9ee288690a5
[ "Apache-2.0" ]
null
null
null
moto/apigatewayv2/exceptions.py
symroe/moto
4e106995af6f2820273528fca8a4e9ee288690a5
[ "Apache-2.0" ]
1
2022-02-19T02:10:45.000Z
2022-02-19T02:15:52.000Z
moto/apigatewayv2/exceptions.py
symroe/moto
4e106995af6f2820273528fca8a4e9ee288690a5
[ "Apache-2.0" ]
null
null
null
from moto.core.exceptions import JsonRESTError class APIGatewayV2Error(JsonRESTError): pass class ApiNotFound(APIGatewayV2Error): code = 404 def __init__(self, api_id): super().__init__( "NotFoundException", f"Invalid API identifier specified {api_id}" ) class AuthorizerNo...
23.6875
86
0.654793
7958051382e2c6913f6e19c25cece17f78575227
1,861
py
Python
shape.py
ricardovobarros/randominn
c556e972092b4688e82709345953930a3ae09d6b
[ "MIT" ]
null
null
null
shape.py
ricardovobarros/randominn
c556e972092b4688e82709345953930a3ae09d6b
[ "MIT" ]
null
null
null
shape.py
ricardovobarros/randominn
c556e972092b4688e82709345953930a3ae09d6b
[ "MIT" ]
null
null
null
""" Module designated to Shape class Author: Renan Vasconcelos """ from config import * class Shape: def __init__(self, shape_address="", driver="ESRI Shapefile"): """Class that represents a shape file Attributes ---- address: String of the files' address name: String of...
30.016129
77
0.601827
795805dbd87959553ecf6a7bb28eef9a843e1ec0
666
py
Python
hello-docker/dev-container/test.py
BrianThomasRoss/Docker-Devels
37b89c9ee62f0dfdfd1303ede3e20cfaa1190895
[ "Apache-2.0" ]
null
null
null
hello-docker/dev-container/test.py
BrianThomasRoss/Docker-Devels
37b89c9ee62f0dfdfd1303ede3e20cfaa1190895
[ "Apache-2.0" ]
null
null
null
hello-docker/dev-container/test.py
BrianThomasRoss/Docker-Devels
37b89c9ee62f0dfdfd1303ede3e20cfaa1190895
[ "Apache-2.0" ]
null
null
null
print( """ Welcome to the world of dev-containers you are now working from inside a virtualized instance of a linux ubuntu pre-loaded with miniconda zsh, and preconfigured conda environment. Some commands to try in the terminal: which conda - path to miniconda conda info --envs ...
33.3
79
0.624625
795807cd49ff52a45d260c2bcc5fa5b3b5463191
14,612
py
Python
SCons/Tool/mslink.py
hwmaier/scons
f29df5f2339874d49bf1aece6e639fa320b445d9
[ "MIT" ]
null
null
null
SCons/Tool/mslink.py
hwmaier/scons
f29df5f2339874d49bf1aece6e639fa320b445d9
[ "MIT" ]
null
null
null
SCons/Tool/mslink.py
hwmaier/scons
f29df5f2339874d49bf1aece6e639fa320b445d9
[ "MIT" ]
null
null
null
"""SCons.Tool.mslink Tool-specific initialization for the Microsoft linker. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Permission is hereby granted, free of charge, to any person obtaining # a copy ...
42.976471
187
0.678962
795808ba10868f4f72cda8c6d9855cec318b59e3
308
py
Python
languages/python/src/concepts/P116_Yapf_CodeAfterFormatting.py
vikash-india/DeveloperNotes2Myself
fe277a3c52f73884863f2f72b237365b27a8c882
[ "MIT" ]
2
2019-05-25T10:09:00.000Z
2022-03-11T09:06:23.000Z
languages/python/src/concepts/P116_Yapf_CodeAfterFormatting.py
vikash-india/DeveloperNotes2Myself
fe277a3c52f73884863f2f72b237365b27a8c882
[ "MIT" ]
2
2020-03-31T04:30:17.000Z
2020-10-30T07:54:28.000Z
languages/python/src/concepts/P116_Yapf_CodeAfterFormatting.py
vikash-india/DeveloperNotes2Myself
fe277a3c52f73884863f2f72b237365b27a8c882
[ "MIT" ]
4
2019-07-12T13:18:56.000Z
2021-11-17T08:04:55.000Z
# Description: Code AFTER Formatting Using yapf x = {'a': 37, 'b': 42, 'c': 927} y = 'hello ' 'world' z = 'hello ' + 'world' a = 'hello {}'.format('world') class foo(object): def f(self): return 37 * -2 def g(self, x, y=42): return y def f(a): return 37 - a[42 - x:y ** 3]
15.4
47
0.512987
79580947ebd30cbf99a582c5430663eaed1b1d9a
440
pyde
Python
Processing Py_!/listing_27/listing_27.pyde
GermogenovAs/2019-fall-polytech-cs
3d02ed149b5d0468e213d96b5a1aa8263880a3e1
[ "MIT" ]
null
null
null
Processing Py_!/listing_27/listing_27.pyde
GermogenovAs/2019-fall-polytech-cs
3d02ed149b5d0468e213d96b5a1aa8263880a3e1
[ "MIT" ]
null
null
null
Processing Py_!/listing_27/listing_27.pyde
GermogenovAs/2019-fall-polytech-cs
3d02ed149b5d0468e213d96b5a1aa8263880a3e1
[ "MIT" ]
null
null
null
def setup(): size(500, 500) smooth() counter = 0 def draw(): global counter noStroke() fill(10, 50) rect(-1, -1, width+1, height+1) ny = sin(counter)*100+200 nx = counter*10 stroke(250) strokeWeight(20) line(nx, ny, nx, ny) counter = counter + 0.1 ...
13.75
35
0.515909
795809f0ad9bc72ee3d5f8014977536b37bb48f7
16,057
py
Python
bindings/gumjs/generate-runtime.py
stevielavern/frida-gum
f6e1f5cdb1e0876aae81e111a1b286ba2224c3ca
[ "BSD-2-Clause", "BSD-3-Clause" ]
1
2020-10-10T16:46:09.000Z
2020-10-10T16:46:09.000Z
bindings/gumjs/generate-runtime.py
ohjeongwook/frida-gum
3d2e446b2530b705db0a5fd3fa7b91aa30f319bb
[ "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
bindings/gumjs/generate-runtime.py
ohjeongwook/frida-gum
3d2e446b2530b705db0a5fd3fa7b91aa30f319bb
[ "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 from __future__ import unicode_literals, print_function from base64 import b64decode import codecs import glob import json import os import platform import re import subprocess import sys def generate_runtime_v8(runtime_name, output_dir, output, inputs): with codecs.open(os.path.join(outpu...
40.54798
179
0.631251
79580aabd91ddf598fdc93a950077d6320de4411
22,900
py
Python
InvenTree/common/models.py
mosenturm/InvenTree
d4529ec1c47287dc7b12e8ef38a97c11897b6da7
[ "MIT" ]
null
null
null
InvenTree/common/models.py
mosenturm/InvenTree
d4529ec1c47287dc7b12e8ef38a97c11897b6da7
[ "MIT" ]
null
null
null
InvenTree/common/models.py
mosenturm/InvenTree
d4529ec1c47287dc7b12e8ef38a97c11897b6da7
[ "MIT" ]
null
null
null
""" Common database model definitions. These models are 'generic' and do not fit a particular business logic object. """ # -*- coding: utf-8 -*- from __future__ import unicode_literals import os from django.db import models, transaction from django.db.utils import IntegrityError, OperationalError from django.conf im...
29.74026
131
0.557336
79580affa16a6f4d47e5ad5fe63883835a0bce05
333
py
Python
Leetcode/Easy/Single_Number.py
drkndl/Coding-Practice
3527e3dadcb593729517b750402812d4a64bca14
[ "MIT" ]
null
null
null
Leetcode/Easy/Single_Number.py
drkndl/Coding-Practice
3527e3dadcb593729517b750402812d4a64bca14
[ "MIT" ]
null
null
null
Leetcode/Easy/Single_Number.py
drkndl/Coding-Practice
3527e3dadcb593729517b750402812d4a64bca14
[ "MIT" ]
null
null
null
# Runtime: 3584 ms, faster than 8.17% of Python3 online submissions for Single Number. # Memory Usage: 16.7 MB, less than 22.54% of Python3 online submissions for Single Number. class Solution: def singleNumber(self, nums: List[int]) -> int: for i in set(nums): if nums.count(i)==1: ...
37
90
0.645646
79580b6a0be720c21b24d1fd9fc22b695158c955
875
bzl
Python
xls/build/py_proto_library.bzl
ted-xie/xls
ef48ade3403fffc6481ffd779e49aa7082ee268f
[ "Apache-2.0" ]
null
null
null
xls/build/py_proto_library.bzl
ted-xie/xls
ef48ade3403fffc6481ffd779e49aa7082ee268f
[ "Apache-2.0" ]
null
null
null
xls/build/py_proto_library.bzl
ted-xie/xls
ef48ade3403fffc6481ffd779e49aa7082ee268f
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
35
77
0.729143
79580c07920e606edf684a66dcd275897f31e372
543
py
Python
departments/migrations/0001_initial.py
1Mans/test_task
f6f0fef4748cdfa677f32e494e39c03b22043306
[ "MIT" ]
null
null
null
departments/migrations/0001_initial.py
1Mans/test_task
f6f0fef4748cdfa677f32e494e39c03b22043306
[ "MIT" ]
null
null
null
departments/migrations/0001_initial.py
1Mans/test_task
f6f0fef4748cdfa677f32e494e39c03b22043306
[ "MIT" ]
null
null
null
# Generated by Django 2.2.6 on 2021-10-30 09:54 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Department', fields=[ ('id', models.AutoFie...
23.608696
114
0.569061
79580ce240749747e75a8776842750269e733ddf
2,883
py
Python
src/RWR/seed_calculation.py
agneet42/ImmunAL
ac4dc0d3b6763deab7610616a7e3061161166eb2
[ "MIT" ]
null
null
null
src/RWR/seed_calculation.py
agneet42/ImmunAL
ac4dc0d3b6763deab7610616a7e3061161166eb2
[ "MIT" ]
null
null
null
src/RWR/seed_calculation.py
agneet42/ImmunAL
ac4dc0d3b6763deab7610616a7e3061161166eb2
[ "MIT" ]
null
null
null
#%% import csv from scipy.stats.stats import pearsonr file = csv.reader(open("diseased_final.csv","r")) all_arr = [] temp_all_arr = [] for lines in file: if(len(lines) > 0): temp_all_arr.append(lines) print(len(temp_all_arr)) for k in range(0,2333): temp = [] for all in temp_all_arr: temp.append(all[...
23.25
80
0.665973
79580d59828719a9131bf90ebd83de6fbe83678d
17,227
py
Python
preview_generator/manager.py
asweeney86/preview-generator
354cbac1c131ebbb81cd9cfd9b4bc0c184d10103
[ "MIT" ]
null
null
null
preview_generator/manager.py
asweeney86/preview-generator
354cbac1c131ebbb81cd9cfd9b4bc0c184d10103
[ "MIT" ]
null
null
null
preview_generator/manager.py
asweeney86/preview-generator
354cbac1c131ebbb81cd9cfd9b4bc0c184d10103
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import hashlib import logging import os import typing from filelock import FileLock from preview_generator.extension import mimetypes_storage from preview_generator.preview.builder.document_generic import DocumentPreviewBuilder from preview_generator.preview.builder_factory import PreviewBuil...
43.28392
127
0.627794
79580d7c895db17902075de5a4c88f830086e20e
6,429
py
Python
test/functional/rpc_bind.py
minblock/daipercoins
f01d6c65daf8fdf236cc4b40245260539406bb0f
[ "MIT" ]
null
null
null
test/functional/rpc_bind.py
minblock/daipercoins
f01d6c65daf8fdf236cc4b40245260539406bb0f
[ "MIT" ]
null
null
null
test/functional/rpc_bind.py
minblock/daipercoins
f01d6c65daf8fdf236cc4b40245260539406bb0f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test running daipercoinsd with the -rpcbind and -rpcallowip options.""" import sys from test_framewor...
49.453846
172
0.63338
79580e131f0ef715b8b1b25429524a1ef4eb679a
2,140
py
Python
clusterisation/clusterisation.py
MADE-realtime/realtime_news
0a63687cad0ccefd772b2c28d7138d8db52d5f20
[ "MIT" ]
null
null
null
clusterisation/clusterisation.py
MADE-realtime/realtime_news
0a63687cad0ccefd772b2c28d7138d8db52d5f20
[ "MIT" ]
null
null
null
clusterisation/clusterisation.py
MADE-realtime/realtime_news
0a63687cad0ccefd772b2c28d7138d8db52d5f20
[ "MIT" ]
null
null
null
from typing import List from sklearn.cluster import AgglomerativeClustering import fasttext.util import numpy as np from datetime import date from db_lib.crud import get_news_by_filters from config import LANGUAGE_SHORT_FOR_FASTTEXT, LIMIT_NEWS from db_lib.models import News from db_lib.database import SessionLocal f...
32.923077
111
0.728505
79580e41c75970ea3cb2ae1647ebb00adb19251b
455
py
Python
tests/test_utils/test_slot_inheritence.py
krishna-saravan/linkml
8c34844ebaf054f44ceb386e4d51ee4c95dbebe6
[ "CC0-1.0" ]
83
2021-03-17T16:31:02.000Z
2022-03-13T23:17:02.000Z
tests/test_utils/test_slot_inheritence.py
krishna-saravan/linkml
8c34844ebaf054f44ceb386e4d51ee4c95dbebe6
[ "CC0-1.0" ]
390
2021-03-18T18:44:11.000Z
2022-03-30T22:55:01.000Z
tests/test_utils/test_slot_inheritence.py
krishna-saravan/linkml
8c34844ebaf054f44ceb386e4d51ee4c95dbebe6
[ "CC0-1.0" ]
20
2021-03-27T08:55:56.000Z
2022-02-24T15:25:57.000Z
import unittest from linkml.utils.schemaloader import SchemaLoader from tests.test_utils.environment import env class InheritedSlotTestCase(unittest.TestCase): def test_inherited_slot(self): """ Validate default slot range settings """ schema = SchemaLoader(env.input_path('inherited_slots.yaml')...
26.764706
79
0.736264
79580fddc7c126487506b1678e34e6b85a44f66d
1,692
py
Python
insert_sort.py
brightmaraba/mandelbrot
02e07806d1fdeef6e003fac872d6f90a961b1167
[ "MIT" ]
null
null
null
insert_sort.py
brightmaraba/mandelbrot
02e07806d1fdeef6e003fac872d6f90a961b1167
[ "MIT" ]
null
null
null
insert_sort.py
brightmaraba/mandelbrot
02e07806d1fdeef6e003fac872d6f90a961b1167
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation import matplotlib as mp import numpy as np import random # Set graph style plt.style.use('fivethirtyeight') # Create array and shuffle it n = int(input("Enter array size\n")) a = [i for i in range(1, n+1)] random.shuffle(a) # Define inser...
22.263158
77
0.575059
795810c53da4be12b06d1119f84007a3e9551576
5,452
py
Python
module/error.py
FaberSid/mmo-discord-bot
9004c0194428819c6f3faba547b3fca47d57cfe9
[ "MIT" ]
3
2020-05-20T10:12:55.000Z
2020-11-16T14:58:29.000Z
module/error.py
FaberSid/mmo-discord-bot
9004c0194428819c6f3faba547b3fca47d57cfe9
[ "MIT" ]
4
2021-04-05T06:14:51.000Z
2021-06-14T06:22:05.000Z
module/error.py
FaberSid/mmo-discord-bot
9004c0194428819c6f3faba547b3fca47d57cfe9
[ "MIT" ]
1
2021-05-16T11:55:39.000Z
2021-05-16T11:55:39.000Z
import getpass import hashlib import math import traceback import aiohttp from discord import (AsyncWebhookAdapter, Embed, File, RawReactionActionEvent, Webhook) from discord.ext import commands as c from module import item, status async def _webhook(all_error, url, ctx): for i in range(len...
49.117117
362
0.588408
795810df92887bf6896548fd63a44f5c1c3c135e
21,478
py
Python
codes/SRN/models/DASR_model.py
madin162/AI604_project
d17b7a062bd1d55367136d15fabef64664d328b6
[ "MIT" ]
null
null
null
codes/SRN/models/DASR_model.py
madin162/AI604_project
d17b7a062bd1d55367136d15fabef64664d328b6
[ "MIT" ]
null
null
null
codes/SRN/models/DASR_model.py
madin162/AI604_project
d17b7a062bd1d55367136d15fabef64664d328b6
[ "MIT" ]
1
2021-11-24T05:41:29.000Z
2021-11-24T05:41:29.000Z
import sys import os import cv2 import logging from collections import OrderedDict import torch import torch.nn as nn import torch.nn.functional as F from torch.optim import lr_scheduler from utils.util import forward_chop import models.networks as networks from .base_model import BaseModel from models.modules.loss imp...
46.691304
132
0.581758
795810e31b7403460ba5c8bc93d542eab1135815
964
py
Python
custom_components/xiaomi_miot/core/const.py
ss109/hass-xiaomi-miot
a69c8e0e44400b9aa0f94f1003d3c6f3de4996fd
[ "Apache-2.0" ]
1
2021-12-10T12:30:34.000Z
2021-12-10T12:30:34.000Z
custom_components/xiaomi_miot/core/const.py
ss109/hass-xiaomi-miot
a69c8e0e44400b9aa0f94f1003d3c6f3de4996fd
[ "Apache-2.0" ]
null
null
null
custom_components/xiaomi_miot/core/const.py
ss109/hass-xiaomi-miot
a69c8e0e44400b9aa0f94f1003d3c6f3de4996fd
[ "Apache-2.0" ]
null
null
null
from .device_customizes import DEVICE_CUSTOMIZES from .miot_local_devices import MIOT_LOCAL_MODELS # noqa from .translation_languages import TRANSLATION_LANGUAGES # noqa DOMAIN = 'xiaomi_miot' DEFAULT_NAME = 'Xiaomi Miot' CONF_MODEL = 'model' CONF_XIAOMI_CLOUD = 'xiaomi_cloud' CONF_SERVER_COUNTRY = 'server_country'...
20.956522
71
0.71473
7958127fdcb5edc8709b342c9886ed526370c1c4
4,483
py
Python
datasets/cocov2.py
VinhLoiIT/EfficientDet.Pytorch
a5a753c6566c21f8c3fad12798efc48295d11a00
[ "MIT" ]
null
null
null
datasets/cocov2.py
VinhLoiIT/EfficientDet.Pytorch
a5a753c6566c21f8c3fad12798efc48295d11a00
[ "MIT" ]
null
null
null
datasets/cocov2.py
VinhLoiIT/EfficientDet.Pytorch
a5a753c6566c21f8c3fad12798efc48295d11a00
[ "MIT" ]
null
null
null
from __future__ import print_function, division import sys import os import torch import numpy as np import random import csv from torch.utils.data import Dataset, DataLoader from torchvision import transforms, utils from torch.utils.data.sampler import Sampler from pycocotools.coco import COCO import skimage.io imp...
33.207407
123
0.618782
7958138ddadd28c8c8f545147d8779f195419afd
7,741
py
Python
Assets/menus/end_level.py
ChristianD37/Natural-Selection
c3cc240838226124b07c26c4e64b9facc56870d1
[ "MIT" ]
11
2020-06-28T05:19:34.000Z
2021-11-19T17:52:30.000Z
Assets/menus/end_level.py
ChristianD37/Natural-Selection
c3cc240838226124b07c26c4e64b9facc56870d1
[ "MIT" ]
null
null
null
Assets/menus/end_level.py
ChristianD37/Natural-Selection
c3cc240838226124b07c26c4e64b9facc56870d1
[ "MIT" ]
1
2021-01-08T23:58:43.000Z
2021-01-08T23:58:43.000Z
import pygame, os,json from Assets.menus.menu import Menu from Assets.util.file_handler import write_save class LevelComplete(Menu): def __init__(self, game): Menu.__init__(self, game) self.credx, self.credy = self.mid_w, self.mid_h / 4 self.text_display = "" self.text = li...
43.734463
128
0.584679
79581492e0d9b950d401c4f0db5063bc3036a3ba
2,425
py
Python
CIM15/IEC61970/OperationalLimits/ActivePowerLimitSet.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
58
2015-04-22T10:41:03.000Z
2022-03-29T16:04:34.000Z
CIM15/IEC61970/OperationalLimits/ActivePowerLimitSet.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
12
2015-08-26T03:57:23.000Z
2020-12-11T20:14:42.000Z
CIM15/IEC61970/OperationalLimits/ActivePowerLimitSet.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
35
2015-01-10T12:21:03.000Z
2020-09-09T08:18:16.000Z
# Copyright (C) 2010-2011 Richard Lincoln # # 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...
38.492063
87
0.72866
795814f3d7b1fdfbdcfc41eee23ec66d0a14001c
48
py
Python
skompiler/fromskast/__init__.py
odinsemvosem/SKompiler
e46264796c8695497f43f6653688f5bcdbc0cfae
[ "MIT" ]
112
2018-12-12T03:54:28.000Z
2022-01-14T14:18:42.000Z
skompiler/fromskast/__init__.py
odinsemvosem/SKompiler
e46264796c8695497f43f6653688f5bcdbc0cfae
[ "MIT" ]
10
2018-12-20T17:21:09.000Z
2022-03-24T19:31:55.000Z
skompiler/fromskast/__init__.py
odinsemvosem/SKompiler
e46264796c8695497f43f6653688f5bcdbc0cfae
[ "MIT" ]
7
2019-02-05T05:20:05.000Z
2021-03-21T16:31:38.000Z
""" SKompiler: Code generation from SK-AST. """
12
39
0.666667
79581525b50bb8c614d4a944276df132b30d1d5e
39,742
py
Python
sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py
MaiRajborirug/scikit-learn
c18d015372f7041099d19c215cd4c36ffd6fe5c5
[ "BSD-3-Clause" ]
50,961
2015-01-01T06:06:31.000Z
2022-03-31T23:40:12.000Z
sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py
MaiRajborirug/scikit-learn
c18d015372f7041099d19c215cd4c36ffd6fe5c5
[ "BSD-3-Clause" ]
17,065
2015-01-01T02:01:58.000Z
2022-03-31T23:48:34.000Z
sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py
MaiRajborirug/scikit-learn
c18d015372f7041099d19c215cd4c36ffd6fe5c5
[ "BSD-3-Clause" ]
26,886
2015-01-01T00:59:27.000Z
2022-03-31T18:03:23.000Z
import numpy as np import pytest from numpy.testing import assert_allclose, assert_array_equal from sklearn.datasets import make_classification, make_regression from sklearn.datasets import make_low_rank_matrix from sklearn.preprocessing import KBinsDiscretizer, MinMaxScaler, OneHotEncoder from sklearn.model_selection ...
36.764107
88
0.675432
795816ce77c9f6ca8ab45275f63f59ed0679056e
1,566
py
Python
leaqi/envs/gym_structured_prediction/__init__.py
xkianteb/leaqi
924435590e74421ed16488429056f26747c99421
[ "MIT" ]
12
2020-05-25T16:50:05.000Z
2022-02-20T08:00:04.000Z
leaqi/envs/gym_structured_prediction/__init__.py
chenyangh/leaqi
924435590e74421ed16488429056f26747c99421
[ "MIT" ]
null
null
null
leaqi/envs/gym_structured_prediction/__init__.py
chenyangh/leaqi
924435590e74421ed16488429056f26747c99421
[ "MIT" ]
4
2020-05-28T18:25:01.000Z
2021-02-25T10:29:41.000Z
import logging from gym.envs.registration import register logger = logging.getLogger(__name__) register( id='Ner-v0', entry_point='leaqi.envs.gym_structured_prediction.envs:StructuredPredictionEnv', kwargs={'bert_model' : 'bert-base-cased', 'VOCAB': ('<PAD>', 'O', 'I-LOC', 'I-PER', 'I-ORG', 'I...
30.115385
160
0.591954
7958172c160a6cdf296ac6acb94550d7f4ab23f7
550
py
Python
codewof/config/context_processors/deployed.py
uccser-admin/programming-practice-prototype
3af4c7d85308ac5bb35bb13be3ec18cac4eb8308
[ "MIT" ]
null
null
null
codewof/config/context_processors/deployed.py
uccser-admin/programming-practice-prototype
3af4c7d85308ac5bb35bb13be3ec18cac4eb8308
[ "MIT" ]
null
null
null
codewof/config/context_processors/deployed.py
uccser-admin/programming-practice-prototype
3af4c7d85308ac5bb35bb13be3ec18cac4eb8308
[ "MIT" ]
1
2018-04-12T23:58:35.000Z
2018-04-12T23:58:35.000Z
"""Context processor for checking if in deployed environment.""" from django.conf import settings def deployed(request): """Return a dictionary containing booleans and other info regarding deployed environment. Returns: Dictionary containing deployed booleans and other info to add to context. ""...
30.555556
93
0.72
79581758902061c1ddacc509344a6684dd0b338f
2,831
py
Python
src/python/pants/backend/project_info/tasks/filedeps.py
dturner-tw/pants
3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/project_info/tasks/filedeps.py
dturner-tw/pants
3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/project_info/tasks/filedeps.py
dturner-tw/pants
3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import itertools imp...
44.936508
102
0.737195
795817f5474788a77ea94dfa04004d9ed1f20c98
5,952
py
Python
jina/enums.py
alfred297/Pooja-AI
0cfbd9d9eba52579fd73fd77d0d5e2c0f34d7653
[ "Apache-2.0" ]
null
null
null
jina/enums.py
alfred297/Pooja-AI
0cfbd9d9eba52579fd73fd77d0d5e2c0f34d7653
[ "Apache-2.0" ]
null
null
null
jina/enums.py
alfred297/Pooja-AI
0cfbd9d9eba52579fd73fd77d0d5e2c0f34d7653
[ "Apache-2.0" ]
null
null
null
__copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved." __license__ = "Apache-2.0" """ Miscellaneous enums used in jina To use these enums in YAML config, following the example below: .. highlight:: yaml .. code-block:: yaml !Flow with: logserver_config: yaml/test-server-config.yml...
25.220339
127
0.623488
7958184efc0dc37cacf4846b7804d193b78db708
65,880
py
Python
tests/test_sqlalchemy_data_layer.py
pysalt/flask-rest-jsonapi
a4bac73c2a18a658bfd9bab4b40f9880dafa737d
[ "MIT" ]
1
2020-06-22T07:28:20.000Z
2020-06-22T07:28:20.000Z
tests/test_sqlalchemy_data_layer.py
mahenzon/flask-rest-jsonapi
725cf11286a1ea06aa2ca62182a212d03fceb1c8
[ "MIT" ]
null
null
null
tests/test_sqlalchemy_data_layer.py
mahenzon/flask-rest-jsonapi
725cf11286a1ea06aa2ca62182a212d03fceb1c8
[ "MIT" ]
null
null
null
from urllib.parse import urlencode, parse_qs import pytest from sqlalchemy import create_engine, Column, Integer, DateTime, String, ForeignKey from sqlalchemy.orm import sessionmaker, relationship from sqlalchemy.ext.declarative import declarative_base from flask import Blueprint, make_response, json from marshmallow_...
35.882353
136
0.592289
79581889879251db51949ffe010f5cc2de42e9e7
170
py
Python
mayan/apps/ocr/backends/literals.py
Syunkolee9891/Mayan-EDMS
3759a9503a264a180b74cc8518388f15ca66ac1a
[ "Apache-2.0" ]
1
2021-06-17T18:24:25.000Z
2021-06-17T18:24:25.000Z
mayan/apps/ocr/backends/literals.py
Syunkolee9891/Mayan-EDMS
3759a9503a264a180b74cc8518388f15ca66ac1a
[ "Apache-2.0" ]
7
2020-06-06T00:01:04.000Z
2022-01-13T01:47:17.000Z
mayan/apps/ocr/backends/literals.py
Syunkolee9891/Mayan-EDMS
3759a9503a264a180b74cc8518388f15ca66ac1a
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import, unicode_literals DEFAULT_TESSERACT_BINARY_PATH = '/usr/bin/tesseract' DEFAULT_TESSERACT_TIMEOUT = 600 # 600 seconds, 10 minutes
34
58
0.835294
7958188b60f8413be5bae75a44a20f1e9cd91774
10,551
py
Python
openstack_dashboard/api/lbaas.py
rackerlabs/horizon
8914ed95fc8fa44771f5f3ec827e325a5855b60a
[ "Apache-2.0" ]
2
2018-10-21T22:30:29.000Z
2020-11-21T08:58:31.000Z
openstack_dashboard/api/lbaas.py
e/horizon
abbce256b68178ebf42816eb87303292212c1dfe
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/api/lbaas.py
e/horizon
abbce256b68178ebf42816eb87303292212c1dfe
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013, Big Switch Networks, 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...
32.767081
78
0.635106
79581892ed1662a57529a88ee3197cf6296762b6
32,755
py
Python
flax/core/lift.py
jacobhepkema/flax
074ec83e453df92b4b68e7332e7f3511270e007b
[ "Apache-2.0" ]
null
null
null
flax/core/lift.py
jacobhepkema/flax
074ec83e453df92b4b68e7332e7f3511270e007b
[ "Apache-2.0" ]
null
null
null
flax/core/lift.py
jacobhepkema/flax
074ec83e453df92b4b68e7332e7f3511270e007b
[ "Apache-2.0" ]
1
2021-06-06T23:19:32.000Z
2021-06-06T23:19:32.000Z
# Copyright 2021 The Flax Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
39.654964
154
0.684354
79581961596d01acd2bab6e2ffe572d818efb0b2
6,771
py
Python
libs/yowsup/yowsup/yowsup/layers/protocol_media/mediauploader.py
akshitpradhan/TomHack
837226e7b38de1140c19bc2d478eeb9e379ed1fd
[ "MIT" ]
null
null
null
libs/yowsup/yowsup/yowsup/layers/protocol_media/mediauploader.py
akshitpradhan/TomHack
837226e7b38de1140c19bc2d478eeb9e379ed1fd
[ "MIT" ]
null
null
null
libs/yowsup/yowsup/yowsup/layers/protocol_media/mediauploader.py
akshitpradhan/TomHack
837226e7b38de1140c19bc2d478eeb9e379ed1fd
[ "MIT" ]
null
null
null
from yowsup.common.http.warequest import WARequest from yowsup.common.http.waresponseparser import JSONResponseParser import socket, ssl, os, hashlib, sys from time import sleep import threading import logging from yowsup.common.tools import MimeTools import base64 import hmac import binascii, requests from Crypto.Ciph...
37.826816
158
0.586915
79581979f4a3c71436761d0cf992247ca677d3b9
2,110
py
Python
packet_error_rate_helper.py
LoMesh-ORG/LoMeshMODBUS-PCUI
2a034e167279eb79bcfe9b77d64cd64b8891b6ea
[ "Apache-2.0" ]
null
null
null
packet_error_rate_helper.py
LoMesh-ORG/LoMeshMODBUS-PCUI
2a034e167279eb79bcfe9b77d64cd64b8891b6ea
[ "Apache-2.0" ]
null
null
null
packet_error_rate_helper.py
LoMesh-ORG/LoMeshMODBUS-PCUI
2a034e167279eb79bcfe9b77d64cd64b8891b6ea
[ "Apache-2.0" ]
null
null
null
import stopit import serial import re import time def ping_test(target, timeoutval, ser): ser.reset_input_buffer() ser.write(b'AT+SEND:' + target.encode('utf-8') + b'=ping\r\n') responcestr = ser.read_until().decode('utf-8') if("NOT OK" in responcestr): print("Error in sending message...
39.074074
75
0.605213
79581a27cc4e2af9040be44d960fbe23c9f1e094
1,700
py
Python
drapache/util/subdomain_managers.py
louissobel/Drapache
564aaba08ee6929043ccd68027c6b01920dbb40a
[ "MIT" ]
9
2015-03-20T05:48:37.000Z
2018-12-17T09:32:31.000Z
drapache/util/subdomain_managers.py
louissobel/Drapache
564aaba08ee6929043ccd68027c6b01920dbb40a
[ "MIT" ]
null
null
null
drapache/util/subdomain_managers.py
louissobel/Drapache
564aaba08ee6929043ccd68027c6b01920dbb40a
[ "MIT" ]
2
2018-01-28T11:23:58.000Z
2018-07-30T23:38:51.000Z
""" Module for handling users, the oauth tokens THIS COULD AND SHOULD BE OPTIMIZE WITH CACHEING!!!! """ import mysql_connect class SubdomainException(Exception): pass class SubdomainManager: """ Base class for subdomain manager really an interface """ def get_token(self,subdomain): """ Returns a tuple ...
26.5625
95
0.748824
79581b90cfeeb757a025b6fedb24aae908e1609e
303
py
Python
utils/channels/permissions.py
pablo-moreno/shitter-back
33c0eb0e0bdff370b68148308ac08ab63b9e6e54
[ "MIT" ]
null
null
null
utils/channels/permissions.py
pablo-moreno/shitter-back
33c0eb0e0bdff370b68148308ac08ab63b9e6e54
[ "MIT" ]
null
null
null
utils/channels/permissions.py
pablo-moreno/shitter-back
33c0eb0e0bdff370b68148308ac08ab63b9e6e54
[ "MIT" ]
null
null
null
class Permission(object): def __init__(self, scope): self.scope = scope def has_permission(self, *args, **kwargs): raise NotImplementedError('You must implement has_permission method!') class Any(Permission): def has_permission(self, *args, **kwargs): return True
25.25
78
0.676568
79581bf8a985adf122dd37d3d3a9bebcd3ec2fbc
1,148
py
Python
setup.py
shipyardapp/azurestorage-blueprints
27f3a5e3e56b19c0ef414fae60dd77ac5ccb9d5a
[ "Apache-2.0" ]
1
2021-02-06T23:01:47.000Z
2021-02-06T23:01:47.000Z
setup.py
shipyardapp/azurestorage-blueprints
27f3a5e3e56b19c0ef414fae60dd77ac5ccb9d5a
[ "Apache-2.0" ]
null
null
null
setup.py
shipyardapp/azurestorage-blueprints
27f3a5e3e56b19c0ef414fae60dd77ac5ccb9d5a
[ "Apache-2.0" ]
1
2021-02-06T23:01:52.000Z
2021-02-06T23:01:52.000Z
from pathlib import Path from pkg_resources import parse_requirements from setuptools import find_packages, setup for path in Path('./').rglob('requirements.txt'): with Path(path).open() as requirements_txt: install_requires = [ str(requirement) for requirement in parse...
31.027027
89
0.634146
79581c7d5a7a4131724b8d87e2964854566bb4aa
1,356
py
Python
antistasi_logbook/__main__.py
Giddius/Antistasi_Logbook
b2b520db1a54df484984876c7dfdb724703fed77
[ "MIT" ]
2
2022-01-12T22:45:56.000Z
2022-03-10T14:23:36.000Z
antistasi_logbook/__main__.py
Giddius/Antistasi_Logbook
b2b520db1a54df484984876c7dfdb724703fed77
[ "MIT" ]
null
null
null
antistasi_logbook/__main__.py
Giddius/Antistasi_Logbook
b2b520db1a54df484984876c7dfdb724703fed77
[ "MIT" ]
null
null
null
""" WiP. Soon. """ # region [Imports] # * Standard Library Imports ----------------------------------------------------------------------------> from typing import TYPE_CHECKING from pathlib import Path # * Gid Imports -----------------------------------------------------------------------------------------> from g...
22.229508
108
0.570059
79581c87fe252e1ce90d856f64051955c87f1a7b
2,376
py
Python
Code/Dash App/app.py
zachlim98/carloancalc
d10e2de5748026e8fd60b6a9734f4666467c40fb
[ "MIT" ]
null
null
null
Code/Dash App/app.py
zachlim98/carloancalc
d10e2de5748026e8fd60b6a9734f4666467c40fb
[ "MIT" ]
null
null
null
Code/Dash App/app.py
zachlim98/carloancalc
d10e2de5748026e8fd60b6a9734f4666467c40fb
[ "MIT" ]
null
null
null
import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output import plotly.express as px import pandas as pd app = dash.Dash(__name__) server = app.server app.layout = html.Div([ html.Div([ dcc.Input( id='carprice', min=50000, ...
31.263158
199
0.609428
79581c8d586c230b9e115f5f14ffe120b8a56341
9,243
py
Python
python3_cron_scripts/fetch_azure_dns.py
bhumikaSinghal/Marinus
d64cf6217e422bb0be8b19f50b9a63e01d7b0783
[ "Apache-2.0" ]
null
null
null
python3_cron_scripts/fetch_azure_dns.py
bhumikaSinghal/Marinus
d64cf6217e422bb0be8b19f50b9a63e01d7b0783
[ "Apache-2.0" ]
null
null
null
python3_cron_scripts/fetch_azure_dns.py
bhumikaSinghal/Marinus
d64cf6217e422bb0be8b19f50b9a63e01d7b0783
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # Copyright 2019 Adobe. All rights reserved. # This file is licensed to you under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. You may obtain a copy # of the License at http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
31.65411
95
0.610624
79581df82df351ea359a0c321dbc3861f3812a4f
1,533
py
Python
profiles_api/views.py
snidu001/rest-api
75aa4368546de306fa3ac32ff437b29adff6ff02
[ "MIT" ]
null
null
null
profiles_api/views.py
snidu001/rest-api
75aa4368546de306fa3ac32ff437b29adff6ff02
[ "MIT" ]
7
2019-12-05T00:00:31.000Z
2022-02-10T10:19:20.000Z
profiles_api/views.py
snidu001/rest-api
75aa4368546de306fa3ac32ff437b29adff6ff02
[ "MIT" ]
null
null
null
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from profiles_api import serializers class HelloApiView(APIView): """Test API View""" serializer_class = serializers.HelloSerializer def get(self, request, format=None): """Retu...
31.9375
72
0.617743
79581e72b18ec7765bc0c2996ad51066eecc9e58
356
py
Python
presentations/session_2/redis_examples/redis_others/redis_sub_py3.py
NanoDataCenter/nano_data_center
76ad521e1a5139a37df80214af1413d2fd4ade60
[ "MIT" ]
2
2018-02-21T03:46:51.000Z
2019-12-24T16:40:51.000Z
presentations/session_2/redis_examples/redis_others/redis_sub_py3.py
NanoDataCenter/nano_data_center
76ad521e1a5139a37df80214af1413d2fd4ade60
[ "MIT" ]
7
2020-07-16T19:54:08.000Z
2022-03-02T03:29:07.000Z
presentations/session_2/redis_examples/redis_others/redis_sub_py3.py
NanoDataCenter/nano_data_center
76ad521e1a5139a37df80214af1413d2fd4ade60
[ "MIT" ]
2
2018-04-16T07:02:35.000Z
2020-07-23T21:57:19.000Z
import redis import json import time redis_handle = redis.StrictRedis("127.0.0.1", 6379 ,0,decode_responses = True ) subscribe_object = redis_handle.pubsub() subscribe_object.subscribe("redis_pub") # # Can add many keys or channels # while True: for item in subscribe_object.listen(): ## iterate ov...
22.25
80
0.707865
79581f42dfd249d1d5dcbcb056e16e30ec5384e3
1,731
py
Python
TestFromZHJW.py
AnCoSONG/SCUCaptchaRecognizer
09e1255d34cfc576eba451a72bf7a988c4893f9b
[ "MIT" ]
1
2019-07-01T08:23:16.000Z
2019-07-01T08:23:16.000Z
TestFromZHJW.py
AnCoSONG/SCUCaptchaRecognizer
09e1255d34cfc576eba451a72bf7a988c4893f9b
[ "MIT" ]
1
2019-08-09T14:13:25.000Z
2019-08-09T14:13:25.000Z
TestFromZHJW.py
AnCoSONG/SCUCaptchaRecognizer
09e1255d34cfc576eba451a72bf7a988c4893f9b
[ "MIT" ]
null
null
null
from keras import models import cv2 as cv import os import numpy as np import requests import random import matplotlib.pyplot as plt try: model1 = models.load_model('models/0PosRecognize.h5') model2 = models.load_model('models/1PosRecognize.h5') model3 = models.load_model('models/2PosRecognize.h5') mod...
22.776316
73
0.632582
79581f99f8da0e86a08f1ffed0ec5eb7053d6c45
11,303
py
Python
spec_cleaner/rpmregexp.py
dcermak/spec-cleaner
917e35c09d054b5545806ab1e9ce408e9a517de6
[ "BSD-3-Clause" ]
null
null
null
spec_cleaner/rpmregexp.py
dcermak/spec-cleaner
917e35c09d054b5545806ab1e9ce408e9a517de6
[ "BSD-3-Clause" ]
null
null
null
spec_cleaner/rpmregexp.py
dcermak/spec-cleaner
917e35c09d054b5545806ab1e9ce408e9a517de6
[ "BSD-3-Clause" ]
null
null
null
# vim: set ts=4 sw=4 et: coding=UTF-8 import re from typing import List class Regexp(object): """ Singleton containing all regular expressions compiled in one run. So we can use them later everywhere without compiling them again, """ # section macros re_spec_package = re.compile(r'^...
56.798995
230
0.604353
79582095ae31a63762ec600492e7931b7b204dce
2,863
py
Python
examples/views/persistent.py
kuzaku-developers/disnake
61cc1ad4c2bafd39726a1447c85f7e469e41af10
[ "MIT" ]
null
null
null
examples/views/persistent.py
kuzaku-developers/disnake
61cc1ad4c2bafd39726a1447c85f7e469e41af10
[ "MIT" ]
null
null
null
examples/views/persistent.py
kuzaku-developers/disnake
61cc1ad4c2bafd39726a1447c85f7e469e41af10
[ "MIT" ]
null
null
null
from disnake.ext import commands import disnake # Define a simple View that persists between bot restarts # In order a view to persist between restarts it needs to meet the following conditions: # 1) The timeout of the View has to be set to None # 2) Every item in the View has to have a custom_id set # It is recommen...
44.734375
105
0.718128
79582099b489842d653231894ac98c81eef1d1d7
1,986
py
Python
models/data_utils/data_read_utils.py
aman313/deep_generalization
2ef2a731a1b2e5c3ce16c7b66de86c57dba08a37
[ "MIT" ]
null
null
null
models/data_utils/data_read_utils.py
aman313/deep_generalization
2ef2a731a1b2e5c3ce16c7b66de86c57dba08a37
[ "MIT" ]
null
null
null
models/data_utils/data_read_utils.py
aman313/deep_generalization
2ef2a731a1b2e5c3ce16c7b66de86c57dba08a37
[ "MIT" ]
null
null
null
import pandas as pd import torch import numpy as np import ast def one_hot_transformer(vocab): vocab_index = {elem:index for index,elem in enumerate(vocab)} def trans(str,max_len): one_hot = torch.zeros(max_len,len(vocab)) for i in range(len(str)): char = str[i] try: ...
43.173913
128
0.615811
795820c4a124f48fcd1c320c131a4a4d1be85067
1,920
py
Python
projects/socketio_basic/app.py
basavyr/flask-development-tutorials
aa6081416f72b14a33fdf5294577e2a459487d84
[ "MIT" ]
null
null
null
projects/socketio_basic/app.py
basavyr/flask-development-tutorials
aa6081416f72b14a33fdf5294577e2a459487d84
[ "MIT" ]
3
2022-03-22T10:15:55.000Z
2022-03-22T18:17:39.000Z
projects/socketio_basic/app.py
basavyr/flask-development-tutorials
aa6081416f72b14a33fdf5294577e2a459487d84
[ "MIT" ]
null
null
null
# Start with a basic flask app webpage. from flask_socketio import SocketIO from flask_socketio import send, emit from flask import Flask, render_template, url_for, copy_current_request_context from random import random from time import sleep from threading import Thread, Event import src.local_tools as tools # defi...
22.325581
79
0.6625
7958210ca31ad18a15b14e2c2ab12e95721e51d4
6,931
py
Python
tests/integration/api/v2010/account/test_outgoing_caller_id.py
BrimmingDev/twilio-python
3226b5fed92b3c2ce64f03e6b19fc4792ef7647f
[ "MIT" ]
1,362
2015-01-04T10:25:18.000Z
2022-03-24T10:07:08.000Z
tests/integration/api/v2010/account/test_outgoing_caller_id.py
BrimmingDev/twilio-python
3226b5fed92b3c2ce64f03e6b19fc4792ef7647f
[ "MIT" ]
299
2015-01-30T09:52:39.000Z
2022-03-31T23:03:02.000Z
tests/integration/api/v2010/account/test_outgoing_caller_id.py
BrimmingDev/twilio-python
3226b5fed92b3c2ce64f03e6b19fc4792ef7647f
[ "MIT" ]
622
2015-01-03T04:43:09.000Z
2022-03-29T14:11:00.000Z
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base.exceptions import TwilioException from twilio.http.response import Response class OutgoingCallerIdTestCase(...
40.063584
150
0.58563
79582143be05b9d9e10b4667d293075895257c67
992
py
Python
src/olympia/landfill/tests/test_users.py
atiqueahmedziad/addons-server
6e1cc00bf15d245fbcdddf618286bba943731e45
[ "BSD-3-Clause" ]
10
2018-08-16T04:55:06.000Z
2022-01-08T16:09:39.000Z
src/olympia/landfill/tests/test_users.py
atiqueahmedziad/addons-server
6e1cc00bf15d245fbcdddf618286bba943731e45
[ "BSD-3-Clause" ]
171
2018-05-20T00:27:59.000Z
2022-03-21T13:34:27.000Z
src/olympia/landfill/tests/test_users.py
atiqueahmedziad/addons-server
6e1cc00bf15d245fbcdddf618286bba943731e45
[ "BSD-3-Clause" ]
12
2018-08-01T16:46:09.000Z
2022-01-08T16:09:46.000Z
# -*- coding: utf-8 -*- from olympia import amo from olympia.addons.models import Addon, AddonCategory, AddonUser, Category from olympia.amo.tests import TestCase from olympia.landfill.user import ( generate_addon_user_and_category, generate_user) from olympia.users.models import UserProfile class RatingsTests(Te...
36.740741
75
0.725806
7958218b17c8b28f178ff2fae54cb918f9578315
1,239
py
Python
HealthCareAIApp/app/src/main/python/featureExtraction.py
parvathysjsu/Adaptive-and-Heuristic-AI-enabled-IoT-Edge-for-high-risk-and-rural-patients
c3e639fabfdbe9ffa4ce1f9a700ebace254c0080
[ "MIT" ]
null
null
null
HealthCareAIApp/app/src/main/python/featureExtraction.py
parvathysjsu/Adaptive-and-Heuristic-AI-enabled-IoT-Edge-for-high-risk-and-rural-patients
c3e639fabfdbe9ffa4ce1f9a700ebace254c0080
[ "MIT" ]
1
2020-11-13T08:47:47.000Z
2020-11-13T08:47:47.000Z
HealthCareAIApp/app/src/main/python/featureExtraction.py
parvathysjsu/Adaptive-and-Heuristic-AI-enabled-IoT-Edge-for-high-risk-and-rural-patients
c3e639fabfdbe9ffa4ce1f9a700ebace254c0080
[ "MIT" ]
1
2020-12-10T02:08:20.000Z
2020-12-10T02:08:20.000Z
import librosa as lb import numpy as np from scipy.signal import butter, lfilter # Sample rate and desired cutoff frequencies (in Hz). fs = 4000.0 lowcut = 100.0 highcut = 1800.0 #Set maxpad length as 79 <--(Sampling rate*5s)/256(hop length) def build_feat(fpath): max_pad_len = 79 wav, rate = lb.load(fpath,...
31.769231
139
0.656174
795823465432c475d8b769ed3108e7debfbfa01c
906
py
Python
scripts/status.py
aditprab/tesla-cl-tools
b1df7a451cdbf3f80feb10bf96ea3bc3f7904489
[ "MIT" ]
1
2019-06-25T21:44:57.000Z
2019-06-25T21:44:57.000Z
scripts/status.py
aditprab/tesla-cl-tools
b1df7a451cdbf3f80feb10bf96ea3bc3f7904489
[ "MIT" ]
1
2019-04-05T20:43:12.000Z
2019-04-05T20:43:12.000Z
scripts/status.py
aditprab/tesla-cl-tools
b1df7a451cdbf3f80feb10bf96ea3bc3f7904489
[ "MIT" ]
null
null
null
#!/usr/bin/env python import requests import propertiesReader import authTokenGenerator import vehicles def output(vehicleName, response): print(vehicleName + " is: " + response['charging_state'] + ".") print("The current charge level is: " + str(response['battery_range']) + " miles.") print("Battery is ...
31.241379
87
0.681015
795823b9e9fff53f0bef62b8ad2974f5edec8b82
7,868
py
Python
homeassistant/components/saj/sensor.py
serenewaffles/core
ee7116d0e85ab24548607d6b970d9915f3e3ae0b
[ "Apache-2.0" ]
2
2021-01-29T02:52:01.000Z
2021-05-15T04:23:18.000Z
homeassistant/components/saj/sensor.py
serenewaffles/core
ee7116d0e85ab24548607d6b970d9915f3e3ae0b
[ "Apache-2.0" ]
44
2021-03-17T07:49:17.000Z
2022-03-31T06:08:18.000Z
homeassistant/components/saj/sensor.py
serenewaffles/core
ee7116d0e85ab24548607d6b970d9915f3e3ae0b
[ "Apache-2.0" ]
7
2021-03-20T12:34:01.000Z
2021-12-02T10:13:52.000Z
"""SAJ solar inverter interface.""" from __future__ import annotations from datetime import date import logging import pysaj import voluptuous as vol from homeassistant.components.sensor import ( PLATFORM_SCHEMA, STATE_CLASS_MEASUREMENT, SensorEntity, ) from homeassistant.const import ( CONF_HOST, ...
30.734375
88
0.656965
795823f819a4d0959bfc90e5e3e7504ba0b0ef4e
19
py
Python
payment/urls.py
lautarianoo/django_shop
9bc575df8b7af5452bd15cc3cf4fb375be6384bd
[ "MIT" ]
null
null
null
payment/urls.py
lautarianoo/django_shop
9bc575df8b7af5452bd15cc3cf4fb375be6384bd
[ "MIT" ]
null
null
null
payment/urls.py
lautarianoo/django_shop
9bc575df8b7af5452bd15cc3cf4fb375be6384bd
[ "MIT" ]
null
null
null
urlpatterns = [ ]
4.75
15
0.578947
7958260982a9f320b9fc8c743f8546400ae51dc4
7,269
py
Python
frappe/tests/ui_test_helpers.py
erpnext-tm/frappe
7b470f28e1cf00b0659c01e06a2d0a4693b28d98
[ "MIT" ]
null
null
null
frappe/tests/ui_test_helpers.py
erpnext-tm/frappe
7b470f28e1cf00b0659c01e06a2d0a4693b28d98
[ "MIT" ]
null
null
null
frappe/tests/ui_test_helpers.py
erpnext-tm/frappe
7b470f28e1cf00b0659c01e06a2d0a4693b28d98
[ "MIT" ]
null
null
null
import frappe from frappe import _ from frappe.utils import add_to_date, now @frappe.whitelist() def create_if_not_exists(doc): """Create records if they dont exist. Will check for uniqueness by checking if a record exists with these field value pairs :param doc: dict of field value pairs. can be a list of dict f...
24.640678
98
0.659651
795826434fb0ca20fc1bd998ab8b4e54388a5c2f
9,886
py
Python
src/main.py
sinbag/deepsampling
40b28ad99f3cc4b37602e38765b62e2091642764
[ "BSD-3-Clause" ]
5
2019-10-19T06:45:48.000Z
2021-01-26T10:53:13.000Z
src/main.py
sinbag/deepsampling
40b28ad99f3cc4b37602e38765b62e2091642764
[ "BSD-3-Clause" ]
null
null
null
src/main.py
sinbag/deepsampling
40b28ad99f3cc4b37602e38765b62e2091642764
[ "BSD-3-Clause" ]
4
2019-10-16T06:52:08.000Z
2020-08-06T18:38:23.000Z
import platform import os, sys if platform.system() == 'Linux': # To find available GPU on a multi-gpu machine cluster import utils.selectgpu as setgpu os.environ["CUDA_VISIBLE_DEVICES"] = str(setgpu.pick_gpu_lowest_memory()) import argparse import importlib import numpy as np import math import time im...
35.056738
118
0.568885
795827515b942549cc9ea94ed3820f03dc658b16
3,221
py
Python
demos/quantile/demo_synthetic.py
mathurinm/torch_itl
e3d92d753bd51ccf585029129110c93bbf9b5fd0
[ "MIT" ]
null
null
null
demos/quantile/demo_synthetic.py
mathurinm/torch_itl
e3d92d753bd51ccf585029129110c93bbf9b5fd0
[ "MIT" ]
null
null
null
demos/quantile/demo_synthetic.py
mathurinm/torch_itl
e3d92d753bd51ccf585029129110c93bbf9b5fd0
[ "MIT" ]
null
null
null
import os import sys import importlib if importlib.util.find_spec('torch_itl') is None: path_to_lib = os.getcwd()[:-15] sys.path.append(path_to_lib) from torch_itl.estimator import IQR from torch_itl.kernel import Gaussian, LearnableGaussian from torch_itl.model import DecomposableIdentity from torch_itl.samp...
25.768
73
0.721515
7958277e4dda8e08f1e61a577845ec1330669583
7,850
py
Python
docs/conf.py
maguas01/titanic
f16e13e3a88e9ef4ead1c8b47a7b4cd65811dc07
[ "MIT" ]
null
null
null
docs/conf.py
maguas01/titanic
f16e13e3a88e9ef4ead1c8b47a7b4cd65811dc07
[ "MIT" ]
null
null
null
docs/conf.py
maguas01/titanic
f16e13e3a88e9ef4ead1c8b47a7b4cd65811dc07
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # titanic documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a...
32.040816
80
0.707261
795829e4d021dd2393648750b424011c797ee1e0
261
py
Python
vendor/pyexcel/ext/ods.py
Lwz1966/QQ-Groups-Spider
5f953651b2000cbfe23057e12f3a7293fe1d94fb
[ "MIT" ]
882
2016-07-23T12:26:19.000Z
2022-03-29T08:02:32.000Z
pyexcel/ext/ods.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
13
2016-12-12T04:29:30.000Z
2019-08-15T10:36:16.000Z
pyexcel/ext/ods.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
410
2016-07-23T15:15:12.000Z
2022-03-19T08:59:58.000Z
""" pyexcel.ext.ods ~~~~~~~~~~~~~~~~~~~~~~~~ Deprecated module import :copyright: (c) 2015-2017 by Onni Software Ltd. :license: New BSD License """ from ..deprecated import deprecated_pyexcel_ext deprecated_pyexcel_ext('0.2.2', __name__)
20.076923
51
0.632184
795829e777b58f466017324eee8d5eba23bfc74e
1,050
py
Python
largest_rectangle_histogram.py
pranavdave893/Leetcode
1f30ea37af7b60585d168b15d9397143f53c92a1
[ "MIT" ]
null
null
null
largest_rectangle_histogram.py
pranavdave893/Leetcode
1f30ea37af7b60585d168b15d9397143f53c92a1
[ "MIT" ]
null
null
null
largest_rectangle_histogram.py
pranavdave893/Leetcode
1f30ea37af7b60585d168b15d9397143f53c92a1
[ "MIT" ]
null
null
null
from typing import List class Solution: def largestRectangleArea(self, height: List[int]) -> int: stack = [-1] height.append(0) ans = 0 for i in range(len(height)): while height[i] < height[stack[-1]]: h = height[stack.pop()] w = i - stack...
30
115
0.480952
79582c5448b8803a10eb88e8e71f7d184afc66e7
4,758
py
Python
bin/gftools-fix-familymetadata.py
nyshadhr9/gftools
fe399074994a3d9cada25c37196d13707cdb53e0
[ "Apache-2.0" ]
null
null
null
bin/gftools-fix-familymetadata.py
nyshadhr9/gftools
fe399074994a3d9cada25c37196d13707cdb53e0
[ "Apache-2.0" ]
null
null
null
bin/gftools-fix-familymetadata.py
nyshadhr9/gftools
fe399074994a3d9cada25c37196d13707cdb53e0
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python2 # Copyright 2016 The Fontbakery Authors # Copyright 2017 The Google Font Tools Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lice...
35.507463
79
0.617486
79582cfdc79be10280a5fc9d3bce55e908a17fec
1,192
py
Python
kubernetes_asyncio/test/test_extensions_v1beta1_run_as_group_strategy_options.py
PidgeyBE/kubernetes_asyncio
14d15dc309890253c26b6274a022e84441e05217
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/test/test_extensions_v1beta1_run_as_group_strategy_options.py
PidgeyBE/kubernetes_asyncio
14d15dc309890253c26b6274a022e84441e05217
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/test/test_extensions_v1beta1_run_as_group_strategy_options.py
PidgeyBE/kubernetes_asyncio
14d15dc309890253c26b6274a022e84441e05217
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: v1.13.5 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unittest import kube...
29.8
158
0.777685
79582f85d124ef65fbc3e24676f1082e91768c3c
10,611
py
Python
jinja2schema/visitors/stmt.py
jlevesque/jinja2schema
5340f43d18dc2f9fcd7b6b18a5bdd83b3410a222
[ "BSD-3-Clause" ]
null
null
null
jinja2schema/visitors/stmt.py
jlevesque/jinja2schema
5340f43d18dc2f9fcd7b6b18a5bdd83b3410a222
[ "BSD-3-Clause" ]
null
null
null
jinja2schema/visitors/stmt.py
jlevesque/jinja2schema
5340f43d18dc2f9fcd7b6b18a5bdd83b3410a222
[ "BSD-3-Clause" ]
null
null
null
# coding: utf-8 """ jinja2schema.visitors.stmt ~~~~~~~~~~~~~~~~~~~~~~~~~~ Statement is an instance of :class:`jinja2.nodes.Stmt`. Statement visitors return :class:`.models.Dictionary` of structures of variables used within the statement. """ import functools from jinja2 import nodes, Environment, PackageLoader from j...
41.127907
120
0.684478
79582fc6d2dbb2ccd8327fea8b1cad66aa8cd54a
15,953
py
Python
test/utils.py
stephan-hof/mongo-python-driver
a30eb87db3a0db4a9bd0ff9472f30b8215100f23
[ "Apache-2.0" ]
null
null
null
test/utils.py
stephan-hof/mongo-python-driver
a30eb87db3a0db4a9bd0ff9472f30b8215100f23
[ "Apache-2.0" ]
null
null
null
test/utils.py
stephan-hof/mongo-python-driver
a30eb87db3a0db4a9bd0ff9472f30b8215100f23
[ "Apache-2.0" ]
null
null
null
# Copyright 2012-present MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
29.111314
80
0.655488
795831332447d09bbd722d4b622e2ed492219069
9,138
py
Python
Config/config.py
DA-southampton/PyTorch_Bert_Text_Classification
6ad4fc5f1ef502df762bb5cba0cdfc1cca7ec550
[ "Apache-2.0" ]
32
2019-03-16T08:50:01.000Z
2022-03-10T01:47:45.000Z
Config/config.py
DA-southampton/PyTorch_Bert_Text_Classification
6ad4fc5f1ef502df762bb5cba0cdfc1cca7ec550
[ "Apache-2.0" ]
5
2019-03-22T13:39:52.000Z
2021-04-10T12:05:06.000Z
Config/config.py
DA-southampton/PyTorch_Bert_Text_Classification
6ad4fc5f1ef502df762bb5cba0cdfc1cca7ec550
[ "Apache-2.0" ]
5
2019-05-08T04:56:43.000Z
2020-07-29T07:19:22.000Z
from configparser import ConfigParser import os class myconf(ConfigParser): """ MyConf """ def __init__(self, defaults=None): ConfigParser.__init__(self, defaults=defaults) self.add_sec = "Additional" def optionxform(self, optionstr): return optionstr class Configur...
25.454039
76
0.644342
79583220641f8aa8380091ca42c4d9323f49dd31
580
py
Python
chapter7/ftplib/ftp_download_file_bytes.py
gabrielmahia/ushuhudAI
ee40c9822852f66c6111d1d485dc676b6da70677
[ "MIT" ]
null
null
null
chapter7/ftplib/ftp_download_file_bytes.py
gabrielmahia/ushuhudAI
ee40c9822852f66c6111d1d485dc676b6da70677
[ "MIT" ]
null
null
null
chapter7/ftplib/ftp_download_file_bytes.py
gabrielmahia/ushuhudAI
ee40c9822852f66c6111d1d485dc676b6da70677
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from ftplib import FTP ftp_client=FTP('ftp.be.debian.org') ftp_client.login() ftp_client.cwd('/pub/linux/kernel/v5.x/') ftp_client.voidcmd("TYPE I") datasock,estsize=ftp_client.ntransfercmd("RETR ChangeLog-5.0") transbytes=0 file_descryptor=open('ChangeLog-5.0','wb') while True: buffer=datasoc...
26.363636
101
0.758621
795833530641f0c831bfc851360f6fd6381591ed
874
py
Python
Demo/tkinter/matt/window-creation-w-location.py
AtjonTV/Python-1.4
2a80562c5a163490f444181cb75ca1b3089759ec
[ "Unlicense", "TCL", "DOC", "AAL", "X11" ]
null
null
null
Demo/tkinter/matt/window-creation-w-location.py
AtjonTV/Python-1.4
2a80562c5a163490f444181cb75ca1b3089759ec
[ "Unlicense", "TCL", "DOC", "AAL", "X11" ]
null
null
null
Demo/tkinter/matt/window-creation-w-location.py
AtjonTV/Python-1.4
2a80562c5a163490f444181cb75ca1b3089759ec
[ "Unlicense", "TCL", "DOC", "AAL", "X11" ]
null
null
null
from Tkinter import * import sys sys.path.append("/users/mjc4y/projects/python/tkinter/utils") from TkinterUtils import * # this shows how to create a new window with a button in it that # can create new windows class Test(Frame): def makeWindow(self, *args): fred = Toplevel() fred.label = Canvas (fred, wid...
22.410256
64
0.697941
7958344e463ae2e738aac29dc43efc9aea25ded9
4,207
py
Python
src/utils.py
Oogway-Technologies/search_app
401901ab65ecff9500c8edff68234645daeca4cf
[ "Apache-2.0" ]
null
null
null
src/utils.py
Oogway-Technologies/search_app
401901ab65ecff9500c8edff68234645daeca4cf
[ "Apache-2.0" ]
null
null
null
src/utils.py
Oogway-Technologies/search_app
401901ab65ecff9500c8edff68234645daeca4cf
[ "Apache-2.0" ]
null
null
null
import json import requests from src.const import (QueryType, TDS_QA_ENDPOINT, WIKIFIER_ENDPOINT, WIKIFIER_THRESHOLD) def get_query_type(query: str) -> QueryType: if not query: return QueryType.EMPTY_QUERY elif query.startswith('explore:'): return QueryType.EXPLORE_QUERY elif query.startsw...
27.496732
110
0.644878
79583490641d50411e6b54dab28cc1ba21507972
391
py
Python
cms/forms/validators.py
petrklus/django-cms
5094a01afd82e59496e2b09f06e63c4c3147e342
[ "BSD-3-Clause" ]
1
2018-05-18T06:00:19.000Z
2018-05-18T06:00:19.000Z
cms/forms/validators.py
petrklus/django-cms
5094a01afd82e59496e2b09f06e63c4c3147e342
[ "BSD-3-Clause" ]
null
null
null
cms/forms/validators.py
petrklus/django-cms
5094a01afd82e59496e2b09f06e63c4c3147e342
[ "BSD-3-Clause" ]
1
2017-10-17T08:20:32.000Z
2017-10-17T08:20:32.000Z
from django.core.exceptions import ValidationError from django.core.validators import RegexValidator, URLValidator from cms.utils.urlutils import relative_url_regex def validate_url(value): try: # Validate relative urls first RegexValidator(regex=relative_url_regex)(value) except ValidationEr...
27.928571
63
0.754476
795834e73c1e8fc6306ec1ad60a4f05eca1cc1c0
4,607
py
Python
odoo-13.0/addons/project/tests/test_project_base.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
odoo-13.0/addons/project/tests/test_project_base.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
odoo-13.0/addons/project/tests/test_project_base.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from odoo.tests.common import SavepointCase from odoo.exceptions import UserError class TestProjectBase(SavepointCase): @classmethod def setUpClass(cls): super(TestProjectBase, cls).setUpClass() user_group_employee = cls.env.ref('base.group_user') user_group_p...
44.298077
112
0.576948
795836212919b22ecc93c8fcf44de03366dfab7c
7,736
py
Python
freshdesk/v2/tests/conftest.py
grumo35/python-freshdesk
6025c0338e39157c8c1c1aa0c3c6c1fd4d14c490
[ "BSD-2-Clause" ]
null
null
null
freshdesk/v2/tests/conftest.py
grumo35/python-freshdesk
6025c0338e39157c8c1c1aa0c3c6c1fd4d14c490
[ "BSD-2-Clause" ]
null
null
null
freshdesk/v2/tests/conftest.py
grumo35/python-freshdesk
6025c0338e39157c8c1c1aa0c3c6c1fd4d14c490
[ "BSD-2-Clause" ]
null
null
null
import json import os.path import re import pytest from freshdesk.v2.api import API DOMAIN = "pythonfreshdesk.freshdesk.com" API_KEY = "MX4CEAw4FogInimEdRW2" class MockedAPI(API): def __init__(self, *args): self.resolver = { "get": { re.compile(r"tickets\?filter=new_and_my_o...
55.654676
149
0.623837
7958363ce24f98547a6a9b12cdf2c9918a8c375c
2,654
py
Python
ruby_token_builders.py
jfitz/code-stat
dd2a13177f3ef03ab42123ef3cfcbbd062a2ae26
[ "MIT" ]
null
null
null
ruby_token_builders.py
jfitz/code-stat
dd2a13177f3ef03ab42123ef3cfcbbd062a2ae26
[ "MIT" ]
null
null
null
ruby_token_builders.py
jfitz/code-stat
dd2a13177f3ef03ab42123ef3cfcbbd062a2ae26
[ "MIT" ]
null
null
null
from codestat_token import Token from token_builders import TokenBuilder # token reader for identifier class RubyIdentifierTokenBuilder(TokenBuilder): @staticmethod def __escape_z__(): Token.__escape_z__() return 'Escape ?Z' def __init__(self): self.text = None def get_tokens(self): if self....
23.078261
72
0.611153
795837183bbc024b49b78870d4a898388bcc37ef
1,933
py
Python
examples/postman_echo/request_methods/demo_testsuite_yml/request_with_testcase_reference_test.py
BSTester/httprunner
909e864beb459eb3504a5d9febe148e65c9f146f
[ "Apache-2.0" ]
null
null
null
examples/postman_echo/request_methods/demo_testsuite_yml/request_with_testcase_reference_test.py
BSTester/httprunner
909e864beb459eb3504a5d9febe148e65c9f146f
[ "Apache-2.0" ]
null
null
null
examples/postman_echo/request_methods/demo_testsuite_yml/request_with_testcase_reference_test.py
BSTester/httprunner
909e864beb459eb3504a5d9febe148e65c9f146f
[ "Apache-2.0" ]
null
null
null
# NOTE: Generated By HttpRunner v3.1.4 # FROM: request_methods/request_with_testcase_reference.yml import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).parent.parent)) from airhttprunner import HttpRunner, Config, Step, RunRequest, RunTestCase from request_methods.request_with_functions_test ...
28.850746
83
0.559234
7958372da7eb1f2e65bafe28933a89d250958fdc
6,917
py
Python
ECE_Night/views.py
biomotion/ECE_Night_2019
83e49150848638b9d943f92e0ee87ae0e89c543e
[ "Apache-2.0" ]
null
null
null
ECE_Night/views.py
biomotion/ECE_Night_2019
83e49150848638b9d943f92e0ee87ae0e89c543e
[ "Apache-2.0" ]
5
2020-02-12T03:23:38.000Z
2021-06-10T22:25:14.000Z
ECE_Night/views.py
biomotion/ECE_Night_2019
83e49150848638b9d943f92e0ee87ae0e89c543e
[ "Apache-2.0" ]
null
null
null
from rest_framework import viewsets from rest_framework import status from rest_framework.response import Response from rest_framework.decorators import api_view, permission_classes from .serializers import ProfileSerializer, UserSerializer, SkillSerializer, SessionSerializer, ProgramSerializer from django.contrib.auth...
38.642458
113
0.680642
7958388150d0469ed8580f8c3434b4c570e5d8d5
1,961
py
Python
PyPoll.py
linearcoffeecup/election-analysis
d8ca539104045f2f3b3b52970cc9cef84f92a8a7
[ "MIT" ]
null
null
null
PyPoll.py
linearcoffeecup/election-analysis
d8ca539104045f2f3b3b52970cc9cef84f92a8a7
[ "MIT" ]
null
null
null
PyPoll.py
linearcoffeecup/election-analysis
d8ca539104045f2f3b3b52970cc9cef84f92a8a7
[ "MIT" ]
null
null
null
import csv import os file_to_load = os.path.join("Resources", "election_results.csv") file_to_save = os.path.join("analysis", "election_analysis.txt") candidate_votes = {} candidate_options = [] total_votes = 0 winning_candidate = "" winning_count = 0 winning_percentage = 0 with open(file_to_load) as election_data:...
31.629032
86
0.63335
795839f89fc322aa4ca29b445f977df710bf7b5e
10,410
py
Python
rom_generator/storylineGenerator.py
ikarth/game-boy-rom-generator
29576a4bbe87a0032f80967d4b740059a65ea5c9
[ "MIT" ]
3
2021-08-07T03:38:02.000Z
2021-09-17T14:33:27.000Z
rom_generator/storylineGenerator.py
ikarth/game-boy-rom-generator
29576a4bbe87a0032f80967d4b740059a65ea5c9
[ "MIT" ]
null
null
null
rom_generator/storylineGenerator.py
ikarth/game-boy-rom-generator
29576a4bbe87a0032f80967d4b740059a65ea5c9
[ "MIT" ]
null
null
null
import argparse import copy import random from rom_generator import script_functions as script from rom_generator.generator import makeBasicProject, addSceneData, addSpriteSheet, makeSpriteSheet, makeBackground, makeScene, makeActor, addSymmetricSceneConnections, makeMusic, reverse_direction, initializeGenerator, w...
55.079365
415
0.608453
79583a54d49a6b25b409ec17e270b6fb7970ede5
16,484
py
Python
rtv/mime_parsers.py
jordanrossetti/rtv
c6546b8e77463a5606ef56c86e054e248d197080
[ "MIT" ]
null
null
null
rtv/mime_parsers.py
jordanrossetti/rtv
c6546b8e77463a5606ef56c86e054e248d197080
[ "MIT" ]
null
null
null
rtv/mime_parsers.py
jordanrossetti/rtv
c6546b8e77463a5606ef56c86e054e248d197080
[ "MIT" ]
2
2018-05-01T21:40:39.000Z
2018-05-02T20:43:35.000Z
import re import logging import mimetypes import requests from bs4 import BeautifulSoup _logger = logging.getLogger(__name__) class BaseMIMEParser(object): """ BaseMIMEParser can be sub-classed to define custom handlers for determining the MIME type of external urls. """ pattern = re.compile(r'....
31.883946
95
0.607802
79583b65bc32731cf10fef4385086438d3bfe149
2,860
py
Python
vpc_core_infra/vpcx_cdk/vpc_update_handler.py
aws-samples/amz-vpc-provisioning-api-sls
d6779d24f8f0aa46e53cee17b7d94af401daeb18
[ "MIT-0" ]
null
null
null
vpc_core_infra/vpcx_cdk/vpc_update_handler.py
aws-samples/amz-vpc-provisioning-api-sls
d6779d24f8f0aa46e53cee17b7d94af401daeb18
[ "MIT-0" ]
null
null
null
vpc_core_infra/vpcx_cdk/vpc_update_handler.py
aws-samples/amz-vpc-provisioning-api-sls
d6779d24f8f0aa46e53cee17b7d94af401daeb18
[ "MIT-0" ]
null
null
null
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 # pylint: disable=line-too-long """VPC Update handler""" import json from vpc_core_infra.vpcx_cdk.vpc_base import VpcHandler, METADATA_TEMPLATE_BUCKET, STATIC_CF_TEMPLATE_BUCKET from vpc_core_infra.vpcx_cdk import cdk...
42.058824
129
0.599301
79583be703f29a897f912085f0a239bfa18c8862
582
py
Python
celery/wip/j.py
noahwilliamsson/protokollen
feb6e4bb5934d83646f9954ad24b3e7670d18817
[ "BSD-2-Clause" ]
1
2019-12-11T16:54:38.000Z
2019-12-11T16:54:38.000Z
celery/wip/j.py
noahwilliamsson/protokollen
feb6e4bb5934d83646f9954ad24b3e7670d18817
[ "BSD-2-Clause" ]
null
null
null
celery/wip/j.py
noahwilliamsson/protokollen
feb6e4bb5934d83646f9954ad24b3e7670d18817
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python import json import sys # http://docs.python.org/2/library/urlparse.html from urlparse import urlparse if len(sys.argv) < 2: print "Usage:", sys.argv[0], "<file.json>" raise SystemExit data = open(sys.argv[1]).read() har = json.loads(data) domain_map = {} for e in har['log']['entries']: ur...
19.4
52
0.675258
79583c47d8e3d6e3af5a34c380906f513f94f2bd
4,008
py
Python
tests/unit/states/win_snmp_test.py
fictivekin/salt
f4b6f815d47ab8c790028e8ddad64ee0f8bb3f00
[ "Apache-2.0" ]
2
2015-09-21T14:13:30.000Z
2016-02-12T11:33:46.000Z
tests/unit/states/win_snmp_test.py
fictivekin/salt
f4b6f815d47ab8c790028e8ddad64ee0f8bb3f00
[ "Apache-2.0" ]
null
null
null
tests/unit/states/win_snmp_test.py
fictivekin/salt
f4b6f815d47ab8c790028e8ddad64ee0f8bb3f00
[ "Apache-2.0" ]
2
2017-01-05T16:14:59.000Z
2019-01-31T23:15:25.000Z
# -*- coding: utf-8 -*- ''' :synopsis: Unit Tests for Windows SNMP Module 'state.win_snmp' :platform: Windows :maturity: develop versionadded:: Nitrogen ''' # Import Python Libs from __future__ import absolute_import # Import Salt Libs from salt.states import win_snmp import salt.ext.six as six # Imp...
37.457944
96
0.608782
79583d4dbed315f4064558677b0c97ed5bcda5dd
2,920
py
Python
TvTimeWrapper/TvTimeUtils.py
Aymendje/Trakt2TvTime
9cfc3c68ec43ede81e952c40a37b8cf35057a210
[ "MIT" ]
1
2022-01-06T18:51:48.000Z
2022-01-06T18:51:48.000Z
TvTimeWrapper/TvTimeUtils.py
Aymendje/Trakt2TvTime
9cfc3c68ec43ede81e952c40a37b8cf35057a210
[ "MIT" ]
null
null
null
TvTimeWrapper/TvTimeUtils.py
Aymendje/Trakt2TvTime
9cfc3c68ec43ede81e952c40a37b8cf35057a210
[ "MIT" ]
null
null
null
from Users.UsersManager import TvTimeUser from time import sleep from typing import Dict, List, Any import requests import logging from bs4 import BeautifulSoup from TvTimeWrapper import TvTimeLogin HEADERS={ 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Saf...
42.941176
133
0.707534
79583e5675327f7abdbe26f15ba7daf7f52bbe1e
2,607
py
Python
utils/gen_link_script.py
ontio/libcxx-mirror
4b4f32ea383deb28911f5618126c6ea6c110b5e4
[ "Apache-2.0" ]
null
null
null
utils/gen_link_script.py
ontio/libcxx-mirror
4b4f32ea383deb28911f5618126c6ea6c110b5e4
[ "Apache-2.0" ]
1
2019-04-21T16:53:33.000Z
2019-04-21T17:15:25.000Z
utils/gen_link_script.py
ontio/libcxx-mirror
4b4f32ea383deb28911f5618126c6ea6c110b5e4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python #===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # #===------------...
31.035714
106
0.616417
79583e68ac6a5d0eb83125be6819a88a0c28abf0
8,797
py
Python
napari/layers/utils/_color_encoding.py
jojoelfe/napari
b52a136dad392c091b0008c0b8d7fcc5ef460f66
[ "BSD-3-Clause" ]
7
2018-07-03T17:35:46.000Z
2018-11-07T15:48:58.000Z
napari/layers/utils/_color_encoding.py
maweigert/napari
48cdf4d1c4bcf6f76603e90b1c0c7498e2aba6c0
[ "BSD-3-Clause" ]
120
2018-09-04T22:05:13.000Z
2019-03-02T01:13:57.000Z
napari/layers/utils/_color_encoding.py
maweigert/napari
48cdf4d1c4bcf6f76603e90b1c0c7498e2aba6c0
[ "BSD-3-Clause" ]
8
2018-09-04T21:48:26.000Z
2019-01-29T04:48:30.000Z
from typing import Any, Literal, Optional, Tuple, Union import numpy as np from pydantic import Field, parse_obj_as, validator from typing_extensions import Protocol, runtime_checkable from ...utils import Colormap from ...utils.colormaps import ValidColormapArg, ensure_colormap from ...utils.colormaps.categorical_co...
33.965251
112
0.663522
79583eca26a7012105d7d5eb2bf0f10661682504
58,938
py
Python
app/modules/blog_posts/migrations/0023_auto_20200728_0910.py
nickmoreton/nhsx-website
2397d1308376c02b75323d30e6bc916af0daac9d
[ "MIT" ]
50
2019-04-04T17:50:00.000Z
2021-08-05T15:08:37.000Z
app/modules/blog_posts/migrations/0023_auto_20200728_0910.py
nickmoreton/nhsx-website
2397d1308376c02b75323d30e6bc916af0daac9d
[ "MIT" ]
434
2019-04-04T18:25:32.000Z
2022-03-31T18:23:37.000Z
app/modules/blog_posts/migrations/0023_auto_20200728_0910.py
nhsx-mirror/nhsx-website
2133b4e275ca35ff77f7d6874e809f139ec4bf86
[ "MIT" ]
23
2019-04-04T09:52:07.000Z
2021-04-11T07:41:47.000Z
# Generated by Django 3.0.4 on 2020-07-28 09:10 from django.db import migrations import modules.core.blocks import wagtail.core.blocks import wagtail.core.fields import wagtail.images.blocks import wagtailnhsukfrontend.blocks class Migration(migrations.Migration): dependencies = [ ("blog_posts", "0022_a...
55.549482
192
0.1874
79583f344f0c1f642586c4a8ecc08f2aa4e24008
8,189
py
Python
python/paddle/nn/__init__.py
Huangheyl/Paddle
a1b640bc66a5cc9583de503e7406aeba67565e8d
[ "Apache-2.0" ]
8
2019-06-16T12:36:11.000Z
2021-03-05T05:33:21.000Z
python/paddle/nn/__init__.py
Huangheyl/Paddle
a1b640bc66a5cc9583de503e7406aeba67565e8d
[ "Apache-2.0" ]
1
2020-09-10T09:05:52.000Z
2020-09-10T09:06:22.000Z
python/paddle/nn/__init__.py
Huangheyl/Paddle
a1b640bc66a5cc9583de503e7406aeba67565e8d
[ "Apache-2.0" ]
25
2019-12-07T02:14:14.000Z
2021-12-30T06:16:30.000Z
# Copyright (c) 2020 PaddlePaddle 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 app...
47.33526
89
0.805227
79583f47a242721357ae5c7b21cb7a25e9220446
1,625
py
Python
core/game/player.py
8area8/MacGyver-The-game-
2ada7ac2a2b02eb697600200bbbd5bf82b2cd073
[ "Apache-2.0" ]
null
null
null
core/game/player.py
8area8/MacGyver-The-game-
2ada7ac2a2b02eb697600200bbbd5bf82b2cd073
[ "Apache-2.0" ]
null
null
null
core/game/player.py
8area8/MacGyver-The-game-
2ada7ac2a2b02eb697600200bbbd5bf82b2cd073
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python3 # coding: utf-8 """Player module.""" from pygame.sprite import Group from core.modules.constants import CASE_PIXELS, SPEED, DIRECTION, UPSCALE class Player: """Player's class.""" def __init__(self, image, t_coords): """Initialize the player.""" self.items = Items() ...
25
79
0.56
79583fd58863286e21be1ebfa699f1b821ef0629
2,041
py
Python
tests/data/program_analysis/arrays/arrays-basic-06_lambdas.py
mikiec84/delphi
2e517f21e76e334c7dfb14325d25879ddf26d10d
[ "Apache-2.0" ]
25
2018-03-03T11:57:57.000Z
2022-01-16T21:19:54.000Z
tests/data/program_analysis/arrays/arrays-basic-06_lambdas.py
mikiec84/delphi
2e517f21e76e334c7dfb14325d25879ddf26d10d
[ "Apache-2.0" ]
385
2018-02-21T16:52:06.000Z
2022-02-17T07:44:56.000Z
tests/data/program_analysis/arrays/arrays-basic-06_lambdas.py
mikiec84/delphi
2e517f21e76e334c7dfb14325d25879ddf26d10d
[ "Apache-2.0" ]
19
2018-03-20T01:08:11.000Z
2021-09-29T01:04:49.000Z
from numbers import Real from random import random from delphi.translators.for2py.strings import * import numpy as np import delphi.translators.for2py.math_ext as math def arrays_basic_06__main__assign__a__0(): a = [[0] * (1 - -(3)), [0] * (5 - 0), [0] * (14 - 10)] return a def arrays_basic_06__main__loop_0__...
27.213333
95
0.790789
79583fdb9759e3e55a66d2ea6e9a69fe1b0900fd
1,445
py
Python
services/sidecar/src/simcore_service_sidecar/celery_log_setup.py
GitHK/osparc-simcore-forked
5b01a28d1b8028afcf9a735e1d46a73daa13686e
[ "MIT" ]
null
null
null
services/sidecar/src/simcore_service_sidecar/celery_log_setup.py
GitHK/osparc-simcore-forked
5b01a28d1b8028afcf9a735e1d46a73daa13686e
[ "MIT" ]
17
2020-10-15T16:06:05.000Z
2022-03-21T18:48:21.000Z
services/sidecar/src/simcore_service_sidecar/celery_log_setup.py
GitHK/osparc-simcore-forked
5b01a28d1b8028afcf9a735e1d46a73daa13686e
[ "MIT" ]
null
null
null
""" setup logging formatters to fit logspout's multiline pattern "^(ERROR|WARNING|INFO|DEBUG|CRITICAL)[:]" NOTE: import to connect signals! SEE https://github.com/ITISFoundation/osparc-ops/blob/master/services/graylog/docker-compose.yml#L113 """ # NOTES: # https://docs.celeryproject.org/en/latest/userguide/s...
34.404762
132
0.756401
795840a68519fe6d866843feb603c4fdfec9d4f8
1,623
py
Python
genz/funcs.py
larsoner/genz-1
dc7a73b4597f976c0274d696c2610c79b7a1f7c1
[ "MIT" ]
2
2020-12-08T05:29:08.000Z
2021-04-21T21:37:42.000Z
genz/funcs.py
larsoner/genz-1
dc7a73b4597f976c0274d696c2610c79b7a1f7c1
[ "MIT" ]
10
2021-02-12T02:56:55.000Z
2021-09-08T18:59:51.000Z
genz/funcs.py
larsoner/genz-1
dc7a73b4597f976c0274d696c2610c79b7a1f7c1
[ "MIT" ]
2
2019-01-10T20:47:40.000Z
2021-04-21T15:21:49.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import os.path as op import itertools import mne import numpy as np from genz import defaults def expand_grid(data_dict): import pandas as pd rows = itertools.product(*data_dict.values()) return pd.DataFrame.from_records(rows, columns=data_dict.keys()) de...
32.46
79
0.640789
79584158cc406819d1db1e3d076dc499d144cf3b
404
py
Python
PycharmProjects/pythonexercicios/aula21/ex105.py
zmixtv1/cev-Python
edce04f86d943d9af070bf3c5e89575ff796ec9e
[ "MIT" ]
null
null
null
PycharmProjects/pythonexercicios/aula21/ex105.py
zmixtv1/cev-Python
edce04f86d943d9af070bf3c5e89575ff796ec9e
[ "MIT" ]
null
null
null
PycharmProjects/pythonexercicios/aula21/ex105.py
zmixtv1/cev-Python
edce04f86d943d9af070bf3c5e89575ff796ec9e
[ "MIT" ]
null
null
null
def notas(*n, sit=False): r= dict() r["total"] = len(n) r["maior"] = max(n) r["menor"] = min(n) r["média"] = sum(n)/len(n) if sit: if r["média"] >= 7: r["situação"] = "Boa" elif r["média"] >= 5: r["situação"] = "Razoável" else: r["situa...
21.263158
41
0.438119
7958432834ce4664c1c8bdd059cb2b1632aa2b1b
817
py
Python
build.py
team-counterpoint/tcmc-path
7c8b2e9767a1cee8b519c9acc8c1d001af0daf86
[ "BSD-2-Clause" ]
null
null
null
build.py
team-counterpoint/tcmc-path
7c8b2e9767a1cee8b519c9acc8c1d001af0daf86
[ "BSD-2-Clause" ]
null
null
null
build.py
team-counterpoint/tcmc-path
7c8b2e9767a1cee8b519c9acc8c1d001af0daf86
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 """Script to generate Alloy files from the template.""" import argparse import jinja2 import re def main(): parser = argparse.ArgumentParser() parser.add_argument("--name") parser.add_argument("--fc", action="store_true") parser.add_argument("--path", action="store_true") ...
24.757576
74
0.654835