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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3fdafb8799c5bddc2a6f657d8af5d4b55538441d | 7,376 | py | Python | nssrc/com/citrix/netscaler/nitro/resource/config/vpn/vpnvserver_staserver_binding.py | mahabs/nitro | be74e1e177f5c205c16126bc9b023f2348788409 | [
"Apache-2.0"
] | null | null | null | nssrc/com/citrix/netscaler/nitro/resource/config/vpn/vpnvserver_staserver_binding.py | mahabs/nitro | be74e1e177f5c205c16126bc9b023f2348788409 | [
"Apache-2.0"
] | null | null | null | nssrc/com/citrix/netscaler/nitro/resource/config/vpn/vpnvserver_staserver_binding.py | mahabs/nitro | be74e1e177f5c205c16126bc9b023f2348788409 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2008-2015 Citrix Systems, 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 l... | 29.269841 | 140 | 0.719496 |
ac310382341b58d9c2943ad9e08514be71e169c9 | 4,448 | py | Python | models/networks/discriminator.py | givenone/MichiGAN | 67c48da53e0a038273150f26baf9127e906a7f3f | [
"MIT"
] | null | null | null | models/networks/discriminator.py | givenone/MichiGAN | 67c48da53e0a038273150f26baf9127e906a7f3f | [
"MIT"
] | null | null | null | models/networks/discriminator.py | givenone/MichiGAN | 67c48da53e0a038273150f26baf9127e906a7f3f | [
"MIT"
] | null | null | null | """
Copyright (C) University of Science and Technology of China.
Licensed under the MIT License.
"""
import torch.nn as nn
import numpy as np
import torch.nn.functional as F
from models.networks.base_network import BaseNetwork
from models.networks.normalization import get_nonspade_norm_layer
import util.util... | 36.760331 | 88 | 0.589928 |
6f8022df114106bd8ed320fee22f3d098abff7ad | 3,617 | py | Python | venv/Lib/site-packages/qcs_api_client/api/quantum_processors/list_quantum_processors.py | Holly-Jiang/QCTSA | b90136b9df18fc21ae53b431f1e5e0c6ef786fae | [
"MIT"
] | null | null | null | venv/Lib/site-packages/qcs_api_client/api/quantum_processors/list_quantum_processors.py | Holly-Jiang/QCTSA | b90136b9df18fc21ae53b431f1e5e0c6ef786fae | [
"MIT"
] | null | null | null | venv/Lib/site-packages/qcs_api_client/api/quantum_processors/list_quantum_processors.py | Holly-Jiang/QCTSA | b90136b9df18fc21ae53b431f1e5e0c6ef786fae | [
"MIT"
] | null | null | null | from typing import Any, Dict, Union
import httpx
from retrying import retry
from ...models.list_quantum_processors_response import ListQuantumProcessorsResponse
from ...types import UNSET, Response, Unset
from ...util.errors import QCSHTTPStatusError, raise_for_status
from ...util.retry import DEFAULT_RETRY_ARGUMENTS... | 25.835714 | 101 | 0.668786 |
6aa488ace88388adcc4733824b7f36b293d6b98d | 469 | py | Python | cmsfix/views/__init__.py | trmznt/cmsfix | 18d0be238f9247421db9603f1946478452336afb | [
"BSD-2-Clause"
] | null | null | null | cmsfix/views/__init__.py | trmznt/cmsfix | 18d0be238f9247421db9603f1946478452336afb | [
"BSD-2-Clause"
] | null | null | null | cmsfix/views/__init__.py | trmznt/cmsfix | 18d0be238f9247421db9603f1946478452336afb | [
"BSD-2-Clause"
] | null | null | null |
from pyramid.renderers import render_to_response
from pyramid.httpexceptions import HTTPFound
from rhombus.views.generics import *
from rhombus.lib.tags import *
def get_site(request):
fqdn = request.registry.settings.get('cmsfix.site', None)
if fqdn is None:
return '*'
# if cmsfix.site is No... | 20.391304 | 62 | 0.692964 |
a7f3b87f71adad525d0aeeb5c7f5eb39bdf6a46c | 402 | py | Python | lab5/mult_odd.py | aritra1911/tnt | 0ea75cc0b9e20fa3b608ac413d3b142548826a52 | [
"MIT"
] | null | null | null | lab5/mult_odd.py | aritra1911/tnt | 0ea75cc0b9e20fa3b608ac413d3b142548826a52 | [
"MIT"
] | null | null | null | lab5/mult_odd.py | aritra1911/tnt | 0ea75cc0b9e20fa3b608ac413d3b142548826a52 | [
"MIT"
] | null | null | null |
# 2. Write a Python program to multiply all the odd items in a list.
def mult_odd(elems):
if not elems: return 0;
product = 1;
for elem in elems:
if elem & 1:
product *= elem;
return product;
def main():
list2 = [ 7, 8, 9, 15, 36, 114 ]
print("List :", list2);
print(... | 19.142857 | 68 | 0.572139 |
c57709f40e57d1ec5dcec56217b63037398fb5ed | 5,388 | py | Python | chair_manager/chair_manager/doctype/app/app.py | vmraid/chair_manager | 08d4fd60017e0a3ea636617c57e409a9cc7916bc | [
"MIT"
] | null | null | null | chair_manager/chair_manager/doctype/app/app.py | vmraid/chair_manager | 08d4fd60017e0a3ea636617c57e409a9cc7916bc | [
"MIT"
] | null | null | null | chair_manager/chair_manager/doctype/app/app.py | vmraid/chair_manager | 08d4fd60017e0a3ea636617c57e409a9cc7916bc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2017, Frappé and contributors
# For license information, please see license.txt
import os
import re
import shlex
import time
from subprocess import PIPE, STDOUT, Popen, check_output
import vmraid
from chair_manager.chair_manager.utils import (
safe_decode,
verify_whitelisted... | 28.0625 | 88 | 0.661284 |
28d95a462c3e7f131c3450207032c8d3de2924ba | 5,861 | py | Python | tests/graph_algorithms_test.py | antrianis/Algorithms | 9af82bd9c7d91a459b2021746bf1741162b9fd9f | [
"WTFPL"
] | 1 | 2015-02-14T22:05:43.000Z | 2015-02-14T22:05:43.000Z | tests/graph_algorithms_test.py | piroux/pysds | 5b7b259080a19dc445ffe0865eca70c994580916 | [
"WTFPL"
] | null | null | null | tests/graph_algorithms_test.py | piroux/pysds | 5b7b259080a19dc445ffe0865eca70c994580916 | [
"WTFPL"
] | 1 | 2021-02-13T16:49:25.000Z | 2021-02-13T16:49:25.000Z | import os, sys
sys.path.append(os.path.join(os.getcwd(), os.path.pardir))
import unittest
from graphs.digraph import digraph
from graphs.graph import graph
from graphs.graph_algorithms import *
class test_graph(unittest.TestCase):
def setUp(self):
self.gr = graph()
self.gr.add_nodes(["s", "a", "b"... | 43.738806 | 87 | 0.516977 |
8a7fa585f1957301bda9daaeab4c572d43c7d377 | 392 | py | Python | core/src/test.py | tothpeti/feature-importance-profiling | 310c56224c8f18cb4d8cd78be95565d32070a704 | [
"MIT"
] | null | null | null | core/src/test.py | tothpeti/feature-importance-profiling | 310c56224c8f18cb4d8cd78be95565d32070a704 | [
"MIT"
] | null | null | null | core/src/test.py | tothpeti/feature-importance-profiling | 310c56224c8f18cb4d8cd78be95565d32070a704 | [
"MIT"
] | null | null | null | from sklearn.ensemble import RandomForestClassifier
from profiler.profiler import FeatureImportanceProfiler
import pandas as pd
from sklearn.linear_model import LogisticRegression
if __name__ == '__main__':
estimator = RandomForestClassifier(random_state=0)
feature_profiler = FeatureImportanceProfiler(esti... | 26.133333 | 85 | 0.826531 |
6339e979126e814bc1dca3cd565b906cc7aed178 | 428 | py | Python | env/Lib/site-packages/plotly/validators/heatmap/colorbar/_ticktextsrc.py | andresgreen-byte/Laboratorio-1--Inversion-de-Capital | 8a4707301d19c3826c31026c4077930bcd6a8182 | [
"MIT"
] | 11,750 | 2015-10-12T07:03:39.000Z | 2022-03-31T20:43:15.000Z | venv/Lib/site-packages/plotly/validators/heatmap/colorbar/_ticktextsrc.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,951 | 2015-10-12T00:41:25.000Z | 2022-03-31T22:19:26.000Z | venv/Lib/site-packages/plotly/validators/heatmap/colorbar/_ticktextsrc.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,623 | 2015-10-15T14:40:27.000Z | 2022-03-28T16:05:50.000Z | import _plotly_utils.basevalidators
class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="ticktextsrc", parent_name="heatmap.colorbar", **kwargs
):
super(TicktextsrcValidator, self).__init__(
plotly_name=plotly_name,
par... | 30.571429 | 81 | 0.663551 |
01d29b89a22e55ec0ea93598c306578acac26142 | 2,775 | py | Python | pipeline/histology.py | rozmar/map-ephys | 57365781d77cd11d54e19b773123f73942e7316f | [
"MIT"
] | null | null | null | pipeline/histology.py | rozmar/map-ephys | 57365781d77cd11d54e19b773123f73942e7316f | [
"MIT"
] | null | null | null | pipeline/histology.py | rozmar/map-ephys | 57365781d77cd11d54e19b773123f73942e7316f | [
"MIT"
] | null | null | null | import datajoint as dj
from . import lab, experiment, ccf, ephys
from . import get_schema_name
[lab, experiment, ccf, ephys] # schema imports only
schema = dj.schema(get_schema_name('histology'))
@schema
class CCFToMRITransformation(dj.Imported):
definition = """ # one per project - a mapping between CCF coor... | 24.130435 | 119 | 0.502703 |
0b38c4d38023e18ca0129c8aceaabf98fb4f9fc2 | 1,279 | py | Python | stubs.min/Autodesk/Revit/DB/__init___parts/AssemblyMemberDifferentCategory.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | 1 | 2017-07-25T14:30:18.000Z | 2017-07-25T14:30:18.000Z | stubs.min/Autodesk/Revit/DB/__init___parts/AssemblyMemberDifferentCategory.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | stubs.min/Autodesk/Revit/DB/__init___parts/AssemblyMemberDifferentCategory.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | class AssemblyMemberDifferentCategory(AssemblyMemberDifference,IDisposable):
""" The two assembly members being compared have different category """
def Dispose(self):
""" Dispose(self: AssemblyMemberDifference,A_0: bool) """
pass
def ReleaseUnmanagedResources(self,*args):
""" ReleaseUnmanagedResources(s... | 38.757576 | 215 | 0.727131 |
0be35fb3a60ab2ace5e627bf7787690685a9cb82 | 1,950 | py | Python | deepchem/metrics/__init__.py | cjgalvin/deepchem | 64993a129e7f0f78fed9500298b1828ac8a0757a | [
"MIT"
] | 3,782 | 2016-02-21T03:53:11.000Z | 2022-03-31T16:10:26.000Z | deepchem/metrics/__init__.py | cjgalvin/deepchem | 64993a129e7f0f78fed9500298b1828ac8a0757a | [
"MIT"
] | 2,666 | 2016-02-11T01:54:54.000Z | 2022-03-31T11:14:33.000Z | deepchem/metrics/__init__.py | cjgalvin/deepchem | 64993a129e7f0f78fed9500298b1828ac8a0757a | [
"MIT"
] | 1,597 | 2016-02-21T03:10:08.000Z | 2022-03-30T13:21:28.000Z | # flake8: noqa
# metric class
from deepchem.metrics.metric import Metric
# metrics utils
from deepchem.metrics.metric import threshold_predictions
from deepchem.metrics.metric import normalize_weight_shape
from deepchem.metrics.metric import normalize_labels_shape
from deepchem.metrics.metric import normalize_predicti... | 47.560976 | 67 | 0.886667 |
b7f0eb5361e8ff23d59da49021903256c2647c39 | 545 | py | Python | concourse-pipeline-hacks/tagger/tagger.py | krp226/concourse-pipeline | 2e0e876a7eaaa06f53c6e9257c45e11a6189848e | [
"Apache-2.0"
] | 421 | 2016-09-05T22:34:45.000Z | 2020-03-23T14:52:00.000Z | concourse-pipeline-hacks/tagger/tagger.py | krp226/concourse-pipeline | 2e0e876a7eaaa06f53c6e9257c45e11a6189848e | [
"Apache-2.0"
] | 30 | 2016-09-26T21:18:25.000Z | 2019-10-09T17:02:49.000Z | concourse-pipeline-hacks/tagger/tagger.py | krp226/concourse-pipeline | 2e0e876a7eaaa06f53c6e9257c45e11a6189848e | [
"Apache-2.0"
] | 241 | 2016-09-06T15:48:32.000Z | 2020-03-19T12:42:09.000Z | #!/usr/bin/env python3
import yaml
import sys
def process_job(job):
for item in job['plan']:
process_item(item)
def process_item(item):
if "aggregate" in item:
for sub_item in item["aggregate"]:
process_item(sub_item)
else:
try:
item["tags"] = [sys.argv[1]]
... | 20.185185 | 47 | 0.594495 |
46dacdca99941d0ba3032b4c63ff6aed07ac5ac8 | 99 | py | Python | Web Files/submitsystem/apps.py | benhawk1/447-Project---Submit-System | 878cbf515c335b95cd420011e0fdbda1d4945aa2 | [
"Apache-2.0"
] | null | null | null | Web Files/submitsystem/apps.py | benhawk1/447-Project---Submit-System | 878cbf515c335b95cd420011e0fdbda1d4945aa2 | [
"Apache-2.0"
] | 25 | 2020-10-06T16:37:40.000Z | 2020-12-01T22:20:27.000Z | Web Files/submitsystem/apps.py | benhawk1/447-Project---Submit-System | 878cbf515c335b95cd420011e0fdbda1d4945aa2 | [
"Apache-2.0"
] | 2 | 2020-10-15T18:41:34.000Z | 2020-11-02T00:49:01.000Z | from django.apps import AppConfig
class SubmitsystemConfig(AppConfig):
name = 'submitsystem'
| 16.5 | 36 | 0.777778 |
78f4f03f500fc53cb8ca54c9826267d92c4fdc5f | 2,113 | py | Python | 00_MNIST-label/net/tf_base_net.py | na018/DeepLearning | f9f44bdf9afe7fa211a0899407534faf309bc0e6 | [
"MIT"
] | null | null | null | 00_MNIST-label/net/tf_base_net.py | na018/DeepLearning | f9f44bdf9afe7fa211a0899407534faf309bc0e6 | [
"MIT"
] | null | null | null | 00_MNIST-label/net/tf_base_net.py | na018/DeepLearning | f9f44bdf9afe7fa211a0899407534faf309bc0e6 | [
"MIT"
] | null | null | null | import tensorflow as tf
from net.utils import add_variable_summary
def conv(input_layer, filters, kernel_size=[3, 3], activation=tf.nn.relu):
"""Convolutional layer with included tensorboard summary.
Arguments:
input_layer {tensor} -- Input layer or image
filters {integer} -- the dimensionali... | 29.760563 | 106 | 0.663985 |
ae90090283db867c37f89b0f5fe31d31f4e01791 | 325 | py | Python | src/Integrator/VerletInst.cc.py | markguozhiming/spheral | bbb982102e61edb8a1d00cf780bfa571835e1b61 | [
"BSD-Source-Code",
"BSD-3-Clause-LBNL",
"FSFAP"
] | 1 | 2020-10-21T01:56:55.000Z | 2020-10-21T01:56:55.000Z | src/Integrator/VerletInst.cc.py | markguozhiming/spheral | bbb982102e61edb8a1d00cf780bfa571835e1b61 | [
"BSD-Source-Code",
"BSD-3-Clause-LBNL",
"FSFAP"
] | null | null | null | src/Integrator/VerletInst.cc.py | markguozhiming/spheral | bbb982102e61edb8a1d00cf780bfa571835e1b61 | [
"BSD-Source-Code",
"BSD-3-Clause-LBNL",
"FSFAP"
] | null | null | null | text = """
//------------------------------------------------------------------------------
// Explicit instantiation.
//------------------------------------------------------------------------------
#include "Verlet.cc"
#include "Geometry/Dimension.hh"
namespace Spheral {
template class Verlet< Dim< %(ndim)s > >;
}... | 27.083333 | 80 | 0.335385 |
604f76b89517b363df7b873a45eb8d184169adc7 | 10,730 | py | Python | src/qt/qtwebkit/Tools/Scripts/webkitpy/layout_tests/servers/http_server.py | viewdy/phantomjs | eddb0db1d253fd0c546060a4555554c8ee08c13c | [
"BSD-3-Clause"
] | 1 | 2021-02-09T10:24:31.000Z | 2021-02-09T10:24:31.000Z | src/qt/qtwebkit/Tools/Scripts/webkitpy/layout_tests/servers/http_server.py | mrampersad/phantomjs | dca6f77a36699eb4e1c46f7600cca618f01b0ac3 | [
"BSD-3-Clause"
] | null | null | null | src/qt/qtwebkit/Tools/Scripts/webkitpy/layout_tests/servers/http_server.py | mrampersad/phantomjs | dca6f77a36699eb4e1c46f7600cca618f01b0ac3 | [
"BSD-3-Clause"
] | 1 | 2017-03-19T13:03:23.000Z | 2017-03-19T13:03:23.000Z | # Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | 46.855895 | 136 | 0.618826 |
ebbf12a0b138ac845aa1890d0a392d4adadc7641 | 5,573 | py | Python | sos4hjb/test/polynomials/test_chebyshev_vector.py | TobiaMarcucci/sos4hjb | d8bd5c0179891ff09f11be48777bef148d952a2d | [
"MIT"
] | 3 | 2020-07-05T17:36:06.000Z | 2021-11-20T10:41:58.000Z | sos4hjb/test/polynomials/test_chebyshev_vector.py | TobiaMarcucci/sos4hjb | d8bd5c0179891ff09f11be48777bef148d952a2d | [
"MIT"
] | null | null | null | sos4hjb/test/polynomials/test_chebyshev_vector.py | TobiaMarcucci/sos4hjb | d8bd5c0179891ff09f11be48777bef148d952a2d | [
"MIT"
] | 1 | 2022-01-25T06:39:56.000Z | 2022-01-25T06:39:56.000Z | import unittest
from sos4hjb.polynomials import (Variable, MonomialVector, ChebyshevVector,
Polynomial)
class TestChebyshevVector(unittest.TestCase):
def test_call(self):
x = Variable('x')
y = Variable('y')
z = Variable('z')
power_dict = {x: 5, y:... | 32.976331 | 75 | 0.511035 |
0a591adc823eab5a87bcc6da099734b10cb6deab | 554 | py | Python | examples/sub_fedavg/subfedavg_client.py | crownk1997/plato | 56eecedd291f9dc9de9d101c9d87dea320dfacd4 | [
"Apache-2.0"
] | null | null | null | examples/sub_fedavg/subfedavg_client.py | crownk1997/plato | 56eecedd291f9dc9de9d101c9d87dea320dfacd4 | [
"Apache-2.0"
] | null | null | null | examples/sub_fedavg/subfedavg_client.py | crownk1997/plato | 56eecedd291f9dc9de9d101c9d87dea320dfacd4 | [
"Apache-2.0"
] | null | null | null | """
A federated learning client using pruning in Sub-FedAvg.
"""
import logging
from plato.clients import simple
class Client(simple.Client):
"""
A federated learning client prunes its update before sending out.
"""
async def train(self):
""" The training process on a Sub-FedAvg client. """
... | 23.083333 | 71 | 0.638989 |
a8a5e0c27d2bf91d41a039f1df6281d8a3c2cf81 | 17,867 | py | Python | dataschema/schema2sql.py | NunaInc/sql_tools | 51d63ae77c18ccbfdcab703e8ebbee7c78972892 | [
"Apache-2.0"
] | 1 | 2022-03-30T19:47:16.000Z | 2022-03-30T19:47:16.000Z | dataschema/schema2sql.py | NunaInc/sql_tools | 51d63ae77c18ccbfdcab703e8ebbee7c78972892 | [
"Apache-2.0"
] | null | null | null | dataschema/schema2sql.py | NunaInc/sql_tools | 51d63ae77c18ccbfdcab703e8ebbee7c78972892 | [
"Apache-2.0"
] | 1 | 2022-03-30T04:07:12.000Z | 2022-03-30T04:07:12.000Z | #
# nuna_sql_tools: Copyright 2022 Nuna Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | 41.745327 | 83 | 0.597022 |
43034e8b31e2643e1f1509b4c54ca8bf8627a006 | 3,076 | py | Python | tensorflow/python/compiler/tensorrt/test/vgg_block_nchw_test.py | Dynmi/tensorflow | 74f953df1b3a3e2f32ffdd0065322a0aa9df53e2 | [
"Apache-2.0"
] | 1 | 2020-10-21T08:14:38.000Z | 2020-10-21T08:14:38.000Z | tensorflow/python/compiler/tensorrt/test/vgg_block_nchw_test.py | Dynmi/tensorflow | 74f953df1b3a3e2f32ffdd0065322a0aa9df53e2 | [
"Apache-2.0"
] | 3 | 2021-08-25T16:13:38.000Z | 2022-02-10T02:04:06.000Z | tensorflow/python/compiler/tensorrt/test/vgg_block_nchw_test.py | Dynmi/tensorflow | 74f953df1b3a3e2f32ffdd0065322a0aa9df53e2 | [
"Apache-2.0"
] | 2 | 2019-03-07T05:54:18.000Z | 2019-05-16T20:31:25.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 34.954545 | 93 | 0.672952 |
f0406ed3035bf9e86fc5a457c0423ec2b6d9615e | 20,173 | py | Python | batcher.py | JD-AI-Research-NLP/SGG | db014947054bd761bbf38b82db977ae7f4ee6e19 | [
"Apache-2.0"
] | 2 | 2021-11-16T07:53:06.000Z | 2021-11-18T02:55:38.000Z | batcher.py | JD-AI-Research-NLP/SGG | db014947054bd761bbf38b82db977ae7f4ee6e19 | [
"Apache-2.0"
] | 2 | 2021-11-17T08:55:10.000Z | 2021-12-19T01:48:07.000Z | batcher.py | JD-AI-Research-NLP/SGG | db014947054bd761bbf38b82db977ae7f4ee6e19 | [
"Apache-2.0"
] | 1 | 2022-03-15T02:33:21.000Z | 2022-03-15T02:33:21.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
# Modifications Copyright 2017 Abigail See
#
# 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... | 49.809877 | 356 | 0.713875 |
bc6b46392e33e9229426c65389a19b4e99244590 | 3,686 | py | Python | huaweicloud-sdk-servicestage/huaweicloudsdkservicestage/v2/model/create_personal_auth_request.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-servicestage/huaweicloudsdkservicestage/v2/model/create_personal_auth_request.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-servicestage/huaweicloudsdkservicestage/v2/model/create_personal_auth_request.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class CreatePersonalAuthRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): ... | 26.517986 | 79 | 0.562127 |
fbc4a983b2557d4b651880f5856167a2f98973d6 | 389 | py | Python | backend/doccom/wsgi.py | may55/DocCom | 141e5fc1afdf3235c27dd55ea94654d2dec6dc45 | [
"MIT"
] | 6 | 2020-04-13T08:14:34.000Z | 2020-04-23T16:50:42.000Z | backend/doccom/wsgi.py | opticalminds/DocCom | d91224aabdd3143920076b86783f682565c163da | [
"MIT"
] | 11 | 2021-03-10T20:05:36.000Z | 2022-02-27T05:41:42.000Z | backend/doccom/wsgi.py | kumargauravsingh14/DocCom | 9d56c2e510a33e1eede77f652ba1d483c35b84cb | [
"MIT"
] | 3 | 2020-04-23T12:42:54.000Z | 2020-05-24T06:50:19.000Z | """
WSGI config for forumo project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTIN... | 22.882353 | 78 | 0.784062 |
38fb12105c051073293a4e901f07cb1cf7acb2f2 | 1,490 | py | Python | lib/recipetool/shift_oelint_adv/rule_base/rule_var_src_uri_file.py | shift-left-test/meta-shift | effce9bea894f990703cc047157e3f30d53d9365 | [
"MIT"
] | 2 | 2022-01-19T02:39:43.000Z | 2022-02-07T01:58:17.000Z | lib/recipetool/shift_oelint_adv/rule_base/rule_var_src_uri_file.py | shift-left-test/meta-shift | effce9bea894f990703cc047157e3f30d53d9365 | [
"MIT"
] | null | null | null | lib/recipetool/shift_oelint_adv/rule_base/rule_var_src_uri_file.py | shift-left-test/meta-shift | effce9bea894f990703cc047157e3f30d53d9365 | [
"MIT"
] | null | null | null | from shift_oelint_adv.cls_rule import Rule
from shift_oelint_parser.cls_item import Variable
from shift_oelint_parser.helper_files import get_scr_components
from shift_oelint_parser.parser import INLINE_BLOCK
class VarSRCUriGitTag(Rule):
def __init__(self):
super(VarSRCUriGitTag, self).__init__(id='oelint... | 42.571429 | 119 | 0.580537 |
99ef4e7500c0414023030e72ac120d4d90e6006a | 2,108 | py | Python | tests/server.py | NAnnamalai/gramex | 6a0845aed2f7423da09eaa84678d3a0519fe1ff1 | [
"MIT"
] | 130 | 2019-02-05T06:09:16.000Z | 2022-03-31T03:09:00.000Z | tests/server.py | NAnnamalai/gramex | 6a0845aed2f7423da09eaa84678d3a0519fe1ff1 | [
"MIT"
] | 457 | 2019-02-05T05:08:34.000Z | 2022-03-30T03:47:45.000Z | tests/server.py | NAnnamalai/gramex | 6a0845aed2f7423da09eaa84678d3a0519fe1ff1 | [
"MIT"
] | 50 | 2019-02-12T12:20:02.000Z | 2022-03-15T02:50:02.000Z | import os
import time
import logging
import requests
import threading
from pathlib import Path
from orderedattrdict import AttrDict
import gramex
# Don't print the distracting DEBUG messages from some modules
for logger in ['matplotlib', 'MARKDOWN']:
logging.getLogger(logger).setLevel(logging.WARNING)
info = Attr... | 29.690141 | 82 | 0.663662 |
8c246bacacf9ca260f323369551bcf2bfd99adde | 93 | py | Python | enricher/features/__init__.py | JEstabrook/regulon-enrichment | 594e927bf23fa99a9f26236e4da88a3b9c73de10 | [
"MIT"
] | null | null | null | enricher/features/__init__.py | JEstabrook/regulon-enrichment | 594e927bf23fa99a9f26236e4da88a3b9c73de10 | [
"MIT"
] | null | null | null | enricher/features/__init__.py | JEstabrook/regulon-enrichment | 594e927bf23fa99a9f26236e4da88a3b9c73de10 | [
"MIT"
] | null | null | null | from .expression_utils import load_expr, log_norm, fit_and_transform_array, load_scaled_expr
| 46.5 | 92 | 0.88172 |
1e1efe260aeaee1d8c3428de05e317c093932a05 | 1,119 | py | Python | pastepwn/analyzers/wordanalyzer.py | SaFiSec/pastepwn | 9009874f9c9edd2be86399cc90802117ae28d3ce | [
"MIT"
] | 1 | 2019-04-28T17:48:34.000Z | 2019-04-28T17:48:34.000Z | pastepwn/analyzers/wordanalyzer.py | 0xSaFi/pastepwn | 9009874f9c9edd2be86399cc90802117ae28d3ce | [
"MIT"
] | null | null | null | pastepwn/analyzers/wordanalyzer.py | 0xSaFi/pastepwn | 9009874f9c9edd2be86399cc90802117ae28d3ce | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from .basicanalyzer import BasicAnalyzer
class WordAnalyzer(BasicAnalyzer):
"""Analyzer to match the content of a paste via regular expressions"""
name = "WordAnalyzer"
def __init__(self, actions, word, blacklist=None, case_sensitive=False):
super().__init__(actions, "{0} ... | 30.243243 | 76 | 0.62109 |
da896a46deeaa07a4fe03fa9b06bfdafaa8327f0 | 10,062 | py | Python | NavPython/IronPython/Tutorial/spellcheck.py | jstammers/EDMSuite | 2841c0edef32a496855ca41deaa0f710b017ae2f | [
"MIT"
] | 2 | 2020-09-27T09:19:57.000Z | 2022-03-05T11:08:26.000Z | NavPython/IronPython/Tutorial/spellcheck.py | jstammers/EDMSuite | 2841c0edef32a496855ca41deaa0f710b017ae2f | [
"MIT"
] | null | null | null | NavPython/IronPython/Tutorial/spellcheck.py | jstammers/EDMSuite | 2841c0edef32a496855ca41deaa0f710b017ae2f | [
"MIT"
] | 1 | 2020-05-11T12:26:46.000Z | 2020-05-11T12:26:46.000Z | #####################################################################################
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# This source code is subject to terms and conditions of the Apache License, Version 2.0. A
# copy of the license can be found in the License.html file at the root of t... | 36.857143 | 97 | 0.653846 |
980dec2b5237c0bbc0307f6491bf11402e1b25e7 | 4,143 | py | Python | research/syntaxnet/dragnn/tools/conll_checkpoint_converter.py | Zhangxu0501/models | 7c8ca1647926226556e05fdd6535a35abe3100eb | [
"Apache-2.0"
] | 3,326 | 2018-01-26T22:42:25.000Z | 2022-02-16T13:16:39.000Z | research/syntaxnet/dragnn/tools/conll_checkpoint_converter.py | wzy1510300a28/models | 42a3da72313b8814ef0ced8f425af90b57313b9f | [
"Apache-2.0"
] | 150 | 2017-08-28T14:59:36.000Z | 2022-03-11T23:21:35.000Z | research/syntaxnet/dragnn/tools/conll_checkpoint_converter.py | wzy1510300a28/models | 42a3da72313b8814ef0ced8f425af90b57313b9f | [
"Apache-2.0"
] | 1,474 | 2018-02-01T04:33:18.000Z | 2022-03-08T07:02:20.000Z | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 39.836538 | 80 | 0.736906 |
042c00c0e84791656694ac57dfc59019b97125bf | 3,878 | py | Python | Bots/Python/Skills/CodeFirst/WaterfallSkillBot/dialogs/sso/sso_skill_dialog.py | gabog/BotFramework-FunctionalTests | 9ebd811539648bf7d53f6f92af42ff8ef60344a1 | [
"MIT"
] | 28 | 2020-09-21T17:41:35.000Z | 2022-03-16T00:56:38.000Z | Bots/Python/Skills/CodeFirst/WaterfallSkillBot/dialogs/sso/sso_skill_dialog.py | gabog/BotFramework-FunctionalTests | 9ebd811539648bf7d53f6f92af42ff8ef60344a1 | [
"MIT"
] | 196 | 2020-08-06T04:42:31.000Z | 2022-03-11T21:35:06.000Z | Bots/Python/Skills/CodeFirst/WaterfallSkillBot/dialogs/sso/sso_skill_dialog.py | GiulianoDolceTalianoSantoro/BotFramework-FunctionalTests | f21bded918cf9e51a296fcb0b87ad6495c59bea8 | [
"MIT"
] | 25 | 2020-07-31T10:05:40.000Z | 2022-03-23T19:35:52.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from botbuilder.core import MessageFactory
from botbuilder.dialogs import (
DialogTurnResult,
DialogTurnStatus,
ChoicePrompt,
PromptOptions,
WaterfallDialog,
WaterfallStepContext,
ComponentDialog,
... | 34.318584 | 88 | 0.649304 |
e899f1bb0d5ef95239d0135b42e06ded87fb66ff | 1,018 | py | Python | 201-250/226.py | yshshadow/Leetcode | 5097f69bb0050d963c784d6bc0e88a7e871568ed | [
"MIT"
] | null | null | null | 201-250/226.py | yshshadow/Leetcode | 5097f69bb0050d963c784d6bc0e88a7e871568ed | [
"MIT"
] | null | null | null | 201-250/226.py | yshshadow/Leetcode | 5097f69bb0050d963c784d6bc0e88a7e871568ed | [
"MIT"
] | null | null | null | # Invert a binary tree.
#
# 4
# / \
# 2 7
# / \ / \
# 1 3 6 9
# to
#
# 4
# / \
# 7 2
# / \ / \
# 9 6 3 1
# Definition for a binary tree node.
class TreeNode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class ... | 19.576923 | 37 | 0.438114 |
b76bfd7ccfbd87872d130b1f548ff2d4d2b94651 | 21,808 | py | Python | python/onshape_client/oas/api_client.py | W2009/onshape-clients | c553d86b013413770fe89ed58754df5c49efc585 | [
"MIT"
] | null | null | null | python/onshape_client/oas/api_client.py | W2009/onshape-clients | c553d86b013413770fe89ed58754df5c49efc585 | [
"MIT"
] | null | null | null | python/onshape_client/oas/api_client.py | W2009/onshape-clients | c553d86b013413770fe89ed58754df5c49efc585 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Onshape REST API
The Onshape REST API consumed by all clients. # noqa: E501
The version of the OpenAPI document: 1.108
Contact: api-support@onshape.zendesk.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import json
import mimetype... | 35.402597 | 87 | 0.577265 |
dd01180c3f18575910c1b1d979c462a8e5b784bc | 455 | py | Python | books/blackhat_python/ch01/number_converter.py | argodev/learn | d815beb9c1f8fa3dd8cd917640ebcca5822205c3 | [
"MIT"
] | null | null | null | books/blackhat_python/ch01/number_converter.py | argodev/learn | d815beb9c1f8fa3dd8cd917640ebcca5822205c3 | [
"MIT"
] | 15 | 2020-01-28T22:25:10.000Z | 2022-03-11T23:21:02.000Z | books/blackhat_python/ch01/number_converter.py | argodev/learn | d815beb9c1f8fa3dd8cd917640ebcca5822205c3 | [
"MIT"
] | null | null | null |
def sum(number_one, number_two):
number_one_int = convert_integer(number_one)
number_two_int = convert_integer(number_two)
result = number_one_int + number_two_int
return result
def convert_integer(number_string):
converted_integer = int(number_string)
return converted_integer
def main()... | 16.851852 | 48 | 0.69011 |
07b28e784319f7128406115b2cc22b4987253bec | 9,821 | py | Python | tests/integration/state_test.py | jgiannuzzi/compose | d7db15ce9452c765828f585cad06b46282d54a33 | [
"Apache-2.0"
] | 1 | 2019-03-06T08:03:18.000Z | 2019-03-06T08:03:18.000Z | tests/integration/state_test.py | jgiannuzzi/compose | d7db15ce9452c765828f585cad06b46282d54a33 | [
"Apache-2.0"
] | 2 | 2018-06-26T03:38:32.000Z | 2019-03-09T16:36:56.000Z | tests/integration/state_test.py | jgiannuzzi/compose | d7db15ce9452c765828f585cad06b46282d54a33 | [
"Apache-2.0"
] | 1 | 2019-11-04T06:52:37.000Z | 2019-11-04T06:52:37.000Z | """
Integration tests which cover state convergence (aka smart recreate) performed
by `docker-compose up`.
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import py
from .testcases import DockerClientTestCase
from .testcases import get_links
from compose.config import config
from co... | 33.404762 | 86 | 0.617147 |
20e995d00c6170c3e76b22ef7044512927671d89 | 232 | py | Python | src/metrics/iou.py | Charbel199/Oil-Spill-Thickness-Estimation | dd600f6da611461f3b8072389bc34e6285109246 | [
"MIT"
] | null | null | null | src/metrics/iou.py | Charbel199/Oil-Spill-Thickness-Estimation | dd600f6da611461f3b8072389bc34e6285109246 | [
"MIT"
] | null | null | null | src/metrics/iou.py | Charbel199/Oil-Spill-Thickness-Estimation | dd600f6da611461f3b8072389bc34e6285109246 | [
"MIT"
] | null | null | null | import numpy as np
def iou_coefficient(y_true, y_pred):
intersection = y_true == y_pred
union = np.logical_or(y_true, y_pred)
iou_score = np.count_nonzero(intersection) / np.count_nonzero(union)
return iou_score
| 21.090909 | 72 | 0.728448 |
adacc26b80bff37fdc9637020854f07e1e72a02c | 13,662 | py | Python | visualization/MultiSensorVis.py | Touche-Design/tactio-software | 5e8019547261aad069bfd6650a31c1e6dde0056a | [
"MIT"
] | null | null | null | visualization/MultiSensorVis.py | Touche-Design/tactio-software | 5e8019547261aad069bfd6650a31c1e6dde0056a | [
"MIT"
] | 1 | 2021-02-28T00:01:20.000Z | 2021-02-28T00:01:20.000Z | visualization/MultiSensorVis.py | Touche-Design/tactio-software | 5e8019547261aad069bfd6650a31c1e6dde0056a | [
"MIT"
] | null | null | null | import xml.etree.ElementTree as et
from PyQt5 import QtWidgets, QtCore, Qt, QtGui
import sys # We need sys so that we can pass argv to QApplication
import os
import numpy as np
import serial
import json
import time
import PyTactio
import json
from NumpyArrayEncoder import NumpyArrayEncoder
import SingleGrid
import Pa... | 41.525836 | 134 | 0.607598 |
8acdb862d56e71716b5e66c78259ccdc4b858920 | 3,552 | py | Python | netbox_dns/api/serializers.py | jeroenvermeulen/netbox-dns | fa51bd6afcac0efecc63e4829b27d1a9597c6c15 | [
"MIT"
] | 86 | 2021-08-10T10:47:30.000Z | 2022-03-29T17:46:01.000Z | netbox_dns/api/serializers.py | jeroenvermeulen/netbox-dns | fa51bd6afcac0efecc63e4829b27d1a9597c6c15 | [
"MIT"
] | 67 | 2021-08-10T15:18:47.000Z | 2022-03-31T08:34:59.000Z | netbox_dns/api/serializers.py | jeroenvermeulen/netbox-dns | fa51bd6afcac0efecc63e4829b27d1a9597c6c15 | [
"MIT"
] | 10 | 2021-08-10T10:47:41.000Z | 2022-02-09T16:42:05.000Z | from rest_framework import serializers
from netbox.api.serializers import PrimaryModelSerializer
from netbox_dns.api.nested_serializers import (
NestedRecordSerializer,
NestedZoneSerializer,
NestedNameServerSerializer,
)
from netbox_dns.models import Record, Zone, NameServer
class NameServerSerializer(Pr... | 25.371429 | 88 | 0.563908 |
27ca016bf851a9a2573ba55052266a9ece9cdf1a | 65,971 | py | Python | scripts/yolt2.py | kareematham/yolt | 29340de11380854dbf671690c13267007b6d759e | [
"Apache-2.0"
] | null | null | null | scripts/yolt2.py | kareematham/yolt | 29340de11380854dbf671690c13267007b6d759e | [
"Apache-2.0"
] | null | null | null | scripts/yolt2.py | kareematham/yolt | 29340de11380854dbf671690c13267007b6d759e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 16 14:11:56 2016
@author: avanetten
# run nvidia-docker nteractive shell
nvidia-docker run -it -v /raid:/raid —name yolt_name darknet
##########################
# See notes.txt, yolt_data_prep.py for more info
# for training, yolt replaces "images"... | 42.452381 | 155 | 0.526262 |
022dbe97732c425237f46ef69c7217d94c7735a7 | 69,212 | py | Python | conda_build/utils.py | bdice/conda-build | f12b838b827b2581925ca65f9a856e82dc467e0d | [
"BSD-3-Clause"
] | null | null | null | conda_build/utils.py | bdice/conda-build | f12b838b827b2581925ca65f9a856e82dc467e0d | [
"BSD-3-Clause"
] | 6 | 2016-07-05T19:08:39.000Z | 2017-10-23T10:59:14.000Z | conda_build/utils.py | bdice/conda-build | f12b838b827b2581925ca65f9a856e82dc467e0d | [
"BSD-3-Clause"
] | 2 | 2020-01-07T08:34:25.000Z | 2020-01-07T09:10:29.000Z | from __future__ import absolute_import, division, print_function
from collections import OrderedDict, defaultdict
import contextlib
import fnmatch
import hashlib
import json
from locale import getpreferredencoding
import libarchive
import logging
import logging.config
import mmap
import operator
import os
from os.path... | 36.331759 | 141 | 0.588077 |
5d17e19622391716c7d67ba159c643ff076fb7ac | 8,344 | py | Python | python_examples/uncertain_obstacles.py | dawsonc/trajopt | deab303442c0f211ee25278a36c1bba0c4f7c915 | [
"BSD-2-Clause"
] | null | null | null | python_examples/uncertain_obstacles.py | dawsonc/trajopt | deab303442c0f211ee25278a36c1bba0c4f7c915 | [
"BSD-2-Clause"
] | null | null | null | python_examples/uncertain_obstacles.py | dawsonc/trajopt | deab303442c0f211ee25278a36c1bba0c4f7c915 | [
"BSD-2-Clause"
] | null | null | null | import openravepy
import trajoptpy
from trajoptpy.check_traj import traj_is_safe
import json
import time
import numpy as np
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--interactive", action="store_true")
parser.add_argument("--position_only", action="store_true")
args = parser.parse_args()... | 31.969349 | 83 | 0.565197 |
d039059d40211bddd93c4160f7389a217596f8ce | 4,520 | py | Python | utility/telegrammsg.py | minari2/MyKiwoom | f2382063b77bc92d01a7d10234c34a95b0e7df69 | [
"MIT"
] | 1 | 2021-09-26T14:01:16.000Z | 2021-09-26T14:01:16.000Z | utility/telegrammsg.py | minari2/MyKiwoom | f2382063b77bc92d01a7d10234c34a95b0e7df69 | [
"MIT"
] | null | null | null | utility/telegrammsg.py | minari2/MyKiwoom | f2382063b77bc92d01a7d10234c34a95b0e7df69 | [
"MIT"
] | 2 | 2021-11-01T11:30:25.000Z | 2021-11-01T14:26:51.000Z | import time
import sqlite3
import telegram
import pandas as pd
from utility.setting import db_stg
from telegram.ext import Updater, MessageHandler, Filters
class TelegramMsg:
def __init__(self, qlist):
self.windowQ = qlist[0]
self.workerQ = qlist[1]
self.queryQ = qlist[4]
self.tele... | 38.305085 | 106 | 0.476327 |
f910fbc75fed33084e705c504d1deb17c51943f5 | 26,826 | py | Python | intersight/apis/memory_persistent_memory_config_result_api.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 21 | 2018-03-29T14:20:35.000Z | 2021-10-13T05:11:41.000Z | intersight/apis/memory_persistent_memory_config_result_api.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 14 | 2018-01-30T15:45:46.000Z | 2022-02-23T14:23:21.000Z | intersight/apis/memory_persistent_memory_config_result_api.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 18 | 2018-01-03T15:09:56.000Z | 2021-07-16T02:21:54.000Z | # coding: utf-8
"""
Cisco Intersight OpenAPI specification.
The Cisco Intersight OpenAPI specification.
OpenAPI spec version: 1.0.9-1461
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
import re
# python 2 and p... | 53.120792 | 819 | 0.636211 |
0cc6ac6954112f55646bc0e7f4c863c379b705e5 | 13,298 | py | Python | app.py | Lahlukap669/api_flask | 44c67f927434d7632b45f9741ed4b01d6d774484 | [
"CNRI-Python"
] | null | null | null | app.py | Lahlukap669/api_flask | 44c67f927434d7632b45f9741ed4b01d6d774484 | [
"CNRI-Python"
] | null | null | null | app.py | Lahlukap669/api_flask | 44c67f927434d7632b45f9741ed4b01d6d774484 | [
"CNRI-Python"
] | null | null | null | from flask import Flask, jsonify, request, send_file, send_from_directory
import json
import hashlib
from flask_cors import CORS
import youtube_dl
import os
import shutil
from ffmpy import FFmpeg
import zipfile
import time
from io import BytesIO
import re
app = Flask(__name__)
from flask_sqlalchemy import SQLAlchemy
... | 32.593137 | 155 | 0.496917 |
eb31318bf27a5e106b2013e24efa37b1a9cbf46c | 2,093 | py | Python | helloworld/settings_base.py | g-cassie/example-django | b5957fa847b5ba29e9becf601e65db02ec6f2712 | [
"Apache-2.0"
] | 1 | 2021-12-03T13:01:20.000Z | 2021-12-03T13:01:20.000Z | helloworld/settings_base.py | g-cassie/example-django | b5957fa847b5ba29e9becf601e65db02ec6f2712 | [
"Apache-2.0"
] | null | null | null | helloworld/settings_base.py | g-cassie/example-django | b5957fa847b5ba29e9becf601e65db02ec6f2712 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Pants project contributors.
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
import os
from typing import Any
from helloworld.util.per_app_db_router import PerAppDBRouter
HELLOWORLD_MODE = os.environ.get("HELLOWORLD_MODE", "DEV")
# Construct paths ... | 24.057471 | 96 | 0.631629 |
ff03a9e1463acfaee9dd12d5a0ca91c362fa4364 | 2,126 | py | Python | examples/cv/mnist_lenet5_image_classification_pure_lightning.py | madhukarkm/NeMo | 648c97f076147684bee6aaada209f2f20adcaf5d | [
"Apache-2.0"
] | 4,145 | 2019-09-13T08:29:43.000Z | 2022-03-31T18:31:44.000Z | examples/cv/mnist_lenet5_image_classification_pure_lightning.py | madhukarkm/NeMo | 648c97f076147684bee6aaada209f2f20adcaf5d | [
"Apache-2.0"
] | 2,031 | 2019-09-17T16:51:39.000Z | 2022-03-31T23:52:41.000Z | examples/cv/mnist_lenet5_image_classification_pure_lightning.py | madhukarkm/NeMo | 648c97f076147684bee6aaada209f2f20adcaf5d | [
"Apache-2.0"
] | 1,041 | 2019-09-13T10:08:21.000Z | 2022-03-30T06:37:38.000Z | # Copyright (c) 2020, NVIDIA CORPORATION. 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 appli... | 32.212121 | 107 | 0.736124 |
c845ab8029a13fa39141b2799ca7caab0558b2a5 | 2,640 | py | Python | superset/superset/extract_table_names.py | warenlg/sourced-ui | c8ff53b369e182ee2b9715a67b00ac1688995732 | [
"Apache-2.0"
] | 108 | 2018-01-22T11:09:59.000Z | 2021-01-15T10:53:04.000Z | superset/extract_table_names.py | graphadvantage/incubator-superset-gql-neo4j | 5cc803e2459c58c4789c2b9182b3c9af31d307d6 | [
"Apache-2.0",
"CC-BY-4.0"
] | 112 | 2018-01-25T22:57:21.000Z | 2019-08-22T20:08:48.000Z | superset/extract_table_names.py | graphadvantage/incubator-superset-gql-neo4j | 5cc803e2459c58c4789c2b9182b3c9af31d307d6 | [
"Apache-2.0",
"CC-BY-4.0"
] | 24 | 2018-01-19T22:54:39.000Z | 2020-11-12T13:04:25.000Z | #!/usr/bin/env python
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "Li... | 34.285714 | 69 | 0.692424 |
d40e56e8b606dac3f1bd6881f664c4329ebf12af | 4,007 | py | Python | tests/test_ext_autodoc_mock.py | danieleades/sphinx | 1c98aea126919b218766371e1fdf308a1167e95f | [
"BSD-2-Clause"
] | null | null | null | tests/test_ext_autodoc_mock.py | danieleades/sphinx | 1c98aea126919b218766371e1fdf308a1167e95f | [
"BSD-2-Clause"
] | 1,662 | 2015-01-02T11:45:27.000Z | 2015-01-03T12:21:29.000Z | tests/test_ext_autodoc_mock.py | danieleades/sphinx | 1c98aea126919b218766371e1fdf308a1167e95f | [
"BSD-2-Clause"
] | null | null | null | """Test the autodoc extension."""
import abc
import sys
from importlib import import_module
from typing import TypeVar
import pytest
from sphinx.ext.autodoc.mock import _MockModule, _MockObject, ismock, mock, undecorate
def test_MockModule():
mock = _MockModule('mocked_module')
assert isinstance(mock.some_... | 26.361842 | 86 | 0.669329 |
b8cc822972b88ccd458311705f315f6373731403 | 564 | py | Python | CicloI/1/Conexion.py | BenjaSar/Retos | 921b6e312dcdfaef470b1ff019d566c813bd84df | [
"MIT"
] | null | null | null | CicloI/1/Conexion.py | BenjaSar/Retos | 921b6e312dcdfaef470b1ff019d566c813bd84df | [
"MIT"
] | null | null | null | CicloI/1/Conexion.py | BenjaSar/Retos | 921b6e312dcdfaef470b1ff019d566c813bd84df | [
"MIT"
] | null | null | null | import math
def numeroUsuarios(uProgramacion):
global lVirtual
hSociales = 2 * uProgramacion + 4
lVirtual = math.floor((uProgramacion + hSociales) / 5)
return uProgramacion, hSociales, lVirtual
def asignacionSalas():
if (0 < lVirtual <= 20):
sala = "uno"
elif (20 < lVirtual <= 30):
... | 18.193548 | 58 | 0.624113 |
de94931d969e0f46d7599c5ba46f727afe4c0051 | 688 | py | Python | SpiMediaGallery/main/migrations/0040_synctoken.py | Swiss-Polar-Institute/spi-media-gallery | 2f66f938cbe1a7a25a5971d42abb1b0b5deca31e | [
"MIT"
] | 5 | 2020-02-21T20:38:50.000Z | 2022-02-19T11:00:46.000Z | SpiMediaGallery/main/migrations/0040_synctoken.py | Swiss-Polar-Institute/spi-media-gallery | 2f66f938cbe1a7a25a5971d42abb1b0b5deca31e | [
"MIT"
] | 23 | 2019-10-01T17:13:39.000Z | 2022-01-21T20:02:26.000Z | SpiMediaGallery/main/migrations/0040_synctoken.py | Swiss-Polar-Institute/spi-media-gallery | 2f66f938cbe1a7a25a5971d42abb1b0b5deca31e | [
"MIT"
] | 2 | 2022-02-03T08:52:51.000Z | 2022-02-03T08:58:00.000Z | # Generated by Django 3.1.2 on 2020-10-12 13:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0039_remote_medium_source_char_field'),
]
operations = [
migrations.CreateModel(
name='SyncToken',
fields=[
... | 31.272727 | 130 | 0.613372 |
26e0ee4cf0da34320275e9f8b1e45d13a83ba409 | 1,609 | py | Python | examples/TWATCH-2020/mono_fonts/mono_fonts.py | jdtsmith/st7789_mpy | 1fdfc076861eff7bb1c318e0ae335026b3cb9cb1 | [
"MIT"
] | 153 | 2020-02-02T11:03:14.000Z | 2022-03-30T05:47:07.000Z | examples/TWATCH-2020/mono_fonts/mono_fonts.py | skylin008/st7789_mpy | f304991fc5558be653df5f0de928494b85cbc60d | [
"MIT"
] | 58 | 2020-04-11T23:23:02.000Z | 2022-03-26T20:45:23.000Z | examples/TWATCH-2020/mono_fonts/mono_fonts.py | skylin008/st7789_mpy | f304991fc5558be653df5f0de928494b85cbc60d | [
"MIT"
] | 50 | 2020-02-02T11:05:23.000Z | 2022-03-22T15:24:42.000Z | """
mono_fonts.py for monofont2bitmap converter and bitmap method.
"""
import time
from machine import Pin, SPI
import axp202c
import st7789
import inconsolata_16 as font_16
import inconsolata_32 as font_32
import inconsolata_64 as font_64
def main():
fast = False
def display_font(font):
tft.fill(s... | 21.743243 | 63 | 0.51647 |
7fef8e796537c8fdb0916d2bf69a026c96618b62 | 901 | py | Python | ch09/vector23_v0.py | Aperjump/Fluent_Python | 6e8abf18b913158789d73d25f4880313d2279ab8 | [
"MIT"
] | 2 | 2017-06-15T02:39:32.000Z | 2018-05-02T03:26:24.000Z | ch09/vector23_v0.py | Aperjump/Fluent_Python | 6e8abf18b913158789d73d25f4880313d2279ab8 | [
"MIT"
] | null | null | null | ch09/vector23_v0.py | Aperjump/Fluent_Python | 6e8abf18b913158789d73d25f4880313d2279ab8 | [
"MIT"
] | 1 | 2021-12-08T05:36:17.000Z | 2021-12-08T05:36:17.000Z | #coding=utf-8
"""
@From book Fluent Python
"""
from array import arrary
import math
class Vector2d:
typecode = 'd'
def __init__(self, x, y):
self.x = float(x)
self.y = float(y)
## __iter__ makes the class unpackable
## x, y = vector
def __iter__(self):
return (i for i in (se... | 27.30303 | 57 | 0.581576 |
c58cf354f777b0b9d487da65b913ae1aaacd03e9 | 7,718 | py | Python | src/ClusterManager/virtual_cluster_status.py | RichardZhaoW/DLWorkspace | 27d3a3a82e59305bdc67dbfd69098d493f8b3cd5 | [
"MIT"
] | 2 | 2019-10-16T23:54:34.000Z | 2019-11-07T00:08:32.000Z | src/ClusterManager/virtual_cluster_status.py | RichardZhaoW/DLWorkspace | 27d3a3a82e59305bdc67dbfd69098d493f8b3cd5 | [
"MIT"
] | null | null | null | src/ClusterManager/virtual_cluster_status.py | RichardZhaoW/DLWorkspace | 27d3a3a82e59305bdc67dbfd69098d493f8b3cd5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import collections
import json
import logging
import os
import sys
sys.path.append(
os.path.join(os.path.dirname(os.path.abspath(__file__)), "../utils"))
from resource_stat import Cpu, Memory, Gpu
from cluster_resource import ClusterResource
from cluster_status import ClusterStatus, get_jo... | 38.207921 | 80 | 0.587069 |
98f41469f9971643012636db0f7e8b852bb23880 | 7,391 | py | Python | steps/optimizers.py | zapatacomputing/z-quantum-optimizers | 0bb3a395b8b41f169c7499d0be506825beb94193 | [
"Apache-2.0"
] | 3 | 2020-10-06T13:53:59.000Z | 2021-11-17T11:36:56.000Z | steps/optimizers.py | zapatacomputing/z-quantum-optimizers | 0bb3a395b8b41f169c7499d0be506825beb94193 | [
"Apache-2.0"
] | 33 | 2020-04-27T20:29:21.000Z | 2022-01-20T17:54:39.000Z | steps/optimizers.py | zapatacomputing/z-quantum-optimizers | 0bb3a395b8b41f169c7499d0be506825beb94193 | [
"Apache-2.0"
] | 2 | 2020-06-25T10:19:36.000Z | 2021-01-22T18:30:31.000Z | from zquantum.optimizers.grid_search import load_parameter_grid
from zquantum.core.serialization import save_array, load_array
from zquantum.core.circuits.layouts import load_circuit_connectivity
from zquantum.core.measurement import load_expectation_values
from zquantum.core.estimation import estimate_expectation_va... | 38.494792 | 157 | 0.72683 |
54f9cee993d35966034d0bc12d3857d7b3550556 | 1,711 | py | Python | core/exceptions.py | makreth/manaproto | f9f232f3141be796bc432d8880bf168bb9959200 | [
"MIT"
] | null | null | null | core/exceptions.py | makreth/manaproto | f9f232f3141be796bc432d8880bf168bb9959200 | [
"MIT"
] | null | null | null | core/exceptions.py | makreth/manaproto | f9f232f3141be796bc432d8880bf168bb9959200 | [
"MIT"
] | null | null | null | class BaseBoardException(Exception):
def __init__(self, message="BaseBoardException raised."):
super().__init__(message)
def __str__(self):
return self.message
class MissingPayloadKeys(BaseBoardException):
def __init__(self, missing_keys):
super().__init__(message=f"Payload rej... | 43.871795 | 144 | 0.746347 |
1b0c94751122629f2d51350905755bf50b887259 | 1,825 | py | Python | codes/EGAAC.py | xiaofengsong/pHisPred | 514d58f94fe9bcc9db700f30d828700b56d847b1 | [
"MIT"
] | null | null | null | codes/EGAAC.py | xiaofengsong/pHisPred | 514d58f94fe9bcc9db700f30d828700b56d847b1 | [
"MIT"
] | null | null | null | codes/EGAAC.py | xiaofengsong/pHisPred | 514d58f94fe9bcc9db700f30d828700b56d847b1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#_*_coding:utf-8_*_
import re, sys, os
from collections import Counter
pPath = os.path.split(os.path.realpath(__file__))[0]
sys.path.append(pPath)
import readFasta
import saveCode
import checkFasta
USAGE = """
USAGE:
python EGAAC.py input.fasta <sliding_window> <output>
input.fasta: the ... | 25.347222 | 99 | 0.663014 |
fc02516a929ba77693374580a07b335654b5d790 | 2,381 | py | Python | _pycharm_skeletons/renderdoc/SDFile.py | Lex-DRL/renderdoc-py-stubs | 75d280e4f500ded506f3315a49fc432b37ab4fa6 | [
"MIT"
] | null | null | null | _pycharm_skeletons/renderdoc/SDFile.py | Lex-DRL/renderdoc-py-stubs | 75d280e4f500ded506f3315a49fc432b37ab4fa6 | [
"MIT"
] | null | null | null | _pycharm_skeletons/renderdoc/SDFile.py | Lex-DRL/renderdoc-py-stubs | 75d280e4f500ded506f3315a49fc432b37ab4fa6 | [
"MIT"
] | null | null | null | # encoding: utf-8
# module renderdoc
# from P:\1-Scripts\_Python\Py-Autocomplete\renderdoc.pyd
# by generator 1.146
# no doc
# imports
import enum as __enum
from .SwigPyObject import SwigPyObject
class SDFile(SwigPyObject):
""" Contains the structured information in a file. Owns the buffers and chunks. """
... | 31.328947 | 97 | 0.622008 |
6801fac9f88e6af5388fb67d8e574b0e84d82758 | 4,385 | py | Python | manila/scheduler/weighers/goodness.py | gouthampacha/manila | 4b7ba9b99d272663f519b495668715fbf979ffbc | [
"Apache-2.0"
] | 3 | 2016-06-06T13:05:00.000Z | 2021-05-05T04:29:24.000Z | manila/scheduler/weighers/goodness.py | gouthampacha/manila | 4b7ba9b99d272663f519b495668715fbf979ffbc | [
"Apache-2.0"
] | 6 | 2021-02-11T16:09:43.000Z | 2022-03-15T09:56:25.000Z | manila/scheduler/weighers/goodness.py | gouthampacha/manila | 4b7ba9b99d272663f519b495668715fbf979ffbc | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | # Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
# 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... | 35.362903 | 78 | 0.604105 |
d9fb2635031f78ce16b2b3ea086ac674e0fc385e | 1,106 | py | Python | addons/emipro_theme_base/model/ir_ui_view.py | marionumza/vocal_v12 | 480990e919c9410903e06e7813ee92800bd6a569 | [
"Unlicense"
] | null | null | null | addons/emipro_theme_base/model/ir_ui_view.py | marionumza/vocal_v12 | 480990e919c9410903e06e7813ee92800bd6a569 | [
"Unlicense"
] | null | null | null | addons/emipro_theme_base/model/ir_ui_view.py | marionumza/vocal_v12 | 480990e919c9410903e06e7813ee92800bd6a569 | [
"Unlicense"
] | 1 | 2021-05-05T07:59:08.000Z | 2021-05-05T07:59:08.000Z | from odoo import api, fields, models, _
class View(models.Model):
_inherit = "ir.ui.view"
#Assign correct inherited_id of duplicated view_id for a customize views when customize_show going to switched
@api.multi
def toggle(self):
super(View,self).toggle()
current_website_id = self... | 50.272727 | 155 | 0.651899 |
565b26ddde0a4360fb04fe68156c5a03562eb59d | 5,067 | py | Python | wx_server/wx_server/formatters.py | Kami/raspberry-pi-ham-radio | 7ff9180e3a4d645b92e07ce92cbcbf73c7a0a628 | [
"Apache-2.0"
] | 2 | 2020-10-26T06:16:52.000Z | 2021-11-15T11:05:29.000Z | wx_server/wx_server/formatters.py | Kami/raspberry-pi-ham-radio | 7ff9180e3a4d645b92e07ce92cbcbf73c7a0a628 | [
"Apache-2.0"
] | null | null | null | wx_server/wx_server/formatters.py | Kami/raspberry-pi-ham-radio | 7ff9180e3a4d645b92e07ce92cbcbf73c7a0a628 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Tomaz Muraus
#
# 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 ... | 36.453237 | 98 | 0.675745 |
75f13f5b56e066479940508af44c33f0d1ba0f38 | 9,686 | py | Python | code/rel_da_budget.py | bflashcp3f/ProcBERT | 72afe18ac30825e1756672235e1369aa8837e62a | [
"MIT"
] | 8 | 2021-09-19T21:42:03.000Z | 2021-12-17T06:17:13.000Z | code/rel_da_budget.py | bflashcp3f/ProcBERT | 72afe18ac30825e1756672235e1369aa8837e62a | [
"MIT"
] | null | null | null | code/rel_da_budget.py | bflashcp3f/ProcBERT | 72afe18ac30825e1756672235e1369aa8837e62a | [
"MIT"
] | null | null | null |
import json
import os
import numpy as np
import random
import torch
from datetime import datetime
from transformers import BertForTokenClassification, BertPreTrainedModel, AdamW
from torch.utils.data import TensorDataset, DataLoader, RandomSampler, SequentialSampler
from tqdm import tqdm, trange
from utils.rel imp... | 38.133858 | 152 | 0.587859 |
ab01788c30e5972adfb5c7aaf70d70648460a8de | 1,566 | py | Python | lib/python/ray/array/remote/linalg.py | jssmith/ray-legacy | 0a4414590677ff518188f035f8dba36927c5d9c5 | [
"BSD-3-Clause"
] | 12 | 2016-06-16T07:34:25.000Z | 2016-09-12T17:25:05.000Z | lib/python/ray/array/remote/linalg.py | jssmith/ray-legacy | 0a4414590677ff518188f035f8dba36927c5d9c5 | [
"BSD-3-Clause"
] | 121 | 2016-06-11T19:45:36.000Z | 2016-09-17T00:30:13.000Z | lib/python/ray/array/remote/linalg.py | jssmith/ray-legacy | 0a4414590677ff518188f035f8dba36927c5d9c5 | [
"BSD-3-Clause"
] | 13 | 2016-11-29T22:15:02.000Z | 2022-02-06T02:36:34.000Z | import numpy as np
import ray
__all__ = ["matrix_power", "solve", "tensorsolve", "tensorinv", "inv",
"cholesky", "eigvals", "eigvalsh", "pinv", "slogdet", "det",
"svd", "eig", "eigh", "lstsq", "norm", "qr", "cond", "matrix_rank",
"LinAlgError", "multi_dot"]
@ray.remote
def matrix_powe... | 17.795455 | 78 | 0.693487 |
87a1083e37e629fc65f5cc8e2e7c33050be4ed7b | 17,139 | py | Python | sphero_res_learner_1D_analyze.py | koro/smp_sphero | 614f4958816b565c7950ea0c6e6249864fbf2efe | [
"MIT"
] | 1 | 2020-12-13T13:02:55.000Z | 2020-12-13T13:02:55.000Z | sphero_res_learner_1D_analyze.py | koro/smp_sphero | 614f4958816b565c7950ea0c6e6249864fbf2efe | [
"MIT"
] | null | null | null | sphero_res_learner_1D_analyze.py | koro/smp_sphero | 614f4958816b565c7950ea0c6e6249864fbf2efe | [
"MIT"
] | null | null | null | #!/usr/bin/env python
__author__ = "Oswald Berthold <bertolos@informatik.hu-berlin.de>"
"""Analyze results from sphero 1D and 2D learning experiments"""
import numpy as np
import pandas as pd
import matplotlib.pylab as pl
import argparse, sys
pl.rcParams["pdf.fonttype"] = 42
pl.rcParams["ps.fonttype"] = 42
class Sp... | 36.311441 | 138 | 0.478441 |
0743ca783885b7624fa1cb88b135c78bd9c690ce | 5,584 | py | Python | authors/apps/authentication/models.py | andela/ah-infinity-stones | e57d4b007f0df4a5db9a1841fd88898adecf1fcd | [
"BSD-3-Clause"
] | null | null | null | authors/apps/authentication/models.py | andela/ah-infinity-stones | e57d4b007f0df4a5db9a1841fd88898adecf1fcd | [
"BSD-3-Clause"
] | 64 | 2018-11-27T11:20:55.000Z | 2021-06-10T20:58:34.000Z | authors/apps/authentication/models.py | andela/ah-infinity-stones | e57d4b007f0df4a5db9a1841fd88898adecf1fcd | [
"BSD-3-Clause"
] | 4 | 2018-12-19T19:58:18.000Z | 2019-10-03T08:28:00.000Z | import jwt
from datetime import datetime, timedelta
from django.conf import settings
from django.contrib.auth.models import (
AbstractBaseUser, BaseUserManager, PermissionsMixin
)
from django.db import models
from django.core.mail import send_mail
from django.template.loader import render_to_string
from django.uti... | 36.980132 | 93 | 0.683202 |
76da78484d3e79754331468c6a1f83f48c8202be | 676 | py | Python | ContentSummarization/manage.py | cuttlefish43/minipro1 | 4166afc16eb3b990f2b9430260c737fe019fd72c | [
"MIT"
] | null | null | null | ContentSummarization/manage.py | cuttlefish43/minipro1 | 4166afc16eb3b990f2b9430260c737fe019fd72c | [
"MIT"
] | null | null | null | ContentSummarization/manage.py | cuttlefish43/minipro1 | 4166afc16eb3b990f2b9430260c737fe019fd72c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ContentSummarization.settings')
try:
from django.core.management import execute_from_command_line
... | 29.391304 | 84 | 0.684911 |
54249b3331f2a6b5b164a5f6a5699352e15049e9 | 1,039 | py | Python | aoc_cqkh42/year_2016/day_17.py | cqkh42/advent-of-code | bcf31cf8973a5b6d67492c412dce10df742e04d1 | [
"MIT"
] | null | null | null | aoc_cqkh42/year_2016/day_17.py | cqkh42/advent-of-code | bcf31cf8973a5b6d67492c412dce10df742e04d1 | [
"MIT"
] | null | null | null | aoc_cqkh42/year_2016/day_17.py | cqkh42/advent-of-code | bcf31cf8973a5b6d67492c412dce10df742e04d1 | [
"MIT"
] | null | null | null | import hashlib
from aoc_cqkh42 import BaseSolution
class Solution(BaseSolution):
def paths(self):
to_visit = [(0, 0, '')]
while True:
try:
x, y, steps = to_visit.pop(0)
except IndexError:
return
if x == y == 3:
yi... | 28.861111 | 61 | 0.443696 |
fed5e0aaea8844dc192126d339ae12a14f85fdb0 | 24,183 | py | Python | TimeWrapper_JE/venv/Lib/site-packages/setuptools/_distutils/msvccompiler.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | TimeWrapper_JE/venv/Lib/site-packages/setuptools/_distutils/msvccompiler.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | TimeWrapper_JE/venv/Lib/site-packages/setuptools/_distutils/msvccompiler.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | """distutils.msvccompiler
Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio.
"""
# Written by Perry Stoll
# hacked by Robin Becker and Thomas Heller to do a better job of
# finding DevStudio (through the registry)
import sys, os
from distutils.error... | 37.551242 | 100 | 0.53306 |
a12f146f5d5502515e73d617e9fd1537ad5d033a | 12,516 | py | Python | server/views/sources/source.py | c4fcm/mediameter-react-boilerplate | bd206621f31ab272aed74dc0104ea65a097d0af2 | [
"Apache-2.0"
] | 32 | 2017-06-12T15:53:14.000Z | 2020-08-31T15:23:38.000Z | server/views/sources/source.py | c4fcm/mediameter-react-boilerplate | bd206621f31ab272aed74dc0104ea65a097d0af2 | [
"Apache-2.0"
] | 1,316 | 2017-05-04T17:14:15.000Z | 2020-09-28T18:32:00.000Z | server/views/sources/source.py | c4fcm/mediameter-react-boilerplate | bd206621f31ab272aed74dc0104ea65a097d0af2 | [
"Apache-2.0"
] | 20 | 2017-10-10T20:07:07.000Z | 2020-08-30T14:03:06.000Z | import logging
from flask import request, jsonify
import flask_login
from datetime import datetime
from dateutil.relativedelta import relativedelta
from mediacloud.tags import MediaTag, TAG_ACTION_ADD, TAG_ACTION_REMOVE
from server import app, user_db, analytics_db
from server.cache import cache
from server.auth impor... | 43.915789 | 144 | 0.715964 |
201deb43de7c3fc93b661092279707c6f568fd0d | 1,491 | py | Python | var/spack/repos/builtin/packages/r-nlme/package.py | varioustoxins/spack | cab0e4cb240f34891a6d753f3393e512f9a99e9a | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/r-nlme/package.py | varioustoxins/spack | cab0e4cb240f34891a6d753f3393e512f9a99e9a | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 6 | 2022-01-08T08:41:11.000Z | 2022-03-14T19:28:07.000Z | var/spack/repos/builtin/packages/r-nlme/package.py | foeroyingur/spack | 5300cbbb2e569190015c72d0970d25425ea38647 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RNlme(RPackage):
"""Fit and compare Gaussian linear and nonlinear mixed-effects models
... | 49.7 | 97 | 0.73776 |
80facc33ecd649cc31812ebd080467a53ba80a6a | 18,322 | py | Python | train/train_nn.py | nightingal3/tonicnet_edit | f55b2b688fab824e463daa7e5588cba36891f275 | [
"Apache-2.0"
] | null | null | null | train/train_nn.py | nightingal3/tonicnet_edit | f55b2b688fab824e463daa7e5588cba36891f275 | [
"Apache-2.0"
] | null | null | null | train/train_nn.py | nightingal3/tonicnet_edit | f55b2b688fab824e463daa7e5588cba36891f275 | [
"Apache-2.0"
] | null | null | null | from random import shuffle
import time, os
import math
import matplotlib.pyplot as plt
from torch import save, set_grad_enabled, sum, max
from torch import optim, cuda, load, device
from torch.nn.utils import clip_grad_norm_
from preprocessing.nn_dataset import get_data_set, TOTAL_BATCHES, TRAIN_BATCHES, N_TOKENS
from ... | 36.066929 | 154 | 0.526089 |
98c2e75d838b07f0b6d928b41827420a34e4705b | 1,970 | py | Python | src/pytailor/config.py | entailor/pytailor | dfd15a0b2a6c1fea6432721ef3b2bc6fb5aad583 | [
"BSD-3-Clause"
] | 9 | 2020-09-20T07:26:19.000Z | 2022-02-28T09:12:30.000Z | src/pytailor/config.py | entailor/pytailor | dfd15a0b2a6c1fea6432721ef3b2bc6fb5aad583 | [
"BSD-3-Clause"
] | 2 | 2020-10-03T07:53:23.000Z | 2020-10-12T11:40:24.000Z | src/pytailor/config.py | entailor/pytailor | dfd15a0b2a6c1fea6432721ef3b2bc6fb5aad583 | [
"BSD-3-Clause"
] | null | null | null | import os
import toml
from pathlib import Path
# set defaults
config = {
"RUNDIR_TIME_FORMAT": "%Y-%m-%d-%H-%M-%S-%f",
"LOGGING_FORMAT": "%(asctime)s %(levelname)s %(message)s",
"API_BASE_URL": "https://api.tailor.wf/",
"API_CLIENT_ID": "1ri1tr2uii1bfiqkr3eu9plu27", # default to Tailor.wf
"API_IDP... | 29.848485 | 109 | 0.690355 |
0594887e85c9c5e5f0d124ce025e227a1123faef | 52 | py | Python | export/mask_generator.py | abamaxa/docvision_generator | 8017f29c7d908cb80ddcd59e345a222271fa74de | [
"MIT"
] | 2 | 2020-02-06T17:30:41.000Z | 2020-08-04T10:35:46.000Z | export/mask_generator.py | abamaxa/docvision_generator | 8017f29c7d908cb80ddcd59e345a222271fa74de | [
"MIT"
] | null | null | null | export/mask_generator.py | abamaxa/docvision_generator | 8017f29c7d908cb80ddcd59e345a222271fa74de | [
"MIT"
] | null | null | null | """
Makes 1 single channel PNG of a bounding box
""" | 17.333333 | 44 | 0.692308 |
6064def4e7d350b437e7240cbae35ed0b68d0135 | 9,370 | py | Python | scripts/Cole/distortion_plots_scale.py | ckampa13/particle_EM_tracks | 2c1bb964971a534a21de7ae40a08ae51020692d3 | [
"MIT"
] | null | null | null | scripts/Cole/distortion_plots_scale.py | ckampa13/particle_EM_tracks | 2c1bb964971a534a21de7ae40a08ae51020692d3 | [
"MIT"
] | null | null | null | scripts/Cole/distortion_plots_scale.py | ckampa13/particle_EM_tracks | 2c1bb964971a534a21de7ae40a08ae51020692d3 | [
"MIT"
] | null | null | null | import os
import numpy as np
import pandas as pd
import lmfit as lm
import plotly.io as pio
from hallprobecalib.hpcplots import histo
import matplotlib.pyplot as plt
from emtracks.plotting import config_plots
config_plots()
# ACC_SCALE = 0.1 # MeV/c
ACC_SCALE = 0.04 # MeV/c
datadir = '/home/ckampa/data/pickles/dist... | 50.106952 | 253 | 0.681323 |
0877a26fe8b15f7a1ffe451461a13c94c204ebf4 | 8,178 | py | Python | 0900-hp/hplip-3.21.12/probe.py | rgfaber/dev-toolkit | b7e6b1e35a4bfb8ca9ba75e5556917cc49b88f7f | [
"Apache-2.0"
] | null | null | null | 0900-hp/hplip-3.21.12/probe.py | rgfaber/dev-toolkit | b7e6b1e35a4bfb8ca9ba75e5556917cc49b88f7f | [
"Apache-2.0"
] | null | null | null | 0900-hp/hplip-3.21.12/probe.py | rgfaber/dev-toolkit | b7e6b1e35a4bfb8ca9ba75e5556917cc49b88f7f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) Copyright 2003-2015 HP Development Company, L.P.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (a... | 37.342466 | 165 | 0.520543 |
0dbca08a406eec0a4f330206c15a5a5c282dd65f | 1,789 | py | Python | setup.py | dannysepler/snakeviz | 3e3cce03d7ff580333b3f6fad4e46cd415c1479e | [
"BSD-3-Clause"
] | null | null | null | setup.py | dannysepler/snakeviz | 3e3cce03d7ff580333b3f6fad4e46cd415c1479e | [
"BSD-3-Clause"
] | null | null | null | setup.py | dannysepler/snakeviz | 3e3cce03d7ff580333b3f6fad4e46cd415c1479e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup
import os
NAME = 'snakeviz'
VERSION = '2.2.dev.0'
# Create a simple version.py module; less trouble than hard-coding the version
with open(os.path.join('snakeviz', 'version.py'), 'w') as f:
f.write('__version__ = version = %r' % VERSION)
# Load up the descr... | 29.327869 | 78 | 0.5763 |
94d1176062723044e9b8b9a90b512167ca7fb17d | 733 | py | Python | crystal_toolkit/helpers/utils.py | mkhorton/mp-dash-components | b9af1b59f0120a90897631d9a7f8d9f0ae561de9 | [
"MIT"
] | null | null | null | crystal_toolkit/helpers/utils.py | mkhorton/mp-dash-components | b9af1b59f0120a90897631d9a7f8d9f0ae561de9 | [
"MIT"
] | 5 | 2018-10-18T19:52:12.000Z | 2018-11-17T19:02:49.000Z | crystal_toolkit/helpers/utils.py | mkhorton/mp-dash-components | b9af1b59f0120a90897631d9a7f8d9f0ae561de9 | [
"MIT"
] | null | null | null | from crystal_toolkit import _DEFAULTS
def update_object_args(d_args, object_name, allowed_args):
"""Read dafault properties and overwrite them if user input exists
Arguments:
d_args {dict} -- User defined properties
object_name {str} -- Name of object
allowed_kwargs {List[str]} -- ... | 33.318182 | 92 | 0.638472 |
d1432a62f6d7ab2c18db8dc5822e5d58211d5260 | 2,024 | py | Python | rqalpha/mod/rqalpha_mod_sys_transaction_cost/__init__.py | ForrestLin0805/rqalpha | b10d03f9a23180a93e39c40fcb048ba6db37b573 | [
"Apache-2.0"
] | 1 | 2021-02-26T11:11:31.000Z | 2021-02-26T11:11:31.000Z | rqalpha/mod/rqalpha_mod_sys_transaction_cost/__init__.py | ForrestLin0805/rqalpha | b10d03f9a23180a93e39c40fcb048ba6db37b573 | [
"Apache-2.0"
] | 2 | 2020-06-10T02:29:24.000Z | 2020-06-29T08:32:08.000Z | rqalpha/mod/rqalpha_mod_sys_transaction_cost/__init__.py | ForrestLin0805/rqalpha | b10d03f9a23180a93e39c40fcb048ba6db37b573 | [
"Apache-2.0"
] | 1 | 2020-03-05T05:06:45.000Z | 2020-03-05T05:06:45.000Z | # -*- coding: utf-8 -*-
# 版权所有 2019 深圳米筐科技有限公司(下称“米筐科技”)
#
# 除非遵守当前许可,否则不得使用本软件。
#
# * 非商业用途(非商业用途指个人出于非商业目的使用本软件,或者高校、研究所等非营利机构出于教育、科研等目的使用本软件):
# 遵守 Apache License 2.0(下称“Apache 2.0 许可”),您可以在以下位置获得 Apache 2.0 许可的副本:http://www.apache.org/licenses/LICENSE-2.0。
# 除非法律有要求或以书面形式达成协议,否则本软件分发时需保持当前许可“原样”... | 28.914286 | 144 | 0.683794 |
dd944afd54d94a4280eafd14b4858adc72248322 | 6,130 | py | Python | cli/src/aws_sso_util/login.py | fai555/aws-sso-util | aafd96264df7d7b805890dd9fdc5b12bc977340c | [
"Apache-2.0"
] | 330 | 2020-11-11T15:53:22.000Z | 2022-03-30T06:45:57.000Z | cli/src/aws_sso_util/login.py | fai555/aws-sso-util | aafd96264df7d7b805890dd9fdc5b12bc977340c | [
"Apache-2.0"
] | 47 | 2020-11-11T01:32:29.000Z | 2022-03-30T01:33:28.000Z | cli/src/aws_sso_util/login.py | fai555/aws-sso-util | aafd96264df7d7b805890dd9fdc5b12bc977340c | [
"Apache-2.0"
] | 23 | 2020-11-25T14:12:37.000Z | 2022-03-30T02:16:26.000Z | # Copyright 2020 Ben Kehoe
#
# 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 accompanying this file. This file is
# distributed on ... | 39.805195 | 126 | 0.683197 |
cf1ed3b8c6cf339412b5727ca25fcdb857ce2761 | 889 | py | Python | setup.py | Anatoly1010/Atomize_NIOCH | 9359f2ee31e71ee3b2e210ad5ccc2dc3ad3dfbe0 | [
"MIT"
] | 5 | 2020-12-31T17:39:51.000Z | 2022-03-31T13:02:49.000Z | setup.py | Anatoly1010/Atomize_NIOCH | 9359f2ee31e71ee3b2e210ad5ccc2dc3ad3dfbe0 | [
"MIT"
] | null | null | null | setup.py | Anatoly1010/Atomize_NIOCH | 9359f2ee31e71ee3b2e210ad5ccc2dc3ad3dfbe0 | [
"MIT"
] | 1 | 2022-03-13T14:57:16.000Z | 2022-03-13T14:57:16.000Z | import setuptools
with open("readme.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="Atomize",
version="0.0.1",
author="Anatoly Melnikov, Vladimir Baikalov",
author_email="anatoly.melnikov@tomo.nsc.ru",
description="A modular software for working with sc... | 37.041667 | 112 | 0.701912 |
93c182ccece446002750ad378213eef1687c4e0d | 7,725 | py | Python | tests/multi_objective_tests/test_trial.py | srijan-deepsource/optuna | 2a83adf1e5104a4cde2f8f275788dc1aaf246097 | [
"MIT"
] | 1 | 2021-10-09T16:06:45.000Z | 2021-10-09T16:06:45.000Z | tests/multi_objective_tests/test_trial.py | srijan-deepsource/optuna | 2a83adf1e5104a4cde2f8f275788dc1aaf246097 | [
"MIT"
] | 2 | 2020-11-09T13:56:48.000Z | 2021-02-10T08:20:31.000Z | tests/multi_objective_tests/test_trial.py | crcrpar/optuna | d25c7ee8e103575207978ec09a14ad9a4fefa53d | [
"MIT"
] | 1 | 2020-12-25T03:27:49.000Z | 2020-12-25T03:27:49.000Z | import datetime
from typing import cast
from typing import List
from typing import Tuple
import pytest
import optuna
from optuna._study_direction import StudyDirection
from optuna.multi_objective.trial import FrozenMultiObjectiveTrial
from optuna.trial import TrialState
def test_suggest() -> None:
study = optun... | 34.333333 | 98 | 0.637023 |
7370b94a02dc462f57e2bde3fd477cedf0ee1b59 | 409 | py | Python | backend/coreapp/migrations/0004_scratch_diff_label.py | ChrisNonyminus/decomp.me | b51e8d586ba95bd20f6b2e5881ecc34459e761bc | [
"MIT"
] | 47 | 2021-11-05T14:20:58.000Z | 2022-03-19T18:56:46.000Z | backend/coreapp/migrations/0004_scratch_diff_label.py | ChrisNonyminus/decomp.me | b51e8d586ba95bd20f6b2e5881ecc34459e761bc | [
"MIT"
] | 131 | 2021-10-20T09:17:16.000Z | 2022-03-31T22:22:54.000Z | backend/coreapp/migrations/0004_scratch_diff_label.py | ChrisNonyminus/decomp.me | b51e8d586ba95bd20f6b2e5881ecc34459e761bc | [
"MIT"
] | 20 | 2021-11-23T18:49:45.000Z | 2022-03-29T06:25:10.000Z | # Generated by Django 3.2.4 on 2021-09-27 12:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("coreapp", "0003_github_profile"),
]
operations = [
migrations.AddField(
model_name="scratch",
name="diff_label",
... | 21.526316 | 74 | 0.606357 |
a96785096ee62c2d26bc4df88a3cbf754602abd7 | 1,156 | py | Python | gobigger/managers/spore_manager.py | zjl222666/GoBigger | 2fae8678662a9be9d5d5797fd09815a9c920d215 | [
"Apache-2.0"
] | 1 | 2021-11-30T04:39:44.000Z | 2021-11-30T04:39:44.000Z | gobigger/managers/spore_manager.py | zjl222666/GoBigger | 2fae8678662a9be9d5d5797fd09815a9c920d215 | [
"Apache-2.0"
] | null | null | null | gobigger/managers/spore_manager.py | zjl222666/GoBigger | 2fae8678662a9be9d5d5797fd09815a9c920d215 | [
"Apache-2.0"
] | null | null | null | import math
import logging
import random
import uuid
from abc import ABC, abstractmethod
from easydict import EasyDict
from pygame.math import Vector2
from .base_manager import BaseManager
from gobigger.utils import format_vector, Border
from gobigger.balls import FoodBall, ThornsBall, CloneBall, SporeBall
class Spo... | 25.688889 | 69 | 0.636678 |
e7cc794ef76b39669ebdf38be6c7199e15c05e35 | 471 | py | Python | data/scripts/templates/object/draft_schematic/clothing/shared_clothing_armor_composite_bracer_l.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/draft_schematic/clothing/shared_clothing_armor_composite_bracer_l.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/draft_schematic/clothing/shared_clothing_armor_composite_bracer_l.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Intangible()
result.template = "object/draft_schematic/clothing/shared_clothing_armor_composite_bracer_l.iff"
res... | 27.705882 | 97 | 0.740977 |
b93a7a73cbd02c4fd5b3b9266b4305e0ac867f48 | 1,973 | py | Python | FileManageSystem/initialize_disk.py | BangBOOM/File-System | 95458aab285c8306da31a74c9d9b19818ca16078 | [
"MIT"
] | null | null | null | FileManageSystem/initialize_disk.py | BangBOOM/File-System | 95458aab285c8306da31a74c9d9b19818ca16078 | [
"MIT"
] | null | null | null | FileManageSystem/initialize_disk.py | BangBOOM/File-System | 95458aab285c8306da31a74c9d9b19818ca16078 | [
"MIT"
] | null | null | null | """
author:Wenquan Yang
time:2020/6/11 1:24
intro: 磁盘格式化部分
"""
from models import *
from file_pointer import file_func
from utils import *
@file_func('wb')
def initialization(fp):
# 超级块写入
sp = SuperBlock()
# 索引链接写入
tmp = INODE_BLOCK_NUM
start = 0
while tmp > 0:
sp.inode_unused_cnt -= ... | 25.623377 | 77 | 0.657375 |
20f71a7c1e02afd2993e8a7e900dafb1e1feae5c | 3,555 | py | Python | demo/irods_ckan/plugins/irods_task.py | sara-nl/iBridges | a630cde7e4cab455a41f41ab96c7a45434dbaf97 | [
"Apache-2.0"
] | null | null | null | demo/irods_ckan/plugins/irods_task.py | sara-nl/iBridges | a630cde7e4cab455a41f41ab96c7a45434dbaf97 | [
"Apache-2.0"
] | null | null | null | demo/irods_ckan/plugins/irods_task.py | sara-nl/iBridges | a630cde7e4cab455a41f41ab96c7a45434dbaf97 | [
"Apache-2.0"
] | 1 | 2018-08-28T13:38:26.000Z | 2018-08-28T13:38:26.000Z | import datetime
import re
import os
from iBridges.task.irods.utils import get_irods_zone
from iBridges.task.irods.utils import extract_irods_collecion_data
from iBridges.task.irods.utils import validate_collection_meta_data
from iBridges.task.irods.utils import validate_objects_meta_data
from iBridges.task.irods.utils ... | 32.027027 | 79 | 0.62166 |
6eed88237abf433300765b1c9a3731c6ec62a6b3 | 8,635 | py | Python | kayobe/kolla_ansible.py | G-Research/kayobe | 80c13e75deb4bff94c5bfe2fd79bb9beecb71873 | [
"Apache-2.0"
] | 48 | 2018-03-08T13:34:34.000Z | 2022-03-14T15:42:20.000Z | kayobe/kolla_ansible.py | chazzrobbz/kayobe | 5fb6362e2548afdc2ea824678e565ef81cdbcaa5 | [
"Apache-2.0"
] | null | null | null | kayobe/kolla_ansible.py | chazzrobbz/kayobe | 5fb6362e2548afdc2ea824678e565ef81cdbcaa5 | [
"Apache-2.0"
] | 25 | 2018-04-23T07:51:31.000Z | 2022-03-14T15:42:22.000Z | # Copyright (c) 2017 StackHPC Ltd.
#
# 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 wr... | 43.611111 | 79 | 0.640996 |
01a8c0df712eef7c26b9d56fbbff2381e87b91dd | 14,244 | py | Python | dublincore/migrations/0002_copy_existing_xtf_qdc.py | mredar/django-dublincore | eabac3fc9225d7961a5d509718c1d3059e3681cb | [
"BSD-3-Clause"
] | 6 | 2015-07-13T13:29:39.000Z | 2017-09-08T20:47:35.000Z | dublincore/migrations/0002_copy_existing_xtf_qdc.py | mredar/django-dublincore | eabac3fc9225d7961a5d509718c1d3059e3681cb | [
"BSD-3-Clause"
] | 3 | 2020-02-11T23:26:32.000Z | 2021-06-10T18:46:34.000Z | dublincore/migrations/0002_copy_existing_xtf_qdc.py | mredar/django-dublincore | eabac3fc9225d7961a5d509718c1d3059e3681cb | [
"BSD-3-Clause"
] | 2 | 2017-03-04T13:30:22.000Z | 2019-05-10T14:04:37.000Z | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
"Write your forwards methods here."
for qde_xtf in orm['xtf.QualifiedDublinCoreElement'].objects.all().order_by('id'):
... | 74.1875 | 182 | 0.571398 |
79277af19638aa059daf5c5801f3e2f964092e32 | 1,144 | py | Python | level_3/challenge_3.py | mouse-reeve/foobar | 16b66b2bf50f612d2a2b72a3997fb954cff72a0b | [
"MIT"
] | null | null | null | level_3/challenge_3.py | mouse-reeve/foobar | 16b66b2bf50f612d2a2b72a3997fb954cff72a0b | [
"MIT"
] | 1 | 2015-10-15T21:53:15.000Z | 2016-03-04T18:31:37.000Z | level_3/challenge_3.py | mouse-reeve/foobar | 16b66b2bf50f612d2a2b72a3997fb954cff72a0b | [
"MIT"
] | null | null | null | ''' Remove instances of an added word from a string '''
def answer(chunk, word):
''' remove the rightmost word instance that is the most nested '''
if not word in chunk:
return chunk
chunk = chunk[::-1]
word = word[::-1]
nestedest = {'i': None, 'depth': None}
for i in range(len(chunk)... | 30.918919 | 95 | 0.541084 |
4e4b1afa2ec6606544c677c6a560ad95b842dc63 | 6,019 | py | Python | examples/run_md.py | tcardlab/pdbremix | bc7afca41da08f6166e518976b1c6dc40e35d78e | [
"MIT"
] | 50 | 2015-01-23T00:05:20.000Z | 2022-03-09T04:11:31.000Z | examples/run_md.py | tcardlab/pdbremix | bc7afca41da08f6166e518976b1c6dc40e35d78e | [
"MIT"
] | 7 | 2015-02-18T08:14:30.000Z | 2018-05-17T02:01:58.000Z | examples/run_md.py | tcardlab/pdbremix | bc7afca41da08f6166e518976b1c6dc40e35d78e | [
"MIT"
] | 27 | 2015-01-15T04:10:30.000Z | 2021-10-11T17:56:41.000Z |
__doc__ = """
Example scripts to run MD simulations in PDBREMIX.
It runs through a bunch of different simulations options, with
user-defined pulsing functions, and user-defined trajectory
analysis. Script will fail on exception if there are any
problems.
"""
# Setup parameters - force_field and structure
# Alter... | 25.832618 | 79 | 0.68533 |
4d101218b0e42fcd368bf188d621289e1d9a1387 | 9,467 | py | Python | tests/llvm/llvm_env_test.py | anilavakundu/CompilerGym | 43d39093238885839facebf307df59354a357f2c | [
"MIT"
] | null | null | null | tests/llvm/llvm_env_test.py | anilavakundu/CompilerGym | 43d39093238885839facebf307df59354a357f2c | [
"MIT"
] | null | null | null | tests/llvm/llvm_env_test.py | anilavakundu/CompilerGym | 43d39093238885839facebf307df59354a357f2c | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""Integrations tests for the LLVM CompilerGym environments."""
import logging
from enum import Enum
from pathlib import Path
from typing impor... | 30.53871 | 88 | 0.70413 |
ad9825ab64c50d885bc77bcf0ec3055a0e822456 | 1,708 | py | Python | piecrust/pathutil.py | ludovicchabant/PieCrust2 | 89b2bf268bfdaae24ff6cf6d8c29c0b1239be739 | [
"Apache-2.0"
] | 43 | 2015-04-24T05:30:04.000Z | 2022-02-03T17:47:35.000Z | piecrust/pathutil.py | ludovicchabant/PieCrust2 | 89b2bf268bfdaae24ff6cf6d8c29c0b1239be739 | [
"Apache-2.0"
] | 54 | 2015-01-03T01:58:44.000Z | 2021-05-06T21:56:26.000Z | piecrust/pathutil.py | ludovicchabant/PieCrust2 | 89b2bf268bfdaae24ff6cf6d8c29c0b1239be739 | [
"Apache-2.0"
] | 8 | 2015-05-10T01:50:46.000Z | 2016-12-26T20:53:15.000Z | import re
import os
import os.path
import fnmatch
from piecrust import CONFIG_PATH, THEME_CONFIG_PATH
re_terminal_path = re.compile(r'^(\w\:)?[/\\]$')
class SiteNotFoundError(Exception):
def __init__(self, root=None, msg=None, theme=False):
if not root:
root = os.getcwd()
cfg_name =... | 24.056338 | 71 | 0.587822 |
3c6fae4e52df4434c18467cf8cc05efbaa8f00ce | 707 | py | Python | tests/layers/conv_layer.py | saratbhargava/img_recognition | 8b47115837157493c0f799511fd409a457892304 | [
"MIT"
] | null | null | null | tests/layers/conv_layer.py | saratbhargava/img_recognition | 8b47115837157493c0f799511fd409a457892304 | [
"MIT"
] | null | null | null | tests/layers/conv_layer.py | saratbhargava/img_recognition | 8b47115837157493c0f799511fd409a457892304 | [
"MIT"
] | null | null | null | import torch
import torch.nn.functional as F
from img_recognition.layers import ResNetBlock, ResNetChangeBlock
def test_ResNetBlock():
rblock = ResNetBlock(in_channels=64)
x = torch.randint(0, 100, size=(128, 64, 32, 32), dtype=torch.float32)
y = rblock(x)
assert x.shape == y.shape
def test_ResNetCh... | 28.28 | 74 | 0.650636 |
bda213d114339aa9802b0304ee9b11fc5c8b6937 | 1,449 | py | Python | tests/test_units.py | amogorkon/triplestore | 418d62b2e42d0010c214efdcdaddc55c3292d92b | [
"MIT"
] | 3 | 2019-10-10T16:26:27.000Z | 2021-07-31T14:06:08.000Z | tests/test_units.py | amogorkon/triplestore | 418d62b2e42d0010c214efdcdaddc55c3292d92b | [
"MIT"
] | null | null | null | tests/test_units.py | amogorkon/triplestore | 418d62b2e42d0010c214efdcdaddc55c3292d92b | [
"MIT"
] | null | null | null |
from hypothesis import strategies as st, assume, given
from pytest import fixture, raises
from unittest import TestCase, skip
from store.store import TripleStore, E, Predicate, Query, QuerySet
@given(st.text())
def test_E(url):
# hypothesis testing on name should be possible, but it must be an identifier
e1 ... | 35.341463 | 97 | 0.641822 |
e44653ce66c54e32ce7dead433a41334f8a69b7f | 2,829 | py | Python | scripts/ddd17_export_rate.py | duguyue100/ddd20-itsc20 | 667bb5e702a06cfff30b20de669697f3271baf04 | [
"MIT"
] | null | null | null | scripts/ddd17_export_rate.py | duguyue100/ddd20-itsc20 | 667bb5e702a06cfff30b20de669697f3271baf04 | [
"MIT"
] | null | null | null | scripts/ddd17_export_rate.py | duguyue100/ddd20-itsc20 | 667bb5e702a06cfff30b20de669697f3271baf04 | [
"MIT"
] | null | null | null | """Export Frame and Event rate for recording.
Author: Yuhuang Hu
Email : duguyue100@gmail.com
"""
from __future__ import print_function
import cPickle as pickle
import os
import Queue
import time
import numpy as np
import spiker
from spiker import data
from spiker.data import ddd17
from spiker import log
# import ... | 28.867347 | 80 | 0.627784 |
c452945e4ec96016ed3532fc27d104a8efe0a793 | 295 | py | Python | tests/test_DistribComponent_discrete.py | jwilso/sst-core | 8ca5ab37f6b65537c7d58e01a8425e6084b9e315 | [
"BSD-3-Clause"
] | 77 | 2015-10-05T21:22:27.000Z | 2022-03-19T23:19:21.000Z | tests/test_DistribComponent_discrete.py | jwilso/sst-core | 8ca5ab37f6b65537c7d58e01a8425e6084b9e315 | [
"BSD-3-Clause"
] | 642 | 2015-10-07T14:30:11.000Z | 2022-03-30T21:16:32.000Z | tests/test_DistribComponent_discrete.py | jwilso/sst-core | 8ca5ab37f6b65537c7d58e01a8425e6084b9e315 | [
"BSD-3-Clause"
] | 75 | 2015-11-21T00:23:46.000Z | 2022-03-11T01:27:51.000Z | import sst
d0 = sst.Component("d0", "coreTestElement.simpleDistribComponent")
d0.addParams({
"distrib" : "discrete",
"probcount" : "5",
"prob0" : "0.1",
"prob1" : "0.3",
"prob2" : "0.35",
"prob3" : "0.15",
"prob4" : "0.1",
"count" : "100000000",
"binresults" : "1"
})
| 19.666667 | 66 | 0.542373 |
3f774546cf0feb289089f8fa4580546520aa4d67 | 3,122 | py | Python | scraper/spider/spiders/wustl.py | adaschevici/unicrawlers | adaa283afa3110013b6cc93f20a36027567afcca | [
"MIT"
] | null | null | null | scraper/spider/spiders/wustl.py | adaschevici/unicrawlers | adaa283afa3110013b6cc93f20a36027567afcca | [
"MIT"
] | 1 | 2022-03-02T14:53:15.000Z | 2022-03-02T14:53:15.000Z | scraper/spider/spiders/wustl.py | adaschevici/unicrawlers | adaa283afa3110013b6cc93f20a36027567afcca | [
"MIT"
] | null | null | null | import os
import re
from twisted.internet import reactor, defer
from scrapy.selector import Selector
from spider.items import StudentItem
from scrapy.http import Request
from scrapy.http import FormRequest
from spider.spiders.basic import StudentSpider
from scrapy.xlib.pydispatch import dispatcher
from scrapy import s... | 35.477273 | 89 | 0.621717 |
b7fbb0aa6fa89fe7692c13759ad0931d1f2ce8cb | 64,525 | py | Python | app/modules/people/migrations/0006_auto_20210212_1436.py | nickmoreton/nhsx-website | 2397d1308376c02b75323d30e6bc916af0daac9d | [
"MIT"
] | 50 | 2019-04-04T17:50:00.000Z | 2021-08-05T15:08:37.000Z | app/modules/people/migrations/0006_auto_20210212_1436.py | nickmoreton/nhsx-website | 2397d1308376c02b75323d30e6bc916af0daac9d | [
"MIT"
] | 434 | 2019-04-04T18:25:32.000Z | 2022-03-31T18:23:37.000Z | app/modules/people/migrations/0006_auto_20210212_1436.py | nhsx-mirror/nhsx-website | 2133b4e275ca35ff77f7d6874e809f139ec4bf86 | [
"MIT"
] | 23 | 2019-04-04T09:52:07.000Z | 2021-04-11T07:41:47.000Z | # Generated by Django 3.0.7 on 2021-02-12 14:36
from django.db import migrations
import modules.core.blocks
import modules.core.models.snippets
import wagtail.core.blocks
import wagtail.core.fields
import wagtail.images.blocks
import wagtail.snippets.blocks
import wagtailnhsukfrontend.blocks
class Migration(migratio... | 54.728584 | 192 | 0.193894 |
eabfa5c3d0daaf50b68b0f0c3eb76a9d178b06c0 | 44,114 | py | Python | coremltools/test/api/test_api_examples.py | Daniil-Osokin/coremltools | e960a957505fed2b1294605813c5117902895700 | [
"BSD-3-Clause"
] | null | null | null | coremltools/test/api/test_api_examples.py | Daniil-Osokin/coremltools | e960a957505fed2b1294605813c5117902895700 | [
"BSD-3-Clause"
] | null | null | null | coremltools/test/api/test_api_examples.py | Daniil-Osokin/coremltools | e960a957505fed2b1294605813c5117902895700 | [
"BSD-3-Clause"
] | null | null | null | from os import getcwd, chdir
from shutil import rmtree
from os.path import exists
from tempfile import mkdtemp
import pytest
import numpy as np
import coremltools as ct
import os
from coremltools._deps import (
_HAS_TF_1,
_HAS_TF_2,
_HAS_TORCH,
MSG_TF1_NOT_FOUND,
MSG_TF2_NOT_FOUND,
MSG_TORCH_NO... | 37.963855 | 104 | 0.584168 |
75a49b76b2693ad9a570f2a6d3970beca765c4dd | 35,139 | py | Python | tornado/httputil.py | chrisburr/tornado | 0d94ed68036fb3cd896e8bd641aa60ca55df3566 | [
"Apache-2.0"
] | null | null | null | tornado/httputil.py | chrisburr/tornado | 0d94ed68036fb3cd896e8bd641aa60ca55df3566 | [
"Apache-2.0"
] | null | null | null | tornado/httputil.py | chrisburr/tornado | 0d94ed68036fb3cd896e8bd641aa60ca55df3566 | [
"Apache-2.0"
] | 1 | 2020-10-21T09:19:46.000Z | 2020-10-21T09:19:46.000Z | #
# Copyright 2009 Facebook
#
# 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, s... | 32.208066 | 97 | 0.610604 |
49cdd218bca2ed975d30d6dc3a00b9921382811b | 5,703 | py | Python | unsplash/user.py | videowala/python-unsplash | 7ea071e5afd17c94e57657c9b870262a85b6dcab | [
"MIT"
] | 124 | 2017-04-11T13:41:50.000Z | 2022-03-23T05:40:04.000Z | unsplash/user.py | videowala/python-unsplash | 7ea071e5afd17c94e57657c9b870262a85b6dcab | [
"MIT"
] | 8 | 2017-10-14T19:53:22.000Z | 2021-12-04T16:07:57.000Z | unsplash/user.py | videowala/python-unsplash | 7ea071e5afd17c94e57657c9b870262a85b6dcab | [
"MIT"
] | 35 | 2017-02-10T14:35:49.000Z | 2022-02-09T01:47:19.000Z | # coding=utf-8
from unsplash.client import Client
from unsplash.models import User as UserModel, Collection as CollectionModel, Link as LinkModel, Photo as PhotoModel
class User(Client):
"""
Unsplash User operations.
Users have the following link relations:
self: API location of this user.
html... | 37.768212 | 116 | 0.62283 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.