hexsha
stringlengths
40
40
size
int64
2
1.05M
ext
stringclasses
9 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
193
max_stars_repo_name
stringlengths
6
109
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
36.6k
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
193
max_issues_repo_name
stringlengths
6
109
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
29.8k
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
193
max_forks_repo_name
stringlengths
6
109
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
11.2k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.05M
avg_line_length
float64
1
404k
max_line_length
int64
1
1.03M
alphanum_fraction
float64
0
1
1a3c63395a9218faca1cb43c25ec9293846d1596
1,897
py
Python
_OLD_VERSION/src/lib/pytornado/plot/downwash.py
airinnova/pytornado
6127f45af60ab05f15b441bc134089a7e7a59669
[ "Linux-OpenIB" ]
16
2019-08-13T18:49:14.000Z
2022-01-11T15:41:12.000Z
_OLD_VERSION/src/lib/pytornado/plot/downwash.py
airinnova/pytornado
6127f45af60ab05f15b441bc134089a7e7a59669
[ "Linux-OpenIB" ]
24
2019-09-11T14:48:01.000Z
2022-03-18T08:17:52.000Z
_OLD_VERSION/src/lib/pytornado/plot/downwash.py
airinnova/pytornado
6127f45af60ab05f15b441bc134089a7e7a59669
[ "Linux-OpenIB" ]
5
2019-09-20T18:45:45.000Z
2020-12-08T01:44:43.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ---------------------------------------------------------------------- # Copyright 2017-2020 Airinnova AB and the PyTornado authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # Y...
28.313433
74
0.661571
1a3c75e6186fb74517de841aaf6580468c3c9405
67,571
py
Python
processors/ner_seq.py
20000607-lxc/BERT-NER-Pytorch-master
47f2e1291ab53674986eb91abdb72693eafe9b61
[ "MIT" ]
null
null
null
processors/ner_seq.py
20000607-lxc/BERT-NER-Pytorch-master
47f2e1291ab53674986eb91abdb72693eafe9b61
[ "MIT" ]
null
null
null
processors/ner_seq.py
20000607-lxc/BERT-NER-Pytorch-master
47f2e1291ab53674986eb91abdb72693eafe9b61
[ "MIT" ]
null
null
null
""" Named entity recognition fine-tuning: utilities to work with CLUENER task. """ import torch import logging import os import copy import json import random import math from .utils_ner import DataProcessor logger = logging.getLogger(__name__) def iob_iobes(tags): """ IOB -> IOBES """ new_tags = [] ...
45.288874
186
0.511151
1a3c91dd60fbfa49a0e558a87eefc18a38639afb
81
py
Python
impression_web/storage/exceptions.py
Buttsgroup/impression-job
5b7a86c0d13f922ebb0291ffa7178a98abaf6d1e
[ "MIT" ]
null
null
null
impression_web/storage/exceptions.py
Buttsgroup/impression-job
5b7a86c0d13f922ebb0291ffa7178a98abaf6d1e
[ "MIT" ]
null
null
null
impression_web/storage/exceptions.py
Buttsgroup/impression-job
5b7a86c0d13f922ebb0291ffa7178a98abaf6d1e
[ "MIT" ]
1
2021-05-02T12:06:49.000Z
2021-05-02T12:06:49.000Z
""" Storage exception classes """ class FileTransferError(Exception): pass
10.125
35
0.716049
1a3c9cf6333e0f939f9ea20f8ecb5b03b7a7fa1c
411
py
Python
python-code/pyglet-learning/01-helloworld.py
juxiangwu/image-processing
c644ef3386973b2b983c6b6b08f15dc8d52cd39f
[ "Apache-2.0" ]
13
2018-09-07T02:29:07.000Z
2021-06-18T08:40:09.000Z
python-code/pyglet-learning/01-helloworld.py
juxiangwu/image-processing
c644ef3386973b2b983c6b6b08f15dc8d52cd39f
[ "Apache-2.0" ]
null
null
null
python-code/pyglet-learning/01-helloworld.py
juxiangwu/image-processing
c644ef3386973b2b983c6b6b08f15dc8d52cd39f
[ "Apache-2.0" ]
4
2019-06-20T00:09:39.000Z
2021-07-15T10:14:36.000Z
#coding:utf-8 import pyglet window = pyglet.window.Window() label = pyglet.text.Label('Hello, world', font_name='Times New Roman', font_size=36, x=window.width//2, y=window.height//2, anchor_x='center', anchor_y='c...
24.176471
64
0.527981
1a3cb269ac70893d77044ec036283ec0f4304eff
2,023
py
Python
venv/Lib/site-packages/pyrogram/raw/types/input_messages_filter_document.py
D1ne2021/jjhhhjj
a090da30983b3ef276dfe4cef2ded4526f36002a
[ "MIT" ]
2
2021-12-13T07:09:55.000Z
2022-01-12T12:15:20.000Z
venv/Lib/site-packages/pyrogram/raw/types/input_messages_filter_document.py
hoangkiet1906/Botcie_ver1
c133b915edde06dac690a7dc6ca160f6792fc4c8
[ "MIT" ]
null
null
null
venv/Lib/site-packages/pyrogram/raw/types/input_messages_filter_document.py
hoangkiet1906/Botcie_ver1
c133b915edde06dac690a7dc6ca160f6792fc4c8
[ "MIT" ]
null
null
null
# Pyrogram - Telegram MTProto API Client Library for Python # Copyright (C) 2017-2021 Dan <https://github.com/delivrance> # # This file is part of Pyrogram. # # Pyrogram is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free...
31.609375
103
0.638655
1a3ce7febff33843795ad3017a4c658f837c0ae9
4,919
py
Python
cinder/tests/unit/volume/drivers/netapp/test_common.py
mail2nsrajesh/cinder
a688b872bec6d1abd4dcd852bdb8e8a921369d2e
[ "Apache-2.0" ]
null
null
null
cinder/tests/unit/volume/drivers/netapp/test_common.py
mail2nsrajesh/cinder
a688b872bec6d1abd4dcd852bdb8e8a921369d2e
[ "Apache-2.0" ]
2
2018-10-25T13:04:01.000Z
2019-08-17T13:15:24.000Z
cinder/tests/unit/volume/drivers/netapp/test_common.py
mail2nsrajesh/cinder
a688b872bec6d1abd4dcd852bdb8e8a921369d2e
[ "Apache-2.0" ]
2
2018-10-17T13:32:50.000Z
2018-11-08T08:39:39.000Z
# Copyright (c) 2014 Clinton Knight. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
36.169118
79
0.636308
1a3d08bcbaf299c23ffa703995e0e90e1b374996
4,886
py
Python
tlsmate/workers/robot.py
timb-machine-mirrors/tlsmate
1313161b9170311f466a3a43b3d84797cecc0291
[ "MIT" ]
null
null
null
tlsmate/workers/robot.py
timb-machine-mirrors/tlsmate
1313161b9170311f466a3a43b3d84797cecc0291
[ "MIT" ]
null
null
null
tlsmate/workers/robot.py
timb-machine-mirrors/tlsmate
1313161b9170311f466a3a43b3d84797cecc0291
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Module scanning for the ROBOT vulnerability Refer to CVE-2017-13099, etc. Padding oracle for RSA-based key transport, refer to https://robotattack.org """ # import basic stuff import math # import own stuff import tlsmate.msg as msg import tlsmate.plugin as plg import tlsmate.tls as tls im...
38.171875
86
0.572657
1a3d16b8c02519cc0eacfc06525591f70bace53f
2,251
py
Python
puka/simplebuffer.py
jmptbl/puka
bc6e845c8a5f4319ffc54cc71959c56a8893edaf
[ "MIT" ]
81
2015-01-22T10:09:37.000Z
2022-01-25T04:38:29.000Z
puka/simplebuffer.py
jmptbl/puka
bc6e845c8a5f4319ffc54cc71959c56a8893edaf
[ "MIT" ]
17
2015-05-13T01:51:53.000Z
2021-03-05T04:01:39.000Z
puka/simplebuffer.py
jmptbl/puka
bc6e845c8a5f4319ffc54cc71959c56a8893edaf
[ "MIT" ]
25
2015-02-12T14:02:41.000Z
2020-05-15T14:08:43.000Z
from __future__ import absolute_import from builtins import object import future.utils as futils import os if futils.PY2: try: from cStringIO import StringIO except ImportError: from StringIO import StringIO else: from io import BytesIO as StringIO from .compat import as_bytes, as_str # ...
22.068627
71
0.540204
1a3d234fcb6b166cc828c98fb0752dd643a21f0a
3,259
py
Python
converter/models/hubconf.py
KaiyuYue/resnext-wsl-caffe
222de80aae6bd423535d8d680ca03943d4424e09
[ "MIT" ]
2
2019-06-27T00:56:47.000Z
2019-10-20T11:07:42.000Z
converter/models/hubconf.py
KaiyuYue/resnext-wsl-caffe
222de80aae6bd423535d8d680ca03943d4424e09
[ "MIT" ]
null
null
null
converter/models/hubconf.py
KaiyuYue/resnext-wsl-caffe
222de80aae6bd423535d8d680ca03943d4424e09
[ "MIT" ]
2
2019-08-12T03:29:27.000Z
2020-04-14T12:37:22.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # Optional list of dependencies required by the package dependencies = ['torch', 'torchvision'] # from torch.hub import lo...
40.7375
98
0.721387
1a3d26f460fcdbbfa9dbcec488d4c6aba8e1b78c
267
py
Python
terrascript/systemd/__init__.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
507
2017-07-26T02:58:38.000Z
2022-01-21T12:35:13.000Z
terrascript/systemd/__init__.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
135
2017-07-20T12:01:59.000Z
2021-10-04T22:25:40.000Z
terrascript/systemd/__init__.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
81
2018-02-20T17:55:28.000Z
2022-01-31T07:08:40.000Z
# terrascript/systemd/__init__.py # Automatically generated by tools/makecode.py () import warnings warnings.warn( "using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2 ) import terrascript class systemd(terrascript.Provider): pass
17.8
79
0.771536
1a3d34c49f6e120d061ed09f7df651c3989a97de
10,722
py
Python
packstack/plugins/puppet_950.py
fr34k8/packstack
0dc24dc5dd0e41ae9f4c430e6ae2ff5cda0e9212
[ "Apache-2.0" ]
1
2015-11-06T10:12:19.000Z
2015-11-06T10:12:19.000Z
packstack/plugins/puppet_950.py
fr34k8/packstack
0dc24dc5dd0e41ae9f4c430e6ae2ff5cda0e9212
[ "Apache-2.0" ]
null
null
null
packstack/plugins/puppet_950.py
fr34k8/packstack
0dc24dc5dd0e41ae9f4c430e6ae2ff5cda0e9212
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Installs and configures puppet """ import sys import logging import os import platform import time from packstack.installer import utils from packstack.installer import basedefs, output_messages from packstack.installer.exceptions import ScriptRuntimeError, PuppetError from packstack.mod...
40.157303
79
0.559877
1a3d4e2e455afad0ca70fa25ffae383005d145d6
12,582
py
Python
homeassistant/const.py
dagobert/home-assistant
33dcb071dab25dd93ce7bcfae70315ace5af4702
[ "Apache-2.0" ]
1
2019-03-24T13:30:10.000Z
2019-03-24T13:30:10.000Z
homeassistant/const.py
dagobert/home-assistant
33dcb071dab25dd93ce7bcfae70315ace5af4702
[ "Apache-2.0" ]
1
2019-02-09T15:44:11.000Z
2019-02-09T15:44:11.000Z
homeassistant/const.py
pc-coholic/home-assistant
24914aade50f7f4f813380b58292d5e91dc47f41
[ "Apache-2.0" ]
1
2020-01-09T12:36:16.000Z
2020-01-09T12:36:16.000Z
# coding: utf-8 """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 88 PATCH_VERSION = '0.dev0' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 5, 3) # Format for platform files PL...
27.411765
79
0.777221
1a3d93b6c971fe2f0d91509497eb8280e45944ed
28,022
py
Python
axonius_api_client/tests/tests_api/tests_wizard/test_wizard.py
kf-careem/axonius_api_client
27767c896ca446e74ca5d69e087e1a0dcf7157ec
[ "MIT" ]
11
2020-01-31T00:28:26.000Z
2022-03-25T20:27:08.000Z
axonius_api_client/tests/tests_api/tests_wizard/test_wizard.py
kf-careem/axonius_api_client
27767c896ca446e74ca5d69e087e1a0dcf7157ec
[ "MIT" ]
83
2020-01-22T12:52:38.000Z
2022-02-07T16:20:18.000Z
axonius_api_client/tests/tests_api/tests_wizard/test_wizard.py
kf-careem/axonius_api_client
27767c896ca446e74ca5d69e087e1a0dcf7157ec
[ "MIT" ]
16
2019-08-23T17:44:31.000Z
2022-01-06T00:57:34.000Z
# -*- coding: utf-8 -*- """Test suite for axonius_api_client.wizard.wizard""" import pytest from axonius_api_client.api.wizards import Wizard from axonius_api_client.constants.fields import ALL_NAME, Operators from axonius_api_client.constants.wizards import Entry, Flags, Results, Types from axonius_api_client.excepti...
33.359524
93
0.473093
1a3d96a1b64aac9a0176262327efef6249b8e826
93,842
py
Python
lib/utils/train_loop.py
Mirofil/AutoDL-Projects
e7ee9fe27e5c5561a4b9fd1c1ee185677ef30893
[ "MIT" ]
null
null
null
lib/utils/train_loop.py
Mirofil/AutoDL-Projects
e7ee9fe27e5c5561a4b9fd1c1ee185677ef30893
[ "MIT" ]
null
null
null
lib/utils/train_loop.py
Mirofil/AutoDL-Projects
e7ee9fe27e5c5561a4b9fd1c1ee185677ef30893
[ "MIT" ]
null
null
null
import os, sys, time, random, argparse, math import numpy as np from copy import deepcopy from collections import defaultdict import torch import torch.nn as nn import wandb from tqdm import tqdm from pathlib import Path from hessian_eigenthings import compute_hessian_eigenthings lib_dir = (Path(__file__).parent / '....
54.68648
401
0.696543
1a3d9a75d48f2457061a0be93c9a9dffa02ebff9
3,624
py
Python
test/fixtures.py
funkyeah/tiddlyweb
2346e6c05aa03ae9c8f2687d9ef9e46103267a8e
[ "BSD-3-Clause" ]
null
null
null
test/fixtures.py
funkyeah/tiddlyweb
2346e6c05aa03ae9c8f2687d9ef9e46103267a8e
[ "BSD-3-Clause" ]
null
null
null
test/fixtures.py
funkyeah/tiddlyweb
2346e6c05aa03ae9c8f2687d9ef9e46103267a8e
[ "BSD-3-Clause" ]
null
null
null
""" Data structures required for our testing. """ import os import shutil from wsgi_intercept import httplib2_intercept import wsgi_intercept from tiddlyweb.web.serve import load_app from tiddlyweb.model.collections import Tiddlers from tiddlyweb.model.bag import Bag from tiddlyweb.model.tiddler import Tiddler from ...
26.844444
70
0.681567
1a3db420f0b3562e9f94f29c014053ba9b4a9528
21,490
py
Python
setup-llvm-repos.py
Rajpratik71/devel-scripts
068285719a13b02889b1314361cc5bdb764d9a3a
[ "Apache-2.0" ]
null
null
null
setup-llvm-repos.py
Rajpratik71/devel-scripts
068285719a13b02889b1314361cc5bdb764d9a3a
[ "Apache-2.0" ]
null
null
null
setup-llvm-repos.py
Rajpratik71/devel-scripts
068285719a13b02889b1314361cc5bdb764d9a3a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python """Script to create LLVM trunk devel subvolume or snapshot. Creates BTRFS subvolume with trunk git-on-svn client, plus binutils, then runs cmake to set up ninja build. More details at: http://llvm.org/docs/GettingStarted.html http://llvm.org/docs/DeveloperPolicy.html This script has two modes...
28.962264
86
0.636901
1a3db5f7e4a715506c034143a0dfb68b797124da
1,667
py
Python
src/datasets/base_label_mapper.py
elangovana/large-scale-ptm-ppi
cc835df915d12dd20c35f9cea5e40365200a6d3d
[ "MIT" ]
1
2022-02-25T22:06:39.000Z
2022-02-25T22:06:39.000Z
src/datasets/base_label_mapper.py
elangovana/ppi-aimed
cc835df915d12dd20c35f9cea5e40365200a6d3d
[ "MIT" ]
null
null
null
src/datasets/base_label_mapper.py
elangovana/ppi-aimed
cc835df915d12dd20c35f9cea5e40365200a6d3d
[ "MIT" ]
null
null
null
class BaseMapperBase: """ Base class for mapping labels to zero indexed integers """ def map(self, item) -> int: """ Maps the raw label to corresponding zero indexed integer. E.g. if the raw labels are "Positive" & "Negative", then the corresponding integers would be 0,1 :param ...
37.886364
165
0.639472
1a3ddba0e3b7d14410832aa10a7f83ea79a15b7e
147
py
Python
rpc4django/models.py
elpaso/rpc4django
d722faf5fb8408c7cd5f7c937b489b8cd5eae2ff
[ "BSD-3-Clause" ]
null
null
null
rpc4django/models.py
elpaso/rpc4django
d722faf5fb8408c7cd5f7c937b489b8cd5eae2ff
[ "BSD-3-Clause" ]
null
null
null
rpc4django/models.py
elpaso/rpc4django
d722faf5fb8408c7cd5f7c937b489b8cd5eae2ff
[ "BSD-3-Clause" ]
null
null
null
''' Models ------ This is currently required for: $> python manage.py test rpc4django to run. see: http://code.djangoproject.com/ticket/7198 '''
13.363636
46
0.693878
1a3e0021d3184dc4b723a83e704013591df656a4
621
py
Python
app/blueprints/product_catalog/__init__.py
DaveCheez/serverless-store-demo
2ab1e9df70cda291e604977b7d4c2078d160d5c3
[ "Apache-2.0" ]
171
2019-01-24T04:17:31.000Z
2022-03-03T09:18:35.000Z
app/blueprints/product_catalog/__init__.py
DaveCheez/serverless-store-demo
2ab1e9df70cda291e604977b7d4c2078d160d5c3
[ "Apache-2.0" ]
11
2019-02-17T09:46:53.000Z
2021-09-14T07:47:48.000Z
app/blueprints/product_catalog/__init__.py
DaveCheez/serverless-store-demo
2ab1e9df70cda291e604977b7d4c2078d160d5c3
[ "Apache-2.0" ]
77
2019-02-02T22:05:05.000Z
2022-02-27T22:56:33.000Z
# Copyright 2018 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, ...
36.529412
74
0.768116
1a3e02e7cf5bbffd98f08b92ba502ed7e25ef572
9,454
py
Python
searchAPI.py
jlegind/GBIF-API-caller
1fa2c457b6763bec0418ae9b68ba6fc0cddbedad
[ "CC0-1.0" ]
null
null
null
searchAPI.py
jlegind/GBIF-API-caller
1fa2c457b6763bec0418ae9b68ba6fc0cddbedad
[ "CC0-1.0" ]
1
2020-11-27T15:25:36.000Z
2020-11-27T15:25:36.000Z
searchAPI.py
jlegind/GBIF-API-caller
1fa2c457b6763bec0418ae9b68ba6fc0cddbedad
[ "CC0-1.0" ]
null
null
null
__author__ = 'jlegind' from urllib import parse, request import requests import json import collections import csv class SearchAPI(object): def __init__(self, url, read_path, write_path, suffix='', separator='\t'): """ :param url: JSON api url :param read_path: File that contains the sear...
42.205357
204
0.562831
1a3e3317054907d1384882a7b4035d0f2593b6ee
1,931
py
Python
libraries/filterbyevalue.py
akaped/blastnet
fef1ba7e5c8b73554a4d4f539b6d4a1400de9024
[ "MIT" ]
1
2020-02-17T09:30:40.000Z
2020-02-17T09:30:40.000Z
libraries/filterbyevalue.py
akaped/blastnet
fef1ba7e5c8b73554a4d4f539b6d4a1400de9024
[ "MIT" ]
1
2020-08-20T08:56:05.000Z
2020-08-20T08:56:05.000Z
libraries/filterbyevalue.py
akaped/blastnet
fef1ba7e5c8b73554a4d4f539b6d4a1400de9024
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 #takes as input a csv or tsv file, and a evalue cutoff, loads the data in pandas and fiters the dataframe by this value. #writes a clean csv/tsv file. If imported as library is able to take as input a pandas df and return a clean pandas df import pandas as pd from sys import argv ...
37.134615
130
0.61419
1a3e3f50b02ec84e5ef6d0ff057c16ba5a38ca22
9,597
py
Python
src/main/python/khaiii/train/sentence.py
thisisiron/khaiii-keras
c739c6f93198ecd9ac959a9b75c9d28d30ecb88b
[ "Apache-2.0" ]
null
null
null
src/main/python/khaiii/train/sentence.py
thisisiron/khaiii-keras
c739c6f93198ecd9ac959a9b75c9d28d30ecb88b
[ "Apache-2.0" ]
null
null
null
src/main/python/khaiii/train/sentence.py
thisisiron/khaiii-keras
c739c6f93198ecd9ac959a9b75c9d28d30ecb88b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ sentence, word, morph, ... __author__ = 'Jamie (jamie.lim@kakaocorp.com)' __copyright__ = 'Copyright (C) 2019-, Kakao Corp. All rights reserved.' """ ########### # imports # ########### import logging import re from typing import List, Tuple MAX_LEN = 64 ######### # types # ######### ...
30.858521
100
0.497135
1a3e922af7abb6cde76e6b163ad0fb67b30c4720
7,260
py
Python
regolith/builders/htmlbuilder.py
MichaelTrumbull/regolith
881f543cfa7bbf80b38ed2b357209c5bc009a6af
[ "CC0-1.0" ]
7
2018-07-20T19:19:23.000Z
2022-02-02T20:48:15.000Z
regolith/builders/htmlbuilder.py
MichaelTrumbull/regolith
881f543cfa7bbf80b38ed2b357209c5bc009a6af
[ "CC0-1.0" ]
822
2017-11-06T21:54:58.000Z
2022-03-31T12:25:41.000Z
regolith/builders/htmlbuilder.py
MichaelTrumbull/regolith
881f543cfa7bbf80b38ed2b357209c5bc009a6af
[ "CC0-1.0" ]
43
2018-01-05T20:35:21.000Z
2022-03-24T00:13:03.000Z
"""Builder for websites.""" import os import shutil from regolith.builders.basebuilder import BuilderBase from regolith.dates import get_dates from regolith.fsclient import _id_key from regolith.sorters import ene_date_key, position_key from regolith.tools import ( all_docs_from_collection, filter_publications...
33.302752
79
0.506061
1a3e97e969e02de468d9a265c05c7c3f89dee061
32,121
py
Python
chemicals/reaction.py
volpatto/chemicals
721904ee17604f5e8685b0e5fff12e0bac567f73
[ "MIT" ]
null
null
null
chemicals/reaction.py
volpatto/chemicals
721904ee17604f5e8685b0e5fff12e0bac567f73
[ "MIT" ]
null
null
null
chemicals/reaction.py
volpatto/chemicals
721904ee17604f5e8685b0e5fff12e0bac567f73
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Chemical Engineering Design Library (ChEDL). Utilities for process modeling. Copyright (C) 2016, 2017, 2018, 2019, 2020 Caleb Bell <Caleb.Andrew.Bell@gmail.com> Copyright (C) 2020 Yoel Rene Cortes-Pena <yoelcortes@gmail.com> Permission is hereby granted, free of charge, to any person obtaini...
32.282412
305
0.626132
1a3ea54cbfa2cdf035d6249485ed4f1b2af36b77
1,854
py
Python
tonalmodel/diatonic_tone_cache.py
dpazel/music_rep
2f9de9b98b13df98f1a0a2120b84714725ce527e
[ "MIT" ]
1
2021-05-06T19:45:54.000Z
2021-05-06T19:45:54.000Z
tonalmodel/diatonic_tone_cache.py
dpazel/music_rep
2f9de9b98b13df98f1a0a2120b84714725ce527e
[ "MIT" ]
null
null
null
tonalmodel/diatonic_tone_cache.py
dpazel/music_rep
2f9de9b98b13df98f1a0a2120b84714725ce527e
[ "MIT" ]
null
null
null
""" File: diatonic_tone_cache.py Purpose: To provide a cachse for DiatonicTone instances. """ from tonalmodel.diatonic_tone import DiatonicTone class DiatonicToneCache(object): """" Cache for all possible DiatonicTone's. This cache is very small, but also provides an object level identity to each tone ...
29.903226
114
0.625674
1a3eb99228b9a87f679bfd2ea193a6024fc577d9
15,458
py
Python
optuna/storages/in_memory.py
medivo/optuna
ffe8e8caaea417935caa883d0d59307c82ce941a
[ "MIT" ]
null
null
null
optuna/storages/in_memory.py
medivo/optuna
ffe8e8caaea417935caa883d0d59307c82ce941a
[ "MIT" ]
null
null
null
optuna/storages/in_memory.py
medivo/optuna
ffe8e8caaea417935caa883d0d59307c82ce941a
[ "MIT" ]
null
null
null
import copy from datetime import datetime import threading import uuid from optuna import distributions # NOQA from optuna.exceptions import DuplicatedStudyError from optuna.storages import base from optuna.storages.base import DEFAULT_STUDY_NAME_PREFIX from optuna.study import StudyDirection from optuna.study import...
34.048458
97
0.616768
1a3ebc25eb62e1ec7ff6d163b086bb94a2d72bc6
3,661
py
Python
skbio/sequence/_rna.py
johnchase/scikit-bio
340e6153b6c93053d923d344e63481860e03731e
[ "BSD-3-Clause" ]
null
null
null
skbio/sequence/_rna.py
johnchase/scikit-bio
340e6153b6c93053d923d344e63481860e03731e
[ "BSD-3-Clause" ]
null
null
null
skbio/sequence/_rna.py
johnchase/scikit-bio
340e6153b6c93053d923d344e63481860e03731e
[ "BSD-3-Clause" ]
null
null
null
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
34.214953
79
0.607484
1a3ec74bf154045a350eb2527f0af167804bdb68
1,773
py
Python
soepy/test/test_regression.py
OpenSourceEconomics/soepy
4ff40292799e248e356d614c1a7141bd35a912c9
[ "MIT" ]
12
2018-12-17T14:46:55.000Z
2022-03-28T21:15:33.000Z
soepy/test/test_regression.py
OpenSourceEconomics/soepy
4ff40292799e248e356d614c1a7141bd35a912c9
[ "MIT" ]
129
2019-02-18T08:49:39.000Z
2022-03-25T16:52:08.000Z
soepy/test/test_regression.py
OpenSourceEconomics/soepy
4ff40292799e248e356d614c1a7141bd35a912c9
[ "MIT" ]
6
2019-02-19T15:23:40.000Z
2022-03-28T21:16:00.000Z
import pickle import random import numpy as np from soepy.simulate.simulate_python import simulate from soepy.soepy_config import TEST_RESOURCES_DIR from development.tests.auxiliary.auxiliary import cleanup def test1(): """This test runs a random selection of test regression tests from our regression test b...
32.833333
83
0.675691
1a3eddab1b2cc326d8444065aa699f1d00d35f7c
1,829
py
Python
dataprep/clean/components/num_scaling/maxabs_scaler.py
Waterpine/dataprep-1
4032acb1d1f2c413d4cb000d17e8ffa611315f9f
[ "MIT" ]
1,229
2019-12-21T02:58:59.000Z
2022-03-30T08:12:33.000Z
dataprep/clean/components/num_scaling/maxabs_scaler.py
Waterpine/dataprep-1
4032acb1d1f2c413d4cb000d17e8ffa611315f9f
[ "MIT" ]
680
2019-12-19T06:09:23.000Z
2022-03-31T04:15:25.000Z
dataprep/clean/components/num_scaling/maxabs_scaler.py
Waterpine/dataprep-1
4032acb1d1f2c413d4cb000d17e8ffa611315f9f
[ "MIT" ]
170
2020-01-08T03:27:26.000Z
2022-03-20T20:42:55.000Z
""" Implement numerical maxabs scaler. """ from typing import Any, Union import dask.dataframe as dd class MaxAbsScaler: """Max Absolute Value Scaler for scaling numerical values Attributes: name Name of scaler maxabs Max absolute value of provided data column """ ...
24.065789
86
0.570804
1a3eed8add94ac6a43085567c42fb2753803d4cc
42,330
py
Python
google/cloud/aiplatform/base.py
Ark-kun/python-aiplatform
193ef7d28ca9c302f86c4c295f4f468e8f02d529
[ "Apache-2.0" ]
2
2021-10-02T02:25:44.000Z
2021-11-17T10:35:01.000Z
google/cloud/aiplatform/base.py
Ark-kun/python-aiplatform
193ef7d28ca9c302f86c4c295f4f468e8f02d529
[ "Apache-2.0" ]
null
null
null
google/cloud/aiplatform/base.py
Ark-kun/python-aiplatform
193ef7d28ca9c302f86c4c295f4f468e8f02d529
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # 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 o...
36.969432
119
0.620836
1a3ef95f33a95bc0e63e77a9c7c1df296580abec
7,100
py
Python
tests/test_exporter/test_export_yml_relationships_properties.py
di-unipi-socc/micro-tosca
5d5c9361b34eeabaed8955ddc62282607672bd81
[ "MIT" ]
null
null
null
tests/test_exporter/test_export_yml_relationships_properties.py
di-unipi-socc/micro-tosca
5d5c9361b34eeabaed8955ddc62282607672bd81
[ "MIT" ]
3
2019-10-02T13:55:39.000Z
2021-06-01T22:55:20.000Z
tests/test_exporter/test_export_yml_relationships_properties.py
di-unipi-socc/microFreshener-core
5d5c9361b34eeabaed8955ddc62282607672bd81
[ "MIT" ]
null
null
null
from unittest import TestCase from microfreshener.core.importer import YMLImporter from microfreshener.core.exporter import YMLExporter from microfreshener.core.model.type import MICROTOSCA_RELATIONSHIPS_INTERACT_WITH from microfreshener.core.importer.ymltype import YML_INTERACTION from microfreshener.core.importer.y...
63.963964
326
0.790423
1a3f1fe464f3bdafbebd6738560b2a72d9c4d3dc
659
py
Python
hard/Distinct Subsequences/solution.py
ashutosh1919/leetcode-problems
65f99a3694549af88c7702b598de1a8ccb7db5fb
[ "MIT" ]
8
2021-08-21T19:10:04.000Z
2022-03-11T14:30:02.000Z
hard/Distinct Subsequences/solution.py
ashutosh1919/leetcode-problems
65f99a3694549af88c7702b598de1a8ccb7db5fb
[ "MIT" ]
null
null
null
hard/Distinct Subsequences/solution.py
ashutosh1919/leetcode-problems
65f99a3694549af88c7702b598de1a8ccb7db5fb
[ "MIT" ]
1
2021-08-24T06:29:02.000Z
2021-08-24T06:29:02.000Z
# Time complexity: O(m*n) # Approach: DP Solution (https://www.geeksforgeeks.org/count-distinct-occurrences-as-a-subsequence/) class Solution: def numDistinct(self, s: str, t: str) -> int: m, n = len(t), len(s) if m>n: return 0 dp = [[0]*(n+1) for i in range(m+1)] for i ...
32.95
100
0.437026
1a3f49aade333f4f0bd51c27565970359284ef6c
10,898
py
Python
wrapup/workers.py
mombasawalafaizan/wrapup
3b593ffa76fa50d7e271d07d70b0c0e92448754f
[ "MIT" ]
null
null
null
wrapup/workers.py
mombasawalafaizan/wrapup
3b593ffa76fa50d7e271d07d70b0c0e92448754f
[ "MIT" ]
null
null
null
wrapup/workers.py
mombasawalafaizan/wrapup
3b593ffa76fa50d7e271d07d70b0c0e92448754f
[ "MIT" ]
null
null
null
import re from pathlib import Path # Local modules try: from .checker import checker except ImportError: from checker import checker try: from .helpers import checkBrackets except ImportError: from helpers import checkBrackets ###################### REGULAR EXPRESSIONS ###################### skip_a...
37.450172
126
0.570013
1a3f5bb7959fd0eac7bd782d6094cdebbbfa491e
351
py
Python
portia_projects/packages/hoaxlyHelpers/indexpipeline.py
hoaxly/hoaxly-spiderbreeder
066ff4072e1e0e7f5d7c495d3048909256127a5f
[ "MIT" ]
null
null
null
portia_projects/packages/hoaxlyHelpers/indexpipeline.py
hoaxly/hoaxly-spiderbreeder
066ff4072e1e0e7f5d7c495d3048909256127a5f
[ "MIT" ]
null
null
null
portia_projects/packages/hoaxlyHelpers/indexpipeline.py
hoaxly/hoaxly-spiderbreeder
066ff4072e1e0e7f5d7c495d3048909256127a5f
[ "MIT" ]
null
null
null
"""contains custom scrapy pipeline.""" class IndexPipeline(object): """This class renames _index field.""" def process_item(self, item, spider): """implements https://doc.scrapy.org/en/latest/topics/item-pipeline.html#process_item""" if item.get('_index'): item['self'] = item.pop...
27
96
0.635328
1a3f7016224c5885b9f23ef6f0a6ccb405d5c14f
3,934
py
Python
frontend/app/streamengine/streamengine/migrations/0001_initial.py
r-t-k/StreamEngine-UI
357cb138c020375e5bad1bbe07931a7a82637c0a
[ "MIT" ]
null
null
null
frontend/app/streamengine/streamengine/migrations/0001_initial.py
r-t-k/StreamEngine-UI
357cb138c020375e5bad1bbe07931a7a82637c0a
[ "MIT" ]
3
2020-07-10T23:13:24.000Z
2020-07-12T21:02:03.000Z
frontend/app/streamengine/streamengine/migrations/0001_initial.py
r-t-k/StreamEngine-UI
357cb138c020375e5bad1bbe07931a7a82637c0a
[ "MIT" ]
null
null
null
# Generated by Django 3.0.7 on 2020-07-02 01:17 from django.conf import settings import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import uuid class Migration(migrations.Migration): initi...
61.46875
329
0.645907
1a3f76e9b233c61012ace9933073b81a881836c7
487
py
Python
acp_calendar/migrations/0003_acpholiday_fiscal_year.py
luiscberrocal/django-acp-calendar
7251d7cbb1ba16983bbc3ba9af6178eb31408bee
[ "BSD-3-Clause" ]
1
2016-10-05T05:17:35.000Z
2016-10-05T05:17:35.000Z
acp_calendar/migrations/0003_acpholiday_fiscal_year.py
luiscberrocal/django-acp-calendar
7251d7cbb1ba16983bbc3ba9af6178eb31408bee
[ "BSD-3-Clause" ]
17
2016-09-30T13:43:20.000Z
2021-06-10T20:44:40.000Z
acp_calendar/migrations/0003_acpholiday_fiscal_year.py
luiscberrocal/django-acp-calendar
7251d7cbb1ba16983bbc3ba9af6178eb31408bee
[ "BSD-3-Clause" ]
6
2016-04-11T14:41:44.000Z
2017-10-20T21:16:39.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-11-27 13:46 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('acp_calendar', '0002_load_holiday_type'), ] operations = [ migrations.AddFiel...
24.35
77
0.634497
1a3f81dbd446dfd24f7826ad5263aecc91694fba
4,165
py
Python
chainer/functions/pooling/unpooling_2d.py
kafi2016/chainer-kafi
6cc4228dc8c1ebd78d9f5347c1e848cc0b77c4d2
[ "MIT" ]
null
null
null
chainer/functions/pooling/unpooling_2d.py
kafi2016/chainer-kafi
6cc4228dc8c1ebd78d9f5347c1e848cc0b77c4d2
[ "MIT" ]
null
null
null
chainer/functions/pooling/unpooling_2d.py
kafi2016/chainer-kafi
6cc4228dc8c1ebd78d9f5347c1e848cc0b77c4d2
[ "MIT" ]
null
null
null
from chainer import cuda from chainer.functions.pooling import pooling_2d from chainer.utils import conv from chainer.utils import type_check class Unpooling2D(pooling_2d.Pooling2D): """Unpooling over a set of 2d planes.""" def __init__(self, ksize, stride=None, pad=0, outsize=None, cover_a...
41.65
79
0.592077
1a3fb36bd7d0184209b49b44c4b40625ece9338c
132
py
Python
pytrackmate/__init__.py
zindy/pytrackmate
a1eda3610b9822d71601c8a69c1b4de5abdc73b4
[ "BSD-3-Clause" ]
5
2020-09-14T13:57:23.000Z
2021-11-30T22:02:32.000Z
pytrackmate/__init__.py
zindy/pytrackmate
a1eda3610b9822d71601c8a69c1b4de5abdc73b4
[ "BSD-3-Clause" ]
3
2020-11-16T21:07:45.000Z
2021-07-02T12:26:28.000Z
pytrackmate/__init__.py
zindy/pytrackmate
a1eda3610b9822d71601c8a69c1b4de5abdc73b4
[ "BSD-3-Clause" ]
5
2020-09-14T12:25:01.000Z
2022-02-14T10:36:19.000Z
from ._trackmate import trackmate_peak_import from ._version import __version__ __all__ = ('trackmate_peak_import', '__version__')
26.4
50
0.825758
1a3fc4075de06fd665906fc8874967ac17ea6a1e
1,470
py
Python
CHAPTER 07 (linked_list)/favorites_list_mtf.py
ahammadshawki8/Data-Structures-Algorithms-in-Python-
fc18b54128cd5bc7639a14999d8f990190b524eb
[ "MIT" ]
null
null
null
CHAPTER 07 (linked_list)/favorites_list_mtf.py
ahammadshawki8/Data-Structures-Algorithms-in-Python-
fc18b54128cd5bc7639a14999d8f990190b524eb
[ "MIT" ]
null
null
null
CHAPTER 07 (linked_list)/favorites_list_mtf.py
ahammadshawki8/Data-Structures-Algorithms-in-Python-
fc18b54128cd5bc7639a14999d8f990190b524eb
[ "MIT" ]
null
null
null
from favourites_list import * from positional_list import * class FavouritesListMTF(FavouritesList): """List of elements odered with move-to-front heuristic.""" # we override _move_up provide move to front semantics. def _move_up(self,p): """Move accesses item at Position p to frony of the list.""...
39.72973
80
0.606803
1a3fd7aa7c1eefadbf8b8f84e1a3171c71a294f4
2,008
py
Python
cinnamon_role/role_set.py
rlrossiter/cinnamon-role
89c818f4803b721973f41018f7997abcfd0580a6
[ "Apache-2.0" ]
2
2016-05-26T17:14:24.000Z
2019-08-13T16:45:25.000Z
cinnamon_role/role_set.py
rlrossiter/cinnamon-role
89c818f4803b721973f41018f7997abcfd0580a6
[ "Apache-2.0" ]
null
null
null
cinnamon_role/role_set.py
rlrossiter/cinnamon-role
89c818f4803b721973f41018f7997abcfd0580a6
[ "Apache-2.0" ]
2
2016-05-26T17:19:24.000Z
2016-05-26T17:19:48.000Z
# Copyright (c) 2016 Ryan Rossiter # # 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...
30.892308
74
0.675797
1a3fda8d0343725b554cae860b7292e2e82233d8
4,426
py
Python
tests/blockchain/MockedBlockchain.py
som-dev/QRL
4d335d0c65c4f9bfad21e3ae918a249eff64b047
[ "MIT" ]
null
null
null
tests/blockchain/MockedBlockchain.py
som-dev/QRL
4d335d0c65c4f9bfad21e3ae918a249eff64b047
[ "MIT" ]
null
null
null
tests/blockchain/MockedBlockchain.py
som-dev/QRL
4d335d0c65c4f9bfad21e3ae918a249eff64b047
[ "MIT" ]
null
null
null
import contextlib import time from math import ceil, log from mock import mock, MagicMock, Mock from pyqryptonight.pyqryptonight import StringToUInt256 from qrl.core import config from qrl.core.Block import Block from qrl.core.ChainManager import ChainManager from qrl.core.DifficultyTracker import DifficultyTracker f...
40.605505
108
0.634885
1a40058ff427d4d68183b8f2660cacb579b26a3d
2,305
py
Python
lewis_emulators/ips/states.py
ISISComputingGroup/EPICS-DeviceEmulator
026c2a14a16bb204ea7527e3765daa182cafa814
[ "BSD-3-Clause" ]
2
2020-10-20T16:49:13.000Z
2021-02-19T10:41:44.000Z
lewis_emulators/ips/states.py
ISISComputingGroup/EPICS-DeviceEmulator
026c2a14a16bb204ea7527e3765daa182cafa814
[ "BSD-3-Clause" ]
9
2019-03-22T15:35:15.000Z
2021-07-28T11:05:43.000Z
lewis_emulators/ips/states.py
ISISComputingGroup/EPICS-DeviceEmulator
026c2a14a16bb204ea7527e3765daa182cafa814
[ "BSD-3-Clause" ]
1
2020-10-21T17:02:44.000Z
2020-10-21T17:02:44.000Z
from lewis.core.statemachine import State from lewis.core import approaches from lewis_emulators.ips.modes import Activity SECS_PER_MIN = 60 class HeaterOnState(State): def in_state(self, dt): device = self._context device.heater_current = approaches.linear( device.heater_current, d...
43.490566
121
0.706725
1a40153cc6c25c720359f9ca228ddc9ea79cdfd6
8,155
py
Python
specimen/plot/colorplots.py
josepablocam/specimen-tools
dec6a20d81239865129dea80bc95c900b34dfd97
[ "MIT" ]
null
null
null
specimen/plot/colorplots.py
josepablocam/specimen-tools
dec6a20d81239865129dea80bc95c900b34dfd97
[ "MIT" ]
5
2018-01-19T08:48:00.000Z
2018-01-22T15:35:16.000Z
specimen/plot/colorplots.py
josepablocam/specimen-tools
dec6a20d81239865129dea80bc95c900b34dfd97
[ "MIT" ]
2
2018-02-22T14:43:46.000Z
2020-02-05T18:44:49.000Z
# Copyright 2018 Jose Cambronero and Phillip Stanley-Marbell # # 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, mod...
39.780488
141
0.643532
1a4037f4971dfa2af7e67acaa60f402d15a3b13c
1,525
py
Python
setup.py
himito/pelican-bibtex
bd2493524d3cf042fff7e87cc6db7fa44c33734d
[ "Unlicense" ]
null
null
null
setup.py
himito/pelican-bibtex
bd2493524d3cf042fff7e87cc6db7fa44c33734d
[ "Unlicense" ]
null
null
null
setup.py
himito/pelican-bibtex
bd2493524d3cf042fff7e87cc6db7fa44c33734d
[ "Unlicense" ]
null
null
null
import pelican_bibtex from distutils.core import setup CLASSIFIERS = """\ Development Status :: 5 - Production/Stable Intended Audience :: Science/Research Intended Audience :: Developers License :: Public Domain Programming Language :: Python Programming Language :: Python :: 3 Topic :: Software Development Operating...
28.773585
80
0.73377
1a404e7d0a4038be2a4a6a5d38b2aa76e88c5594
80,425
py
Python
zappa/zappa.py
enterstudio/Zappa
95230480afb17428726c6054f1b9294ff3f6f85e
[ "MIT" ]
null
null
null
zappa/zappa.py
enterstudio/Zappa
95230480afb17428726c6054f1b9294ff3f6f85e
[ "MIT" ]
null
null
null
zappa/zappa.py
enterstudio/Zappa
95230480afb17428726c6054f1b9294ff3f6f85e
[ "MIT" ]
1
2017-02-26T22:19:07.000Z
2017-02-26T22:19:07.000Z
from __future__ import print_function import boto3 import botocore import glob import json import logging import os import random import requests import shutil import string import subprocess import tarfile import tempfile import time import troposphere import troposphere.apigateway import zipfile from botocore.excep...
38.909047
160
0.575381
1a407520f8d9e317e43b8a8bb0eda87ffb1bbd0b
133
py
Python
Chapter08/ipaddress/ipv6_network.py
yangwawa0323/Learning-Python-Networking-Second-Edition
5460fe4fb6acc5d0df19bf36e52ac09e9a11eb8b
[ "MIT" ]
52
2018-12-17T19:33:06.000Z
2022-03-25T18:14:02.000Z
Chapter08/ipaddress/ipv6_network.py
barretthugh/Learning-Python-Networking-Second-Edition
0f00b8b20c1c85e76754e47113dff8ca9e99d5ca
[ "MIT" ]
null
null
null
Chapter08/ipaddress/ipv6_network.py
barretthugh/Learning-Python-Networking-Second-Edition
0f00b8b20c1c85e76754e47113dff8ca9e99d5ca
[ "MIT" ]
38
2018-12-18T09:08:43.000Z
2022-02-06T02:53:05.000Z
#!/usr/bin/env python3 import ipaddress net6 = ipaddress.ip_network('12:3456:78:90ab:cd:ef01:23:30/125') for ip in net6: print(ip)
19
64
0.729323
1a4075e4236d60f7aba93489b1c33a5741aa7965
14,496
py
Python
src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_actions.py
v-Ajnava/azure-cli
febec631d79bfca151e84267b5b409594bad598e
[ "MIT" ]
null
null
null
src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_actions.py
v-Ajnava/azure-cli
febec631d79bfca151e84267b5b409594bad598e
[ "MIT" ]
3
2021-03-26T00:48:20.000Z
2022-03-29T22:05:39.000Z
src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/tests/test_vm_actions.py
v-Ajnava/azure-cli
febec631d79bfca151e84267b5b409594bad598e
[ "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. # --------------------------------------------------------------------...
47.841584
173
0.65487
1a4079f71608c999bf5402623ade98ffa797ee78
2,324
py
Python
logic.py
EpicEric/rpcar-controller
9ab8afa30b470000f9b9a8ec5e1182f656fc8f16
[ "MIT" ]
null
null
null
logic.py
EpicEric/rpcar-controller
9ab8afa30b470000f9b9a8ec5e1182f656fc8f16
[ "MIT" ]
null
null
null
logic.py
EpicEric/rpcar-controller
9ab8afa30b470000f9b9a8ec5e1182f656fc8f16
[ "MIT" ]
null
null
null
from math import acos, cos, hypot, pi from models.event import * HALT_ENGINE_INPUT = (0, EngineDirection.FORWARD) HALT_ENGINE_EVENT = EngineInput(HALT_ENGINE_INPUT, HALT_ENGINE_INPUT) def is_on_right_half(x, y): return x >= 0 def is_on_left_half(x, y): return not is_on_right_half(x, y) def is_on_upper_h...
25.822222
88
0.67599
1a408c0a660ce638e9e1e26de29135c4193904e9
24,845
py
Python
homeassistant/components/evohome/__init__.py
mengwangk/home-assistant
8f7e2ac41ffc969a825329e866c1e27d0e823bb0
[ "Apache-2.0" ]
4
2016-12-23T10:36:36.000Z
2021-04-22T12:38:16.000Z
homeassistant/components/evohome/__init__.py
mengwangk/home-assistant
8f7e2ac41ffc969a825329e866c1e27d0e823bb0
[ "Apache-2.0" ]
9
2022-01-27T06:32:10.000Z
2022-03-31T07:07:51.000Z
homeassistant/components/evohome/__init__.py
mengwangk/home-assistant
8f7e2ac41ffc969a825329e866c1e27d0e823bb0
[ "Apache-2.0" ]
1
2020-02-17T07:44:24.000Z
2020-02-17T07:44:24.000Z
"""Support for (EMEA/EU-based) Honeywell TCC climate systems. Such systems include evohome, Round Thermostat, and others. """ from datetime import datetime as dt, timedelta import logging import re from typing import Any, Dict, Optional, Tuple import aiohttp.client_exceptions import evohomeasync import evohomeasync2 ...
35.955137
88
0.635299
1a40aaf46f55a0ad0bb2830429e2ee4afc0d2a5c
103
py
Python
mayiutils/design_pattern/observer_pattern/__init__.py
mayi140611/mayiutils_n1
22a1178fc5d86df53fa9769145c64ef4aa8ffeff
[ "Apache-2.0" ]
null
null
null
mayiutils/design_pattern/observer_pattern/__init__.py
mayi140611/mayiutils_n1
22a1178fc5d86df53fa9769145c64ef4aa8ffeff
[ "Apache-2.0" ]
null
null
null
mayiutils/design_pattern/observer_pattern/__init__.py
mayi140611/mayiutils_n1
22a1178fc5d86df53fa9769145c64ef4aa8ffeff
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # encoding: utf-8 """ @author: Ian @file: __init__.py.py @time: 2019-09-16 16:50 """
12.875
23
0.631068
1a40b9bcd7a60e5f00693e763691722793874a65
15,626
py
Python
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_04_01/aio/operations/_object_replication_policies_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-03-09T08:59:13.000Z
2022-03-09T08:59:13.000Z
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_04_01/aio/operations/_object_replication_policies_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_04_01/aio/operations/_object_replication_policies_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-03-04T06:21:56.000Z
2022-03-04T06:21:56.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
49.138365
237
0.694036
1a40d9427c5a2d0bb22a328e2999cbd85b27b377
221
py
Python
music_bg/img_processors/noop.py
music-bg/music_bg
5b79eacb32506b6eda5861df4b5f71b611c5dfa3
[ "MIT" ]
3
2021-09-17T12:27:46.000Z
2021-09-18T19:03:01.000Z
music_bg/img_processors/noop.py
music-bg/music_bg
5b79eacb32506b6eda5861df4b5f71b611c5dfa3
[ "MIT" ]
null
null
null
music_bg/img_processors/noop.py
music-bg/music_bg
5b79eacb32506b6eda5861df4b5f71b611c5dfa3
[ "MIT" ]
null
null
null
from PIL.Image import Image def noop(image: Image) -> Image: """ Dummy processor. It does nothing and returns the same image. :param image: input image :return: same image """ return image
15.785714
47
0.633484
1a410235f7dab6c28c6304ea5e17ccbf722e23ad
3,831
py
Python
tests/test_conv_jacket.py
CalebBell/ht
3b95f9cfff30c8c0272443d523a484977eedbf0d
[ "MIT" ]
118
2016-01-04T07:46:23.000Z
2022-03-29T14:12:59.000Z
tests/test_conv_jacket.py
CalebBell/ht
3b95f9cfff30c8c0272443d523a484977eedbf0d
[ "MIT" ]
4
2017-06-27T08:01:02.000Z
2020-10-06T14:18:46.000Z
tests/test_conv_jacket.py
CalebBell/ht
3b95f9cfff30c8c0272443d523a484977eedbf0d
[ "MIT" ]
22
2016-04-20T06:17:35.000Z
2022-03-07T01:40:25.000Z
# -*- coding: utf-8 -*- '''Chemical Engineering Design Library (ChEDL). Utilities for process modeling. Copyright (C) 2016, 2017, 2018, 2019, Caleb Bell <Caleb.Andrew.Bell@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "S...
51.08
203
0.699034
1a41083655fc292a423e854e37abc7138844b0eb
3,462
py
Python
benchmarking/cormorant/train_lep.py
bfabiandev/atom3d
b2499ff743be2e851c286cabf64696682abffa44
[ "MIT" ]
null
null
null
benchmarking/cormorant/train_lep.py
bfabiandev/atom3d
b2499ff743be2e851c286cabf64696682abffa44
[ "MIT" ]
null
null
null
benchmarking/cormorant/train_lep.py
bfabiandev/atom3d
b2499ff743be2e851c286cabf64696682abffa44
[ "MIT" ]
null
null
null
# # Cormorant training script for the residue deletion dataset # import logging import torch from cormorant.data.collate import collate_activity from cormorant.data.utils import initialize_datasets from cormorant.engine import Engine from cormorant.engine import init_argparse, init_file_paths, init_logger, init_cuda ...
39.340909
149
0.642981
1a414c94e319a92bd100edc1dedcb914a0d7f3b6
13,896
py
Python
improver_tests/acceptance/acceptance.py
NMC-DAVE/improver
b56379f8bd236ddf2bab31ef64af8345de856cc1
[ "BSD-3-Clause" ]
1
2021-08-02T21:17:18.000Z
2021-08-02T21:17:18.000Z
improver_tests/acceptance/acceptance.py
NMC-DAVE/improver
b56379f8bd236ddf2bab31ef64af8345de856cc1
[ "BSD-3-Clause" ]
null
null
null
improver_tests/acceptance/acceptance.py
NMC-DAVE/improver
b56379f8bd236ddf2bab31ef64af8345de856cc1
[ "BSD-3-Clause" ]
1
2021-08-02T21:17:19.000Z
2021-08-02T21:17:19.000Z
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2017-2021 Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions a...
34.653367
87
0.691638
1a41801f3c42c20610e5ecbd4e91bfc1d217698f
707
py
Python
tests/finance/test_convert_stock.py
fireddd/pyjanitor
e76db2c619527e9f0b63d9aefcde11e3225937b8
[ "MIT" ]
null
null
null
tests/finance/test_convert_stock.py
fireddd/pyjanitor
e76db2c619527e9f0b63d9aefcde11e3225937b8
[ "MIT" ]
null
null
null
tests/finance/test_convert_stock.py
fireddd/pyjanitor
e76db2c619527e9f0b63d9aefcde11e3225937b8
[ "MIT" ]
null
null
null
from janitor.finance import get_symbol import pytest @pytest.mark.xfail(reason="Flaky because it depends on internet connectivity.") def test_convert_stock(): """ Tests get_symbol function, get_symbol should return appropriate string corresponding to abbreviation. This string will be a company's f...
28.28
79
0.700141
1a41a2fcf7fc13dabf68be8d82f740f2ba06de75
14,062
py
Python
scripts/gp_utils/germ_pred_util.py
grimmlab/GerminationPrediction
7421705918a17f6ebf2ee5c3fefb46856e2e0a42
[ "MIT" ]
5
2021-06-14T08:33:01.000Z
2022-03-23T03:32:31.000Z
scripts/gp_utils/germ_pred_util.py
grimmlab/GerminationPrediction
7421705918a17f6ebf2ee5c3fefb46856e2e0a42
[ "MIT" ]
null
null
null
scripts/gp_utils/germ_pred_util.py
grimmlab/GerminationPrediction
7421705918a17f6ebf2ee5c3fefb46856e2e0a42
[ "MIT" ]
2
2021-03-29T13:23:18.000Z
2021-08-18T14:03:17.000Z
import os import io import sys import csv import random import hashlib import pandas as pd import numpy as np import tensorflow as tf from PIL import Image import xml.etree.ElementTree as ET from matplotlib import pyplot as plt from object_detection.utils import label_map_util from object_detection.utils import visuali...
47.0301
166
0.718888
1a41c11362bbdb4959192e76f12879084f24c8e5
3,136
py
Python
examples/src/python/example/pants_publish_plugin/extra_test_jar_example.py
ghthor/pants
450de702414f87f563081ddefaefd8a554de07a3
[ "Apache-2.0" ]
null
null
null
examples/src/python/example/pants_publish_plugin/extra_test_jar_example.py
ghthor/pants
450de702414f87f563081ddefaefd8a554de07a3
[ "Apache-2.0" ]
null
null
null
examples/src/python/example/pants_publish_plugin/extra_test_jar_example.py
ghthor/pants
450de702414f87f563081ddefaefd8a554de07a3
[ "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, print_function, unicode_literals import os from pants.backend.jvm.targets.java_library import JavaLibrary from pants.back...
46.117647
101
0.722895
1a41f2b3073f3fb9ece0b6e1446078a40a1cdbbc
344
py
Python
high/iterateDemo.py
sdyz5210/python
78f9999f94d92d9ca7fde6f18acec7d3abd422ef
[ "BSD-3-Clause" ]
null
null
null
high/iterateDemo.py
sdyz5210/python
78f9999f94d92d9ca7fde6f18acec7d3abd422ef
[ "BSD-3-Clause" ]
null
null
null
high/iterateDemo.py
sdyz5210/python
78f9999f94d92d9ca7fde6f18acec7d3abd422ef
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- #for 循环迭代list l=range(10) for x in l: print x #for 循环dict 默认情况dict迭代的是key d = {'a': 1, 'b': 2, 'c': 3} for key in d: print key #for 循环dict 迭代value for value in d.itervalues(): print value #for 循环dict 迭代key,value for k, v in d.iteritems(): print k,'--',v #for 循环迭代字符串 fo...
14.956522
28
0.636628
1a41f7c2c67cfd9a3c7e5f8b34d083e92bc4cdf5
13,918
py
Python
tests/h/activity/bucketing_test.py
Manuelinux/kubeh
a549f0d1c09619843290f9b78bce7668ed90853a
[ "BSD-2-Clause" ]
null
null
null
tests/h/activity/bucketing_test.py
Manuelinux/kubeh
a549f0d1c09619843290f9b78bce7668ed90853a
[ "BSD-2-Clause" ]
4
2020-03-24T17:38:24.000Z
2022-03-02T05:45:01.000Z
tests/h/activity/bucketing_test.py
Manuelinux/kubeh
a549f0d1c09619843290f9b78bce7668ed90853a
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from h._compat import xrange from unittest.mock import Mock import datetime import pytest from h.activity import bucketing from tests.common import factories UTCNOW = datetime.datetime(year=1970, month=2, day=21, hour=19, minute=30) FIVE_MINS_AGO = ...
34.53598
88
0.631484
1a421f336125d9bdbb1d0b3f7032dc56152ddc2b
34,384
py
Python
sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_distributed_availability_groups_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-03-09T08:59:13.000Z
2022-03-09T08:59:13.000Z
sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_distributed_availability_groups_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/sql/azure-mgmt-sql/azure/mgmt/sql/operations/_distributed_availability_groups_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "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 may ...
46.780952
262
0.696225
1a423ce2b066a950fbb7133724f1fe4db3de8c91
9,568
py
Python
sunpy/net/base_client.py
johan12345/sunpy
56e1ab0c2c992f99e0fe3e6bff468b731a51228c
[ "BSD-2-Clause" ]
null
null
null
sunpy/net/base_client.py
johan12345/sunpy
56e1ab0c2c992f99e0fe3e6bff468b731a51228c
[ "BSD-2-Clause" ]
null
null
null
sunpy/net/base_client.py
johan12345/sunpy
56e1ab0c2c992f99e0fe3e6bff468b731a51228c
[ "BSD-2-Clause" ]
null
null
null
import importlib from abc import ABC, abstractmethod from textwrap import dedent from collections.abc import Sequence from astropy.table import Table from sunpy.util.util import get_width __all__ = ['BaseQueryResponse', 'BaseClient'] class BaseQueryResponse(Sequence): """ An Abstract Base Class for results...
33.107266
108
0.621551
1a424737d103507981933a854b8c3e4b91eaf688
220
py
Python
TFLearn_modules/__init__.py
robertstreeck/TFLearn
4547cf6a916c9278b108e7fbb93ad1461a4bdcbf
[ "Apache-2.0" ]
null
null
null
TFLearn_modules/__init__.py
robertstreeck/TFLearn
4547cf6a916c9278b108e7fbb93ad1461a4bdcbf
[ "Apache-2.0" ]
null
null
null
TFLearn_modules/__init__.py
robertstreeck/TFLearn
4547cf6a916c9278b108e7fbb93ad1461a4bdcbf
[ "Apache-2.0" ]
null
null
null
from . import data_checking from . import plotting_callbacks from . import tfbinding_generator from . import additional_metrics from . import bam_dataset_generator from . import MACS_Import from . import MACS_dataset_gen
31.428571
35
0.845455
1a4254ed21031073d7d1645544435da52197ba06
7,635
py
Python
infra/libs/service_utils/test/_daemon_nix_test.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
2
2021-04-13T21:22:18.000Z
2021-09-07T02:11:57.000Z
infra/libs/service_utils/test/_daemon_nix_test.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
21
2020-09-06T02:41:05.000Z
2022-03-02T04:40:01.000Z
infra/libs/service_utils/test/_daemon_nix_test.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import contextlib import collections import errno import os import sys import unittest try: import fcntl except ImportError: # pragma: no cover # Doesn...
32.079832
80
0.668893
1a4269bdc044c18e3672c1a71779a35722b324c6
8,361
py
Python
docs/conf.py
superclass-FSIS/test
9bb2844c77704a609291135b75e94a794f235aa0
[ "Apache-2.0" ]
196
2020-03-10T03:34:47.000Z
2022-03-29T11:40:16.000Z
docs/conf.py
superclass-FSIS/test
9bb2844c77704a609291135b75e94a794f235aa0
[ "Apache-2.0" ]
19
2020-03-11T05:32:28.000Z
2022-03-12T00:18:42.000Z
docs/conf.py
superclass-FSIS/test
9bb2844c77704a609291135b75e94a794f235aa0
[ "Apache-2.0" ]
19
2020-03-12T02:41:04.000Z
2021-12-29T11:17:08.000Z
# -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # flake8: noqa # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/maste...
28.342373
99
0.644421
1a42b21afd4f0cf385f7d0e96c76e7a6322af481
8,481
py
Python
src/util.py
ttaoREtw/semi-tts
46750fc68d1547e82bda9341f5029595ded984c8
[ "MIT" ]
40
2020-07-22T04:49:43.000Z
2021-12-19T15:11:30.000Z
src/util.py
ttaoREtw/semi-tts
46750fc68d1547e82bda9341f5029595ded984c8
[ "MIT" ]
1
2021-12-13T02:39:29.000Z
2021-12-13T02:39:29.000Z
src/util.py
ttaoREtw/semi-tts
46750fc68d1547e82bda9341f5029595ded984c8
[ "MIT" ]
4
2020-08-16T08:43:40.000Z
2021-02-19T09:53:26.000Z
import math import time import torch import numpy as np import pandas as pd from torch import nn import editdistance as ed import soundfile as sf import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt #PRESERVE_INDICES = len(['<pad>', '<space>']) PRESERVE_INDICES = len(['<pad>', '<space>', '<eos>']) ...
33.654762
135
0.610541
1a42c49c8a474a749573ec333afdc5f0f2b963e5
170
py
Python
constants.py
tgphelps/bj-python
0ef579bc7ab954b9bad5e2f5c061cda89aaf58bf
[ "MIT" ]
null
null
null
constants.py
tgphelps/bj-python
0ef579bc7ab954b9bad5e2f5c061cda89aaf58bf
[ "MIT" ]
null
null
null
constants.py
tgphelps/bj-python
0ef579bc7ab954b9bad5e2f5c061cda89aaf58bf
[ "MIT" ]
null
null
null
# Dict key codes HIT_HARD = 'hh' HIT_SOFT = 'hs' SPLIT = 'sp' SURRENDER = 'su' DBL_HARD = 'dh' DBL_SOFT = 'ds' MAX_TRUE_COUNT = 15 # max true count that we will track
15.454545
56
0.664706
1a42db5a8826bbfc973b8ca53344ab3e12d0cbb4
2,819
py
Python
dagtests/plotting.py
jacksonloper/dagtests
37bd0c3c3a94a84bf3b6a27d4de45f4b8d3415ab
[ "MIT" ]
null
null
null
dagtests/plotting.py
jacksonloper/dagtests
37bd0c3c3a94a84bf3b6a27d4de45f4b8d3415ab
[ "MIT" ]
null
null
null
dagtests/plotting.py
jacksonloper/dagtests
37bd0c3c3a94a84bf3b6a27d4de45f4b8d3415ab
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pylab as plt class AnimAcross: ''' Helper class for making subplots, useful if you're not quite sure how many subplots you'll be needing ''' def __init__(self,ratio=.8,sz=4,columns=None,aa=None,asp=1.0): self.aa=aa self.axes_list=[] s...
29.061856
113
0.501242
1a42e72f5b757a9f8363b75da7ba67adf9a73efa
373
py
Python
Experiments/Heuristic_Concentration_Around_Plan/json/jsonExplorer.py
Szhang577/Sensitivity_To_Dual_Graph
a52e689422dc5da59437d22e18e7514119a66ee3
[ "MIT" ]
1
2020-11-05T23:43:04.000Z
2020-11-05T23:43:04.000Z
Experiments/Heuristic_Concentration_Around_Plan/json/jsonExplorer.py
Szhang577/Sensitivity_To_Dual_Graph
a52e689422dc5da59437d22e18e7514119a66ee3
[ "MIT" ]
null
null
null
Experiments/Heuristic_Concentration_Around_Plan/json/jsonExplorer.py
Szhang577/Sensitivity_To_Dual_Graph
a52e689422dc5da59437d22e18e7514119a66ee3
[ "MIT" ]
5
2020-09-24T23:27:28.000Z
2020-10-19T02:03:14.000Z
import json import sys # Loads JSON config file if len(sys.argv) != 2: print("Provide single filename") sys.exit() else: configFileName = sys.argv[1] with open(configFileName, 'r') as json_file: try: global file file = json.load(json_file) except: print("Unable to load JSON...
19.631579
44
0.624665
1a43244ec371981c7cda4e47bfa173511bd44436
9,685
py
Python
src/morpheus/composition/SequentialComposition.py
eliavw/morpheus
01c6d15416188254cfdcc7fe9461069cbf8dbe63
[ "MIT" ]
null
null
null
src/morpheus/composition/SequentialComposition.py
eliavw/morpheus
01c6d15416188254cfdcc7fe9461069cbf8dbe63
[ "MIT" ]
null
null
null
src/morpheus/composition/SequentialComposition.py
eliavw/morpheus
01c6d15416188254cfdcc7fe9461069cbf8dbe63
[ "MIT" ]
null
null
null
import numpy as np from .Composition import Composition from morpheus.utils import debug_print VERBOSITY = 1 class SequentialComposition(Composition): def __init__(self): super().__init__() self.all_desc_ids = np.array([]) return def predict(self, X, **kwargs): n_rows, n_a...
36.003717
86
0.534538
1a4328ac9c9bf973b68eff9cfc06247a54f76afd
3,293
py
Python
mmvec/q2/_method.py
mstrazar/mmvec
199532f7ecdc63bac3a9892822ac0b8d10426d00
[ "BSD-3-Clause" ]
1
2019-03-03T03:06:39.000Z
2019-03-03T03:06:39.000Z
mmvec/q2/_method.py
mstrazar/mmvec
199532f7ecdc63bac3a9892822ac0b8d10426d00
[ "BSD-3-Clause" ]
4
2019-02-26T22:14:47.000Z
2019-08-19T19:45:33.000Z
mmvec/q2/_method.py
mstrazar/mmvec
199532f7ecdc63bac3a9892822ac0b8d10426d00
[ "BSD-3-Clause" ]
null
null
null
import biom import pandas as pd import numpy as np import tensorflow as tf from skbio import OrdinationResults from qiime2.plugin import Metadata from mmvec.multimodal import MMvec from mmvec.util import split_tables from scipy.sparse import coo_matrix from scipy.sparse.linalg import svds def paired_omics(microbes: b...
37.420455
77
0.627391
1a4356cfffd1efdf4f227c78f14906447f700196
234
py
Python
Console/Python/MisionTic/Excercises/test19.py
DavidsDvm/Dev_Exercises
59e12913e987e710558044e27c07b192576167f3
[ "Unlicense", "MIT" ]
1
2021-08-30T21:06:52.000Z
2021-08-30T21:06:52.000Z
Console/Python/MisionTic/Excercises/test19.py
DavidsDvm/Dev_Exercises
59e12913e987e710558044e27c07b192576167f3
[ "Unlicense", "MIT" ]
1
2021-05-18T05:42:02.000Z
2021-05-18T05:42:02.000Z
Console/Python/MisionTic/Excercises/test19.py
DavidsDvm/Dev_Exercises
59e12913e987e710558044e27c07b192576167f3
[ "Unlicense", "MIT" ]
null
null
null
""" Creacion de un contador que cuente los multiplos de 6 hasta 100 """ num = 0 for i in range(6, 100, 6): num += 1 print("El multiplo es: {} Y van {} en total".format(i,num)) print ("hay",num,"Multiplos de 6 hasta 100")
23.4
67
0.619658
1a435779443bd32cdc57f9175e71e88a23f951a4
571
py
Python
src/nudge/views.py
cfpb/django-nudge
16fbb7ec75620582b486c7a4f6df551083cddcfa
[ "CC0-1.0" ]
8
2015-01-05T21:07:31.000Z
2018-05-19T22:13:08.000Z
src/nudge/views.py
cfpb/django-nudge
16fbb7ec75620582b486c7a4f6df551083cddcfa
[ "CC0-1.0" ]
20
2017-04-13T16:23:46.000Z
2017-04-13T16:23:47.000Z
src/nudge/views.py
cfpb/django-nudge
16fbb7ec75620582b486c7a4f6df551083cddcfa
[ "CC0-1.0" ]
9
2015-09-30T06:19:51.000Z
2021-02-21T10:42:05.000Z
import json from django.conf import settings from django.db import transaction from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from nudge import server @csrf_exempt @transaction.commit_on_success def batch(request): key = settings.NUDGE_KEY.decode('hex') result = serve...
27.190476
81
0.772329
1a43a3cd0d6ea1556be2e5c4cba7aabcfde895bf
110,761
py
Python
tencentcloud/tdmq/v20200217/tdmq_client.py
lleiyyang/tencentcloud-sdk-python
e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b
[ "Apache-2.0" ]
null
null
null
tencentcloud/tdmq/v20200217/tdmq_client.py
lleiyyang/tencentcloud-sdk-python
e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b
[ "Apache-2.0" ]
null
null
null
tencentcloud/tdmq/v20200217/tdmq_client.py
lleiyyang/tencentcloud-sdk-python
e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf8 -*- # Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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...
41.205729
240
0.590786
1a43a771f27e7e258952cf42b867cc0d5febac4f
2,526
py
Python
sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_04_01/models/replication.py
pjquirk/azure-sdk-for-python
cbf02ec4f177b96eae1dbbba87c34c2c93880150
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_04_01/models/replication.py
pjquirk/azure-sdk-for-python
cbf02ec4f177b96eae1dbbba87c34c2c93880150
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_04_01/models/replication.py
xiafu-msft/azure-sdk-for-python
4d9560cfd519ee60667f3cc2f5295a58c18625db
[ "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 ...
37.701493
85
0.60768
1a43a8cdcbbfc1ecd17eefe158bf686392183be3
1,177
py
Python
alipay/aop/api/domain/SuccessDeliveryConfig.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/SuccessDeliveryConfig.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/SuccessDeliveryConfig.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.DeliveryConfig import DeliveryConfig class SuccessDeliveryConfig(object): def __init__(self): self._delivery_config = None @property def delivery_config(self...
26.155556
81
0.64401
1a43b5d0b8d536905daeb27a9f3cfe053837545e
3,697
py
Python
tests/test_s1scenes.py
Scartography/OpenSarToolkit
53c19e1c6c21260e73518eb9106ce7305539a83d
[ "MIT" ]
null
null
null
tests/test_s1scenes.py
Scartography/OpenSarToolkit
53c19e1c6c21260e73518eb9106ce7305539a83d
[ "MIT" ]
null
null
null
tests/test_s1scenes.py
Scartography/OpenSarToolkit
53c19e1c6c21260e73518eb9106ce7305539a83d
[ "MIT" ]
null
null
null
import os import pytest from datetime import timedelta from tempfile import TemporaryDirectory from shapely.geometry import box from ost.s1_core.s1scenes import Sentinel1Scenes as S1Scenes from ost.s1_core.s1scene import Sentinel1Scene as S1Scene def test_s1_scenes(s1_slc_master, s1_slc_slave, ...
38.113402
78
0.5472
1a43ba67475855fe716da039b50f784b45e30626
9,051
py
Python
wagtail/documents/views/chooser.py
einsxiao/ovowagtail
7b2f49252d71c9f67835149d0ae2e3a9ee33452d
[ "BSD-3-Clause" ]
1
2019-06-07T03:44:34.000Z
2019-06-07T03:44:34.000Z
wagtail/documents/views/chooser.py
einsxiao/ovowagtail
7b2f49252d71c9f67835149d0ae2e3a9ee33452d
[ "BSD-3-Clause" ]
null
null
null
wagtail/documents/views/chooser.py
einsxiao/ovowagtail
7b2f49252d71c9f67835149d0ae2e3a9ee33452d
[ "BSD-3-Clause" ]
null
null
null
import json from django.shortcuts import get_object_or_404, render from django.urls import reverse from wagtail.admin.forms.search import SearchForm from wagtail.admin.modal_workflow import render_modal_workflow from wagtail.admin.utils import PermissionPolicyChecker from wagtail.core import hooks from wagtail.core.m...
33.032847
119
0.646006
1a43c21abff9067c649a714496986b157c6cb357
16,538
py
Python
csv_permissions/permissions.py
AllianceSoftware/django-csvpermissions
4f0137bc579b383b5378b0cf2ccdf5e2d4f40f85
[ "BSD-2-Clause" ]
1
2021-09-30T03:01:22.000Z
2021-09-30T03:01:22.000Z
csv_permissions/permissions.py
AllianceSoftware/django-csvpermissions
4f0137bc579b383b5378b0cf2ccdf5e2d4f40f85
[ "BSD-2-Clause" ]
9
2021-02-09T22:50:23.000Z
2021-11-22T17:08:13.000Z
csv_permissions/permissions.py
AllianceSoftware/django-csvpermissions
4f0137bc579b383b5378b0cf2ccdf5e2d4f40f85
[ "BSD-2-Clause" ]
null
null
null
import csv from functools import lru_cache from pathlib import Path from typing import Dict from typing import Iterable from typing import Optional from typing import Set from typing import Tuple from typing import Type from typing import Union import warnings from django.apps import AppConfig from django.apps import ...
44.337802
134
0.655158
1a43c7c61095ef6b028fda932541ea966dd5518b
4,142
py
Python
tests/test_stateful.py
marcelroed/equinox
3804a8d60217bde685bee0a893a7bd55b1e63c26
[ "Apache-2.0" ]
null
null
null
tests/test_stateful.py
marcelroed/equinox
3804a8d60217bde685bee0a893a7bd55b1e63c26
[ "Apache-2.0" ]
null
null
null
tests/test_stateful.py
marcelroed/equinox
3804a8d60217bde685bee0a893a7bd55b1e63c26
[ "Apache-2.0" ]
null
null
null
import functools as ft import jax import jax.numpy as jnp import pytest import equinox as eqx def test_basic(): a = [jnp.array(3), jnp.array(2)] b = [jnp.array(4), jnp.array(5)] index = eqx.experimental.StateIndex() eqx.experimental.set_state(index, a) assert eqx.experimental.get_state(index, b)...
25.726708
67
0.65041
1a43dc6f52c9ef04e265bcd9ba666008d0c7281f
1,936
py
Python
python/utils/tiff_sum_frames.py
qnano/simflux
4f149d4e6c997954ac862cc5a7a404855b2a0be9
[ "MIT" ]
2
2019-12-13T16:24:12.000Z
2021-03-13T04:02:51.000Z
python/utils/tiff_sum_frames.py
qnano/simflux
4f149d4e6c997954ac862cc5a7a404855b2a0be9
[ "MIT" ]
1
2021-01-25T13:32:43.000Z
2021-01-26T06:03:19.000Z
python/utils/tiff_sum_frames.py
qnano/simflux
4f149d4e6c997954ac862cc5a7a404855b2a0be9
[ "MIT" ]
null
null
null
import tifffile import tqdm import os import numpy as np import sys import fnmatch def scandir(path, pat, cb): for root, dirs, files in os.walk(path): head, tail = os.path.split(root) for file in files: if fnmatch.fnmatch(file, pat): fn = os.path.join(root, file) ...
30.25
117
0.557335
1a43ebe6d2d9faa1a4c847f4e6a87a302a06d858
1,258
py
Python
docs/conf.py
yukunchen113/disentangle
91ddc19c52d9b910c40ff3bf5b4ed39002de95e6
[ "MIT" ]
null
null
null
docs/conf.py
yukunchen113/disentangle
91ddc19c52d9b910c40ff3bf5b4ed39002de95e6
[ "MIT" ]
1
2021-01-18T04:41:23.000Z
2021-01-18T04:41:23.000Z
docs/conf.py
yukunchen113/disentangle
91ddc19c52d9b910c40ff3bf5b4ed39002de95e6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import sphinx_py3doc_enhanced_theme extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.coverage', 'sphinx.ext.doctest', 'sphinx.ext.extlinks', 'sphinx.ext.ifconfig', 'sphinx.ext.napoleon', 'sphinx.e...
26.208333
76
0.696343
1a43f22468e8e93068f9e2480fa3b902f8aaa998
551
py
Python
digits-linear-regression.py
WuzipengYL/2-scikit-learn-intro
afd1011d2fad77e85724f9d12591bc3574d3c51e
[ "Apache-2.0" ]
null
null
null
digits-linear-regression.py
WuzipengYL/2-scikit-learn-intro
afd1011d2fad77e85724f9d12591bc3574d3c51e
[ "Apache-2.0" ]
null
null
null
digits-linear-regression.py
WuzipengYL/2-scikit-learn-intro
afd1011d2fad77e85724f9d12591bc3574d3c51e
[ "Apache-2.0" ]
null
null
null
## 这里我们用逻辑回归来判断手写数字的扫描图像来判断数字是多少。 from sklearn import datasets from sklearn.linear_model import LogisticRegression ## 导入数据 digits = datasets.load_digits() X_digits = digits.data y_digits = digits.target n_samples = len(X_digits) ## 拆分训练集和测试集 X_train = X_digits[:.9 * n_samples] y_train = y_digits[:.9 * n_samples] X...
18.366667
51
0.749546
1a4403ff4caf4c9d89ad9b0329f39d6fc9fa968e
7,466
py
Python
src/build/lacros/test_runner_test.py
lazymartin/naiveproxy
696e8714278e85e67e56a2eaea11f26c53116f0c
[ "BSD-3-Clause" ]
null
null
null
src/build/lacros/test_runner_test.py
lazymartin/naiveproxy
696e8714278e85e67e56a2eaea11f26c53116f0c
[ "BSD-3-Clause" ]
null
null
null
src/build/lacros/test_runner_test.py
lazymartin/naiveproxy
696e8714278e85e67e56a2eaea11f26c53116f0c
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env vpython # Copyright 2020 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import os import subprocess import sys import tempfile import time import unittest import mock from parameterized impo...
38.885417
80
0.660193
1a44172f392f2a4097b2ef6ba3e0f3908d3a2803
4,613
py
Python
py/highscore.py
triffid/kiki
b64b8524063c149a5cc9118f48d80afec1d8a942
[ "Unlicense" ]
null
null
null
py/highscore.py
triffid/kiki
b64b8524063c149a5cc9118f48d80afec1d8a942
[ "Unlicense" ]
null
null
null
py/highscore.py
triffid/kiki
b64b8524063c149a5cc9118f48d80afec1d8a942
[ "Unlicense" ]
null
null
null
if Controller.isDebugVersion(): print("[highscore.py]") from configparser import ConfigParser import os import getpass # ................................................................................................................. # KIKI HIGHSCORE # ...................
40.823009
115
0.480165
1a441dadb3bbc5c49e085d18a9b5d89759401a33
6,337
py
Python
mapproxy/test/unit/test_featureinfo.py
kaiCu/mapproxy
9b28f9ca1286e686b8f2188dd52ce56b607427a7
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
mapproxy/test/unit/test_featureinfo.py
kaiCu/mapproxy
9b28f9ca1286e686b8f2188dd52ce56b607427a7
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
mapproxy/test/unit/test_featureinfo.py
kaiCu/mapproxy
9b28f9ca1286e686b8f2188dd52ce56b607427a7
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# This file is part of the MapProxy project. # Copyright (C) 2011 Omniscale <http://omniscale.de> # # 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...
35.205556
101
0.59555
1a441fdd331755eee865484794aa75c2c9f48db3
30,909
py
Python
floris/simulation/wake_vortex/VortexCylinderSkewed.py
tangsmall/floris
51e4e15c6a9b0c8f55bf01772111799803acf224
[ "Apache-2.0" ]
null
null
null
floris/simulation/wake_vortex/VortexCylinderSkewed.py
tangsmall/floris
51e4e15c6a9b0c8f55bf01772111799803acf224
[ "Apache-2.0" ]
null
null
null
floris/simulation/wake_vortex/VortexCylinderSkewed.py
tangsmall/floris
51e4e15c6a9b0c8f55bf01772111799803acf224
[ "Apache-2.0" ]
null
null
null
""" References: [1] E. Branlard, M. Gaunaa - Cylindrical vortex wake model: skewed cylinder, application to yawed or tilted rotors - Wind Energy, 2015 [2] E. Branlard - Wind Turbine Aerodynamics and Vorticity Based Method, Springer, 2017 """ #--- Legacy python 2.7 from __future__ import division from __future__...
45.588496
259
0.549096
1a442fcde102d424d75057d652738dbf787027b9
616
py
Python
scrap/PrayerTimes/spiders/MCA_spider.py
hamir/islam-buddy
3ec70d74814cbed719ecc3683668a0e5fb5a410c
[ "MIT" ]
7
2017-10-26T00:23:17.000Z
2021-01-21T06:27:46.000Z
scrap/PrayerTimes/spiders/MCA_spider.py
hamir/islam-buddy
3ec70d74814cbed719ecc3683668a0e5fb5a410c
[ "MIT" ]
12
2017-05-23T22:54:50.000Z
2019-07-31T17:26:17.000Z
scrap/PrayerTimes/spiders/MCA_spider.py
hamir/islam-buddy
3ec70d74814cbed719ecc3683668a0e5fb5a410c
[ "MIT" ]
5
2017-05-23T00:44:10.000Z
2019-10-23T14:57:35.000Z
import scrapy from PrayerTimes.items import PrayertimesItem class PrayerSpider(scrapy.Spider): name = "PrayerTimes" start_urls = [ 'http://www.mcabayarea.org' ] def parse(self, response): prayerCSS='td.Prayer01::text' prayerTimeCSS='td.Prayer02::text' prayerTable=respon...
32.421053
73
0.660714
1a44400ae479eea5d01ddd76139ad5b0a71b1027
5,687
py
Python
tests/integration/catalogue/reviews/test_models.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
tests/integration/catalogue/reviews/test_models.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
tests/integration/catalogue/reviews/test_models.py
sainjusajan/django-oscar
466e8edc807be689b0a28c9e525c8323cc48b8e1
[ "BSD-3-Clause" ]
null
null
null
from django.test import TestCase from django.core.exceptions import ValidationError from oscar.core.compat import get_user_model from oscar.apps.catalogue.reviews import models from oscar.test.factories import create_product from oscar.test.factories import UserFactory User = get_user_model() class TestA...
33.650888
74
0.632847
1a4449ecf625c16fc9adb92e0d09e28b496f6155
2,902
py
Python
Parser-hybrid/nparser/scripts/count_nonprojective.py
sb-b/BOUN-PARSE
2b529924897d8e2613c4d2193a67796a895da40b
[ "Apache-2.0" ]
12
2020-03-04T17:36:12.000Z
2021-09-26T14:02:49.000Z
Parser-hybrid/nparser/scripts/count_nonprojective.py
sb-b/BOUN-PARSE
2b529924897d8e2613c4d2193a67796a895da40b
[ "Apache-2.0" ]
1
2020-12-09T08:21:11.000Z
2020-12-09T08:21:11.000Z
Parser-hybrid/nparser/scripts/count_nonprojective.py
sb-b/BOUN-PARSE
2b529924897d8e2613c4d2193a67796a895da40b
[ "Apache-2.0" ]
3
2020-11-18T09:53:42.000Z
2020-12-17T23:04:59.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2016 Timothy Dozat # # 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 ...
27.121495
74
0.542385
1a44511cfeb99e350f8c3394fa51c5cfbf0f3b6c
2,261
py
Python
tensorflow/python/training/saver_large_partitioned_variable_test.py
tianyapiaozi/tensorflow
fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a
[ "Apache-2.0" ]
522
2016-06-08T02:15:50.000Z
2022-03-02T05:30:36.000Z
tensorflow/python/training/saver_large_partitioned_variable_test.py
shrikunjsarda/tensorflow
7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae
[ "Apache-2.0" ]
133
2017-04-26T16:49:49.000Z
2019-10-15T11:39:26.000Z
tensorflow/python/training/saver_large_partitioned_variable_test.py
shrikunjsarda/tensorflow
7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae
[ "Apache-2.0" ]
108
2016-06-16T15:34:05.000Z
2022-03-12T13:23:11.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
39.666667
79
0.7249
1a44516e19d75dd1707a9ffb5b41f42be4ef6ab3
153
py
Python
integration_tests/service_3_d/src/django_project/graphql_app/apps.py
Koldar/graphene-federation
355c6b2c4cee6c1a9c8c00a4ab066c41f6976766
[ "MIT" ]
null
null
null
integration_tests/service_3_d/src/django_project/graphql_app/apps.py
Koldar/graphene-federation
355c6b2c4cee6c1a9c8c00a4ab066c41f6976766
[ "MIT" ]
null
null
null
integration_tests/service_3_d/src/django_project/graphql_app/apps.py
Koldar/graphene-federation
355c6b2c4cee6c1a9c8c00a4ab066c41f6976766
[ "MIT" ]
null
null
null
from django.apps import AppConfig class GraphqlAppConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'graphql_app'
21.857143
56
0.771242
1a4463f66f39b5235466f4f77ee94220e21dbcae
9,974
py
Python
src/CatalogMatcher.py
LCOGT/lcowcstools
e5db536647dbb143a1f75293ec4f2a4acb68182b
[ "BSD-3-Clause" ]
null
null
null
src/CatalogMatcher.py
LCOGT/lcowcstools
e5db536647dbb143a1f75293ec4f2a4acb68182b
[ "BSD-3-Clause" ]
null
null
null
src/CatalogMatcher.py
LCOGT/lcowcstools
e5db536647dbb143a1f75293ec4f2a4acb68182b
[ "BSD-3-Clause" ]
null
null
null
import logging from astropy.table import Table from astropy.coordinates import SkyCoord from astropy import units as u from astropy.io import fits import numpy as np import math import matplotlib.pyplot as plt from LCOWCSLookupProvider import getWCSForcamera, transformList from gaiaastrometryservicetools import astrome...
41.385892
172
0.600361
1a446ab30e2d44820987e86db69c60eb2bfb2bcb
8,445
py
Python
checkov/common/graph/graph_builder/graph_components/blocks.py
graybrandonpfg/checkov
3081a8560f6369465314ee8f4ac8a8ec01649d68
[ "Apache-2.0" ]
null
null
null
checkov/common/graph/graph_builder/graph_components/blocks.py
graybrandonpfg/checkov
3081a8560f6369465314ee8f4ac8a8ec01649d68
[ "Apache-2.0" ]
null
null
null
checkov/common/graph/graph_builder/graph_components/blocks.py
graybrandonpfg/checkov
3081a8560f6369465314ee8f4ac8a8ec01649d68
[ "Apache-2.0" ]
null
null
null
from copy import deepcopy from typing import Union, Dict, Any, List from checkov.common.graph.graph_builder.graph_components.attribute_names import CustomAttributes from checkov.common.graph.graph_builder.utils import calculate_hash, join_trimmed_strings from checkov.common.graph.graph_builder.variable_rendering.bread...
47.178771
158
0.648549
1a4478dd62d09d6009712ed7493af71b9c01a605
3,896
py
Python
graviti/manager/sheets.py
wangyuqing0424/graviti-python-sdk
66300cc1edda6a848cac094899afb3d0421c595d
[ "MIT" ]
null
null
null
graviti/manager/sheets.py
wangyuqing0424/graviti-python-sdk
66300cc1edda6a848cac094899afb3d0421c595d
[ "MIT" ]
null
null
null
graviti/manager/sheets.py
wangyuqing0424/graviti-python-sdk
66300cc1edda6a848cac094899afb3d0421c595d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # # Copyright 2022 Graviti. Licensed under MIT License. # """The implementation of the Sheets.""" from typing import Any, Dict, Iterator, MutableMapping from tensorbay.dataset import Notes, RemoteData from tensorbay.label import Catalog from tensorbay.utility import URL from graviti.client im...
31.674797
98
0.572125
1a4482c10ed18b1e0d66df3434bd14ff1b65ef6b
15,378
py
Python
UlamSpiral.py
do-it-for-coffee/Ulam-spirals
bfde31ebd28bc5af4c452d0c06c9c8c5d18b51c3
[ "Apache-2.0" ]
null
null
null
UlamSpiral.py
do-it-for-coffee/Ulam-spirals
bfde31ebd28bc5af4c452d0c06c9c8c5d18b51c3
[ "Apache-2.0" ]
null
null
null
UlamSpiral.py
do-it-for-coffee/Ulam-spirals
bfde31ebd28bc5af4c452d0c06c9c8c5d18b51c3
[ "Apache-2.0" ]
null
null
null
import math import mpmath import numpy as np from PIL import Image import os class EvenDimensionError(Exception): # The required resolution for the image is a square with a center pixel that # has the same number of pixels to the left, to the right, above, and # underneath, which precludes any even number...
27.608618
80
0.479191
1a449cfc41d508df372632b96fb8f9f8ecc55c0c
1,069
py
Python
QUESTAO 7.15/7.15 - B.py
Pedro2um/Trabalho-TECC
34aa44e18f203a5eae6152298b106f7811a3807f
[ "MIT" ]
null
null
null
QUESTAO 7.15/7.15 - B.py
Pedro2um/Trabalho-TECC
34aa44e18f203a5eae6152298b106f7811a3807f
[ "MIT" ]
null
null
null
QUESTAO 7.15/7.15 - B.py
Pedro2um/Trabalho-TECC
34aa44e18f203a5eae6152298b106f7811a3807f
[ "MIT" ]
null
null
null
import random import numpy as np import matplotlib.pyplot as plt def plus_minus_one_generator(): #funcao que retora +1 ou -1, com probabilidade x = [-1,1,-1,1,-1,1] # de 50% para ambos. return random.choice(x) def main(): i =0 u = [] while(i < 50): u.append(plus_minus_one_generator()...
18.754386
81
0.505145
1a44af4394240b5d2167e6f5bee9d3d81f4f5658
96,065
py
Python
resources/python/aws_cdk/cloud_assembly_schema/__init__.py
oneillryan93/bot-man
f644a02b0e819d92502799a561ac6272201b46ee
[ "MIT" ]
null
null
null
resources/python/aws_cdk/cloud_assembly_schema/__init__.py
oneillryan93/bot-man
f644a02b0e819d92502799a561ac6272201b46ee
[ "MIT" ]
null
null
null
resources/python/aws_cdk/cloud_assembly_schema/__init__.py
oneillryan93/bot-man
f644a02b0e819d92502799a561ac6272201b46ee
[ "MIT" ]
null
null
null
""" ## Cloud Assembly Schema <!--BEGIN STABILITY BANNER-->--- ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- <!--END STABILITY BANNER--> This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project. ## Cloud Asse...
36.471147
345
0.642284
1a44b252f6a3453e1b82d93c8fd750ce3e0631af
71,865
py
Python
leo/core/leoUndo.py
frakel/leo-editor
b574118ee3b7ffe8344fa0d00dac603096117ac7
[ "MIT" ]
null
null
null
leo/core/leoUndo.py
frakel/leo-editor
b574118ee3b7ffe8344fa0d00dac603096117ac7
[ "MIT" ]
null
null
null
leo/core/leoUndo.py
frakel/leo-editor
b574118ee3b7ffe8344fa0d00dac603096117ac7
[ "MIT" ]
null
null
null
#@+leo-ver=5-thin #@+node:ekr.20031218072017.3603: * @file leoUndo.py '''Leo's undo/redo manager.''' #@+<< How Leo implements unlimited undo >> #@+node:ekr.20031218072017.2413: ** << How Leo implements unlimited undo >> #@+at Think of the actions that may be Undone or Redone as a string of beads # (g.Bunches) containin...
40.103237
108
0.578334
1a44ecabcf4924e31cd4b4ffbc2148028ea7b8ed
9,263
py
Python
python_version/body.py
bojanbg/orbital-academy
e9c262dfb1681cd877855723a94dae58a57e34c5
[ "MIT" ]
1
2019-09-14T13:29:54.000Z
2019-09-14T13:29:54.000Z
python_version/body.py
bojanbg/orbital-academy
e9c262dfb1681cd877855723a94dae58a57e34c5
[ "MIT" ]
null
null
null
python_version/body.py
bojanbg/orbital-academy
e9c262dfb1681cd877855723a94dae58a57e34c5
[ "MIT" ]
null
null
null
import numpy EARTH_R = 6.371E6 EARTH_MU = 3.986004418E14 # G * M_EARTH SQRT_EARTH_MU = numpy.sqrt(EARTH_MU) class Body(object): POSITION_VISUALISATIONS = {'symbol': 0, 'rv': 1, 'dot': 2} ORBIT_VISUALISATIONS = {'all': 0, 'orbit': 1, 'none': 2} def __init__(self, r, v, t0, orbit_color=(1.0, 1.0, 0.0, 1....
41.725225
143
0.582641