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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c8e422b42fdf88c9d952e92cf80a34b793adfde2 | 13,331 | py | Python | cosmos/service/oauth2service.py | kuasha/peregrine | b3dd92146d26fe9e4ea589868431b590324b47d1 | [
"MIT"
] | 1 | 2018-10-12T15:12:15.000Z | 2018-10-12T15:12:15.000Z | cosmos/service/oauth2service.py | kuasha/peregrine | b3dd92146d26fe9e4ea589868431b590324b47d1 | [
"MIT"
] | null | null | null | cosmos/service/oauth2service.py | kuasha/peregrine | b3dd92146d26fe9e4ea589868431b590324b47d1 | [
"MIT"
] | null | null | null | """
Copyright (C) 2014 Maruf Maniruzzaman
Website: http://cosmosframework.com
Author: Maruf Maniruzzaman
License :: OSI Approved :: MIT License
This service handler follows the style found in Azure (https://msdn.microsoft.com/en-us/library/azure/dn645542.aspx)
Also for more information look at The OAuth 2.0 Auth... | 37.764873 | 122 | 0.647588 |
c8e44244e9e3c7ef3e1ac3f9e3b7a985c8f6c343 | 4,221 | py | Python | rsnapsim/expvt.py | MunskyGroup/rSNAPsim | af3e496d5252e1d2e1da061277123233a5d609b4 | [
"MIT"
] | 1 | 2022-01-28T18:17:37.000Z | 2022-01-28T18:17:37.000Z | rsnapsim/expvt.py | MunskyGroup/rSNAPsim | af3e496d5252e1d2e1da061277123233a5d609b4 | [
"MIT"
] | null | null | null | rsnapsim/expvt.py | MunskyGroup/rSNAPsim | af3e496d5252e1d2e1da061277123233a5d609b4 | [
"MIT"
] | 1 | 2020-12-02T06:36:17.000Z | 2020-12-02T06:36:17.000Z |
import numpy as np
import scipy.sparse.linalg as spl
def expvt(tvec,A,v,tol=1.0e-7,m=30, u = 0):
'''
a python version of expv from
roger sidje's expokit. A should be sparse.
https://www.maths.uq.edu.au/expokit/paper.pdf
Produces the analytical solution to the Homogenous ODE solutoin
... | 28.910959 | 78 | 0.452736 |
c8e44db6a16089452ab06c7d71526ab9cb1f7505 | 1,998 | py | Python | printing/fonts/PSFont_Times_Roman.py | notatallshaw/Grail-0.6 | 2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43 | [
"CNRI-Jython"
] | 22 | 2021-05-17T07:01:04.000Z | 2021-10-31T09:03:29.000Z | printing/fonts/PSFont_Times_Roman.py | SimiCode/Grail-Web-Browser | 16b86d3215068d334eacf6153b71a748eed53d3d | [
"CNRI-Jython"
] | 17 | 2021-05-17T04:39:49.000Z | 2021-09-06T14:50:39.000Z | printing/fonts/PSFont_Times_Roman.py | SimiCode/Grail-Web-Browser | 16b86d3215068d334eacf6153b71a748eed53d3d | [
"CNRI-Jython"
] | 6 | 2021-05-17T07:37:01.000Z | 2022-01-09T10:26:24.000Z | # Character width information for PostScript font `Times Roman'
# generated from the Adobe Font Metric file `../../../../adobe/tir_____.afm'. Adobe
# copyright notice follows:
#
# Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All Rights Reserved.Times is a trademark of Linotype AG and/or its subsid... | 47.571429 | 148 | 0.425926 |
c8e4587a617b10790aa898bf9bfb1c12e6bfc8e4 | 1,929 | py | Python | servers/python/coweb/cowebpyoe/DeleteOperation.py | opencoweb/coweb | 7b3a87ee9eda735a859447d404ee16edde1c5671 | [
"AFL-2.1"
] | 83 | 2015-01-05T19:02:57.000Z | 2021-11-19T02:48:09.000Z | servers/python/coweb/cowebpyoe/DeleteOperation.py | xuelingxiao/coweb | 7b3a87ee9eda735a859447d404ee16edde1c5671 | [
"AFL-2.1"
] | 3 | 2015-12-16T13:49:33.000Z | 2019-06-17T13:38:50.000Z | servers/python/coweb/cowebpyoe/DeleteOperation.py | xuelingxiao/coweb | 7b3a87ee9eda735a859447d404ee16edde1c5671 | [
"AFL-2.1"
] | 14 | 2015-04-29T22:36:53.000Z | 2021-11-18T03:24:29.000Z | """
Represents a delete operation that removes a value from a linear
collection.
Copyright (c) The Dojo Foundation 2011. All Rights Reserved.
Copyright (c) IBM Corporation 2008, 2011. All Rights Reserved.
"""
from .Operation import Operation
from .factory import factory
class DeleteOperation(Operation):
"""
... | 26.791667 | 75 | 0.644375 |
c8e465e784303ee5a95f718604b54df7d5758fe3 | 957 | py | Python | test/rplugin/python3/remote/test_server.py | chipsenkbeil/vim-overthere | 910e5f91019f5080322180f8608e2961eb471f86 | [
"Apache-2.0"
] | null | null | null | test/rplugin/python3/remote/test_server.py | chipsenkbeil/vim-overthere | 910e5f91019f5080322180f8608e2961eb471f86 | [
"Apache-2.0"
] | 9 | 2018-04-15T04:43:59.000Z | 2018-04-28T16:30:00.000Z | test/rplugin/python3/remote/test_server.py | chipsenkbeil/remote.nvim | 910e5f91019f5080322180f8608e2961eb471f86 | [
"Apache-2.0"
] | null | null | null | # =============================================================================
# FILE: test_server.py
# AUTHOR: Chip Senkbeil <chip.senkbeil at gmail.com>
# License: Apache 2.0 License
# =============================================================================
import pytest
from remote.server import RemoteServer
f... | 29 | 79 | 0.598746 |
c8e4ba6df4dfb2453dbfacab157373852aefa166 | 17,896 | py | Python | LSTM_CTE_Wikibio.py | shalei120/OxCTE | 0909a7d8f4fd8269de51eefe25732553e9fd4f59 | [
"MIT"
] | 1 | 2021-08-29T10:21:53.000Z | 2021-08-29T10:21:53.000Z | LSTM_CTE_Wikibio.py | shalei120/OxCTE | 0909a7d8f4fd8269de51eefe25732553e9fd4f59 | [
"MIT"
] | null | null | null | LSTM_CTE_Wikibio.py | shalei120/OxCTE | 0909a7d8f4fd8269de51eefe25732553e9fd4f59 | [
"MIT"
] | null | null | null | import torch
import torch.autograd as autograd
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.nn.parameter import Parameter
from RandomMatrix import GaussianOrthogonalRandomMatrix
from FastSelfAttention import dot_product_attention
import... | 53.261905 | 239 | 0.658527 |
c8e4d9996be86cb7e1078ad736d66ab548061b89 | 46,745 | py | Python | scripts/autoscaling/aws/nodeup.py | cmbkoko1989/cloud-pipeline | 9af1218151ef02f87915726eb92c0cc626f7ab11 | [
"Apache-2.0"
] | null | null | null | scripts/autoscaling/aws/nodeup.py | cmbkoko1989/cloud-pipeline | 9af1218151ef02f87915726eb92c0cc626f7ab11 | [
"Apache-2.0"
] | null | null | null | scripts/autoscaling/aws/nodeup.py | cmbkoko1989/cloud-pipeline | 9af1218151ef02f87915726eb92c0cc626f7ab11 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017-2020 EPAM Systems, Inc. (https://www.epam.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 appli... | 41.9614 | 190 | 0.632731 |
c8e4e2a3f1800264594e06e45e19d297303cd563 | 8,619 | py | Python | python/ray/experimental/workflow/tests/test_storage.py | RaphaelCS/ray | 5f4d9085d2452186bff563fb2856e643c4c82095 | [
"Apache-2.0"
] | null | null | null | python/ray/experimental/workflow/tests/test_storage.py | RaphaelCS/ray | 5f4d9085d2452186bff563fb2856e643c4c82095 | [
"Apache-2.0"
] | null | null | null | python/ray/experimental/workflow/tests/test_storage.py | RaphaelCS/ray | 5f4d9085d2452186bff563fb2856e643c4c82095 | [
"Apache-2.0"
] | null | null | null | import pytest
import asyncio
import ray
from ray.tests.conftest import * # noqa
from ray.experimental.workflow import workflow_storage
from ray.experimental.workflow import storage
from ray.experimental.workflow.workflow_storage import asyncio_run
def some_func(x):
return x + 1
def some_func2(x):
return x ... | 41.4375 | 79 | 0.696833 |
c8e4e46ff136f237b32ff57e2275725b5f605ee1 | 1,149 | py | Python | sanity/latex2utf/pylatexenc/version.py | TIBHannover/arxiv_preserver | aefdacaa9d1c4c13b51e1812e6218c0025ab0a11 | [
"MIT"
] | null | null | null | sanity/latex2utf/pylatexenc/version.py | TIBHannover/arxiv_preserver | aefdacaa9d1c4c13b51e1812e6218c0025ab0a11 | [
"MIT"
] | null | null | null | sanity/latex2utf/pylatexenc/version.py | TIBHannover/arxiv_preserver | aefdacaa9d1c4c13b51e1812e6218c0025ab0a11 | [
"MIT"
] | null | null | null | #
# The MIT License (MIT)
#
# Copyright (c) 2015 Philippe Faist
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy... | 42.555556 | 79 | 0.767624 |
c8e4ea20a93997253acf5cf297390efe3394ffc5 | 13,206 | py | Python | topo/misc/util.py | ceball/topographica | ec0eea614409ceb7473e04bc2f6b6c888099160f | [
"BSD-3-Clause"
] | 40 | 2015-02-05T14:53:10.000Z | 2020-10-12T06:26:23.000Z | topo/misc/util.py | ceball/topographica | ec0eea614409ceb7473e04bc2f6b6c888099160f | [
"BSD-3-Clause"
] | 95 | 2015-01-01T16:14:20.000Z | 2022-02-11T22:50:27.000Z | topo/misc/util.py | ceball/topographica | ec0eea614409ceb7473e04bc2f6b6c888099160f | [
"BSD-3-Clause"
] | 22 | 2015-05-03T10:24:17.000Z | 2019-11-15T06:34:31.000Z | """
General utility functions and classes.
"""
import re
import random
import numpy
import functools
def NxN(tuple):
"""
Converts a tuple (X1,X2,...,Xn) to a string 'X1xX2x...xXn'
"""
return 'x'.join([`N` for N in tuple])
enum = enumerate
class Struct:
"""
A simple structure class, taki... | 29.609865 | 129 | 0.631834 |
c8e4edca1f5b09e994d73072effb22ec2caf857d | 99 | py | Python | python/16_numpy/11_meanvarandstd.py | jaimiles23/hacker_rank | 0580eac82e5d0989afabb5c2e66faf09713f891b | [
"Apache-2.0"
] | null | null | null | python/16_numpy/11_meanvarandstd.py | jaimiles23/hacker_rank | 0580eac82e5d0989afabb5c2e66faf09713f891b | [
"Apache-2.0"
] | null | null | null | python/16_numpy/11_meanvarandstd.py | jaimiles23/hacker_rank | 0580eac82e5d0989afabb5c2e66faf09713f891b | [
"Apache-2.0"
] | 3 | 2021-09-22T11:06:58.000Z | 2022-01-25T09:29:24.000Z | Solution to [Mean, Var, and Std](https://www.hackerrank.com/challenges/np-mean-var-and-std/problem) | 99 | 99 | 0.767677 |
c8e50b1f3784b65327ac31eb860bea8d1770b61c | 30,667 | py | Python | rllib/evaluation/sampler.py | romilbhardwaj/ray | e261b4778e18e4d7360c9241f81ef034d5c3c548 | [
"Apache-2.0"
] | 1 | 2020-11-14T19:25:41.000Z | 2020-11-14T19:25:41.000Z | rllib/evaluation/sampler.py | GoingMyWay/ray | 4fb195a22e972a0b54359ffa58afedb35e827540 | [
"Apache-2.0"
] | 2 | 2022-01-13T04:15:38.000Z | 2022-03-12T01:03:35.000Z | rllib/evaluation/sampler.py | GoingMyWay/ray | 4fb195a22e972a0b54359ffa58afedb35e827540 | [
"Apache-2.0"
] | null | null | null | from collections import defaultdict, namedtuple
import logging
import numpy as np
import queue
import threading
import time
from ray.util.debug import log_once
from ray.rllib.evaluation.episode import MultiAgentEpisode
from ray.rllib.evaluation.rollout_metrics import RolloutMetrics
from ray.rllib.evaluation.sample_bat... | 41.053548 | 79 | 0.599374 |
c8e5208a4ee43b4e3076da419400e0096ad92d51 | 96,498 | py | Python | augly/video/transforms.py | Adib234/AugLy | 35a6a5de07e64f465b8979e3257218551929e57a | [
"MIT"
] | null | null | null | augly/video/transforms.py | Adib234/AugLy | 35a6a5de07e64f465b8979e3257218551929e57a | [
"MIT"
] | null | null | null | augly/video/transforms.py | Adib234/AugLy | 35a6a5de07e64f465b8979e3257218551929e57a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
import os
import random
from typing import Any, Callable, Dict, List, Optional, Tuple
import augly.audio as audaugs
import augly.utils as utils
import augly.video.functional as F
import numpy as np
from augly.video.helpers import identity_funct... | 36.128042 | 90 | 0.627122 |
c8e543f4adb453ec64c3f159a2d8a45aeaac6c18 | 1,131 | py | Python | openhumans_seeq/management/commands/sync_all.py | OpenHumans/openhumans-seeq | 1c9959bc2a31a16d27f3c7a7c903c8b1f8a3a7c7 | [
"MIT"
] | null | null | null | openhumans_seeq/management/commands/sync_all.py | OpenHumans/openhumans-seeq | 1c9959bc2a31a16d27f3c7a7c903c8b1f8a3a7c7 | [
"MIT"
] | null | null | null | openhumans_seeq/management/commands/sync_all.py | OpenHumans/openhumans-seeq | 1c9959bc2a31a16d27f3c7a7c903c8b1f8a3a7c7 | [
"MIT"
] | null | null | null | from __future__ import print_function
import os
import shutil
import tempfile
from django.core.management.base import BaseCommand
from openhumans_seeq.dataxfer import dataxfer
from openhumans_seeq.models import OpenHumansMember
SEEQ_REFRESH_TOKEN = os.getenv('SEEQ_REFRESH_TOKEN')
SEEQ_STUDY_ID = int(os.getenv('SEEQ... | 30.567568 | 74 | 0.67374 |
c8e5457cb6267e8f3687fd79fc642295c413cbda | 30 | py | Python | src/tfx_helper/__init__.py | dlabsai/tfx-helper | 74a05ffeaa14fdc0866d063e36114f7d654a5ae9 | [
"MIT"
] | null | null | null | src/tfx_helper/__init__.py | dlabsai/tfx-helper | 74a05ffeaa14fdc0866d063e36114f7d654a5ae9 | [
"MIT"
] | null | null | null | src/tfx_helper/__init__.py | dlabsai/tfx-helper | 74a05ffeaa14fdc0866d063e36114f7d654a5ae9 | [
"MIT"
] | null | null | null | # The pipeline helper library
| 15 | 29 | 0.8 |
c8e5766cb51eac940289198ba838e88b6169b3e3 | 3,123 | py | Python | pyqmc/multiplywf.py | YiqingZhouKelly/pyqmc | ec14c7b3cceb01d287cb09ebc5d2af37014c1c8e | [
"MIT"
] | null | null | null | pyqmc/multiplywf.py | YiqingZhouKelly/pyqmc | ec14c7b3cceb01d287cb09ebc5d2af37014c1c8e | [
"MIT"
] | null | null | null | pyqmc/multiplywf.py | YiqingZhouKelly/pyqmc | ec14c7b3cceb01d287cb09ebc5d2af37014c1c8e | [
"MIT"
] | null | null | null | import numpy as np
import collections
import collections.abc
class WFmerger(collections.abc.MutableMapping):
def __init__(self, d1, d2):
self.data = {}
self.data["wf1"] = d1
self.data["wf2"] = d2
def __setitem__(self, idx, value):
k1 = idx[0:3]
k2 = idx[3:]
sel... | 27.394737 | 85 | 0.5626 |
c8e584b9e5472280f4b4f9c520c64952274d5993 | 385 | py | Python | glimix_core/mean/test/test_mean_linear.py | Horta/limix-inference | 1ba102fc544f8d307412d361b574da9d4c166f8e | [
"MIT"
] | 7 | 2019-06-10T12:27:25.000Z | 2021-07-23T16:36:04.000Z | glimix_core/mean/test/test_mean_linear.py | Horta/limix-inference | 1ba102fc544f8d307412d361b574da9d4c166f8e | [
"MIT"
] | 12 | 2017-05-28T10:59:31.000Z | 2021-05-17T20:11:00.000Z | glimix_core/mean/test/test_mean_linear.py | Horta/limix-inference | 1ba102fc544f8d307412d361b574da9d4c166f8e | [
"MIT"
] | 5 | 2017-08-27T20:13:45.000Z | 2022-02-14T06:33:14.000Z | from numpy import array
from numpy.testing import assert_allclose
from glimix_core.mean import LinearMean
def test_mean_linear():
X = array([[5.1, 1.0], [2.1, -0.2]])
mean = LinearMean(X)
mean.effsizes = [1.0, -1.0]
assert_allclose(mean.value(), X @ [1.0, -1.0])
assert_allclose(mean.effsizes, [1... | 25.666667 | 53 | 0.65974 |
c8e59b25aeb54f95465b0d6ca6e92c6ab9d076d6 | 6,285 | py | Python | pystol-ui/app/base/k8s.py | ccamacho/pystol | 7925461c324975c8334009e3b878debcf056698b | [
"Apache-2.0"
] | null | null | null | pystol-ui/app/base/k8s.py | ccamacho/pystol | 7925461c324975c8334009e3b878debcf056698b | [
"Apache-2.0"
] | null | null | null | pystol-ui/app/base/k8s.py | ccamacho/pystol | 7925461c324975c8334009e3b878debcf056698b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Copyright 2019 Pystol (pystol.org).
Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License. You may obtain
a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | 33.609626 | 84 | 0.543516 |
c8e5d31ae08cb8ac2da9152c1a8ce66394a8dd86 | 241 | py | Python | flake8_html/__init__.py | mihaidumitrescu/flake8-html | d5b62c05fb220a5cd6c777feacd69cb726a42e9a | [
"Apache-2.0"
] | 36 | 2017-03-05T13:12:28.000Z | 2021-02-03T15:05:34.000Z | flake8_html/__init__.py | mihaidumitrescu/flake8-html | d5b62c05fb220a5cd6c777feacd69cb726a42e9a | [
"Apache-2.0"
] | 23 | 2017-03-01T19:40:10.000Z | 2022-03-31T17:13:17.000Z | flake8_html/__init__.py | mihaidumitrescu/flake8-html | d5b62c05fb220a5cd6c777feacd69cb726a42e9a | [
"Apache-2.0"
] | 15 | 2017-03-05T13:12:39.000Z | 2022-03-25T14:46:28.000Z | # -*- coding: utf-8 -*-
"""flake8-html - a flake8 plugin to generate HTML reports."""
__author__ = """Daniel Pope"""
__email__ = 'mauve@mauveweb.co.uk'
__version__ = '0.4.1'
from .plugin import HTMLPlugin
__all__ = (
'HTMLPlugin',
)
| 17.214286 | 61 | 0.651452 |
c8e5e7941bea3574585d76997d37f3b325a30944 | 7,432 | py | Python | vizier/utils.py | robotarium/vizier | 6ce2be4fc0edcdaf5ba246094c2e79bff32e219d | [
"MIT"
] | 11 | 2016-08-18T20:37:06.000Z | 2019-11-24T17:34:27.000Z | vizier/utils.py | robotarium/vizier | 6ce2be4fc0edcdaf5ba246094c2e79bff32e219d | [
"MIT"
] | 6 | 2018-10-07T17:01:40.000Z | 2019-11-24T17:41:16.000Z | vizier/utils.py | robotarium/vizier | 6ce2be4fc0edcdaf5ba246094c2e79bff32e219d | [
"MIT"
] | 3 | 2016-08-22T13:58:24.000Z | 2018-06-07T21:06:35.000Z | import binascii
import os
# Global definitions for particular key names
_get_response_types = {'data', 'link', 'stream'}
_status_codes = {1, 2, 3, 4}
_methods = {'GET'}
_response_types = {'DATA', 'STREAM'}
_descriptor_keys = {'type': True, 'body': False}
GetResponseTypeError = ValueError
def create_message_id(node):... | 29.609562 | 155 | 0.639801 |
c8e60faf79b97b9626d55a42b1acb87e5e1a98b3 | 4,212 | py | Python | zproject/test_settings.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | null | null | null | zproject/test_settings.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | null | null | null | zproject/test_settings.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
import os
# test_settings.py works differently from
# dev_settings.py/prod_settings.py; it actually is directly referenced
# by the test suite as DJANGO_SETTINGS_MODULE and imports settings.py
# directly and then hacks up the values that are different for the
# test suite. As wil... | 38.642202 | 88 | 0.719611 |
c8e613880e8227c51a4b810cf48dcf74b7ddf407 | 5,213 | py | Python | pkgcore/resolver/choice_point.py | pombreda/pkgcore | b438fc573af1a031d7ce12adbbf299bab5338451 | [
"BSD-3-Clause"
] | null | null | null | pkgcore/resolver/choice_point.py | pombreda/pkgcore | b438fc573af1a031d7ce12adbbf299bab5338451 | [
"BSD-3-Clause"
] | 8 | 2015-03-24T14:21:44.000Z | 2015-03-24T14:21:44.000Z | pkgcore/resolver/choice_point.py | pombreda/pkgcore | b438fc573af1a031d7ce12adbbf299bab5338451 | [
"BSD-3-Clause"
] | null | null | null | # Copyright: 2006-2010 Brian Harring <ferringb@gmail.com>
# License: GPL2/BSD
__all__ = ("choice_point",)
from snakeoil import klass
from snakeoil.lists import iter_stable_unique
class choice_point(object):
__slots__ = (
"__weakref__", "atom", "matches", "matches_cur", "solution_filters",
"_prd... | 30.48538 | 78 | 0.56877 |
c8e62a888972472dc4a6e72ee4d49de6b9a8f7ae | 4,303 | py | Python | src/infi/instruct/struct/bit.py | jasonjorge/infi.asi | 78a4c34a421102f99b959a659cf7303804627d9b | [
"BSD-3-Clause"
] | 2 | 2015-01-12T21:16:06.000Z | 2019-12-12T05:59:56.000Z | src/infi/instruct/struct/bit.py | jasonjorge/infi.asi | 78a4c34a421102f99b959a659cf7303804627d9b | [
"BSD-3-Clause"
] | 4 | 2015-02-24T09:18:00.000Z | 2021-06-16T12:55:19.000Z | src/infi/instruct/struct/bit.py | jasonjorge/infi.asi | 78a4c34a421102f99b959a659cf7303804627d9b | [
"BSD-3-Clause"
] | 4 | 2015-01-07T12:37:54.000Z | 2018-02-08T15:07:17.000Z | from . import FieldListContainer
from ..base import FixedSizer, Marshal, MinMax, EMPTY_CONTEXT
from ..errors import InstructError, BitFieldNotInByteBoundry, FieldTypeNotSupportedError
from ..utils.bitstringio import BitStringIO
class BitMarshal(FixedSizer, Marshal):
def __init__(self, size):
super(BitMarsh... | 39.477064 | 114 | 0.660005 |
c8e68ee82a3ec27971fdf17ba12c46654ea275b9 | 194 | py | Python | aamm/tests.py | rshipp/appassure-mount-manager | 8caace9e023f2d8f2ceaa48153410ece07958fd8 | [
"BSD-3-Clause"
] | null | null | null | aamm/tests.py | rshipp/appassure-mount-manager | 8caace9e023f2d8f2ceaa48153410ece07958fd8 | [
"BSD-3-Clause"
] | null | null | null | aamm/tests.py | rshipp/appassure-mount-manager | 8caace9e023f2d8f2ceaa48153410ece07958fd8 | [
"BSD-3-Clause"
] | null | null | null | import unittest
from pyramid import testing
class ViewTests(unittest.TestCase):
def setUp(self):
self.config = testing.setUp()
def tearDown(self):
testing.tearDown()
| 16.166667 | 37 | 0.680412 |
c8e69cf4ea4fbbb6b14be8c153be660563be7354 | 280 | py | Python | tests/conditions.py | canada-nyc/django-simpleimages | ebeb77a8cc9a7c7188295f41ced5112e8410ccd7 | [
"MIT"
] | 3 | 2015-11-09T23:09:56.000Z | 2020-08-20T15:30:02.000Z | tests/conditions.py | canada-nyc/django-simpleimages | ebeb77a8cc9a7c7188295f41ced5112e8410ccd7 | [
"MIT"
] | 7 | 2015-04-16T15:46:41.000Z | 2020-08-27T13:20:12.000Z | tests/conditions.py | canada-nyc/django-simpleimages | ebeb77a8cc9a7c7188295f41ced5112e8410ccd7 | [
"MIT"
] | 2 | 2015-04-16T15:47:04.000Z | 2018-11-05T16:45:18.000Z | import pytest
from django_rq.queues import get_connection
import redis
try:
get_connection().ping()
except redis.exceptions.ConnectionError:
cant_connect = True
else:
cant_connect = False
rq_redis = pytest.mark.skipif(cant_connect, reason="can't connect to Redis")
| 20 | 76 | 0.771429 |
c8e6af8fd24428b023407758d40969d48369cb87 | 7,087 | py | Python | lib/midiparser.py | hdo/bCNC | c0c6489c80265f95b554e6566835874497cf969d | [
"MIT",
"BSD-3-Clause"
] | null | null | null | lib/midiparser.py | hdo/bCNC | c0c6489c80265f95b554e6566835874497cf969d | [
"MIT",
"BSD-3-Clause"
] | null | null | null | lib/midiparser.py | hdo/bCNC | c0c6489c80265f95b554e6566835874497cf969d | [
"MIT",
"BSD-3-Clause"
] | null | null | null |
# Placed into Public Domain in June 2006 by Sean D. Spencer
# Sean D. Spencer
# sean_don4@lycos.com
# 2/19/2006
# Last Revision: 4/19/2007
# MIDI Parsing Library for Python.
TRUE = -1
FALSE = 0
class format:
SingleTrack = 0
MultipleTracksSync = 1
MultipleTracksAsync = 2
class voice:
NoteOff = 0x80... | 23.084691 | 72 | 0.655708 |
c8e6b94559f1ac803602c1b8b009da214a6cf362 | 7,129 | py | Python | GeeProxy/settings.py | geebytes/GeeProxy | 6f2f57ef1e1e8ea9a295cf987577dab5f1cadfe5 | [
"Apache-2.0"
] | 2 | 2020-10-12T05:31:36.000Z | 2020-11-30T07:39:06.000Z | GeeProxy/settings.py | geebytes/GeeProxy | 6f2f57ef1e1e8ea9a295cf987577dab5f1cadfe5 | [
"Apache-2.0"
] | 1 | 2021-04-19T11:14:59.000Z | 2021-04-19T11:14:59.000Z | GeeProxy/settings.py | geebytes/GeeProxy | 6f2f57ef1e1e8ea9a295cf987577dab5f1cadfe5 | [
"Apache-2.0"
] | 1 | 2021-09-30T04:36:10.000Z | 2021-09-30T04:36:10.000Z | '''
@Author: qinzhonghe96@163.com
@Date: 2020-03-01 02:10:32
@LastEditors: qinzhonghe96@163.com
@LastEditTime: 2020-03-14 21:55:26
@Description: 配置文件
'''
# -*- coding: utf-8 -*-
import os
import requests
# Scrapy settings for GeeProxy project
#
# For simplicity, this file contains only settings considered important or... | 26.403704 | 102 | 0.71637 |
c8e6d179c2955c72b00d72bd263c23632103a210 | 162 | py | Python | src/spaceone/inventory/scheduler/__init__.py | choonho/inventory | cc89757490d28fecb7ffccdfd6f89d4c0aa40da5 | [
"Apache-2.0"
] | null | null | null | src/spaceone/inventory/scheduler/__init__.py | choonho/inventory | cc89757490d28fecb7ffccdfd6f89d4c0aa40da5 | [
"Apache-2.0"
] | null | null | null | src/spaceone/inventory/scheduler/__init__.py | choonho/inventory | cc89757490d28fecb7ffccdfd6f89d4c0aa40da5 | [
"Apache-2.0"
] | null | null | null | from spaceone.inventory.scheduler.inventory_scheduler import InventoryHourlyScheduler
from spaceone.inventory.scheduler.cleanup_scheduler import CleanupScheduler
| 54 | 85 | 0.91358 |
c8e6ec487f2bd82c186d826d5858c80fb2547b13 | 431 | py | Python | week7/lab07.03-getWeather2.py | mikequaid/DR | 3f54ad37d841cd910cffae11176db783681c2479 | [
"Apache-2.0"
] | null | null | null | week7/lab07.03-getWeather2.py | mikequaid/DR | 3f54ad37d841cd910cffae11176db783681c2479 | [
"Apache-2.0"
] | null | null | null | week7/lab07.03-getWeather2.py | mikequaid/DR | 3f54ad37d841cd910cffae11176db783681c2479 | [
"Apache-2.0"
] | null | null | null | import requests
import json
#url = "https://reports.sem-o.com/api/v1/documents/static-reports"
# Above URL was permanently moved to the one below:
url= "https://prodapi.metweb.ie/observations/newport-furnace/today"
response = requests.get(url)
data = response.json() # get the data
print(data)
for row in data:
... | 22.684211 | 67 | 0.719258 |
c8e72b1a29a91469bfb4de257be74fe11ad245a4 | 2,375 | py | Python | Unit4Project4/netflix/kmeans.py | tritus/ml-courses | 687c5006863ead9bee07dc3d76245a173c21528e | [
"MIT"
] | 7 | 2017-04-01T17:18:35.000Z | 2022-01-12T05:23:23.000Z | Unit4Project4/netflix/kmeans.py | tritus/ml-courses | 687c5006863ead9bee07dc3d76245a173c21528e | [
"MIT"
] | 6 | 2020-05-24T13:36:50.000Z | 2022-02-15T06:44:20.000Z | Unit4Project4/netflix/kmeans.py | tritus/ml-courses | 687c5006863ead9bee07dc3d76245a173c21528e | [
"MIT"
] | 2 | 2018-09-20T01:07:39.000Z | 2019-02-22T14:55:38.000Z | """Mixture model based on kmeans"""
from typing import Tuple
import numpy as np
from common import GaussianMixture
def estep(X: np.ndarray, mixture: GaussianMixture) -> np.ndarray:
"""E-step: Assigns each datapoint to the gaussian component with the
closest mean
Args:
X: (n, d) array holding the ... | 26.988636 | 76 | 0.595789 |
c8e75cd0b865bb3f577d6378f80929b0b913fad4 | 221 | py | Python | Analysis/TimeSeries/MultiSC.py | ahmadryan/TurbAn | b8866d103a2ca2f5fbad73bcd4416f19299f22b2 | [
"BSD-2-Clause-Patent"
] | null | null | null | Analysis/TimeSeries/MultiSC.py | ahmadryan/TurbAn | b8866d103a2ca2f5fbad73bcd4416f19299f22b2 | [
"BSD-2-Clause-Patent"
] | null | null | null | Analysis/TimeSeries/MultiSC.py | ahmadryan/TurbAn | b8866d103a2ca2f5fbad73bcd4416f19299f22b2 | [
"BSD-2-Clause-Patent"
] | 10 | 2019-03-22T15:30:12.000Z | 2021-02-10T02:55:50.000Z | #!/usr/bin/env python
import random as rnd
import numpy as np
import numpy.fft as nf
import pandas as pd
pi = np.pi
def ms_inc(df1,df2):
df=df1-df2
df['dr']=np.sqrt(df['x']**2+df['y']**2+df['z']**2)
return df
| 15.785714 | 53 | 0.633484 |
c8e7a5a8d7f45ef5b90e52d5c059f91dc6ed45d1 | 10,466 | py | Python | synthesizer/preprocess.py | zhoulinmin/Real-Time-Voice-Cloning | e619e53817faaf9be9ef346e54a827498e790eb0 | [
"MIT"
] | null | null | null | synthesizer/preprocess.py | zhoulinmin/Real-Time-Voice-Cloning | e619e53817faaf9be9ef346e54a827498e790eb0 | [
"MIT"
] | null | null | null | synthesizer/preprocess.py | zhoulinmin/Real-Time-Voice-Cloning | e619e53817faaf9be9ef346e54a827498e790eb0 | [
"MIT"
] | null | null | null | from multiprocessing.pool import Pool
from synthesizer import audio
from functools import partial
from itertools import chain
from encoder import inference as encoder
from pathlib import Path
from utils import logmmse
from tqdm import tqdm
import numpy as np
import librosa
def preprocess_librispeech(datasets_root: P... | 46.515556 | 100 | 0.663386 |
c8e7b0c4eaeaa4a06a6ded17faa996460c11f746 | 8,194 | py | Python | Python n-rule maps/n_rule_maps.py | samueleverett01/N-Rule-Maps | 2a0be52a3bc6c49788cd5dc4481598e9f2b79a6b | [
"MIT"
] | 1 | 2020-05-06T16:53:44.000Z | 2020-05-06T16:53:44.000Z | Python n-rule maps/n_rule_maps.py | samueleverett01/N-Rule-Maps | 2a0be52a3bc6c49788cd5dc4481598e9f2b79a6b | [
"MIT"
] | null | null | null | Python n-rule maps/n_rule_maps.py | samueleverett01/N-Rule-Maps | 2a0be52a3bc6c49788cd5dc4481598e9f2b79a6b | [
"MIT"
] | null | null | null | import math
import matplotlib.pyplot as plt
import random
import numpy as np
def lineAngle(slope1, slope2):
#for angle between two lines use
ang = math.atan(abs((slope2-slope1) / (1 + (slope2*slope1))))
return ang
def lineZero(m, b):
# find the root of the passed line, want when y=0
x = (-b)/m
... | 33.859504 | 124 | 0.609714 |
c8e7c4d3128f63f5d79f2a761865163530ac6d43 | 404 | py | Python | openstack/log_filter.py | lyqgenius/python_example_wsgi | f7f5bfe47b64ef6e9e7ad823f568327f295f9b79 | [
"Apache-2.0"
] | null | null | null | openstack/log_filter.py | lyqgenius/python_example_wsgi | f7f5bfe47b64ef6e9e7ad823f568327f295f9b79 | [
"Apache-2.0"
] | null | null | null | openstack/log_filter.py | lyqgenius/python_example_wsgi | f7f5bfe47b64ef6e9e7ad823f568327f295f9b79 | [
"Apache-2.0"
] | null | null | null | class LogFilter():
def __init__(self, app):
self.app = app
pass
def __call__(self, environ, start_response):
print "filter:LogFilter is called."
print 'app:', self.app
return self.app(environ, start_response)
@classmethod
def factory(cls, global_conf, **kwargs):... | 26.933333 | 57 | 0.631188 |
c8e7c9ce19797a67cd7b19c43ae18c228d8dcac1 | 67,676 | py | Python | sdk/storage/azure-storage-blob/tests/test_append_blob.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/storage/azure-storage-blob/tests/test_append_blob.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/storage/azure-storage-blob/tests/test_append_blob.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.
# --------------------------------------------------------------------... | 48.409156 | 155 | 0.665627 |
c8e7ce1b963099820282c671fcd524f1542ee33b | 21,539 | py | Python | brian2/core/functions.py | achilleas-k/brian2 | 906563b6b1321585b082f79f74f1b4ab386347ec | [
"BSD-2-Clause"
] | null | null | null | brian2/core/functions.py | achilleas-k/brian2 | 906563b6b1321585b082f79f74f1b4ab386347ec | [
"BSD-2-Clause"
] | null | null | null | brian2/core/functions.py | achilleas-k/brian2 | 906563b6b1321585b082f79f74f1b4ab386347ec | [
"BSD-2-Clause"
] | null | null | null | import types
import collections
import inspect
import sympy
from sympy import Function as sympy_Function
from sympy.core import mod as sympy_mod
import numpy as np
from numpy.random import randn, rand
from brian2.core.preferences import prefs
from brian2.units.fundamentalunits import (fail_for_dimension_mismatch, Uni... | 45.82766 | 103 | 0.583778 |
c8e7f693017acc8e54960af9c7a10d4149ebbc73 | 29,319 | py | Python | thrift/lib/py/protocol/TSimpleJSONProtocol.py | joway/fbthrift | e0d568ec7084502c653537a50f150428786d8037 | [
"Apache-2.0"
] | null | null | null | thrift/lib/py/protocol/TSimpleJSONProtocol.py | joway/fbthrift | e0d568ec7084502c653537a50f150428786d8037 | [
"Apache-2.0"
] | null | null | null | thrift/lib/py/protocol/TSimpleJSONProtocol.py | joway/fbthrift | e0d568ec7084502c653537a50f150428786d8037 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# 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 ... | 32.077681 | 83 | 0.59163 |
c8e84bed1a41b539430e35bd06297590e880e03e | 1,553 | py | Python | dashboards/logistic.py | bodokaiser/complex-systems | 5e348d9cc382059b316ccc0a391183ba65aa8f3f | [
"Apache-2.0"
] | 2 | 2019-04-22T17:32:33.000Z | 2019-10-03T18:09:01.000Z | dashboards/logistic.py | bodokaiser/complex-systems | 5e348d9cc382059b316ccc0a391183ba65aa8f3f | [
"Apache-2.0"
] | null | null | null | dashboards/logistic.py | bodokaiser/complex-systems | 5e348d9cc382059b316ccc0a391183ba65aa8f3f | [
"Apache-2.0"
] | null | null | null | import numpy as np
from dash import Dash
from dash.dependencies import Input, Output
import dash_html_components as html
import dash_core_components as core
from plotly import graph_objs as go
from dynamics import logistic_map
app = Dash(__name__)
app.layout = html.Div(children=[
html.H1(children='Logistic m... | 23.892308 | 64 | 0.56085 |
c8e8537409f4f709b743ad30367721e27b2ad1da | 861 | py | Python | masonite/providers/SessionProvider.py | theodesp/core | 3fa78a87d1c813d05c6d03d8ee4acb81c8c16ab7 | [
"MIT"
] | null | null | null | masonite/providers/SessionProvider.py | theodesp/core | 3fa78a87d1c813d05c6d03d8ee4acb81c8c16ab7 | [
"MIT"
] | null | null | null | masonite/providers/SessionProvider.py | theodesp/core | 3fa78a87d1c813d05c6d03d8ee4acb81c8c16ab7 | [
"MIT"
] | null | null | null | """ A RedirectionProvider Service Provider """
from config import session
from masonite.drivers import SessionCookieDriver, SessionMemoryDriver
from masonite.managers import SessionManager
from masonite.provider import ServiceProvider
class SessionProvider(ServiceProvider):
def register(self):
self.app.... | 34.44 | 79 | 0.7259 |
c8e87d6ece6ce226ac3a299b6b0212138f55385e | 18,304 | py | Python | src/hydride/fragments.py | biotite-dev/hydride | 4b5a1c4348cf8f9b0878c1480a09ffcf101cba48 | [
"BSD-3-Clause"
] | 2 | 2021-11-03T15:11:44.000Z | 2022-02-07T12:32:05.000Z | src/hydride/fragments.py | biotite-dev/hydride | 4b5a1c4348cf8f9b0878c1480a09ffcf101cba48 | [
"BSD-3-Clause"
] | 1 | 2021-11-02T17:35:05.000Z | 2021-11-02T17:35:05.000Z | src/hydride/fragments.py | biotite-dev/hydride | 4b5a1c4348cf8f9b0878c1480a09ffcf101cba48 | [
"BSD-3-Clause"
] | 1 | 2022-01-14T13:26:56.000Z | 2022-01-14T13:26:56.000Z | # This source code is part of the Hydride package and is distributed
# under the 3-Clause BSD License. Please see 'LICENSE.rst' for further
# information.
__name__ = "hydride"
__author__ = "Patrick Kunzmann"
__all__ = ["FragmentLibrary"]
from os.path import join, dirname, abspath
import warnings
import pickle
from bi... | 39.533477 | 83 | 0.60047 |
c8e8bd6a4f78bf6108452f715cf9c3ceb3616201 | 915 | py | Python | nova/consoleauth/__init__.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | nova/consoleauth/__init__.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | nova/consoleauth/__init__.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 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 r... | 33.888889 | 77 | 0.734426 |
c8e8fa599391c0c5c4ed39a1ab83fe3ad3edb5ec | 1,561 | py | Python | config.py | zapodeanu/cisco_dnac_webhook | 557e8b6de7ad4eb1479c1209a6887c03685d59cc | [
"BSD-Source-Code"
] | 1 | 2019-12-28T02:11:18.000Z | 2019-12-28T02:11:18.000Z | config.py | zapodeanu/cisco_dnac_webhook | 557e8b6de7ad4eb1479c1209a6887c03685d59cc | [
"BSD-Source-Code"
] | null | null | null | config.py | zapodeanu/cisco_dnac_webhook | 557e8b6de7ad4eb1479c1209a6887c03685d59cc | [
"BSD-Source-Code"
] | 1 | 2019-12-28T02:11:20.000Z | 2019-12-28T02:11:20.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Copyright (c) 2019 Cisco and/or its affiliates.
This software is licensed to you under the terms of the Cisco Sample
Code License, Version 1.1 (the "License"). You may obtain a copy of the
License at
https://developer.cisco.com/docs/licenses
All use... | 29.45283 | 72 | 0.752082 |
c8e94c686695974b3d2d44c6da7143995244158e | 2,190 | py | Python | plugins/maya/publish/validate_shape_render_stats.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 3 | 2020-04-01T10:51:17.000Z | 2021-08-05T18:35:23.000Z | plugins/maya/publish/validate_shape_render_stats.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | null | null | null | plugins/maya/publish/validate_shape_render_stats.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 1 | 2020-07-05T12:06:30.000Z | 2020-07-05T12:06:30.000Z |
import pyblish.api
from reveries import plugins
class RepairInvalid(plugins.RepairInstanceAction):
label = "Reset To Default"
class ValidateShapeRenderStats(pyblish.api.Validator):
"""Ensure all render stats are set to the default values."""
label = "Shape Render Stats"
order = pyblish.api.Valida... | 28.815789 | 70 | 0.576712 |
c8e94ef5d46f8f46e82e72b417bbd569e2d0df11 | 1,026 | py | Python | workmanager/migrations/0002_auto_20200110_1255.py | AlexisDeReyes/PyWorkManagerApi | c04b59ab8884f5ccbe87c0f3ac3dc241c04c9e8d | [
"Apache-2.0"
] | null | null | null | workmanager/migrations/0002_auto_20200110_1255.py | AlexisDeReyes/PyWorkManagerApi | c04b59ab8884f5ccbe87c0f3ac3dc241c04c9e8d | [
"Apache-2.0"
] | null | null | null | workmanager/migrations/0002_auto_20200110_1255.py | AlexisDeReyes/PyWorkManagerApi | c04b59ab8884f5ccbe87c0f3ac3dc241c04c9e8d | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.0.2 on 2020-01-10 17:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('workmanager', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='task',
name='id',
field... | 28.5 | 119 | 0.573099 |
c8e95135a50630ac57aefe65a68acd75d4b207ca | 1,097 | py | Python | thatkitebot/tkb_first_setup.py | blablabliam/thatkitebot | 741e59993f05eb437b46d4839db517af7b8f0357 | [
"MIT"
] | null | null | null | thatkitebot/tkb_first_setup.py | blablabliam/thatkitebot | 741e59993f05eb437b46d4839db517af7b8f0357 | [
"MIT"
] | null | null | null | thatkitebot/tkb_first_setup.py | blablabliam/thatkitebot | 741e59993f05eb437b46d4839db517af7b8f0357 | [
"MIT"
] | null | null | null | # Copyright (c) 2019-2022 ThatRedKite and contributors
import os
import yaml
import redis
settings = {}
r = redis.Redis(host="redis", db=0, charset="utf8", decode_responses=True)
def change_prefix(prefix):
r.set("PREFIX", prefix)
def change_discordtoken(token):
r.set("DISCORDTOKEN", token)
def change_... | 26.119048 | 79 | 0.646308 |
c8e98eafd8f1cfe2a59f7845a9b249087f1c3b0d | 467 | py | Python | dataSet/Scripts/easy_install-3.7-script.py | MaciejMilanski/SignsRecognition | 2c43ca169b1a31d0c8e9ffa490800d26d642c458 | [
"MIT"
] | null | null | null | dataSet/Scripts/easy_install-3.7-script.py | MaciejMilanski/SignsRecognition | 2c43ca169b1a31d0c8e9ffa490800d26d642c458 | [
"MIT"
] | null | null | null | dataSet/Scripts/easy_install-3.7-script.py | MaciejMilanski/SignsRecognition | 2c43ca169b1a31d0c8e9ffa490800d26d642c458 | [
"MIT"
] | null | null | null | #!"C:\Moje\GitHub Repository\SignsRecognition\dataSet\Scripts\python.exe"
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.1.0','console_scripts','easy_install-3.7'
__requires__ = 'setuptools==39.1.0'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-sc... | 35.923077 | 87 | 0.695931 |
c8e9aa504363ddbf6adda2d68ae7e3d2678425bf | 20,906 | py | Python | common/f5/bigip/interfaces/device.py | Sinan828/oslbaasv1_for_cmcc | 52318460b704ed5f08491b482b47aae61bf166ca | [
"Apache-2.0"
] | null | null | null | common/f5/bigip/interfaces/device.py | Sinan828/oslbaasv1_for_cmcc | 52318460b704ed5f08491b482b47aae61bf166ca | [
"Apache-2.0"
] | null | null | null | common/f5/bigip/interfaces/device.py | Sinan828/oslbaasv1_for_cmcc | 52318460b704ed5f08491b482b47aae61bf166ca | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 F5 Networks 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... | 38.359633 | 78 | 0.576533 |
c8e9bc3b3bbd7d12d5688b8cca05b0f48876aba6 | 8,483 | py | Python | gftool/lattice/honeycomb.py | DerWeh/gftools | a123c3d2aa62bcf9c2c7fcc15121cf60d09df020 | [
"MIT"
] | 12 | 2020-10-09T10:05:44.000Z | 2022-02-22T14:04:19.000Z | gftool/lattice/honeycomb.py | DerWeh/gftools | a123c3d2aa62bcf9c2c7fcc15121cf60d09df020 | [
"MIT"
] | 20 | 2020-01-28T09:15:27.000Z | 2022-02-06T16:48:30.000Z | gftool/lattice/honeycomb.py | DerWeh/gftools | a123c3d2aa62bcf9c2c7fcc15121cf60d09df020 | [
"MIT"
] | 6 | 2021-03-09T19:10:37.000Z | 2022-02-02T14:29:06.000Z | r"""2D honeycomb lattice.
The honeycomb lattice can be decomposed into `~gftool.lattice.triangular`
sublattices.
:half_bandwidth: The half-bandwidth `D` corresponds to a nearest neighbor hopping
of `t=2D/3`.
"""
from mpmath import mp
from gftool.lattice import triangular
def gf_z(z, half_bandwidt... | 29.975265 | 98 | 0.620889 |
c8e9c7121d7b617c0a4243a080ae729d7568c5e1 | 15,538 | py | Python | myproject/common/enums.py | sert121/privacy-sharing | 69f712b0524361c8a3b4db0574a13ce914222695 | [
"MIT"
] | 3 | 2018-08-15T16:17:19.000Z | 2020-01-13T22:20:49.000Z | myproject/common/enums.py | sert121/privacy-sharing | 69f712b0524361c8a3b4db0574a13ce914222695 | [
"MIT"
] | 45 | 2018-06-23T18:02:28.000Z | 2021-08-25T14:46:12.000Z | myproject/common/enums.py | sert121/privacy-sharing | 69f712b0524361c8a3b4db0574a13ce914222695 | [
"MIT"
] | null | null | null | __author__ = "Alex Laird"
__copyright__ = "Copyright 2018, Alex Laird"
__version__ = "0.2.0"
TIME_ZONE_CHOICES = (
('Africa',
[('Africa/Abidjan', 'Abidjan'), ('Africa/Accra', 'Accra'), ('Africa/Addis_Ababa', 'Addis_Ababa'),
('Africa/Algiers', 'Algiers'), ('Africa/Asmara', 'Asmara'), ('Africa/Bamako', 'B... | 89.815029 | 116 | 0.624469 |
c8e9cce47a45b57f258145bebacd5bb68ae7d7e4 | 1,752 | py | Python | server/resources/edit.py | simon-dube/CARMIN-server | 1481d2c4231458d33119c57ab2e3e480375da63b | [
"MIT"
] | 1 | 2018-03-12T23:08:12.000Z | 2018-03-12T23:08:12.000Z | server/resources/edit.py | simon-dube/CARMIN-server | 1481d2c4231458d33119c57ab2e3e480375da63b | [
"MIT"
] | 15 | 2018-03-15T04:23:31.000Z | 2018-06-28T21:46:15.000Z | server/resources/edit.py | simon-dube/CARMIN-server | 1481d2c4231458d33119c57ab2e3e480375da63b | [
"MIT"
] | null | null | null | from flask_restful import Resource
from werkzeug.security import generate_password_hash
from server.database import db
from server.database.models.user import User, Role
from server.common.error_codes_and_messages import (
UNAUTHORIZED, USER_DOES_NOT_EXIST, INVALID_MODEL_PROVIDED,
ErrorCodeAndMessageFormatter, ... | 46.105263 | 78 | 0.674087 |
c8e9dd019ec29ea7665232147596665a146aeae9 | 7,601 | py | Python | src/word_categorizer.py | glicerico/wordcat_transformer | f1b2f105c0878aeac5755003eafebd23edf49cad | [
"Apache-2.0"
] | null | null | null | src/word_categorizer.py | glicerico/wordcat_transformer | f1b2f105c0878aeac5755003eafebd23edf49cad | [
"Apache-2.0"
] | null | null | null | src/word_categorizer.py | glicerico/wordcat_transformer | f1b2f105c0878aeac5755003eafebd23edf49cad | [
"Apache-2.0"
] | null | null | null | import argparse
import os
import pickle
import numpy as np
from sklearn.cluster import KMeans, DBSCAN, OPTICS
from sklearn.preprocessing import normalize
from spherecluster import SphericalKMeans, VonMisesFisherMixture
from tqdm import tqdm
class WordCategorizer:
def __init__(self):
self.matrix = None #... | 46.347561 | 120 | 0.635311 |
c8e9ed8cf7daab6d1bb9fc7bec4f90a830ad9d35 | 106,873 | py | Python | user_data_store/api/user_data_api.py | hedleyroos/core-management-layer | 2a25bf5fb44fd511b8b2626ec09a4bc05098334c | [
"BSD-3-Clause"
] | null | null | null | user_data_store/api/user_data_api.py | hedleyroos/core-management-layer | 2a25bf5fb44fd511b8b2626ec09a4bc05098334c | [
"BSD-3-Clause"
] | 90 | 2018-01-23T10:30:01.000Z | 2019-01-31T10:53:42.000Z | user_data_store/api/user_data_api.py | hedleyroos/core-management-layer | 2a25bf5fb44fd511b8b2626ec09a4bc05098334c | [
"BSD-3-Clause"
] | 1 | 2021-08-17T14:16:23.000Z | 2021-08-17T14:16:23.000Z | # coding: utf-8
"""
User Data API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version:
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
# pytho... | 40.042338 | 174 | 0.609331 |
c8e9f34e36661002d6d8ac31ff459304fc8d3c4c | 53 | py | Python | src/tests/test4.py | ArkiWang/LeetcodePy | 6b4af8da843910823f7f53989bbda4ec8e6dad15 | [
"MIT"
] | null | null | null | src/tests/test4.py | ArkiWang/LeetcodePy | 6b4af8da843910823f7f53989bbda4ec8e6dad15 | [
"MIT"
] | null | null | null | src/tests/test4.py | ArkiWang/LeetcodePy | 6b4af8da843910823f7f53989bbda4ec8e6dad15 | [
"MIT"
] | null | null | null | s = "01234567"
index = s.find('1', 0, 1)
print(index) | 17.666667 | 25 | 0.603774 |
c8e9fefc6b3f0eaf368565252469704e4f841e8d | 2,439 | py | Python | env/Lib/site-packages/azure/storage/connection.py | Ammar12/simplebanking | 6080d638b2e98bfcf96d782703e1dce25aebfcbc | [
"MIT"
] | null | null | null | env/Lib/site-packages/azure/storage/connection.py | Ammar12/simplebanking | 6080d638b2e98bfcf96d782703e1dce25aebfcbc | [
"MIT"
] | null | null | null | env/Lib/site-packages/azure/storage/connection.py | Ammar12/simplebanking | 6080d638b2e98bfcf96d782703e1dce25aebfcbc | [
"MIT"
] | null | null | null | #-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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://w... | 49.77551 | 116 | 0.641246 |
c8ea158807cc5cbe488ae6a988b6674fe3f829ec | 1,328 | py | Python | sasstastic/logs.py | mateuszz0000/sasstastic | 562b41c201c4d02bbc403044b1f946f4ab46f9ab | [
"MIT"
] | null | null | null | sasstastic/logs.py | mateuszz0000/sasstastic | 562b41c201c4d02bbc403044b1f946f4ab46f9ab | [
"MIT"
] | null | null | null | sasstastic/logs.py | mateuszz0000/sasstastic | 562b41c201c4d02bbc403044b1f946f4ab46f9ab | [
"MIT"
] | null | null | null | import logging
import logging.config
import click
class ClickHandler(logging.Handler):
formats = {
logging.DEBUG: {'fg': 'white', 'dim': True},
logging.INFO: {'fg': 'cyan'},
logging.WARN: {'fg': 'yellow'},
}
def get_log_format(self, record):
return self.formats.get(record... | 30.883721 | 112 | 0.612199 |
c8ea179504e6905a52468751aea1ddd4112a475e | 3,023 | py | Python | opal_common/paths.py | Hongbo-Miao/opal | 736fc9e12248cf597d9fdbf727247ea5aff1aa46 | [
"Apache-2.0"
] | 367 | 2021-04-11T11:58:35.000Z | 2022-02-24T15:33:54.000Z | opal_common/paths.py | asafcsimpleorg/opal | 262a296e5a2d06e9d1b15fcf3cc9adf68e12fd91 | [
"Apache-2.0"
] | 63 | 2021-04-14T07:00:44.000Z | 2021-12-07T12:05:38.000Z | opal_common/paths.py | asafcsimpleorg/opal | 262a296e5a2d06e9d1b15fcf3cc9adf68e12fd91 | [
"Apache-2.0"
] | 32 | 2021-04-11T12:53:53.000Z | 2021-12-04T19:57:42.000Z | from typing import List, Set, Union
from pathlib import Path
from opal_common.utils import sorted_list_from_set
class PathUtils:
@staticmethod
def intermediate_directories(paths: List[Path]) -> List[Path]:
"""
returns the set of all parent directories for a list of paths.
i.e: calculat... | 41.986111 | 121 | 0.646378 |
c8ea1e5bad44733e41096b5525e5c0f7f2fa1337 | 5,137 | py | Python | stellarlab/kinetics/potential.py | wangleon/stella | 3942f8e687065bb96760140596747cbbe6dad04b | [
"Apache-2.0"
] | null | null | null | stellarlab/kinetics/potential.py | wangleon/stella | 3942f8e687065bb96760140596747cbbe6dad04b | [
"Apache-2.0"
] | null | null | null | stellarlab/kinetics/potential.py | wangleon/stella | 3942f8e687065bb96760140596747cbbe6dad04b | [
"Apache-2.0"
] | 1 | 2021-10-02T02:18:28.000Z | 2021-10-02T02:18:28.000Z | import math
from ..constant import G, M_sun, pc
kpc = pc*1e3
varG = G*M_sun/kpc**2
class Potential(object):
"""General class for potential.
"""
def __init__(self):
pass
class PointPotential(Potential):
"""Class for point potential
"""
def __init__(self, M):
self.M = M
de... | 31.709877 | 85 | 0.525793 |
c8ea541ca55b00cbddf062c2ce10c260490eed11 | 528 | py | Python | gordon/configurations/ad_user_config.py | twilio-labs/gordon | 05c77a08c725180d21a988c9999cbefc295f4c8f | [
"MIT"
] | 12 | 2021-09-09T00:57:53.000Z | 2022-02-11T00:56:12.000Z | gordon/configurations/ad_user_config.py | twilio-labs/gordon | 05c77a08c725180d21a988c9999cbefc295f4c8f | [
"MIT"
] | null | null | null | gordon/configurations/ad_user_config.py | twilio-labs/gordon | 05c77a08c725180d21a988c9999cbefc295f4c8f | [
"MIT"
] | 1 | 2021-09-15T15:52:08.000Z | 2021-09-15T15:52:08.000Z | from gordon.services.common.secrets_loader import get_secrets
from celery.utils.log import get_task_logger
logger = get_task_logger(__name__)
class ADUserException(Exception):
pass
# These credentials are used to access your Jira server to validate the Jira project ID mentioned in the about.yaml file
class ADU... | 29.333333 | 120 | 0.755682 |
c8ea6af81c177c0c996b7646751f0d578af18042 | 437,580 | py | Python | tencentcloud/cdn/v20180606/models.py | lleiyyang/tencentcloud-sdk-python | e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b | [
"Apache-2.0"
] | null | null | null | tencentcloud/cdn/v20180606/models.py | lleiyyang/tencentcloud-sdk-python | e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b | [
"Apache-2.0"
] | null | null | null | tencentcloud/cdn/v20180606/models.py | lleiyyang/tencentcloud-sdk-python | e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf8 -*-
# Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses... | 30.184176 | 154 | 0.607343 |
c8ea7a0eea9f9584edfb026d0eaf8031a12b21c3 | 6,622 | py | Python | custom_components/hasl3/config_flow.py | jadlers/integration | f8a489ce6febdada9330cf8b319d71d34e8efb89 | [
"Apache-2.0"
] | 22 | 2020-05-16T20:51:54.000Z | 2022-03-26T21:59:11.000Z | custom_components/hasl3/config_flow.py | jadlers/integration | f8a489ce6febdada9330cf8b319d71d34e8efb89 | [
"Apache-2.0"
] | 32 | 2020-05-20T11:44:31.000Z | 2022-03-25T10:43:14.000Z | custom_components/hasl3/config_flow.py | jadlers/integration | f8a489ce6febdada9330cf8b319d71d34e8efb89 | [
"Apache-2.0"
] | 10 | 2021-01-05T12:02:56.000Z | 2022-01-17T11:09:33.000Z | """Config flow for the HASL component."""
import voluptuous
import logging
import uuid
from homeassistant import config_entries
from homeassistant.exceptions import HomeAssistantError
from homeassistant.core import callback
from .const import (
DOMAIN,
HASL_VERSION,
CONF_NAME,
SENSOR_STANDARD,
SEN... | 40.625767 | 142 | 0.663546 |
c8ea7ec378539330078445cfe91c9fc66a1704cb | 2,806 | py | Python | API/src/main/resources/Lib/robot/utils/unic.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | API/src/main/resources/Lib/robot/utils/unic.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | API/src/main/resources/Lib/robot/utils/unic.py | TagExpress/SikuliX1 | de9da11794dd94b3821eddc5c01b534d3f2fe828 | [
"MIT"
] | null | null | null | # Copyright (c) 2010-2020, sikuli.org, sikulix.com - MIT license
#
# 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 b... | 31.52809 | 80 | 0.616892 |
c8ea8ff5357849eb12a47320e0456324b7edc546 | 2,136 | py | Python | interlink/admin.py | alexmorozov/django-interlink | 6f637f860cd61625185d9eaa3faeab3277f33db1 | [
"MIT"
] | 1 | 2017-06-29T17:22:31.000Z | 2017-06-29T17:22:31.000Z | interlink/admin.py | alexmorozov/django-interlink | 6f637f860cd61625185d9eaa3faeab3277f33db1 | [
"MIT"
] | null | null | null | interlink/admin.py | alexmorozov/django-interlink | 6f637f860cd61625185d9eaa3faeab3277f33db1 | [
"MIT"
] | 1 | 2020-04-13T14:40:51.000Z | 2020-04-13T14:40:51.000Z | #--coding: utf8--
from django.contrib import admin
from django.contrib.contenttypes.admin import GenericTabularInline
from django.db import models
from django.utils.translation import ugettext_lazy as _
from interlink.models import Keyword, Link
class KeywordsInline(GenericTabularInline):
model = Keyword
clas... | 28.48 | 75 | 0.654026 |
c8eaacbc220b6f21f1ae1d003d119b12c9e556e7 | 3,269 | py | Python | snf/experiments/selfnorm_cnn_mnist.py | AnonICML/SelfNormalizingFlows | f924e786b83e4766241c6ece90b5195a3acc9e64 | [
"MIT"
] | 66 | 2020-11-17T12:06:52.000Z | 2022-02-05T23:58:15.000Z | snf/experiments/selfnorm_cnn_mnist.py | AnonICML/SelfNormalizingFlows | f924e786b83e4766241c6ece90b5195a3acc9e64 | [
"MIT"
] | 1 | 2021-07-26T19:29:32.000Z | 2021-07-27T16:23:03.000Z | snf/experiments/selfnorm_cnn_mnist.py | AnonICML/SelfNormalizingFlows | f924e786b83e4766241c6ece90b5195a3acc9e64 | [
"MIT"
] | 8 | 2020-11-17T17:42:51.000Z | 2022-03-14T14:12:37.000Z | import torch
from torch import optim
from torch.optim.lr_scheduler import StepLR
from snf.layers import Dequantization, Normalization
from snf.layers.distributions.uniform import UniformDistribution
from snf.layers.flowsequential import FlowSequential
from snf.layers.selfnorm import SelfNormConv
from snf.layers.activa... | 36.730337 | 90 | 0.616396 |
c8eaae5bb1f06b6df17d4b7250004038fd5a69f3 | 4,970 | py | Python | test/generate_synth_data.py | slinderman/theano_pyglm | c7fc11069dfe91b0eb7c96b8464fcd0f57442952 | [
"MIT"
] | 37 | 2015-04-08T15:11:51.000Z | 2022-01-05T19:32:58.000Z | test/generate_synth_data.py | slinderman/theano_pyglm | c7fc11069dfe91b0eb7c96b8464fcd0f57442952 | [
"MIT"
] | 2 | 2016-03-08T02:39:58.000Z | 2017-03-29T08:51:08.000Z | test/generate_synth_data.py | slinderman/theano_pyglm | c7fc11069dfe91b0eb7c96b8464fcd0f57442952 | [
"MIT"
] | 10 | 2015-02-25T21:47:50.000Z | 2020-03-06T00:21:48.000Z | # Run as script using 'python -m test.synth_map'
import cPickle
import os
import numpy as np
from pyglm.population import Population
from pyglm.models.model_factory import make_model, \
stabilize_sparsity, \
check_stability
from pyglm.plotting.plot_res... | 34.041096 | 93 | 0.621328 |
c8eab7529d57acd211fe6f9e94e6005c44e76c0d | 5,110 | py | Python | sdk/python/kfp/gcp.py | cclauss/pipelines | 2592307cceb72fdb61be2673f67d7b4a4bd12023 | [
"Apache-2.0"
] | 3 | 2019-09-18T01:33:27.000Z | 2021-06-09T08:19:10.000Z | sdk/python/kfp/gcp.py | cclauss/pipelines | 2592307cceb72fdb61be2673f67d7b4a4bd12023 | [
"Apache-2.0"
] | null | null | null | sdk/python/kfp/gcp.py | cclauss/pipelines | 2592307cceb72fdb61be2673f67d7b4a4bd12023 | [
"Apache-2.0"
] | 5 | 2020-08-31T08:48:46.000Z | 2021-11-26T07:29:04.000Z | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 44.434783 | 171 | 0.630333 |
c8ead451a9cc7eaf5ab1bacbf85b8ebc9a37c935 | 10,075 | py | Python | new-venv/lib/python3.6/site-packages/python_freeipa/cli_recreate.py | superteece/Flask-FreeIPA | edbeb8ea776a1a0e94af049b15e126778cf8cb38 | [
"MIT"
] | 1 | 2020-06-30T16:48:20.000Z | 2020-06-30T16:48:20.000Z | new-venv/lib/python3.6/site-packages/python_freeipa/cli_recreate.py | superteece/Flask-FreeIPA | edbeb8ea776a1a0e94af049b15e126778cf8cb38 | [
"MIT"
] | null | null | null | new-venv/lib/python3.6/site-packages/python_freeipa/cli_recreate.py | superteece/Flask-FreeIPA | edbeb8ea776a1a0e94af049b15e126778cf8cb38 | [
"MIT"
] | null | null | null | import argparse
import json
import logging
import sys
def main():
parser = argparse.ArgumentParser(description="Recreate API Commands from JSON api spec")
source_group = parser.add_mutually_exclusive_group(required=True)
source_group.add_argument(
"--source-json", dest="source_json", action="sto... | 34.621993 | 119 | 0.570422 |
c8eb3216d895f8b9c4606ba94340a0fe8139c6a1 | 6,392 | py | Python | examples/to_ssa.py | terrelln/bril | c89a00988684c1aa14612823758804da6b98436c | [
"MIT"
] | null | null | null | examples/to_ssa.py | terrelln/bril | c89a00988684c1aa14612823758804da6b98436c | [
"MIT"
] | null | null | null | examples/to_ssa.py | terrelln/bril | c89a00988684c1aa14612823758804da6b98436c | [
"MIT"
] | null | null | null | import json
import sys
from collections import defaultdict
from cfg import block_map, successors, add_terminators, add_entry, reassemble
from form_blocks import form_blocks
from dom import get_dom, dom_fronts, dom_tree, map_inv
def def_blocks(blocks):
"""Get a map from variable names to defining blocks.
"""
... | 30.00939 | 78 | 0.574312 |
c8eb48dbfb13d445e7008141f764867247e63094 | 3,291 | py | Python | docs/samples/specification/multiapi/generated/azure/multiapi/sample/v3/models/_models_py3.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | docs/samples/specification/multiapi/generated/azure/multiapi/sample/v3/models/_models_py3.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | docs/samples/specification/multiapi/generated/azure/multiapi/sample/v3/models/_models_py3.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.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 ... | 25.122137 | 94 | 0.555454 |
c8eb6e6db58f59726becf8ff0d8bbb302bb568ca | 17,200 | py | Python | jina/peapods/runtimes/zmq/zed.py | abellimz/jina | 010789331ce896ffcaea897402d698944f1a9d40 | [
"Apache-2.0"
] | null | null | null | jina/peapods/runtimes/zmq/zed.py | abellimz/jina | 010789331ce896ffcaea897402d698944f1a9d40 | [
"Apache-2.0"
] | null | null | null | jina/peapods/runtimes/zmq/zed.py | abellimz/jina | 010789331ce896ffcaea897402d698944f1a9d40 | [
"Apache-2.0"
] | null | null | null | import argparse
import re
import time
from collections import defaultdict
from typing import Dict, List
import zmq
from .base import ZMQRuntime
from ...zmq import ZmqStreamlet
from .... import __default_endpoint__
from ....enums import OnErrorStrategy, SocketType
from ....excepts import (
NoExplicitMessage,
E... | 36.752137 | 124 | 0.62186 |
c8eb77f12f8890e17bc983f47023b48412b97f7a | 26,406 | py | Python | unfurl/runtime.py | mehak151/unfurl | db4a0fd7163462156b5958103900942ae61c5d4c | [
"MIT"
] | null | null | null | unfurl/runtime.py | mehak151/unfurl | db4a0fd7163462156b5958103900942ae61c5d4c | [
"MIT"
] | null | null | null | unfurl/runtime.py | mehak151/unfurl | db4a0fd7163462156b5958103900942ae61c5d4c | [
"MIT"
] | null | null | null | # Copyright (c) 2020 Adam Souzis
# SPDX-License-Identifier: MIT
"""
This module defines the core model and implements the runtime operations of the model.
The state of the system is represented as a collection of Instances.
Each instance have a status; attributes that describe its state; and a TOSCA template
which des... | 33.510152 | 192 | 0.614709 |
c8eb92e3aea08e9889a05727a90dbb89e346a3b2 | 7,341 | py | Python | botoflow/decider/workflow_execution_handler.py | boto/botoflow | 49d8ed3bc9c57294504be82e933a051e1901b76e | [
"Apache-2.0"
] | 13 | 2016-06-15T06:10:57.000Z | 2021-10-30T03:52:28.000Z | botoflow/decider/workflow_execution_handler.py | DalavanCloud/botoflow | 49d8ed3bc9c57294504be82e933a051e1901b76e | [
"Apache-2.0"
] | 11 | 2016-09-15T01:48:08.000Z | 2019-01-09T06:11:44.000Z | botoflow/decider/workflow_execution_handler.py | DalavanCloud/botoflow | 49d8ed3bc9c57294504be82e933a051e1901b76e | [
"Apache-2.0"
] | 16 | 2016-06-05T03:42:04.000Z | 2022-03-01T17:43:14.000Z | # Copyright 2015 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" file accompa... | 40.783333 | 100 | 0.647732 |
c8eb9c87baf0734d8e4ba833a3964948e9c4e9e5 | 26,439 | py | Python | sdk/formrecognizer/azure-ai-formrecognizer/tests/test_repr.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/formrecognizer/azure-ai-formrecognizer/tests/test_repr.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/formrecognizer/azure-ai-formrecognizer/tests/test_repr.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.
# ---------------------------------------------------------------------... | 46.141361 | 346 | 0.635841 |
c8ebb9fe96edd33e79af88dc063101845ccbd144 | 965 | py | Python | office365/sharepoint/listitems/listitem_creation_information.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | office365/sharepoint/listitems/listitem_creation_information.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | office365/sharepoint/listitems/listitem_creation_information.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | from office365.runtime.client_value import ClientValue
class ListItemCreationInformation(ClientValue):
def __init__(self, leafName=None, folderUrl=None, underlyingObjectType=None):
"""
Specifies the properties of the new list item.
:param int underlyingObjectType: Specifies whether the n... | 40.208333 | 120 | 0.691192 |
c8ebcfc0750fe7cc4ee56016ada4ce24641bae2f | 642 | py | Python | ignore_duplicates.py | adriennekarnoski/code-katas | c90c51780174110d6292b57248b77723db6ad6ac | [
"MIT"
] | null | null | null | ignore_duplicates.py | adriennekarnoski/code-katas | c90c51780174110d6292b57248b77723db6ad6ac | [
"MIT"
] | null | null | null | ignore_duplicates.py | adriennekarnoski/code-katas | c90c51780174110d6292b57248b77723db6ad6ac | [
"MIT"
] | null | null | null | """Kata: Sum a list but ignore any duplicates
Writes a function that sums a list,
but ignores any duplicate items in the list.
#1 Best Practices Solution by zebulan, ExhaleO2, DCoulter:
from collections import Counter
def sum_no_duplicates(nums):
return sum(k for k, v in Counter(nums).items() if v == 1)
"""
... | 23.777778 | 61 | 0.661994 |
c8ebcfc1667100b6285299228025fe5c35312a45 | 14,594 | py | Python | tests/models/test_version.py | cswartzvi/conda | b2e0ed6b6119b7623d8f64c47d4d04f56e9cf137 | [
"BSD-3-Clause"
] | null | null | null | tests/models/test_version.py | cswartzvi/conda | b2e0ed6b6119b7623d8f64c47d4d04f56e9cf137 | [
"BSD-3-Clause"
] | 3 | 2022-03-03T02:36:53.000Z | 2022-03-03T02:42:50.000Z | tests/models/test_version.py | cswartzvi/conda | b2e0ed6b6119b7623d8f64c47d4d04f56e9cf137 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 2012 Anaconda, Inc
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import absolute_import, print_function
from copy import copy
from random import shuffle
import unittest
from conda.exceptions import InvalidVersionSpec
from conda.models.version import VersionOrder, Ver... | 44.629969 | 104 | 0.476018 |
c8ebfafebf73b27d58f9205772f8a7348bbd1ef2 | 3,466 | py | Python | src/engine/utils.py | Plonq/liero-clone | 7b8db63e34de1b470cdb1d70874e20eab7319a29 | [
"MIT"
] | 1 | 2022-02-14T19:09:31.000Z | 2022-02-14T19:09:31.000Z | src/engine/utils.py | Plonq/liero-clone | 7b8db63e34de1b470cdb1d70874e20eab7319a29 | [
"MIT"
] | null | null | null | src/engine/utils.py | Plonq/liero-clone | 7b8db63e34de1b470cdb1d70874e20eab7319a29 | [
"MIT"
] | null | null | null | # General utils
import functools
import random
import time
import math
import pygame as pg
from pygame.math import Vector2
mask_cache = {}
def clamp(n, minn, maxn):
return max(min(maxn, n), minn)
def is_same_sign(num1, num2):
return num1 >= 0 and num2 >= 0 or num1 < 0 and num2 < 0
def throttle(timeout_m... | 28.883333 | 86 | 0.610502 |
c8ebfde4e1c4d2e8a1ff1be79e6267f22e08ca8a | 4,821 | py | Python | scripts/carla/devel/make_route_plot.py | govvijaycal/confidence_aware_predictions | c5fea8aac271dc792eedc00a689c02fcd658edec | [
"MIT"
] | 15 | 2021-08-28T11:09:22.000Z | 2022-03-19T14:38:06.000Z | scripts/carla/devel/make_route_plot.py | govvijaycal/confidence_aware_predictions | c5fea8aac271dc792eedc00a689c02fcd658edec | [
"MIT"
] | 1 | 2022-03-10T09:03:32.000Z | 2022-03-19T14:36:40.000Z | scripts/carla/devel/make_route_plot.py | govvijaycal/confidence_aware_predictions | c5fea8aac271dc792eedc00a689c02fcd658edec | [
"MIT"
] | 3 | 2021-11-30T06:00:57.000Z | 2022-03-18T14:40:20.000Z | import carla
import os
import sys
import cv2
import json
import numpy as np
CARLA_ROOT = os.getenv("CARLA_ROOT")
if CARLA_ROOT is None:
raise ValueError("CARLA_ROOT must be defined.")
scriptdir = CARLA_ROOT + "PythonAPI/"
sys.path.append(scriptdir)
from examples.synchronous_mode import CarlaSyncMode
scriptdir = ... | 38.261905 | 134 | 0.651939 |
c8ec2b3c9f6a91ec16ea09205063f1a12372ef39 | 1,856 | py | Python | test/test.py | sergey-serebryakov/mpipe | 5a1804cf64271931f0cd3e4fff3e2b38291212dd | [
"MIT"
] | 65 | 2015-01-21T00:07:17.000Z | 2022-02-15T09:21:19.000Z | test/test.py | sergey-serebryakov/mpipe | 5a1804cf64271931f0cd3e4fff3e2b38291212dd | [
"MIT"
] | 14 | 2015-01-22T19:44:44.000Z | 2021-05-18T06:21:26.000Z | test/test.py | sergey-serebryakov/mpipe | 5a1804cf64271931f0cd3e4fff3e2b38291212dd | [
"MIT"
] | 21 | 2015-01-22T07:05:00.000Z | 2022-03-08T08:56:24.000Z | """Run all tests: look for gold files in given directory,
run the corresponding test, then do a simple line-by-line
comparison."""
import sys
import os
import inspect
from subprocess import Popen, STDOUT, PIPE
# Compute the absolute path to directory of this file.
this_dir = os.path.dirname(
os.path.abspath(
... | 29.460317 | 63 | 0.613685 |
c8ec33ddc163a16d0a9f4e010b5c7863bc19cba0 | 21,827 | py | Python | igraph/remote/nexus.py | tuandnvn/ecat_learning | fe797a088baec356e08b2e3cd56c7b73dd37c843 | [
"MIT"
] | 2 | 2017-03-07T04:01:59.000Z | 2017-05-02T17:19:29.000Z | igraph/remote/nexus.py | tuandnvn/ecat_learning | fe797a088baec356e08b2e3cd56c7b73dd37c843 | [
"MIT"
] | null | null | null | igraph/remote/nexus.py | tuandnvn/ecat_learning | fe797a088baec356e08b2e3cd56c7b73dd37c843 | [
"MIT"
] | null | null | null | # vim:ts=4:sw=4:sts=4:et
# -*- coding: utf-8 -*-
"""Interface to the Nexus online graph repository.
The classes in this file facilitate access to the Nexus online graph
repository at U{http://nexus.igraph.org}.
The main entry point of this package is the C{Nexus} variable, which is
an instance of L{NexusConnection}. ... | 39.116487 | 96 | 0.602694 |
c8ec41cd0cc5cb8b16a69a5acbafa342098dd755 | 1,619 | py | Python | widgets/ws.py | alberand/lemonbar | baa479edb422b6595794794dcd434a3ab65ae747 | [
"MIT"
] | null | null | null | widgets/ws.py | alberand/lemonbar | baa479edb422b6595794794dcd434a3ab65ae747 | [
"MIT"
] | null | null | null | widgets/ws.py | alberand/lemonbar | baa479edb422b6595794794dcd434a3ab65ae747 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
import json
import subprocess
from utils import set_b_color, set_f_color, set_spacing
from widgets.widget import Widget
from widgets.config import colors, icons
class ws(Widget):
'''
'''
def __init__(self, value=''):
'''
Params:
bg: backgroun... | 26.112903 | 71 | 0.537986 |
c8ec4f855b5dcf76fb034691f34b083af67d6895 | 4,545 | py | Python | dataset/download.py | AltumTek/deep-koalarization | b5a16751a40484ca4990e0b9c005fe31c3301812 | [
"MIT"
] | 23 | 2018-08-16T12:50:01.000Z | 2021-12-27T13:13:10.000Z | dataset/download.py | AltumTek/deep-koalarization | b5a16751a40484ca4990e0b9c005fe31c3301812 | [
"MIT"
] | 22 | 2018-08-27T04:49:57.000Z | 2022-03-11T23:43:18.000Z | dataset/download.py | bw2color/bw2color | b8451ac6aa5dd9475c9722dc13009a9ea629b676 | [
"MIT"
] | 7 | 2018-08-27T15:32:59.000Z | 2020-04-20T14:48:40.000Z | import hashlib
import imghdr
import sys
import tarfile
import urllib.request
from itertools import islice
from os.path import join, isfile
from typing import Union, List
from dataset.shared import dir_root, maybe_create_folder
class ImagenetDownloader:
def __init__(self, links_source: str, dest_dir: str):
... | 38.516949 | 127 | 0.555776 |
c8ec6ccdd241833b9b91a0a90b2749c598b62f29 | 28,907 | py | Python | tests/everflow/everflow_test_utilities.py | pra-moh/sonic-mgmt | 26285708eab7428c2b6250be03483d63f94cfb5c | [
"Apache-2.0"
] | null | null | null | tests/everflow/everflow_test_utilities.py | pra-moh/sonic-mgmt | 26285708eab7428c2b6250be03483d63f94cfb5c | [
"Apache-2.0"
] | 18 | 2019-01-31T06:54:39.000Z | 2020-04-01T03:50:14.000Z | tests/everflow/everflow_test_utilities.py | wangxin/sonic-mgmt | 18dce2d5ccf93b629b9e463ba183f3a13e22b07a | [
"Apache-2.0"
] | 1 | 2020-10-27T13:15:51.000Z | 2020-10-27T13:15:51.000Z | """Utilities for testing the Everflow feature in SONiC."""
import os
import logging
import random
import time
import ipaddr
import binascii
import pytest
import yaml
import ptf.testutils as testutils
import ptf.packet as packet
from abc import abstractmethod
from ptf.mask import Mask
from tests.common.helpers.asserti... | 39.222524 | 149 | 0.635659 |
c8ec89893a9ab430ab508dd9738727f631437723 | 19,217 | py | Python | deepdoctection/pipe/segment.py | deepdoctection/deepdoctection | 7e0d7396e5ef8bf8109904e09c5d4ee56cb5a036 | [
"Apache-2.0"
] | 39 | 2021-12-14T11:05:25.000Z | 2022-03-31T18:50:58.000Z | deepdoctection/pipe/segment.py | deepdoctection/deepdoctection | 7e0d7396e5ef8bf8109904e09c5d4ee56cb5a036 | [
"Apache-2.0"
] | 17 | 2022-01-04T14:32:26.000Z | 2022-03-29T14:01:36.000Z | deepdoctection/pipe/segment.py | deepdoctection/deepdoctection | 7e0d7396e5ef8bf8109904e09c5d4ee56cb5a036 | [
"Apache-2.0"
] | 4 | 2022-01-11T16:40:17.000Z | 2022-03-30T02:09:55.000Z | # -*- coding: utf-8 -*-
# File: segment.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/LICEN... | 41.5054 | 121 | 0.680283 |
c8eca5e3c7aef3b32f14480afc35e4d417cd77d0 | 394 | py | Python | tests/unit/plugins/settings/test_plugin_settings.py | pauleveritt/kaybee | a00a718aaaa23b2d12db30dfacb6b2b6ec84459c | [
"Apache-2.0"
] | 2 | 2017-11-08T19:55:57.000Z | 2018-12-21T12:41:41.000Z | tests/unit/plugins/settings/test_plugin_settings.py | pauleveritt/kaybee | a00a718aaaa23b2d12db30dfacb6b2b6ec84459c | [
"Apache-2.0"
] | null | null | null | tests/unit/plugins/settings/test_plugin_settings.py | pauleveritt/kaybee | a00a718aaaa23b2d12db30dfacb6b2b6ec84459c | [
"Apache-2.0"
] | 1 | 2018-10-13T08:59:29.000Z | 2018-10-13T08:59:29.000Z | from kaybee.plugins.settings.handlers import dump_settings
class TestPluginSettings:
def test_import(self):
assert 'dump_settings' == dump_settings.__name__
def test_dump_settings(self, settings_kb_app, sphinx_env):
settings = sphinx_env.config.kaybee_settings
result = dump_settings(s... | 32.833333 | 62 | 0.746193 |
c8eca6107472d381e090237ed5f5349818fbfea3 | 3,354 | py | Python | cloudmesh/management/cm_account_admin.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | null | null | null | cloudmesh/management/cm_account_admin.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | 4 | 2021-06-08T20:20:08.000Z | 2022-03-11T23:30:22.000Z | cloudmesh/management/cm_account_admin.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from docopt import docopt
from cloudmesh.management.cloudmeshobject import CloudmeshObject
from cloudmesh.management.generate_classes import project_fields, user_fields
from cloudmesh.management.generate import generate_users
from cloudmesh.management.user import User, Users
import cloudmesh
impo... | 33.207921 | 80 | 0.596601 |
c8ecad93befea4f05ba17637b34e40e470731fc3 | 3,608 | py | Python | sdk/python/sawtooth_sdk/processor/state.py | trust-tech/sawtooth-core | fcd66ff2f13dba51d7642049e0c0306dbee3b07d | [
"Apache-2.0"
] | null | null | null | sdk/python/sawtooth_sdk/processor/state.py | trust-tech/sawtooth-core | fcd66ff2f13dba51d7642049e0c0306dbee3b07d | [
"Apache-2.0"
] | 1 | 2021-12-09T23:11:26.000Z | 2021-12-09T23:11:26.000Z | sdk/python/sawtooth_sdk/processor/state.py | trust-tech/sawtooth-core | fcd66ff2f13dba51d7642049e0c0306dbee3b07d | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 38.795699 | 80 | 0.64163 |
c8ecd476893ed5aba140bdd4005d9d3ad6009d17 | 29,072 | py | Python | backend/backend/utils/blockchain_client/vendor_base.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | 2 | 2022-03-17T04:50:20.000Z | 2022-03-17T04:51:31.000Z | backend/backend/utils/blockchain_client/vendor_base.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | null | null | null | backend/backend/utils/blockchain_client/vendor_base.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | null | null | null | import hashlib
import logging
import uuid
from abc import ABC, abstractmethod
from datetime import datetime, timedelta
from decimal import Decimal
from typing import TYPE_CHECKING, List, Mapping, NamedTuple, Sequence, Tuple
import sqlalchemy.orm
from common.constants import CURRENCY_TO_BLOCKCHAIN, Blockchain, Currency... | 42.815906 | 120 | 0.588436 |
c8ecd5ddf74202d64289fd764eb3191b51e7ce78 | 6,047 | py | Python | optml/tests/test_input_output.py | or-fusion/OptML | c0aae08e8504cbf53a94df2b2da42d33c2bc0ff6 | [
"BSD-3-Clause"
] | 1 | 2022-03-17T19:44:44.000Z | 2022-03-17T19:44:44.000Z | optml/tests/test_input_output.py | or-fusion/OptML | c0aae08e8504cbf53a94df2b2da42d33c2bc0ff6 | [
"BSD-3-Clause"
] | null | null | null | optml/tests/test_input_output.py | or-fusion/OptML | c0aae08e8504cbf53a94df2b2da42d33c2bc0ff6 | [
"BSD-3-Clause"
] | null | null | null | import pytest
import pyomo.environ as pyo
import pyomo
from optml.block import _BaseInputOutputBlock
from optml.scaling import OffsetScaling
def test_input_output_auto_creation():
m = pyo.ConcreteModel()
m.b = _BaseInputOutputBlock()
m.b._setup_inputs_outputs(n_inputs=3, n_outputs=2)
assert ... | 43.818841 | 129 | 0.667769 |
c8ed410ca00f84b998fa21ebfcc80e9c006e7ac4 | 19,934 | py | Python | mlprocessors/createjobs.py | flatironinstitute/mountaintools | d5680599381e0810c4aa5b309b9ef9ec7f2d1b25 | [
"Apache-2.0"
] | 2 | 2019-11-07T14:09:02.000Z | 2021-09-23T01:09:04.000Z | mountaintools/mlprocessors/createjobs.py | flatironinstitute/spikeforest_old | d9470194dc906b949178b9c44d14aea57a1f6c27 | [
"Apache-2.0"
] | 13 | 2019-05-04T09:34:53.000Z | 2019-06-23T07:05:58.000Z | mountaintools/mlprocessors/createjobs.py | flatironinstitute/spikeforest_old | d9470194dc906b949178b9c44d14aea57a1f6c27 | [
"Apache-2.0"
] | 1 | 2021-09-23T01:07:21.000Z | 2021-09-23T01:07:21.000Z | import mtlogging
import os
import fnmatch
from mountainclient import MountainClient
from .mountainjob import MountainJob
import json
import inspect
import multiprocessing
from typing import Optional, List
local_client = MountainClient()
@mtlogging.log()
def createJobs(proc, argslist, verbose=None) -> List[MountainJo... | 39.163065 | 152 | 0.543293 |
c8ed42c51c7b82dd972866c4e72d76f4eb2e3df6 | 5,561 | py | Python | stackformation/aws/stacks/s3.py | ibejohn818/stackformation | 7ab5b29b584c64cea31add470c4f6df847d19c1c | [
"MIT"
] | null | null | null | stackformation/aws/stacks/s3.py | ibejohn818/stackformation | 7ab5b29b584c64cea31add470c4f6df847d19c1c | [
"MIT"
] | 1,396 | 2017-12-24T18:25:05.000Z | 2022-03-31T15:05:19.000Z | stackformation/aws/stacks/s3.py | ibejohn818/stackformation | 7ab5b29b584c64cea31add470c4f6df847d19c1c | [
"MIT"
] | null | null | null | from stackformation.aws.stacks import BaseStack
from troposphere import ( # noqa
FindInMap, GetAtt, Join,
Parameter, Output, Ref,
Select, Tags, Template,
GetAZs, Export
)
import troposphere.s3 as s3
import logging
logger = logging.getLogger(__name__)
class BaseS3Bucket(object):
def __init__(sel... | 27.666667 | 85 | 0.544147 |
c8ed4fc66b69081eb97266b05a8d28c563fa5465 | 9,458 | py | Python | machin/auto/launcher.py | lorenzosteccanella/machin | 9d3ce87dbed820b5019211b0690b54613084d9e4 | [
"MIT"
] | 287 | 2020-06-13T05:19:50.000Z | 2022-03-31T04:46:32.000Z | machin/auto/launcher.py | lorenzosteccanella/machin | 9d3ce87dbed820b5019211b0690b54613084d9e4 | [
"MIT"
] | 19 | 2020-08-19T05:33:45.000Z | 2022-03-27T15:16:03.000Z | machin/auto/launcher.py | lorenzosteccanella/machin | 9d3ce87dbed820b5019211b0690b54613084d9e4 | [
"MIT"
] | 44 | 2020-07-06T00:41:44.000Z | 2022-03-29T17:05:08.000Z | from typing import Union, List, Dict, Any, Callable
from torch import distributed as dist
from torch.utils.data.dataloader import DataLoader
from .dataset import RLDataset
from .config import init_algorithm_from_config, is_algorithm_distributed
from .pl_plugin import DDPPlugin, DDPSpawnPlugin
from machin.parallel.distr... | 39.408333 | 88 | 0.608797 |
c8ed78184b631cf80da9422b0d378d1242136629 | 8,405 | py | Python | capnpy/schema_extended.py | wridgers/capnpy | 63546597cc94434a271187f2e5af60f02e086caa | [
"MIT"
] | 1 | 2019-05-29T19:47:53.000Z | 2019-05-29T19:47:53.000Z | capnpy/schema_extended.py | wridgers/capnpy | 63546597cc94434a271187f2e5af60f02e086caa | [
"MIT"
] | null | null | null | capnpy/schema_extended.py | wridgers/capnpy | 63546597cc94434a271187f2e5af60f02e086caa | [
"MIT"
] | 4 | 2018-01-28T23:44:41.000Z | 2019-09-28T17:50:14.000Z | from capnpy.type import Types as _Types
from capnpy import annotate
from capnpy.util import ensure_unicode
@Type.__extend__
class Type:
def as_type(self):
"""
Convert between schema.Type to capnpy.type.Types.*
We should unify the twos eventually
"""
typename = str(self.whic... | 31.36194 | 101 | 0.60119 |
c8ed89e95946d1d48b98b6840ce5601b881ae2aa | 18,112 | py | Python | modules/games/uno.py | 5space/nesbot | 38a9e8cadf0cbe41ee25e0850c244e2834a6e12c | [
"MIT"
] | null | null | null | modules/games/uno.py | 5space/nesbot | 38a9e8cadf0cbe41ee25e0850c244e2834a6e12c | [
"MIT"
] | null | null | null | modules/games/uno.py | 5space/nesbot | 38a9e8cadf0cbe41ee25e0850c244e2834a6e12c | [
"MIT"
] | null | null | null | import random
import discord
from discord.ext.commands.converter import UserConverter
from modules.games.uno_vars import *
from modules.games.util.game import TurnBasedGame, Rules
# from utils.embed import prompt_channel
def _is_sublist(lst1, lst2):
"""ls1 = [element for element in lst1 if element in lst2]
... | 38.372881 | 122 | 0.566917 |
c8ed99b437d2385b3c85447297917434e8c44b27 | 3,093 | py | Python | rls/nn/mixers/qtran_base.py | StepNeverStop/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 371 | 2019-04-26T00:37:33.000Z | 2022-03-31T07:33:12.000Z | rls/nn/mixers/qtran_base.py | BlueFisher/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 47 | 2019-07-21T11:51:57.000Z | 2021-08-31T08:45:22.000Z | rls/nn/mixers/qtran_base.py | BlueFisher/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 102 | 2019-06-29T13:11:15.000Z | 2022-03-28T13:51:04.000Z | from typing import Dict, List
import torch as th
import torch.nn as nn
from rls.nn.mlps import MLP
from rls.nn.represent_nets import RepresentationNetwork
class QTranBase(nn.Module):
def __init__(self,
n_agents,
state_spec,
rep_net_params,
a_d... | 38.185185 | 108 | 0.547365 |
c8edb6600fef334eaf4e20709a6897e2bfdc29c2 | 10,715 | py | Python | extensions/deviceprm/scripts/parameters-to-c.py | iocafe/iocom | 9762b78fa1591994c74ed1fc6fe23b9ef44e0dff | [
"MIT"
] | 1 | 2020-04-28T23:25:50.000Z | 2020-04-28T23:25:50.000Z | extensions/deviceprm/scripts/parameters-to-c.py | iocafe/iocom | 9762b78fa1591994c74ed1fc6fe23b9ef44e0dff | [
"MIT"
] | 11 | 2020-01-30T16:27:24.000Z | 2020-08-09T06:25:06.000Z | extensions/deviceprm/scripts/parameters-to-c.py | iocafe/iocom | 9762b78fa1591994c74ed1fc6fe23b9ef44e0dff | [
"MIT"
] | null | null | null | # parameters_to_c.py 26.4.2021/pekka
# Converts communication parameter map written in JSON to C source and header files.
import json
import os
import sys
import re
IOC_parameter_NAME_SZ = 32
IOC_NAME_SZ = 16
# Size excludes parameter state byte.
osal_typeinfo = {
"undef" : 0,
"boolean" : 1,
"char" : 1,
... | 30.440341 | 177 | 0.586188 |
c8ede2cda7911dd8b46f32c2d224a2a5574bd747 | 5,542 | py | Python | controller.py | ElsevierSoftwareX/SOFTX-D-21-00183 | bef6481ea69445a773bc72ce3c9a7d5fbf82e834 | [
"MIT"
] | 1 | 2021-08-24T12:11:34.000Z | 2021-08-24T12:11:34.000Z | controller.py | ElsevierSoftwareX/SOFTX-D-21-00183 | bef6481ea69445a773bc72ce3c9a7d5fbf82e834 | [
"MIT"
] | null | null | null | controller.py | ElsevierSoftwareX/SOFTX-D-21-00183 | bef6481ea69445a773bc72ce3c9a7d5fbf82e834 | [
"MIT"
] | 2 | 2022-02-02T23:49:52.000Z | 2022-03-13T21:05:15.000Z | from tensorflow.keras import backend as K
from colors import colors
from diagnosis import diagnosis
from neural_network import neural_network
from search_space import search_space
from tuning_rules import tuning_rules
from tuning_rules_symbolic import tuning_rules_symbolic
from neural_sym_bridge import NeuralSymbolicB... | 39.304965 | 118 | 0.614219 |
c8ede54eb80712b44daf6e2f17a9dba3e597fffa | 24,376 | py | Python | sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_user_sessions_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_user_sessions_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_user_sessions_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.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 ... | 51.644068 | 260 | 0.670208 |
c8edf6bd79be25b948178d2b86ebb4d3394a8f88 | 2,143 | py | Python | src/camps/mixins.py | bornhack/bornhack-website | 40ed0875f5129a4c8ae1887e33e7dedb4981dadc | [
"BSD-3-Clause"
] | 7 | 2017-04-14T15:28:29.000Z | 2021-09-10T09:45:38.000Z | src/camps/mixins.py | bornhack/bornhack-website | 40ed0875f5129a4c8ae1887e33e7dedb4981dadc | [
"BSD-3-Clause"
] | 799 | 2016-04-28T09:31:50.000Z | 2022-03-29T09:05:02.000Z | src/camps/mixins.py | bornhack/bornhack-website | 40ed0875f5129a4c8ae1887e33e7dedb4981dadc | [
"BSD-3-Clause"
] | 35 | 2016-04-28T09:23:53.000Z | 2021-05-02T12:36:01.000Z | from django.shortcuts import get_object_or_404
from camps.models import Camp
class CampViewMixin:
"""
This mixin makes sure self.camp is available (taken from url kwarg camp_slug)
It also filters out objects that belong to other camps when the queryset has a camp_filter
"""
def setup(self, *args... | 35.716667 | 94 | 0.602893 |
c8ee022b2c7e27de1cb004b1d451efc8e2d846e7 | 2,655 | py | Python | test_tflite.py | tailtq/TFLite-Retinaface | 93a16087d672f8e0efbf981cc61e5369dedb66f0 | [
"MIT"
] | 2 | 2021-06-01T06:27:39.000Z | 2022-03-18T13:05:03.000Z | test_tflite.py | tailtq/TFLite-Retinaface | 93a16087d672f8e0efbf981cc61e5369dedb66f0 | [
"MIT"
] | null | null | null | test_tflite.py | tailtq/TFLite-Retinaface | 93a16087d672f8e0efbf981cc61e5369dedb66f0 | [
"MIT"
] | null | null | null | import os
import time
import argparse
import numpy as np
from PIL import Image
import tensorflow.lite as tflite
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "1"
# os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument(
'-i',
'--imag... | 31.607143 | 132 | 0.651601 |
c8ee2649bdb6168d086ab35487ed08d176075d30 | 7 | py | Python | __init__.py | mike2016/HVUS | f5a54704edc3003935070d6b87a1e4f4bea48107 | [
"MIT"
] | 3 | 2020-10-28T00:53:57.000Z | 2021-09-10T12:05:35.000Z | __init__.py | mike2016/HVUS | f5a54704edc3003935070d6b87a1e4f4bea48107 | [
"MIT"
] | null | null | null | __init__.py | mike2016/HVUS | f5a54704edc3003935070d6b87a1e4f4bea48107 | [
"MIT"
] | 1 | 2021-05-31T04:57:19.000Z | 2021-05-31T04:57:19.000Z | #-----
| 3.5 | 6 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.