hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ca0c4db4947c4f147ab6c53413af197da534268c | 15,907 | py | Python | pandas/core/computation/ops.py | vimalromeo/pandas | 7c14e4f14aff216be558bf5d4d2d00b4838c2360 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 69 | 2020-03-31T06:40:17.000Z | 2022-02-25T11:48:18.000Z | venv/lib/python3.7/site-packages/pandas/core/computation/ops.py | John1001Song/Big-Data-Robo-Adviser | 9444dce96954c546333d5aecc92a06c3bfd19aa5 | [
"MIT"
] | 8 | 2019-12-04T23:44:11.000Z | 2022-02-10T08:31:40.000Z | venv/lib/python3.7/site-packages/pandas/core/computation/ops.py | John1001Song/Big-Data-Robo-Adviser | 9444dce96954c546333d5aecc92a06c3bfd19aa5 | [
"MIT"
] | 28 | 2020-04-15T15:24:17.000Z | 2021-12-26T04:05:02.000Z | """Operator classes for eval.
"""
import operator as op
from functools import partial
from datetime import datetime
import numpy as np
from pandas.core.dtypes.common import is_list_like, is_scalar
import pandas as pd
from pandas.compat import PY3, string_types, text_type
import pandas.core.common as com
from pandas.... | 28.921818 | 79 | 0.57635 |
3b358c2274f7380753cacf138817dd2fb62dfea5 | 1,162 | py | Python | src/livecli/plugins/powerapp.py | NghiemTrung/livecli | 6a21b1b144b045963b6d1db8d4d8dc8471b62737 | [
"BSD-2-Clause"
] | 1 | 2019-12-04T11:54:52.000Z | 2019-12-04T11:54:52.000Z | src/livecli/plugins/powerapp.py | NghiemTrung/livecli | 6a21b1b144b045963b6d1db8d4d8dc8471b62737 | [
"BSD-2-Clause"
] | null | null | null | src/livecli/plugins/powerapp.py | NghiemTrung/livecli | 6a21b1b144b045963b6d1db8d4d8dc8471b62737 | [
"BSD-2-Clause"
] | null | null | null | from __future__ import print_function
import re
from livecli.plugin import Plugin
from livecli.plugin.api import http
from livecli.plugin.api import validate
from livecli.stream import HLSStream
__livecli_docs__ = {
"domains": [
"powerapp.com.tr",
],
"geo_blocked": [],
"notes": "",
"live":... | 25.822222 | 89 | 0.650602 |
fddf675c8b17d1f8e36aebfe5443696102a92f86 | 5,206 | py | Python | remediation_worker/jobs/security_group_close_port_3389/security_group_close_port_3389.py | kshrutik/secure-state-remediation-jobs | dc0a5acc3a74dd70d0b18e448124761a8481990d | [
"Apache-2.0"
] | null | null | null | remediation_worker/jobs/security_group_close_port_3389/security_group_close_port_3389.py | kshrutik/secure-state-remediation-jobs | dc0a5acc3a74dd70d0b18e448124761a8481990d | [
"Apache-2.0"
] | null | null | null | remediation_worker/jobs/security_group_close_port_3389/security_group_close_port_3389.py | kshrutik/secure-state-remediation-jobs | dc0a5acc3a74dd70d0b18e448124761a8481990d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 VMware Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 36.661972 | 118 | 0.605263 |
f12d108fc8e783185b70d5f5dfb9da21a1e0f661 | 754 | py | Python | pingle/core/game.py | advancedresearch/pingle | ae5535d8d427bea4bbc174712c5f94a41729653a | [
"MIT"
] | 2 | 2018-05-23T11:29:46.000Z | 2018-05-28T17:49:24.000Z | pingle/core/game.py | advancedresearch/pingle | ae5535d8d427bea4bbc174712c5f94a41729653a | [
"MIT"
] | 6 | 2018-05-24T10:49:52.000Z | 2018-05-28T20:56:44.000Z | pingle/core/game.py | advancedresearch/pingle | ae5535d8d427bea4bbc174712c5f94a41729653a | [
"MIT"
] | 1 | 2018-05-23T11:30:17.000Z | 2018-05-23T11:30:17.000Z | import abc
import pingle.core
class Game:
def __init__(self):
pass
@abc.abstractmethod
def play(self, **players):
"""
"""
pass
@abc.abstractmethod
def step(self, *
player_id,
policy,
duration):
"""
Par... | 18.390244 | 65 | 0.496021 |
33f6437802050c6714775bee671200270d8f59cc | 3,336 | py | Python | bert_seq2seq/basic_bert.py | jackie930/bert-seq2seq-textsummary | e685f28b650667f24adc055ca7ca27c0b44d30bd | [
"Apache-2.0"
] | 5 | 2021-04-12T07:38:12.000Z | 2022-03-17T09:49:50.000Z | bert_seq2seq/basic_bert.py | jackie930/bert-seq2seq-textsummary | e685f28b650667f24adc055ca7ca27c0b44d30bd | [
"Apache-2.0"
] | null | null | null | bert_seq2seq/basic_bert.py | jackie930/bert-seq2seq-textsummary | e685f28b650667f24adc055ca7ca27c0b44d30bd | [
"Apache-2.0"
] | 2 | 2021-12-07T14:13:35.000Z | 2022-03-17T09:49:52.000Z |
import torch
import torch.nn as nn
class BasicBert(nn.Module):
def __init__(self):
super().__init__()
self.device = torch.device("cpu")
def load_pretrain_params(self, pretrain_model_path, keep_tokens=None):
checkpoint = torch.load(pretrain_model_path, map_location=self.device)
... | 33.36 | 94 | 0.647482 |
c7e3c8c0276185fec1ce7dd7dadd792a83c2b690 | 1,327 | py | Python | homeassistant/components/damper5/__init__.py | magicmatt007/core | a162ccb3f961f98a8bb40e57b162ce3dbc42922a | [
"Apache-2.0"
] | 1 | 2020-09-14T19:44:47.000Z | 2020-09-14T19:44:47.000Z | homeassistant/components/damper5/__init__.py | magicmatt007/core | a162ccb3f961f98a8bb40e57b162ce3dbc42922a | [
"Apache-2.0"
] | null | null | null | homeassistant/components/damper5/__init__.py | magicmatt007/core | a162ccb3f961f98a8bb40e57b162ce3dbc42922a | [
"Apache-2.0"
] | null | null | null | """The damper5a integration."""
import asyncio
import voluptuous as vol
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from .const import DOMAIN
CONFIG_SCHEMA = vol.Schema({DOMAIN: vol.Schema({})}, extra=vol.ALLOW_EXTRA)
# TODO List the platforms that you want to ... | 26.54 | 80 | 0.68425 |
dcec5c5a013fe73fc268a5dbc5386c1089e3ed91 | 82 | py | Python | CodingBat/Warmup-1/parrot_trouble.py | arthxvr/coding--python | 1e91707be6cb8fef816dad0c1a65f2cc3327357e | [
"MIT"
] | null | null | null | CodingBat/Warmup-1/parrot_trouble.py | arthxvr/coding--python | 1e91707be6cb8fef816dad0c1a65f2cc3327357e | [
"MIT"
] | null | null | null | CodingBat/Warmup-1/parrot_trouble.py | arthxvr/coding--python | 1e91707be6cb8fef816dad0c1a65f2cc3327357e | [
"MIT"
] | null | null | null | def parrot_trouble(talking, hour):
return talking and (hour < 7 or hour > 20)
| 27.333333 | 46 | 0.695122 |
43e3bbdb6dc3eca28ffbdf6f8aecd779d3ef22a5 | 921 | py | Python | src/hicolor.py | tateishi/py-urwid-test | f5545840a5320633df23a48c03a6422d6e965e6c | [
"MIT"
] | null | null | null | src/hicolor.py | tateishi/py-urwid-test | f5545840a5320633df23a48c03a6422d6e965e6c | [
"MIT"
] | null | null | null | src/hicolor.py | tateishi/py-urwid-test | f5545840a5320633df23a48c03a6422d6e965e6c | [
"MIT"
] | null | null | null | import urwid
def exit_on_q(key):
if key in 'qQ':
raise urwid.ExitMainLoop()
palette = [
('banner', '', '', '', '#ffa', '#60d'),
('streak', '', '', '', 'g50', '#60a'),
('inside', '', '', '', 'g38','#808'),
('outside', '', '', '', 'g27', '#a06'),
('bg', '', '', '', 'g7', '#d06'),]
plac... | 29.709677 | 70 | 0.617807 |
ae8c3353dbcc3a82c9b0eaac0a65f5c55bd1cb09 | 5,372 | py | Python | lib/carbon/storage.py | jblaine/carbon | d3903c5e1c9fb4c401161d380a432f58cfda9d20 | [
"Apache-2.0"
] | null | null | null | lib/carbon/storage.py | jblaine/carbon | d3903c5e1c9fb4c401161d380a432f58cfda9d20 | [
"Apache-2.0"
] | null | null | null | lib/carbon/storage.py | jblaine/carbon | d3903c5e1c9fb4c401161d380a432f58cfda9d20 | [
"Apache-2.0"
] | null | null | null | """Copyright 2009 Chris Davis
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
dist... | 27.548718 | 109 | 0.708116 |
a48664e32869d0ddd095f1e2b856f8331bb78054 | 23,925 | py | Python | equideepdmri/layers/layer_builders.py | philip-mueller/equivariant-deep-dmri | 4391de51eacea045783742bfd2ca2f1e2f7e964e | [
"MIT"
] | 13 | 2021-02-19T06:08:53.000Z | 2022-02-21T10:30:05.000Z | equideepdmri/layers/layer_builders.py | philip-mueller/equivariant-deep-dmri | 4391de51eacea045783742bfd2ca2f1e2f7e964e | [
"MIT"
] | 3 | 2021-03-25T14:18:40.000Z | 2021-11-05T12:32:57.000Z | equideepdmri/layers/layer_builders.py | philip-mueller/equivariant-deep-dmri | 4391de51eacea045783742bfd2ca2f1e2f7e964e | [
"MIT"
] | 5 | 2021-04-23T12:59:00.000Z | 2021-12-26T21:09:37.000Z | from collections import OrderedDict
from functools import partial
from typing import Union, List
import torch
from torch import nn
from e3nn.non_linearities.rescaled_act import sigmoid
from e3nn.non_linearities.gated_block import GatedBlock
from equideepdmri.layers.EquivariantPQLayer import EquivariantPQLayer
from eq... | 59.962406 | 147 | 0.680418 |
ee255cc669db8c6a4b11e2b11078561f883e28e7 | 758 | py | Python | mylogging.py | PavelPu/PyIOT | 8d970e2106c6befa5e076096167faea489edd17c | [
"MIT"
] | null | null | null | mylogging.py | PavelPu/PyIOT | 8d970e2106c6befa5e076096167faea489edd17c | [
"MIT"
] | null | null | null | mylogging.py | PavelPu/PyIOT | 8d970e2106c6befa5e076096167faea489edd17c | [
"MIT"
] | null | null | null | import time
class Logging:
def logStateString(self, logStateString):
self._dt = time.strftime("%d %b %Y", time.localtime(time.time()))
self._logname = '/home/pi/PyIOT/logs/json/' + self._dt +'_log.txt'
self._stateLogFile = open(self._logname, 'a')
self._stateLogFile.write(logStateS... | 34.454545 | 96 | 0.637203 |
9d6b6d7eca8819bb43dc7f73e3226a01f187c5d5 | 265 | py | Python | tests/artificial/transf_Anscombe/trend_MovingMedian/cycle_7/ar_/test_artificial_128_Anscombe_MovingMedian_7__0.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/artificial/transf_Anscombe/trend_MovingMedian/cycle_7/ar_/test_artificial_128_Anscombe_MovingMedian_7__0.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/artificial/transf_Anscombe/trend_MovingMedian/cycle_7/ar_/test_artificial_128_Anscombe_MovingMedian_7__0.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "MovingMedian", cycle_length = 7, transform = "Anscombe", sigma = 0.0, exog_count = 0, ar_order = 0); | 37.857143 | 165 | 0.732075 |
6ebfcf92d10f3189711ad2188630296080e73709 | 8,676 | py | Python | stable_baselines/plot.py | shanlior/OAL | 39c9eb24f64a27d3da09e92b6da9bf60326baabe | [
"MIT"
] | 3 | 2021-04-08T12:49:16.000Z | 2022-03-11T00:53:47.000Z | stable_baselines/plot.py | shanlior/OAL | 39c9eb24f64a27d3da09e92b6da9bf60326baabe | [
"MIT"
] | null | null | null | stable_baselines/plot.py | shanlior/OAL | 39c9eb24f64a27d3da09e92b6da9bf60326baabe | [
"MIT"
] | null | null | null | # DEPRECATED, use baselines.common.plot_util instead
on_policy = False
import os
import matplotlib.pyplot as plt
import numpy as np
import json
import seaborn as sns
sns.set()
import glob2
import argparse
import visdom;
vis = visdom.Visdom()
from PIL import Image
sns.set_style("whitegrid")
sns.set_context("paper"... | 35.412245 | 128 | 0.603389 |
9174285d3dd847cfbdbe743405f34de766a938ff | 6,746 | py | Python | tensorspark/example/spark_mnist.py | liangfengsid/tensoronspark | 76f0d7ed4a17879f6dfc1817ba8bd7c58459d803 | [
"Apache-2.0"
] | 21 | 2016-08-16T15:34:44.000Z | 2021-09-17T22:36:46.000Z | tensorspark/example/spark_mnist.py | liangfengsid/tensorspark | 76f0d7ed4a17879f6dfc1817ba8bd7c58459d803 | [
"Apache-2.0"
] | 7 | 2016-08-10T11:06:07.000Z | 2017-07-06T16:01:05.000Z | tensorspark/example/spark_mnist.py | liangfengsid/tensorspark | 76f0d7ed4a17879f6dfc1817ba8bd7c58459d803 | [
"Apache-2.0"
] | 11 | 2016-08-07T09:23:58.000Z | 2019-06-27T15:20:55.000Z | import numpy as np
import struct
import tensorflow as tf
import tensorflow.python.framework.dtypes as dtypes
import pyspark
import random
import tensorspark.core.spark_session as sps
import tensorspark.core.partitioner as par
import tensorspark.core.weight_combiner as comb
def extract_images(sc, filepath, dtype=dtype... | 34.594872 | 198 | 0.728432 |
5e0bdcd3f0d3e2770623e5b9e275a65598fe4f03 | 6,746 | py | Python | demo.py | pranaysy/ETCPy | d08c50ae5e379ee11cc9d9eb076ae4319516314c | [
"Apache-2.0"
] | 10 | 2020-07-30T12:03:24.000Z | 2022-02-14T17:45:29.000Z | demo.py | HarikrishnanNB/ETCPy | afb476629c5cd858fdc8bcbbab23d74efe18c871 | [
"Apache-2.0"
] | null | null | null | demo.py | HarikrishnanNB/ETCPy | afb476629c5cd858fdc8bcbbab23d74efe18c871 | [
"Apache-2.0"
] | 2 | 2021-02-18T07:20:34.000Z | 2021-03-15T04:10:33.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
This is a demo script for showcasing this package's functionality in brief.
@author: Pranay S. Yadav
"""
# Import call
import ETC
# ------------------------
# IO & SEQUENCE MANAGEMENT
# ------------------------
# Read data to a list
text = ETC.read(filepath="somefil... | 33.73 | 90 | 0.662763 |
bd426afbb01eb1b5695f78808d1d36acf0c1c3ca | 5,581 | py | Python | lib/app/reportdatasources/report_metrics.py | xUndero/noc | 9fb34627721149fcf7064860bd63887e38849131 | [
"BSD-3-Clause"
] | 1 | 2019-09-20T09:36:48.000Z | 2019-09-20T09:36:48.000Z | lib/app/reportdatasources/report_metrics.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | lib/app/reportdatasources/report_metrics.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# ----------------------------------------------------------------------
# ReportMetrics datasource
# ----------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# -----------------------------------------------------... | 38.756944 | 95 | 0.555456 |
9f1057eea13f4043fb2cd648eb4988fada76cdf3 | 1,976 | py | Python | wultlibs/OSInfo.py | intel/wult | 578c1714565c85afe90643b55c390b0ec4069252 | [
"Intel",
"BSD-3-Clause"
] | 4 | 2020-10-29T15:27:18.000Z | 2021-11-14T17:11:44.000Z | wultlibs/OSInfo.py | intel/wult | 578c1714565c85afe90643b55c390b0ec4069252 | [
"Intel",
"BSD-3-Clause"
] | null | null | null | wultlibs/OSInfo.py | intel/wult | 578c1714565c85afe90643b55c390b0ec4069252 | [
"Intel",
"BSD-3-Clause"
] | 2 | 2021-01-04T10:11:53.000Z | 2021-11-09T12:37:52.000Z | # -*- coding: utf-8 -*-
# vim: ts=4 sw=4 tw=100 et ai si
#
# Copyright (C) 2020-2021 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
#
# Author: Antti Laakso <antti.laakso@intel.com>
"""
This module provides API for discovering Operating System information.
"""
import contextlib
from pathlib import Path
fro... | 27.444444 | 100 | 0.623482 |
60be9ab68251ba6e1c911ba9989e77a5c988afd9 | 86 | py | Python | seg1/__init__.py | iViolinSolo/2018MathYouKnow | b7027ef874c69c751ddfeac2a0b861de8d49e5b0 | [
"Apache-2.0"
] | null | null | null | seg1/__init__.py | iViolinSolo/2018MathYouKnow | b7027ef874c69c751ddfeac2a0b861de8d49e5b0 | [
"Apache-2.0"
] | null | null | null | seg1/__init__.py | iViolinSolo/2018MathYouKnow | b7027ef874c69c751ddfeac2a0b861de8d49e5b0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Author: violinsolo
# Created on 15/09/2018 | 21.5 | 23 | 0.639535 |
833558aeb0ab08f0c9ae05882f77a23e2217bc70 | 40,667 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_10_01/aio/operations/_connection_monitors_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_10_01/aio/operations/_connection_monitors_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_10_01/aio/operations/_connection_monitors_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 52.137179 | 242 | 0.682839 |
fb3d0b42b27658b9b66b9431c5b02e7e25853942 | 4,484 | py | Python | code/mass_spec/20170401_scr_control/processing_massspec_purTscrscr1.py | RPGroup-PBoC/sortseq_belliveau | ca3b0b8092bbe6deaf1b82b2dab67b4bcca679f2 | [
"MIT"
] | 4 | 2018-05-07T00:50:08.000Z | 2021-05-10T12:40:56.000Z | code/mass_spec/20170401_scr_control/processing_massspec_purTscrscr1.py | RPGroup-PBoC/sortseq_belliveau | ca3b0b8092bbe6deaf1b82b2dab67b4bcca679f2 | [
"MIT"
] | null | null | null | code/mass_spec/20170401_scr_control/processing_massspec_purTscrscr1.py | RPGroup-PBoC/sortseq_belliveau | ca3b0b8092bbe6deaf1b82b2dab67b4bcca679f2 | [
"MIT"
] | 1 | 2019-07-29T01:40:40.000Z | 2019-07-29T01:40:40.000Z | # Purpose of script:
# For each DNA affinity purification dataset, this script will extract the
# relavant information from the 'proteingroups.txt' output after running the
# mass spec .raw data on MaxQuant (version 1.5.XX). It will also add in
# the additional experimental details (DNA sequence used, strain used for l... | 43.960784 | 90 | 0.632025 |
d9a736cccc603203308a88adaf2e64437b273b51 | 685 | py | Python | 1-Python-Programming-Basics (Sep 2020)/Course-Exercises-and-Exams/02_Conditional-Statements/00.Book-Exercise-3.2-02-Pipes-in-Pool.py | karolinanikolova/SoftUni-Software-Engineering | 7891924956598b11a1e30e2c220457c85c40f064 | [
"MIT"
] | null | null | null | 1-Python-Programming-Basics (Sep 2020)/Course-Exercises-and-Exams/02_Conditional-Statements/00.Book-Exercise-3.2-02-Pipes-in-Pool.py | karolinanikolova/SoftUni-Software-Engineering | 7891924956598b11a1e30e2c220457c85c40f064 | [
"MIT"
] | null | null | null | 1-Python-Programming-Basics (Sep 2020)/Course-Exercises-and-Exams/02_Conditional-Statements/00.Book-Exercise-3.2-02-Pipes-in-Pool.py | karolinanikolova/SoftUni-Software-Engineering | 7891924956598b11a1e30e2c220457c85c40f064 | [
"MIT"
] | null | null | null | # тръби в басейн
# Басейн с обем V има две тръби, от които се пълни. Всяка тръба има определен дебит (литрите вода, минаващи през една тръба за един час).
# Работникът пуска тръбите едновременно и излиза за N часа.
# Напишете програма, която изкарва състоянието на басейна, в момента, когато работникът се върне.
from m... | 36.052632 | 148 | 0.642336 |
1b2846845c7c4b93c77fb5ba51da3602fff5f20e | 9,437 | py | Python | pymc/distributions/logprob.py | t-triobox/pymc3 | 8b063f9c3b344753acdf91416cf2bb3c4533f80a | [
"Apache-2.0"
] | null | null | null | pymc/distributions/logprob.py | t-triobox/pymc3 | 8b063f9c3b344753acdf91416cf2bb3c4533f80a | [
"Apache-2.0"
] | null | null | null | pymc/distributions/logprob.py | t-triobox/pymc3 | 8b063f9c3b344753acdf91416cf2bb3c4533f80a | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The PyMC Developers
#
# 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 ag... | 36.577519 | 100 | 0.641623 |
b1c595f888b3ae86072e5c86f6f2759230b16600 | 3,748 | py | Python | musico/settings.py | NimaAram1/music-webApi | 0abe2761e4359d5aa49a21d832aad25cb08f3982 | [
"BSD-3-Clause"
] | null | null | null | musico/settings.py | NimaAram1/music-webApi | 0abe2761e4359d5aa49a21d832aad25cb08f3982 | [
"BSD-3-Clause"
] | null | null | null | musico/settings.py | NimaAram1/music-webApi | 0abe2761e4359d5aa49a21d832aad25cb08f3982 | [
"BSD-3-Clause"
] | null | null | null | """
Django settings for musico project.
Generated by 'django-admin startproject' using Django 3.0.6.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os
# ... | 25.848276 | 91 | 0.690235 |
80c2aab4da2e59f2fafbb7024d0e2fdc922e8138 | 5,356 | py | Python | bokeh/tests/test_embed.py | timelyportfolio/bokeh | a976a85535cf137c6238ce9e90b41ab14ae8ce22 | [
"BSD-3-Clause"
] | 1 | 2021-11-07T18:55:59.000Z | 2021-11-07T18:55:59.000Z | bokeh/tests/test_embed.py | timelyportfolio/bokeh | a976a85535cf137c6238ce9e90b41ab14ae8ce22 | [
"BSD-3-Clause"
] | null | null | null | bokeh/tests/test_embed.py | timelyportfolio/bokeh | a976a85535cf137c6238ce9e90b41ab14ae8ce22 | [
"BSD-3-Clause"
] | 1 | 2021-08-01T08:38:53.000Z | 2021-08-01T08:38:53.000Z | from __future__ import absolute_import
import unittest
import bs4
import bokeh.embed as embed
from bokeh.resources import CDN, INLINE, Resources
from bokeh.plotting import figure
from bokeh.session import Session
_embed_test_plot = None
def setUpModule():
global _embed_test_plot
_embed_test_plot = figure()... | 34.333333 | 102 | 0.633495 |
76c841a55efce7f6361d93378a4ffcc1ef76e8fe | 696 | py | Python | notebook/pandas_index_select_query.py | vhn0912/python-snippets | 80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038 | [
"MIT"
] | 174 | 2018-05-30T21:14:50.000Z | 2022-03-25T07:59:37.000Z | notebook/pandas_index_select_query.py | vhn0912/python-snippets | 80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038 | [
"MIT"
] | 5 | 2019-08-10T03:22:02.000Z | 2021-07-12T20:31:17.000Z | notebook/pandas_index_select_query.py | vhn0912/python-snippets | 80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038 | [
"MIT"
] | 53 | 2018-04-27T05:26:35.000Z | 2022-03-25T07:59:37.000Z | import pandas as pd
df = pd.read_csv('data/src/sample_pandas_normal.csv', index_col=0)
print(df)
# age state point
# name
# Alice 24 NY 64
# Bob 42 CA 92
# Charlie 18 CA 70
# Dave 68 TX 70
# Ellen 24 CA 88
# Frank 30 NY 5... | 26.769231 | 66 | 0.475575 |
76eef53a002c42b231fd9ac14eca2287041c9b82 | 2,343 | py | Python | project-euler/problem-1/problem-1.py | fugitiveinkc/lessons-with-tim | f057856936cfd235bac63b158a109f80ce90b3b6 | [
"CC0-1.0"
] | null | null | null | project-euler/problem-1/problem-1.py | fugitiveinkc/lessons-with-tim | f057856936cfd235bac63b158a109f80ce90b3b6 | [
"CC0-1.0"
] | null | null | null | project-euler/problem-1/problem-1.py | fugitiveinkc/lessons-with-tim | f057856936cfd235bac63b158a109f80ce90b3b6 | [
"CC0-1.0"
] | null | null | null | """
Description: If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 of 5 below 1000
"""
#Method 1: First thoughts -- Go through each value below 1000, see if they are a multiple of 3 or 5, add to list... | 44.207547 | 283 | 0.734102 |
a343add110644e57289fe574ce1e4ae48bfb27a2 | 3,367 | py | Python | ambassador/ambassador/ir/irtracing.py | Pluies/ambassador | 03ed4d8021df9da5634dd5bc1203d5e0fbe802bd | [
"Apache-2.0"
] | null | null | null | ambassador/ambassador/ir/irtracing.py | Pluies/ambassador | 03ed4d8021df9da5634dd5bc1203d5e0fbe802bd | [
"Apache-2.0"
] | null | null | null | ambassador/ambassador/ir/irtracing.py | Pluies/ambassador | 03ed4d8021df9da5634dd5bc1203d5e0fbe802bd | [
"Apache-2.0"
] | 1 | 2020-01-11T00:05:47.000Z | 2020-01-11T00:05:47.000Z | from typing import Optional, TYPE_CHECKING
from ..config import Config
from ..utils import RichStatus
from .irresource import IRResource
from .ircluster import IRCluster
if TYPE_CHECKING:
from .ir import IR
class IRTracing (IRResource):
cluster: Optional[IRCluster]
service: str
driver: str
driv... | 30.609091 | 114 | 0.588358 |
c67c14a3c020d44f5b4dc9b6a8b703bf30b48812 | 4,314 | py | Python | lavalink/node.py | Taarek/Lavalink.py | b306fc72aecb8c4ebf4c196606ad1d641d742e29 | [
"MIT"
] | null | null | null | lavalink/node.py | Taarek/Lavalink.py | b306fc72aecb8c4ebf4c196606ad1d641d742e29 | [
"MIT"
] | null | null | null | lavalink/node.py | Taarek/Lavalink.py | b306fc72aecb8c4ebf4c196606ad1d641d742e29 | [
"MIT"
] | null | null | null | from .events import Event
from .websocket import WebSocket
class Node:
"""
Represents a Node connection with Lavalink.
Note
----
Nodes are **NOT** mean't to be added manually, but rather with :func:`Client.add_node`. Doing this can cause
invalid cache and much more problems.
Attributes
... | 30.380282 | 112 | 0.596662 |
cb2190e069522d1f9e066f39639804cb3b0100fb | 111,442 | py | Python | keras/callbacks.py | b-little/keras | f1e9c76675981ee6683f54a3ce569212d551d12d | [
"Apache-2.0"
] | 37,222 | 2017-12-13T00:52:55.000Z | 2022-03-31T22:34:35.000Z | keras/callbacks.py | amirsadafi/keras | f1e9c76675981ee6683f54a3ce569212d551d12d | [
"Apache-2.0"
] | 7,624 | 2017-12-13T01:03:40.000Z | 2022-03-31T23:57:24.000Z | keras/callbacks.py | amirsadafi/keras | f1e9c76675981ee6683f54a3ce569212d551d12d | [
"Apache-2.0"
] | 14,914 | 2017-12-13T02:30:46.000Z | 2022-03-30T14:49:16.000Z | # Copyright 2015 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... | 37.957084 | 100 | 0.678093 |
aad07e9bd944982a213544fbd049e4a26820927e | 7,236 | py | Python | desert/desert.py | inconvergent/desert | 377e8d48ca10a6733696943b6b933d7f82979d77 | [
"MIT"
] | 65 | 2017-10-27T20:08:16.000Z | 2022-01-09T10:04:34.000Z | desert/desert.py | inconvergent/desert | 377e8d48ca10a6733696943b6b933d7f82979d77 | [
"MIT"
] | null | null | null | desert/desert.py | inconvergent/desert | 377e8d48ca10a6733696943b6b933d7f82979d77 | [
"MIT"
] | 6 | 2017-10-28T21:15:21.000Z | 2020-01-21T18:54:35.000Z | # -*- coding: utf-8 -*-
from os import getenv
from time import time
import matplotlib.pyplot as plt
import pkg_resources
from PIL import Image
from numpy import arange
from numpy import argsort
from numpy import column_stack
from numpy import concatenate
from numpy import cumsum
from numpy import vstack
from numpy... | 24.612245 | 77 | 0.59508 |
82abc4280d46da87fc0be77cbd7cac94ff8bc569 | 2,365 | py | Python | test/active_learning_strategies/test_bald.py | ansunsujoe/distil | cf6cae2b88ef129d09c159aae0569978190e9f98 | [
"MIT"
] | 83 | 2021-01-06T06:50:30.000Z | 2022-03-31T05:16:32.000Z | test/active_learning_strategies/test_bald.py | ansunsujoe/distil | cf6cae2b88ef129d09c159aae0569978190e9f98 | [
"MIT"
] | 30 | 2021-02-27T06:09:47.000Z | 2021-12-23T11:03:36.000Z | test/active_learning_strategies/test_bald.py | ansunsujoe/distil | cf6cae2b88ef129d09c159aae0569978190e9f98 | [
"MIT"
] | 13 | 2021-03-05T18:26:58.000Z | 2022-03-12T01:53:17.000Z | from distil.utils.models.simple_net import TwoLayerNet
from distil.active_learning_strategies.bayesian_active_learning_disagreement_dropout import BALDDropout
from test.utils import MyLabeledDataset, MyUnlabeledDataset
import unittest
import torch
class TestBALD(unittest.TestCase):
def setUp(self):
... | 41.491228 | 112 | 0.678647 |
147e48d49153cfa1827238c4188e37320b1f513b | 1,200 | py | Python | neutron/db/models/tag.py | 2020human/neutron | 1e2cfe8c06fcc2df52daa77b2b767ed6ffc2b19f | [
"Apache-2.0"
] | null | null | null | neutron/db/models/tag.py | 2020human/neutron | 1e2cfe8c06fcc2df52daa77b2b767ed6ffc2b19f | [
"Apache-2.0"
] | null | null | null | neutron/db/models/tag.py | 2020human/neutron | 1e2cfe8c06fcc2df52daa77b2b767ed6ffc2b19f | [
"Apache-2.0"
] | null | null | null | #
# 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
# ... | 37.5 | 78 | 0.720833 |
99d5b06a50f08c1dde251fe9f1a421a1e7a34428 | 3,951 | py | Python | mitemp-mqtt.py | yolkhovyy/mitemp | d697da783dda64458d4b7d83e0f8e8b5c1fb6176 | [
"MIT"
] | null | null | null | mitemp-mqtt.py | yolkhovyy/mitemp | d697da783dda64458d4b7d83e0f8e8b5c1fb6176 | [
"MIT"
] | null | null | null | mitemp-mqtt.py | yolkhovyy/mitemp | d697da783dda64458d4b7d83e0f8e8b5c1fb6176 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import re
import getmac
import paho.mqtt.publish as publish
from btlewrap import BluepyBackend, GatttoolBackend, PygattBackend
from mitemp_bt.mitemp_bt_poller import MiTempBtPoller, MI_TEMPERATURE, MI_HUMIDITY, MI_BATTERY
MAC_ADDRESS = r'(?i)[0-9A-F]{2}:[0-9A-F]{2}:[0-9A-F]{2}:[... | 37.990385 | 139 | 0.628702 |
8b887e933aec573f427f7c4b88e30e189f1c913d | 1,839 | py | Python | app/admin/views.py | SuYehTarn/CS651-Group8-Feedback_Forum | d1163442aea81214c4dfa8de1d353ec719bfa7ab | [
"MIT"
] | null | null | null | app/admin/views.py | SuYehTarn/CS651-Group8-Feedback_Forum | d1163442aea81214c4dfa8de1d353ec719bfa7ab | [
"MIT"
] | null | null | null | app/admin/views.py | SuYehTarn/CS651-Group8-Feedback_Forum | d1163442aea81214c4dfa8de1d353ec719bfa7ab | [
"MIT"
] | null | null | null | """Module of back stage views
"""
from flask import render_template, flash, redirect, url_for
from flask_login import login_required, current_user
from app import db
from app.admin.form import ReviewFeedbackForm
from app.models.feedback import Feedback
from app.models.review_status import ReviewStatus
from app.admin... | 29.66129 | 61 | 0.693312 |
9b942bce59938b1407110e307c29b89284df54e6 | 7,110 | py | Python | sdk/python/pulumi_azure/storage/container.py | kenny-wealth/pulumi-azure | e57e3a81f95bf622e7429c53f0bff93e33372aa1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/storage/container.py | kenny-wealth/pulumi-azure | e57e3a81f95bf622e7429c53f0bff93e33372aa1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/storage/container.py | kenny-wealth/pulumi-azure | e57e3a81f95bf622e7429c53f0bff93e33372aa1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class Contai... | 54.692308 | 217 | 0.704219 |
8827d6eef34cbe21296d6de552dd76275367a847 | 3,304 | py | Python | confidnet/models/segnet_oodconfid.py | luoyan407/predict_trustworthiness_smallscale | b7e1e2a68b0aee9b484228d1b5686f7252919e97 | [
"Apache-2.0"
] | 149 | 2019-10-01T14:04:05.000Z | 2022-03-24T12:25:15.000Z | confidnet/models/segnet_oodconfid.py | luoyan407/predict_trustworthiness_smallscale | b7e1e2a68b0aee9b484228d1b5686f7252919e97 | [
"Apache-2.0"
] | 10 | 2019-12-12T09:45:50.000Z | 2021-12-27T04:45:22.000Z | confidnet/models/segnet_oodconfid.py | luoyan407/predict_trustworthiness_smallscale | b7e1e2a68b0aee9b484228d1b5686f7252919e97 | [
"Apache-2.0"
] | 30 | 2019-12-02T16:25:22.000Z | 2022-02-16T10:48:47.000Z | import torch.nn as nn
import torch.nn.functional as F
from confidnet.models.model import AbstractModel
from confidnet.models.segnet import segnetDown2, segnetDown3, segnetUp2, segnetUp3
class SegNetOODConfid(AbstractModel):
def __init__(self, config_args, device):
super().__init__(config_args, device)
... | 37.545455 | 82 | 0.605327 |
42390a2b3d3c39bff8f25a323fef03d939a4ca89 | 8,286 | py | Python | tests/util/keyring.py | MintNetwork/mint-blockchain | 65ec05a015a07664ed25f83efa736065a17f7d7a | [
"Apache-2.0"
] | 12 | 2021-08-18T20:53:31.000Z | 2022-03-15T21:45:13.000Z | tests/util/keyring.py | MintNetwork/mint-blockchain | 65ec05a015a07664ed25f83efa736065a17f7d7a | [
"Apache-2.0"
] | 34 | 2021-08-18T19:12:11.000Z | 2022-01-06T17:15:34.000Z | tests/util/keyring.py | MintNetwork/mint-blockchain | 65ec05a015a07664ed25f83efa736065a17f7d7a | [
"Apache-2.0"
] | 7 | 2021-08-18T20:53:34.000Z | 2022-03-15T08:37:40.000Z | import os
import shutil
import tempfile
from mint.util.file_keyring import FileKeyring
from mint.util.keychain import Keychain, default_keychain_service, default_keychain_user, get_private_key_user
from mint.util.keyring_wrapper import KeyringWrapper
from functools import wraps
from keyring.util import platform_
from ... | 39.645933 | 119 | 0.714699 |
34d6cde141b42bcf0b52ead8387d1ae84536a132 | 3,887 | py | Python | cartoframes/viz/popup.py | manmorjim/cartoframes | 4172e3dcdaedf207c10772a6dffe4f43b1993230 | [
"BSD-3-Clause"
] | null | null | null | cartoframes/viz/popup.py | manmorjim/cartoframes | 4172e3dcdaedf207c10772a6dffe4f43b1993230 | [
"BSD-3-Clause"
] | null | null | null | cartoframes/viz/popup.py | manmorjim/cartoframes | 4172e3dcdaedf207c10772a6dffe4f43b1993230 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from ..utils.utils import gen_variable_name
class Popup(object):
"""Popup
Args:
data (dict): The popup definition for a layer. It contains the information
to show a popup on 'click' and 'hover' events with the attributes provided
in the defi... | 29.44697 | 84 | 0.446102 |
ff0ef8d7d6f4502159fbd256a02b261b78739df0 | 5,534 | py | Python | Python3Code/Assignment_2/Assignment_2_1.py | kim66003/ML4QS_group25 | cd7f838e95f1583701892175670d7d0c8da0e1be | [
"MIT"
] | null | null | null | Python3Code/Assignment_2/Assignment_2_1.py | kim66003/ML4QS_group25 | cd7f838e95f1583701892175670d7d0c8da0e1be | [
"MIT"
] | null | null | null | Python3Code/Assignment_2/Assignment_2_1.py | kim66003/ML4QS_group25 | cd7f838e95f1583701892175670d7d0c8da0e1be | [
"MIT"
] | null | null | null | from Chapter5.DistanceMetrics import InstanceDistanceMetrics
from Chapter5.DistanceMetrics import PersonDistanceMetricsNoOrdering
from Chapter5.DistanceMetrics import PersonDistanceMetricsOrdering
from Chapter5.Clustering import NonHierarchicalClustering
from Chapter5.Clustering import HierarchicalClustering
import uti... | 36.169935 | 173 | 0.743224 |
24f7ec73130adc5f4541b66270c38b13cc10c3d0 | 154 | py | Python | Worker/WebCheck/wafw00f/plugins/nevisproxy.py | p4sschen/Toy4Recon | e4fa6a512b238cca6d6d072ed5c66899de60bb06 | [
"MIT"
] | 1 | 2020-12-16T13:14:05.000Z | 2020-12-16T13:14:05.000Z | Worker/WebCheck/wafw00f/plugins/nevisproxy.py | p4sschen/Toy4Recon | e4fa6a512b238cca6d6d072ed5c66899de60bb06 | [
"MIT"
] | null | null | null | Worker/WebCheck/wafw00f/plugins/nevisproxy.py | p4sschen/Toy4Recon | e4fa6a512b238cca6d6d072ed5c66899de60bb06 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
NAME = 'NevisProxy (AdNovum)'
def is_waf(self):
if self.matchcookie(r'^Navajo(.*)?$'):
return True
return False
| 14 | 42 | 0.61039 |
8eeaffc04e5480830d535362850c1357251541ea | 16,160 | py | Python | plugins/modules/oci_compute_instance_agent_instance_agent_command_facts.py | slmjy/oci-ansible-collection | 349c91e2868bf4706a6e3d6fb3b47fc622bfe11b | [
"Apache-2.0"
] | 108 | 2020-05-19T20:46:10.000Z | 2022-03-25T14:10:01.000Z | plugins/modules/oci_compute_instance_agent_instance_agent_command_facts.py | slmjy/oci-ansible-collection | 349c91e2868bf4706a6e3d6fb3b47fc622bfe11b | [
"Apache-2.0"
] | 90 | 2020-06-14T22:07:11.000Z | 2022-03-07T05:40:29.000Z | plugins/modules/oci_compute_instance_agent_instance_agent_command_facts.py | slmjy/oci-ansible-collection | 349c91e2868bf4706a6e3d6fb3b47fc622bfe11b | [
"Apache-2.0"
] | 42 | 2020-08-30T23:09:12.000Z | 2022-03-25T16:58:01.000Z | #!/usr/bin/python
# Copyright (c) 2020, 2021 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... | 41.119593 | 144 | 0.559158 |
b789b2562a9fa2695275f81df3fda6ca47cd7ffb | 778 | py | Python | scripts/slave/recipes/ndk/ndk_buildbot.py | bopopescu/chromium-build | f8e42c70146c1b668421ee6358dc550a955770a3 | [
"BSD-3-Clause"
] | null | null | null | scripts/slave/recipes/ndk/ndk_buildbot.py | bopopescu/chromium-build | f8e42c70146c1b668421ee6358dc550a955770a3 | [
"BSD-3-Clause"
] | null | null | null | scripts/slave/recipes/ndk/ndk_buildbot.py | bopopescu/chromium-build | f8e42c70146c1b668421ee6358dc550a955770a3 | [
"BSD-3-Clause"
] | 1 | 2020-07-22T09:16:32.000Z | 2020-07-22T09:16:32.000Z | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
DEPS = [
'chromite',
'ndk',
'recipe_engine/properties',
]
# Map master name to 'chromite' configuration name.
_MASTER_CONFIG_MAP = {
'client.... | 21.611111 | 72 | 0.674807 |
282f7d9b5d5f6efea9271f5faeaac1ecbf5f90a8 | 1,023 | py | Python | sd_utils/logger.py | stephend017/sd_utils | 4c4a6da04fb244ada95c4c40dacf76c6b499e298 | [
"MIT"
] | null | null | null | sd_utils/logger.py | stephend017/sd_utils | 4c4a6da04fb244ada95c4c40dacf76c6b499e298 | [
"MIT"
] | 11 | 2021-03-14T23:53:58.000Z | 2021-07-17T06:12:16.000Z | sd_utils/logger.py | stephend017/sd_utils | 4c4a6da04fb244ada95c4c40dacf76c6b499e298 | [
"MIT"
] | null | null | null | import logging
from logging.handlers import RotatingFileHandler
def create_logger(path: str, level: int = logging.INFO) -> logging.Logger:
"""
Creates a logger for a given file path
Note: `path` should be `__file__` in most cases
Args:
path (str): the path of the file (common use is `__file__... | 26.921053 | 92 | 0.633431 |
a7a6d2cf1b73eb462360371804003b3e7eae5d87 | 1,099 | py | Python | networking/socket_echo_server_uds.py | scotthuang1989/Python-3-Module-of-the-Week | 5f45f4602f084c899924ebc9c6b0155a6dc76f56 | [
"Apache-2.0"
] | 2 | 2018-09-17T05:52:12.000Z | 2021-11-09T17:19:29.000Z | 04_Unix_Domain_Sockets/01_socket_echo_server_uds.py | lanzhiwang/socket-example | b3bfb17d8a3e35ac54b60e434ddd6eb6615303ec | [
"BSD-3-Clause"
] | null | null | null | 04_Unix_Domain_Sockets/01_socket_echo_server_uds.py | lanzhiwang/socket-example | b3bfb17d8a3e35ac54b60e434ddd6eb6615303ec | [
"BSD-3-Clause"
] | 2 | 2017-10-18T09:01:27.000Z | 2018-08-22T00:41:22.000Z | import socket
import sys
import os
server_address = './uds_socket'
# Make sure the socket does not already exist
try:
os.unlink(server_address)
except OSError:
if os.path.exists(server_address):
raise
# Create a UDS socket
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
# Bind the socket to... | 24.977273 | 60 | 0.637853 |
896b01b9f62c29c0933b7abd901942cdf1d842a3 | 2,713 | py | Python | sydent/config/crypto.py | acoby/sydent | efad8295c4457c44665f54169c5e5077cf81e474 | [
"Apache-2.0"
] | null | null | null | sydent/config/crypto.py | acoby/sydent | efad8295c4457c44665f54169c5e5077cf81e474 | [
"Apache-2.0"
] | null | null | null | sydent/config/crypto.py | acoby/sydent | efad8295c4457c44665f54169c5e5077cf81e474 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The Matrix.org Foundation C.I.C.
#
# 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... | 35.233766 | 81 | 0.644674 |
ba9308f57b3cbc5465288326ff5d2a94d328b2cc | 322 | py | Python | propane/logging.py | tylerbutler/propane | 6c404285ab8d78865b7175a5c8adf8fae12d6be5 | [
"MIT"
] | 1 | 2017-12-21T18:16:20.000Z | 2017-12-21T18:16:20.000Z | propane/logging.py | tylerbutler/propane | 6c404285ab8d78865b7175a5c8adf8fae12d6be5 | [
"MIT"
] | null | null | null | propane/logging.py | tylerbutler/propane | 6c404285ab8d78865b7175a5c8adf8fae12d6be5 | [
"MIT"
] | null | null | null | # coding=utf-8
from __future__ import absolute_import, print_function
import pprint
__author__ = 'Tyler Butler <tyler@tylerbutler.com>'
pprinter = pprint.PrettyPrinter()
# noinspection PyBroadException
def log_object(obj):
try:
return pprinter.pformat(obj)
except Exception:
return str(obj... | 16.947368 | 54 | 0.732919 |
a9e637c797cde5fcd33c51b7abef8c287a51b5aa | 785 | py | Python | gpytorch/utils/__init__.py | lrast/gpytorch | 2e0bbc9f59e4b4b54780c3e55db784c3d2c9a5bf | [
"MIT"
] | 2 | 2021-01-30T18:24:18.000Z | 2021-02-16T21:54:11.000Z | gpytorch/utils/__init__.py | lrast/gpytorch | 2e0bbc9f59e4b4b54780c3e55db784c3d2c9a5bf | [
"MIT"
] | 1 | 2021-02-24T14:01:43.000Z | 2021-02-24T14:01:43.000Z | gpytorch/utils/__init__.py | lrast/gpytorch | 2e0bbc9f59e4b4b54780c3e55db784c3d2c9a5bf | [
"MIT"
] | 1 | 2021-03-15T12:32:24.000Z | 2021-03-15T12:32:24.000Z | #!/usr/bin/env python3
from . import broadcasting, cholesky, grid, interpolation, lanczos, pivoted_cholesky, quadrature, sparse, warnings
from .contour_integral_quad import contour_integral_quad
from .linear_cg import linear_cg
from .memoize import cached
from .minres import minres
from .stochastic_lq import Stochasti... | 19.625 | 114 | 0.630573 |
ac93fcc7a0e646db75c9fcd0dfc00ce5d702a2c0 | 4,372 | py | Python | Radioactive Mutate Vampire Bunnies.py | Lyubomir-Dakov/Python-Advanced | 3b3b7181cc2bafc6f60329d6e42873d0f78b972f | [
"MIT"
] | null | null | null | Radioactive Mutate Vampire Bunnies.py | Lyubomir-Dakov/Python-Advanced | 3b3b7181cc2bafc6f60329d6e42873d0f78b972f | [
"MIT"
] | null | null | null | Radioactive Mutate Vampire Bunnies.py | Lyubomir-Dakov/Python-Advanced | 3b3b7181cc2bafc6f60329d6e42873d0f78b972f | [
"MIT"
] | null | null | null | from collections import deque
# import sys
# from io import StringIO
#
# input_1 = """5 6
# .....P
# ......
# ...B..
# ......
# ......
# ULDDDR
# """
#
# input_2 = """4 5
# .....
# .....
# .B...
# ...P.
# LLLLLLLL
# """
#
# input_3 = """5 8
# .......B
# ...B....
# ....B..B
# ........
# ..P..... | 28.763158 | 106 | 0.572964 |
0cf26b2040ea1720881ac31748d6f84cc078c2bc | 12,036 | py | Python | code/python/BondsAPIforDigitalPortals/v2/fds/sdk/BondsAPIforDigitalPortals/model/inline_response2003_instrument_issuer.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 6 | 2022-02-07T16:34:18.000Z | 2022-03-30T08:04:57.000Z | code/python/BondsAPIforDigitalPortals/v2/fds/sdk/BondsAPIforDigitalPortals/model/inline_response2003_instrument_issuer.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 2 | 2022-02-07T05:25:57.000Z | 2022-03-07T14:18:04.000Z | code/python/BondsAPIforDigitalPortals/v2/fds/sdk/BondsAPIforDigitalPortals/model/inline_response2003_instrument_issuer.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | null | null | null | """
Prime Developer Trial
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from fds.sdk.B... | 44.577778 | 143 | 0.581422 |
2a58aeff18f10b1d57856488d6d5b7bbb45c56e3 | 881 | py | Python | src/optims/sgd.py | ThomasRanvier/modular_nets | fa572a1bacdf5801156390ff2ef8754cca027fb9 | [
"MIT"
] | null | null | null | src/optims/sgd.py | ThomasRanvier/modular_nets | fa572a1bacdf5801156390ff2ef8754cca027fb9 | [
"MIT"
] | null | null | null | src/optims/sgd.py | ThomasRanvier/modular_nets | fa572a1bacdf5801156390ff2ef8754cca027fb9 | [
"MIT"
] | null | null | null | import numpy as np
class Sgd():
"""
Class that implements a vanilla Stochastic Gradient Descent layer.
This is the simplest form of update, it changes the parameters along the
negative gradient direction.
"""
def __init__(self, learning_rate = 1e-2):
"""
Instantiates a Sgd opt... | 29.366667 | 77 | 0.601589 |
4c5326cdce0b6ab7fff9790ca28cfd9cc5b4f906 | 11,235 | py | Python | clients/hydra/python/ory_hydra_client/model/health_not_ready_status.py | ory/sdk-generator | 958314d130922ad6f20f439b5230141a832231a5 | [
"Apache-2.0"
] | null | null | null | clients/hydra/python/ory_hydra_client/model/health_not_ready_status.py | ory/sdk-generator | 958314d130922ad6f20f439b5230141a832231a5 | [
"Apache-2.0"
] | null | null | null | clients/hydra/python/ory_hydra_client/model/health_not_ready_status.py | ory/sdk-generator | 958314d130922ad6f20f439b5230141a832231a5 | [
"Apache-2.0"
] | null | null | null | """
ORY Hydra
Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501
The version of the OpenAPI document: v1.11.0
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from ory_hydra_client.model... | 43.886719 | 128 | 0.57223 |
de1d0b4d3b925629af91776f6b011d13024ba888 | 2,027 | py | Python | py/bitbox02/bitbox02/__init__.py | jstrnbrg/bitbox02-firmware | 173a1fe340daf1a839b888286a654fb75745102d | [
"Apache-2.0"
] | null | null | null | py/bitbox02/bitbox02/__init__.py | jstrnbrg/bitbox02-firmware | 173a1fe340daf1a839b888286a654fb75745102d | [
"Apache-2.0"
] | null | null | null | py/bitbox02/bitbox02/__init__.py | jstrnbrg/bitbox02-firmware | 173a1fe340daf1a839b888286a654fb75745102d | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Shift Cryptosecurity AG
#
# 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... | 27.767123 | 79 | 0.72077 |
73f21bca87fcfd33069a800562d2d3a64a33a840 | 12,888 | py | Python | resources/usr/lib/python2.7/dist-packages/numpy/_import_tools.py | edawson/parliament2 | 2632aa3484ef64c9539c4885026b705b737f6d1e | [
"Apache-2.0"
] | null | null | null | resources/usr/lib/python2.7/dist-packages/numpy/_import_tools.py | edawson/parliament2 | 2632aa3484ef64c9539c4885026b705b737f6d1e | [
"Apache-2.0"
] | null | null | null | resources/usr/lib/python2.7/dist-packages/numpy/_import_tools.py | edawson/parliament2 | 2632aa3484ef64c9539c4885026b705b737f6d1e | [
"Apache-2.0"
] | 1 | 2020-05-28T23:01:44.000Z | 2020-05-28T23:01:44.000Z | import os
import sys
__all__ = ['PackageLoader']
class PackageLoader:
def __init__(self, verbose=False, infunc=False):
""" Manages loading packages.
"""
if infunc:
_level = 2
else:
_level = 1
self.parent_frame = frame = sys._getframe(_level)
... | 37.14121 | 87 | 0.523898 |
e617e507c9cd681433bac54ff72d33fdafb11a0b | 1,094 | py | Python | leaderboard/migrations/0009_auto_20200618_2345.py | AppraiseDev/OCELoT | 9237c1eb1d9feebb1a51966b8c1ef82b381b4b1e | [
"BSD-3-Clause"
] | 6 | 2020-06-25T05:00:45.000Z | 2022-03-30T09:45:11.000Z | leaderboard/migrations/0009_auto_20200618_2345.py | AppraiseDev/OCELoT | 9237c1eb1d9feebb1a51966b8c1ef82b381b4b1e | [
"BSD-3-Clause"
] | 42 | 2020-06-24T08:48:48.000Z | 2021-09-08T14:36:11.000Z | leaderboard/migrations/0009_auto_20200618_2345.py | AppraiseDev/OCELoT | 9237c1eb1d9feebb1a51966b8c1ef82b381b4b1e | [
"BSD-3-Clause"
] | 3 | 2020-05-25T20:34:08.000Z | 2021-03-21T05:10:11.000Z | # pylint: disable=invalid-name,missing-docstring
# Generated by Django 2.2.1 on 2020-06-19 06:45
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [('leaderboard', '0008_team')]
operations = [
migrations.AddField(
... | 28.789474 | 66 | 0.519196 |
36dbceef459ad86842897f3a8430920bb313884f | 79 | py | Python | 00-simple.py | mtholder/git-branch-tutorial-data | b17606dcb289afe77b1222c16d83290e6b5e5aa5 | [
"BSD-2-Clause"
] | null | null | null | 00-simple.py | mtholder/git-branch-tutorial-data | b17606dcb289afe77b1222c16d83290e6b5e5aa5 | [
"BSD-2-Clause"
] | null | null | null | 00-simple.py | mtholder/git-branch-tutorial-data | b17606dcb289afe77b1222c16d83290e6b5e5aa5 | [
"BSD-2-Clause"
] | null | null | null | #!/bin/env python
from __future__ import print_function
print('Hello World!')
| 15.8 | 37 | 0.772152 |
492dc23a253e0af5c8799a4c1f2c5d533ae8acf5 | 2,745 | py | Python | ooi_instrument_agent/lock.py | oceanobservatories/ooi-instrument-agent | e22e4300079468bb99c543cbbf1cb5c8b4a96897 | [
"Apache-2.0"
] | null | null | null | ooi_instrument_agent/lock.py | oceanobservatories/ooi-instrument-agent | e22e4300079468bb99c543cbbf1cb5c8b4a96897 | [
"Apache-2.0"
] | null | null | null | ooi_instrument_agent/lock.py | oceanobservatories/ooi-instrument-agent | e22e4300079468bb99c543cbbf1cb5c8b4a96897 | [
"Apache-2.0"
] | null | null | null | from collections import MutableMapping
from logging import getLogger
log = getLogger(__name__)
class Locked(Exception):
status_code = 409
def __init__(self, message):
Exception.__init__(self)
self.message = message
class LockManager(MutableMapping):
"""
Class to wrap consul KV acce... | 29.202128 | 93 | 0.612022 |
a408dec73fecffc96fc04bc9119d17a8daefaf82 | 2,320 | py | Python | Input.py | Zazmuz/cordinate-jumper | 2a9eb32fb13188eb22a8457654212bd9e1c1633a | [
"MIT"
] | null | null | null | Input.py | Zazmuz/cordinate-jumper | 2a9eb32fb13188eb22a8457654212bd9e1c1633a | [
"MIT"
] | null | null | null | Input.py | Zazmuz/cordinate-jumper | 2a9eb32fb13188eb22a8457654212bd9e1c1633a | [
"MIT"
] | null | null | null | from pygame_engine import *
from Function import Function, PolynomialFuntion
def multiply(arr):
res = 1
for a in arr: res *= a
return res
class Input():
def __init__(self):
self.width = 500
self.height = 300
self.input_string = "y = "
self.function = None... | 29.74359 | 100 | 0.495259 |
e7c2a439b3d1174fdef9a46ab3bc291f5e082b35 | 1,333 | py | Python | application_materials/Project2/pca_mnist2.py | Xiangzhoujushi/Projects | 492236608888e8f0adadcd7ad708c90da1ab74d5 | [
"MIT"
] | null | null | null | application_materials/Project2/pca_mnist2.py | Xiangzhoujushi/Projects | 492236608888e8f0adadcd7ad708c90da1ab74d5 | [
"MIT"
] | null | null | null | application_materials/Project2/pca_mnist2.py | Xiangzhoujushi/Projects | 492236608888e8f0adadcd7ad708c90da1ab74d5 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors
from sklearn.decomposition import PCA
import pandas as pd
# Step 1: load MNIST data (the smaller version)
X = np.load('./mnist_X.npy')
y = np.load('./mnist_y.npy')
# Step 2: layout the data with t-SNE
X_PCA = PCA(n_components=1).fit_transform... | 32.512195 | 92 | 0.666167 |
46a81097c71b64a998f41ae86359abdfe09115d3 | 1,936 | py | Python | pgoapi/protos/pogoprotos/networking/requests/messages/fetch_all_news_message_pb2.py | linherest/pgoapi | e3bdce71b06c099663e9796c8df166883059edd9 | [
"MIT"
] | 2 | 2018-02-09T07:35:25.000Z | 2019-05-22T17:51:07.000Z | pgoapi/protos/pogoprotos/networking/requests/messages/fetch_all_news_message_pb2.py | linherest/pgoapi | e3bdce71b06c099663e9796c8df166883059edd9 | [
"MIT"
] | null | null | null | pgoapi/protos/pogoprotos/networking/requests/messages/fetch_all_news_message_pb2.py | linherest/pgoapi | e3bdce71b06c099663e9796c8df166883059edd9 | [
"MIT"
] | 15 | 2017-02-24T01:30:23.000Z | 2021-06-27T08:46:43.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pogoprotos/networking/requests/messages/fetch_all_news_message.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _m... | 30.730159 | 186 | 0.805785 |
8aaf1c233fb59162abd8f9cfcf52f08f933a2337 | 2,347 | py | Python | mmgen/models/architectures/stylegan/utils.py | HXWAndCL/mmgeneration | 9afb1d740bf56a4ecde5064d5bb2a4e2d777638b | [
"Apache-2.0"
] | 1 | 2021-05-27T13:04:41.000Z | 2021-05-27T13:04:41.000Z | mmgen/models/architectures/stylegan/utils.py | HXWAndCL/mmgeneration | 9afb1d740bf56a4ecde5064d5bb2a4e2d777638b | [
"Apache-2.0"
] | null | null | null | mmgen/models/architectures/stylegan/utils.py | HXWAndCL/mmgeneration | 9afb1d740bf56a4ecde5064d5bb2a4e2d777638b | [
"Apache-2.0"
] | null | null | null | import torch
from ..common import get_module_device
@torch.no_grad()
def get_mean_latent(generator, num_samples=4096, bs_per_repeat=1024):
"""Get mean latent of W space in Style-based GANs.
Args:
generator (nn.Module): Generator of a Style-based GAN.
num_samples (int, optional): Number of sa... | 28.975309 | 78 | 0.613123 |
cd2ea538f7923c50246f78fe6925edf65a1332d5 | 3,133 | py | Python | miepy/vsh/expansion.py | johnaparker/MiePy | 5c5bb5a07c8ab79e9e2a9fc79fb9779e690147be | [
"MIT"
] | 3 | 2016-05-30T06:45:29.000Z | 2017-08-30T19:58:56.000Z | miepy/vsh/expansion.py | johnaparker/MiePy | 5c5bb5a07c8ab79e9e2a9fc79fb9779e690147be | [
"MIT"
] | null | null | null | miepy/vsh/expansion.py | johnaparker/MiePy | 5c5bb5a07c8ab79e9e2a9fc79fb9779e690147be | [
"MIT"
] | 5 | 2016-12-13T02:05:31.000Z | 2018-03-23T07:11:30.000Z | """
Expansion of electric and magnetic fields given expansion coefficients
"""
import numpy as np
from miepy import vsh
#TODO: move k argument to field function for consistency
def expand_E(p, k, mode):
"""Expand VSH coefficients to obtain an electric field function
Returns E(r,θ,φ) function
Argument... | 31.33 | 104 | 0.588254 |
75dd08810c7a8ac078456a9c39ab9ff5aef00e9e | 14,347 | py | Python | cli/tests/pcluster/config/defaults.py | ddeidda/aws-parallelcluster | b1f468d2283168dfd2992f791cee79bef3a4920a | [
"Apache-2.0"
] | null | null | null | cli/tests/pcluster/config/defaults.py | ddeidda/aws-parallelcluster | b1f468d2283168dfd2992f791cee79bef3a4920a | [
"Apache-2.0"
] | 14 | 2022-03-11T10:26:58.000Z | 2022-03-28T10:40:43.000Z | cli/tests/pcluster/config/defaults.py | rexcsn/aws-parallelcluster | be5f5fd926e4bd942df3da907351e5de99d49485 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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://aws.amazon.com/apache2.0/
#
# or in the "LICENSE.txt" file accom... | 32.313063 | 119 | 0.661393 |
09d4a8e9194c15f9f1237a706130be72186890ca | 135 | py | Python | flaskvel/Constants/FieldTypes.py | bogdan9898/flaskvel | b3ab27d050870ea5fe6a3cd2ed3833220b18e089 | [
"MIT"
] | 3 | 2020-08-13T19:39:53.000Z | 2022-01-03T18:02:58.000Z | flaskvel/Constants/FieldTypes.py | bogdan9898/flaskvel | b3ab27d050870ea5fe6a3cd2ed3833220b18e089 | [
"MIT"
] | null | null | null | flaskvel/Constants/FieldTypes.py | bogdan9898/flaskvel | b3ab27d050870ea5fe6a3cd2ed3833220b18e089 | [
"MIT"
] | null | null | null |
class FieldTypes():
STRING = 'string'
NUMERIC = 'numeric'
ARRAY = 'array'
JSON = 'json'
FILE = 'file'
UNKOWN = 'unknown_type'
| 13.5 | 24 | 0.62963 |
ff71e2414cfdb67e495370e276181de08b27065d | 1,163 | py | Python | frappe/tests/test_hooks.py | maheshghadage/frappe-praman | 276df54479ec0bd9a665924ef94120864fa0931b | [
"MIT"
] | 3 | 2017-12-09T22:05:11.000Z | 2019-10-22T12:03:43.000Z | frappe/tests/test_hooks.py | jigartarpara/frappe | aead9aef26138a55f92fcc7bc55988b7e67abd63 | [
"MIT"
] | 5 | 2021-04-28T06:55:26.000Z | 2022-02-10T07:59:06.000Z | frappe/tests/test_hooks.py | jigartarpara/frappe | aead9aef26138a55f92fcc7bc55988b7e67abd63 | [
"MIT"
] | 2 | 2021-05-06T06:14:40.000Z | 2021-05-06T10:05:29.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import unittest
import frappe
from frappe.desk.doctype.todo.todo import ToDo
from frappe.cache_manager import clear_controller_cache
class TestHooks(unittest.TestCase):
def test... | 30.605263 | 76 | 0.754944 |
d8dce2ce8ebc3f0c05a47c57b22aac9e1c73068f | 2,488 | py | Python | setup.py | jonhadfield/fval | c6945f6e9542a8a9faf1dda62e6b70c7df32c0e6 | [
"MIT"
] | null | null | null | setup.py | jonhadfield/fval | c6945f6e9542a8a9faf1dda62e6b70c7df32c0e6 | [
"MIT"
] | null | null | null | setup.py | jonhadfield/fval | c6945f6e9542a8a9faf1dda62e6b70c7df32c0e6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import re
import sys
from setuptools import (setup, find_packages)
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload -r pypi')
sys.exit()
install_requires = ['colorama',
'colorlog',
'PyYAML>=3.11',
... | 30.716049 | 70 | 0.600482 |
808c71c59cab27ce293e313b90798899a7953f49 | 6,358 | py | Python | ht16k33_seg.py | hybotics/deshipu-micropython-ht16k33 | 6f98090190474008845ef2874313092b2c585051 | [
"MIT"
] | null | null | null | ht16k33_seg.py | hybotics/deshipu-micropython-ht16k33 | 6f98090190474008845ef2874313092b2c585051 | [
"MIT"
] | null | null | null | ht16k33_seg.py | hybotics/deshipu-micropython-ht16k33 | 6f98090190474008845ef2874313092b2c585051 | [
"MIT"
] | 1 | 2021-07-15T02:38:25.000Z | 2021-07-15T02:38:25.000Z | from ht16k33_matrix import HT16K33
CHARS = (
0b00000000, 0b00000000, #
0b01000000, 0b00000110, # !
0b00000010, 0b00100000, # "
0b00010010, 0b11001110, # #
0b00010010, 0b11101101, # $
0b00001100, 0b00100100, # %
0b00100011, 0b01011101, # &
0b00000100, 0b00000000, # '
0b00100100, 0b0... | 28.008811 | 76 | 0.554734 |
faaa49b482d0520dfbf320d7560bacf8c805f44b | 2,007 | py | Python | analysis/preliminary_cyclotron.py | prakhub/pi3 | 166e20fb156419a9b8b57e077769ae5e59691aa9 | [
"MIT"
] | null | null | null | analysis/preliminary_cyclotron.py | prakhub/pi3 | 166e20fb156419a9b8b57e077769ae5e59691aa9 | [
"MIT"
] | null | null | null | analysis/preliminary_cyclotron.py | prakhub/pi3 | 166e20fb156419a9b8b57e077769ae5e59691aa9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
""" "Main" script used to analyze invidual measurements"""
__author__ = 'Andreas Gsponer'
__license__ = 'MIT'
import numpy as np
from analyzeImage import analyze_image
from surface import CubicFitRotated
from preprocess import Preprocessor
import smoothing
import plots
P = Pr... | 27.121622 | 99 | 0.721973 |
22717296eb3510c58ad9960a8aa76c821fb5da30 | 1,153 | py | Python | apps/core/migrations/0007_auto_20211125_2341.py | cmput404F21/CMPUT404-project-socialdistribution | 47f108b43886a4e482c6b6f9c6fdef6dcc005c3f | [
"W3C-20150513"
] | null | null | null | apps/core/migrations/0007_auto_20211125_2341.py | cmput404F21/CMPUT404-project-socialdistribution | 47f108b43886a4e482c6b6f9c6fdef6dcc005c3f | [
"W3C-20150513"
] | 48 | 2021-10-12T21:41:39.000Z | 2021-12-08T19:40:25.000Z | apps/core/migrations/0007_auto_20211125_2341.py | cmput404F21/CMPUT404-project-socialdistribution | 47f108b43886a4e482c6b6f9c6fdef6dcc005c3f | [
"W3C-20150513"
] | 1 | 2022-01-11T04:07:43.000Z | 2022-01-11T04:07:43.000Z | # Generated by Django 3.2.9 on 2021-11-25 23:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0006_auto_20211125_2157'),
]
operations = [
migrations.RemoveField(
model_name='externalhost',
name='basic_a... | 28.825 | 91 | 0.575889 |
f53533e5cdcfab560214b5fafcd2b7451d6cffa8 | 1,127 | py | Python | syngenta_digital_dta/postgres/sql_connector.py | syngenta-digital/dta-python | 2f313964bdc2b733b47c874b18bd72ebf5ed8817 | [
"Apache-2.0"
] | null | null | null | syngenta_digital_dta/postgres/sql_connector.py | syngenta-digital/dta-python | 2f313964bdc2b733b47c874b18bd72ebf5ed8817 | [
"Apache-2.0"
] | 62 | 2020-12-02T02:59:14.000Z | 2021-10-01T01:08:07.000Z | syngenta_digital_dta/postgres/sql_connector.py | syngenta-digital/dta-python | 2f313964bdc2b733b47c874b18bd72ebf5ed8817 | [
"Apache-2.0"
] | null | null | null | from functools import lru_cache
import psycopg2
from psycopg2.extras import RealDictCursor
class SQLConnector:
def __init__(self, cls):
self.endpoint = cls.endpoint
self.database = cls.database
self.table = cls.table
self.user = cls.user
self.password = cls.password
... | 28.897436 | 71 | 0.57764 |
caf689e833ec79dd02f78c279b7de8271dda5c67 | 2,979 | py | Python | {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}.py | giupo/cookiecutter-py-microservice | e29a5c74e39e0f6533c825c5c05d046122defced | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}.py | giupo/cookiecutter-py-microservice | e29a5c74e39e0f6533c825c5c05d046122defced | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}.py | giupo/cookiecutter-py-microservice | e29a5c74e39e0f6533c825c5c05d046122defced | [
"BSD-3-Clause"
] | null | null | null | """
Main module.
Defines the Controller for {{cookiecutter.project_slug}} resource
"""
import os
import logging
import tornado.web
from tornado.httpclient import AsyncHTTPClient
from {{cookiecutter.project_slug}}.events import (
init_events,
)
from {{cookiecutter.project_slug}}.config import make_config
from {{c... | 28.92233 | 91 | 0.713998 |
dfe65a24ffc6d368cf24b6ac25bdfcace7279eca | 663 | py | Python | test/unit/grid/test_shapes.py | ignacia-fp/bempp-cl | a65232558826e51e624b1a4f649b6a0ed5a7f551 | [
"MIT"
] | 70 | 2019-09-04T15:15:05.000Z | 2022-03-22T16:54:40.000Z | test/unit/grid/test_shapes.py | ignacia-fp/bempp-cl | a65232558826e51e624b1a4f649b6a0ed5a7f551 | [
"MIT"
] | 66 | 2020-01-16T08:31:00.000Z | 2022-03-25T11:18:59.000Z | test/unit/grid/test_shapes.py | ignacia-fp/bempp-cl | a65232558826e51e624b1a4f649b6a0ed5a7f551 | [
"MIT"
] | 22 | 2019-09-30T08:50:33.000Z | 2022-03-20T19:37:22.000Z | import pytest
import numpy as np
import bempp.api
@pytest.mark.parametrize(
"gridname, args, kwargs",
[
("almond", [], {}),
("cylinders", [], {}),
("reentrant_cube", [], {}),
("screen", [np.array([[0, 0, 0], [1, 0, 0], [1, 1, 0], [0, 1, 0]])], {}),
("cube", [], {}),
... | 26.52 | 81 | 0.443439 |
01b53020527cb6a672d7d74883b59bdb03f6c321 | 3,555 | py | Python | train_pku_market.py | fandulu/IHDA | a859729cbb639a3233f3c8c7fce894bac27b19ee | [
"MIT"
] | 4 | 2020-07-11T09:21:43.000Z | 2021-09-08T08:31:09.000Z | train_pku_market.py | fandulu/IHDA | a859729cbb639a3233f3c8c7fce894bac27b19ee | [
"MIT"
] | 1 | 2021-09-08T08:29:36.000Z | 2021-09-08T08:29:36.000Z | train_pku_market.py | fandulu/IHDA | a859729cbb639a3233f3c8c7fce894bac27b19ee | [
"MIT"
] | 1 | 2021-09-08T08:31:09.000Z | 2021-09-08T08:31:09.000Z | from __future__ import print_function
import argparse
import sys
import time
import torch
import torch.nn as nn
import torch.optim as optim
from torch.autograd import Variable
import torch.utils.data as data
import torchvision
import torchvision.transforms as transforms
from config import Config_market, Config_pku
f... | 33.857143 | 172 | 0.681013 |
2d1f659994b285f40478ec009c4f3a6e13c4b520 | 176 | py | Python | OpenGLCffi/GLES3/EXT/ANGLE/translated_shader_source.py | cydenix/OpenGLCffi | c78f51ae5e6b655eb2ea98f072771cf69e2197f3 | [
"MIT"
] | null | null | null | OpenGLCffi/GLES3/EXT/ANGLE/translated_shader_source.py | cydenix/OpenGLCffi | c78f51ae5e6b655eb2ea98f072771cf69e2197f3 | [
"MIT"
] | null | null | null | OpenGLCffi/GLES3/EXT/ANGLE/translated_shader_source.py | cydenix/OpenGLCffi | c78f51ae5e6b655eb2ea98f072771cf69e2197f3 | [
"MIT"
] | null | null | null | from OpenGLCffi.GLES3 import params
@params(api='gles3', prms=['shader', 'bufsize', 'length', 'source'])
def glGetTranslatedShaderSourceANGLE(shader, bufsize, length):
pass
| 25.142857 | 68 | 0.75 |
6fedc13581cde841f536aa7c4aa6c1a5d520bbc5 | 1,083 | py | Python | swipt/people/jaime.py | stoneworksolutions/swipt | 3dfd0f1b6ba9b0f2cdba85c92098483c5d9cdd94 | [
"Unlicense"
] | null | null | null | swipt/people/jaime.py | stoneworksolutions/swipt | 3dfd0f1b6ba9b0f2cdba85c92098483c5d9cdd94 | [
"Unlicense"
] | null | null | null | swipt/people/jaime.py | stoneworksolutions/swipt | 3dfd0f1b6ba9b0f2cdba85c92098483c5d9cdd94 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
def run():
print 'Para las aventuras que puedan acontecerte:'
time.sleep(5)
print 'No guardes todo en el mismo Bucket...'
time.sleep(5)
print 'Recuerda que Buchannon siempre esta vigilando...'
time.sleep(5)
print 'Y Mark... | 27.075 | 73 | 0.613112 |
9cfff74374a53fb8b71b9152b9b9a1568c9bf750 | 6,513 | py | Python | django_localflavor_cn/forms.py | ifanrx/django-localflavor-cn | 688c3df783682d11057d3cc53089a65a89c5416c | [
"BSD-3-Clause"
] | null | null | null | django_localflavor_cn/forms.py | ifanrx/django-localflavor-cn | 688c3df783682d11057d3cc53089a65a89c5416c | [
"BSD-3-Clause"
] | null | null | null | django_localflavor_cn/forms.py | ifanrx/django-localflavor-cn | 688c3df783682d11057d3cc53089a65a89c5416c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Chinese-specific form helpers
"""
from __future__ import absolute_import, unicode_literals
import re
from django.contrib.localflavor.cn.cn_provinces import CN_PROVINCE_CHOICES
from django.forms import ValidationError
from django.forms.fields import CharField, RegexField, Select
from djang... | 30.293023 | 79 | 0.60172 |
750730b6edd815be590b0f937f64291a43e6b6a0 | 1,613 | py | Python | internal/notes/builtin-SAVE/packages/libuuid/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 1 | 2019-01-17T20:07:19.000Z | 2019-01-17T20:07:19.000Z | internal/notes/builtin-SAVE/packages/libuuid/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | null | null | null | internal/notes/builtin-SAVE/packages/libuuid/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 2 | 2019-08-06T18:13:57.000Z | 2021-11-05T18:19:49.000Z | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | 46.085714 | 171 | 0.686299 |
261ccfe6e136306a1289aa2dd0996f26e6b1b729 | 6,058 | py | Python | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/lti_provider/views.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 3 | 2021-12-15T04:58:18.000Z | 2022-02-06T12:15:37.000Z | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/lti_provider/views.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | null | null | null | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/lti_provider/views.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 1 | 2019-01-02T14:38:50.000Z | 2019-01-02T14:38:50.000Z | """
LTI Provider view functions
"""
import logging
from django.conf import settings
from django.http import Http404, HttpResponseBadRequest, HttpResponseForbidden
from django.views.decorators.csrf import csrf_exempt
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey, UsageKey
from co... | 37.627329 | 110 | 0.740343 |
12ebf35dcaa511becfb67d70ee99a886810b2f95 | 8,650 | py | Python | xpark/plan/dataframe/optimized.py | xaviermathew/Xpark | 13f4c2e2f1c323a6baf772b81d5deefb9e3a9ebc | [
"MIT"
] | 1 | 2020-10-30T09:15:49.000Z | 2020-10-30T09:15:49.000Z | xpark/plan/dataframe/optimized.py | xaviermathew/Xpark | 13f4c2e2f1c323a6baf772b81d5deefb9e3a9ebc | [
"MIT"
] | 4 | 2021-06-08T22:54:18.000Z | 2022-03-12T00:52:29.000Z | xpark/plan/dataframe/optimized.py | xaviermathew/Xpark | 13f4c2e2f1c323a6baf772b81d5deefb9e3a9ebc | [
"MIT"
] | null | null | null | from collections import defaultdict
import logging
import networkx as nx
from networkx.classes.function import add_path
from python_cypher import python_cypher
from xpark import settings
from xpark.plan.base import BaseOptimizedPlan
from xpark.utils.iter import take_pairs
_LOG = logging.getLogger(__name__)
PARSER = p... | 34.879032 | 129 | 0.592254 |
c985df20af8273aadaf980bbce0b0f16ad5b1c66 | 1,924 | py | Python | TubeSleuth/config.py | stevewillows/limnoria-plugins | d2a148e4bce14b042e0bdd92bcdb2ddd27e2d6b5 | [
"MIT"
] | 9 | 2016-05-05T11:58:17.000Z | 2020-05-09T08:43:28.000Z | TubeSleuth/config.py | stevewillows/limnoria-plugins | d2a148e4bce14b042e0bdd92bcdb2ddd27e2d6b5 | [
"MIT"
] | 40 | 2015-09-18T08:12:09.000Z | 2021-12-20T07:11:43.000Z | TubeSleuth/config.py | stevewillows/limnoria-plugins | d2a148e4bce14b042e0bdd92bcdb2ddd27e2d6b5 | [
"MIT"
] | 22 | 2015-10-18T01:31:15.000Z | 2022-03-19T09:28:24.000Z | ###
# Copyright (c) 2015, butterscotchstallion
# All rights reserved.
#
#
###
import supybot.conf as conf
import supybot.registry as registry
try:
from supybot.i18n import PluginInternationalization
_ = PluginInternationalization('TubeSleuth')
except:
# Placeholder that allows to run the plugin on a bot
... | 37.72549 | 143 | 0.735967 |
f3c82b105796f1e64fe7466935a1363466e66a8c | 55 | py | Python | apps/jobs/constants.py | kaustubh-s1/EvalAI | 1884811e7759e0d095f7afb68188a7f010fa65dc | [
"BSD-3-Clause"
] | 1,470 | 2016-10-21T01:21:45.000Z | 2022-03-30T14:08:29.000Z | apps/jobs/constants.py | kaustubh-s1/EvalAI | 1884811e7759e0d095f7afb68188a7f010fa65dc | [
"BSD-3-Clause"
] | 2,594 | 2016-11-02T03:36:01.000Z | 2022-03-31T15:30:04.000Z | apps/jobs/constants.py | kaustubh-s1/EvalAI | 1884811e7759e0d095f7afb68188a7f010fa65dc | [
"BSD-3-Clause"
] | 865 | 2016-11-09T17:46:32.000Z | 2022-03-30T13:06:52.000Z | submission_status_to_exclude = ["failed", "cancelled"]
| 27.5 | 54 | 0.781818 |
1eb601ab4b35c203cf0a3d5902b6b5cce91f3bd2 | 2,973 | py | Python | src/injecta/tag/TaggedArgumentResolverTest.py | DataSentics/injecta | 090eeac6c76c43d40be71df678222a07b0a3c783 | [
"MIT"
] | 3 | 2021-09-27T12:55:00.000Z | 2022-01-31T19:13:23.000Z | src/injecta/tag/TaggedArgumentResolverTest.py | DataSentics/injecta | 090eeac6c76c43d40be71df678222a07b0a3c783 | [
"MIT"
] | null | null | null | src/injecta/tag/TaggedArgumentResolverTest.py | DataSentics/injecta | 090eeac6c76c43d40be71df678222a07b0a3c783 | [
"MIT"
] | 1 | 2021-03-04T09:12:05.000Z | 2021-03-04T09:12:05.000Z | import unittest
from injecta.container.ContainerBuild import ContainerBuild
from injecta.dtype.DType import DType
from injecta.service.Service import Service
from injecta.service.argument.ListArgument import ListArgument
from injecta.service.argument.PrimitiveArgument import PrimitiveArgument
from injecta.service.argum... | 43.720588 | 139 | 0.736293 |
72d383d5b14f331907545f504250db457ef4f65c | 1,369 | py | Python | linter.py | SublimeLinter/SublimeLinter-pyyaml | 2b0c1aa17a4df224120597fbcb561052492d417e | [
"MIT"
] | 15 | 2015-09-28T11:29:39.000Z | 2021-07-13T20:27:57.000Z | linter.py | SublimeLinter/SublimeLinter-pyyaml | 2b0c1aa17a4df224120597fbcb561052492d417e | [
"MIT"
] | 8 | 2015-03-19T01:11:14.000Z | 2017-06-09T17:49:23.000Z | linter.py | SublimeLinter/SublimeLinter-pyyaml | 2b0c1aa17a4df224120597fbcb561052492d417e | [
"MIT"
] | 4 | 2015-01-20T17:49:11.000Z | 2016-12-20T20:47:11.000Z | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by NotSqrt
# Copyright (c) 2013 NotSqrt
#
# License: MIT
#
"""This module exports the Pyyaml plugin class."""
from SublimeLinter.lint import PythonLinter, persist
class Pyyaml(PythonLinter):
"""Provides an interf... | 31.113636 | 101 | 0.607012 |
0825f764a9e86d4033ff166584c12af7599f5750 | 3,687 | py | Python | ranzen/hydra/utils.py | predictive-analytics-lab/mantra | 6c63d1d1e01745f31dbdc7c34f6c7932bcdccef8 | [
"Apache-2.0"
] | null | null | null | ranzen/hydra/utils.py | predictive-analytics-lab/mantra | 6c63d1d1e01745f31dbdc7c34f6c7932bcdccef8 | [
"Apache-2.0"
] | 4 | 2021-11-03T18:48:36.000Z | 2022-03-16T14:01:45.000Z | ranzen/hydra/utils.py | wearepal/ranzen | e249220026ccb5c05218c7202866690b5447d37e | [
"Apache-2.0"
] | null | null | null | """Functions for dealing with hydra."""
from __future__ import annotations
from collections.abc import MutableMapping
from contextlib import contextmanager
from dataclasses import asdict
from enum import Enum
import shlex
from typing import Any, Iterator, Sequence
from hydra.core.config_store import ConfigStore
from h... | 34.138889 | 100 | 0.679957 |
e054815906126eef55059eb469a8eeb1266603cf | 1,473 | py | Python | Probability-of-the-Loan-Defaulters/code.py | pankhilmaru/dsmp-pre-work | 0023be0f44f95e7d5bbb68854ee28e61a8ca1a85 | [
"MIT"
] | null | null | null | Probability-of-the-Loan-Defaulters/code.py | pankhilmaru/dsmp-pre-work | 0023be0f44f95e7d5bbb68854ee28e61a8ca1a85 | [
"MIT"
] | null | null | null | Probability-of-the-Loan-Defaulters/code.py | pankhilmaru/dsmp-pre-work | 0023be0f44f95e7d5bbb68854ee28e61a8ca1a85 | [
"MIT"
] | null | null | null | # --------------
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
# code starts here
df = pd.read_csv(path)
p_a = len(df[df['fico']>700])/len(df)
p_b = len(df[df['purpose']=='debt_consolidation'])/len(df)
df1 = df[df['purpose']=='debt_consolidation']
p_a_b = (len(df[(df['fico']==700) & (df['pu... | 18.185185 | 88 | 0.636117 |
c3fec55a9e0ecff7bbb78c55cd826f2b926e18b0 | 14,140 | py | Python | payments/payment_gateways/doctype/paypal_settings/paypal_settings.py | phot0n/payments | a6a3940365a160669a66b23d7717fd306f8e5b80 | [
"MIT"
] | null | null | null | payments/payment_gateways/doctype/paypal_settings/paypal_settings.py | phot0n/payments | a6a3940365a160669a66b23d7717fd306f8e5b80 | [
"MIT"
] | 1 | 2022-03-09T10:26:04.000Z | 2022-03-09T10:26:04.000Z | payments/payment_gateways/doctype/paypal_settings/paypal_settings.py | phot0n/frappe_payments | a6a3940365a160669a66b23d7717fd306f8e5b80 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies and contributors
# License: MIT. See LICENSE
"""
# Integrating PayPal
### 1. Validate Currency Support
Example:
from frappe.integrations.utils import get_payment_gateway_controller
controller = get_payment_gateway_controller("PayPal")
controller(... | 33.114754 | 280 | 0.737199 |
fa6e01e2559de73f57b381a202105214299177fd | 7,036 | py | Python | backend/news_29341/settings.py | crowdbotics-apps/news-29341 | 9581a5b0d691753d2d28003c0f4e4c9baf16d93a | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/news_29341/settings.py | crowdbotics-apps/news-29341 | 9581a5b0d691753d2d28003c0f4e4c9baf16d93a | [
"FTL",
"AML",
"RSA-MD"
] | 26 | 2021-08-02T20:17:22.000Z | 2022-01-23T13:45:59.000Z | backend/news_29341/settings.py | crowdbotics-apps/news-29341 | 9581a5b0d691753d2d28003c0f4e4c9baf16d93a | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
Django settings for news_29341 project.
Generated by 'django-admin startproject' using Django 2.2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os... | 28.954733 | 99 | 0.72527 |
1b2762e71f360c33a9be078a7c7efd3cba9810e4 | 328 | py | Python | lattedb/status/migrations/0003_remove_baryon2pt_type.py | callat-qcd/lattedb | 75c06748f3d59332a84ec1b5794c215c5974a46f | [
"BSD-3-Clause"
] | 1 | 2019-12-11T02:33:23.000Z | 2019-12-11T02:33:23.000Z | lattedb/status/migrations/0003_remove_baryon2pt_type.py | callat-qcd/lattedb | 75c06748f3d59332a84ec1b5794c215c5974a46f | [
"BSD-3-Clause"
] | 10 | 2020-01-29T17:06:01.000Z | 2021-05-31T14:41:19.000Z | lattedb/status/migrations/0003_remove_baryon2pt_type.py | callat-qcd/lattedb | 75c06748f3d59332a84ec1b5794c215c5974a46f | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.2.8 on 2020-01-30 17:33
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('status', '0002_auto_20191107_0016'),
]
operations = [
migrations.RemoveField(
model_name='baryon2pt',
name='type',
)... | 18.222222 | 47 | 0.591463 |
9222b35a14769fb82f9f5fd949ae5493a0dd16d6 | 512 | py | Python | env/lib/python3.8/site-packages/plotly/validators/scatter3d/marker/colorbar/_ticklen.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | env/lib/python3.8/site-packages/plotly/validators/scatter3d/marker/colorbar/_ticklen.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-08-09T02:30:14.000Z | 2022-03-12T00:50:14.000Z | env/lib/python3.8/site-packages/plotly/validators/scatter3d/marker/colorbar/_ticklen.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | import _plotly_utils.basevalidators
class TicklenValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="ticklen", parent_name="scatter3d.marker.colorbar", **kwargs
):
super(TicklenValidator, self).__init__(
plotly_name=plotly_name,
par... | 32 | 86 | 0.626953 |
708d78b18b92673a95939409a278a2dffc504c8b | 98,093 | py | Python | src/borg/archive.py | axapaxa/borg | 18f0729ed83bfa2c9b29023dadae6503035991d6 | [
"BSD-3-Clause"
] | null | null | null | src/borg/archive.py | axapaxa/borg | 18f0729ed83bfa2c9b29023dadae6503035991d6 | [
"BSD-3-Clause"
] | null | null | null | src/borg/archive.py | axapaxa/borg | 18f0729ed83bfa2c9b29023dadae6503035991d6 | [
"BSD-3-Clause"
] | null | null | null | import json
import os
import socket
import stat
import sys
import time
from collections import OrderedDict
from contextlib import contextmanager
from datetime import datetime, timezone, timedelta
from functools import partial
from getpass import getuser
from io import BytesIO
from itertools import groupby, zip_longest
... | 46.248468 | 148 | 0.588758 |
a89fc49f5b4f04ba18ec4efaac1056af4f62e450 | 2,213 | py | Python | Chapt1-Movies.py | jarrodolson/PythonForDataAnlysis | 0d3ea8055366c44791ed377ac409b6dc8f4043b6 | [
"MIT"
] | 1 | 2018-03-17T08:28:41.000Z | 2018-03-17T08:28:41.000Z | Chapt1-Movies.py | jarrodolson/PythonForDataAnlysis | 0d3ea8055366c44791ed377ac409b6dc8f4043b6 | [
"MIT"
] | null | null | null | Chapt1-Movies.py | jarrodolson/PythonForDataAnlysis | 0d3ea8055366c44791ed377ac409b6dc8f4043b6 | [
"MIT"
] | 1 | 2021-06-27T21:46:35.000Z | 2021-06-27T21:46:35.000Z | #=======================================
# Movielens examples from Python for Data Analysis
import pandas as pd
unames = ['user_id','gender','age','occupation','zip']
users = pd.read_table('ml-1m/users.dat',sep='::',header=None,names=unames)
rnames = ['user_id','movie_id','rating','timestamp']
ratings = pd.read_table... | 33.029851 | 83 | 0.68188 |
a815f033e60bcd1eb2369d2ca112d323524bdf4f | 57,511 | py | Python | Lib/logging/handlers.py | yungyu/cpython | 97588f439d35a918c95f6785c0fa17d3fbc40c31 | [
"PSF-2.0"
] | 1 | 2021-07-12T23:56:40.000Z | 2021-07-12T23:56:40.000Z | Lib/logging/handlers.py | yungyu/cpython | 97588f439d35a918c95f6785c0fa17d3fbc40c31 | [
"PSF-2.0"
] | null | null | null | Lib/logging/handlers.py | yungyu/cpython | 97588f439d35a918c95f6785c0fa17d3fbc40c31 | [
"PSF-2.0"
] | null | null | null | # Copyright 2001-2016 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
# both that copyright notice and this permissio... | 38.289614 | 122 | 0.582028 |
8499be98cfc03cd67d7a7efc241bcfcb05f154d1 | 2,586 | py | Python | others/old/train_RNN.py | YuRui8879/CPSC2021_python | bfa4c565ec3113528e73b064041082863cd228b4 | [
"MIT"
] | 4 | 2021-12-20T12:52:02.000Z | 2021-12-29T09:34:42.000Z | others/old/train_RNN.py | YuRui8879/CPSC2021_python | bfa4c565ec3113528e73b064041082863cd228b4 | [
"MIT"
] | null | null | null | others/old/train_RNN.py | YuRui8879/CPSC2021_python | bfa4c565ec3113528e73b064041082863cd228b4 | [
"MIT"
] | 1 | 2021-11-20T12:20:55.000Z | 2021-11-20T12:20:55.000Z | import torch
import torch.nn as nn
from read_code import *
from DataAdapter import RNNAdapter
import torch.utils.data as Data
from torch.optim.lr_scheduler import CosineAnnealingLR,MultiStepLR
from model import RNN
import time
from batch import cal_rnn_batch
import torch.optim as optim
from EarlyStopping import EarlySt... | 35.916667 | 151 | 0.727765 |
151a7f895ba4b0870c97b35b4e903e1065b4f55c | 12,550 | py | Python | src/queens8/Queens8.py | DanLBates/queens8 | 396967557c1ecb24fba1ef82530cb5c74b407a8b | [
"MIT"
] | null | null | null | src/queens8/Queens8.py | DanLBates/queens8 | 396967557c1ecb24fba1ef82530cb5c74b407a8b | [
"MIT"
] | null | null | null | src/queens8/Queens8.py | DanLBates/queens8 | 396967557c1ecb24fba1ef82530cb5c74b407a8b | [
"MIT"
] | null | null | null | #!python
''' queens8.py Places 8 queens on chessboard so that they are mutually
unthreatening. Allows user to place the 1st queen anywhere on the
1st row; then the program places the rest of the queens by a
recursive backtracking algorithm. Prints out all the moves,
including the moves that may be "tak... | 31.218905 | 108 | 0.536733 |
671cde28e9b51b343092f5c1e4b37c656ba4b8b5 | 129 | bzl | Python | tensorflow-yolo-ios/dependencies/tensorflow/core/platform/default/build_config.bzl | initialz/tensorflow-yolo-face-ios | ba74cf39168d0128e91318e65a1b88ce4d65a167 | [
"MIT"
] | 27 | 2017-06-07T19:07:32.000Z | 2020-10-15T10:09:12.000Z | tensorflow-yolo-ios/dependencies/tensorflow/core/platform/default/build_config.bzl | initialz/tensorflow-yolo-face-ios | ba74cf39168d0128e91318e65a1b88ce4d65a167 | [
"MIT"
] | 3 | 2017-08-25T17:39:46.000Z | 2017-11-18T03:40:55.000Z | tensorflow-yolo-ios/dependencies/tensorflow/core/platform/default/build_config.bzl | initialz/tensorflow-yolo-face-ios | ba74cf39168d0128e91318e65a1b88ce4d65a167 | [
"MIT"
] | 10 | 2017-06-16T18:04:45.000Z | 2018-07-05T17:33:01.000Z | version https://git-lfs.github.com/spec/v1
oid sha256:c307af26b4642242493ffcbe32bd060c7f5789fe2299a864159c967f096131e6
size 7038
| 32.25 | 75 | 0.883721 |
49c381b8a3aa751b365c3c603915789ee251b662 | 1,086 | py | Python | 6 kyu - Find the Mine!.py | ricardopizzimenti/Codewars | bbebc3f62642e22109d6a5ac0cdd638bca02e6ca | [
"MIT"
] | null | null | null | 6 kyu - Find the Mine!.py | ricardopizzimenti/Codewars | bbebc3f62642e22109d6a5ac0cdd638bca02e6ca | [
"MIT"
] | null | null | null | 6 kyu - Find the Mine!.py | ricardopizzimenti/Codewars | bbebc3f62642e22109d6a5ac0cdd638bca02e6ca | [
"MIT"
] | null | null | null | """
You've just discovered a square (NxN) field and you notice a warning sign.
The sign states that there's a single bomb in the 2D grid-like field in front of you.
Write a function mineLocation/MineLocation that accepts a 2D array, and returns the location of the mine.
The mine is represented as the integer 1 in the ... | 40.222222 | 107 | 0.667587 |
48587ba40b3b94bff0f662bfc0869014b61107b8 | 46,117 | py | Python | certbot/storage.py | cikupamart/certbot | 8f1939c08a318fd64395bc1368eab541904d8d53 | [
"Apache-2.0"
] | 1 | 2021-06-16T19:10:05.000Z | 2021-06-16T19:10:05.000Z | certbot/storage.py | kaduk/certbot | 944d0e05c854e51c0de6bdd44bc00af39e8db672 | [
"Apache-2.0"
] | null | null | null | certbot/storage.py | kaduk/certbot | 944d0e05c854e51c0de6bdd44bc00af39e8db672 | [
"Apache-2.0"
] | null | null | null | """Renewable certificates storage."""
import datetime
import glob
import logging
import os
import re
import shutil
import stat
import configobj
import parsedatetime
import pytz
import six
import certbot
from certbot import cli
from certbot import constants
from certbot import crypto_util
from certbot import error_han... | 40.595951 | 95 | 0.643299 |
38ec501b5f7faa8c9b5ad354bfa085947bf20809 | 43 | py | Python | src/alchemical/__init__.py | mindflayer/alchemical | c269030b123d870f8da767ff699b5e5e2d28f9d6 | [
"MIT"
] | 47 | 2021-05-31T00:18:10.000Z | 2022-03-23T01:34:30.000Z | src/alchemical/__init__.py | mindflayer/alchemical | c269030b123d870f8da767ff699b5e5e2d28f9d6 | [
"MIT"
] | 4 | 2021-05-31T05:07:12.000Z | 2022-03-01T17:27:46.000Z | src/alchemical/__init__.py | mindflayer/alchemical | c269030b123d870f8da767ff699b5e5e2d28f9d6 | [
"MIT"
] | 1 | 2022-02-24T11:35:02.000Z | 2022-02-24T11:35:02.000Z | from .core import Alchemical # noqa: F401
| 21.5 | 42 | 0.744186 |
ea6ebe0d6337c60a377e5268a295a31b1acf4dbb | 16,097 | py | Python | gammapy/estimators/points/tests/test_sed.py | Rishank2610/gammapy | 3cd64fdb2c53c8e5c697a9b85ef8d0486bff0b76 | [
"BSD-3-Clause"
] | 1 | 2017-11-22T17:07:56.000Z | 2017-11-22T17:07:56.000Z | gammapy/estimators/points/tests/test_sed.py | Rishank2610/gammapy | 3cd64fdb2c53c8e5c697a9b85ef8d0486bff0b76 | [
"BSD-3-Clause"
] | null | null | null | gammapy/estimators/points/tests/test_sed.py | Rishank2610/gammapy | 3cd64fdb2c53c8e5c697a9b85ef8d0486bff0b76 | [
"BSD-3-Clause"
] | 1 | 2019-09-04T14:03:33.000Z | 2019-09-04T14:03:33.000Z | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import pytest
import numpy as np
from numpy.testing import assert_allclose
from astropy import units as u
from astropy.coordinates import SkyCoord
from gammapy.data import Observation
from gammapy.datasets import MapDataset, SpectrumDatasetOnOff
from gamma... | 32.453629 | 88 | 0.682301 |
4f65515ba5645397026de526c9d8bd32869cdb57 | 4,728 | py | Python | vmchecker/kvm_executor.py | cojocar/vmchecker | cf151435100c04a56e6dbfa02f7e28e5c801e889 | [
"MIT"
] | 1 | 2017-11-27T04:01:45.000Z | 2017-11-27T04:01:45.000Z | vmchecker/kvm_executor.py | alexukf/vmchecker | 948df54ec130d38a206f2730a19beb25815f06e6 | [
"MIT"
] | null | null | null | vmchecker/kvm_executor.py | alexukf/vmchecker | 948df54ec130d38a206f2730a19beb25815f06e6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""A script that starts a vm, reverts it to a known snapshot, tests a
submission bundle (submission + tests), and closes the vm"""
from __future__ import with_statement
# Use simplejson or Python 2.6 json, prefer simplejson.
try:
import simplejson as json
except Imp... | 36.651163 | 163 | 0.614848 |
77e71eb21ec9abcc63f8e0cd9d6ba4d5bdae7f12 | 1,387 | py | Python | kTsnn/src/experiments/test_synth.py | dkesada/kTsnn | 5f7c2b9d2ae2cd5cb0e32c68da2cca1ffb87b69d | [
"MIT"
] | 1 | 2020-06-30T17:19:23.000Z | 2020-06-30T17:19:23.000Z | kTsnn/src/experiments/test_synth.py | dkesada/kTsnn | 5f7c2b9d2ae2cd5cb0e32c68da2cca1ffb87b69d | [
"MIT"
] | null | null | null | kTsnn/src/experiments/test_synth.py | dkesada/kTsnn | 5f7c2b9d2ae2cd5cb0e32c68da2cca1ffb87b69d | [
"MIT"
] | null | null | null | from kTsnn.src.utils import *
import tensorflow as tf
import os
import random as rn
import numpy as np
# Synthetic data experiments
DT_FILE = 'dt_synth_unfolded.csv'
INFO_FILE = 'exec_info_synth.txt'
os.environ['PYTHONHASHSEED'] = '0'
np.random.seed(42)
rn.seed(4242)
session_conf = tf.compat.v1.ConfigProto(intra_op_... | 22.370968 | 112 | 0.6323 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.