hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a076eacb579e6f24f57706c9a29188eacb31618 | 2,028 | py | Python | aliyun-python-sdk-oos/aliyunsdkoos/request/v20190601/ListInstanceStateReportsRequest.py | ankitdobhal/aliyun-openapi-python-sdk | 991b1c2d91adc468480defc23ba790d4369cce7b | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-oos/aliyunsdkoos/request/v20190601/ListInstanceStateReportsRequest.py | ankitdobhal/aliyun-openapi-python-sdk | 991b1c2d91adc468480defc23ba790d4369cce7b | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-oos/aliyunsdkoos/request/v20190601/ListInstanceStateReportsRequest.py | ankitdobhal/aliyun-openapi-python-sdk | 991b1c2d91adc468480defc23ba790d4369cce7b | [
"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... | 36.214286 | 83 | 0.773176 |
4a076f72fecc430b2c78fcb990b9f901fce49ddb | 5,517 | py | Python | conans/util/progress_bar.py | matthiasng/conan | 634eadc319da928084633a344d42785edccb8d6c | [
"MIT"
] | 6,205 | 2015-12-01T13:40:05.000Z | 2022-03-31T07:30:25.000Z | conans/util/progress_bar.py | matthiasng/conan | 634eadc319da928084633a344d42785edccb8d6c | [
"MIT"
] | 8,747 | 2015-12-01T16:28:48.000Z | 2022-03-31T23:34:53.000Z | conans/util/progress_bar.py | Mattlk13/conan | 005fc53485557b0a570bb71670f2ca9c66082165 | [
"MIT"
] | 961 | 2015-12-01T16:56:43.000Z | 2022-03-31T13:50:52.000Z | import os
from contextlib import contextmanager
import time
from tqdm import tqdm
from conans.client.output import ConanOutput
TIMEOUT_BEAT_SECONDS = 30
TIMEOUT_BEAT_CHARACTER = '.'
LEFT_JUSTIFY_DESC = 28
LEFT_JUSTIFY_MESSAGE = 90
def left_justify_message(msg):
return msg.ljust(LEFT_JUSTIFY_MESSAGE)
def left... | 34.055556 | 101 | 0.646185 |
4a0770b2d1cd1a1a587f80e26d9c659bc4a20bad | 5,022 | py | Python | srv6_sdn_control_plane/southbound/netconf/sb_netconf_client.py | everywan-io/srv6-sdn-control-plane | afb7ce82571c852f784b763b8dec766b75f350fd | [
"Apache-2.0"
] | null | null | null | srv6_sdn_control_plane/southbound/netconf/sb_netconf_client.py | everywan-io/srv6-sdn-control-plane | afb7ce82571c852f784b763b8dec766b75f350fd | [
"Apache-2.0"
] | null | null | null | srv6_sdn_control_plane/southbound/netconf/sb_netconf_client.py | everywan-io/srv6-sdn-control-plane | afb7ce82571c852f784b763b8dec766b75f350fd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import time
from netconf.client import NetconfSSHSession
try:
from lxml import etree
except ImportError:
from xml.etree import ElementTree as etree
# Utility to close Netconf sessions
def close_netconf_session(session):
# Let's take the reference of the transport
transport = session.pk... | 28.697143 | 96 | 0.651334 |
4a07716323b1294a7acf972df50274b9ae162e07 | 4,449 | py | Python | src/spider/spider/plugins/ouest_france_immo.py | asteroide/immo_spider | 864828c389173f6d6417392983bc8d39b5fd4ea2 | [
"Apache-2.0"
] | null | null | null | src/spider/spider/plugins/ouest_france_immo.py | asteroide/immo_spider | 864828c389173f6d6417392983bc8d39b5fd4ea2 | [
"Apache-2.0"
] | null | null | null | src/spider/spider/plugins/ouest_france_immo.py | asteroide/immo_spider | 864828c389173f6d6417392983bc8d39b5fd4ea2 | [
"Apache-2.0"
] | null | null | null | from lxml import html # nosec
from io import StringIO
import requests
import logging
import hashlib
logger = logging.getLogger("spider.ofi")
__url__ = "https://www.ouestfrance-immo.com/"
__urls__ = [
"https://www.ouestfrance-immo.com/acheter/maison/?lieux=24303&rayon=30&prix=0_200000",
"https://www.ouestfran... | 37.70339 | 147 | 0.5118 |
4a07717ec896a0d570840cab9c21ff6a53ef7923 | 2,508 | py | Python | tests/performance/runs/taurus/__init__.py | dhanainme/multi-model-server | cd5a693032b1bec4c46b0f7a9844df496a62c1a8 | [
"Apache-2.0"
] | 527 | 2017-12-04T20:58:19.000Z | 2019-11-14T03:15:39.000Z | tests/performance/runs/taurus/__init__.py | dhanainme/multi-model-server | cd5a693032b1bec4c46b0f7a9844df496a62c1a8 | [
"Apache-2.0"
] | 303 | 2017-12-05T06:14:08.000Z | 2019-11-16T01:35:15.000Z | tests/performance/runs/taurus/__init__.py | dhanainme/multi-model-server | cd5a693032b1bec4c46b0f7a9844df496a62c1a8 | [
"Apache-2.0"
] | 144 | 2017-12-05T19:27:39.000Z | 2019-11-15T22:15:50.000Z | #!/usr/bin/env python
# Copyright 2020 Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
# http://www.apache.org/licenses/LICENSE-2.0
# o... | 39.1875 | 98 | 0.710128 |
4a0774885da3e013efa2d9bf2e2c55be546c741a | 40,353 | py | Python | DCLS/construct/modules/Dcls.py | K-H-Ismail/Dilated-Convolution-with-Learnable-Spacings-PyTorch | 4714eddbd007f36930938ee53a172abcd46febfb | [
"MIT"
] | 13 | 2021-12-09T01:24:56.000Z | 2022-03-21T10:31:33.000Z | DCLS/construct/modules/Dcls.py | K-H-Ismail/Dilated-Convolution-with-Learnable-Spacings-PyTorch | 4714eddbd007f36930938ee53a172abcd46febfb | [
"MIT"
] | null | null | null | DCLS/construct/modules/Dcls.py | K-H-Ismail/Dilated-Convolution-with-Learnable-Spacings-PyTorch | 4714eddbd007f36930938ee53a172abcd46febfb | [
"MIT"
] | 1 | 2022-02-12T06:26:57.000Z | 2022-02-12T06:26:57.000Z | # coding=utf-8
import math
import warnings
import torch
from torch import Tensor
from torch.nn.parameter import Parameter
import torch.nn.functional as F
import DCLS
import DCLS.construct.functions.dcls_functionnal as SD
#import DCLS.construct.functions.swc_functionnal as SW
from torch.nn import init
from torch.nn.mod... | 43.719393 | 134 | 0.603152 |
4a0774c0389b128a618b1cebc893c38a906c38d5 | 6,052 | py | Python | nlptoolkit/classification/models/BERT/train_funcs.py | jackashore/NLP_Toolkit | e5bd8bcfad87f4906c45e66351adf93bd5c2727f | [
"Apache-2.0"
] | null | null | null | nlptoolkit/classification/models/BERT/train_funcs.py | jackashore/NLP_Toolkit | e5bd8bcfad87f4906c45e66351adf93bd5c2727f | [
"Apache-2.0"
] | null | null | null | nlptoolkit/classification/models/BERT/train_funcs.py | jackashore/NLP_Toolkit | e5bd8bcfad87f4906c45e66351adf93bd5c2727f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Aug 1 17:44:38 2019
@author: WT
"""
import os
import pandas as pd
import torch
from torch.utils.data import Dataset, DataLoader
from .preprocessing_funcs import preprocess, load_pickle
import logging
from tqdm import tqdm
logging.basicConfig(format='%(asctime)s [%(levelname... | 43.855072 | 115 | 0.645406 |
4a07752c2cb82a06c340f465bc5c580896aa370a | 4,545 | py | Python | strings/strip_url_params.py | n33t1/Algorithms | 80a59c2fd3860a35a20919f59160d1408c69b29a | [
"MIT"
] | null | null | null | strings/strip_url_params.py | n33t1/Algorithms | 80a59c2fd3860a35a20919f59160d1408c69b29a | [
"MIT"
] | null | null | null | strings/strip_url_params.py | n33t1/Algorithms | 80a59c2fd3860a35a20919f59160d1408c69b29a | [
"MIT"
] | null | null | null | """
Write a function that does the following:
Removes any duplicate query string parameters from the url
Removes any query string parameters specified within the 2nd argument (optional array)
An example:
www.saadbenn.com?a=1&b=2&a=2') // returns 'www.saadbenn.com?a=1&b=2'
"""
import unittest
from collections import de... | 38.193277 | 103 | 0.528933 |
4a0775fbd16977b09df48441431cec3a4721a28f | 707 | py | Python | Python-Unit-Testing/employee.py | HenkICT/Python_Unit_Testing_3 | 13b05a0a1b3928ad3235d7d5ed5971cf124aafee | [
"MIT"
] | null | null | null | Python-Unit-Testing/employee.py | HenkICT/Python_Unit_Testing_3 | 13b05a0a1b3928ad3235d7d5ed5971cf124aafee | [
"MIT"
] | null | null | null | Python-Unit-Testing/employee.py | HenkICT/Python_Unit_Testing_3 | 13b05a0a1b3928ad3235d7d5ed5971cf124aafee | [
"MIT"
] | null | null | null | import requests
class Employee3:
"""A sample SampP y Employee class"""
raise_amt = 1.05
def __init__(self, first, last, pay):
self.first = first
self.last = last
self.pay = pay
@property
def email(self):
return "{}.{}@email.com".format(self.first, self.last)
... | 22.806452 | 74 | 0.582744 |
4a0777b4c989b328d258c91f97eeb5ae59991d4c | 715 | py | Python | ssvos/utils/dist_utils.py | wuyongfa-genius/SSVOS_mindspore | 9f5f6bb29d9fc78d5dbb4e4b163b597887b03c47 | [
"MIT"
] | 1 | 2021-12-30T08:54:43.000Z | 2021-12-30T08:54:43.000Z | ssvos/utils/dist_utils.py | wuyongfa-genius/SSVOS_mindspore | 9f5f6bb29d9fc78d5dbb4e4b163b597887b03c47 | [
"MIT"
] | null | null | null | ssvos/utils/dist_utils.py | wuyongfa-genius/SSVOS_mindspore | 9f5f6bb29d9fc78d5dbb4e4b163b597887b03c47 | [
"MIT"
] | null | null | null | """Some distribute training utils."""
import os
from mindspore import context
from mindspore.context import ParallelMode
from mindspore import communication as dist
def init_dist(parallel_mode=ParallelMode.DATA_PARALLEL):
device_id = int(os.getenv('DEVICE_ID'))
rank_size = int(os.getenv('RANK_SIZE'))
con... | 28.6 | 66 | 0.678322 |
4a0777d8eda7d56b5e81ec3e8d961fe557a92c4e | 251 | py | Python | read.py | dezounet/google_hash_code | 48aa82b8b07eb257c91beeb4201d5c39d103e338 | [
"MIT"
] | null | null | null | read.py | dezounet/google_hash_code | 48aa82b8b07eb257c91beeb4201d5c39d103e338 | [
"MIT"
] | null | null | null | read.py | dezounet/google_hash_code | 48aa82b8b07eb257c91beeb4201d5c39d103e338 | [
"MIT"
] | null | null | null |
def read(filename):
header = None
lines = []
with open(filename) as f:
for line in f:
if header is None:
header = line
else:
lines.append(line)
# TODO
return None
| 15.6875 | 34 | 0.462151 |
4a07783bcae2184410744c1f1fba3afc943e4f21 | 29,418 | py | Python | pypower/mesh.py | adematti/pypower | e037ccc96b9c8d917e2918ddeba2fc30c6d65067 | [
"BSD-3-Clause"
] | 10 | 2021-11-09T01:59:36.000Z | 2022-01-20T08:47:17.000Z | pypower/mesh.py | adematti/pypower | e037ccc96b9c8d917e2918ddeba2fc30c6d65067 | [
"BSD-3-Clause"
] | 1 | 2021-12-09T08:51:59.000Z | 2022-01-11T22:20:08.000Z | pypower/mesh.py | adematti/pypower | e037ccc96b9c8d917e2918ddeba2fc30c6d65067 | [
"BSD-3-Clause"
] | null | null | null | """Implementation of methods to paint a catalog on mesh; workhorse is :class:`CatalogMesh`."""
import numpy as np
from mpi4py import MPI
from pmesh.pm import ParticleMesh
from pmesh.window import FindResampler, ResampleWindow
from .utils import BaseClass, _make_array, _get_box
from .direct_power import _format_positi... | 45.18894 | 189 | 0.607077 |
4a0778efdbc5ecbeb28e7c9b562c922612ce607a | 3,730 | py | Python | examples/mcmc/gibbs_linreg.py | Bhumbra/probayes | e5ac193076e4188b9b38c0e18466223ab4d041f7 | [
"BSD-3-Clause"
] | null | null | null | examples/mcmc/gibbs_linreg.py | Bhumbra/probayes | e5ac193076e4188b9b38c0e18466223ab4d041f7 | [
"BSD-3-Clause"
] | null | null | null | examples/mcmc/gibbs_linreg.py | Bhumbra/probayes | e5ac193076e4188b9b38c0e18466223ab4d041f7 | [
"BSD-3-Clause"
] | null | null | null | """
Example of linear regression using Gibbs taken from Radford Neil's slides at:
http://www.cs.toronto.edu/~radford/csc2541.S11/week3.pdf
p(y|x, beta_0, beta_1, y_sigma) = N(beta_1*x + beta_0, y_sigma)
p(beta_0) = N(beta_0_mu, beta_0_sigma)
p(beta_1) = N(beta_1_mu, beta_1_sigma)
p(1/y_sigma^2) = Gamma(y_sigma_alpha,... | 36.213592 | 97 | 0.681233 |
4a077912972a3dc8a863c463135f31a27a36677d | 1,332 | py | Python | codeFilesPackage/nameDayViewer.py | karadalex/PythonOrganizerAppProject | 37c7d10b240e9d883d4a8a50c4e94cf5315275d9 | [
"MIT"
] | 3 | 2015-12-16T01:54:09.000Z | 2016-01-31T00:55:37.000Z | codeFilesPackage/nameDayViewer.py | karadalex/PythonOrganizerAppProject | 37c7d10b240e9d883d4a8a50c4e94cf5315275d9 | [
"MIT"
] | null | null | null | codeFilesPackage/nameDayViewer.py | karadalex/PythonOrganizerAppProject | 37c7d10b240e9d883d4a8a50c4e94cf5315275d9 | [
"MIT"
] | null | null | null | import gotoMainFolderDirectory
import textFileOperations
import greeklish
def nameDayDictionaryCreation():
gotoMainFolderDirectory.go()
dataString = textFileOperations.textFileToString("mediaFilesPackage/eortes.dat")
dataList = dataString.split('\n\n')
nameDayDictionary = {}
for day in dataList:
... | 32.487805 | 84 | 0.57958 |
4a077a1fe02b056d0eeafd1a46bb6cfadef4746b | 8,727 | py | Python | setup.py | AlanDecode/detectron2 | 94af461322feba0c3cadde886367445d62bc45a7 | [
"Apache-2.0"
] | 1 | 2021-09-27T17:14:13.000Z | 2021-09-27T17:14:13.000Z | setup.py | AlanDecode/detectron2 | 94af461322feba0c3cadde886367445d62bc45a7 | [
"Apache-2.0"
] | null | null | null | setup.py | AlanDecode/detectron2 | 94af461322feba0c3cadde886367445d62bc45a7 | [
"Apache-2.0"
] | 2 | 2020-12-10T12:58:12.000Z | 2022-03-25T02:27:46.000Z | #!/usr/bin/env python
# Copyright (c) Facebook, Inc. and its affiliates.
import glob
import os
import shutil
from os import path
from setuptools import find_packages, setup
from typing import List
import torch
from torch.utils.cpp_extension import CUDA_HOME, CppExtension, CUDAExtension
from torch.utils.hipify import h... | 35.189516 | 97 | 0.623009 |
4a077a90153d5babe5212b0cac4c615c93028192 | 1,526 | py | Python | bindings/python/debug_script.py | Keithcat1/synthizer | 242a06855a36b9a9049d5fb00630800cda4a2984 | [
"Unlicense"
] | 2 | 2022-01-02T14:41:45.000Z | 2022-01-12T16:38:59.000Z | bindings/python/debug_script.py | Keithcat1/synthizer | 242a06855a36b9a9049d5fb00630800cda4a2984 | [
"Unlicense"
] | 9 | 2021-11-04T00:26:52.000Z | 2022-03-23T02:12:16.000Z | bindings/python/debug_script.py | Keithcat1/synthizer | 242a06855a36b9a9049d5fb00630800cda4a2984 | [
"Unlicense"
] | 2 | 2022-03-02T21:34:57.000Z | 2022-03-14T12:44:43.000Z | # Used so that I can get a quick python -i up for today's debugging session. You don't want to learn from this code; it may not even work.
import synthizer
from synthizer import EchoTapConfig
import time
import random
import sys
import math
import atexit
# Normally you want to use the synthizer.initialized context ma... | 36.333333 | 138 | 0.79882 |
4a077af565d2a2e05c68c0693ce65f77b375e392 | 5,544 | py | Python | datastore/ndb/transactions/main.py | xiaopeng163/python-docs-samples | b2bbfe15c27798d012f4a6e1fde33ae292a1e62a | [
"Apache-2.0"
] | null | null | null | datastore/ndb/transactions/main.py | xiaopeng163/python-docs-samples | b2bbfe15c27798d012f4a6e1fde33ae292a1e62a | [
"Apache-2.0"
] | null | null | null | datastore/ndb/transactions/main.py | xiaopeng163/python-docs-samples | b2bbfe15c27798d012f4a6e1fde33ae292a1e62a | [
"Apache-2.0"
] | 1 | 2018-05-13T05:31:10.000Z | 2018-05-13T05:31: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... | 28 | 79 | 0.637626 |
4a077b04986156dc74cbb7220f0ae0fa98fae8f0 | 598 | py | Python | management/commands/generate_backup_key.py | audacious-software/Simple-Backup-Django | bdacadc916da93e68f19696b2167fc71ee4dd919 | [
"Apache-2.0"
] | null | null | null | management/commands/generate_backup_key.py | audacious-software/Simple-Backup-Django | bdacadc916da93e68f19696b2167fc71ee4dd919 | [
"Apache-2.0"
] | null | null | null | management/commands/generate_backup_key.py | audacious-software/Simple-Backup-Django | bdacadc916da93e68f19696b2167fc71ee4dd919 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# pylint: disable=no-member,line-too-long
from __future__ import print_function
import base64
import nacl.secret
import nacl.utils
from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = 'Generates a SecretBox key to use for backups.'
def add_argument... | 26 | 111 | 0.714047 |
4a077b44639308bf77a35575fa964eebb5224c3c | 5,293 | py | Python | kubernetes/client/models/v1beta1_subject_access_review.py | SEJeff/client-python | baba523c28a684b3f537502977d600dedd1f17c5 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1beta1_subject_access_review.py | SEJeff/client-python | baba523c28a684b3f537502977d600dedd1f17c5 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1beta1_subject_access_review.py | SEJeff/client-python | baba523c28a684b3f537502977d600dedd1f17c5 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.5.0-beta.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "Lice... | 29.243094 | 105 | 0.598148 |
4a077ba99a12727fbc0145b3a2f7a79f103d0b4d | 2,395 | py | Python | watertap3/watertap3/utils/cost_curves.py | NREL/WaterTAP3 | 74b83dbd189784ccfddac4bc5d27002190473619 | [
"BSD-3-Clause"
] | null | null | null | watertap3/watertap3/utils/cost_curves.py | NREL/WaterTAP3 | 74b83dbd189784ccfddac4bc5d27002190473619 | [
"BSD-3-Clause"
] | 34 | 2021-06-25T17:54:12.000Z | 2021-06-25T17:54:27.000Z | watertap3/watertap3/utils/cost_curves.py | NREL/WaterTAP3 | 74b83dbd189784ccfddac4bc5d27002190473619 | [
"BSD-3-Clause"
] | 4 | 2021-06-25T18:32:31.000Z | 2022-03-24T20:24:18.000Z | import numpy as np
import pandas as pd
from scipy.optimize import curve_fit
__all__ = ['epa_cost_curve',
'basic_unit']
def epa_cost_curve(unit_process, **kwargs):
df = pd.read_csv('data/epa_cost_curves.csv', index_col='unit_process')
df = df.loc[unit_process]
params = ['flow_in', 'cap_total',... | 29.567901 | 106 | 0.533612 |
4a077bb1b0d9c182cc5237880e95d98cac0dce3b | 9,920 | py | Python | sensor-2.py | kinivi/end_to_end_example | 71df6fa847155f4c42dc091f2c20f9a2cf001483 | [
"MIT"
] | null | null | null | sensor-2.py | kinivi/end_to_end_example | 71df6fa847155f4c42dc091f2c20f9a2cf001483 | [
"MIT"
] | null | null | null | sensor-2.py | kinivi/end_to_end_example | 71df6fa847155f4c42dc091f2c20f9a2cf001483 | [
"MIT"
] | null | null | null | # Copyright 2017 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 agre... | 37.718631 | 119 | 0.671573 |
4a077cc4ca11038ad0bd7f7b78446c7f1efa3b69 | 51,067 | py | Python | Lib/test/test_tempfile.py | pelotoncycle/cpython-fork | 1ab99a0e912aac9c3f16555f23284d7e381f2f69 | [
"PSF-2.0"
] | 332 | 2015-08-22T12:43:56.000Z | 2022-03-17T01:05:43.000Z | Lib/test/test_tempfile.py | sky-skynet/Python3 | b816507f56ee14b730b7ab52a61eb17f9eb9d815 | [
"PSF-2.0"
] | 36 | 2015-05-30T08:39:19.000Z | 2022-03-04T20:42:33.000Z | Lib/test/test_tempfile.py | sky-skynet/Python3 | b816507f56ee14b730b7ab52a61eb17f9eb9d815 | [
"PSF-2.0"
] | 74 | 2015-05-29T17:18:53.000Z | 2022-01-15T14:06:44.000Z | # tempfile.py unit tests.
import tempfile
import errno
import io
import os
import signal
import sys
import re
import warnings
import contextlib
import weakref
from unittest import mock
import unittest
from test import support
from test.support import script_helper
if hasattr(os, 'stat'):
import stat
has_stat... | 35.316044 | 96 | 0.579024 |
4a077d23d9e9d462b2c63a4c8ba4b7ecd387391d | 3,556 | py | Python | consensus/poet/cli/sawtooth_poet_cli/main.py | suparnadhar/SuparnaGit | bec2704d8b6bc1802523ec26dcb902f59a747a4d | [
"Apache-2.0"
] | 1 | 2017-08-04T10:31:00.000Z | 2017-08-04T10:31:00.000Z | consensus/poet/cli/sawtooth_poet_cli/main.py | suparnadhar/SuparnaGit | bec2704d8b6bc1802523ec26dcb902f59a747a4d | [
"Apache-2.0"
] | null | null | null | consensus/poet/cli/sawtooth_poet_cli/main.py | suparnadhar/SuparnaGit | bec2704d8b6bc1802523ec26dcb902f59a747a4d | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Intel Corporation
#
# 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... | 28.222222 | 80 | 0.667885 |
4a077d610bff944659b940eb306946fcfc8768f5 | 72,433 | py | Python | sqlova/utils/utils_wikisql.py | ds-keshev/sqlova | 8523af748520cfa78025c6ba28f6b3ed5df8de62 | [
"Apache-2.0"
] | null | null | null | sqlova/utils/utils_wikisql.py | ds-keshev/sqlova | 8523af748520cfa78025c6ba28f6b3ed5df8de62 | [
"Apache-2.0"
] | null | null | null | sqlova/utils/utils_wikisql.py | ds-keshev/sqlova | 8523af748520cfa78025c6ba28f6b3ed5df8de62 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019-present NAVER Corp.
# Apache License v2.0
# Wonseok Hwang
import os, json
import random as rd
from copy import deepcopy
from matplotlib.pylab import *
import torch
import torchvision.datasets as dsets
import torch.nn as nn
import torch.nn.functional as F
from .utils import generate_perm_inv
from ... | 29.697827 | 158 | 0.565999 |
4a077d7d6c688a6504f86da37ba4242c33b3b17b | 3,065 | py | Python | tools/perf/benchmarks/rasterize_and_record_micro.py | metux/chromium-deb | 3c08e9b89a1b6f95f103a61ff4f528dbcd57fc42 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | tools/perf/benchmarks/rasterize_and_record_micro.py | metux/chromium-deb | 3c08e9b89a1b6f95f103a61ff4f528dbcd57fc42 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | tools/perf/benchmarks/rasterize_and_record_micro.py | metux/chromium-deb | 3c08e9b89a1b6f95f103a61ff4f528dbcd57fc42 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | # Copyright 2013 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.
from core import perf_benchmark
from measurements import rasterize_and_record_micro
import page_sets
from telemetry import benchmark
class _RasterizeAndRe... | 38.797468 | 80 | 0.695269 |
4a077d7d6d23ce7bc45caf87d0dbd3d8ef5551e9 | 135 | py | Python | falcon/base/file.py | lorne-luo/falcon | a56ee8e121d70086721292ae33f1070a1f7e1f7b | [
"BSD-3-Clause"
] | null | null | null | falcon/base/file.py | lorne-luo/falcon | a56ee8e121d70086721292ae33f1070a1f7e1f7b | [
"BSD-3-Clause"
] | 7 | 2020-02-11T23:56:08.000Z | 2022-02-10T07:35:07.000Z | falcon/base/file.py | lorne-luo/falcon | a56ee8e121d70086721292ae33f1070a1f7e1f7b | [
"BSD-3-Clause"
] | 1 | 2021-05-11T09:57:38.000Z | 2021-05-11T09:57:38.000Z | import os
def create_folder(path):
folder = os.path.dirname(path)
if not os.path.exists(folder):
os.makedirs(folder)
| 16.875 | 34 | 0.666667 |
4a077e46b35c57120a8245209f74be572227f840 | 2,634 | py | Python | test_proj/apps/app1/tests/test_overloads.py | andrewbird2/django-data-validation | 8c3a8e14440f0299a5f4b188dfaa7864b53b5123 | [
"MIT"
] | 1 | 2020-08-05T16:42:48.000Z | 2020-08-05T16:42:48.000Z | test_proj/apps/app1/tests/test_overloads.py | andrewbird2/django-data-validation | 8c3a8e14440f0299a5f4b188dfaa7864b53b5123 | [
"MIT"
] | 1 | 2020-11-04T07:06:37.000Z | 2020-11-04T07:06:37.000Z | test_proj/apps/app1/tests/test_overloads.py | andrewbird2/django-data-validation | 8c3a8e14440f0299a5f4b188dfaa7864b53b5123 | [
"MIT"
] | 1 | 2020-11-04T02:16:05.000Z | 2020-11-04T02:16:05.000Z | import pytest
from datavalidation import data_validator
from datavalidation.runners import ModelValidationRunner, ObjectValidationRunner
from app1.models import Overloaded
def test_bad_instancemethod_overloading():
""" test that overloading an instance method with an instance method fails """
try:
cl... | 28.322581 | 82 | 0.630979 |
4a077eadf68999876ef3b23fe81822ee0cb0862e | 7,533 | bzl | Python | intellij_platform_sdk/build_defs.bzl | d-haxton/intellij | 3acafac0566ed0b314afb4d0873b289790e9a37d | [
"Apache-2.0"
] | null | null | null | intellij_platform_sdk/build_defs.bzl | d-haxton/intellij | 3acafac0566ed0b314afb4d0873b289790e9a37d | [
"Apache-2.0"
] | null | null | null | intellij_platform_sdk/build_defs.bzl | d-haxton/intellij | 3acafac0566ed0b314afb4d0873b289790e9a37d | [
"Apache-2.0"
] | null | null | null | """Convenience methods for plugin_api."""
# The current indirect ij_product mapping (eg. "intellij-latest")
INDIRECT_IJ_PRODUCTS = {
"intellij-latest": "intellij-2019.2",
"intellij-latest-mac": "intellij-2019.2-mac",
"intellij-beta": "intellij-2019.3",
"intellij-canary": "intellij-2020.1",
"intelli... | 34.240909 | 107 | 0.628169 |
4a077f3fbedc8a5776aa5a74591d5e2d5034d470 | 7,469 | py | Python | deploy.py | varun-raghavendra/fl_faas_fabric | 36310d24805c5bd7258f2e432997ac9b91aee61a | [
"MIT"
] | 6 | 2021-05-19T20:36:55.000Z | 2022-03-20T05:56:21.000Z | deploy.py | varun-raghavendra/fl_faas_fabric | 36310d24805c5bd7258f2e432997ac9b91aee61a | [
"MIT"
] | null | null | null | deploy.py | varun-raghavendra/fl_faas_fabric | 36310d24805c5bd7258f2e432997ac9b91aee61a | [
"MIT"
] | 2 | 2022-03-16T08:59:15.000Z | 2022-03-20T11:47:55.000Z | #!/usr/bin/env python
import yaml
import sys, getopt
from typing import List
import traceback
import asyncio
import json
import logging
from Clusters import BaseDeployment
from Clusters import OpenWhiskDeployment
from Clusters import GoogleDeployment
functions_meta = []
from commons.Logger import ScriptLogger
logging... | 41.960674 | 109 | 0.560985 |
4a077fe5a0441d17f0620091c48549194d1a0098 | 1,544 | py | Python | openfe/tests/setup/test_lomap_atommapper.py | mikemhenry/openfe | d4c78af62a7ae05b99eb95d173661ac134b7e7b9 | [
"MIT"
] | null | null | null | openfe/tests/setup/test_lomap_atommapper.py | mikemhenry/openfe | d4c78af62a7ae05b99eb95d173661ac134b7e7b9 | [
"MIT"
] | null | null | null | openfe/tests/setup/test_lomap_atommapper.py | mikemhenry/openfe | d4c78af62a7ae05b99eb95d173661ac134b7e7b9 | [
"MIT"
] | null | null | null | # This code is part of OpenFE and is licensed under the MIT license.
# For details, see https://github.com/OpenFreeEnergy/openfe
import pytest
from rdkit import Chem
import openfe
from openfe.setup import LomapAtomMapper, LigandMolecule
def test_simple(lomap_basic_test_files):
# basic sanity check on the Ligand... | 30.27451 | 77 | 0.754534 |
4a07815e84acb8e0e44ebecaecc3982f1555eca9 | 168,831 | py | Python | numpy/lib/function_base.py | chatcannon/numpy | f1b3f00f7abdd97d59dc5b1c0bb922a692452736 | [
"BSD-3-Clause"
] | 1 | 2022-02-16T05:32:38.000Z | 2022-02-16T05:32:38.000Z | numpy/lib/function_base.py | chatcannon/numpy | f1b3f00f7abdd97d59dc5b1c0bb922a692452736 | [
"BSD-3-Clause"
] | null | null | null | numpy/lib/function_base.py | chatcannon/numpy | f1b3f00f7abdd97d59dc5b1c0bb922a692452736 | [
"BSD-3-Clause"
] | 1 | 2018-11-15T19:41:09.000Z | 2018-11-15T19:41:09.000Z | from __future__ import division, absolute_import, print_function
import collections
import operator
import re
import sys
import warnings
import numpy as np
import numpy.core.numeric as _nx
from numpy.core import linspace, atleast_1d, atleast_2d, transpose
from numpy.core.numeric import (
ones, zeros, arange, conc... | 32.904112 | 88 | 0.573793 |
4a07817c41c6d5349f6381a0ae823dd662de84e9 | 28,681 | py | Python | utils_hausdorff.py | EIU-GIScience-Center/Polyline_Hausdorff | af8c8f7f138cd4201d60ad6067feebefee74711c | [
"MIT"
] | null | null | null | utils_hausdorff.py | EIU-GIScience-Center/Polyline_Hausdorff | af8c8f7f138cd4201d60ad6067feebefee74711c | [
"MIT"
] | null | null | null | utils_hausdorff.py | EIU-GIScience-Center/Polyline_Hausdorff | af8c8f7f138cd4201d60ad6067feebefee74711c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed May 26 13:29:02 2021
@author: bjkronenfeld
"""
import math as m
import utils_geom as g
def componentDistance (dr,k,len_a):
"""
Calculates the distance from a location on segment a on polyline A to
a component of polyline B.
Parameters
... | 33.782097 | 119 | 0.547331 |
4a0781e6a425de72554cf6eb161a0c6a29d86ad1 | 840 | py | Python | DeeProtein/sense.py | juzb/DeeProtein | 487694a24abdb4656499111c8a8904dfcb1d98ab | [
"MIT"
] | 12 | 2019-02-21T14:09:13.000Z | 2021-03-05T02:02:21.000Z | DeeProtein/sense.py | juzb/DeeProtein | 487694a24abdb4656499111c8a8904dfcb1d98ab | [
"MIT"
] | null | null | null | DeeProtein/sense.py | juzb/DeeProtein | 487694a24abdb4656499111c8a8904dfcb1d98ab | [
"MIT"
] | 5 | 2019-05-15T05:37:41.000Z | 2021-09-29T12:20:00.000Z | import subprocess
while True:
#name = input('Please enter four letter name for this run: ')
name = "AAAA"
sequence = input('Please enter the sequence to analyze: ')
gos = input('Please enter the GO terms to analyze sperarated by commas: ')
with open('/results/tmp/masked_dataset.txt', 'w') as ofile... | 40 | 78 | 0.458333 |
4a0782340d892fe8904921f79672f6a1effbb022 | 8,050 | py | Python | frappe/core/doctype/doctype/test_doctype.py | ramen123/frappe | ede92ef61ad640036bdd98bffdf2ea593de0a5ef | [
"MIT"
] | null | null | null | frappe/core/doctype/doctype/test_doctype.py | ramen123/frappe | ede92ef61ad640036bdd98bffdf2ea593de0a5ef | [
"MIT"
] | null | null | null | frappe/core/doctype/doctype/test_doctype.py | ramen123/frappe | ede92ef61ad640036bdd98bffdf2ea593de0a5ef | [
"MIT"
] | 1 | 2021-11-19T18:46:53.000Z | 2021-11-19T18:46:53.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
# test_records = frappe.get_test_records('DocType')
class TestDocType(unittest.TestCase):
def new_doctype(self, name, unique=0, depend... | 35.152838 | 150 | 0.70795 |
4a0782e15f60970af79e4a97e02ab5d733d2ade5 | 3,434 | py | Python | utils/preprocessing.py | HUFS-VLab/tf-SSS-AE | f693f1df2199a15623fb4c717c87dcd39461a6d5 | [
"MIT"
] | null | null | null | utils/preprocessing.py | HUFS-VLab/tf-SSS-AE | f693f1df2199a15623fb4c717c87dcd39461a6d5 | [
"MIT"
] | null | null | null | utils/preprocessing.py | HUFS-VLab/tf-SSS-AE | f693f1df2199a15623fb4c717c87dcd39461a6d5 | [
"MIT"
] | null | null | null | import os
import sys
import glob
import json
import librosa
import argparse
import numpy as np
def min_max_scaling(x):
"""
Args:
S: np.array, Spectrogram. Shape=(f, t)
Returns:
S: np.array, scalied Spectrogram. Shape=(f, t)
"""
_max = np.max(x)
_min = np.min(x)
x = (x... | 30.660714 | 112 | 0.576878 |
4a07836f56c7e56b27499cec911a172c6ee79b50 | 947 | py | Python | tests/filters/test_value_blocklist_check.py | cuspymd/CredSweeper | 376e7faff41d8b58f0d9e2a82955ad0929ee8290 | [
"MIT"
] | 1 | 2022-03-03T18:11:59.000Z | 2022-03-03T18:11:59.000Z | tests/filters/test_value_blocklist_check.py | shadowscatcher/CredSweeper | 0387ed76aca4a12154e15c49db8dc0901a014275 | [
"MIT"
] | null | null | null | tests/filters/test_value_blocklist_check.py | shadowscatcher/CredSweeper | 0387ed76aca4a12154e15c49db8dc0901a014275 | [
"MIT"
] | null | null | null | import pytest
from credsweeper.filters import ValueBlocklistCheck
from tests.test_utils.dummy_line_data import get_line_data
class TestValueBlocklistCheck:
def test_value_blocklist_p(self, file_path: pytest.fixture, success_line: pytest.fixture) -> None:
line_data = get_line_data(file_path, line=success_... | 43.045455 | 113 | 0.736008 |
4a0784f207726a72ff8b7cc9d99774694c2b4222 | 5,303 | py | Python | app.py | Saket-Upadhyay/FlagCheckDiscordChal | a73f15bee5bcaa36b610253a06646e955c50b420 | [
"MIT"
] | null | null | null | app.py | Saket-Upadhyay/FlagCheckDiscordChal | a73f15bee5bcaa36b610253a06646e955c50b420 | [
"MIT"
] | null | null | null | app.py | Saket-Upadhyay/FlagCheckDiscordChal | a73f15bee5bcaa36b610253a06646e955c50b420 | [
"MIT"
] | null | null | null | from flask import Flask
from flask import request
import hashlib as hl
app = Flask(__name__)
@app.route('/')
def ma():
return """
<html>
<head>
<title>
FrigidSec DPC Flag Check</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keywords" content="FrigidSec">
<meta name="descr... | 37.878571 | 197 | 0.708844 |
4a07851f0b4b4ea80e7f0e2749d728a55b1131fd | 1,248 | py | Python | google/devtools/testing/v1/devtools-testing-v1-py/google/devtools/testing_v1/services/test_execution_service/transports/__init__.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/devtools/testing/v1/devtools-testing-v1-py/google/devtools/testing_v1/services/test_execution_service/transports/__init__.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/devtools/testing/v1/devtools-testing-v1-py/google/devtools/testing_v1/services/test_execution_service/transports/__init__.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- 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 or... | 36.705882 | 91 | 0.796474 |
4a07857eadc6db1db6a058fb9d14e9943a9dd7e6 | 5,873 | py | Python | models/ssl.py | martinmanuel9/extreme_verification_latency | 16f5ba2b1a37f6d60ed2089d6cab7331e688b0cc | [
"MIT"
] | null | null | null | models/ssl.py | martinmanuel9/extreme_verification_latency | 16f5ba2b1a37f6d60ed2089d6cab7331e688b0cc | [
"MIT"
] | null | null | null | models/ssl.py | martinmanuel9/extreme_verification_latency | 16f5ba2b1a37f6d60ed2089d6cab7331e688b0cc | [
"MIT"
] | 1 | 2022-02-25T20:37:09.000Z | 2022-02-25T20:37:09.000Z | #!/usr/bin/env python
"""
Application: COMPOSE Framework
File name: ssl.py
Author: Martin Manuel Lopez
Advisor: Dr. Gregory Ditzler
Creation: 08/05/2021
COMPOSE Origin: Muhammad Umer and Robi Polikar
The University of Arizona
Department of Electrical and Computer ... | 45.527132 | 158 | 0.657245 |
4a0785dcfdfdce586850930ef07c97a418a12d63 | 9,552 | py | Python | nanotune/model/utils.py | microsoft/nanotune | 68be8f5b74a52d57b74ccac228e120d9ab48e3e4 | [
"MIT"
] | 5 | 2021-02-24T14:32:37.000Z | 2022-01-05T16:37:26.000Z | nanotune/model/utils.py | microsoft/nanotune | 68be8f5b74a52d57b74ccac228e120d9ab48e3e4 | [
"MIT"
] | 149 | 2021-03-23T14:44:39.000Z | 2022-03-31T06:09:07.000Z | nanotune/model/utils.py | LaudateCorpus1/nanotune | 0ada354597b16f6dbb17ca7be01ab7668b6d5049 | [
"MIT"
] | 10 | 2021-03-29T13:36:38.000Z | 2022-02-16T23:06:35.000Z | import os
from typing import List, Optional
import numpy.typing as npt
import matplotlib.pyplot as plt
import numpy as np
import scipy.fftpack as fp
import scipy.signal as sg
from scipy.ndimage import gaussian_filter, generic_gradient_magnitude, sobel
from skimage.transform import resize
import nanotune as nt
from nan... | 30.912621 | 84 | 0.57925 |
4a0785e2e68cf21e6d83218b634e0c8958251912 | 853 | py | Python | forms.py | amesamoyers/PlanetaryGeologicMappers | a2d0afc1539790462119ea66bb670514fe3b7da5 | [
"Unlicense"
] | null | null | null | forms.py | amesamoyers/PlanetaryGeologicMappers | a2d0afc1539790462119ea66bb670514fe3b7da5 | [
"Unlicense"
] | null | null | null | forms.py | amesamoyers/PlanetaryGeologicMappers | a2d0afc1539790462119ea66bb670514fe3b7da5 | [
"Unlicense"
] | null | null | null | from wtforms import TextField, StringField, Form, PasswordField
from wtforms.validators import AnyOf, DataRequired, required
from wtforms.widgets import TextArea
class PageForm(Form):
page_title = StringField(u"Title",
[DataRequired(message = "No webpage title given.")],
... | 40.619048 | 85 | 0.584994 |
4a07868fed30b57fe608bb5b36db75e2d1a29744 | 4,526 | py | Python | backyard_flyer_solution.py | SagarmathaTech/jad-fcnd-term1-p2-motion-planning | 281bfb87ee671094caa5f22861ab41f9884b7ca1 | [
"MIT"
] | 22 | 2018-05-31T22:54:15.000Z | 2022-03-03T12:57:48.000Z | backyard_flyer_solution.py | SagarmathaTech/jad-fcnd-term1-p2-motion-planning | 281bfb87ee671094caa5f22861ab41f9884b7ca1 | [
"MIT"
] | 3 | 2018-08-07T10:43:04.000Z | 2022-03-10T06:52:27.000Z | backyard_flyer_solution.py | SagarmathaTech/jad-fcnd-term1-p2-motion-planning | 281bfb87ee671094caa5f22861ab41f9884b7ca1 | [
"MIT"
] | 28 | 2018-03-26T17:19:57.000Z | 2022-02-28T04:29:01.000Z | # -*- coding: utf-8 -*-
"""
Solution to the Backyard Flyer Project.
"""
import time
from enum import Enum
import numpy as np
from udacidrone import Drone
from udacidrone.connection import MavlinkConnection, WebSocketConnection # noqa: F401
from udacidrone.messaging import MsgID
class States(Enum):
MANUAL = 0
... | 32.328571 | 107 | 0.617543 |
4a078699f572a5189ecac85685b523705cccf793 | 3,133 | py | Python | _2michaeltaylor/settings.py | mjt145/2michaeltaylor | ab2d4fde1d614842ab367f95bad262d1c7ea2878 | [
"MIT"
] | null | null | null | _2michaeltaylor/settings.py | mjt145/2michaeltaylor | ab2d4fde1d614842ab367f95bad262d1c7ea2878 | [
"MIT"
] | null | null | null | _2michaeltaylor/settings.py | mjt145/2michaeltaylor | ab2d4fde1d614842ab367f95bad262d1c7ea2878 | [
"MIT"
] | null | null | null | """
Django settings for _2michaeltaylor project.
Generated by 'django-admin startproject' using Django 1.8.3.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Bu... | 26.108333 | 71 | 0.713693 |
4a07876666a6d2387a3098c36153378ee88e83a9 | 123 | py | Python | Lab_Dash/Route.py | SimonSchubotz/Electronic-Laboratory-Notebook | a5dc3daa76b07370c1ee5b7e74fb6c780c3d3c97 | [
"Apache-2.0"
] | null | null | null | Lab_Dash/Route.py | SimonSchubotz/Electronic-Laboratory-Notebook | a5dc3daa76b07370c1ee5b7e74fb6c780c3d3c97 | [
"Apache-2.0"
] | null | null | null | Lab_Dash/Route.py | SimonSchubotz/Electronic-Laboratory-Notebook | a5dc3daa76b07370c1ee5b7e74fb6c780c3d3c97 | [
"Apache-2.0"
] | null | null | null | from channels.routing import ProtocolTypeRouter
application = ProtocolTypeRouter({
})
""" Routing the dash application
""" | 20.5 | 47 | 0.788618 |
4a078941483f4012cc20c4e55bcd43625789dd15 | 1,786 | py | Python | tests/test_tasks/test_task_methods.py | hp2500/openml-python | 62cc534cd18e6e011a88a83816fec95a90399a9b | [
"BSD-3-Clause"
] | 1 | 2019-09-02T00:28:26.000Z | 2019-09-02T00:28:26.000Z | tests/test_tasks/test_task_methods.py | hp2500/openml-python | 62cc534cd18e6e011a88a83816fec95a90399a9b | [
"BSD-3-Clause"
] | null | null | null | tests/test_tasks/test_task_methods.py | hp2500/openml-python | 62cc534cd18e6e011a88a83816fec95a90399a9b | [
"BSD-3-Clause"
] | 1 | 2019-09-02T00:29:32.000Z | 2019-09-02T00:29:32.000Z | from time import time
import openml
from openml.testing import TestBase
# Common methods between tasks
class OpenMLTaskMethodsTest(TestBase):
def setUp(self):
super(OpenMLTaskMethodsTest, self).setUp()
def tearDown(self):
super(OpenMLTaskMethodsTest, self).tearDown()
def test_tagging(s... | 38.826087 | 77 | 0.666853 |
4a078a6a2555fea3fbe7de9c61245a148170bce8 | 3,060 | py | Python | mobilenet.py | xingmimfl/pytorch_Mobilenet | aaeacd2b21d1cf1c70f3e9f4a080aad5b06f3345 | [
"MIT"
] | null | null | null | mobilenet.py | xingmimfl/pytorch_Mobilenet | aaeacd2b21d1cf1c70f3e9f4a080aad5b06f3345 | [
"MIT"
] | 1 | 2019-12-19T03:28:32.000Z | 2019-12-19T03:28:32.000Z | mobilenet.py | xingmimfl/pytorch_Mobilenet | aaeacd2b21d1cf1c70f3e9f4a080aad5b06f3345 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
class Conv2d(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride=1,
relu=True, bn=True, same_padding=False, bias=False):
super(Conv2d, self).__init__()
padding = int((kernel_size - 1) / 2) if same_padding else 0
s... | 37.317073 | 105 | 0.589542 |
4a078bac82355d56bd81fbf1d57909ebdca9ecbb | 10,191 | py | Python | components/micropython/modules/sha2017_backup/woezel.py | badgeteam/Firmware | 6192b2902c70beb7a298a256d9087274d045fbc0 | [
"Apache-2.0"
] | 7 | 2019-02-11T10:02:14.000Z | 2019-08-02T00:08:45.000Z | components/micropython/modules/sha2017_backup/woezel.py | badgeteam/Firmware | 6192b2902c70beb7a298a256d9087274d045fbc0 | [
"Apache-2.0"
] | 17 | 2019-01-05T18:02:11.000Z | 2019-03-09T21:46:43.000Z | components/micropython/modules/sha2017_backup/woezel.py | badgeteam/Firmware | 6192b2902c70beb7a298a256d9087274d045fbc0 | [
"Apache-2.0"
] | 4 | 2019-02-15T16:03:20.000Z | 2019-06-27T22:23:24.000Z | import sys
import gc
import uos as os
import uerrno as errno
import ujson as json
import uzlib
import upip_utarfile as tarfile
gc.collect()
debug = False
install_path = None
cleanup_files = []
gzdict_sz = 16 + 15
file_buf = bytearray(512)
class NotFoundError(Exception):
pass
class LatestInstalledError(Exceptio... | 27.469003 | 86 | 0.540281 |
4a078c75b2e45c2072b55df47666e43db044972b | 348 | py | Python | lazythumbs/tests/__init__.py | caktus/lazythumbs | 006ac42f9f4ac600d4c85d0929f4e2c755d4f853 | [
"MIT"
] | 1 | 2017-07-24T22:06:25.000Z | 2017-07-24T22:06:25.000Z | lazythumbs/tests/__init__.py | caktus/lazythumbs | 006ac42f9f4ac600d4c85d0929f4e2c755d4f853 | [
"MIT"
] | null | null | null | lazythumbs/tests/__init__.py | caktus/lazythumbs | 006ac42f9f4ac600d4c85d0929f4e2c755d4f853 | [
"MIT"
] | null | null | null | from lazythumbs.tests.test_server import RenderTest, GetViewTest
from lazythumbs.tests.test_templatetag import LazythumbSyntaxTest, LazythumbGeometryCompileTest, LazythumbRenderTest
from lazythumbs.tests.test_templatetag import ImgAttrsRenderTest
from lazythumbs.tests.test_util import TestGeometry, TestComputeIMG, Tes... | 69.6 | 116 | 0.893678 |
4a078d17125636f32bdc3c0268b56986ecfb7ef8 | 3,505 | py | Python | setup.py | FelixdenBreejen/PySCIPOpt | a6dbfdfd565d29da705d147fddfc732c8bc5ca93 | [
"MIT"
] | null | null | null | setup.py | FelixdenBreejen/PySCIPOpt | a6dbfdfd565d29da705d147fddfc732c8bc5ca93 | [
"MIT"
] | null | null | null | setup.py | FelixdenBreejen/PySCIPOpt | a6dbfdfd565d29da705d147fddfc732c8bc5ca93 | [
"MIT"
] | null | null | null | from setuptools import setup, Extension
import os, platform, sys, re
import numpy as np
# look for environment variable that specifies path to SCIP
scipoptdir = os.environ.get('SCIPOPTDIR', '').strip('"')
extra_compile_args = []
extra_link_args = []
# determine include directory
if os.path.exists(os.path.join(scipop... | 33.380952 | 81 | 0.649358 |
4a078d4fe3e7eeba7438846e65e635e630f94abb | 755 | py | Python | src/ZPublisher/Publish.py | Mattlk13/Zope | b26ba322565f640f1c62b4a8d6b407cf5df5fdcd | [
"ZPL-2.1"
] | null | null | null | src/ZPublisher/Publish.py | Mattlk13/Zope | b26ba322565f640f1c62b4a8d6b407cf5df5fdcd | [
"ZPL-2.1"
] | 1 | 2020-11-11T07:11:31.000Z | 2020-11-11T07:11:31.000Z | src/ZPublisher/Publish.py | Mattlk13/Zope | b26ba322565f640f1c62b4a8d6b407cf5df5fdcd | [
"ZPL-2.1"
] | null | null | null | ##############################################################################
#
# Copyright (c) 2002 Zope Foundation and Contributors.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS I... | 34.318182 | 78 | 0.6 |
4a078da5a233ca5c6490ecb64daa4f88a1b5b136 | 19,947 | py | Python | author_tests.py | PhysicsUofRAUI/lifeLongLearning | 36e098d4319d3500509861454fa3e27a67416802 | [
"MIT"
] | null | null | null | author_tests.py | PhysicsUofRAUI/lifeLongLearning | 36e098d4319d3500509861454fa3e27a67416802 | [
"MIT"
] | 38 | 2020-06-09T00:07:09.000Z | 2021-02-06T17:18:20.000Z | author_tests.py | PhysicsUofRAUI/lifeLongLearning | 36e098d4319d3500509861454fa3e27a67416802 | [
"MIT"
] | null | null | null | import unittest
from flask_testing import TestCase
from config import TestConfiguration
from app import create_app as c_app
import os
from flask import session, url_for, template_rendered
from app.models import Author, Worksheet, WorksheetCategory
from app.database import db
from contextlib import contextmanager
from ... | 37.706994 | 181 | 0.658244 |
4a078e0da1e1ec8cced001df1c5d6e294240e586 | 177 | py | Python | docs/source/_filters/names.py | t-elisee/sepal-doc | 6ef93090e18584037f1663bc36d9d1736aceb64b | [
"MIT"
] | 2 | 2021-06-15T19:48:14.000Z | 2022-03-19T03:24:55.000Z | docs/source/_filters/names.py | apuzzi/sepal-doc | ed76e626a544ce62034b734873e646396ed766a2 | [
"MIT"
] | 91 | 2021-03-11T10:41:43.000Z | 2022-03-30T15:58:07.000Z | docs/source/_filters/names.py | apuzzi/sepal-doc | ed76e626a544ce62034b734873e646396ed766a2 | [
"MIT"
] | 15 | 2021-03-12T11:58:58.000Z | 2022-03-01T10:24:41.000Z |
from enchant.tokenize import Filter
class Names(Filter):
"""If a word start with a Capital letter ignore it"""
def _skip(self, word):
return word[0].isupper() | 22.125 | 57 | 0.672316 |
4a078f0d7e524b7bc696dea421f664cbfdac01bd | 1,053 | py | Python | configs/_base_/models/upernet_van.py | MenghaoGuo/VAN-Segmentation | e0053db0ca88a164bc868c08cb9d2e27d614ee2a | [
"Apache-2.0"
] | 2 | 2022-02-25T03:05:35.000Z | 2022-02-26T08:31:59.000Z | configs/_base_/models/upernet_van.py | MenghaoGuo/VAN-Segmentation | e0053db0ca88a164bc868c08cb9d2e27d614ee2a | [
"Apache-2.0"
] | null | null | null | configs/_base_/models/upernet_van.py | MenghaoGuo/VAN-Segmentation | e0053db0ca88a164bc868c08cb9d2e27d614ee2a | [
"Apache-2.0"
] | null | null | null | # model settings
norm_cfg = dict(type='SyncBN', requires_grad=True)
model = dict(
type='EncoderDecoder',
pretrained=None,
backbone=dict(
type='van_tiny',
style='pytorch'),
decode_head=dict(
type='UPerHead',
in_channels=[32, 64, 160, 256],
in_index=[0, 1, 2, 3],
... | 29.25 | 74 | 0.592593 |
4a078f7fdc9a4db6e6d57059517bb05f81d6153f | 3,846 | py | Python | services/api-server/tests/unit/fakes/solvers_faker.py | colinRawlings/osparc-simcore | bf2f18d5bc1e574d5f4c238d08ad15156184c310 | [
"MIT"
] | 25 | 2018-04-13T12:44:12.000Z | 2022-03-12T15:01:17.000Z | services/api-server/tests/unit/fakes/solvers_faker.py | colinRawlings/osparc-simcore | bf2f18d5bc1e574d5f4c238d08ad15156184c310 | [
"MIT"
] | 2,553 | 2018-01-18T17:11:55.000Z | 2022-03-31T16:26:40.000Z | services/api-server/tests/unit/fakes/solvers_faker.py | mrnicegyu11/osparc-simcore | b6fa6c245dbfbc18cc74a387111a52de9b05d1f4 | [
"MIT"
] | 20 | 2018-01-18T19:45:33.000Z | 2022-03-29T07:08:47.000Z | from dataclasses import dataclass
from pathlib import Path
from typing import Callable, Dict, Iterator, Tuple
import packaging.version
import yaml
from fastapi import HTTPException, status
from importlib_resources import files
from models_library.services import ServiceDockerData
from simcore_service_api_server.models... | 29.358779 | 87 | 0.650026 |
4a078fc71d9c5eebf3dc38055b15e4bc3e5bde21 | 38,255 | py | Python | src/sage/interfaces/phc.py | sheerluck/sage | b5e572b7d231f70c139d9978d68add80c4ef353d | [
"BSL-1.0"
] | 1,742 | 2015-01-04T07:06:13.000Z | 2022-03-30T11:32:52.000Z | src/sage/interfaces/phc.py | sheerluck/sage | b5e572b7d231f70c139d9978d68add80c4ef353d | [
"BSL-1.0"
] | 66 | 2015-03-19T19:17:24.000Z | 2022-03-16T11:59:30.000Z | src/sage/interfaces/phc.py | sheerluck/sage | b5e572b7d231f70c139d9978d68add80c4ef353d | [
"BSL-1.0"
] | 495 | 2015-01-10T10:23:18.000Z | 2022-03-24T22:06:11.000Z | r"""
Interface to PHC.
PHC computes numerical information about systems of polynomials over
the complex numbers.
PHC implements polynomial homotopy methods to exploit structure in
order to better approximate all isolated solutions. The package also
includes extra tools to handle positive dimensional solution
componen... | 39.848958 | 164 | 0.570174 |
4a079032a1da226c2dd508a2e2094461ee70a958 | 282 | py | Python | backend/models/constants.py | DanielAguirre/metrics-mvp | a438fb6f1765fd40a61bf6bc2f8f147936c42d75 | [
"MIT"
] | null | null | null | backend/models/constants.py | DanielAguirre/metrics-mvp | a438fb6f1765fd40a61bf6bc2f8f147936c42d75 | [
"MIT"
] | null | null | null | backend/models/constants.py | DanielAguirre/metrics-mvp | a438fb6f1765fd40a61bf6bc2f8f147936c42d75 | [
"MIT"
] | null | null | null | import pytz
DEFAULT_TIME_STR_INTERVALS = [
('03:00','07:00'),
('07:00','10:00'),
('10:00','16:00'),
('16:00','19:00'),
('19:00','03:00+1'),
]
PACIFIC_TIMEZONE = pytz.timezone('US/Pacific')
AGENCY = 'sf-muni'
DEFAULT_STAT_KEYS = ['count', 'avg', 'min', 'median', 'max'] | 18.8 | 60 | 0.578014 |
4a07905668b54fa624cbc29413390b7e067ef08c | 2,145 | py | Python | salt/sdb/etcd_db.py | yuriks/salt | d2a5bd8adddb98ec1718d79384aa13b4f37e8028 | [
"Apache-2.0",
"MIT"
] | 1 | 2020-03-31T22:51:16.000Z | 2020-03-31T22:51:16.000Z | salt/sdb/etcd_db.py | yuriks/salt | d2a5bd8adddb98ec1718d79384aa13b4f37e8028 | [
"Apache-2.0",
"MIT"
] | null | null | null | salt/sdb/etcd_db.py | yuriks/salt | d2a5bd8adddb98ec1718d79384aa13b4f37e8028 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-09-30T07:00:01.000Z | 2021-09-30T07:00:01.000Z | # -*- coding: utf-8 -*-
'''
etcd Database Module
:maintainer: SaltStack
:maturity: New
:depends: python-etcd
:platform: all
.. versionadded:: 2015.5.0
This module allows access to the etcd database using an ``sdb://`` URI. This
package is located at ``https://pypi.python.org/pypi/python-etcd``.
L... | 21.887755 | 79 | 0.66993 |
4a0792bdb2be056d05608db13489b45edaf14f5a | 8,336 | py | Python | tests/test_dgilib_interface_communication.py | martinabr/pydgilib | 9e27b11e74518375ae78959a71f896e92a51cdb1 | [
"BSD-3-Clause"
] | 2 | 2019-04-05T13:27:54.000Z | 2020-10-09T22:56:22.000Z | tests/test_dgilib_interface_communication.py | martinabr/pydgilib | 9e27b11e74518375ae78959a71f896e92a51cdb1 | [
"BSD-3-Clause"
] | null | null | null | tests/test_dgilib_interface_communication.py | martinabr/pydgilib | 9e27b11e74518375ae78959a71f896e92a51cdb1 | [
"BSD-3-Clause"
] | 1 | 2019-09-11T07:48:45.000Z | 2019-09-11T07:48:45.000Z | """This module holds the automated tests for DGILib Interface Communication."""
from pydgilib.dgilib import DGILib
from pydgilib.dgilib_config import (
NUM_INTERFACES, INTERFACE_TIMESTAMP, INTERFACE_SPI, INTERFACE_USART,
INTERFACE_I2C, INTERFACE_GPIO, INTERFACE_POWER_DATA, INTERFACE_POWER_SYNC,
INTERFACE_R... | 36.884956 | 79 | 0.644794 |
4a079322b499512cd37f392ca760ca6d5a26fa79 | 10,217 | py | Python | tezpool.py | vogelito/tezpool | db480340f2f6d7d2dbe76406a3864fd09e61784a | [
"MIT"
] | null | null | null | tezpool.py | vogelito/tezpool | db480340f2f6d7d2dbe76406a3864fd09e61784a | [
"MIT"
] | null | null | null | tezpool.py | vogelito/tezpool | db480340f2f6d7d2dbe76406a3864fd09e61784a | [
"MIT"
] | null | null | null | #!/usr/bin/python3
#http://doc.tzalpha.net/api/rpc_proposal.html?highlight=june
#http://doc.tzalpha.net/api/rpc.html#usage
import json
import requests
import time
import argparse
import math
import sys
# Constants
PRESERVED_CYCLES = 5
BLOCK_REWARD = 16 * 1000000.
ENDORSMENT_REWARD = 2 * 1000000.
BLOCKS_PER_CYCLE = 4... | 31.436923 | 204 | 0.645982 |
4a0793933df876a4631d39a2dd3d969543e39ab1 | 22,320 | py | Python | nippy/nippy.py | UEF-BBC/nippy | 05d0eb44e40b6c8f0c7cbabdc828410c2fad8b0c | [
"MIT"
] | 38 | 2018-11-13T06:46:11.000Z | 2022-03-15T08:26:43.000Z | nippy/nippy.py | UEF-BBC/nippy | 05d0eb44e40b6c8f0c7cbabdc828410c2fad8b0c | [
"MIT"
] | 1 | 2019-11-24T08:19:36.000Z | 2019-11-24T08:19:36.000Z | nippy/nippy.py | UEF-BBC/nippy | 05d0eb44e40b6c8f0c7cbabdc828410c2fad8b0c | [
"MIT"
] | 16 | 2019-11-03T22:36:28.000Z | 2022-03-06T10:46:32.000Z | # Semi-automatic preprocessing script for NIR data. This script contains the preprocessing functions and some utility
# functions (like data export).
#
# jtorniainen, ioafara // Department of Applied Physics, University of Eastern Finland
# 2020, MIT License
import scipy.signal
import scipy.io as io
import scipy.ndim... | 33.972603 | 144 | 0.643772 |
4a079467bead3863947a5088abba36624d3e5616 | 186 | py | Python | examples/article/Code4.py | UnixJunkie/mordred | d65d3fa451aca3f32adf4124a83532978ae57e46 | [
"BSD-3-Clause"
] | 199 | 2017-04-26T07:40:32.000Z | 2022-03-29T10:52:19.000Z | examples/article/Code4.py | UnixJunkie/mordred | d65d3fa451aca3f32adf4124a83532978ae57e46 | [
"BSD-3-Clause"
] | 87 | 2016-01-15T09:02:20.000Z | 2022-03-21T23:18:08.000Z | examples/article/Code4.py | UnixJunkie/mordred | d65d3fa451aca3f32adf4124a83532978ae57e46 | [
"BSD-3-Clause"
] | 64 | 2018-03-07T13:21:47.000Z | 2022-03-16T00:56:11.000Z | from distutils.version import StrictVersion
from mordred.RingCount import RingCount
# Start Code 4
presets = list(RingCount.preset(version=StrictVersion("1.0.0")))
print(len(presets))
| 23.25 | 64 | 0.795699 |
4a0794a6468fc0c8a4ce2d50bc189152025a84d4 | 2,133 | py | Python | tests/display_module/test_conductor.py | MetaGenScope/metagenscope-server | 609cd57c626c857c8efde8237a1f22f4d1e6065d | [
"MIT"
] | null | null | null | tests/display_module/test_conductor.py | MetaGenScope/metagenscope-server | 609cd57c626c857c8efde8237a1f22f4d1e6065d | [
"MIT"
] | null | null | null | tests/display_module/test_conductor.py | MetaGenScope/metagenscope-server | 609cd57c626c857c8efde8237a1f22f4d1e6065d | [
"MIT"
] | null | null | null | """Test suite for DisplayModuleConductors."""
from uuid import uuid4
from app.display_modules.conductor import DisplayModuleConductor, SampleConductor
from app.display_modules.sample_similarity import SampleSimilarityDisplayModule
from app.tool_results.kraken import KrakenResultModule
from app.tool_results.krakenhll ... | 40.245283 | 90 | 0.78106 |
4a0795da12bea7fcb0a4656aaafe8d424d3d63b5 | 3,382 | py | Python | server/djangobackend/settings.py | valencialejo/agfzb-CloudAppDevelopment_Capstone | 247a29cc28de5abb6f903b36396f6315a9ae4f7e | [
"Apache-2.0"
] | null | null | null | server/djangobackend/settings.py | valencialejo/agfzb-CloudAppDevelopment_Capstone | 247a29cc28de5abb6f903b36396f6315a9ae4f7e | [
"Apache-2.0"
] | null | null | null | server/djangobackend/settings.py | valencialejo/agfzb-CloudAppDevelopment_Capstone | 247a29cc28de5abb6f903b36396f6315a9ae4f7e | [
"Apache-2.0"
] | null | null | null | """
Django settings for djangobackend project.
Generated by 'django-admin startproject' using Django 3.1.3.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
import ... | 26.421875 | 91 | 0.701656 |
4a0796563c70f9c21e5d266cbd94a3fcc30777af | 1,630 | py | Python | contest_manager/emails.py | zapme/contest-manager | 462c1022faf869295d55c3676fdaf2c6917b0c4c | [
"BSD-4-Clause"
] | 1 | 2021-05-05T05:31:32.000Z | 2021-05-05T05:31:32.000Z | contest_manager/emails.py | zapme/contest-manager | 462c1022faf869295d55c3676fdaf2c6917b0c4c | [
"BSD-4-Clause"
] | 1 | 2021-03-23T16:22:50.000Z | 2021-03-23T16:22:50.000Z | contest_manager/emails.py | zapme/contest-manager | 462c1022faf869295d55c3676fdaf2c6917b0c4c | [
"BSD-4-Clause"
] | null | null | null | """Contains e-mail templates for log submission receipts."""
OK_TEMPLATE = """We're happy to confirm that we have received your logs for
{name}. Your receipt number for this particular submission is {receipt}.
Please save this e-mail, which contains your receipt number, at least
until the scores have been released fo... | 36.222222 | 75 | 0.790798 |
4a079706ec90b71698a6b567c4484d02b6289f15 | 4,900 | py | Python | kylinpy/sqla_dialect.py | liuyonghengheng/kylinpy | 61b92b96619f5c6d9f0f92ec08cb4d5cfa272d10 | [
"MIT"
] | null | null | null | kylinpy/sqla_dialect.py | liuyonghengheng/kylinpy | 61b92b96619f5c6d9f0f92ec08cb4d5cfa272d10 | [
"MIT"
] | null | null | null | kylinpy/sqla_dialect.py | liuyonghengheng/kylinpy | 61b92b96619f5c6d9f0f92ec08cb4d5cfa272d10 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import itertools
import sqlalchemy.exc
from sqlalchemy import pool
from sqlalchemy.engine import default
from sqlalchemy.sql import compiler
fro... | 32.450331 | 93 | 0.682449 |
4a0797e578b5e4bbe6553cb65f685755a28a99a6 | 9,768 | py | Python | src/tucuxi/sqs.py | unj-inovacao/tucuxi | 104b1f178b38dcc625bd64643c0986a1cfee8f53 | [
"MIT"
] | null | null | null | src/tucuxi/sqs.py | unj-inovacao/tucuxi | 104b1f178b38dcc625bd64643c0986a1cfee8f53 | [
"MIT"
] | 7 | 2020-05-28T19:10:01.000Z | 2020-08-14T17:34:13.000Z | src/tucuxi/sqs.py | unj-inovacao/tucuxi | 104b1f178b38dcc625bd64643c0986a1cfee8f53 | [
"MIT"
] | null | null | null | """Some useful high-level methods to interact with AWS S3."""
import json
import logging
import re
import time
from functools import reduce
from typing import Any
from typing import Callable
from typing import Dict
from typing import Generator
from typing import List
from typing import Optional
from typing import Tuple... | 35.78022 | 156 | 0.507985 |
4a0798176672e89b1c53474567ecfd32fc237c5e | 755 | py | Python | data structures/linkedlist/2.6 palindrome.py | iFun/Algo | e9e2d42c72c595e0cd138dcb0150b6a1bdc7c073 | [
"MIT"
] | null | null | null | data structures/linkedlist/2.6 palindrome.py | iFun/Algo | e9e2d42c72c595e0cd138dcb0150b6a1bdc7c073 | [
"MIT"
] | null | null | null | data structures/linkedlist/2.6 palindrome.py | iFun/Algo | e9e2d42c72c595e0cd138dcb0150b6a1bdc7c073 | [
"MIT"
] | null | null | null | # implement a function to check if a linked list is a palindrome
from linkedlist import *
def main():
ll = linked_list()
ll.add_node(1)
ll.add_node(2)
ll.add_node(3)
ll.add_node(3)
ll.add_node(2)
ll.add_node(1)
slow_node = ll.head
fast_node = ll.head
stack = []
while fast_node is not Non... | 18.875 | 65 | 0.675497 |
4a079934f0030a2dfafb41d9ea059a56e42918f2 | 246,407 | py | Python | openbmctool.py | bluerise/testmaster | 87682d7f6e3aced7c68ed73f39a19cdd325a9aa6 | [
"Apache-2.0"
] | 3 | 2020-12-05T11:45:30.000Z | 2021-11-28T03:15:02.000Z | openbmctool.py | bluerise/testmaster | 87682d7f6e3aced7c68ed73f39a19cdd325a9aa6 | [
"Apache-2.0"
] | 4 | 2019-03-13T09:23:28.000Z | 2022-02-28T10:06:16.000Z | openbmctool.py | bluerise/testmaster | 87682d7f6e3aced7c68ed73f39a19cdd325a9aa6 | [
"Apache-2.0"
] | 4 | 2019-02-05T23:53:07.000Z | 2020-12-05T11:45:33.000Z | #!/usr/bin/env python3
"""
Copyright 2017,2019 IBM Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by app... | 45.555001 | 244 | 0.623148 |
4a0799a82dfbc8f8d048a6622c159e0ca6ee1f96 | 1,471 | py | Python | microhttp_restful/tests/helpers/testcases.py | meyt/microhttp-restful | 68be4cd882fb0f5eabc18a9b5b9b3aaf3239d8a7 | [
"MIT"
] | 1 | 2018-09-26T08:56:13.000Z | 2018-09-26T08:56:13.000Z | microhttp_restful/tests/helpers/testcases.py | meyt/microhttp-restful | 68be4cd882fb0f5eabc18a9b5b9b3aaf3239d8a7 | [
"MIT"
] | 13 | 2017-11-08T14:05:56.000Z | 2019-01-31T12:11:31.000Z | microhttp_restful/tests/helpers/testcases.py | meyt/microhttp-restful | 68be4cd882fb0f5eabc18a9b5b9b3aaf3239d8a7 | [
"MIT"
] | null | null | null | from unittest import TestCase
from webtest import TestApp
from microhttp.ext import db
from microhttp_restful.tests.helpers import MockApplication, DeclarativeBase
class WebTestMetaDataMixin:
def metadata(self, url, params='', headers=None, extra_environ=None,
status=None, upload_files=None, e... | 31.978261 | 81 | 0.647179 |
4a0799c1f3d951add5436af44bd338174e1eeb4b | 1,593 | py | Python | bayesnet/math/product.py | ctgk/bayes | 96eab9305eaeecc5a5b032cdf92a8285de4f60bf | [
"MIT"
] | 21 | 2019-01-08T05:58:41.000Z | 2021-11-26T14:24:11.000Z | bayesnet/math/product.py | ctgk/bayes | 96eab9305eaeecc5a5b032cdf92a8285de4f60bf | [
"MIT"
] | null | null | null | bayesnet/math/product.py | ctgk/bayes | 96eab9305eaeecc5a5b032cdf92a8285de4f60bf | [
"MIT"
] | 11 | 2019-05-04T13:44:19.000Z | 2021-08-05T04:26:19.000Z | import numpy as np
from bayesnet.tensor.constant import Constant
from bayesnet.tensor.tensor import Tensor
from bayesnet.function import Function
class Product(Function):
def __init__(self, axis=None, keepdims=False):
if isinstance(axis, int):
axis = (axis,)
elif isinstance(axis, tupl... | 27.465517 | 74 | 0.596359 |
4a079a4908d51557fe9413ce63f9c0dbfea53926 | 3,691 | py | Python | tensorlayer/lazy_imports.py | Howdy-Personally/tensorlayer-master | bb92e4e187419d5e7ded8331d5c7cbf5615ee744 | [
"Apache-2.0"
] | 4,484 | 2017-12-27T03:28:35.000Z | 2021-12-02T14:42:58.000Z | tensorlayer/lazy_imports.py | Mesica/tensorlayer | c5def14c4d66d150863f975d9001a5e1891d003f | [
"Apache-2.0"
] | 549 | 2017-12-28T07:19:52.000Z | 2021-11-05T02:34:20.000Z | tensorlayer/lazy_imports.py | Mesica/tensorlayer | c5def14c4d66d150863f975d9001a5e1891d003f | [
"Apache-2.0"
] | 1,076 | 2017-12-27T12:25:46.000Z | 2021-11-24T09:12:36.000Z | #! /usr/bin/python
# -*- coding: utf-8 -*-
"""This module provides lazy import functionality to improve the import
performance of nitime. For example, some parts of nitime leverage and import
matplotlib, which is quite a big package, yet most of the nitime code does not
depend on matplotlib. By lazily-loading a module,... | 36.91 | 96 | 0.686806 |
4a079a506f19e19b6a637e6a3c37c667ec774665 | 2,493 | py | Python | code-files/frosch2010_CC_language.py | Frosch2010/discord-color-cards | 0669e4aa9c73f8db9e148c88dad85c44889b3216 | [
"MIT"
] | 1 | 2021-04-02T19:24:09.000Z | 2021-04-02T19:24:09.000Z | code-files/frosch2010_CC_language.py | Frosch2010/discord-color-cards | 0669e4aa9c73f8db9e148c88dad85c44889b3216 | [
"MIT"
] | 1 | 2021-04-03T12:50:12.000Z | 2021-04-05T21:47:15.000Z | code-files/frosch2010_CC_language.py | Frosch2010/discord-color-cards | 0669e4aa9c73f8db9e148c88dad85c44889b3216 | [
"MIT"
] | null | null | null | class cc_language:
#General
cc_wrong_arguments = ""
cc_wrong_game_command = ""
cc_shutdown_bot = ""
#Game
cc_game_already_running = ""
cc_cards_per_player_set_to = ""
cc_no_game_running = ""
cc_user_already_joined = ""
cc_user_joined_game = ""
cc_more_p... | 25.438776 | 56 | 0.669073 |
4a079b233a3899a6940acf43a1dc2786fa6318c0 | 377 | py | Python | Simulation_Settings.py | alpertucanberk/2D_Genetic_Algorithm_Agents | 786aae62618d5f0291e89ea825919d4e1bbab694 | [
"MIT"
] | null | null | null | Simulation_Settings.py | alpertucanberk/2D_Genetic_Algorithm_Agents | 786aae62618d5f0291e89ea825919d4e1bbab694 | [
"MIT"
] | null | null | null | Simulation_Settings.py | alpertucanberk/2D_Genetic_Algorithm_Agents | 786aae62618d5f0291e89ea825919d4e1bbab694 | [
"MIT"
] | null | null | null |
from Neural_Network import forward_propagation
NUM_STEPS_PER_GAME = 200
SCREEN_WIDTH = 250
SCREEN_HEIGHT = 250
WALL_THICKNESS = 5
AGENT_SIZE = 2
FOOD_SIZE = 1
FOOD_DENSITY = 12
MIN_AGENT_DIST = 5
LAYER_SIZES = [4]
NEURAL_NETWORK = forward_propagation
MUTATION_RATE = 3
NUM_GENES_MUTATED = 5
num_individuals_pe... | 13.464286 | 46 | 0.795756 |
4a079e19531e3ad878e98335cea8cd0e0d6ef857 | 1,948 | py | Python | gpvdm_gui/gui/inp_util.py | roderickmackenzie/gpvdm | 914fd2ee93e7202339853acaec1d61d59b789987 | [
"BSD-3-Clause"
] | 12 | 2016-09-13T08:58:13.000Z | 2022-01-17T07:04:52.000Z | gpvdm_gui/gui/inp_util.py | roderickmackenzie/gpvdm | 914fd2ee93e7202339853acaec1d61d59b789987 | [
"BSD-3-Clause"
] | 3 | 2017-11-11T12:33:02.000Z | 2019-03-08T00:48:08.000Z | gpvdm_gui/gui/inp_util.py | roderickmackenzie/gpvdm | 914fd2ee93e7202339853acaec1d61d59b789987 | [
"BSD-3-Clause"
] | 6 | 2019-01-03T06:17:12.000Z | 2022-01-01T15:59:00.000Z | #
# General-purpose Photovoltaic Device Model - a drift diffusion base/Shockley-Read-Hall
# model for 1st, 2nd and 3rd generation solar cells.
# Copyright (C) 2008-2022 Roderick C. I. MacKenzie r.c.i.mackenzie at googlemail.com
#
# https://www.gpvdm.com
#
# This program is free software; you can redist... | 24.658228 | 89 | 0.680698 |
4a079e5634b5dfa1d0f96060237febbd32a708e3 | 1,764 | py | Python | Code/gov/spiders/gov_spider.py | GurKirat21/Profile-Exposer | ecbf517d4dd8932829f21fb516e81acea3e9daf9 | [
"Apache-2.0"
] | 8 | 2020-09-30T20:03:09.000Z | 2020-10-25T10:23:54.000Z | Code/gov/spiders/gov_spider.py | GurKirat21/Profile-Exposer | ecbf517d4dd8932829f21fb516e81acea3e9daf9 | [
"Apache-2.0"
] | 1 | 2020-10-04T11:27:29.000Z | 2020-10-04T11:27:29.000Z | Code/gov/spiders/gov_spider.py | GurKirat21/Profile-Exposer | ecbf517d4dd8932829f21fb516e81acea3e9daf9 | [
"Apache-2.0"
] | 89 | 2020-09-30T20:03:23.000Z | 2021-05-01T08:01:26.000Z | import scrapy
from bs4 import BeautifulSoup
import re
from urllib.parse import urlparse
from functions import pred
import scrape
class govSpider(scrapy.Spider):
name = "mygovscraper"
allowed_domains = []
start_urls = []
def __init__(self, filename="starter_sites.txt", *args, **kwargs):
super(go... | 32.666667 | 156 | 0.52381 |
4a079ebf3487f49f7161f5d8a42940528b927c63 | 1,435 | py | Python | src/abaqus/Sketcher/ConstrainedSketchParameter/Parameter.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | 7 | 2022-01-21T09:15:45.000Z | 2022-02-15T09:31:58.000Z | src/abaqus/Sketcher/ConstrainedSketchParameter/Parameter.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | null | null | null | src/abaqus/Sketcher/ConstrainedSketchParameter/Parameter.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | null | null | null | from .ConstrainedSketchParameter import ConstrainedSketchParameter
class Parameter(ConstrainedSketchParameter):
def __init__(self, name: str, path: str = '', expression: str = '', previous: str = ''):
"""This method creates a parameter and optionally associates a dimension with this
parameter.
... | 33.372093 | 99 | 0.595819 |
4a079f022f8bcc8c3bd0c103b18d731cf3c9a9db | 2,836 | py | Python | python/commonil.py | mattrepl/binaryninja-api | ac8bb0fe99c87b27bf20feb5a405480ae7286755 | [
"MIT"
] | null | null | null | python/commonil.py | mattrepl/binaryninja-api | ac8bb0fe99c87b27bf20feb5a405480ae7286755 | [
"MIT"
] | null | null | null | python/commonil.py | mattrepl/binaryninja-api | ac8bb0fe99c87b27bf20feb5a405480ae7286755 | [
"MIT"
] | null | null | null | # Copyright (c) 2019-2021 Vector 35 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, merge, publish, ... | 19.162162 | 92 | 0.767983 |
4a079f460b4277e47313d9bf9f4d9ede68f33f74 | 18,510 | py | Python | window/lp_generator.py | rkoco/lp-mapf | 8ffa93bd33feb244ac2db7230ea3b9ff2deb7038 | [
"MIT"
] | null | null | null | window/lp_generator.py | rkoco/lp-mapf | 8ffa93bd33feb244ac2db7230ea3b9ff2deb7038 | [
"MIT"
] | null | null | null | window/lp_generator.py | rkoco/lp-mapf | 8ffa93bd33feb244ac2db7230ea3b9ff2deb7038 | [
"MIT"
] | null | null | null | import os
import clingo
import asp_solver
import json
class Problem:
def __init__(self, window_bound):
self.obstacles = []
self.map = []
self.height = 0
self.width = 0
self.num_agents = 0
self.agents_pos = []
self.max_distance = -1
self.heuristic = []... | 36.081871 | 159 | 0.449271 |
4a07a052dd52049314cc531762643b9fca10f4fc | 87 | py | Python | tests/test_beanie.py | mikeckennedy/beanie | 3a3b52f7c4fcb07d51f5afb6b88f56161526c963 | [
"Apache-2.0"
] | null | null | null | tests/test_beanie.py | mikeckennedy/beanie | 3a3b52f7c4fcb07d51f5afb6b88f56161526c963 | [
"Apache-2.0"
] | null | null | null | tests/test_beanie.py | mikeckennedy/beanie | 3a3b52f7c4fcb07d51f5afb6b88f56161526c963 | [
"Apache-2.0"
] | null | null | null | from beanie import __version__
def test_version():
assert __version__ == "1.8.2"
| 14.5 | 33 | 0.712644 |
4a07a08b36014037a1a51d2dc8f62805742c2fbd | 870 | py | Python | tests/test_model_parser.py | bcaitech1/p4-mod-model_diet | 36d8a747e12c375b07d132ed4d08f9fc77126a8b | [
"MIT"
] | 1 | 2021-11-30T12:01:55.000Z | 2021-11-30T12:01:55.000Z | tests/test_model_parser.py | bcaitech1/p4-mod-model_diet | 36d8a747e12c375b07d132ed4d08f9fc77126a8b | [
"MIT"
] | null | null | null | tests/test_model_parser.py | bcaitech1/p4-mod-model_diet | 36d8a747e12c375b07d132ed4d08f9fc77126a8b | [
"MIT"
] | null | null | null | """Model parse test.
- Author: Jongkuk Lim
- Contact: lim.jeikei@gmail.com
"""
import os
import torch
from src.model import Model
class TestModelParser:
"""Test model parser."""
# pylint: disable=no-self-use
INPUT = torch.rand(1, 3, 32, 32)
def test_show_case(self):
"""Test show case mo... | 24.857143 | 72 | 0.628736 |
4a07a0b559147597e70c9cf3ef586d755358221f | 1,763 | py | Python | algorithm/neural-network/tfXOR.py | mk43/machine-learning | 1ca1baf797fe6f593a88ad4e0d7ac7e5c24ce139 | [
"Apache-2.0"
] | 6 | 2018-02-22T00:27:44.000Z | 2019-11-21T18:12:48.000Z | algorithm/neural-network/tfXOR.py | mk43/machine-learning | 1ca1baf797fe6f593a88ad4e0d7ac7e5c24ce139 | [
"Apache-2.0"
] | null | null | null | algorithm/neural-network/tfXOR.py | mk43/machine-learning | 1ca1baf797fe6f593a88ad4e0d7ac7e5c24ce139 | [
"Apache-2.0"
] | 4 | 2018-02-19T05:59:23.000Z | 2020-04-08T08:53:02.000Z | # coding: utf-8
import numpy as np
import tensorflow as tf
def sigmoid(x):
return 1 / (1 + np.power(np.e, -2 * (x)))
def add_layer(inputs, in_size, out_size, activation_function=None, ):
Weights = tf.Variable(tf.random_normal([in_size, out_size]))
biases = tf.Variable(tf.zeros([1, out_size]) + 0.1)
... | 29.383333 | 111 | 0.628474 |
4a07a0dd83ae4cb05580d85663a00fc7582bdeaa | 10,505 | py | Python | utils/cmpcodesize/cmpcodesize/compare.py | francisvm/swift | 15e209ea2fde679ee78438d4ba949144acb7fee4 | [
"Apache-2.0"
] | 2 | 2016-03-05T00:19:14.000Z | 2018-09-07T19:34:56.000Z | utils/cmpcodesize/cmpcodesize/compare.py | francisvm/swift | 15e209ea2fde679ee78438d4ba949144acb7fee4 | [
"Apache-2.0"
] | 153 | 2018-01-21T15:24:47.000Z | 2018-09-13T12:46:16.000Z | utils/cmpcodesize/cmpcodesize/compare.py | francisvm/swift | 15e209ea2fde679ee78438d4ba949144acb7fee4 | [
"Apache-2.0"
] | 11 | 2017-12-13T08:08:15.000Z | 2019-06-18T14:27:32.000Z | # ====--- compare.py - Compare built products' sizes -*- coding: utf-8 -*-===//
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.t... | 35.853242 | 79 | 0.582389 |
4a07a13a0ae2871d96f4550ac24061e5687c86f3 | 11,243 | py | Python | teal/teal.py | bustawin/teal | 0c128fce0a1d9992199626bd8447532cce476c18 | [
"BSD-3-Clause"
] | null | null | null | teal/teal.py | bustawin/teal | 0c128fce0a1d9992199626bd8447532cce476c18 | [
"BSD-3-Clause"
] | null | null | null | teal/teal.py | bustawin/teal | 0c128fce0a1d9992199626bd8447532cce476c18 | [
"BSD-3-Clause"
] | null | null | null | import inspect
from typing import Dict, Type
import click_spinner
import ereuse_utils
import flask_cors
from anytree import Node
from apispec import APISpec
from click import option
from ereuse_utils import ensure_utf8
from flask import Flask, jsonify
from flask.globals import _app_ctx_stack
from flask_sqlalchemy impo... | 39.449123 | 97 | 0.60491 |
4a07a162ff79e4b57d834f09cafad42f8bf238d0 | 174 | py | Python | guiauto/gui/base_test.py | saasaa831/guidesktop | 68abe5e896c4d29cf12898abd3b27c60553a3948 | [
"Apache-2.0"
] | null | null | null | guiauto/gui/base_test.py | saasaa831/guidesktop | 68abe5e896c4d29cf12898abd3b27c60553a3948 | [
"Apache-2.0"
] | null | null | null | guiauto/gui/base_test.py | saasaa831/guidesktop | 68abe5e896c4d29cf12898abd3b27c60553a3948 | [
"Apache-2.0"
] | null | null | null |
class BaseTest:
driver = None
general = None
def __init__(self, driver, parent_handle):
self.driver = driver
self.parent_handle = parent_handle | 19.333333 | 46 | 0.655172 |
4a07a183e39459e6c943a88ee76ed6bd5dc8a53a | 26,879 | py | Python | deploy_config_generator/output/__init__.py | ApplauseOSS/deploy-config-generator | 04674ba02f5a797e25c682aa9ff755989741a0c1 | [
"MIT"
] | 3 | 2019-04-05T14:16:17.000Z | 2021-06-25T20:53:03.000Z | deploy_config_generator/output/__init__.py | ApplauseOSS/deploy-config-generator | 04674ba02f5a797e25c682aa9ff755989741a0c1 | [
"MIT"
] | 6 | 2019-04-04T20:20:16.000Z | 2021-09-27T21:04:39.000Z | deploy_config_generator/output/__init__.py | ApplauseOSS/deploy-config-generator | 04674ba02f5a797e25c682aa9ff755989741a0c1 | [
"MIT"
] | null | null | null | import copy
import inspect
import os.path
import re
import six
from deploy_config_generator.site_config import SiteConfig
from deploy_config_generator.display import Display
from deploy_config_generator.template import Template
from deploy_config_generator.errors import DeployConfigGenerationError, DeployConfigError, ... | 40.602719 | 162 | 0.55322 |
4a07a201150c9c6db78a02308f6259bc3d918d6a | 23,738 | py | Python | official/vision/beta/projects/movinet/modeling/movinet_layers_test.py | hjkim-haga/TF-OD-API | 22ac477ff4dfb93fe7a32c94b5f0b1e74330902b | [
"Apache-2.0"
] | null | null | null | official/vision/beta/projects/movinet/modeling/movinet_layers_test.py | hjkim-haga/TF-OD-API | 22ac477ff4dfb93fe7a32c94b5f0b1e74330902b | [
"Apache-2.0"
] | null | null | null | official/vision/beta/projects/movinet/modeling/movinet_layers_test.py | hjkim-haga/TF-OD-API | 22ac477ff4dfb93fe7a32c94b5f0b1e74330902b | [
"Apache-2.0"
] | null | null | null | <<<<<<< HEAD
# Copyright 2021 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
#
# Unles... | 30.708926 | 75 | 0.58122 |
4a07a21ad1b43836427de7e97f96a4df4c5c6e19 | 174 | py | Python | webapp/app/logs/__init__.py | alan-turing-institute/CROP | 467956ba8e273daa6afbfafd89bd2c3462a8156e | [
"MIT"
] | 9 | 2020-02-11T17:57:47.000Z | 2022-03-22T14:24:55.000Z | webapp/app/logs/__init__.py | alan-turing-institute/CROP | 467956ba8e273daa6afbfafd89bd2c3462a8156e | [
"MIT"
] | 64 | 2020-02-11T17:35:36.000Z | 2022-03-31T13:19:08.000Z | webapp/app/logs/__init__.py | alan-turing-institute/CROP | 467956ba8e273daa6afbfafd89bd2c3462a8156e | [
"MIT"
] | 2 | 2020-08-16T06:10:24.000Z | 2021-04-15T10:11:51.000Z | from flask import Blueprint
blueprint = Blueprint(
'logs_blueprint',
__name__,
url_prefix='/logs',
template_folder='templates',
static_folder='static'
)
| 17.4 | 32 | 0.695402 |
4a07a258000adccc5889a116274e96c9df102886 | 714 | py | Python | coin_dectector/web.py | jorisroovers/opencv-playground | 4a5d179be422ea58f05ad1b050724e27b5a75820 | [
"Apache-2.0"
] | null | null | null | coin_dectector/web.py | jorisroovers/opencv-playground | 4a5d179be422ea58f05ad1b050724e27b5a75820 | [
"Apache-2.0"
] | null | null | null | coin_dectector/web.py | jorisroovers/opencv-playground | 4a5d179be422ea58f05ad1b050724e27b5a75820 | [
"Apache-2.0"
] | null | null | null | from coins import detector
from flask import Flask
from flask import request, jsonify, render_template, send_from_directory
app = Flask(__name__)
@app.route("/")
def index():
return render_template("index.html", name="joris")
@app.route('/assets/<path:path>')
def assets(path):
return send_from_directory('a... | 22.3125 | 96 | 0.697479 |
4a07a3474c184c19daedaba6ca3716aea54cec3f | 821 | py | Python | config_example.py | stevemason/mqtt-audio-alert | 439e0b34ec7bfa14144a42496c72d82cc36ebc04 | [
"Apache-2.0"
] | null | null | null | config_example.py | stevemason/mqtt-audio-alert | 439e0b34ec7bfa14144a42496c72d82cc36ebc04 | [
"Apache-2.0"
] | null | null | null | config_example.py | stevemason/mqtt-audio-alert | 439e0b34ec7bfa14144a42496c72d82cc36ebc04 | [
"Apache-2.0"
] | null | null | null | """Private config items for mqtt-audio-alert."""
sounds = {
# 'NAMEOFSOUND1': '/PATH/TO/AUDIOFILE.mp3',
# 'NAMEOFSOUND2': '/PATH/TO/AUDIOFILE.mp3'
}
# Time ranged where sounds are permitted to play.
# Multiple time ranges are allowed.
active_times = [
#['07:00', '12:00'],
#['13:15', '14:15'],
['0... | 25.65625 | 68 | 0.652862 |
4a07a3b31e1c17469f33e7fa3f0eee660d333d8b | 11,265 | py | Python | ssasse_platform/ActiveScanningEngine/custom_scans/dnp3_read_analog_inputs.py | aashok3/ssass-e | 77da9a4c1cef7006fe4a9c6a64f46a0eaade87ca | [
"BSD-3-Clause"
] | 4 | 2021-02-16T17:27:37.000Z | 2022-01-25T09:29:30.000Z | ssasse_platform/ActiveScanningEngine/custom_scans/dnp3_read_analog_inputs.py | aashok3/ssass-e | 77da9a4c1cef7006fe4a9c6a64f46a0eaade87ca | [
"BSD-3-Clause"
] | 3 | 2021-05-05T16:38:54.000Z | 2021-06-04T20:05:28.000Z | ssasse_platform/ActiveScanningEngine/custom_scans/dnp3_read_analog_inputs.py | aashok3/ssass-e | 77da9a4c1cef7006fe4a9c6a64f46a0eaade87ca | [
"BSD-3-Clause"
] | 5 | 2021-04-16T21:50:57.000Z | 2021-05-25T16:36:26.000Z | # -*- coding: utf-8 -*- {{{
# vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et:
#
# Copyright (2021) Battelle Memorial Institute
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
#... | 35.536278 | 183 | 0.624767 |
4a07a41e70d99b09385e334fcefe414287d03a03 | 3,809 | py | Python | tensorflow/python/keras/utils/dataset_creator_test.py | koreybea/tensorflow | e252fffb16f2706688604dc91c426bae367ae5e8 | [
"Apache-2.0"
] | 6 | 2021-03-30T07:42:04.000Z | 2022-03-23T02:42:36.000Z | tensorflow/python/keras/utils/dataset_creator_test.py | koreybea/tensorflow | e252fffb16f2706688604dc91c426bae367ae5e8 | [
"Apache-2.0"
] | 7 | 2021-02-21T21:05:59.000Z | 2022-02-10T01:39:06.000Z | tensorflow/python/keras/utils/dataset_creator_test.py | koreybea/tensorflow | e252fffb16f2706688604dc91c426bae367ae5e8 | [
"Apache-2.0"
] | 4 | 2019-06-15T01:13:28.000Z | 2020-12-16T02:28:45.000Z | # Copyright 2021 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.268041 | 80 | 0.7288 |
4a07a545e98a3229144a79d968cbf7bfb9fb0a18 | 1,988 | py | Python | test/functional/p2p_invalid_locator.py | xiaolin1579/vektorcoin | 6e33506d8fba8883f401a89af0b7a76d44fb8bed | [
"MIT"
] | 1 | 2021-02-16T10:45:46.000Z | 2021-02-16T10:45:46.000Z | test/functional/p2p_invalid_locator.py | xiaolin1579/vektorcoin | 6e33506d8fba8883f401a89af0b7a76d44fb8bed | [
"MIT"
] | null | null | null | test/functional/p2p_invalid_locator.py | xiaolin1579/vektorcoin | 6e33506d8fba8883f401a89af0b7a76d44fb8bed | [
"MIT"
] | 1 | 2021-02-09T14:29:27.000Z | 2021-02-09T14:29:27.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-2017 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 responses to invalid locators.
"""
from test_framework.messages import msg_getheaders, msg_g... | 42.297872 | 135 | 0.682596 |
4a07a76b663c9d137900b84dac9edf12caff5dd1 | 556 | py | Python | 04_introduccion-al-computo-con-python/modulo_II/clase03-busqueda-binaria.py | Aibique-Forks/articicial-inteligence-and-data-science | fbdc866e4e46060cbde5b887806bdfeac645838e | [
"MIT"
] | 30 | 2020-06-19T16:21:04.000Z | 2022-02-19T01:48:39.000Z | 04_introduccion-al-computo-con-python/modulo_II/clase03-busqueda-binaria.py | Aibique-Forks/articicial-inteligence-and-data-science | fbdc866e4e46060cbde5b887806bdfeac645838e | [
"MIT"
] | 87 | 2021-02-12T04:42:13.000Z | 2021-09-20T04:25:29.000Z | 04_introduccion-al-computo-con-python/modulo_II/clase03-busqueda-binaria.py | Aibique-Forks/articicial-inteligence-and-data-science | fbdc866e4e46060cbde5b887806bdfeac645838e | [
"MIT"
] | 11 | 2020-08-13T04:04:01.000Z | 2022-01-20T20:10:43.000Z | """
Tema: Busqueda Binaria.
Curso: Pensamiento computacional.
Plataforma: Platzi.
Profesor: David Aroesti.
Alumno: @edinsonrequena.
"""
objetivo = int(input('Type a number: '))
epsilon = 0.001
bajo = 0.0
alto = max(1.0, objetivo)
respuesta = (alto + bajo) / 2
while abs(respuesta**2 - objetivo) >= epsilon:
print... | 21.384615 | 61 | 0.656475 |
4a07a7fe0d4105cab2f625b7153e4a7c8aa4bcb3 | 4,323 | py | Python | ytpld.py | D54/youtube-pldump | be388f2963c40f9306fa45b6f4746f6c00cbdfbf | [
"MIT"
] | null | null | null | ytpld.py | D54/youtube-pldump | be388f2963c40f9306fa45b6f4746f6c00cbdfbf | [
"MIT"
] | null | null | null | ytpld.py | D54/youtube-pldump | be388f2963c40f9306fa45b6f4746f6c00cbdfbf | [
"MIT"
] | 1 | 2018-03-04T12:04:24.000Z | 2018-03-04T12:04:24.000Z | from json import load, dump
from requests import post, get
from urllib.parse import urlparse, parse_qs, urlencode, urlunparse
from webbrowser import open as webopen
from http.server import BaseHTTPRequestHandler, HTTPServer
from sys import exit
from datetime import datetime
from yaml import dump as ydump
... | 30.020833 | 155 | 0.573213 |
4a07a80706a19809cd2a12cc691382456220c900 | 214 | py | Python | 8kyu/are_you_playing_banjo.py | nhsz/codewars | 82703959e910254d6feff4162f78c6dbd7a1c3ed | [
"MIT"
] | 1 | 2018-12-02T23:04:38.000Z | 2018-12-02T23:04:38.000Z | 8kyu/are_you_playing_banjo.py | nhsz/codewars | 82703959e910254d6feff4162f78c6dbd7a1c3ed | [
"MIT"
] | null | null | null | 8kyu/are_you_playing_banjo.py | nhsz/codewars | 82703959e910254d6feff4162f78c6dbd7a1c3ed | [
"MIT"
] | null | null | null | # http://www.codewars.com/kata/53af2b8861023f1d88000832/
def are_you_playing_banjo(name):
if name[0].lower() == "r":
return name + " plays banjo"
else:
return name + " does not play banjo"
| 26.75 | 56 | 0.640187 |
4a07a8200357cc116b3986c9008cd09c32e90ef1 | 7,509 | py | Python | tutorials/Tutorial3_Basic_QA_Pipeline_without_Elasticsearch.py | mpangrazzi/haystack | eb514a6167b84a4b6923dfc397c7a40ab3da2e44 | [
"Apache-2.0"
] | null | null | null | tutorials/Tutorial3_Basic_QA_Pipeline_without_Elasticsearch.py | mpangrazzi/haystack | eb514a6167b84a4b6923dfc397c7a40ab3da2e44 | [
"Apache-2.0"
] | null | null | null | tutorials/Tutorial3_Basic_QA_Pipeline_without_Elasticsearch.py | mpangrazzi/haystack | eb514a6167b84a4b6923dfc397c7a40ab3da2e44 | [
"Apache-2.0"
] | null | null | null | # ## Task: Build a Question Answering pipeline without Elasticsearch
#
# Haystack provides alternatives to Elasticsearch for developing quick prototypes.
#
# You can use an `InMemoryDocumentStore` or a `SQLDocumentStore`(with SQLite) as the document store.
#
# If you are interested in more feature-rich Elasticsearch, t... | 53.255319 | 307 | 0.691836 |
4a07a8a2e1798487e0a37311eeb08f9598b5a420 | 1,163 | py | Python | lab0/algebra_utils.py | rdugue/MIT_AI_LABS | 97d30195aa842f8edf0fb863ceae2599fe4f669e | [
"MIT"
] | 1 | 2017-05-01T10:07:02.000Z | 2017-05-01T10:07:02.000Z | lab0/algebra_utils.py | rdugue/MIT_AI_LABS | 97d30195aa842f8edf0fb863ceae2599fe4f669e | [
"MIT"
] | null | null | null | lab0/algebra_utils.py | rdugue/MIT_AI_LABS | 97d30195aa842f8edf0fb863ceae2599fe4f669e | [
"MIT"
] | 1 | 2018-02-20T17:24:34.000Z | 2018-02-20T17:24:34.000Z | """
These are functions for transferring algebra.py's test cases over the
Internet. You shouldn't need to mess with these.
"""
from algebra import simplify_if_possible, Sum, Product, Expression
def distribution(val):
if isinstance(val, Expression):
raise ValueError("expression has already been decoded")
... | 24.229167 | 73 | 0.628547 |
4a07aa88c15e5ad0c0de9b2cd591a664c87b0ecd | 478 | py | Python | myproject/cookie_app/migrations/0009_auto_20141211_0631.py | nathanielbecker/business-contacter-django-app | 369270f46087b7b593f5b4cff6bddd89707cdc62 | [
"Apache-2.0"
] | null | null | null | myproject/cookie_app/migrations/0009_auto_20141211_0631.py | nathanielbecker/business-contacter-django-app | 369270f46087b7b593f5b4cff6bddd89707cdc62 | [
"Apache-2.0"
] | null | null | null | myproject/cookie_app/migrations/0009_auto_20141211_0631.py | nathanielbecker/business-contacter-django-app | 369270f46087b7b593f5b4cff6bddd89707cdc62 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('cookie_app', '0008_auto_20141120_0807'),
]
operations = [
migrations.AlterField(
model_name='barebones_crud',
... | 22.761905 | 78 | 0.625523 |
4a07ab32ac709f82a80af9324ca7877f04086ec5 | 14,276 | py | Python | google/cloud/forseti/common/gcp_type/iam_policy.py | johnrevans6/forseti-security | d4b907a076ef4caaea9d3232c8fd0ad5822cd2d6 | [
"Apache-2.0"
] | null | null | null | google/cloud/forseti/common/gcp_type/iam_policy.py | johnrevans6/forseti-security | d4b907a076ef4caaea9d3232c8fd0ad5822cd2d6 | [
"Apache-2.0"
] | null | null | null | google/cloud/forseti/common/gcp_type/iam_policy.py | johnrevans6/forseti-security | d4b907a076ef4caaea9d3232c8fd0ad5822cd2d6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The Forseti Security 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 ap... | 31.238512 | 80 | 0.601639 |
4a07abe5cccad3f96b7e7b5a16e2547f1944405f | 157 | py | Python | tests/model_control/detailed/transf_Logit/model_control_one_enabled_Logit_PolyTrend_Seasonal_Hour_SVR.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | tests/model_control/detailed/transf_Logit/model_control_one_enabled_Logit_PolyTrend_Seasonal_Hour_SVR.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_Logit/model_control_one_enabled_Logit_PolyTrend_Seasonal_Hour_SVR.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( ['Logit'] , ['PolyTrend'] , ['Seasonal_Hour'] , ['SVR'] ); | 39.25 | 79 | 0.745223 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.