hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
33b0bbb56baf2343ba0d9075660121d0b17357b5 | 3,911 | py | Python | kpiit/publishers/cern.py | lnielsen/kpiit | a48c1c2ff807aa63b04b776d010f7e6da9cfc2e0 | [
"MIT"
] | null | null | null | kpiit/publishers/cern.py | lnielsen/kpiit | a48c1c2ff807aa63b04b776d010f7e6da9cfc2e0 | [
"MIT"
] | null | null | null | kpiit/publishers/cern.py | lnielsen/kpiit | a48c1c2ff807aa63b04b776d010f7e6da9cfc2e0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2018 CERN.
#
# KPIit is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Publisher for CERN's Grafana instance."""
import json
import os.path
from datetime import datetime
from celery.utils.lo... | 29.628788 | 77 | 0.577857 |
33b0c98a0f972e074c1cc8f8241dc38ecab6f57c | 4,663 | py | Python | src/Application/JavascriptModule/proto/customcam.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | 1 | 2018-04-02T15:38:10.000Z | 2018-04-02T15:38:10.000Z | src/Application/JavascriptModule/proto/customcam.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | null | null | null | src/Application/JavascriptModule/proto/customcam.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | 1 | 2021-09-04T12:37:34.000Z | 2021-09-04T12:37:34.000Z | """
an experiment in overriding default behaviour by a qtscript defined handler,
using qt signals and properties. for the problem statement see
http://wiki.realxtend.org/index.php/Qt_Script_as_a_means_of_extending_and_overriding_internal_Naali_behavior
about qt signals and slots in general, see http://doc.trolltech.com... | 37.604839 | 108 | 0.698906 |
33b0f1fc626d40b52967e000666fd1b1a5913f4c | 3,590 | py | Python | cifar10.py | kousokujin/keras-resnet | 9b94f423ec3325ecbb76fa7af31688089b8c3332 | [
"MIT"
] | null | null | null | cifar10.py | kousokujin/keras-resnet | 9b94f423ec3325ecbb76fa7af31688089b8c3332 | [
"MIT"
] | null | null | null | cifar10.py | kousokujin/keras-resnet | 9b94f423ec3325ecbb76fa7af31688089b8c3332 | [
"MIT"
] | null | null | null | """
Adapted from keras example cifar10_cnn.py
Train ResNet-18 on the CIFAR10 small images dataset.
GPU run command with Theano backend (with TensorFlow, the GPU is automatically used):
THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python cifar10.py
"""
from __future__ import print_function
from keras.datase... | 39.450549 | 94 | 0.727577 |
33b10bfb182818d91d5ed9ab6cdcd792d552eb7a | 26,577 | py | Python | pre-processor/TomToDSM2_pyhecdss.py | zackaryleady/DSM2_BDO_Analysis | 9ef2741f889fd1f037acfa5a8034b922b6a2f02f | [
"MIT"
] | 2 | 2020-01-09T22:19:12.000Z | 2020-01-10T22:26:02.000Z | pre-processor/TomToDSM2_pyhecdss.py | zackaryleady/DSM2_BDO_Analysis | 9ef2741f889fd1f037acfa5a8034b922b6a2f02f | [
"MIT"
] | null | null | null | pre-processor/TomToDSM2_pyhecdss.py | zackaryleady/DSM2_BDO_Analysis | 9ef2741f889fd1f037acfa5a8034b922b6a2f02f | [
"MIT"
] | null | null | null | # Required imported python libraries
# Python default libraries, no need to install
import os
import datetime
import sys
import logging
import argparse
# This tool originally used vtools (written by Jon Shu CADWR)
# to read *.dss data, but vtools required Py2.7
# This tool now uses pyhecdss which is a tool wri... | 47.290036 | 80 | 0.639275 |
33b1510aee371f19bef729b992edd82a9f45d8aa | 514 | py | Python | 1_code/aux_utils/punct_util.py | jaimiles23/Multiplication_Medley | 1072dea1a5be0b339211ff39db6a89a90aca64c1 | [
"MIT"
] | null | null | null | 1_code/aux_utils/punct_util.py | jaimiles23/Multiplication_Medley | 1072dea1a5be0b339211ff39db6a89a90aca64c1 | [
"MIT"
] | null | null | null | 1_code/aux_utils/punct_util.py | jaimiles23/Multiplication_Medley | 1072dea1a5be0b339211ff39db6a89a90aca64c1 | [
"MIT"
] | null | null | null | """"/**
* @author [Jai Miles]
* @email [jaimiles23@gmail.com]
* @create date 2020-05-06 14:34:22
* @modify date 2020-05-06 14:34:22
* @desc [
Utility method to get random punctuation (exclamation mark/period.)
]
*/
"""
##########
# Imports
##########
import random
from logs import logger, log_func_name
#... | 16.580645 | 70 | 0.603113 |
33b15d98c39612e01bc823dadccac605e6c266e8 | 1,012 | py | Python | SympatheticScripts/SPReleaseTime.py | jstammers/EDMSuite | 2841c0edef32a496855ca41deaa0f710b017ae2f | [
"MIT"
] | null | null | null | SympatheticScripts/SPReleaseTime.py | jstammers/EDMSuite | 2841c0edef32a496855ca41deaa0f710b017ae2f | [
"MIT"
] | null | null | null | SympatheticScripts/SPReleaseTime.py | jstammers/EDMSuite | 2841c0edef32a496855ca41deaa0f710b017ae2f | [
"MIT"
] | null | null | null | # Import a whole load of stuff
from System.IO import *
from System.Drawing import *
from System.Runtime.Remoting import *
from System.Threading import *
from System.Windows.Forms import *
from System.Xml.Serialization import *
from System import *
from System.Collections.Generic import Dictionary
from DAQ.En... | 28.111111 | 109 | 0.735178 |
33b1609e22e13b2953c475fa3e56b65dac26446c | 3,934 | py | Python | behavior_tree_learning/cost_function.py | matiov/learn-BTs-with-GP | 4df54f47c5e03c83eff6ee4375b3cc30d74a8308 | [
"Apache-2.0"
] | 10 | 2021-03-18T20:00:10.000Z | 2022-03-14T10:07:54.000Z | behavior_tree_learning/cost_function.py | matiov/learn_BTs_with_GP | 4df54f47c5e03c83eff6ee4375b3cc30d74a8308 | [
"Apache-2.0"
] | null | null | null | behavior_tree_learning/cost_function.py | matiov/learn_BTs_with_GP | 4df54f47c5e03c83eff6ee4375b3cc30d74a8308 | [
"Apache-2.0"
] | 5 | 2021-05-15T06:06:33.000Z | 2022-03-04T09:51:54.000Z | #!/usr/bin/env python3
# pylint: disable=global-at-module-level, global-statement, global-variable-undefined
"""
Task dependent cost function
"""
from dataclasses import dataclass
import state_machine as sm
@dataclass
class Coefficients:
# BT structure:
depth: float = 0.0
length: float = 0.5
time: flo... | 38.950495 | 105 | 0.655567 |
33b161d329bfb532ee6caef82b20e9c55d906280 | 4,705 | py | Python | OpenModal/analysis/utility_functions.py | MonashSmartStructures/OpenModal | a76a258c420954eab4a8b4ef37b487616c9f6c62 | [
"CNRI-Python"
] | 85 | 2016-12-04T10:34:08.000Z | 2022-03-26T18:03:47.000Z | OpenModal/analysis/utility_functions.py | MonashSmartStructures/OpenModal | a76a258c420954eab4a8b4ef37b487616c9f6c62 | [
"CNRI-Python"
] | 55 | 2016-12-02T15:01:15.000Z | 2022-01-07T11:10:26.000Z | OpenModal/analysis/utility_functions.py | gusshmn/OpenModal | a76a258c420954eab4a8b4ef37b487616c9f6c62 | [
"CNRI-Python"
] | 51 | 2016-12-30T16:33:36.000Z | 2021-11-13T11:05:34.000Z |
# Copyright (C) 2014-2017 Matjaž Mršnik, Miha Pirnat, Janko Slavič, Blaž Starc (in alphabetic order)
#
# This file is part of OpenModal.
#
# OpenModal is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version... | 29.778481 | 136 | 0.58831 |
33b185b06c4bc88234f8e4da0bc89b2da3a095f5 | 1,857 | py | Python | src/ast/c_impl.py | no1seman/fastparse | 1356d3403d695ac3b37be6037c0c71532cfd0c75 | [
"MIT"
] | null | null | null | src/ast/c_impl.py | no1seman/fastparse | 1356d3403d695ac3b37be6037c0c71532cfd0c75 | [
"MIT"
] | null | null | null | src/ast/c_impl.py | no1seman/fastparse | 1356d3403d695ac3b37be6037c0c71532cfd0c75 | [
"MIT"
] | null | null | null | # Copyright 2019-present, GraphQL Foundation
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from c import field_prototype, return_type, struct_name
from casing import title
from license import C_LICENSE_COMMENT
class Printer(object):
... | 28.136364 | 83 | 0.578891 |
33b1c787a620a4ab6c62915de019d070aa80f916 | 1,626 | py | Python | src/utils/saver.py | cristinalunaj/WI-IAT20_PopularityModule | 0a4894e2b889bf31ea1a8beab3025d5dd0b1ed47 | [
"MIT"
] | null | null | null | src/utils/saver.py | cristinalunaj/WI-IAT20_PopularityModule | 0a4894e2b889bf31ea1a8beab3025d5dd0b1ed47 | [
"MIT"
] | null | null | null | src/utils/saver.py | cristinalunaj/WI-IAT20_PopularityModule | 0a4894e2b889bf31ea1a8beab3025d5dd0b1ed47 | [
"MIT"
] | null | null | null | import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
def save_matrixes(output_path, matrix2save, id_column=[], rename_cols=[]):
df = pd.DataFrame(matrix2save)
if(id_column!=[]):
df["ids"] = id_column
if(rename_cols!=[]):
for i in range(0,len(rename_cols)):
... | 40.65 | 104 | 0.667282 |
33b1cfb27566edb9319f3b7d4e7186c4615d8ca8 | 24,858 | py | Python | scripts/FeMn_3q_model.py | Compiler-max/MEPinterp | e1b8ba0ec4a4c61d61f6555608fb26aeaaf64d71 | [
"MIT"
] | 2 | 2019-05-07T04:53:45.000Z | 2019-08-16T20:52:07.000Z | scripts/FeMn_3q_model.py | cMax347/MEPinterp | e1b8ba0ec4a4c61d61f6555608fb26aeaaf64d71 | [
"MIT"
] | null | null | null | scripts/FeMn_3q_model.py | cMax347/MEPinterp | e1b8ba0ec4a4c61d61f6555608fb26aeaaf64d71 | [
"MIT"
] | null | null | null | import numpy as np
import datetime
import sys
from FeMn_latt_OPT import FeMn_latt_OPT
#
#
# parameter to convert from degrees to radiants
conv_deg_to_rad = np.pi / 180.
#
#
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... | 39.023548 | 171 | 0.420187 |
33b1d0b546761c07b4fdbe33cc503c2434983a51 | 6,024 | py | Python | pcdet/models/dense_heads/anchor_head_multi.py | halostorm/OpenPCDet | 9650c9d71e7f03815e925fee6e16909fb219336a | [
"Apache-2.0"
] | 2 | 2020-08-04T08:39:28.000Z | 2021-02-09T08:07:13.000Z | pcdet/models/dense_heads/anchor_head_multi.py | halostorm/OpenPCDet | 9650c9d71e7f03815e925fee6e16909fb219336a | [
"Apache-2.0"
] | null | null | null | pcdet/models/dense_heads/anchor_head_multi.py | halostorm/OpenPCDet | 9650c9d71e7f03815e925fee6e16909fb219336a | [
"Apache-2.0"
] | null | null | null | import numpy as np
import torch.nn as nn
from .anchor_head_template import AnchorHeadTemplate
from ..backbones_2d import BaseBEVBackbone
import torch
class SingleHead(BaseBEVBackbone):
def __init__(self, model_cfg, input_channels, num_class, num_anchors_per_location, code_size, encode_conv_cfg=None):
supe... | 42.125874 | 120 | 0.627324 |
33b1d5034ce772c757f60d31da4e5c4e3516af22 | 327 | py | Python | server/config/development.py | liaojiacan/dyanmic-host | 0b47d8fa5b596e3e3d82d75992a00a97a9d4f457 | [
"MIT"
] | 4 | 2018-02-11T09:53:22.000Z | 2022-03-06T06:35:41.000Z | server/config/development.py | liaojiacan/dyanmic-host | 0b47d8fa5b596e3e3d82d75992a00a97a9d4f457 | [
"MIT"
] | null | null | null | server/config/development.py | liaojiacan/dyanmic-host | 0b47d8fa5b596e3e3d82d75992a00a97a9d4f457 | [
"MIT"
] | 1 | 2020-12-11T07:03:38.000Z | 2020-12-11T07:03:38.000Z | import os
basedir = os.path.abspath(os.path.dirname(__file__))
db_path = os.path.join(basedir, '../data-dev.sqlite')
DEBUG = True
IGNORE_AUTH = True
SECRET_KEY = 'top-secret!'
SQLALCHEMY_TRACK_MODIFICATIONS = True
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
'sqlite:///' + d... | 27.25 | 61 | 0.688073 |
33b1e56f0b36cd170296e382674413546d872650 | 2,580 | py | Python | restools/data_access_strategies.py | anton-pershin/restools | eb141f0989617db796d106de1b0824161ccaa0aa | [
"MIT"
] | null | null | null | restools/data_access_strategies.py | anton-pershin/restools | eb141f0989617db796d106de1b0824161ccaa0aa | [
"MIT"
] | null | null | null | restools/data_access_strategies.py | anton-pershin/restools | eb141f0989617db796d106de1b0824161ccaa0aa | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
class DataAccessStrategy(ABC):
"""
Class DataAccessStrategy is a base class for the data access strategy (see Strategy pattern for details). It is
supposed to regulate whether the data being loaded by any means is going to be cached in a dedicated storage or not.
""... | 46.071429 | 120 | 0.714729 |
33b2041522b2490e9b251f8ea627a4eb56c82aee | 13,837 | py | Python | ht/conv_plate.py | CalebBell/ht | 3b95f9cfff30c8c0272443d523a484977eedbf0d | [
"MIT"
] | 118 | 2016-01-04T07:46:23.000Z | 2022-03-29T14:12:59.000Z | ht/conv_plate.py | CalebBell/ht | 3b95f9cfff30c8c0272443d523a484977eedbf0d | [
"MIT"
] | 4 | 2017-06-27T08:01:02.000Z | 2020-10-06T14:18:46.000Z | ht/conv_plate.py | CalebBell/ht | 3b95f9cfff30c8c0272443d523a484977eedbf0d | [
"MIT"
] | 22 | 2016-04-20T06:17:35.000Z | 2022-03-07T01:40:25.000Z | # -*- coding: utf-8 -*-
'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling.
Copyright (C) 2018, Caleb Bell <Caleb.Andrew.Bell@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal... | 38.977465 | 92 | 0.665245 |
33b20890aa5cd1c1c431bf3999049657aae7cbb6 | 5,319 | py | Python | datasets/sceneflow.py | computational-imaging/DepthFromDefocusWithLearnedOptics | c3cf3fb46f2151e67236a294f8b19ba2269a47ca | [
"MIT"
] | 19 | 2021-05-26T12:27:12.000Z | 2022-03-24T02:55:41.000Z | datasets/sceneflow.py | computational-imaging/DepthFromDefocusWithLearnedOptics | c3cf3fb46f2151e67236a294f8b19ba2269a47ca | [
"MIT"
] | null | null | null | datasets/sceneflow.py | computational-imaging/DepthFromDefocusWithLearnedOptics | c3cf3fb46f2151e67236a294f8b19ba2269a47ca | [
"MIT"
] | 4 | 2021-06-02T03:14:27.000Z | 2022-02-23T13:09:48.000Z | from typing import Tuple
import os
import torch
import numpy as np
import imageio
from torch.utils.data import Dataset
from datasets.augmentation import RandomTransform
from kornia.augmentation import CenterCrop
from kornia.filters import gaussian_blur2d
# 'left' image has negative disparity.
DATA_ROOT = os.path.join(... | 39.110294 | 119 | 0.614965 |
33b21a5b1c9454a276f0ad1c8af5d425e80690c7 | 1,113 | py | Python | setup.py | rosineygp/proxmox-pci-switcher | c17be99b1210249c1177ad6a6729a7880125977c | [
"MIT"
] | 99 | 2021-04-10T02:22:22.000Z | 2022-02-07T22:24:25.000Z | setup.py | rosineygp/proxmox-pci-switcher | c17be99b1210249c1177ad6a6729a7880125977c | [
"MIT"
] | 22 | 2021-04-11T00:34:00.000Z | 2022-03-18T23:11:12.000Z | setup.py | rosineygp/proxmox-pci-switcher | c17be99b1210249c1177ad6a6729a7880125977c | [
"MIT"
] | 4 | 2021-04-24T04:08:35.000Z | 2021-12-06T02:33:07.000Z | import os
from setuptools import find_packages, setup
_version = os.getenv("MKDKR_BRANCH_NAME", "0.0.0").replace("v", "")
with open("README.md") as f:
long_description = f.read()
setup(
name="proxmox-pci-switcher",
version=_version,
description="Switch among Guest VMs organized by Resource Pool",
... | 27.825 | 86 | 0.622642 |
33b22b9235cf8155d91817ff0110110478ee16ff | 3,414 | py | Python | production/pygsl-0.9.5/examples/wavelet3.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | null | null | null | production/pygsl-0.9.5/examples/wavelet3.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | null | null | null | production/pygsl-0.9.5/examples/wavelet3.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | 1 | 2018-10-02T06:18:07.000Z | 2018-10-02T06:18:07.000Z | #!/usr/bin/env python
#
# Example for a wavelet analysis
# Authors: Pierre Schnizer
# Date: October 2006
#
# To use the same numerical array package as pygsl.
# I only use it here, so not to import a package not installed on the user
# side. Normaly I directly import the array package I use for all my scripts
# and... | 27.095238 | 77 | 0.630346 |
33b2349520a70287208885f142bf828904d76502 | 1,067 | py | Python | tests/test_runpath.py | mattrepl/cle | 08f5f24d61470da8a99ee0c40f2185397a958313 | [
"BSD-2-Clause"
] | 1 | 2021-05-11T17:27:28.000Z | 2021-05-11T17:27:28.000Z | tests/test_runpath.py | fiberx/cle-fiber | 08f5f24d61470da8a99ee0c40f2185397a958313 | [
"BSD-2-Clause"
] | null | null | null | tests/test_runpath.py | fiberx/cle-fiber | 08f5f24d61470da8a99ee0c40f2185397a958313 | [
"BSD-2-Clause"
] | null | null | null | import nose
import os
import shutil
import tempfile
import cle
TEST_BASE = os.path.join(os.path.dirname(os.path.realpath(__file__)),
os.path.join('..', '..', 'binaries'))
def test_runpath():
tempdir = tempfile.mkdtemp()
try:
runpath_file = os.path.join(TEST_BA... | 33.34375 | 78 | 0.618557 |
33b23a487829dabfbfdd14723d2fbbde0016d4a6 | 5,341 | py | Python | tests/test_core.py | tirkarthi/NewlineJSON | 0933531827b82ddc10d14bd492778eca1d502f2f | [
"BSD-3-Clause"
] | 14 | 2016-03-30T17:39:57.000Z | 2020-07-08T07:02:03.000Z | tests/test_core.py | tirkarthi/NewlineJSON | 0933531827b82ddc10d14bd492778eca1d502f2f | [
"BSD-3-Clause"
] | 46 | 2015-01-08T05:01:06.000Z | 2021-09-10T00:53:04.000Z | tests/test_core.py | tirkarthi/NewlineJSON | 0933531827b82ddc10d14bd492778eca1d502f2f | [
"BSD-3-Clause"
] | 5 | 2016-07-07T14:05:46.000Z | 2020-04-11T06:38:23.000Z | """
Unittests for newlinejson.core
"""
import json
import os
import tempfile
import pytest
import six
import newlinejson as nlj
def test_standard(dicts_path):
with nlj.open(dicts_path) as actual:
with open(dicts_path) as expected:
for e_line, a_line in zip(expected, actual):
... | 26.839196 | 93 | 0.627972 |
33b2627b3e14ec9310dc3a25f851d379b55344b9 | 694 | py | Python | services/traction/acapy_wrapper/models/cred_info_list.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 12 | 2022-01-29T20:30:03.000Z | 2022-03-29T11:46:14.000Z | services/traction/acapy_wrapper/models/cred_info_list.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 38 | 2021-11-22T17:52:50.000Z | 2022-03-31T17:52:00.000Z | services/traction/acapy_wrapper/models/cred_info_list.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 9 | 2021-11-22T18:05:48.000Z | 2022-03-29T11:25:08.000Z | # coding: utf-8
from __future__ import annotations
from datetime import date, datetime # noqa: F401
import re # noqa: F401
from typing import Any, Dict, List, Optional # noqa: F401
from pydantic import AnyUrl, BaseModel, EmailStr, validator # noqa: F401
from acapy_wrapper.models.indy_cred_info import IndyCredInf... | 25.703704 | 96 | 0.743516 |
33b273e5e0618150db027214d5abb4fa3dd281e6 | 8,692 | py | Python | testing/unit_tests/test_device_meta_data_creator.py | IPASC/DataConversionTool | 88f04c4df97f4a060c566da4bfc0c0e4fe246536 | [
"MIT",
"BSD-3-Clause"
] | 2 | 2021-12-16T04:21:37.000Z | 2022-03-10T03:19:21.000Z | testing/unit_tests/test_device_meta_data_creator.py | IPASC/DataConversionTool | 88f04c4df97f4a060c566da4bfc0c0e4fe246536 | [
"MIT",
"BSD-3-Clause"
] | 12 | 2021-12-20T13:22:45.000Z | 2022-02-17T19:57:03.000Z | testing/unit_tests/test_device_meta_data_creator.py | amasmiller/PACFISH | f9bc912e701df3261a2b9a94df281c664701701d | [
"BSD-3-Clause"
] | 1 | 2022-02-11T21:33:28.000Z | 2022-02-11T21:33:28.000Z | # SPDX-FileCopyrightText: 2021 International Photoacoustics Standardisation Consortium (IPASC)
# SPDX-License-Identifier: BSD 3-Clause License
import unittest
from unittest.case import TestCase
from pacfish import MetadataDeviceTags
from pacfish import DeviceMetaDataCreator, IlluminationElementCreator, DetectionElement... | 49.107345 | 120 | 0.763691 |
33b27415d2ea3b19411edbf3227725b09c1d7c5d | 2,370 | py | Python | eucaconsole/views/regions.py | ccassler/eucaconsole | c555728685b0d76eed65919037d442d97b6e9dd6 | [
"BSD-2-Clause"
] | null | null | null | eucaconsole/views/regions.py | ccassler/eucaconsole | c555728685b0d76eed65919037d442d97b6e9dd6 | [
"BSD-2-Clause"
] | null | null | null | eucaconsole/views/regions.py | ccassler/eucaconsole | c555728685b0d76eed65919037d442d97b6e9dd6 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2013-2014 Eucalyptus Systems, Inc.
#
# Redistribution and use of this software in source and binary forms,
# with or without modification, are permitted provided that the following
# conditions are met:
#
# Redistributions of source code must retain the above copyright notice,
# this... | 43.090909 | 101 | 0.753586 |
33b289cbc0db0d75e14c5054b7aba56a7fb2b8bf | 11,550 | py | Python | deepdoctection/analyzer/dd.py | deepdoctection/deepdoctection | 7e0d7396e5ef8bf8109904e09c5d4ee56cb5a036 | [
"Apache-2.0"
] | 39 | 2021-12-14T11:05:25.000Z | 2022-03-31T18:50:58.000Z | deepdoctection/analyzer/dd.py | deepdoctection/deepdoctection | 7e0d7396e5ef8bf8109904e09c5d4ee56cb5a036 | [
"Apache-2.0"
] | 17 | 2022-01-04T14:32:26.000Z | 2022-03-29T14:01:36.000Z | deepdoctection/analyzer/dd.py | deepdoctection/deepdoctection | 7e0d7396e5ef8bf8109904e09c5d4ee56cb5a036 | [
"Apache-2.0"
] | 4 | 2022-01-11T16:40:17.000Z | 2022-03-30T02:09:55.000Z | # -*- coding: utf-8 -*-
# File: dd.py
# Copyright 2021 Dr. Janis Meyer. 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.... | 43.097015 | 118 | 0.716277 |
33b2c73362f996523d55a08363bb16b6dbc7ab18 | 6,687 | py | Python | server/src/finote_api/management/commands/create_user.py | kentaiwami/KI_App0 | 4cc9dbc5cc34f7ca52b5d0487624f687696b3fb4 | [
"MIT"
] | null | null | null | server/src/finote_api/management/commands/create_user.py | kentaiwami/KI_App0 | 4cc9dbc5cc34f7ca52b5d0487624f687696b3fb4 | [
"MIT"
] | 24 | 2016-06-21T09:05:26.000Z | 2022-02-10T09:27:38.000Z | server/src/finote_api/management/commands/create_user.py | kentaiwami/FiNote | 4cc9dbc5cc34f7ca52b5d0487624f687696b3fb4 | [
"MIT"
] | null | null | null | from rest_framework_jwt.serializers import User
from django.core.management.base import BaseCommand
from myapi.settings import CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET
import random
from requests_oauthlib import OAuth1Session
import json
import datetime
class Command(BaseCommand):
help = '... | 28.823276 | 93 | 0.578286 |
33b2c8d5e1a7564dc24d8b0b1a51f2d7d83c7452 | 8,273 | py | Python | ufora/networking/MultiChannelListener_test.py | ufora/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 571 | 2015-11-05T20:07:07.000Z | 2022-01-24T22:31:09.000Z | ufora/networking/MultiChannelListener_test.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 218 | 2015-11-05T20:37:55.000Z | 2021-05-30T03:53:50.000Z | ufora/networking/MultiChannelListener_test.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 40 | 2015-11-07T21:42:19.000Z | 2021-05-23T03:48:19.000Z | # Copyright 2015 Ufora Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 40.160194 | 158 | 0.705548 |
33b303a5e6bc5ffe97181ceff077e6e9a7ce51f4 | 682 | py | Python | looping/while_loop.py | nv-krishna/python-crash-course | d481faeb2196712cd52ca1d34dc1fe967d13712f | [
"Apache-2.0"
] | 2 | 2020-11-02T05:52:33.000Z | 2021-06-09T01:28:22.000Z | looping/while_loop.py | nv-krishna/python-crash-course | d481faeb2196712cd52ca1d34dc1fe967d13712f | [
"Apache-2.0"
] | null | null | null | looping/while_loop.py | nv-krishna/python-crash-course | d481faeb2196712cd52ca1d34dc1fe967d13712f | [
"Apache-2.0"
] | 2 | 2021-04-08T05:26:04.000Z | 2021-06-09T01:28:23.000Z | message = input("Tell me something and I will repeat that back to you: ")
print(message)
prompt = "Type in a number and I will tell you whether it is even or odd number."
prompt += "\n Number: "
number = input(prompt)
value = int(number)
if value % 2 == 0:
print("The number you entered is an even number.")
else:
... | 29.652174 | 81 | 0.674487 |
33b308156e5467bcd2491ee558ed9a3a978c664d | 2,189 | py | Python | wishlist/models.py | flaiming/simple-wishlist | d5a57af48f7e98b34e146e46a6f21b1ab7d65d10 | [
"MIT"
] | null | null | null | wishlist/models.py | flaiming/simple-wishlist | d5a57af48f7e98b34e146e46a6f21b1ab7d65d10 | [
"MIT"
] | 16 | 2018-11-30T14:17:24.000Z | 2021-11-13T09:03:25.000Z | wishlist/models.py | flaiming/simple-wishlist | d5a57af48f7e98b34e146e46a6f21b1ab7d65d10 | [
"MIT"
] | 1 | 2018-11-30T13:49:30.000Z | 2018-11-30T13:49:30.000Z | from django.conf import settings
from django.db import models
from django.urls import reverse
from .utils import create_hash
class WishList(models.Model):
created = models.DateTimeField(auto_now_add=True)
name = models.CharField("Kdo jsi?", max_length=100)
slug = models.CharField(max_length=8, unique=Tru... | 31.271429 | 91 | 0.631339 |
33b30b530830a0c044fbb9392cbf100be07ec42e | 117,962 | py | Python | azure-devops/azext_devops/vstsCompressed/task_agent/v4_0/models/models.py | vijayraavi/azure-devops-cli-extension | 88f1420c5815cb09bea15b050f4c553e0f326dad | [
"MIT"
] | null | null | null | azure-devops/azext_devops/vstsCompressed/task_agent/v4_0/models/models.py | vijayraavi/azure-devops-cli-extension | 88f1420c5815cb09bea15b050f4c553e0f326dad | [
"MIT"
] | 37 | 2020-04-27T07:45:19.000Z | 2021-04-05T07:27:15.000Z | azure-devops/azext_devops/vstsCompressed/task_agent/v4_0/models/models.py | vijayraavi/azure-devops-cli-extension | 88f1420c5815cb09bea15b050f4c553e0f326dad | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 37.675503 | 972 | 0.651947 |
33b30c7c1451c42f247f214133673ec10bc4a983 | 976 | py | Python | portals/wwits/groups/general/query_table/models.py | jalanb/portals | 7a5360b48547719d3fbe50790f08eaf5571148dd | [
"ADSL"
] | null | null | null | portals/wwits/groups/general/query_table/models.py | jalanb/portals | 7a5360b48547719d3fbe50790f08eaf5571148dd | [
"ADSL"
] | null | null | null | portals/wwits/groups/general/query_table/models.py | jalanb/portals | 7a5360b48547719d3fbe50790f08eaf5571148dd | [
"ADSL"
] | null | null | null | from dataclasses import dataclass
from typing import List
@dataclass
class ParmModel:
UserID: str
Env: str
Source: str
Version: str
Session: int
TableName: str
AdHocParms: str
RC: int
ResultMsg: str
@dataclass
class SkillCategoryModel:
Category: str
@dataclass
class CSRSkil... | 15.015385 | 33 | 0.67623 |
33b331a038b73e644fe3fe9f287fbcf7c1366c44 | 7,427 | py | Python | tests/planning/test_CHOMP.py | MisoRobotics/prpy | afbc8e9c3a8e4f4dc31261782962e12eb4b0ca10 | [
"BSD-3-Clause"
] | 53 | 2015-02-07T04:58:23.000Z | 2022-03-07T15:49:07.000Z | tests/planning/test_CHOMP.py | MisoRobotics/prpy | afbc8e9c3a8e4f4dc31261782962e12eb4b0ca10 | [
"BSD-3-Clause"
] | 283 | 2015-01-01T17:16:37.000Z | 2018-05-09T23:51:48.000Z | tests/planning/test_CHOMP.py | MisoRobotics/prpy | afbc8e9c3a8e4f4dc31261782962e12eb4b0ca10 | [
"BSD-3-Clause"
] | 28 | 2015-02-20T01:37:38.000Z | 2021-03-12T07:05:23.000Z | from methods.PlanToConfiguration import (
PlanToConfigurationCompleteTest,
PlanToConfigurationStraightLineTest,
PlanToConfigurationTest,
PlanToConfigurationTestCollisionTest,
)
from prpy.planning.chomp import CHOMPPlanner
from planning_helpers import BasePlannerTest
from unittest import TestCase
class... | 41.033149 | 95 | 0.665275 |
33b35fea43174c6d891747fbe3a5deb9968c031f | 944 | py | Python | ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/scripts/status_params.py | wbear2/ambari | a1891193984da47015cd5483b5b95e040677d7df | [
"Apache-2.0"
] | 5 | 2018-06-03T05:19:40.000Z | 2021-04-16T17:10:49.000Z | ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/scripts/status_params.py | wbear2/ambari | a1891193984da47015cd5483b5b95e040677d7df | [
"Apache-2.0"
] | null | null | null | ambari-server/src/main/resources/stacks/HDP/1.3.2/services/NAGIOS/package/scripts/status_params.py | wbear2/ambari | a1891193984da47015cd5483b5b95e040677d7df | [
"Apache-2.0"
] | 6 | 2019-05-07T13:24:39.000Z | 2021-02-15T14:12:37.000Z | #!/usr/bin/env python
"""
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");... | 34.962963 | 72 | 0.787076 |
33b38781e9d98cb75e1dd332dad297e8799a09c1 | 2,162 | py | Python | renn/analysis_utils.py | m4ta1l/reverse-engineering-neural-networks | a2bcf18cb12f6026eb1f07be93a5b4a3dca1c042 | [
"Apache-2.0"
] | 102 | 2020-07-23T18:15:18.000Z | 2022-03-10T10:49:12.000Z | renn/analysis_utils.py | m4ta1l/reverse-engineering-neural-networks | a2bcf18cb12f6026eb1f07be93a5b4a3dca1c042 | [
"Apache-2.0"
] | 26 | 2020-07-24T21:47:58.000Z | 2021-05-18T02:16:00.000Z | renn/analysis_utils.py | Smirenost/reverse-engineering-neural-networks | a2bcf18cb12f6026eb1f07be93a5b4a3dca1c042 | [
"Apache-2.0"
] | 24 | 2020-08-02T00:19:09.000Z | 2022-01-17T10:43:42.000Z | # 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 32.757576 | 77 | 0.674838 |
33b39ac994f86a24f8d2a8ce74d20e597d15db4f | 1,884 | py | Python | drawpage/unit tests/tests_errors.py | Nitroklaus31/Clustering-in-Object-Centric-Process-Mining | 7ca6bd4bf9845b3e68ebcc94a441cfb2f318b2e0 | [
"MIT"
] | 4 | 2021-12-02T15:48:09.000Z | 2022-01-17T17:21:13.000Z | drawpage/unit tests/tests_errors.py | Nitroklaus31/Clustering-in-Object-Centric-Process-Mining | 7ca6bd4bf9845b3e68ebcc94a441cfb2f318b2e0 | [
"MIT"
] | null | null | null | drawpage/unit tests/tests_errors.py | Nitroklaus31/Clustering-in-Object-Centric-Process-Mining | 7ca6bd4bf9845b3e68ebcc94a441cfb2f318b2e0 | [
"MIT"
] | 10 | 2021-12-07T17:41:04.000Z | 2022-01-21T15:55:36.000Z | # Local imports
from exceptions import UnequalListsError, DuplicatesError
def map_labels_to_activities(labels: list, activities: list) -> list:
activity_map = {}
try:
if not isinstance(labels, list) or not isinstance(activities, list):
raise TypeError # raise an error if one... | 50.918919 | 113 | 0.674098 |
33b3a877609754a20f5674137e7417132f6d1d9b | 248,589 | py | Python | jax/_src/numpy/lax_numpy.py | lukstafi/jax | c1824087fc1f676fcbd1d26b0c3b07cc3bdadb01 | [
"Apache-2.0"
] | null | null | null | jax/_src/numpy/lax_numpy.py | lukstafi/jax | c1824087fc1f676fcbd1d26b0c3b07cc3bdadb01 | [
"Apache-2.0"
] | null | null | null | jax/_src/numpy/lax_numpy.py | lukstafi/jax | c1824087fc1f676fcbd1d26b0c3b07cc3bdadb01 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 35.892146 | 145 | 0.67252 |
33b3aacfaec9d9837e23dc4c2eab4e87227d9b45 | 2,386 | py | Python | porcupine/plugins/comment_block.py | Akuli/editor | cf98c538e75a07d825f9066e25a3752fdf7c3c29 | [
"MIT"
] | 65 | 2017-05-23T00:23:07.000Z | 2022-03-17T21:07:12.000Z | porcupine/plugins/comment_block.py | Akuli/editor | cf98c538e75a07d825f9066e25a3752fdf7c3c29 | [
"MIT"
] | 689 | 2017-03-17T15:42:04.000Z | 2022-03-29T19:43:40.000Z | porcupine/plugins/comment_block.py | Akuli/editor | cf98c538e75a07d825f9066e25a3752fdf7c3c29 | [
"MIT"
] | 28 | 2017-03-13T19:41:34.000Z | 2022-01-29T00:47:29.000Z | """
If you select multiple lines in a Python file and type '#', then all selected
lines are commented out.
A different character is used in other programming languages. This can be
configured with comment_prefix in filetypes.toml.
"""
from __future__ import annotations
import re
from typing import Optional
from porc... | 35.61194 | 98 | 0.659262 |
33b3bef143f3be41118695855d67c3dee58ac4b3 | 2,232 | py | Python | setup.py | sthagen/getsentry-responses | da7d6d0da5ceeb2dd819ba278eac8d163986af5f | [
"Apache-2.0"
] | null | null | null | setup.py | sthagen/getsentry-responses | da7d6d0da5ceeb2dd819ba278eac8d163986af5f | [
"Apache-2.0"
] | null | null | null | setup.py | sthagen/getsentry-responses | da7d6d0da5ceeb2dd819ba278eac8d163986af5f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
responses
=========
A utility library for mocking out the `requests` Python library.
:copyright: (c) 2015 David Cramer
:license: Apache 2.0
"""
import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand
setup_requires = []
install_requires = [
"re... | 24.8 | 83 | 0.643369 |
33b3c705d9495edfe9370d5e0fb5974117e29e62 | 2,091 | py | Python | python/phonenumbers/data/region_ES.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | 2 | 2019-03-30T02:12:54.000Z | 2021-03-08T18:59:40.000Z | python/phonenumbers/data/region_ES.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | null | null | null | python/phonenumbers/data/region_ES.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | 1 | 2018-11-10T03:47:34.000Z | 2018-11-10T03:47:34.000Z | """Auto-generated file, do not edit by hand. ES metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_ES = PhoneMetadata(id='ES', country_code=34, international_prefix='00',
general_desc=PhoneNumberDesc(national_number_pattern='[5-9]\\d{8}', possible_number_pattern='\\... | 110.052632 | 356 | 0.708274 |
33b3ea42eba0a1b1f4a7b842f7ca9ad86c6956f0 | 3,243 | py | Python | nova/scheduler/weights/affinity.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 5 | 2016-04-28T16:20:38.000Z | 2021-04-25T11:19:03.000Z | nova/scheduler/weights/affinity.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/scheduler/weights/affinity.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 5 | 2020-04-08T20:24:45.000Z | 2020-10-05T19:02:13.000Z | # Copyright (c) 2015 Ericsson AB
# 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 ... | 35.637363 | 79 | 0.695961 |
33b3efcfd48cf8438b51eb421b38b613be1e8620 | 1,569 | py | Python | data/fashion_mnist.py | larsmaaloee/BIVA | e47201113d779c6ea1245875714101b2bbfcbdae | [
"MIT"
] | 28 | 2019-10-24T10:35:43.000Z | 2021-07-25T04:28:44.000Z | data/fashion_mnist.py | larsmaaloee/BIVA | e47201113d779c6ea1245875714101b2bbfcbdae | [
"MIT"
] | null | null | null | data/fashion_mnist.py | larsmaaloee/BIVA | e47201113d779c6ea1245875714101b2bbfcbdae | [
"MIT"
] | 6 | 2019-10-24T11:09:58.000Z | 2021-02-19T01:35:38.000Z | import os
from utils import get_data_path
from urllib.request import urlretrieve
def load_mnist(path, kind='train'):
import os
import gzip
import numpy as np
"""Load MNIST data from `path`"""
labels_path = os.path.join(path, '%s-labels-idx1-ubyte.gz' % kind)
images_path = os.path.join(path, '... | 34.108696 | 111 | 0.63225 |
33b489032c7d1303e8128d2bfc733b9e1e45a6ab | 2,211 | py | Python | src/libspec/arm/scripts/specification/ARMv7Context.py | agustingianni/retools | 0df67fe6f21895644936c5896a33770431d86a1d | [
"MIT"
] | 80 | 2017-08-08T08:42:12.000Z | 2022-03-03T13:12:05.000Z | src/libspec/arm/scripts/specification/ARMv7Context.py | agustingianni/retools | 0df67fe6f21895644936c5896a33770431d86a1d | [
"MIT"
] | 16 | 2017-08-02T14:17:07.000Z | 2021-04-30T10:17:01.000Z | src/libspec/arm/scripts/specification/ARMv7Context.py | agustingianni/retools | 0df67fe6f21895644936c5896a33770431d86a1d | [
"MIT"
] | 6 | 2017-10-02T07:47:46.000Z | 2020-08-18T22:03:48.000Z | # Names of the exported fields of the class ARMContext.
field_names = [
"APSR",
"CPACR",
"CPSR",
"ELR_hyp",
"FPEXC",
"FPSCR",
"HCPTR",
"HCR",
"HSCTLR",
"HSR",
"HSTR",
"HVBAR",
"ITSTATE",
"JMCR",
"MVBAR",
"NSACR",
"SCR",
"SCTLR",
"SPSR",
"SP... | 21.676471 | 56 | 0.639982 |
33b4ac3cb57b1a317bb76edd59e238b5123fae25 | 11,890 | py | Python | jsonargparse_tests/argcomplete_tests.py | MendelXu/jsonargparse | cf0cf49937561f1c133cbf616fa6e50733b57859 | [
"MIT"
] | null | null | null | jsonargparse_tests/argcomplete_tests.py | MendelXu/jsonargparse | cf0cf49937561f1c133cbf616fa6e50733b57859 | [
"MIT"
] | null | null | null | jsonargparse_tests/argcomplete_tests.py | MendelXu/jsonargparse | cf0cf49937561f1c133cbf616fa6e50733b57859 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
import pathlib
import platform
from enum import Enum
from typing import List, Optional
from io import BytesIO, StringIO
from contextlib import redirect_stdout, redirect_stderr
from jsonargparse_tests.base import *
@unittest.skipIf(not argcomplete_support, 'argcomplete package is req... | 46.264591 | 115 | 0.594029 |
33b4c8bcb7154e07345c3d27d46271935fb2a55f | 828 | py | Python | tql/algo_dl/keras/layers/get_embedding_layer.py | Jie-Yuan/1_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 14 | 2019-06-25T13:46:32.000Z | 2020-10-27T02:04:59.000Z | tql/algo_dl/keras/layers/get_embedding_layer.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | null | null | null | tql/algo_dl/keras/layers/get_embedding_layer.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 7 | 2019-06-25T13:26:16.000Z | 2020-10-27T02:05:03.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Project : tql-cloudml.
# @File : get_embedding_layer
# @Time : 2019-06-21 16:25
# @Author : yuanjie
# @Email : yuanjie@xiaomi.com
# @Software : PyCharm
# @Description :
from tensorflow.python.keras.layers import Embedding
def get_k... | 29.571429 | 91 | 0.592995 |
33b4d44d5c892d24664bb21c9061455f542368a6 | 1,735 | py | Python | learning_object/metadata_schema/utils/auth.py | dsvalenciah/ROAp | 24cbff0e719c5009ec1f1e7190924d4d9297e992 | [
"MIT"
] | 4 | 2018-04-23T00:04:01.000Z | 2018-10-28T22:56:51.000Z | learning_object/metadata_schema/utils/auth.py | dsvalenciah/ROAp | 24cbff0e719c5009ec1f1e7190924d4d9297e992 | [
"MIT"
] | 23 | 2017-12-22T08:27:35.000Z | 2021-12-13T19:57:35.000Z | learning_object/metadata_schema/utils/auth.py | dsvalenciah/ROAp | 24cbff0e719c5009ec1f1e7190924d4d9297e992 | [
"MIT"
] | 1 | 2020-06-03T02:07:26.000Z | 2020-06-03T02:07:26.000Z |
"""
Contains utility functions to works with Authentication.
"""
import jwt
import falcon
import os
class Authenticate(object):
"""Deal with the user Authentication."""
def __init__(self):
"""Init."""
def __call__(self, req, resp, resource, params):
"""Authorize request."""
# TO... | 32.12963 | 78 | 0.572911 |
33b50703b81f8da631916d70aee5596b47415d27 | 17,871 | py | Python | recipes/recipe_modules/recipe_autoroller/api.py | fknittel/git-retry-build | 4d57dd6e8b7567daeb24b55f66bc5becd3d459f3 | [
"BSD-3-Clause"
] | null | null | null | recipes/recipe_modules/recipe_autoroller/api.py | fknittel/git-retry-build | 4d57dd6e8b7567daeb24b55f66bc5becd3d459f3 | [
"BSD-3-Clause"
] | 4 | 2022-03-17T18:58:21.000Z | 2022-03-17T18:58:22.000Z | recipes/recipe_modules/recipe_autoroller/api.py | fknittel/git-retry-build | 4d57dd6e8b7567daeb24b55f66bc5becd3d459f3 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import base64
import datetime
import re
import traceback
from google.protobuf import json_format as jsonpb
from recipe_engine import recipe_api
from PB.rec... | 37.076763 | 80 | 0.654636 |
33b514f8edaf94aa196bca6d98da5989c740f072 | 11,250 | py | Python | color_scheme/manager/manage_color/__init__.py | tetutaro/dotfiles | 84d44859a3d703f665ca92ea12de3fefaf69fe72 | [
"MIT"
] | 1 | 2021-11-01T09:14:46.000Z | 2021-11-01T09:14:46.000Z | color_scheme/manager/manage_color/__init__.py | tetutaro/dotfiles | 84d44859a3d703f665ca92ea12de3fefaf69fe72 | [
"MIT"
] | null | null | null | color_scheme/manager/manage_color/__init__.py | tetutaro/dotfiles | 84d44859a3d703f665ca92ea12de3fefaf69fe72 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
"""color scheme manager
Preview color schemes and setup the selected color scheme.
Attributes:
COLOR_SCHEME_SHELL_PATH (str):
The pathname of shell script which setups colors for shell.
COLOR_SCHEME_SHELL_DIR (str):
The directory name that color sc... | 28.054863 | 78 | 0.558311 |
33b51a01d8edb7b8e28be94c64f1725c38c5b0a1 | 4,447 | py | Python | read_POLSAR.py | mprakhar/BK_ATR | 0c0bc0d2ba30fe30b622601784d439ea8c8930c3 | [
"MIT"
] | null | null | null | read_POLSAR.py | mprakhar/BK_ATR | 0c0bc0d2ba30fe30b622601784d439ea8c8930c3 | [
"MIT"
] | null | null | null | read_POLSAR.py | mprakhar/BK_ATR | 0c0bc0d2ba30fe30b622601784d439ea8c8930c3 | [
"MIT"
] | null | null | null | # __author__ = 'Prakhar MISRA'
# Created 08/22/2017
# Last edit 08/22/2017
#Purpose:
#-----------------
# (a) To read read pre-processed POLSAR image
# (b) To convert the image into a) CV - cofficient of variation image, span image
# b) CM - covriance matri... | 34.472868 | 165 | 0.563751 |
33b52776eaaca0537a7af50203d421d59b5020b8 | 4,193 | py | Python | cinder/tests/unit/api/contrib/test_extended_snapshot_attributes.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | 1 | 2019-01-22T05:37:38.000Z | 2019-01-22T05:37:38.000Z | cinder/tests/unit/api/contrib/test_extended_snapshot_attributes.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | 2 | 2018-10-25T13:04:01.000Z | 2019-08-17T13:15:24.000Z | cinder/tests/unit/api/contrib/test_extended_snapshot_attributes.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | 2 | 2018-10-17T13:32:50.000Z | 2018-11-08T08:39:39.000Z | # Copyright 2012 OpenStack Foundation
# 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 requ... | 36.46087 | 78 | 0.667541 |
33b547aeb76a2d14ce2a796ddf16c7a2c2732142 | 543 | py | Python | client/verta/verta/_swagger/_public/modeldb/model/ModeldbDeleteDatasetsResponse.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 835 | 2017-02-08T20:14:24.000Z | 2020-03-12T17:37:49.000Z | client/verta/verta/_swagger/_public/modeldb/model/ModeldbDeleteDatasetsResponse.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 651 | 2019-04-18T12:55:07.000Z | 2022-03-31T23:45:09.000Z | client/verta/verta/_swagger/_public/modeldb/model/ModeldbDeleteDatasetsResponse.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 170 | 2017-02-13T14:49:22.000Z | 2020-02-19T17:59:12.000Z | # THIS FILE IS AUTO-GENERATED. DO NOT EDIT
from verta._swagger.base_type import BaseType
class ModeldbDeleteDatasetsResponse(BaseType):
def __init__(self, status=None):
required = {
"status": False,
}
self.status = status
for k, v in required.items():
if self[k] is None and v:
ra... | 22.625 | 62 | 0.651934 |
33b566132e386534b3436aefaa45f96068274db6 | 1,836 | py | Python | src/SpiderPi/HiwonderSDK/ActionGroupControlDemo.py | peteh/spiderpi | 19c4e254979a756acb641b67e944568c7c79520c | [
"MIT"
] | null | null | null | src/SpiderPi/HiwonderSDK/ActionGroupControlDemo.py | peteh/spiderpi | 19c4e254979a756acb641b67e944568c7c79520c | [
"MIT"
] | null | null | null | src/SpiderPi/HiwonderSDK/ActionGroupControlDemo.py | peteh/spiderpi | 19c4e254979a756acb641b67e944568c7c79520c | [
"MIT"
] | null | null | null | import time
import threading
import ActionGroupControl as AGC
print('''
**********************************************************
*********Function: Hiwonder SpiderPi expansion board, action group control routine********
**********************************************************
--------------------------------------... | 47.076923 | 217 | 0.565904 |
33b5908bb1a8c97306faf06798a04011866f1bf1 | 18,389 | py | Python | config-docBiRNN.py | shuokabe/deepQuest-mod | 7140a57c30deedb0570bc835c6ad3c848f0039f4 | [
"BSD-3-Clause"
] | null | null | null | config-docBiRNN.py | shuokabe/deepQuest-mod | 7140a57c30deedb0570bc835c6ad3c848f0039f4 | [
"BSD-3-Clause"
] | null | null | null | config-docBiRNN.py | shuokabe/deepQuest-mod | 7140a57c30deedb0570bc835c6ad3c848f0039f4 | [
"BSD-3-Clause"
] | null | null | null | def load_parameters():
"""
Loads the defined hyperparameters
:return parameters: Dictionary of loaded parameters
"""
# Input data params
TASK_NAME = 'doc-level' # Task name
DATASET_NAME = TASK_NAME # Dataset name
SRC_LAN = 'en' ... | 64.978799 | 175 | 0.569308 |
33b5affa0c56811518fd84135dc592b4dd79c749 | 2,804 | py | Python | tests/pymath/test_triangle.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 3 | 2017-05-02T10:28:13.000Z | 2019-02-06T09:10:11.000Z | tests/pymath/test_triangle.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2017-06-21T20:39:14.000Z | 2020-02-25T10:28:57.000Z | tests/pymath/test_triangle.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2016-07-29T04:35:22.000Z | 2017-01-18T17:05:36.000Z | import unittest
from math import sqrt
from pymath.triangles.triangle import Triangle, TriangleError
class TriangleTests(unittest.TestCase):
def test_equilateral_triangles_have_equal_sides(self):
self.assertEqual("equilateral", Triangle(2, 2, 2).kind())
def test_larger_equilateral_triangles_also_have... | 33.380952 | 111 | 0.658702 |
33b5b3e2669a31a5dfcfa8bbb15ecbf9b1baed66 | 2,947 | py | Python | tests/utils/generic/test_compute_ffill_by_group.py | vdestraitt/toucan-data-sdk | 09327592daef6bc94d0d6f79a041b581226c2b7b | [
"BSD-3-Clause"
] | null | null | null | tests/utils/generic/test_compute_ffill_by_group.py | vdestraitt/toucan-data-sdk | 09327592daef6bc94d0d6f79a041b581226c2b7b | [
"BSD-3-Clause"
] | null | null | null | tests/utils/generic/test_compute_ffill_by_group.py | vdestraitt/toucan-data-sdk | 09327592daef6bc94d0d6f79a041b581226c2b7b | [
"BSD-3-Clause"
] | null | null | null | import os
import pandas as pd
from toucan_data_sdk.utils.generic import compute_ffill_by_group
fixtures_base_dir = 'tests/fixtures'
def test_compute_ffill_by_group():
"""
It should compute ffill with a groupby
"""
input_df = pd.read_csv(os.path.join(fixtures_base_dir, 'compute_ffill_by_group.csv'))
... | 36.382716 | 89 | 0.549033 |
33b5bfb7a6910c0d41804f40ef350816eb051710 | 1,310 | py | Python | can_tools/scrapers/official/ND/common.py | christopherturner/can-scrapers | e580e6bc507ffd5fae06e43bb285822e3cd43986 | [
"MIT"
] | 7 | 2020-11-11T14:47:46.000Z | 2021-12-28T02:21:41.000Z | can_tools/scrapers/official/ND/common.py | christopherturner/can-scrapers | e580e6bc507ffd5fae06e43bb285822e3cd43986 | [
"MIT"
] | 176 | 2020-11-13T00:32:44.000Z | 2022-02-17T01:32:30.000Z | can_tools/scrapers/official/ND/common.py | christopherturner/can-scrapers | e580e6bc507ffd5fae06e43bb285822e3cd43986 | [
"MIT"
] | 13 | 2020-11-14T19:25:34.000Z | 2021-04-04T22:32:07.000Z | # ND County Populations
# Retrieved from ND COVID Case Count Dashboard
# https://www.health.nd.gov/diseases-conditions/coronavirus/north-dakota-coronavirus-cases
# Based on 2018 counts
nd_populations = {
"ADAMS": 2216,
"BARNES": 10415,
"BENSON": 6832,
"BILLINGS": 928,
"BOTTINEAU": 6282,
"BOWMAN... | 21.47541 | 90 | 0.560305 |
33b5dbd96e9f77b3a6ab5622bdf5f615bb5d9e28 | 1,336 | py | Python | tests/core/test_utils_bp.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 2 | 2020-09-30T11:40:22.000Z | 2020-11-09T09:06:30.000Z | tests/core/test_utils_bp.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 542 | 2021-01-11T13:23:47.000Z | 2022-03-31T15:38:10.000Z | tests/core/test_utils_bp.py | AntaresSimulatorTeam/antaREST | d686d2a86a52737c211ae67f3cee591f559909f2 | [
"Apache-2.0"
] | 1 | 2020-10-01T12:18:15.000Z | 2020-10-01T12:18:15.000Z | from http import HTTPStatus
from pathlib import Path
from unittest.mock import Mock
import pytest
from fastapi import FastAPI
from starlette.testclient import TestClient
from antarest import __version__
from antarest.core.config import (
Config,
SecurityConfig,
StorageConfig,
WorkspaceConfig,
)
from a... | 25.692308 | 73 | 0.738024 |
33b65adde93c182a5be108a63d49024f2cc24f55 | 172 | py | Python | src/typeDefs/filterBank.py | nagasudhirpulla/wrldc_codebook | 8fbc795074e16e2012b29ae875b99aa721a7f021 | [
"MIT"
] | null | null | null | src/typeDefs/filterBank.py | nagasudhirpulla/wrldc_codebook | 8fbc795074e16e2012b29ae875b99aa721a7f021 | [
"MIT"
] | 21 | 2021-01-08T18:03:32.000Z | 2021-02-02T16:17:34.000Z | src/typeDefs/filterBank.py | nagasudhirpulla/wrldc_codebook | 8fbc795074e16e2012b29ae875b99aa721a7f021 | [
"MIT"
] | null | null | null | from src.typeDefs.element import IElement
class IFilterBank(IElement):
substation: str
voltage: str
mvar: str
isSwitchable: str
filterBankNumber: str
| 17.2 | 41 | 0.72093 |
33b65fd087744a603d73095b831d59051cfafe88 | 6,217 | py | Python | docs/conf.py | coredumperror/formalchemy | 6d89bb3ac19248e114684df17bbf3885dc26de3e | [
"MIT"
] | 20 | 2015-01-25T13:54:08.000Z | 2021-03-09T16:54:53.000Z | docs/conf.py | coredumperror/formalchemy | 6d89bb3ac19248e114684df17bbf3885dc26de3e | [
"MIT"
] | 11 | 2015-02-05T16:36:19.000Z | 2020-11-13T11:41:19.000Z | docs/conf.py | coredumperror/formalchemy | 6d89bb3ac19248e114684df17bbf3885dc26de3e | [
"MIT"
] | 12 | 2015-02-19T14:06:21.000Z | 2021-07-30T08:44:45.000Z | # -*- coding: utf-8 -*-
#
# FormAlchemy documentation build configuration file, created by
# sphinx-quickstart on Thu Sep 4 22:53:00 2008.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pic... | 31.558376 | 82 | 0.722213 |
33b66e10d579acc69bf6984dea52d629eb399c76 | 2,647 | py | Python | etl/etl.py | asyaparfenova/data_pipeline | 1a4165eee638c62a696c1dcd6c349eec4b148c66 | [
"MIT"
] | 1 | 2021-01-13T16:24:48.000Z | 2021-01-13T16:24:48.000Z | etl/etl.py | asyaparfenova/data_pipeline | 1a4165eee638c62a696c1dcd6c349eec4b148c66 | [
"MIT"
] | null | null | null | etl/etl.py | asyaparfenova/data_pipeline | 1a4165eee638c62a696c1dcd6c349eec4b148c66 | [
"MIT"
] | null | null | null | import logging
import time
from sqlalchemy import create_engine
import pymongo
import re
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
from decouple import config
time.sleep(10)
def clean_tweet(tweet):
'''clean tweet text from @usernames, RT, https...'''
rt_regex = r"^RT "
http_reg... | 33.935897 | 97 | 0.513411 |
33b6721a985a96f5de9e4610faaab1e2f3ed61f4 | 1,665 | py | Python | scan/test/fetch/kube_fetch/test_kube_fetch_vnics_flannel.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | scan/test/fetch/kube_fetch/test_kube_fetch_vnics_flannel.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | scan/test/fetch/kube_fetch/test_kube_fetch_vnics_flannel.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | ###############################################################################
# Copyright (c) 2017-2020 Koren Lev (Cisco Systems), #
# Yaron Yogev (Cisco Systems), Ilia Abashin (Cisco Systems) and others #
# #
... | 40.609756 | 85 | 0.56997 |
33b67a6c9cbf6f9011096cd626f566e77af84842 | 879 | py | Python | tempodb/demo/tempodb-write-demo.py | tempodb/tempodb-python | 8ce45231bd728c6c97ef799cf0f1513ea3a9a7d3 | [
"MIT"
] | 4 | 2015-02-04T14:05:37.000Z | 2018-03-01T09:46:34.000Z | tempodb/demo/tempodb-write-demo.py | tempodb/tempodb-python | 8ce45231bd728c6c97ef799cf0f1513ea3a9a7d3 | [
"MIT"
] | 2 | 2022-01-30T22:45:34.000Z | 2022-01-30T22:45:42.000Z | tempodb/demo/tempodb-write-demo.py | tempodb/tempodb-python | 8ce45231bd728c6c97ef799cf0f1513ea3a9a7d3 | [
"MIT"
] | 1 | 2018-04-16T13:55:50.000Z | 2018-04-16T13:55:50.000Z | """
http://tempo-db.com/api/write-series/#write-series-by-key
"""
import datetime
import random
from tempodb.client import Client
from tempodb.protocol import DataPoint
# Modify these with your credentials found at: http://tempo-db.com/manage/
DATABASE_ID = 'my-id'
API_KEY = DATABASE_ID
API_SECRET = 'my-secret'
SERIE... | 25.114286 | 74 | 0.692833 |
33b6a47f6abadd2d255ef0f407f022c67e7e6f7b | 836 | py | Python | sensitive_data_logging/configurators.py | innovationinit/sensitive-data-logging | 244237e3e64607ae4caa9be541dc2c78517426d5 | [
"BSD-2-Clause"
] | null | null | null | sensitive_data_logging/configurators.py | innovationinit/sensitive-data-logging | 244237e3e64607ae4caa9be541dc2c78517426d5 | [
"BSD-2-Clause"
] | null | null | null | sensitive_data_logging/configurators.py | innovationinit/sensitive-data-logging | 244237e3e64607ae4caa9be541dc2c78517426d5 | [
"BSD-2-Clause"
] | null | null | null | """Configurators for sensitive data logging."""
from logging.config import DictConfigurator as BaseDictConfigurator
from .loggers import SensitiveDataLogger
class DictConfigurator(BaseDictConfigurator):
"""Subclass of logging.config.DictConfigurator which configures SensitiveDataLogger specific variables."""
... | 46.444444 | 140 | 0.778708 |
33b6bc8ee61f69cd267b0ab9aeddf63c01f168a3 | 5,894 | py | Python | Scripts/plot_Fig5.py | zmlabe/ThicknessSensitivity | 6defdd897a61d7d1a02f34a9f4ec92b2b17b3075 | [
"MIT"
] | 1 | 2017-10-22T02:22:14.000Z | 2017-10-22T02:22:14.000Z | Scripts/plot_Fig5.py | zmlabe/ThicknessSensitivity | 6defdd897a61d7d1a02f34a9f4ec92b2b17b3075 | [
"MIT"
] | null | null | null | Scripts/plot_Fig5.py | zmlabe/ThicknessSensitivity | 6defdd897a61d7d1a02f34a9f4ec92b2b17b3075 | [
"MIT"
] | 4 | 2018-04-05T17:55:36.000Z | 2022-03-31T07:05:01.000Z | """
Plot figure 5 in manuscript for spatial correlations between variables of
[FIT-HIT, FIC-CIT]. Time period includes all months.
Notes
-----
Author : Zachary Labe
Date : 3 February 2018
"""
### Import modules
import numpy as np
import matplotlib.pyplot as plt
import datetime
import read_MonthlyOutput as M... | 35.083333 | 80 | 0.588565 |
33b6e03f16b3cd28ccfc9687e1ff279f9333cc81 | 31,775 | py | Python | impacket/ImpactDecoder.py | black-security/impacket3 | 5b6145b3f511d4f7cddaba64cf150b109113afea | [
"Apache-1.1"
] | null | null | null | impacket/ImpactDecoder.py | black-security/impacket3 | 5b6145b3f511d4f7cddaba64cf150b109113afea | [
"Apache-1.1"
] | null | null | null | impacket/ImpactDecoder.py | black-security/impacket3 | 5b6145b3f511d4f7cddaba64cf150b109113afea | [
"Apache-1.1"
] | 1 | 2022-01-28T00:53:41.000Z | 2022-01-28T00:53:41.000Z | # Copyright (c) 2003-2013 CORE Security Technologies
#
# This software is provided under under a slightly modified version
# of the Apache Software License. See the accompanying LICENSE file
# for more information.
#
# Description:
# Convenience packet unpackers for various network protocols
# implemented in the Impa... | 31.585487 | 99 | 0.664044 |
33b6ed7ff6611ca90ad2cba797e9461837680f12 | 1,806 | py | Python | numeric_effects.py | piopy/pyddl | df09c6dcef912ba75810dee2de988c1e39efb690 | [
"MIT"
] | 42 | 2015-02-22T22:30:52.000Z | 2022-03-21T11:23:42.000Z | numeric_effects.py | piopy/pyddl | df09c6dcef912ba75810dee2de988c1e39efb690 | [
"MIT"
] | 3 | 2016-11-26T01:33:19.000Z | 2019-12-01T17:47:34.000Z | numeric_effects.py | piopy/pyddl | df09c6dcef912ba75810dee2de988c1e39efb690 | [
"MIT"
] | 10 | 2016-11-19T23:41:12.000Z | 2021-11-03T17:07:01.000Z | """
Test support for parametrized increment/decrement values in numeric effects
"""
from __future__ import print_function
from pyddl import Domain, Problem, Action, planner
def problem(verbose):
domain = Domain((
Action(
'sell',
parameters=(
('product', 'p'),
... | 28.666667 | 75 | 0.44629 |
33b6f40684006e0aa0ee5e69e0b1750ca2eb7411 | 991 | py | Python | portal/apps/core/management/commands/sendnewsletter_delete_old_logs.py | Artis-Physis/utopia-cms | 5cb8d941d0b2df53fddc566a52e9d3baee4a007e | [
"BSD-3-Clause"
] | 8 | 2020-12-15T17:11:08.000Z | 2021-12-13T22:08:33.000Z | portal/apps/core/management/commands/sendnewsletter_delete_old_logs.py | Artis-Physis/utopia-cms | 5cb8d941d0b2df53fddc566a52e9d3baee4a007e | [
"BSD-3-Clause"
] | 28 | 2020-12-15T17:34:03.000Z | 2022-02-01T04:09:10.000Z | portal/apps/core/management/commands/sendnewsletter_delete_old_logs.py | Artis-Physis/utopia-cms | 5cb8d941d0b2df53fddc566a52e9d3baee4a007e | [
"BSD-3-Clause"
] | 7 | 2020-12-15T19:59:17.000Z | 2021-11-24T16:47:06.000Z | # -*- coding: utf-8 -*-
import os
from sortedcontainers import SortedList
from django.conf import settings
from django.core.management.base import BaseCommand
class Command(BaseCommand):
"""
Group files in SENDNEWSLETTER_LOGFILE dir by pattern, sort them by date pattern and keep only the last N files by
... | 35.392857 | 117 | 0.631685 |
33b71294c70290c7202ef4d970be0d0a8eaf3499 | 2,457 | py | Python | python/tests/conftest.py | kristianmeyerr/AMICI | 15f14c24b781daf5ceb3606d79edbbf57155a043 | [
"CC0-1.0"
] | null | null | null | python/tests/conftest.py | kristianmeyerr/AMICI | 15f14c24b781daf5ceb3606d79edbbf57155a043 | [
"CC0-1.0"
] | null | null | null | python/tests/conftest.py | kristianmeyerr/AMICI | 15f14c24b781daf5ceb3606d79edbbf57155a043 | [
"CC0-1.0"
] | null | null | null | """pytest configuration file"""
import copy
import importlib
import os
import shutil
import sys
import pytest
import amici
@pytest.fixture(scope="session")
def sbml_example_presimulation_module():
"""SBML example_presimulation model module fixture"""
sbml_file = os.path.join(os.path.dirname(__file__), '..'... | 29.963415 | 78 | 0.680912 |
33b73ddb4e93b263de96dbbc7bb1a3f0109564cb | 1,682 | py | Python | bin/data_analyze.py | Justontheway/quality-monitor | 6ca296acfcdf6b5352ad3874d21c90e28b3d6018 | [
"Apache-2.0"
] | null | null | null | bin/data_analyze.py | Justontheway/quality-monitor | 6ca296acfcdf6b5352ad3874d21c90e28b3d6018 | [
"Apache-2.0"
] | 7 | 2017-03-24T03:02:51.000Z | 2017-04-14T02:57:19.000Z | bin/data_analyze.py | Justontheway/quality-monitor | 6ca296acfcdf6b5352ad3874d21c90e28b3d6018 | [
"Apache-2.0"
] | null | null | null | #-*- coding:utf-8 -*-
import os
import sys
sys.path.append(os.path.join(os.getenv("MONITOR_HOME", ".."), "lib"))
from data_gen import data_gen
from model import Statistic, Precision, LinearRegression
def model_test():
period = 20
d = data_gen()
model1 = Statistic.Statistic()
model2 = Precision.Preci... | 30.581818 | 89 | 0.549941 |
33b745defaf9abcc255aacf48aa0f32a2fa44139 | 18,314 | py | Python | hoverset/ui/dialogs.py | tjmoran/Formation | ff1e0a307fffaa65251736a48fefb23fe9ee75dd | [
"MIT"
] | 71 | 2020-06-19T11:17:35.000Z | 2022-03-24T02:51:54.000Z | hoverset/ui/dialogs.py | tjmoran/Formation | ff1e0a307fffaa65251736a48fefb23fe9ee75dd | [
"MIT"
] | 11 | 2020-06-20T19:04:02.000Z | 2022-03-01T04:42:36.000Z | hoverset/ui/dialogs.py | tjmoran/Formation | ff1e0a307fffaa65251736a48fefb23fe9ee75dd | [
"MIT"
] | 6 | 2020-11-15T01:38:53.000Z | 2021-12-25T07:14:23.000Z | """
Common dialogs customised for hoverset platform
"""
# ======================================================================= #
# Copyright (C) 2020 Hoverset Group. #
# ======================================================================= #
from hoverset.ui.widgets import Fra... | 41.06278 | 122 | 0.592825 |
33b746c7622dfc26cebfe97071467e5c7fc8d2a1 | 1,135 | py | Python | superset/migrations/versions/fc480c87706c_.py | rodrigoguariento/incubator-superset | b2633a51d43faaca74751349b96fc32784d4b377 | [
"Apache-2.0"
] | 18,621 | 2017-06-19T09:57:44.000Z | 2021-01-05T06:28:21.000Z | superset/migrations/versions/fc480c87706c_.py | Odirlei-Stein/incubator-superset | 52afc33b31475536b287b56d262b9eaa32f479ab | [
"Apache-2.0"
] | 9,043 | 2017-07-05T16:10:48.000Z | 2021-01-05T17:58:01.000Z | superset/migrations/versions/fc480c87706c_.py | Odirlei-Stein/incubator-superset | 52afc33b31475536b287b56d262b9eaa32f479ab | [
"Apache-2.0"
] | 5,527 | 2017-07-06T01:39:43.000Z | 2021-01-05T06:01:11.000Z | # 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... | 29.102564 | 62 | 0.757709 |
33b75a04d34fdd01bc0d854d4e5b9c45a737b122 | 5,245 | py | Python | tensorflow/contrib/distributions/python/ops/bijectors/kumaraswamy.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 848 | 2019-12-03T00:16:17.000Z | 2022-03-31T22:53:17.000Z | tensorflow/contrib/distributions/python/ops/bijectors/kumaraswamy.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 656 | 2019-12-03T00:48:46.000Z | 2022-03-31T18:41:54.000Z | tensorflow/contrib/distributions/python/ops/bijectors/kumaraswamy.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 506 | 2019-12-03T00:46:26.000Z | 2022-03-30T10:34:56.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 36.93662 | 80 | 0.659867 |
33b79a3f7e1ec9266479325b16a4e3bbc64c6d93 | 129,537 | py | Python | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_08_01/models/_models_py3.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 49.726296 | 538 | 0.683056 |
33b81028c31562e81b2b87d6a939840d7a755b9c | 12,830 | py | Python | falkon/models/falkon.py | mohamad-amin/falkon | 581c761b4a4cb7bf6a299613700db8414c419a52 | [
"MIT"
] | 130 | 2020-06-18T08:30:30.000Z | 2022-03-21T15:43:17.000Z | falkon/models/falkon.py | mohamad-amin/falkon | 581c761b4a4cb7bf6a299613700db8414c419a52 | [
"MIT"
] | 32 | 2020-06-26T09:24:45.000Z | 2022-03-20T10:37:36.000Z | falkon/models/falkon.py | mohamad-amin/falkon | 581c761b4a4cb7bf6a299613700db8414c419a52 | [
"MIT"
] | 17 | 2020-07-13T17:28:02.000Z | 2022-02-15T19:55:40.000Z | import dataclasses
import time
from typing import Union, Optional, Callable, Tuple
import torch
import falkon
from falkon.models.model_utils import FalkonBase
from falkon.options import *
from falkon.utils import TicToc
from falkon.utils.devices import get_device_info
__all__ = ("Falkon",)
def get_min_cuda_precond... | 43.938356 | 116 | 0.634451 |
33b815f092c0e69cc67b41b71c6c21fe8c31c87c | 2,109 | py | Python | leetcode_python/Math/squirrel-simulation.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | 18 | 2019-08-01T07:45:02.000Z | 2022-03-31T18:05:44.000Z | leetcode_python/Math/squirrel-simulation.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Math/squirrel-simulation.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | 15 | 2019-12-29T08:46:20.000Z | 2022-03-08T14:14:05.000Z | # LeetCode 573. Squirrel Simulation
# There's a tree, a squirrel, and several nuts. Positions are represented by the cells in a 2D grid. Your goal is to find the minimal distance for the squirrel to collect all the nuts and put them under the tree one by one. The squirrel can only take at most one nut at one time and ... | 31.477612 | 412 | 0.609768 |
33b8202304c9b4d6c33c2d76cbe886b6d511d193 | 299 | py | Python | Py3DViewer/utils/__init__.py | alexus98/py3DViewer | 693d39db8956530aa89cea5bbf271d9b6a92bd79 | [
"MIT"
] | null | null | null | Py3DViewer/utils/__init__.py | alexus98/py3DViewer | 693d39db8956530aa89cea5bbf271d9b6a92bd79 | [
"MIT"
] | null | null | null | Py3DViewer/utils/__init__.py | alexus98/py3DViewer | 693d39db8956530aa89cea5bbf271d9b6a92bd79 | [
"MIT"
] | null | null | null | from .ColorMap import *
from .IO import *
from .metrics import *
from .Observable import *
from .ObservableArray import *
from .load_operations import *
from .matrices import *
from .utilities import *
from .deprecated import *
from .Octree import *
from .NOctreeNode import *
from .NOctree import * | 24.916667 | 30 | 0.762542 |
33b83d3763bc8600ee545f57a8d02b813babe948 | 4,484 | py | Python | examples/SMRF_only_solar_thermal.py | scotthavens/smrf | a492d01a5eef994e00728c1cbed9f693879bbade | [
"CC0-1.0"
] | null | null | null | examples/SMRF_only_solar_thermal.py | scotthavens/smrf | a492d01a5eef994e00728c1cbed9f693879bbade | [
"CC0-1.0"
] | null | null | null | examples/SMRF_only_solar_thermal.py | scotthavens/smrf | a492d01a5eef994e00728c1cbed9f693879bbade | [
"CC0-1.0"
] | null | null | null | """
Distribute thermal long wave using only 1 method
20170731 Micah Sandusky
"""
import sys
from datetime import datetime
import matplotlib.pyplot as plt
import netCDF4 as nc
import numpy as np
import pytz
import smrf
from smrf.envphys import radiation
def main():
# read config file
# create a new model ... | 35.587302 | 111 | 0.468332 |
33b84d8fce95d68b38e77482af4c73a8497237ec | 7,483 | py | Python | src/stonkgs/models/stonkgs_for_embeddings.py | stonkgs/stonkgs | 6fd093f45ec113caf8d2d546301937c06530ed50 | [
"MIT"
] | 24 | 2021-07-12T19:17:25.000Z | 2022-03-24T16:22:21.000Z | src/stonkgs/models/stonkgs_for_embeddings.py | stonkgs/stonkgs | 6fd093f45ec113caf8d2d546301937c06530ed50 | [
"MIT"
] | 2 | 2021-08-16T15:53:32.000Z | 2021-08-17T10:31:51.000Z | src/stonkgs/models/stonkgs_for_embeddings.py | stonkgs/stonkgs | 6fd093f45ec113caf8d2d546301937c06530ed50 | [
"MIT"
] | 3 | 2022-01-24T06:25:19.000Z | 2022-03-28T11:35:47.000Z | # -*- coding: utf-8 -*-
"""Embeddings from the pre-trained STonKGs model."""
import logging
from pathlib import Path
from typing import Iterable, List, Optional, Tuple, Union
import pandas as pd
import torch
from tqdm import tqdm
from transformers import BertTokenizer, BertTokenizerFast
from stonkgs.constants impor... | 40.016043 | 118 | 0.695176 |
33b85fea368f67f286d6312d5b698790815cd894 | 10,335 | py | Python | devito/dle/parallelizer.py | cc-a/devito | 24ede9131473f69c1e44ba3b852f8654d3fd953e | [
"MIT"
] | null | null | null | devito/dle/parallelizer.py | cc-a/devito | 24ede9131473f69c1e44ba3b852f8654d3fd953e | [
"MIT"
] | null | null | null | devito/dle/parallelizer.py | cc-a/devito | 24ede9131473f69c1e44ba3b852f8654d3fd953e | [
"MIT"
] | 1 | 2020-01-13T01:17:24.000Z | 2020-01-13T01:17:24.000Z | from collections import OrderedDict
import os
import numpy as np
import cgen as c
from sympy import Function, Or
from devito.ir import (Call, Conditional, Block, Expression, List, Prodder,
FindSymbols, FindNodes, Return, COLLAPSED, Transformer,
IsPerfectIteration, retriev... | 37.445652 | 90 | 0.598936 |
33b8677a1c3c4bd6b8a6a332064a93a3b2b08c67 | 1,653 | py | Python | setup.py | theatlantic/django-selenosis | 3f01d2ddd3db033689753dd3fe329c8d335eef79 | [
"BSD-2-Clause"
] | 2 | 2019-04-12T13:29:21.000Z | 2019-11-22T16:09:40.000Z | setup.py | theatlantic/django-selenosis | 3f01d2ddd3db033689753dd3fe329c8d335eef79 | [
"BSD-2-Clause"
] | null | null | null | setup.py | theatlantic/django-selenosis | 3f01d2ddd3db033689753dd3fe329c8d335eef79 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
from os import path
from setuptools import setup, find_packages
def read(*parts):
file_path = path.join(path.dirname(__file__), *parts)
return open(file_path).read()
setup(
name='django-selenosis',
version='2.0.0',
license='BSD',
description='Helpers for writing seleni... | 32.411765 | 71 | 0.61827 |
33b86b44db2a3f879cd3dcd4285b4e42a7cda216 | 6,884 | py | Python | production/pygsl-0.9.5/pygsl/poly.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | null | null | null | production/pygsl-0.9.5/pygsl/poly.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | null | null | null | production/pygsl-0.9.5/pygsl/poly.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | 1 | 2018-10-02T06:18:07.000Z | 2018-10-02T06:18:07.000Z | # Author : Pierre Schnizer
"""
Wrapper over the functions as described in Chaper 6 of the
reference manual.
There are routines for finding real and complex roots of quadratic and cubic
equations using analytic methods. An iterative polynomial solver is also
available for finding the roots of general polynomials... | 32.168224 | 80 | 0.636694 |
33b86b4618ad78d0afe8f8d5f7c71d7914991e70 | 2,203 | py | Python | src/compas_rv2/ui/Rhino/RV2/dev/RV2init_cmd.py | amaneka/compas-RV2 | 36d1c8df403e231b52e545e3d04df8421998c056 | [
"MIT"
] | 4 | 2022-01-17T19:17:22.000Z | 2022-01-21T18:06:02.000Z | src/compas_rv2/ui/Rhino/RV2/dev/RV2init_cmd.py | Rjpanval/compas-RV2 | 4314dccbbefd5b8aadc9557f6d51d52c1e61fc24 | [
"MIT"
] | null | null | null | src/compas_rv2/ui/Rhino/RV2/dev/RV2init_cmd.py | Rjpanval/compas-RV2 | 4314dccbbefd5b8aadc9557f6d51d52c1e61fc24 | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import os
import scriptcontext as sc
import compas
import compas_rhino
compas_rhino.unload_modules('compas_rv2')
from compas_cloud import Proxy # noqa: E402
from compas_rv2.scene import Scene # noqa: E402
... | 24.208791 | 114 | 0.615524 |
33b884aec0834d63633f57a88dfac4a160fe7bda | 361 | py | Python | optml/neuralnet/__init__.py | or-fusion/OptML | c0aae08e8504cbf53a94df2b2da42d33c2bc0ff6 | [
"BSD-3-Clause"
] | 1 | 2022-03-17T19:44:44.000Z | 2022-03-17T19:44:44.000Z | optml/neuralnet/__init__.py | or-fusion/OptML | c0aae08e8504cbf53a94df2b2da42d33c2bc0ff6 | [
"BSD-3-Clause"
] | null | null | null | optml/neuralnet/__init__.py | or-fusion/OptML | c0aae08e8504cbf53a94df2b2da42d33c2bc0ff6 | [
"BSD-3-Clause"
] | null | null | null | from optml.neuralnet.full_space import FullSpaceContinuousFormulation
from optml.neuralnet.reduced_space import ReducedSpaceContinuousFormulation
from optml.neuralnet.relu import ReLUBigMFormulation, ReLUComplementarityFormulation
from optml.neuralnet.network_definition import NetworkDefinition
from optml.neuralnet.... | 72.2 | 84 | 0.905817 |
33b8853dd1920b9bd0adcb9f91dde7e2dd8dc441 | 3,696 | py | Python | two1/sell/util/context.py | febuiles/two1-python | 88704487dba7715f97a0980781d4c0efb2ea7fc4 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | two1/sell/util/context.py | febuiles/two1-python | 88704487dba7715f97a0980781d4c0efb2ea7fc4 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | two1/sell/util/context.py | febuiles/two1-python | 88704487dba7715f97a0980781d4c0efb2ea7fc4 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | # @dongcarl
import json
import os
from abc import ABCMeta
from abc import abstractmethod
from contextlib import ContextDecorator
import yaml
class LoadableDumpableDataContext(ContextDecorator, metaclass=ABCMeta):
"""A context manager for data that can be dumped and loaded from disk
"""
def __init__(self,... | 34.867925 | 124 | 0.650162 |
33b88f4128df783f325f89638ab3f6af636df024 | 3,243 | py | Python | cadnano/color.py | mctrinh/cadnano2.5 | d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736 | [
"BSD-3-Clause"
] | 1 | 2022-03-27T14:37:32.000Z | 2022-03-27T14:37:32.000Z | cadnano/color.py | mctrinh/cadnano2.5 | d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736 | [
"BSD-3-Clause"
] | null | null | null | cadnano/color.py | mctrinh/cadnano2.5 | d8254f24eef5fd77b4fb2b1a9642a8eea2e3c736 | [
"BSD-3-Clause"
] | 1 | 2021-01-22T02:29:38.000Z | 2021-01-22T02:29:38.000Z | # -*- coding: utf-8 -*-
""" This allows the model to have a :class:`Color` object class without
the need for :class:`PyQt5.QtGui.QColor`
When running the Qt Application, :class:`QColor` will be used, otherwise an
API compatible class is used and exported as a :class:`Color` object
Currently :class:`Color` objects are... | 27.717949 | 85 | 0.512488 |
33b88f4fda39d5ded644b5694195ef83ef173729 | 2,811 | py | Python | sparv/modules/korp/lemgram_index.py | heatherleaf/sparv-pipeline | 0fe5f27d0d82548ecc6cb21a69289668aac54cf1 | [
"MIT"
] | null | null | null | sparv/modules/korp/lemgram_index.py | heatherleaf/sparv-pipeline | 0fe5f27d0d82548ecc6cb21a69289668aac54cf1 | [
"MIT"
] | null | null | null | sparv/modules/korp/lemgram_index.py | heatherleaf/sparv-pipeline | 0fe5f27d0d82548ecc6cb21a69289668aac54cf1 | [
"MIT"
] | null | null | null | """Create files needed for the lemgram search in Korp."""
import logging
from collections import defaultdict
import sparv.util as util
from sparv import (AllDocuments, AnnotationAllDocs, Config, Corpus, Export, ExportInput, OutputCommonData, exporter,
installer)
from sparv.util.mysql_wrapper import... | 36.986842 | 116 | 0.622199 |
33b893952317f5c99fd3d4e8ff9b74bfcade7dbb | 49 | py | Python | src/methods/ConstrainedKMeans/src/__init__.py | ferrocactus/cellar | d1733d4643b3a4c960529806d4904ab3b3c54666 | [
"MIT"
] | 7 | 2020-11-16T16:50:37.000Z | 2021-09-08T16:56:32.000Z | src/__init__.py | ferrocactus/ConstrainedKMeans | f9b2bfe9c61ee1ab1e6e9f96e125ebc136220bcf | [
"MIT"
] | null | null | null | src/__init__.py | ferrocactus/ConstrainedKMeans | f9b2bfe9c61ee1ab1e6e9f96e125ebc136220bcf | [
"MIT"
] | 3 | 2020-07-03T04:14:55.000Z | 2021-03-14T21:51:22.000Z | from .ConstrainedKMeans import ConstrainedKMeans
| 24.5 | 48 | 0.897959 |
33b895c4f47c18a532a94e70613b51300e916dda | 3,439 | py | Python | watcher_dashboard/content/strategies/views.py | openstack/watcher-dashboard | 146e547da934c2464ec5f49326eabed0eecfda96 | [
"Apache-2.0"
] | 15 | 2016-02-12T07:33:42.000Z | 2019-01-28T22:13:27.000Z | watcher_dashboard/content/strategies/views.py | openstack/watcher-dashboard | 146e547da934c2464ec5f49326eabed0eecfda96 | [
"Apache-2.0"
] | null | null | null | watcher_dashboard/content/strategies/views.py | openstack/watcher-dashboard | 146e547da934c2464ec5f49326eabed0eecfda96 | [
"Apache-2.0"
] | 2 | 2017-08-11T02:25:37.000Z | 2017-10-10T09:59:40.000Z | # Copyright (c) 2016 b<>com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softw... | 34.737374 | 75 | 0.681012 |
33b8999ef3a5917985907ccfc07aa2593c1e7fe9 | 15,129 | py | Python | quimb/tensor/drawing.py | cbwang2016/quimb | 633ae4117e6fc5518f9b1bc07a0ae734f058072c | [
"Apache-2.0"
] | null | null | null | quimb/tensor/drawing.py | cbwang2016/quimb | 633ae4117e6fc5518f9b1bc07a0ae734f058072c | [
"Apache-2.0"
] | null | null | null | quimb/tensor/drawing.py | cbwang2016/quimb | 633ae4117e6fc5518f9b1bc07a0ae734f058072c | [
"Apache-2.0"
] | null | null | null | """Functionailty for drawing tensor networks.
"""
from ..utils import valmap
import numpy as np
def _add_or_merge_edge(G, u, v, attrs):
if not G.has_edge(u, v):
G.add_edge(u, v, **attrs)
else:
# multibond - update attrs
attrs0 = G.edges[u, v]
# average colors
attrs0['... | 30.75 | 79 | 0.582325 |
33b8a4d69df48e32c2fcb3a09fc35b4e3862fe90 | 3,978 | py | Python | models/deep_ar/data_preprocessing.py | AlexandreRozier/BigDataAnalytics | 50ac5fe0d87d29a1938b9f19c3785baa59e0b83e | [
"Apache-2.0"
] | null | null | null | models/deep_ar/data_preprocessing.py | AlexandreRozier/BigDataAnalytics | 50ac5fe0d87d29a1938b9f19c3785baa59e0b83e | [
"Apache-2.0"
] | null | null | null | models/deep_ar/data_preprocessing.py | AlexandreRozier/BigDataAnalytics | 50ac5fe0d87d29a1938b9f19c3785baa59e0b83e | [
"Apache-2.0"
] | null | null | null | import pickle
import pandas as pd
from matplotlib import pyplot as plt
import sagemaker
import boto3
import s3fs
import json
import datetime
from tzlocal import get_localzone as tzlocal
import numpy as np
import datetime
from tzlocal import get_localzone as tzlocal
import boto3
from tqdm import tqdm_notebook as tqdm
i... | 39 | 136 | 0.745349 |
33b8b10935821e418c5da2bbba406bc04a3f7624 | 115 | py | Python | src/tags/admin.py | aminhp93/learning_python | f708a61c78e26061cf8b7fa5b1262fb0eea330d7 | [
"MIT"
] | null | null | null | src/tags/admin.py | aminhp93/learning_python | f708a61c78e26061cf8b7fa5b1262fb0eea330d7 | [
"MIT"
] | 7 | 2020-02-11T23:32:33.000Z | 2022-03-11T23:15:53.000Z | src/tags/admin.py | aminhp93/learning_python | f708a61c78e26061cf8b7fa5b1262fb0eea330d7 | [
"MIT"
] | null | null | null | from django.contrib import admin
from tags.models import Tag
# Register your models here.
admin.site.register(Tag) | 23 | 32 | 0.808696 |
33b8c1bae75f8722086cf887c97833774e0f1e58 | 1,408 | py | Python | colecciones de datos/ejer7.py | txtbits/daw-python | 5dde1207e2791e90aa5e9ce2b6afc4116129efab | [
"MIT"
] | null | null | null | colecciones de datos/ejer7.py | txtbits/daw-python | 5dde1207e2791e90aa5e9ce2b6afc4116129efab | [
"MIT"
] | null | null | null | colecciones de datos/ejer7.py | txtbits/daw-python | 5dde1207e2791e90aa5e9ce2b6afc4116129efab | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Escribe un programa que pida una lista de nombres (acabada con un <intro>).
El programa mostrará la lista de nombres en orden alfabético sin repetir ninguno.
'''
'''
agenda = []
persona = ['Luis Pérez', 'luisperez@micorreo.com', '666666666']
persona2 = ['María Aznar', 'mariaaznar@micorreo... | 25.142857 | 81 | 0.633523 |
33b8e2c58f40188385f9e4673d47f53f2478a8f9 | 694 | py | Python | aiostorage/exceptions.py | family-guy/aiostorage | 266826caf811e96ba110c4bff26ad1889a8e9f62 | [
"MIT"
] | null | null | null | aiostorage/exceptions.py | family-guy/aiostorage | 266826caf811e96ba110c4bff26ad1889a8e9f62 | [
"MIT"
] | 3 | 2018-12-25T13:53:11.000Z | 2019-02-10T13:52:31.000Z | aiostorage/exceptions.py | grking8/aiostorage | 266826caf811e96ba110c4bff26ad1889a8e9f62 | [
"MIT"
] | null | null | null | """
This module contains exceptions for the `BlobStorage` class.
"""
from .providers import PROVIDERS
class BlobStorageError(Exception):
"""
Base exception class.
"""
class BlobStorageUnrecognizedProviderError(BlobStorageError):
"""
Unrecognized object storage provider.
"""
def __str__(s... | 24.785714 | 78 | 0.698847 |
33b8e9d2639685872ca9e5b43aaf3fc5338bc60b | 415 | py | Python | code_scanner/code_scanner/data_validators.py | stargrep/rmm-utils | 55725cb117015bbe35653120779c53ff39a999bc | [
"MIT"
] | null | null | null | code_scanner/code_scanner/data_validators.py | stargrep/rmm-utils | 55725cb117015bbe35653120779c53ff39a999bc | [
"MIT"
] | null | null | null | code_scanner/code_scanner/data_validators.py | stargrep/rmm-utils | 55725cb117015bbe35653120779c53ff39a999bc | [
"MIT"
] | null | null | null | # data validation decorator
def validator(cmp, exc):
def decorator(setter): # a decorator for the setter
def wrapper(self, value): # the wrapper around your setter
if cmp(value): # if cmp function returns True, raise the passed exception
raise exc
setter(self, valu... | 41.5 | 86 | 0.650602 |
33b8f4af4514b3f6469421eb59fedb523138733f | 1,239 | py | Python | twister2/tools/cli/src/python/clear.py | pulasthi/twister2 | 40b73bdf7dcb778d957c3f146baf825a97dceae5 | [
"Apache-2.0"
] | 63 | 2017-08-31T10:02:52.000Z | 2021-12-18T21:42:14.000Z | twister2/tools/cli/src/python/clear.py | pulasthi/twister2 | 40b73bdf7dcb778d957c3f146baf825a97dceae5 | [
"Apache-2.0"
] | 284 | 2017-10-20T15:35:26.000Z | 2020-09-11T15:25:40.000Z | twister2/tools/cli/src/python/clear.py | pulasthi/twister2 | 40b73bdf7dcb778d957c3f146baf825a97dceae5 | [
"Apache-2.0"
] | 44 | 2017-08-21T19:47:57.000Z | 2020-11-22T22:45:50.000Z | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | 35.4 | 107 | 0.628733 |
33b92a6de5c048182686284a1768df3b7f08e684 | 925 | py | Python | setup.py | nickesk/pyactiveresource | 58a662d1b5251de9b839cc3069d3a783c8ae4bb2 | [
"MIT"
] | null | null | null | setup.py | nickesk/pyactiveresource | 58a662d1b5251de9b839cc3069d3a783c8ae4bb2 | [
"MIT"
] | null | null | null | setup.py | nickesk/pyactiveresource | 58a662d1b5251de9b839cc3069d3a783c8ae4bb2 | [
"MIT"
] | null | null | null | from distutils.core import setup
version = '1.0.2'
setup(name='pyactiveresource',
version=version,
description='ActiveResource for Python',
author='Jared Kuolt',
author_email='me@superjared.com',
url='http://code.google.com/p/pyactiveresource/',
packages=['pyactiveresource'],
... | 37 | 82 | 0.571892 |
33b92a8f28fa6f745d8623df1a0aeeae124e2cfc | 812 | py | Python | split_synthesised_data_for_train_and_val_runner.py | feiphoon/ner-pipeline | 1c343eea458e9c546bb8b53adcd22118d171aa63 | [
"MIT"
] | null | null | null | split_synthesised_data_for_train_and_val_runner.py | feiphoon/ner-pipeline | 1c343eea458e9c546bb8b53adcd22118d171aa63 | [
"MIT"
] | null | null | null | split_synthesised_data_for_train_and_val_runner.py | feiphoon/ner-pipeline | 1c343eea458e9c546bb8b53adcd22118d171aa63 | [
"MIT"
] | null | null | null | from pathlib import Path
from src.helpers.run import Run, get_last_run_timestamp
from src.helpers.train_test_split import TrainTestSplit
from src.helpers.run import Run, get_last_run_timestamp
from src.G_prepare_synthetic_annotations_for_ner.split_synthesised_data_for_train_and_val import (
split_for_train_and_va... | 32.48 | 98 | 0.841133 |
33b92f0a0ff357b1b3f85983f53e934f777f2210 | 1,644 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_protection_policy_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_protection_policy_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_vm_protection_policy_py3.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 45.666667 | 121 | 0.685523 |
33b95e686aaac18a2c9d3de4e95cee116ebf1771 | 7,991 | py | Python | lab/setup_utils.py | dineshkumar4u/monitor-ml-models-efficiently-across-fleets-of-devices-aim325 | ad330f3d1c37081284ffa979f4fb99630903688a | [
"MIT-0"
] | 4 | 2021-12-02T23:05:46.000Z | 2022-01-11T19:38:29.000Z | lab/setup_utils.py | dineshkumar4u/monitor-ml-models-efficiently-across-fleets-of-devices-aim325 | ad330f3d1c37081284ffa979f4fb99630903688a | [
"MIT-0"
] | 1 | 2021-11-27T04:18:50.000Z | 2021-11-27T04:43:43.000Z | lab/setup_utils.py | dineshkumar4u/monitor-ml-models-efficiently-across-fleets-of-devices-aim325 | ad330f3d1c37081284ffa979f4fb99630903688a | [
"MIT-0"
] | 2 | 2021-11-25T17:56:38.000Z | 2021-11-27T04:19:18.000Z | import sagemaker
from sagemaker import get_execution_role
import boto3
import botocore
from botocore.exceptions import ClientError
import json
import time
def setup_roles_and_policies(iot_device_role_name):
role = get_execution_role()
iam_client = boto3.client('iam')
iam_resource = boto3.resource('iam')
... | 30.734615 | 93 | 0.550995 |
33b9631216eeecf06d636a88ff217c85a721b3b2 | 28,711 | py | Python | statsmodels/base/tests/test_data.py | saedsaleh/statsmodels | 7df5291f04f406f127242736008f72cb4a579262 | [
"BSD-3-Clause"
] | null | null | null | statsmodels/base/tests/test_data.py | saedsaleh/statsmodels | 7df5291f04f406f127242736008f72cb4a579262 | [
"BSD-3-Clause"
] | null | null | null | statsmodels/base/tests/test_data.py | saedsaleh/statsmodels | 7df5291f04f406f127242736008f72cb4a579262 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import pandas
import pandas.util.testing as ptesting
from statsmodels.base import data as sm_data
#class TestDates(object):
# @classmethod
# def setupClass(cls):
# nrows = 10
# cls.dates_result = cls.dates_results = np.random.random(nrows)
#
# def test_dates(self):
# n... | 39.821082 | 78 | 0.572533 |
33b992c17021568ec65923b79ea104a9af70048f | 3,333 | py | Python | contxt/utils/contxt_environment.py | ndustrialio/contxt-sdk-python-control | e87930eb65853a314eb118ea5cbc0386d2188db2 | [
"0BSD"
] | null | null | null | contxt/utils/contxt_environment.py | ndustrialio/contxt-sdk-python-control | e87930eb65853a314eb118ea5cbc0386d2188db2 | [
"0BSD"
] | null | null | null | contxt/utils/contxt_environment.py | ndustrialio/contxt-sdk-python-control | e87930eb65853a314eb118ea5cbc0386d2188db2 | [
"0BSD"
] | null | null | null | import os
import sys
from typing import List, Optional
from .persistent_contxt_config import PersistentContxtConfig, ContxtConfigurationError
from .config import CustomEnvironmentConfig, ContxtEnvironmentConfig, ContxtCliEnvironmentConfig
class EnvironmentConfigurationException(Exception):
pass
class ContxtEnv... | 45.657534 | 126 | 0.707171 |
33b9ad91f306aa34dbce2d63b64dc1295a69fa49 | 8,650 | py | Python | ambari-agent/src/main/python/resource_management/core/providers/system.py | wbear2/ambari | a1891193984da47015cd5483b5b95e040677d7df | [
"Apache-2.0"
] | 5 | 2018-06-03T05:19:40.000Z | 2021-04-16T17:10:49.000Z | ambari-agent/src/main/python/resource_management/core/providers/system.py | wbear2/ambari | a1891193984da47015cd5483b5b95e040677d7df | [
"Apache-2.0"
] | null | null | null | ambari-agent/src/main/python/resource_management/core/providers/system.py | wbear2/ambari | a1891193984da47015cd5483b5b95e040677d7df | [
"Apache-2.0"
] | 6 | 2019-05-07T13:24:39.000Z | 2021-02-15T14:12:37.000Z | #!/usr/bin/env python
"""
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");... | 32.518797 | 128 | 0.655376 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.