hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
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
972
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
972
max_forks_repo_name
stringlengths
6
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
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
e701ebe70cc571aff89f753f2e757469bc7f99f7
120
py
Python
vkquick/ext/chatbot/wrappers/__init__.py
NikitolProject/vkquick
a68e982974b5e96841d60de47519c1bbbaeedd29
[ "MIT" ]
null
null
null
vkquick/ext/chatbot/wrappers/__init__.py
NikitolProject/vkquick
a68e982974b5e96841d60de47519c1bbbaeedd29
[ "MIT" ]
null
null
null
vkquick/ext/chatbot/wrappers/__init__.py
NikitolProject/vkquick
a68e982974b5e96841d60de47519c1bbbaeedd29
[ "MIT" ]
null
null
null
from .attachment import Document, Photo from .message import Message from .page_entities import Group, PageEntity, User
30
50
0.825
012d9b46627d2916815773337d7a89f6ff88fe40
3,806
py
Python
section-03.py
richardolopes/pierian-python3
afe44b066c68f6cc7c0c8fea197990b9a3c4b79f
[ "MIT" ]
null
null
null
section-03.py
richardolopes/pierian-python3
afe44b066c68f6cc7c0c8fea197990b9a3c4b79f
[ "MIT" ]
null
null
null
section-03.py
richardolopes/pierian-python3
afe44b066c68f6cc7c0c8fea197990b9a3c4b79f
[ "MIT" ]
null
null
null
''' Aula 11 ''' a = "Python 3" print(len(a)) # 8 # Retorna toda a string # VAR:VAR - Retorna uma parte da string # ::VAR - Retorna uma parte da string, sendo ":" o começo da string # ::-1 - Retorna a string ao contrário print(a[:]) # Python 3 print(a[1:4]) # yth print(a[::2]) # Pto print(a[::-1]) # 3 nohtyP a = "...
23.7875
215
0.566474
05fe00355b195d0c7f06f60f73603d52175d7d4b
4,408
py
Python
sites/paymentsalt/settings_base.py
eviljeff/zamboni
c446a9fc75513c9eef3ff7b1f0e23bbab29f0e68
[ "BSD-3-Clause" ]
null
null
null
sites/paymentsalt/settings_base.py
eviljeff/zamboni
c446a9fc75513c9eef3ff7b1f0e23bbab29f0e68
[ "BSD-3-Clause" ]
null
null
null
sites/paymentsalt/settings_base.py
eviljeff/zamboni
c446a9fc75513c9eef3ff7b1f0e23bbab29f0e68
[ "BSD-3-Clause" ]
null
null
null
"""private_base will be populated from puppet and placed in this directory""" import logging import os import dj_database_url from mkt.settings import (CACHE_PREFIX, ES_INDEXES, KNOWN_PROXIES, LOGGING) from .. import splitstrip import private_base as private ALLOWED_HOSTS = ['.allizom.org...
27.209877
79
0.694419
a2addcae182c91d7a14ee865162a506dbf3a01b1
854
py
Python
api/system/service/api_views.py
klebed/esdc-ce
2c9e4591f344247d345a83880ba86777bb794460
[ "Apache-2.0" ]
97
2016-11-15T14:44:23.000Z
2022-03-13T18:09:15.000Z
api/system/service/api_views.py
klebed/esdc-ce
2c9e4591f344247d345a83880ba86777bb794460
[ "Apache-2.0" ]
334
2016-11-17T19:56:57.000Z
2022-03-18T10:45:53.000Z
api/system/service/api_views.py
klebed/esdc-ce
2c9e4591f344247d345a83880ba86777bb794460
[ "Apache-2.0" ]
33
2017-01-02T16:04:13.000Z
2022-02-07T19:20:24.000Z
from api.api_views import APIView from api.exceptions import ObjectNotFound from api.task.response import SuccessTaskResponse from api.system.service.control import ServiceControl class ServiceStatusView(APIView): dc_bound = False # noinspection PyUnusedLocal def __init__(self, request, service, data=Non...
31.62963
69
0.694379
16352208631de2c25b72c99539e448c5b919683b
2,002
py
Python
lib/coloraide/spaces/a98_rgb.py
adaminfinitum/ColorHelper
d6ab02ccff01dd1e3a01dbc186b5ba3ff1fcca47
[ "MIT" ]
253
2015-03-04T06:48:43.000Z
2022-03-25T14:22:17.000Z
lib/coloraide/spaces/a98_rgb.py
adaminfinitum/ColorHelper
d6ab02ccff01dd1e3a01dbc186b5ba3ff1fcca47
[ "MIT" ]
197
2015-03-04T21:40:47.000Z
2022-03-25T17:04:36.000Z
lib/coloraide/spaces/a98_rgb.py
adaminfinitum/ColorHelper
d6ab02ccff01dd1e3a01dbc186b5ba3ff1fcca47
[ "MIT" ]
32
2015-03-21T03:28:01.000Z
2021-09-06T07:20:51.000Z
"""A98 RGB color class.""" from ..spaces import RE_DEFAULT_MATCH from .srgb.base import SRGB from .xyz import XYZ from .. import util import re RGB_TO_XYZ = [ [0.5766690429101304, 0.18555823790654635, 0.18822864623499475], [0.297344975250536, 0.6273635662554663, 0.0752914584939979], [0.027031361386412336, ...
28.6
104
0.701299
fc94b38ce8c72a02e3fda944369aaa79e990fc5c
46,706
py
Python
tensorflow/python/ops/math_ops.py
izeye/tensorflow
d4422ff4b2f142de1d0c626f73c734655d340e0d
[ "Apache-2.0" ]
1
2016-07-03T20:16:31.000Z
2016-07-03T20:16:31.000Z
tensorflow/python/ops/math_ops.py
izeye/tensorflow
d4422ff4b2f142de1d0c626f73c734655d340e0d
[ "Apache-2.0" ]
null
null
null
tensorflow/python/ops/math_ops.py
izeye/tensorflow
d4422ff4b2f142de1d0c626f73c734655d340e0d
[ "Apache-2.0" ]
1
2021-03-16T21:45:10.000Z
2021-03-16T21:45:10.000Z
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
32.479833
86
0.683531
96d8cac3afba89bc0168387e9ef60953bbfb2888
2,310
py
Python
python/cudf/cudf/io/json.py
sperlingxx/cudf
c681211df6253e1ceee9203658108980e7e93e3c
[ "Apache-2.0" ]
1
2021-12-17T19:28:00.000Z
2021-12-17T19:28:00.000Z
python/cudf/cudf/io/json.py
sperlingxx/cudf
c681211df6253e1ceee9203658108980e7e93e3c
[ "Apache-2.0" ]
1
2021-03-10T20:28:23.000Z
2021-03-25T15:58:47.000Z
python/cudf/cudf/io/json.py
sperlingxx/cudf
c681211df6253e1ceee9203658108980e7e93e3c
[ "Apache-2.0" ]
1
2020-11-10T03:19:16.000Z
2020-11-10T03:19:16.000Z
# Copyright (c) 2019-2020, NVIDIA CORPORATION. import warnings from io import BytesIO, StringIO import pandas as pd import cudf from cudf._lib import json as libjson from cudf.utils import ioutils @ioutils.doc_read_json() def read_json( path_or_buf, engine="auto", dtype=True, lines=False, compre...
26.551724
76
0.585281
d5ab1d9caf25136da8b0bd00111e4a849015802a
15,469
py
Python
tex-camera-ready.py
pkorus/tex-camera-ready
b15ac9c8582d85804bb8be8609f44bff3c5fda69
[ "MIT" ]
null
null
null
tex-camera-ready.py
pkorus/tex-camera-ready
b15ac9c8582d85804bb8be8609f44bff3c5fda69
[ "MIT" ]
null
null
null
tex-camera-ready.py
pkorus/tex-camera-ready
b15ac9c8582d85804bb8be8609f44bff3c5fda69
[ "MIT" ]
null
null
null
#!/usr/local/bin/python3 import argparse import collections import os import re import shutil import sys import subprocess from PIL import Image class NonStandaloneError(RuntimeError): pass def build_dependency(old_file, new_file): previous_dir = os.path.abspath(os.path.curdir) os.chdir(os.path.split(ol...
42.265027
186
0.569785
a4f38b0ae40595ac95453fea337b14bdeb71fbf8
22,792
py
Python
telescope/telescope.py
m-lab/telescope
4b8bd775a36d533805749d40e80f2d7b71076479
[ "Apache-2.0" ]
9
2016-02-18T18:12:38.000Z
2019-10-17T21:57:39.000Z
telescope/telescope.py
m-lab/telescope
4b8bd775a36d533805749d40e80f2d7b71076479
[ "Apache-2.0" ]
46
2015-07-20T23:53:57.000Z
2020-09-28T18:23:16.000Z
telescope/telescope.py
m-lab/telescope
4b8bd775a36d533805749d40e80f2d7b71076479
[ "Apache-2.0" ]
7
2015-08-19T18:32:18.000Z
2018-06-19T21:09:55.000Z
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # Copyright 2014 Measurement Lab # # 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 ...
38.894198
88
0.617015
518929a8f31bad6684c252fb80bc50a1e2166544
6,926
py
Python
markyp_bootstrap4/carousels.py
volfpeter/markyp-bootstrap4
1af5a1f9dc861a14323706ace28882ef6555739a
[ "MIT" ]
21
2019-07-16T15:03:43.000Z
2021-11-16T10:51:58.000Z
markyp_bootstrap4/carousels.py
volfpeter/markyp-bootstrap4
1af5a1f9dc861a14323706ace28882ef6555739a
[ "MIT" ]
null
null
null
markyp_bootstrap4/carousels.py
volfpeter/markyp-bootstrap4
1af5a1f9dc861a14323706ace28882ef6555739a
[ "MIT" ]
null
null
null
""" Bootstrap carousel elements. See https://getbootstrap.com/docs/4.0/components/carousel/. """ from typing import Optional, Tuple from markyp import ElementType, PropertyValue from markyp_html import join from markyp_html.block import div from markyp_html.inline import a, span from markyp_html.lists import ol, li ...
40.034682
170
0.66633
13657b57844264cf82d010f49361b7f711d9cb7a
3,327
py
Python
script/model.py
mts-uw/ICAT_WGS
d0aeb66f46b78d47b91d14cdcde48a1d331f3fcd
[ "MIT" ]
null
null
null
script/model.py
mts-uw/ICAT_WGS
d0aeb66f46b78d47b91d14cdcde48a1d331f3fcd
[ "MIT" ]
null
null
null
script/model.py
mts-uw/ICAT_WGS
d0aeb66f46b78d47b91d14cdcde48a1d331f3fcd
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd from sklearn.ensemble import ExtraTreesRegressor from xgboost import XGBRegressor from sklearn.metrics import mean_squared_error, r2_score from sklearn.model_selection import GridSearchCV, KFold import script.views as views from skopt.learning import ExtraTreesRegressor as opt_ETR...
40.573171
89
0.612564
b97515cb9865f1fdcecb8373c55ce1997b680f4f
1,488
py
Python
tests/core/fixtures/core_serialization.py
lokijuhy/renku-python
0bfceafa4e6b4750439ab0ed20c61b0a6ba03a1f
[ "Apache-2.0" ]
26
2018-06-04T15:21:50.000Z
2022-02-11T17:31:24.000Z
tests/core/fixtures/core_serialization.py
lokijuhy/renku-python
0bfceafa4e6b4750439ab0ed20c61b0a6ba03a1f
[ "Apache-2.0" ]
1,655
2018-05-17T22:07:50.000Z
2022-03-31T21:22:01.000Z
tests/core/fixtures/core_serialization.py
lokijuhy/renku-python
0bfceafa4e6b4750439ab0ed20c61b0a6ba03a1f
[ "Apache-2.0" ]
19
2018-05-18T14:12:25.000Z
2022-03-30T19:51:35.000Z
# -*- coding: utf-8 -*- # # Copyright 2021 Swiss Data Science Center (SDSC) # A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and # Eidgenössische Technische Hochschule Zürich (ETHZ). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complian...
34.604651
94
0.735215
e2b21ffc56d64dc3550291129f6585567ec54044
8,555
py
Python
homeassistant/components/cloud/google_config.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
3
2021-11-22T22:37:43.000Z
2022-03-17T00:55:28.000Z
homeassistant/components/cloud/google_config.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
25
2021-10-02T10:01:14.000Z
2022-03-31T06:11:49.000Z
homeassistant/components/cloud/google_config.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
3
2022-01-02T18:49:54.000Z
2022-01-25T02:03:54.000Z
"""Google config for Cloud.""" import asyncio from http import HTTPStatus import logging from hass_nabucasa import Cloud, cloud_api from hass_nabucasa.google_report_state import ErrorResponse from homeassistant.components.google_assistant.const import DOMAIN as GOOGLE_DOMAIN from homeassistant.components.google_assis...
35.645833
103
0.671303
9fe3e3e718698243df5a8efcb2965b1359ef2f0d
2,963
py
Python
real-time.py
Imogen1004/drone-detection
1fc744353c8f43992bc672bfbecaed5e2795560c
[ "MIT" ]
null
null
null
real-time.py
Imogen1004/drone-detection
1fc744353c8f43992bc672bfbecaed5e2795560c
[ "MIT" ]
null
null
null
real-time.py
Imogen1004/drone-detection
1fc744353c8f43992bc672bfbecaed5e2795560c
[ "MIT" ]
2
2021-03-24T13:20:07.000Z
2021-08-06T20:48:27.000Z
import cv2, queue, threading, time from timeit import default_timer as timer import os os.environ['CUDA_VISIBLE_DEVICES'] = '0' import cv2 import numpy as np import tensorflow as tf from yolov3.utils import * from yolov3.configs import * from tools.Detection_to_XML import * # bufferless VideoCapture class VideoCapture...
29.04902
121
0.628755
84e30fa9107e5d8f43d63785c54acd187b3277cc
5,759
py
Python
ogr/services/gitlab/issue.py
KPostOffice/ogr
2742a5716229f1b51b9c325c6ea0b790f318bdfd
[ "MIT" ]
null
null
null
ogr/services/gitlab/issue.py
KPostOffice/ogr
2742a5716229f1b51b9c325c6ea0b790f318bdfd
[ "MIT" ]
4
2021-05-27T21:44:37.000Z
2021-07-21T21:13:41.000Z
ogr/services/gitlab/issue.py
KPostOffice/ogr
2742a5716229f1b51b9c325c6ea0b790f318bdfd
[ "MIT" ]
null
null
null
# MIT License # # Copyright (c) 2018-2019 Red Hat, Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, m...
33.097701
82
0.655496
a030a4fd90e19f3f9ad1260d672ceea3fc671d9f
1,655
py
Python
setup.py
neocxf/fastone_ucloud
e931181c632c3c8dc25e94811fd09f8946352004
[ "MIT" ]
1
2020-09-20T06:11:01.000Z
2020-09-20T06:11:01.000Z
setup.py
neocxf/fastone_ucloud
e931181c632c3c8dc25e94811fd09f8946352004
[ "MIT" ]
null
null
null
setup.py
neocxf/fastone_ucloud
e931181c632c3c8dc25e94811fd09f8946352004
[ "MIT" ]
null
null
null
#!/usr/bin/env python """The setup script.""" from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = ['Click>=7.0', 'six>=1.15.0'] setup_requirements = ['pytest-r...
30.090909
94
0.6429
e887a4b94f8653bb3eb80f9f713a758656bf00d3
490
py
Python
examples/test2.py
nvalerkos/cronio
f7361b334a16747ab2b807d4acc88775d9971bf4
[ "MIT" ]
1
2019-03-17T09:22:31.000Z
2019-03-17T09:22:31.000Z
examples/test2.py
nvalerkos/cronio
f7361b334a16747ab2b807d4acc88775d9971bf4
[ "MIT" ]
14
2018-08-07T13:40:37.000Z
2019-09-19T06:53:37.000Z
examples/test2.py
nvalerkos/cronio
f7361b334a16747ab2b807d4acc88775d9971bf4
[ "MIT" ]
null
null
null
import sys,os,json original = { 'comment': 'complex data structure we would ideally want in there', 'ie.1' : { 'key': 'is value bla bla', 'value' : [1,2,3,4,5,6,7,10011] }, 'ie.2' : { 'key': 'is value bla bla', 'value' : [1,2,3,4,5,6,7,10011] }, 'ie.3' : { 'key': 'is value bla bla', 'value' : [1,2,3,4,5,6,...
20.416667
68
0.583673
3bbfe0b7a85787680baec8cdfd9112520df5a2df
1,189
py
Python
lib/python3.8/site-packages/ansible_collections/ansible/posix/tests/unit/modules/conftest.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
22
2021-07-16T08:11:22.000Z
2022-03-31T07:15:34.000Z
kubernetes-the-hard-way/system/collections/ansible_collections/ansible/posix/tests/unit/modules/conftest.py
jkroepke/kubernetes-the-hard-way
70fd096a04addec0777744c9731a4e3fbdc40c8f
[ "Apache-2.0" ]
null
null
null
kubernetes-the-hard-way/system/collections/ansible_collections/ansible/posix/tests/unit/modules/conftest.py
jkroepke/kubernetes-the-hard-way
70fd096a04addec0777744c9731a4e3fbdc40c8f
[ "Apache-2.0" ]
39
2021-07-05T02:31:42.000Z
2022-03-31T02:46:03.000Z
# Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) import json import pytest from ansible.module_utils.six import string_types from ansible.module_utils._text import to_bytes from ansible.module_utils.common._collections_compat import Mut...
41
92
0.743482
55cc048d09b5a4003fc84388797da58934f24d33
601
py
Python
scrapybot/scrapybot/items.py
luzhuomi/collamine-client-python
63bc174da28e0c42b7eb25ac81a5f68ec3e01a03
[ "Apache-2.0" ]
null
null
null
scrapybot/scrapybot/items.py
luzhuomi/collamine-client-python
63bc174da28e0c42b7eb25ac81a5f68ec3e01a03
[ "Apache-2.0" ]
null
null
null
scrapybot/scrapybot/items.py
luzhuomi/collamine-client-python
63bc174da28e0c42b7eb25ac81a5f68ec3e01a03
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy if scrapy.version_info[0:2] < (1,1): from scrapy.contrib.djangoitem import DjangoItem else: from scrapy_djangoitem import DjangoItem # sud...
23.115385
86
0.723794
d65730a8a5911a9ed03c420a6e696fcecf8a1a92
302
py
Python
tests/test_skeleton.py
ludwigflo/ml_utils
e58ac5842c00b167ee87c20c7c1ffc44322b2634
[ "MIT" ]
null
null
null
tests/test_skeleton.py
ludwigflo/ml_utils
e58ac5842c00b167ee87c20c7c1ffc44322b2634
[ "MIT" ]
null
null
null
tests/test_skeleton.py
ludwigflo/ml_utils
e58ac5842c00b167ee87c20c7c1ffc44322b2634
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import pytest from ml_utils.skeleton import fib __author__ = "Florian Ludwig" __copyright__ = "Florian Ludwig" __license__ = "mit" def test_fib(): assert fib(1) == 1 assert fib(2) == 1 assert fib(7) == 13 with pytest.raises(AssertionError): fib(-10)
17.764706
39
0.642384
14cb7009912c72e5ac4589bafcc7ae40455ba23a
88
py
Python
lambda/tasks/admin.py
Rory-Sullivan/lambda
44e7ea6273958b2e666b1d59bc6eac54915b8b8c
[ "MIT" ]
6
2021-11-15T18:56:44.000Z
2022-02-15T10:02:24.000Z
lambda/tasks/admin.py
Rory-Sullivan/lambda
44e7ea6273958b2e666b1d59bc6eac54915b8b8c
[ "MIT" ]
5
2020-10-24T20:08:13.000Z
2021-06-10T19:05:24.000Z
lambda/tasks/admin.py
Rory-Sullivan/lambda
44e7ea6273958b2e666b1d59bc6eac54915b8b8c
[ "MIT" ]
1
2020-10-19T14:35:24.000Z
2020-10-19T14:35:24.000Z
from django.contrib import admin from . import models admin.site.register(models.Task)
17.6
32
0.806818
69fb0d0e00e96243e7c76ccdf2278c56bdc4ccba
16,383
py
Python
tests/models/levit/test_modeling_levit.py
DN6/transformers
5c17918fe4cda80dae5b7ec8f0b2d23a813c4a05
[ "Apache-2.0" ]
5
2020-09-01T09:15:48.000Z
2020-09-15T03:25:05.000Z
tests/models/levit/test_modeling_levit.py
DN6/transformers
5c17918fe4cda80dae5b7ec8f0b2d23a813c4a05
[ "Apache-2.0" ]
null
null
null
tests/models/levit/test_modeling_levit.py
DN6/transformers
5c17918fe4cda80dae5b7ec8f0b2d23a813c4a05
[ "Apache-2.0" ]
3
2020-08-20T04:46:25.000Z
2020-10-14T08:39:13.000Z
# coding=utf-8 # Copyright 2022 The HuggingFace Inc. team. 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 r...
38.639151
120
0.651163
32f7915982e138a13b110cbc56778890327be64d
8,058
py
Python
triple_agent/tests/test_report_utilities.py
andrewzwicky/TripleAgent
8d056df5c53a3d264dc778bad6771a0a2f62e7e7
[ "MIT" ]
3
2020-04-25T11:42:03.000Z
2020-07-08T16:38:26.000Z
triple_agent/tests/test_report_utilities.py
andrewzwicky/TripleAgent
8d056df5c53a3d264dc778bad6771a0a2f62e7e7
[ "MIT" ]
17
2019-08-11T19:09:55.000Z
2021-03-30T17:12:28.000Z
triple_agent/tests/test_report_utilities.py
andrewzwicky/TripleAgent
8d056df5c53a3d264dc778bad6771a0a2f62e7e7
[ "MIT" ]
null
null
null
import pytest from triple_agent.reports.generation.report_utilities import ( create_plot_colors, create_plot_hatching, create_data_labels, create_category_legend_labels, ) from triple_agent.classes.action_tests import ActionTest from triple_agent.classes.venues import Venue from triple_agent.classes.cha...
24.947368
129
0.466865
a50f11a7f7150f8284147022fdfac52ff2d8d702
553
py
Python
script/timelapse.py
MarkHershey/opencv-motion-detection
dbaa1a18e7f5b14cc9192dd3a23ea251c3bf4059
[ "MIT" ]
null
null
null
script/timelapse.py
MarkHershey/opencv-motion-detection
dbaa1a18e7f5b14cc9192dd3a23ea251c3bf4059
[ "MIT" ]
null
null
null
script/timelapse.py
MarkHershey/opencv-motion-detection
dbaa1a18e7f5b14cc9192dd3a23ea251c3bf4059
[ "MIT" ]
null
null
null
from time import sleep from picamera import PiCamera from datetime import datetime def timestamp(): now = str(datetime.now()) ts = "" for i in now[:-7]: if i in (" ", "-", ":"): pass else: ts += i return ts def main(): camera = PiCamera() camera.resolut...
18.433333
35
0.538879
7c3863af3cc54ef5387425cc4125c76ef1235b09
3,840
py
Python
helm/dagster/schema/schema/utils/helm_template.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
4,606
2018-06-21T17:45:20.000Z
2022-03-31T23:39:42.000Z
helm/dagster/schema/schema/utils/helm_template.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
6,221
2018-06-12T04:36:01.000Z
2022-03-31T21:43:05.000Z
helm/dagster/schema/schema/utils/helm_template.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
619
2018-08-22T22:43:09.000Z
2022-03-31T22:48:06.000Z
import json import os import shutil import subprocess from contextlib import contextmanager from dataclasses import dataclass from pprint import pprint from tempfile import NamedTemporaryFile, mkstemp from typing import Any, List, Optional, Union import yaml from kubernetes.client.api_client import ApiClient from sche...
35.555556
100
0.610938
b5176fb2944f9a3587720798544fdd5b64863675
26,539
py
Python
translate_sdk/model/monitor/alert_event_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
5
2019-07-31T04:11:05.000Z
2021-01-07T03:23:20.000Z
translate_sdk/model/monitor/alert_event_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
translate_sdk/model/monitor/alert_event_pb2.py
easyopsapis/easyops-api-python
adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: alert_event.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf...
47.560932
2,477
0.743057
daec5e946f5986c6bdbd7e5b913c666f3d34fc57
2,718
py
Python
looker_deployer/commands/deploy_connections.py
hselbie/looker_deployer
fc97ba1f6f5288e4e3413fb89f7ea16db6543ac8
[ "MIT" ]
null
null
null
looker_deployer/commands/deploy_connections.py
hselbie/looker_deployer
fc97ba1f6f5288e4e3413fb89f7ea16db6543ac8
[ "MIT" ]
1
2021-08-05T16:19:09.000Z
2021-08-05T16:19:09.000Z
looker_deployer/commands/deploy_connections.py
hselbie/looker_deployer
fc97ba1f6f5288e4e3413fb89f7ea16db6543ac8
[ "MIT" ]
null
null
null
import logging import re from looker_sdk import models, error from looker_deployer.utils import deploy_logging from looker_deployer.utils import parse_ini from looker_deployer.utils.get_client import get_client logger = deploy_logging.get_logger(__name__) def get_filtered_connections(source_sdk, pattern=None): c...
31.976471
91
0.664091
35bce7c69e4aaf474249afa6ead814c8a80a78ea
5,790
py
Python
test/functional/p2p_eviction.py
crptec/sinovate
345a81f99ec7e624e0ec244a7dbe1ebb3698c347
[ "MIT" ]
159
2016-07-09T13:02:19.000Z
2022-03-11T08:15:56.000Z
test/functional/p2p_eviction.py
crptec/sinovate
345a81f99ec7e624e0ec244a7dbe1ebb3698c347
[ "MIT" ]
40
2016-07-22T17:26:37.000Z
2022-03-22T19:37:32.000Z
test/functional/p2p_eviction.py
crptec/sinovate
345a81f99ec7e624e0ec244a7dbe1ebb3698c347
[ "MIT" ]
57
2016-10-21T23:57:47.000Z
2022-03-26T20:51:23.000Z
#!/usr/bin/env python3 # Copyright (c) 2019-2020 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 node eviction logic When the number of peers has reached the limit of maximum connections, the ...
41.956522
102
0.65475
0f8cfecb42d4607bb54136b727653b7ea3f4b98a
1,244
py
Python
osh/word_eval_test.py
msingle/oil
5623c58d4558d37cd43e6274574d94a0e547f192
[ "Apache-2.0" ]
null
null
null
osh/word_eval_test.py
msingle/oil
5623c58d4558d37cd43e6274574d94a0e547f192
[ "Apache-2.0" ]
null
null
null
osh/word_eval_test.py
msingle/oil
5623c58d4558d37cd43e6274574d94a0e547f192
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python2 # Copyright 2016 Andy Chu. 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 """ word_eval_test.py: Te...
25.387755
66
0.713023
c23fdbaaa0f2abf8ca79e0d388ac4c2c2354c71a
395
py
Python
howtosapi/asgi.py
tiveritz/how-tos-api
5dd73fd72ea1f07123ce8d15d2935d9d9e473c8e
[ "MIT" ]
null
null
null
howtosapi/asgi.py
tiveritz/how-tos-api
5dd73fd72ea1f07123ce8d15d2935d9d9e473c8e
[ "MIT" ]
3
2021-05-23T07:57:15.000Z
2021-05-28T05:38:17.000Z
howtosapi/asgi.py
tiveritz/how-tos-api
5dd73fd72ea1f07123ce8d15d2935d9d9e473c8e
[ "MIT" ]
null
null
null
""" ASGI config for howtosapi project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SET...
23.235294
78
0.787342
ef8b168f71875a3a26750fbbc0a3a324d71c90b9
4,721
py
Python
examples/momentum.py
jiajiaxu123/Orca
e86189e70c1d0387816bb98b8047a6232fbda9df
[ "Apache-2.0" ]
20
2019-12-02T11:49:12.000Z
2021-12-24T19:34:32.000Z
examples/momentum.py
jiajiaxu123/Orca
e86189e70c1d0387816bb98b8047a6232fbda9df
[ "Apache-2.0" ]
null
null
null
examples/momentum.py
jiajiaxu123/Orca
e86189e70c1d0387816bb98b8047a6232fbda9df
[ "Apache-2.0" ]
5
2019-12-02T12:16:22.000Z
2021-10-22T02:27:47.000Z
import dolphindb.orca as orca import matplotlib.pyplot as plt US = 'C:/DolphinDB/Orca/databases/USstocks.csv' orca.connect('localhost', 8848, 'admin', '123456') def load_price_data(df): USstocks = df[df.date.dt.weekday.between(0, 4), df.PRC.notnull(), df.VOL.notnull()][ ['PERMNO', 'date', 'PR...
41.778761
114
0.632493
dc847dccb7940bde987b2c90d74ede2c3bab38ef
3,157
py
Python
autotest/gdrivers/isis2.py
jpapadakis/gdal
f07aa15fd65af36b04291303cc6834c87f662814
[ "MIT" ]
3,100
2015-01-02T10:33:40.000Z
2022-03-31T02:06:51.000Z
autotest/gdrivers/isis2.py
jpapadakis/gdal
f07aa15fd65af36b04291303cc6834c87f662814
[ "MIT" ]
3,496
2015-01-06T16:53:30.000Z
2022-03-31T20:18:51.000Z
autotest/gdrivers/isis2.py
jpapadakis/gdal
f07aa15fd65af36b04291303cc6834c87f662814
[ "MIT" ]
2,036
2015-01-08T20:22:12.000Z
2022-03-31T10:24:08.000Z
#!/usr/bin/env pytest ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for ISIS2 driver. # Author: Even Rouault <even dot rouault @ spatialys.com> # #############################################################...
38.036145
110
0.61039
84caadfa74733c76863a44278b4fd61a2edff4e7
933
py
Python
manage.py
davidpmills/project-1
52788bc5ab3e4359e31ce153e49d7e097dc99127
[ "BSD-2-Clause" ]
null
null
null
manage.py
davidpmills/project-1
52788bc5ab3e4359e31ce153e49d7e097dc99127
[ "BSD-2-Clause" ]
null
null
null
manage.py
davidpmills/project-1
52788bc5ab3e4359e31ce153e49d7e097dc99127
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python import os from flask.ext.script import Manager, Server from flask.ext.script.commands import ShowUrls, Clean from appname import create_app from appname.models import db, User # default to dev config because no one should use this in # production anyway env = os.environ.get('APPNAME_ENV', 'dev'...
23.325
73
0.713826
8cb5462d834e9c57a56366ddde58944a3528edff
24,217
py
Python
docker/dockerTrader/gateway/okcoinGateway/okcoinGateway.py
OceanMT/vnpy_py3
0901e9381c54e615247eb753bac476a911c9ae5d
[ "MIT" ]
null
null
null
docker/dockerTrader/gateway/okcoinGateway/okcoinGateway.py
OceanMT/vnpy_py3
0901e9381c54e615247eb753bac476a911c9ae5d
[ "MIT" ]
null
null
null
docker/dockerTrader/gateway/okcoinGateway/okcoinGateway.py
OceanMT/vnpy_py3
0901e9381c54e615247eb753bac476a911c9ae5d
[ "MIT" ]
null
null
null
# encoding: UTF-8 ''' vn.okcoin的gateway接入 注意: 1. 前仅支持USD和CNY的现货交易,USD的期货合约交易暂不支持 ''' import os import json from datetime import datetime from copy import copy from threading import Condition from queue import Queue from threading import Thread from . import vnokcoin from vtGateway import * # 价格类型映射 priceTypeMap =...
34.204802
86
0.503531
2a37f1cfc1e1bdb2b99c811e51ef09f279492252
9,931
py
Python
fairseq/modules/lightconv_layer/cuda_function_gen.py
aiboxlab/TSPNet
359402151afd262857cde6fae3fc13445d73c9a7
[ "MIT" ]
83
2020-10-11T04:44:52.000Z
2022-01-11T13:59:50.000Z
fairseq/modules/lightconv_layer/cuda_function_gen.py
aiboxlab/TSPNet
359402151afd262857cde6fae3fc13445d73c9a7
[ "MIT" ]
9
2020-12-12T10:12:00.000Z
2021-03-28T16:05:08.000Z
fairseq/modules/lightconv_layer/cuda_function_gen.py
aiboxlab/TSPNet
359402151afd262857cde6fae3fc13445d73c9a7
[ "MIT" ]
11
2020-12-17T13:38:56.000Z
2022-03-12T23:39:41.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. def gen_forward(): kernels = [3, 5, 7, 15, 31, 63, 127, 255] seqs = [32 * x for x in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12...
34.244828
142
0.479509
73a687e272f29983d0fac056745954d9c353740d
461
py
Python
src/mspelling/cli.py
mario-bermonti/computerized-spelling-measure
7140c2407d3324a7b9f867d45c2bf4dd0978c8dd
[ "BSD-3-Clause" ]
1
2021-06-25T16:46:44.000Z
2021-06-25T16:46:44.000Z
src/mspelling/cli.py
mario-bermonti/computerized-spelling-measure
7140c2407d3324a7b9f867d45c2bf4dd0978c8dd
[ "BSD-3-Clause" ]
8
2021-12-27T04:11:34.000Z
2022-03-12T01:06:12.000Z
src/mspelling/cli.py
mario-bermonti/computerized-spelling-measure
7140c2407d3324a7b9f867d45c2bf4dd0978c8dd
[ "BSD-3-Clause" ]
null
null
null
"""Console script for mspelling.""" import click from mspelling import __version__ @click.command() @click.version_option(version=__version__) def main() -> int: """Console script for mspelling.""" click.echo("This is the cli for the mspelling project") click_url = "https://click.palletsprojects.com/" ...
24.263158
69
0.698482
524e3f6e0d6627460c58586e64beb5257570ada8
10,170
py
Python
examples/cnn/model/xceptionnet.py
chrishkchris/incubator-singa
ced9e9d44c200d709db5a2354076390788986b77
[ "Apache-2.0" ]
2
2021-04-22T02:56:43.000Z
2021-04-22T02:56:46.000Z
examples/cnn/model/xceptionnet.py
guoshnBJTU/singa
f04d197ee15777504bf80a8cb77666b8cacb4b94
[ "Apache-2.0" ]
3
2020-09-09T11:51:47.000Z
2021-01-15T12:55:06.000Z
examples/cnn/model/xceptionnet.py
zlheui/singa
ced9e9d44c200d709db5a2354076390788986b77
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
32.912621
101
0.436775
b1d6a0e609e66b4ab1b9cb38a728c7ae6bef72ab
5,041
py
Python
docs/conf.py
dem4ply/chibi_gob_mx_elasticsearch
7b4a5b35ad79817db0f5d5cc6705f085b4708a1d
[ "WTFPL" ]
null
null
null
docs/conf.py
dem4ply/chibi_gob_mx_elasticsearch
7b4a5b35ad79817db0f5d5cc6705f085b4708a1d
[ "WTFPL" ]
null
null
null
docs/conf.py
dem4ply/chibi_gob_mx_elasticsearch
7b4a5b35ad79817db0f5d5cc6705f085b4708a1d
[ "WTFPL" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # chibi_gob_mx_elasticsearch documentation build configuration file, created by # sphinx-quickstart on Fri Jun 9 13:47:02 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are pr...
30.737805
79
0.698274
ad76ff0c1ce3b783b372db913208704f35e83f63
17
py
Python
markovGames/examples/__init__.py
rohit-konda/markovGames
d6dd1b8a11f1c95658a468f9e471aecfcf0e6839
[ "MIT" ]
null
null
null
markovGames/examples/__init__.py
rohit-konda/markovGames
d6dd1b8a11f1c95658a468f9e471aecfcf0e6839
[ "MIT" ]
null
null
null
markovGames/examples/__init__.py
rohit-konda/markovGames
d6dd1b8a11f1c95658a468f9e471aecfcf0e6839
[ "MIT" ]
null
null
null
name = 'examples'
17
17
0.705882
011b6dd9c401f68d2291de294d516a7d663195b0
1,515
py
Python
competitive_programming/python_template_ext.py
hey24sheep/code_templates
39a766676fc8ad4f82e5c926c3b06fa3531bf028
[ "MIT" ]
null
null
null
competitive_programming/python_template_ext.py
hey24sheep/code_templates
39a766676fc8ad4f82e5c926c3b06fa3531bf028
[ "MIT" ]
null
null
null
competitive_programming/python_template_ext.py
hey24sheep/code_templates
39a766676fc8ad4f82e5c926c3b06fa3531bf028
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------- # Created By : hey24sheep.com # Created Date: 11th Feb 2022 # License : MIT # version = 1.0 # # Description : A small and quick template file for competitve programming # -----------------------------------------------------------...
31.5625
88
0.584818
a780de2130486c3efdffb4c093720b046b77f11e
4,134
py
Python
torch_geometric/nn/conv/res_gated_graph_conv.py
NucciTheBoss/pytorch_geometric
e220a2c08fa1b2f1672d616c22eac2a67b5c8967
[ "MIT" ]
2,350
2021-09-12T08:32:50.000Z
2022-03-31T18:09:36.000Z
torch_geometric/nn/conv/res_gated_graph_conv.py
NucciTheBoss/pytorch_geometric
e220a2c08fa1b2f1672d616c22eac2a67b5c8967
[ "MIT" ]
588
2021-09-12T08:49:08.000Z
2022-03-31T21:02:13.000Z
torch_geometric/nn/conv/res_gated_graph_conv.py
NucciTheBoss/pytorch_geometric
e220a2c08fa1b2f1672d616c22eac2a67b5c8967
[ "MIT" ]
505
2021-09-13T13:13:32.000Z
2022-03-31T15:54:00.000Z
from typing import Callable, Optional, Tuple, Union from torch import Tensor from torch.nn import Parameter, Sigmoid from torch_geometric.nn.conv import MessagePassing from torch_geometric.nn.dense.linear import Linear from torch_geometric.typing import Adj, PairTensor from ..inits import zeros class ResGatedGraph...
33.885246
79
0.599419
5bdcb24f597d7804d3fca6352b03e396a2d34e63
2,077
py
Python
refactor_json_format.py
flores-jacob/philippine-regions-provinces-cities-municipalities-baranggays
3c993f5669bc7ca62d2c5740eb1733923e61eac2
[ "MIT" ]
79
2018-11-22T05:10:27.000Z
2022-02-05T06:37:51.000Z
refactor_json_format.py
kentastudillo/philippine-regions-provinces-cities-municipalities-barangays
0ae4a49d3d5e5e1749575a1d028da6dac4020b35
[ "MIT" ]
1
2020-07-13T10:32:14.000Z
2022-01-11T12:06:14.000Z
refactor_json_format.py
kentastudillo/philippine-regions-provinces-cities-municipalities-barangays
0ae4a49d3d5e5e1749575a1d028da6dac4020b35
[ "MIT" ]
25
2019-04-06T07:41:46.000Z
2021-11-06T13:12:41.000Z
# This script is meant to refactor the original file into the new format. # The idea is to make the formatting more consistent by removing redundant # and unnecessary list organization for the municipalities. # In effect, only dictionaries are used all throughout the file, except # for the barangays which are still in...
47.204545
163
0.76649
ce52bf45391c5df802a575b5e6792c3ab687b569
3,759
py
Python
Menu/HelloTF2.py
ylu4/Hands-on-ML-2nd-rearranged
87be431cc88b3806a7d726d623ad1688608aab8b
[ "Apache-2.0" ]
null
null
null
Menu/HelloTF2.py
ylu4/Hands-on-ML-2nd-rearranged
87be431cc88b3806a7d726d623ad1688608aab8b
[ "Apache-2.0" ]
null
null
null
Menu/HelloTF2.py
ylu4/Hands-on-ML-2nd-rearranged
87be431cc88b3806a7d726d623ad1688608aab8b
[ "Apache-2.0" ]
null
null
null
# From https://www.tensorflow.org/beta/ import tensorflow as tf import time from tensorflow.keras.layers import Dense, Flatten, Conv2D from tensorflow.keras import Model t0 = time.time() # Load and prepare the MNIST dataset. mnist = tf.keras.datasets.mnist (x_train, y_train), (x_test, y_test) = mnist.load_data() x_t...
32.686957
88
0.688747
631f63abe3a5570764fec23bd133aff121f168d6
217
py
Python
ch5/5-6.stage_of_life.py
AngangGuo/pycrash
de48aa4198022c301f5cd3ce388c195a177be1b5
[ "MIT" ]
null
null
null
ch5/5-6.stage_of_life.py
AngangGuo/pycrash
de48aa4198022c301f5cd3ce388c195a177be1b5
[ "MIT" ]
null
null
null
ch5/5-6.stage_of_life.py
AngangGuo/pycrash
de48aa4198022c301f5cd3ce388c195a177be1b5
[ "MIT" ]
null
null
null
age = 20 if age < 2: print("a baby") elif age < 4: print("a toddler") elif age < 13: print("a kid") elif age < 20: print("a teenager") elif age < 65: print("an adult") else: print("an elder")
14.466667
23
0.552995
e8d12a39f94d663e0c873ef62a8fd22f34ab43ba
3,359
py
Python
src/evidently/dashboard/widgets/prob_class_pred_distr_widget.py
caron14/evidently
5e0d4450614ad237c5321462ac7f725f54e7e8f4
[ "Apache-2.0" ]
1
2022-01-22T20:56:10.000Z
2022-01-22T20:56:10.000Z
src/evidently/dashboard/widgets/prob_class_pred_distr_widget.py
billyotieno/evidently
10e41bcdd1108c5c7516a92a198da48ff16a134f
[ "Apache-2.0" ]
null
null
null
src/evidently/dashboard/widgets/prob_class_pred_distr_widget.py
billyotieno/evidently
10e41bcdd1108c5c7516a92a198da48ff16a134f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 import json from typing import Optional import pandas as pd import numpy as np import plotly.figure_factory as ff from evidently import ColumnMapping from evidently.analyzers.prob_classification_performance_analyzer import ProbClassificationPerformanceAnalyzer from evidently.m...
34.27551
110
0.568026
9709481a4e7e9e07f5757e9c6c715174b88358a2
8,337
py
Python
linebot/models/messages.py
twbabyduck/line-bot-sdk-python
79a2c155b016a199916935e8133e0651e9477cff
[ "Apache-2.0" ]
2
2021-09-07T13:06:50.000Z
2021-09-14T08:14:45.000Z
linebot/models/messages.py
TaroHub/line-bot-sdk-python
ea6fe797fb42d59a8998eae6ff7497932fec5565
[ "Apache-2.0" ]
null
null
null
linebot/models/messages.py
TaroHub/line-bot-sdk-python
ea6fe797fb42d59a8998eae6ff7497932fec5565
[ "Apache-2.0" ]
1
2020-08-16T08:26:47.000Z
2020-08-16T08:26:47.000Z
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
30.877778
95
0.640998
f79588c11b839d81da2bff6f57bbfb3aedf76539
9,995
py
Python
lib3/yaml/__init__.py
sikhberserker/yaml
4a7a400d218ad522bf5f50e021ea62a3ceb19566
[ "MIT" ]
2
2018-04-27T22:12:50.000Z
2020-11-27T23:32:06.000Z
lib3/yaml/__init__.py
sikhberserker/yaml
4a7a400d218ad522bf5f50e021ea62a3ceb19566
[ "MIT" ]
null
null
null
lib3/yaml/__init__.py
sikhberserker/yaml
4a7a400d218ad522bf5f50e021ea62a3ceb19566
[ "MIT" ]
2
2020-01-29T20:36:20.000Z
2021-03-08T02:05:35.000Z
from .error import * from .tokens import * from .events import * from .nodes import * from .loader import * from .dumper import * __version__ = '3.12' try: from .cyaml import * __with_libyaml__ = True except ImportError: __with_libyaml__ = False import io def scan(stream, Loader=Loader): """ S...
30.944272
77
0.671636
a7dff692a7654af5d76aaeba73d4f299b37585e2
2,088
py
Python
python/tests/unit/test_apienforcer.py
Vjrx/airship-drydock
315fb9864e6d55a66d5266f76c160be55d22c98b
[ "Apache-2.0" ]
14
2017-03-07T17:00:22.000Z
2021-04-02T14:15:04.000Z
python/tests/unit/test_apienforcer.py
Vjrx/airship-drydock
315fb9864e6d55a66d5266f76c160be55d22c98b
[ "Apache-2.0" ]
82
2017-02-16T16:54:18.000Z
2018-06-04T13:40:32.000Z
python/tests/unit/test_apienforcer.py
Vjrx/airship-drydock
315fb9864e6d55a66d5266f76c160be55d22c98b
[ "Apache-2.0" ]
16
2017-02-14T19:47:00.000Z
2018-04-26T10:13:05.000Z
# Copyright 2017 AT&T Intellectual Property. All other 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...
33.677419
82
0.691571
f97f53a0df41c49723275ef38c19cb19d0f6e80c
3,713
py
Python
knn classifier (1).py
msabi/KNN-Classification-using-Scikit-learn
ae70af66c5acd8f796e26ab4a12f08579e08d922
[ "MIT" ]
1
2019-08-30T07:22:16.000Z
2019-08-30T07:22:16.000Z
knn classifier (1).py
msabi/KNN-Classification-using-Scikit-learn
ae70af66c5acd8f796e26ab4a12f08579e08d922
[ "MIT" ]
null
null
null
knn classifier (1).py
msabi/KNN-Classification-using-Scikit-learn
ae70af66c5acd8f796e26ab4a12f08579e08d922
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[1]: X = [[0], [1], [2], [3]] y = [0, 0, 1, 1] from sklearn.neighbors import KNeighborsClassifier # In[2]: neigh = KNeighborsClassifier(n_neighbors=3) # In[3]: neigh.fit(X, y) # In[7]: print(neigh.predict([[3]])) # In[8]: print(neigh.predict_proba([[0.9]])) ...
15.867521
118
0.722596
c3adc36dcd5c85a59900279982ca40759c163496
1,338
py
Python
web_dynamic/0-hbnb.py
Zevrov/AirBnB_clone_v3
92a1863e4395404da5b548d3cab10627610e64a9
[ "MIT" ]
1
2021-03-03T17:29:11.000Z
2021-03-03T17:29:11.000Z
web_dynamic/0-hbnb.py
Zevrov/AirBnB_clone_v4
92a1863e4395404da5b548d3cab10627610e64a9
[ "MIT" ]
null
null
null
web_dynamic/0-hbnb.py
Zevrov/AirBnB_clone_v4
92a1863e4395404da5b548d3cab10627610e64a9
[ "MIT" ]
null
null
null
#!/usr/bin/python3 """ Flask App that integrates with AirBnB static HTML Template """ from flask import Flask, render_template, url_for from models import storage # flask setup app = Flask(__name__) app.url_map.strict_slashes = False port = 5000 host = '0.0.0.0' # begin flask page rendering @app.teardown_appcontext...
27.306122
75
0.606876
5bdd83a48ab4a0b4e7c1338881d0f7dd4ae8d3a9
2,955
py
Python
src/migrations/versions/86cd34fa749f_meeting_schedule_schedulecell_tables_.py
akhundMurad/fastapi-bigbluebutton
bfe94d87d8cb9768c17cf5513a05d2b46edf5b5c
[ "MIT" ]
1
2021-07-13T16:28:48.000Z
2021-07-13T16:28:48.000Z
src/migrations/versions/86cd34fa749f_meeting_schedule_schedulecell_tables_.py
akhundMurad/fastapi-bigbluebutton
bfe94d87d8cb9768c17cf5513a05d2b46edf5b5c
[ "MIT" ]
1
2022-03-04T19:06:43.000Z
2022-03-05T06:15:47.000Z
src/migrations/versions/86cd34fa749f_meeting_schedule_schedulecell_tables_.py
akhundMurad/fastapi-bigbluebutton
bfe94d87d8cb9768c17cf5513a05d2b46edf5b5c
[ "MIT" ]
null
null
null
"""Meeting, Schedule, ScheduleCell tables added Revision ID: 86cd34fa749f Revises: d137934b754b Create Date: 2021-07-08 20:41:37.824101 """ import ormar import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '86cd34fa749f' down_revision = 'd137934b754b' branch_labels = Non...
42.214286
147
0.703892
d3bc65eab052c865210396ee6df26403ddd3886c
961
py
Python
WebMirror/management/rss_parser_funcs/feed_parse_extractDeltatranslationsOrg.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
193
2016-08-02T22:04:35.000Z
2022-03-09T20:45:41.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractDeltatranslationsOrg.py
fake-name/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
533
2016-08-23T20:48:23.000Z
2022-03-28T15:55:13.000Z
WebMirror/management/rss_parser_funcs/feed_parse_extractDeltatranslationsOrg.py
rrosajp/ReadableWebProxy
ed5c7abe38706acc2684a1e6cd80242a03c5f010
[ "BSD-3-Clause" ]
19
2015-08-13T18:01:08.000Z
2021-07-12T17:13:09.000Z
def extractDeltatranslationsOrg(item): ''' Parser for 'deltatranslations.org' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('Summoning the Holy Sword', 'Summoning the Holy Sword', ...
41.782609
104
0.570239
01eba9f21cb3e6f7fcb4e28d564581353106a527
6,018
py
Python
backend/production/views.py
DomTripodi93/production-django
133bc119ebcbe2cd63131517932d58f084a0bebd
[ "MIT" ]
null
null
null
backend/production/views.py
DomTripodi93/production-django
133bc119ebcbe2cd63131517932d58f084a0bebd
[ "MIT" ]
9
2020-06-05T22:29:46.000Z
2022-02-26T16:38:35.000Z
backend/production/views.py
DomTripodi93/ProductionManagement
133bc119ebcbe2cd63131517932d58f084a0bebd
[ "MIT" ]
null
null
null
from django.http import HttpResponse from django.conf import settings from django_filters import rest_framework as filter from .models import UserSettings, ProUser, Production, StartTime, Machine, Part, HourlyProduction, ChangeLog from .serializers import ProUserSerializer, UserSettingsSerializer, StartTimeSerializer,...
44.577778
193
0.748255
af2f0af8ab93635aa9cfe5ddc11e71702e4756f2
169
py
Python
tests/model_control/detailed/transf_Fisher/model_control_one_enabled_Fisher_MovingMedian_Seasonal_MonthOfYear_LSTM.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
tests/model_control/detailed/transf_Fisher/model_control_one_enabled_Fisher_MovingMedian_Seasonal_MonthOfYear_LSTM.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
1
2019-11-30T23:39:38.000Z
2019-12-01T04:34:35.000Z
tests/model_control/detailed/transf_Fisher/model_control_one_enabled_Fisher_MovingMedian_Seasonal_MonthOfYear_LSTM.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Fisher'] , ['MovingMedian'] , ['Seasonal_MonthOfYear'] , ['LSTM'] );
42.25
91
0.763314
6ebb4e58b0e07e49f50ecba5c9dfbc9ad1fd8bc2
8,574
py
Python
bitswap/session/session.py
VladislavSufyanov/py-bitswap
875d15944e485c33b16af9965f24c1d85cb34c55
[ "MIT" ]
null
null
null
bitswap/session/session.py
VladislavSufyanov/py-bitswap
875d15944e485c33b16af9965f24c1d85cb34c55
[ "MIT" ]
null
null
null
bitswap/session/session.py
VladislavSufyanov/py-bitswap
875d15944e485c33b16af9965f24c1d85cb34c55
[ "MIT" ]
null
null
null
from typing import Union, Dict, Optional, List, TYPE_CHECKING import weakref import asyncio from logging import INFO from time import monotonic from cid import CIDv0, CIDv1 from .peer_score import PeerScore from ..connection_manager.sender import Sender from ..message.proto_buff import ProtoBuff from ..logger import ...
48.715909
117
0.614532
cf69ff973d91be24d32d35804548f17263d7cceb
559
py
Python
utils/cal_bleu.py
laihuiyuan/Multilingual-TST
84fab28b30e347ad42ed7dff737dab86b15ece5f
[ "MIT" ]
3
2022-02-25T09:51:29.000Z
2022-02-25T22:09:08.000Z
utils/cal_bleu.py
laihuiyuan/multilingual-tst
84fab28b30e347ad42ed7dff737dab86b15ece5f
[ "MIT" ]
null
null
null
utils/cal_bleu.py
laihuiyuan/multilingual-tst
84fab28b30e347ad42ed7dff737dab86b15ece5f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import sys import nltk from nltk.translate.bleu_score import sentence_bleu from nltk.translate.bleu_score import SmoothingFunction hyp, ref = [], [] with open(sys.argv[1],'r') as f: for line in f.readlines(): hyp = nltk.word_tokenize(line.strip(), language=sys.argv[3]) with open(...
25.409091
74
0.703041
4711ea6e19200050f28a3c09cb51393281c8c0db
47,635
py
Python
django/db/models/sql/compiler.py
krallin/django
c94db53eaa9b344f9227fa4dff2b1a5e9c7dce9d
[ "BSD-3-Clause" ]
null
null
null
django/db/models/sql/compiler.py
krallin/django
c94db53eaa9b344f9227fa4dff2b1a5e9c7dce9d
[ "BSD-3-Clause" ]
null
null
null
django/db/models/sql/compiler.py
krallin/django
c94db53eaa9b344f9227fa4dff2b1a5e9c7dce9d
[ "BSD-3-Clause" ]
null
null
null
import datetime from django.conf import settings from django.core.exceptions import FieldError from django.db import transaction from django.db.backends.util import truncate_name from django.db.models.constants import LOOKUP_SEP from django.db.models.query_utils import select_related_descend from django.db.models.sql....
44.147359
136
0.579826
aa95ed9ae10fb22124d05bb4e312fa02ae2f00bc
4,437
py
Python
create_dns_records.py
davefontaine/network_scripts
fe4f064c8e3df9433a51d5c41035c065f8dc1c47
[ "Apache-2.0" ]
null
null
null
create_dns_records.py
davefontaine/network_scripts
fe4f064c8e3df9433a51d5c41035c065f8dc1c47
[ "Apache-2.0" ]
null
null
null
create_dns_records.py
davefontaine/network_scripts
fe4f064c8e3df9433a51d5c41035c065f8dc1c47
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # create_dns_record.py # input: list of filenames to parse; filename must contain hostname eg. lca1-crt01.nw-config.txt # output: a dns entry to stdout for # import sys import re from ciscoconfparse import CiscoConfParse # site code all_sites = ["lca1", "lva1"] # enviornment code all_enviro...
31.246479
165
0.64503
370aefe138a667d99e7a54e8816434abc2d8cd95
2,878
py
Python
python/day11.py
davidlowryduda/AoC18
cb1a5abb6fae8a00e805b3c76125e2db8d452cff
[ "MIT" ]
null
null
null
python/day11.py
davidlowryduda/AoC18
cb1a5abb6fae8a00e805b3c76125e2db8d452cff
[ "MIT" ]
null
null
null
python/day11.py
davidlowryduda/AoC18
cb1a5abb6fae8a00e805b3c76125e2db8d452cff
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 """ Solve day 11 """ from utils import input_lines def power_level(x, y, serial=8): """ A nonsense sequence of steps described in the puzzle instructions. """ rackID = x + 10 level = rackID * y level += serial level *= rackID level = (level // 100) % 10 lev...
24.389831
78
0.583739
b18be6cac1a00ed4cf0143ae74ccd170e4385657
2,490
py
Python
code/analysis/delayedfeedback/optimalcontrolutils.py
dmytrov/stochasticcontrol
a289d5c0953c4a328b2177f51168588248c00f2c
[ "MIT" ]
null
null
null
code/analysis/delayedfeedback/optimalcontrolutils.py
dmytrov/stochasticcontrol
a289d5c0953c4a328b2177f51168588248c00f2c
[ "MIT" ]
null
null
null
code/analysis/delayedfeedback/optimalcontrolutils.py
dmytrov/stochasticcontrol
a289d5c0953c4a328b2177f51168588248c00f2c
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import analysis.delayedfeedback.fittingutils as fu def InverseOptimalControl(object): def __init__(self): pass def infer_cost(trajectories): """ Infers the goal cost of the optimal controller. Assumptions: - cost is lin...
31.125
86
0.593976
18a042ca97932e8ef946668912e6886a8c544f26
16,798
py
Python
pydantic/networks.py
fictorial/pydantic
9d631a3429a66f30742c1a52c94ac18ec6ba848d
[ "MIT" ]
1
2020-05-03T06:32:47.000Z
2020-05-03T06:32:47.000Z
pydantic/networks.py
fictorial/pydantic
9d631a3429a66f30742c1a52c94ac18ec6ba848d
[ "MIT" ]
152
2020-07-29T06:20:57.000Z
2021-10-04T08:01:55.000Z
pydantic/networks.py
amirkdv/pydantic
ef4678999f94625819ebad61b44ea264479aeb0a
[ "MIT" ]
1
2022-03-01T09:58:06.000Z
2022-03-01T09:58:06.000Z
import re from ipaddress import ( IPv4Address, IPv4Interface, IPv4Network, IPv6Address, IPv6Interface, IPv6Network, _BaseAddress, _BaseNetwork, ) from typing import ( TYPE_CHECKING, Any, Collection, Dict, Generator, Optional, Pattern, Set, Tuple, T...
29.730973
118
0.595666
055745599eaad55ed775b331593a5de7185c78f9
1,057
py
Python
reads/models.py
mguarascio/runnerreads-com
3bc877cf24370cf881a98a1c5915693464bc69e8
[ "MIT" ]
null
null
null
reads/models.py
mguarascio/runnerreads-com
3bc877cf24370cf881a98a1c5915693464bc69e8
[ "MIT" ]
null
null
null
reads/models.py
mguarascio/runnerreads-com
3bc877cf24370cf881a98a1c5915693464bc69e8
[ "MIT" ]
null
null
null
from django.db import models class Book(models.Model): title = models.CharField(max_length=255) link = models.CharField(max_length=2000) ASIN = models.CharField(max_length=20) large_image = models.CharField(max_length=255, null=True) medium_image = models.CharField(max_length=255, null=True) ...
37.75
85
0.719016
0959210a0d1290d1d5504f7ce2a2b580078c3805
36,680
py
Python
__init__.py
rocketbot-cl/MercadoPago
2bf71bb28626afbfe10e83c630503be4f1150396
[ "MIT" ]
null
null
null
__init__.py
rocketbot-cl/MercadoPago
2bf71bb28626afbfe10e83c630503be4f1150396
[ "MIT" ]
null
null
null
__init__.py
rocketbot-cl/MercadoPago
2bf71bb28626afbfe10e83c630503be4f1150396
[ "MIT" ]
null
null
null
# coding: utf-8 """ Base para desarrollo de modulos externos. Para obtener el modulo/Funcion que se esta llamando: GetParams("module") Para obtener las variables enviadas desde formulario/comando Rocketbot: var = GetParams(variable) Las "variable" se define en forms del archivo package.json Para modifica...
77.547569
8,651
0.803353
9536c43080761f0c324bcbd72551f92c5b4bf023
422
py
Python
venv/Scripts/pip3-script.py
Favorsiki/LearningLog
a71b2c006ea0888c884d0e3b534726dd66ab5720
[ "MIT" ]
null
null
null
venv/Scripts/pip3-script.py
Favorsiki/LearningLog
a71b2c006ea0888c884d0e3b534726dd66ab5720
[ "MIT" ]
null
null
null
venv/Scripts/pip3-script.py
Favorsiki/LearningLog
a71b2c006ea0888c884d0e3b534726dd66ab5720
[ "MIT" ]
null
null
null
#!C:\Users\Favorsiky\PycharmProjects\learning_log\venv\Scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'pip==19.0.3','console_scripts','pip3' __requires__ = 'pip==19.0.3' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', ...
32.461538
73
0.677725
fcb651ba1c81a06c95b7b9216ea460d4b7c10d38
3,974
py
Python
virtual/lib/python3.6/site-packages/unidecode/x021.py
OKC254/flask-blog
78dc43f6ba981822f17026b071db6aaf4680daad
[ "MIT" ]
8
2015-03-05T21:09:40.000Z
2020-02-03T09:15:09.000Z
vendor-local/lib/python/unidecode/x021.py
yvan-sraka/wprevents
03f95150fe7c09338c3a17e00a4b85febef87789
[ "BSD-3-Clause" ]
29
2015-02-24T11:11:26.000Z
2017-08-25T08:30:18.000Z
vendor-local/lib/python/unidecode/x021.py
Acidburn0zzz/airmozilla
7b03af6d6efe9af00a6070f5327e10fb755c3766
[ "BSD-3-Clause" ]
6
2015-04-23T16:47:34.000Z
2017-10-13T19:11:53.000Z
data = ( '', # 0x00 '', # 0x01 '', # 0x02 '', # 0x03 '', # 0x04 '', # 0x05 '', # 0x06 '', # 0x07 '', # 0x08 '', # 0x09 '', # 0x0a '', # 0x0b '', # 0x0c '', # 0x0d '', # 0x0e '', # 0x0f '', # 0x10 '', # 0x11 '', # 0x12 '', # 0x13 '', # 0x14 '', # 0x15 '',...
15.403101
18
0.283593
d9db3c809a7b351ec1f7eae5822d1d4f262f19e4
658
py
Python
python/lib/team.py
omardelarosa/godot-python-demo-game
c9c91b2a8e838c315dae6d6d597ce75a20318747
[ "CC-BY-3.0" ]
null
null
null
python/lib/team.py
omardelarosa/godot-python-demo-game
c9c91b2a8e838c315dae6d6d597ce75a20318747
[ "CC-BY-3.0" ]
null
null
null
python/lib/team.py
omardelarosa/godot-python-demo-game
c9c91b2a8e838c315dae6d6d597ce75a20318747
[ "CC-BY-3.0" ]
null
null
null
import uuid class Team: NULL_ID = "-1" DEFAULT_PROPERTIES = { "id": NULL_ID, "name": "Unnamed Team", } def __init__(self, properties={}): self.id = ( properties["id"] if "id" in properties else str(uuid.uuid4()) ) # generates a uuid self.name = (...
21.225806
73
0.50304
17e5df6bc9bba9bf273c39b2d24e834ce15df102
2,798
py
Python
protobuf/SubscribeResp_pb2.py
wonghoifung/learning-python
ad1691be1d185bfff828779a553b2c59d36d16ea
[ "MIT" ]
null
null
null
protobuf/SubscribeResp_pb2.py
wonghoifung/learning-python
ad1691be1d185bfff828779a553b2c59d36d16ea
[ "MIT" ]
null
null
null
protobuf/SubscribeResp_pb2.py
wonghoifung/learning-python
ad1691be1d185bfff828779a553b2c59d36d16ea
[ "MIT" ]
null
null
null
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: SubscribeResp.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as ...
32.534884
232
0.751251
e014ebafc7e3efae5bcbd599f141475ea3221b4c
6,217
py
Python
gdk/commands/component/project_utils.py
timmattison/aws-greengrass-gdk-cli
60a002f0f2fee84b79022662ba0cae9e0246b6f8
[ "Apache-2.0" ]
10
2022-01-15T09:50:32.000Z
2022-03-26T16:39:49.000Z
gdk/commands/component/project_utils.py
timmattison/aws-greengrass-gdk-cli
60a002f0f2fee84b79022662ba0cae9e0246b6f8
[ "Apache-2.0" ]
46
2021-11-30T19:49:16.000Z
2022-03-31T07:14:23.000Z
gdk/commands/component/project_utils.py
timmattison/aws-greengrass-gdk-cli
60a002f0f2fee84b79022662ba0cae9e0246b6f8
[ "Apache-2.0" ]
7
2021-11-30T19:49:42.000Z
2022-03-17T16:25:34.000Z
import json import logging from pathlib import Path import boto3 import gdk.common.configuration as config_actions import gdk.common.consts as consts import gdk.common.exceptions.error_messages as error_messages import gdk.common.utils as utils import yaml def get_supported_component_builds(): """ Reads a js...
38.376543
121
0.72913
3d54bf99d09bc685117ff53dd168f2c457c9fce7
46,084
py
Python
scripts/pylint_extensions.py
serbarbosa/oppia
450e094392995794553b2ad64cd82c233d9b591d
[ "Apache-2.0" ]
null
null
null
scripts/pylint_extensions.py
serbarbosa/oppia
450e094392995794553b2ad64cd82c233d9b591d
[ "Apache-2.0" ]
null
null
null
scripts/pylint_extensions.py
serbarbosa/oppia
450e094392995794553b2ad64cd82c233d9b591d
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2018 The Oppia 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 requi...
39.120543
114
0.59244
9b7ad98e41280dacbdff14e258b300919af0cdc2
3,748
py
Python
agrspy/envspy-histaqi/codes/postproc.py
soonyenju/agrspy
1c5d11d48933f7392d2246fda487256d5cd5b239
[ "MIT" ]
2
2019-01-10T07:00:25.000Z
2019-01-10T07:15:00.000Z
agrspy/envspy-histaqi/codes/postproc.py
soonyenju/arspy
1c5d11d48933f7392d2246fda487256d5cd5b239
[ "MIT" ]
null
null
null
agrspy/envspy-histaqi/codes/postproc.py
soonyenju/arspy
1c5d11d48933f7392d2246fda487256d5cd5b239
[ "MIT" ]
null
null
null
import os, json import config import numpy as np import pandas as pd from datetime import datetime from pathlib import Path class Postor(config.Config): """ Create a new postor """ def __init__(self, hub_path): super(Postor, self).__init__() self.hub_path = hub_path def merger(self, new_path, out_name = '...
32.034188
88
0.688367
308ffd4b8d5e47a7cfc10617f76181bbcb029edb
17,292
py
Python
venv/lib/python3.6/site-packages/ansible_collections/cisco/ucs/plugins/modules/ucs_ip_pool.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
10
2020-05-19T01:51:28.000Z
2021-11-16T11:36:32.000Z
venv/lib/python3.6/site-packages/ansible_collections/cisco/ucs/plugins/modules/ucs_ip_pool.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
19
2020-03-04T15:35:26.000Z
2022-03-31T04:35:19.000Z
venv/lib/python3.6/site-packages/ansible_collections/cisco/ucs/plugins/modules/ucs_ip_pool.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
9
2019-12-03T15:20:02.000Z
2021-06-18T18:08:39.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
38.172185
139
0.601319
d06092a45e6010a00b87ac6dfd277439886bd190
1,408
py
Python
scripts/Archive/oldmakecenters3d.py
wahabk/colloidoscope
508918703405e07c336c0ad97cf6b3e87db311bb
[ "MIT" ]
null
null
null
scripts/Archive/oldmakecenters3d.py
wahabk/colloidoscope
508918703405e07c336c0ad97cf6b3e87db311bb
[ "MIT" ]
null
null
null
scripts/Archive/oldmakecenters3d.py
wahabk/colloidoscope
508918703405e07c336c0ad97cf6b3e87db311bb
[ "MIT" ]
null
null
null
def make_random_centers_3d(canvas_size, n, zoom, min_dist): ''' Generate random centers of particles This is a place holder for bringing in simulated particle trajectories from dynamo ''' canvas_size = [int(c/zoom) for c in canvas_size] min_dist = min_dist/zoom z = random.randint(0, canvas_size[0]) y = random....
31.288889
83
0.650568
1a6b682192abb5e6c2fd29f18d7934ec83bbc162
21,490
py
Python
src/tests/api/test_permissions.py
prereg/prereg
5000c279a801fa2260009b15dd90e3bd4f447785
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/tests/api/test_permissions.py
prereg/prereg
5000c279a801fa2260009b15dd90e3bd4f447785
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/tests/api/test_permissions.py
prereg/prereg
5000c279a801fa2260009b15dd90e3bd4f447785
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import time import pytest from django.test import override_settings from django.utils.timezone import now from pretix.base.models import Organizer event_urls = [ (None, ''), (None, 'categories/'), ('can_view_orders', 'invoices/'), (None, 'items/'), ('can_view_orders', 'orders/'), ('can_view_o...
43.15261
145
0.674872
460a463dc61cdd38ed028e551b41b6b6d7d04310
14,442
py
Python
utils.py
raechelwalker/mrtl
49118f48b798fb7b55c7b479f49c4ac9c966ed19
[ "MIT" ]
null
null
null
utils.py
raechelwalker/mrtl
49118f48b798fb7b55c7b479f49c4ac9c966ed19
[ "MIT" ]
null
null
null
utils.py
raechelwalker/mrtl
49118f48b798fb7b55c7b479f49c4ac9c966ed19
[ "MIT" ]
null
null
null
import logging import os from datetime import datetime import cartopy.crs as ccrs import cartopy.feature as cfeature import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns import torch import torch.utils.data import xarray as xr from cp_als import unfold def set_logger(logger, l...
32.453933
81
0.580944
01799cb4e12a93c61f019a95f97b8bbe444dff20
543
py
Python
src/trigger.py
nurullah/jupyter-notebook-rest-api
36d08c04fb2c61d1892e6c499461fb0e08f63239
[ "MIT" ]
null
null
null
src/trigger.py
nurullah/jupyter-notebook-rest-api
36d08c04fb2c61d1892e6c499461fb0e08f63239
[ "MIT" ]
null
null
null
src/trigger.py
nurullah/jupyter-notebook-rest-api
36d08c04fb2c61d1892e6c499461fb0e08f63239
[ "MIT" ]
null
null
null
import nbformat from nbconvert.preprocessors import ExecutePreprocessor from nbparameterise import ( extract_parameters, replace_definitions, parameter_values ) def trigger(notebook_filename='hello.ipynb', params={}): with open(notebook_filename) as f: nb = nbformat.read(f, as_version=4) orig_para...
31.941176
81
0.760589
c231a269a3037ce156f5d889bee6db2f2f6c7a0e
1,082
py
Python
tests/state/temporary/modules/models/dosomething/__init__.py
da-h/miniflask
d5e594153cca4ce4d30db01b1d06d05afa9e7aaa
[ "MIT" ]
5
2020-02-17T12:14:36.000Z
2020-02-27T12:09:05.000Z
tests/state/temporary/modules/models/dosomething/__init__.py
da-h/miniflask
d5e594153cca4ce4d30db01b1d06d05afa9e7aaa
[ "MIT" ]
69
2020-04-03T08:16:35.000Z
2021-12-21T15:46:29.000Z
tests/state/temporary/modules/models/dosomething/__init__.py
da-h/miniflask
d5e594153cca4ce4d30db01b1d06d05afa9e7aaa
[ "MIT" ]
1
2020-04-02T15:46:39.000Z
2020-04-02T15:46:39.000Z
from miniflask.exceptions import StateKeyError def dosomething(state, event): del event # unused print("in event: variable =", state["variable"]) if "new_variable" in state: print("in event: new_variable =", state["new_variable"]) def main(state, event): state["new_variable"] = 42 del ...
24.044444
64
0.622921
f1c468439f11d19e3fc030dbdf5145965a4a8287
5,323
py
Python
anomaly-injector-agent/cassandra_stresser.py
citlab/distributed-anomaly-injection
8be390e0bace6aa87fe60fa744e97408c40e7375
[ "Apache-2.0" ]
null
null
null
anomaly-injector-agent/cassandra_stresser.py
citlab/distributed-anomaly-injection
8be390e0bace6aa87fe60fa744e97408c40e7375
[ "Apache-2.0" ]
null
null
null
anomaly-injector-agent/cassandra_stresser.py
citlab/distributed-anomaly-injection
8be390e0bace6aa87fe60fa744e97408c40e7375
[ "Apache-2.0" ]
1
2022-03-06T23:18:34.000Z
2022-03-06T23:18:34.000Z
# coding=utf-8 from cassandra.cluster import Cluster from cassandra.query import SimpleStatement import random import time import sys import signal import argparse parser = argparse.ArgumentParser() parser.add_argument("cluster_ip", help="The ip of one of the cluster nodes") parser.add_argument("-m", "--mode", help="s...
34.121795
137
0.68514
5e40dd4f1d01efed6ab94dde8d0cb50630ee640c
2,922
py
Python
posetta/writers/_writer.py
gahjelle/posetta
6e052c19a64b0bbdd0b9a7d3ac703000e615d53e
[ "MIT" ]
2
2018-05-15T00:50:34.000Z
2019-02-25T11:08:27.000Z
posetta/writers/_writer.py
gahjelle/posetta
6e052c19a64b0bbdd0b9a7d3ac703000e615d53e
[ "MIT" ]
13
2018-07-06T08:52:52.000Z
2018-12-07T13:49:34.000Z
posetta/writers/_writer.py
gahjelle/posetta
6e052c19a64b0bbdd0b9a7d3ac703000e615d53e
[ "MIT" ]
2
2018-04-28T14:31:40.000Z
2018-05-14T21:19:27.000Z
"""Basic functionality for writing datafiles, extended by individual writers Description: ------------ This module contains an abstract base class that can be extended for writing data files in Posetta. """ # Standard library imports import codecs from typing import IO # Third party imports # Posetta imports from ...
32.831461
88
0.638261
b09d02b08bbbc81018fd0dc7c2e2d3db1532556b
1,376
py
Python
src/word_segmentation.py
vinnymaker18/funlp
59859585526dc88339f80c8c797672587474f0e2
[ "MIT" ]
null
null
null
src/word_segmentation.py
vinnymaker18/funlp
59859585526dc88339f80c8c797672587474f0e2
[ "MIT" ]
null
null
null
src/word_segmentation.py
vinnymaker18/funlp
59859585526dc88339f80c8c797672587474f0e2
[ "MIT" ]
null
null
null
"""Word segmentation algorithms.""" import re from min_edit_distance import min_edit_distance def max_match(sentence, dictionary): """ MaxMatch algorithm for segmenting a sentence into a list of words/tokens. """ # We first remove whitespace from sentence. sentence = re.sub('\W', '', senten...
29.276596
74
0.637355
b4db7f625b9560380ffd64658b655b09840a7a76
2,430
py
Python
SPADE/data/base_method/image_option.py
kaijieshi7/oneflow_imaginaire
51e90165eeb3e8b22be1bec0ed3f7deb7d87b482
[ "Apache-2.0" ]
null
null
null
SPADE/data/base_method/image_option.py
kaijieshi7/oneflow_imaginaire
51e90165eeb3e8b22be1bec0ed3f7deb7d87b482
[ "Apache-2.0" ]
null
null
null
SPADE/data/base_method/image_option.py
kaijieshi7/oneflow_imaginaire
51e90165eeb3e8b22be1bec0ed3f7deb7d87b482
[ "Apache-2.0" ]
null
null
null
from PIL import Image import numpy as np import cv2 def loaded_image2ndarray(image, opt, method=cv2.INTER_CUBIC): h, w, c = image.shape # w = opt.load_size # h = int(opt.load_size * h/w) h, w = opt.my_size_h, opt.my_size_w image = cv2.resize(image, (w, h), interpolation=method) if opt.flip: ...
32.837838
70
0.634568
0705705a3c49dcf7042c9703c0dce80eee2a7198
2,879
py
Python
peekingduck/pipeline/nodes/model/efficientdet_d04/efficientdet_files/utils/model_process.py
leeping-ng/PeekingDuck
16784b4c35f30c463fcc0c7caccdda6141797a6b
[ "Apache-2.0" ]
1
2021-08-19T09:39:14.000Z
2021-08-19T09:39:14.000Z
peekingduck/pipeline/nodes/model/efficientdet_d04/efficientdet_files/utils/model_process.py
sidney-tio/PeekingDuck
966734ab81c9e466ab51495644673c2d52daf17c
[ "Apache-2.0" ]
null
null
null
peekingduck/pipeline/nodes/model/efficientdet_d04/efficientdet_files/utils/model_process.py
sidney-tio/PeekingDuck
966734ab81c9e466ab51495644673c2d52daf17c
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 AI Singapore # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
32.348315
76
0.64571
256febabd21ed9fa9e957c084dce0a6db15b9c30
1,276
py
Python
dataschema/schema_example.py
vingkan/sql_tools
5d6ab6a0ae31dc51e51ac1629f83f7bbf91396c1
[ "Apache-2.0" ]
1
2022-03-30T19:47:16.000Z
2022-03-30T19:47:16.000Z
dataschema/schema_example.py
vingkan/sql_tools
5d6ab6a0ae31dc51e51ac1629f83f7bbf91396c1
[ "Apache-2.0" ]
null
null
null
dataschema/schema_example.py
vingkan/sql_tools
5d6ab6a0ae31dc51e51ac1629f83f7bbf91396c1
[ "Apache-2.0" ]
1
2022-03-30T04:07:12.000Z
2022-03-30T04:07:12.000Z
# # nuna_sql_tools: Copyright 2022 Nuna 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...
34.486486
79
0.775078
fc052ef3d1aa691eca8a68fd9e76951cbacadc7a
531
py
Python
lab/refactoring/replace_temp_with_query_fowler.py
Tanner-York-Make-School/SPD-2.31-Testing-and-Architecture
623537a05cf5a9d50370a414a5056a78f95288eb
[ "MIT" ]
null
null
null
lab/refactoring/replace_temp_with_query_fowler.py
Tanner-York-Make-School/SPD-2.31-Testing-and-Architecture
623537a05cf5a9d50370a414a5056a78f95288eb
[ "MIT" ]
null
null
null
lab/refactoring/replace_temp_with_query_fowler.py
Tanner-York-Make-School/SPD-2.31-Testing-and-Architecture
623537a05cf5a9d50370a414a5056a78f95288eb
[ "MIT" ]
null
null
null
""" Adapted from a Java code in the "Refactoring" book by Martin Fowler. Replace temp with query Code snippet. Not runnable. """ def get_price(quantity, item_price): """Gets the total price of a purchace given the quantiy and the items price""" base_price = quantity * item_price discount_factor = get_disco...
31.235294
82
0.736347
5bf0f3f5253f45f1da440e156ebbad03805c1770
712
py
Python
sysinv/sysinv/sysinv/sysinv/objects/storage_file.py
albailey/config
40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9
[ "Apache-2.0" ]
10
2020-02-07T18:57:44.000Z
2021-09-11T10:29:34.000Z
sysinv/sysinv/sysinv/sysinv/objects/storage_file.py
albailey/config
40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9
[ "Apache-2.0" ]
1
2021-01-14T12:01:55.000Z
2021-01-14T12:01:55.000Z
sysinv/sysinv/sysinv/sysinv/objects/storage_file.py
albailey/config
40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9
[ "Apache-2.0" ]
10
2020-10-13T08:37:46.000Z
2022-02-09T00:21:25.000Z
# # Copyright (c) 2017 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # # vim: tabstop=4 shiftwidth=4 softtabstop=4 # coding=utf-8 # from sysinv.db import api as db_api from sysinv.objects import base from sysinv.objects import storage_backend class StorageFile(storage_backend.StorageBackend): ...
24.551724
78
0.698034
ecb35a1e724a5a772253ca21a243802eb8427441
10,508
py
Python
core_tools/data/ds/data_set_DataMgr.py
peendebak/core_tools
2e43edf0bbc1d7ceb7042559db499535e8f6a076
[ "BSD-2-Clause" ]
1
2022-02-11T09:24:35.000Z
2022-02-11T09:24:35.000Z
core_tools/data/ds/data_set_DataMgr.py
peendebak/core_tools
2e43edf0bbc1d7ceb7042559db499535e8f6a076
[ "BSD-2-Clause" ]
null
null
null
core_tools/data/ds/data_set_DataMgr.py
peendebak/core_tools
2e43edf0bbc1d7ceb7042559db499535e8f6a076
[ "BSD-2-Clause" ]
2
2020-07-06T14:31:27.000Z
2021-07-07T13:57:19.000Z
import numpy as np import copy import string class m_param_origanizer(): def __init__(self, m_param_raw): self.m_param_raw = m_param_raw def get(self, key, nth_set): items = self[key] for i in items: if i.nth_set == nth_set: return i raise ValueErro...
37.798561
228
0.574705
9c3cf7ee3df54990f99e6772b7382d4e8c3174b0
6,575
py
Python
pysrc/lib/math2d.py
Blimba/PyWC3
16d519bbb98e7593b8d14d14d9b81b6d6932ef0c
[ "MIT" ]
14
2020-02-16T14:25:02.000Z
2021-12-07T13:57:34.000Z
pysrc/lib/math2d.py
sylvainSUPINTERNET/PyWC3
16d519bbb98e7593b8d14d14d9b81b6d6932ef0c
[ "MIT" ]
3
2020-04-20T02:31:31.000Z
2022-02-25T17:06:12.000Z
pysrc/lib/math2d.py
sylvainSUPINTERNET/PyWC3
16d519bbb98e7593b8d14d14d9b81b6d6932ef0c
[ "MIT" ]
2
2021-03-17T13:15:32.000Z
2021-09-26T09:24:21.000Z
import math from ..df.commonj import * class Vector2: active = [] _fifo_buffer_size = 50 # this is the amount of temporary vectors used _loc = None _bin = {} def __new__(cls,x=0.0,y=0.0,temp=False): if cls in Vector2._bin and len(Vector2._bin[cls]) > cls._fifo_buffer_size: o =...
31.014151
102
0.540228
7dc6f455566fec5a6d7d812e34893ee321fea8c1
431
py
Python
onadata/apps/fieldsight/token_gen_invites.py
awemulya/fieldsight-kobocat
f302d084e30fb637d43ec638c701e01a3dddc721
[ "BSD-2-Clause" ]
38
2017-02-28T05:39:40.000Z
2019-01-16T04:39:04.000Z
onadata/apps/fieldsight/token_gen_invites.py
awemulya/fieldsightt
f302d084e30fb637d43ec638c701e01a3dddc721
[ "BSD-2-Clause" ]
20
2017-04-27T09:14:27.000Z
2019-01-17T06:35:52.000Z
onadata/apps/fieldsight/token_gen_invites.py
awemulya/fieldsightt
f302d084e30fb637d43ec638c701e01a3dddc721
[ "BSD-2-Clause" ]
5
2017-02-22T12:25:19.000Z
2019-01-15T11:16:40.000Z
from django.contrib.auth.tokens import PasswordResetTokenGenerator from django.utils import six import datetime class InviteActivationTokenGenerator(PasswordResetTokenGenerator): def _make_hash_value(self, invite): return ( six.text_type(invite.pk) + six.text_type(datetime.datetime.now()) + ...
35.916667
79
0.756381
88b740445ff902e3eb8e08dcae209e18b37da896
23,756
py
Python
pyqg/changed_f_beta_nk0_filter_tilde_newdomain/layered_model.py
wanyingkang/pyqg
ffcb48573a4a66d7c48f64c69734a567547e0962
[ "MIT" ]
null
null
null
pyqg/changed_f_beta_nk0_filter_tilde_newdomain/layered_model.py
wanyingkang/pyqg
ffcb48573a4a66d7c48f64c69734a567547e0962
[ "MIT" ]
null
null
null
pyqg/changed_f_beta_nk0_filter_tilde_newdomain/layered_model.py
wanyingkang/pyqg
ffcb48573a4a66d7c48f64c69734a567547e0962
[ "MIT" ]
null
null
null
from __future__ import print_function import numpy as np from numpy import pi from . import model try: import mkl np.use_fastnumpy = True except ImportError: pass try: import pyfftw pyfftw.interfaces.cache.enable() except ImportError: pass class LayeredModel(model.Model): r"""Layered quas...
44.822642
171
0.519953
0cabaf02466e9cacc7105ed26fd9122ff7e01576
496
py
Python
01-DesenvolvimentoDeSistemas/02-LinguagensDeProgramacao/01-Python/01-ListaDeExercicios/02-Aluno/Roberto/exc0029.py
moacirsouza/nadas
ad98d73b4281d1581fd2b2a9d29001acb426ee56
[ "MIT" ]
1
2020-07-03T13:54:18.000Z
2020-07-03T13:54:18.000Z
01-DesenvolvimentoDeSistemas/02-LinguagensDeProgramacao/01-Python/01-ListaDeExercicios/02-Aluno/Roberto/exc0029.py
moacirsouza/nadas
ad98d73b4281d1581fd2b2a9d29001acb426ee56
[ "MIT" ]
null
null
null
01-DesenvolvimentoDeSistemas/02-LinguagensDeProgramacao/01-Python/01-ListaDeExercicios/02-Aluno/Roberto/exc0029.py
moacirsouza/nadas
ad98d73b4281d1581fd2b2a9d29001acb426ee56
[ "MIT" ]
null
null
null
print(""" 029) Escreva um programa que leia a velocidade de um carro. Se ele ultrapassar 80Km/h, mostre uma mensagem dizendo que ele foi multado. A multa vai custar R$7,00 por cada quilômetro acima do limite. """) velocidade = float(input('Velocidade de Veículo (Em Km/h): ')) if velocidade > 80: valordamulta = (vel...
33.066667
86
0.705645
088c80b96dca9f0208a93e9329132d33896a29dd
1,096
py
Python
SettlementBuilder.py
Niels-NTG/GDMC2022
515f4b7dd6f04af9714e7773f36cc9b3f1da1b95
[ "MIT" ]
null
null
null
SettlementBuilder.py
Niels-NTG/GDMC2022
515f4b7dd6f04af9714e7773f36cc9b3f1da1b95
[ "MIT" ]
null
null
null
SettlementBuilder.py
Niels-NTG/GDMC2022
515f4b7dd6f04af9714e7773f36cc9b3f1da1b95
[ "MIT" ]
null
null
null
import numpy as np import mapUtils from Node import Node class SettlementBuilder: def __init__(self): # DEBUG # central RNG generator rng = np.random.default_rng() buildArea = mapUtils.getBuildArea() startingPos = (10, 10) # DEBUG mapUtils.fill( ...
24.355556
70
0.546533
62fa0942c55556730d2c701b1a6ce0ca139be218
1,221
py
Python
gfootball/env/players/agent.py
seccoboy/football
c5c6a5c1d587a94673597ff6d61da43044a0c9ac
[ "Apache-2.0" ]
3,091
2019-06-03T13:00:48.000Z
2022-03-31T05:45:56.000Z
gfootball/env/players/agent.py
seccoboy/football
c5c6a5c1d587a94673597ff6d61da43044a0c9ac
[ "Apache-2.0" ]
287
2019-06-07T14:35:25.000Z
2022-03-19T12:36:42.000Z
gfootball/env/players/agent.py
seccoboy/football
c5c6a5c1d587a94673597ff6d61da43044a0c9ac
[ "Apache-2.0" ]
1,418
2019-06-03T13:11:19.000Z
2022-03-31T02:51:30.000Z
# coding=utf-8 # Copyright 2019 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
32.131579
82
0.765766
d8037602be1571ee7156f417b79570f22a6e1897
15,723
py
Python
tests/data_context/test_data_context_datasource_runtime_data_connector.py
zachzIAM/great_expectations
6c949285825571954bf272543fbd8b0cd4396685
[ "Apache-2.0" ]
null
null
null
tests/data_context/test_data_context_datasource_runtime_data_connector.py
zachzIAM/great_expectations
6c949285825571954bf272543fbd8b0cd4396685
[ "Apache-2.0" ]
null
null
null
tests/data_context/test_data_context_datasource_runtime_data_connector.py
zachzIAM/great_expectations
6c949285825571954bf272543fbd8b0cd4396685
[ "Apache-2.0" ]
null
null
null
import pytest import great_expectations import great_expectations.exceptions as ge_exceptions from great_expectations.core.batch import Batch, RuntimeBatchRequest from great_expectations.validator.validator import Validator def test_get_batch_successful_specification_sqlalchemy_engine( data_context_with_datasour...
43.433702
114
0.696877
a2e1f301e04e81b3d704193a412137c9c218d91c
2,065
py
Python
tests/test_extract_genome_region.py
xguse/extract-genome-region
33ba2732edbe882ed8461f4abb6b4fa34239ffa8
[ "BSD-2-Clause" ]
2
2016-09-27T06:01:52.000Z
2021-06-28T07:54:06.000Z
tests/test_extract_genome_region.py
xguse/extract-genome-region
33ba2732edbe882ed8461f4abb6b4fa34239ffa8
[ "BSD-2-Clause" ]
null
null
null
tests/test_extract_genome_region.py
xguse/extract-genome-region
33ba2732edbe882ed8461f4abb6b4fa34239ffa8
[ "BSD-2-Clause" ]
null
null
null
"""Provide functions to test this library.""" from __future__ import absolute_import, print_function import types import pyfaidx import pytest import extract_genome_region.__main__ as egr def gfui049232_info(): """Provide true data that we can use to confirm correctness.""" real = pyfaidx.Fasta("tests/data...
29.927536
91
0.645036
f32ae32c3e00b6df7234b8ebeeffe0b36495bb18
15,374
py
Python
backups/render_video___2_seeds__1d__backup_2-12-2020.py
bjdarrer/tf2-model-g
26cf7bba9f1cc13e226834b3565c7b8df5fcc40a
[ "MIT" ]
null
null
null
backups/render_video___2_seeds__1d__backup_2-12-2020.py
bjdarrer/tf2-model-g
26cf7bba9f1cc13e226834b3565c7b8df5fcc40a
[ "MIT" ]
null
null
null
backups/render_video___2_seeds__1d__backup_2-12-2020.py
bjdarrer/tf2-model-g
26cf7bba9f1cc13e226834b3565c7b8df5fcc40a
[ "MIT" ]
null
null
null
from __future__ import division import argparse import numpy as np import tensorflow as tf import progressbar import imageio import yaml import matplotlib.pyplot as pp # BJD added 18.11.2020 #import cv2 # BJD added 24.11.2020 - for make video #import glob # BJD added 24.11.2020 - for make video #import matplotlib.pyp...
38.148883
146
0.562313
3eab56315abc05cb508dcaa2e370eb1c59c55576
1,967
py
Python
plaso/formatters/safari_cookies.py
stephenkreusch/plaso
494d3140c09733d1d51c8dbb9162fc569be760b3
[ "Apache-2.0" ]
1
2020-10-29T18:23:25.000Z
2020-10-29T18:23:25.000Z
plaso/formatters/safari_cookies.py
stephenkreusch/plaso
494d3140c09733d1d51c8dbb9162fc569be760b3
[ "Apache-2.0" ]
null
null
null
plaso/formatters/safari_cookies.py
stephenkreusch/plaso
494d3140c09733d1d51c8dbb9162fc569be760b3
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """The Safari Binary cookie event formatter.""" from __future__ import unicode_literals from plaso.lib import errors from plaso.formatters import interface from plaso.formatters import manager class SafariCookieFormatter(interface.ConditionalEventFormatter): """Formatter for a Safari Binar...
27.704225
78
0.688358
b018c8ee74c5b7842beb37673271a14bfd2d6e1f
3,921
py
Python
examples/spring_mass/model.py
omunroe-com/nasasrompy
35ae060b6a032d085a31574fbe3bf390b023631d
[ "Apache-2.0" ]
23
2018-05-13T05:13:03.000Z
2022-01-29T19:43:28.000Z
examples/spring_mass/model.py
omunroe-com/nasasrompy
35ae060b6a032d085a31574fbe3bf390b023631d
[ "Apache-2.0" ]
11
2018-03-28T13:13:44.000Z
2022-03-30T18:56:57.000Z
examples/spring_mass/model.py
omunroe-com/nasasrompy
35ae060b6a032d085a31574fbe3bf390b023631d
[ "Apache-2.0" ]
19
2018-06-01T14:49:30.000Z
2022-03-05T05:02:06.000Z
# Copyright 2018 United States Government as represented by the Administrator of # the National Aeronautics and Space Administration. No copyright is claimed in # the United States under Title 17, U.S. Code. All Other Rights Reserved. # The Stochastic Reduced Order Models with Python (SROMPy) platform is licensed # un...
29.704545
80
0.610814
448e8b7ceb2b8ecc272f5664499d66ddc220b061
2,273
py
Python
3rd_party/nek5000/short_tests/lib/nekBinBuild.py
neil-lindquist/nekRS
723cd46baee78f53f40eb67147dfcaad95d60aa9
[ "BSD-3-Clause" ]
1
2022-01-06T16:16:08.000Z
2022-01-06T16:16:08.000Z
3rd_party/nek5000/short_tests/lib/nekBinBuild.py
neil-lindquist/nekRS
723cd46baee78f53f40eb67147dfcaad95d60aa9
[ "BSD-3-Clause" ]
null
null
null
3rd_party/nek5000/short_tests/lib/nekBinBuild.py
neil-lindquist/nekRS
723cd46baee78f53f40eb67147dfcaad95d60aa9
[ "BSD-3-Clause" ]
null
null
null
import os from subprocess import Popen, PIPE, STDOUT from pathlib import Path def build_tools( tools_root, tools_bin, f77=None, cc=None, bigmem=None, targets=("clean", "all"), verbose=False, ): tools_root = Path(tools_root) print("Compiling tools... ") print(f' Using outpu...
26.126437
88
0.574571
96503e0768bf32a8b43371c0f33685b6dd02c45b
21,345
py
Python
mesh_tensorflow/layers_test.py
merrymercy/mesh
8931eb9025f833b09d8425404ebd5801acbb0cac
[ "Apache-2.0" ]
1
2020-11-27T19:16:44.000Z
2020-11-27T19:16:44.000Z
mesh_tensorflow/layers_test.py
merrymercy/mesh
8931eb9025f833b09d8425404ebd5801acbb0cac
[ "Apache-2.0" ]
7
2021-05-12T10:37:36.000Z
2021-05-28T14:53:58.000Z
mesh_tensorflow/layers_test.py
merrymercy/mesh
8931eb9025f833b09d8425404ebd5801acbb0cac
[ "Apache-2.0" ]
1
2020-11-25T14:26:45.000Z
2020-11-25T14:26:45.000Z
# coding=utf-8 # Copyright 2021 The Mesh TensorFlow 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 applicab...
36.116751
94
0.66423
e381fa3800184a029dc86b17d79472c67135941e
2,658
py
Python
discodo/extractor/youtube_dl.py
AkiaCode/discodo
0a76afb196a7945f525896f56f431e82aaf83f44
[ "MIT" ]
null
null
null
discodo/extractor/youtube_dl.py
AkiaCode/discodo
0a76afb196a7945f525896f56f431e82aaf83f44
[ "MIT" ]
null
null
null
discodo/extractor/youtube_dl.py
AkiaCode/discodo
0a76afb196a7945f525896f56f431e82aaf83f44
[ "MIT" ]
null
null
null
import asyncio import copy import ipaddress import re from typing import Coroutine, Union from youtube_dl import YoutubeDL as YoutubeDLClient from ..errors import NoSearchResults YTDLOption = { "format": "(bestaudio[ext=opus]/bestaudio/best)[protocol!=http_dash_segments]", "nocheckcertificate": True, "no...
26.848485
247
0.632054
8b35d475b7dd6a1da962c5755b1da47f523a7576
70,135
py
Python
server/reportlab/pdfgen/canvas.py
fergalmoran/Chrome2Kindle
a85b823d23849711c0015e80e741d8458527d306
[ "MIT" ]
2
2016-03-10T08:48:51.000Z
2018-06-27T00:15:48.000Z
server/reportlab/pdfgen/canvas.py
fergalmoran/Chrome2Kindle
a85b823d23849711c0015e80e741d8458527d306
[ "MIT" ]
null
null
null
server/reportlab/pdfgen/canvas.py
fergalmoran/Chrome2Kindle
a85b823d23849711c0015e80e741d8458527d306
[ "MIT" ]
null
null
null
#Copyright ReportLab Europe Ltd. 2000-2008 #see license.txt for license details __version__=''' $Id: canvas.py 3606 2009-12-03 11:39:56Z rgbecker $ ''' __doc__=""" The Canvas object is the primary interface for creating PDF files. See doc/reportlab-userguide.pdf for copious examples. """ __all__ = ['Canvas'] ENABLE_TR...
40.400346
151
0.59578