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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
486b981b713197860cdc4557a6d9d1421bd0f079 | 213 | py | Python | mtr/sync/context_processors.py | mtrgroup/django-mtr-import-export | b8e7a6fa1cbc58b9e2126526f418306a7490cb52 | [
"MIT"
] | null | null | null | mtr/sync/context_processors.py | mtrgroup/django-mtr-import-export | b8e7a6fa1cbc58b9e2126526f418306a7490cb52 | [
"MIT"
] | null | null | null | mtr/sync/context_processors.py | mtrgroup/django-mtr-import-export | b8e7a6fa1cbc58b9e2126526f418306a7490cb52 | [
"MIT"
] | null | null | null | from .models import Settings
def settings_global():
return Settings.objects.filter(show_in_quick_menu=True)
def settings(request):
return {'mtr': {'sync': {
'settings': settings_global
}}}
| 17.75 | 59 | 0.680751 |
9850eec1067884d1a41034a147e545afdb86423f | 108 | py | Python | app/controller/__init__.py | Ezak91/flask-restx-boilerplate | 918982fd666d29497569bea9911774c2c76e9422 | [
"MIT"
] | null | null | null | app/controller/__init__.py | Ezak91/flask-restx-boilerplate | 918982fd666d29497569bea9911774c2c76e9422 | [
"MIT"
] | null | null | null | app/controller/__init__.py | Ezak91/flask-restx-boilerplate | 918982fd666d29497569bea9911774c2c76e9422 | [
"MIT"
] | null | null | null | from .user import api as user_namespace
from .auth import api as auth_api
from .role import api as role_api
| 27 | 39 | 0.805556 |
3cd4b406e39b5618a36ac18ef408d87d1a4c8105 | 40,942 | py | Python | planning/GamesTests/menu/mysql/connector/connection.py | ChristsY12Robots/Robots | 306f000f85b41731a9e1249847434858319e5415 | [
"MIT"
] | null | null | null | planning/GamesTests/menu/mysql/connector/connection.py | ChristsY12Robots/Robots | 306f000f85b41731a9e1249847434858319e5415 | [
"MIT"
] | null | null | null | planning/GamesTests/menu/mysql/connector/connection.py | ChristsY12Robots/Robots | 306f000f85b41731a9e1249847434858319e5415 | [
"MIT"
] | 1 | 2020-07-22T12:02:03.000Z | 2020-07-22T12:02:03.000Z | # MySQL Connector/Python - MySQL driver written in Python.
# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
# MySQL Connector/Python is licensed under the terms of the GPLv2
# <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
# MySQL Connectors. There are special exceptio... | 37.051584 | 79 | 0.613258 |
37c7836bbda3e5225254b0bd342f79e9e66b2315 | 2,847 | py | Python | demos/unsteady_default_lspg_advdiff1d_mlp/autoencoder_keras.py | Pressio/pressio4py | 36676dbd112a7c7960ccbf302ff14d4376c819ec | [
"Unlicense",
"BSD-3-Clause"
] | 4 | 2020-07-06T20:01:39.000Z | 2022-03-05T09:23:40.000Z | demos/unsteady_default_lspg_advdiff1d_mlp/autoencoder_keras.py | Pressio/pressio4py | 36676dbd112a7c7960ccbf302ff14d4376c819ec | [
"Unlicense",
"BSD-3-Clause"
] | 19 | 2020-02-27T20:52:53.000Z | 2022-01-13T16:24:49.000Z | demos/unsteady_default_lspg_advdiff1d_mlp/autoencoder_keras.py | Pressio/pressio4py | 36676dbd112a7c7960ccbf302ff14d4376c819ec | [
"Unlicense",
"BSD-3-Clause"
] | 1 | 2022-03-03T16:05:09.000Z | 2022-03-03T16:05:09.000Z | import numpy as np
import tensorflow as tf
class myAutoencoder(tf.keras.Model):
def __init__(self, fomSize, romSize=10):
super(myAutoencoder, self).__init__()
self.fomSize = fomSize
self.romSize = romSize
def build(self, input_shape):
self.dense1 = tf.keras.layers.Dense(200, input_dim=in... | 35.5875 | 98 | 0.686336 |
1c91826bf26c7f808ceaeba7279d53ba02d0f028 | 445 | py | Python | src/compas_rv2/singular/rhino/artists/patternartist.py | selinabitting/compas-RV2 | 0884cc00d09c8f4a75eb2b97614105e4c8bfd818 | [
"MIT"
] | 4 | 2022-01-17T19:17:22.000Z | 2022-01-21T18:06:02.000Z | src/compas_rv2/singular/rhino/artists/patternartist.py | selinabitting/compas-RV2 | 0884cc00d09c8f4a75eb2b97614105e4c8bfd818 | [
"MIT"
] | null | null | null | src/compas_rv2/singular/rhino/artists/patternartist.py | selinabitting/compas-RV2 | 0884cc00d09c8f4a75eb2b97614105e4c8bfd818 | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from compas_rhino.artists import MeshArtist
class PatternArtist(MeshArtist):
def __init__(self, pattern, layer=None):
super(PatternArtist, self).__init__(pattern, layer=layer)
@property
... | 22.25 | 65 | 0.734831 |
1700d33e51c617b7a22ce86ace6429e9be391c28 | 1,972 | py | Python | Source/Basic/Define.py | Archaic-Atom/SDA_network | 346465617e837cd32a4e789f83908b171a3a7b3a | [
"MIT"
] | 6 | 2021-08-10T01:55:14.000Z | 2022-03-16T23:17:21.000Z | Source/Basic/Define.py | Archaic-Atom/SDA_network | 346465617e837cd32a4e789f83908b171a3a7b3a | [
"MIT"
] | null | null | null | Source/Basic/Define.py | Archaic-Atom/SDA_network | 346465617e837cd32a4e789f83908b171a3a7b3a | [
"MIT"
] | 2 | 2021-08-10T01:55:17.000Z | 2022-01-03T07:14:43.000Z | # -*- coding: utf-8 -*-
#
# The program's define
# Date: 2018-05-04
# import some lib
import os
import sys
import time
import tensorflow as tf # tensorflow
import numpy as np # mat
# the path's define, you can change the content
# output's path
OUTPUT_PATH = './Result/'
# model's path
MODEL_PATH = './Mode... | 25.947368 | 80 | 0.592799 |
735a757d8a8f76a8b095aa106b83c6ad7cf83777 | 25,519 | py | Python | models/resnet_.py | TonyKuo777/model_quantization | c49acb20a261d27c239d1597a8faffb38b3b4f43 | [
"BSD-2-Clause"
] | 3 | 2020-08-18T17:36:04.000Z | 2021-06-22T08:11:56.000Z | models/resnet_.py | loganyan/model_quantization | c49acb20a261d27c239d1597a8faffb38b3b4f43 | [
"BSD-2-Clause"
] | null | null | null | models/resnet_.py | loganyan/model_quantization | c49acb20a261d27c239d1597a8faffb38b3b4f43 | [
"BSD-2-Clause"
] | 1 | 2020-08-18T17:37:57.000Z | 2020-08-18T17:37:57.000Z | import torch
import torch.nn as nn
import logging
import numpy as np
from .quant import conv3x3, conv1x1
from .layers import norm, actv
from .prone import qprone
# double_channel_half_resolution
class DCHR(nn.Module):
def __init__(self, stride):
super(DCHR, self).__init__()
self.pool = nn.AvgPool2... | 42.320066 | 185 | 0.576786 |
fb55d6f84662720b055f70146650cdaf14a207ec | 7,325 | py | Python | girder/models/file.py | cjh1/girder | 293e238b56a4b7a0a413648b5f324876d577ebb0 | [
"Apache-2.0"
] | null | null | null | girder/models/file.py | cjh1/girder | 293e238b56a4b7a0a413648b5f324876d577ebb0 | [
"Apache-2.0"
] | null | null | null | girder/models/file.py | cjh1/girder | 293e238b56a4b7a0a413648b5f324876d577ebb0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright 2013 Kitware 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 cop... | 37.757732 | 79 | 0.584846 |
b4c6112d088aca3d44442cce983015699b5736c5 | 291 | py | Python | tests/testlib/__init__.py | Open-Technology/Graph-Database | 0b5bd2414b888c4709af3390f9d41dc8e0d4a863 | [
"BSD-3-Clause"
] | 30 | 2015-02-24T12:47:10.000Z | 2022-02-02T10:41:54.000Z | tests/testlib/__init__.py | Open-Technology/Graph-Database | 0b5bd2414b888c4709af3390f9d41dc8e0d4a863 | [
"BSD-3-Clause"
] | 4 | 2015-08-08T07:30:35.000Z | 2021-11-18T18:50:01.000Z | tests/testlib/__init__.py | Open-Technology/Graph-Database | 0b5bd2414b888c4709af3390f9d41dc8e0d4a863 | [
"BSD-3-Clause"
] | 14 | 2015-02-12T02:55:45.000Z | 2021-11-24T19:43:40.000Z | __all__ = ['logger', 'testoptions', 'testutil']
# fix import paths first so that the right (dev) version of pygr is imported
import pathfix
# import rest of test utils.
import testoptions
import testutil
# make SkipTest available
from unittest_extensions import SkipTest, PygrTestProgram
| 24.25 | 76 | 0.786942 |
2523bac754150e5d90a235854a7dfa29691aafa1 | 311 | py | Python | coursework1/task4/mapper.py | foundnet/UOE_EP_coursework1 | 25ab8ff2beaa4fbde5a0d4519abb84d8e43cf9d8 | [
"Apache-2.0"
] | null | null | null | coursework1/task4/mapper.py | foundnet/UOE_EP_coursework1 | 25ab8ff2beaa4fbde5a0d4519abb84d8e43cf9d8 | [
"Apache-2.0"
] | null | null | null | coursework1/task4/mapper.py | foundnet/UOE_EP_coursework1 | 25ab8ff2beaa4fbde5a0d4519abb84d8e43cf9d8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import sys
for line in sys.stdin:
line = line.strip()
tokens = line.split()
if len(tokens) > 3:
for index in range(len(tokens)-3):
print ("%s %s %s %s\t1")%(tokens[index],tokens[index+1],\
tokens[index+2],tokens[index+3])
| 22.214286 | 69 | 0.517685 |
195680d123298a94eebde27db80286875fb1f64b | 2,782 | py | Python | bittrexticker.py | bitsanity/rateboard | f362505d6b9672d2f22bc6e6650975899d2ea127 | [
"Apache-2.0"
] | 3 | 2017-08-24T14:36:49.000Z | 2018-11-21T21:14:06.000Z | bittrexticker.py | bitsanity/rateboard | f362505d6b9672d2f22bc6e6650975899d2ea127 | [
"Apache-2.0"
] | null | null | null | bittrexticker.py | bitsanity/rateboard | f362505d6b9672d2f22bc6e6650975899d2ea127 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import sys, traceback
import threading
import time
import simplejson as json
import urllib2
from PyQt4 import QtGui,QtCore
from boardlet import Boardlet
from modellet import Modellet
class BittrexTicker(Boardlet):
def __init__(self, parent, targetCurr):
supe... | 29.284211 | 106 | 0.653846 |
221792c09d1be0bac740ff0b3f19cfab1f086ad1 | 125 | py | Python | check_pyexample.py | phobson/pyexample | 133598954b514a80dc0f65c02c8740b626e569d2 | [
"BSD-3-Clause"
] | null | null | null | check_pyexample.py | phobson/pyexample | 133598954b514a80dc0f65c02c8740b626e569d2 | [
"BSD-3-Clause"
] | null | null | null | check_pyexample.py | phobson/pyexample | 133598954b514a80dc0f65c02c8740b626e569d2 | [
"BSD-3-Clause"
] | null | null | null | import sys
import matplotlib
matplotlib.use('agg')
import pyexample
status = pyexample.test(*sys.argv[1:])
sys.exit(status)
| 15.625 | 38 | 0.768 |
bfd4d8af11069accf59edc84b703d1c021559b4c | 2,299 | py | Python | boa_web/js/plugin.py | atharva-naik/boa_web | 5718135d0e52440a2018b63eabe14cd3f78671bd | [
"MIT"
] | null | null | null | boa_web/js/plugin.py | atharva-naik/boa_web | 5718135d0e52440a2018b63eabe14cd3f78671bd | [
"MIT"
] | null | null | null | boa_web/js/plugin.py | atharva-naik/boa_web | 5718135d0e52440a2018b63eabe14cd3f78671bd | [
"MIT"
] | null | null | null | import os, requests, pathlib
class JSPlugin:
def __init__(self, **kwargs):
self.kwargs = kwargs
self.name = "plugin" # the name of the javasrcipt plugin
self.static = self.kwargs.get("static", "./static/") # path of static folder
self.cdn_urls = kwargs.get("cdn_urls", ["https://www... | 47.895833 | 121 | 0.571118 |
437e553987342f51c50887918f3f0ff9535b8a10 | 8,259 | py | Python | opensocial/simplejson/__init__.py | gitdaniel228/realtor | 4366d57b064be87b31c8a036b3ed7a99b2036461 | [
"BSD-3-Clause"
] | 6 | 2015-01-23T20:09:49.000Z | 2015-01-25T12:28:16.000Z | opensocial/simplejson/__init__.py | gitdaniel228/realtor | 4366d57b064be87b31c8a036b3ed7a99b2036461 | [
"BSD-3-Clause"
] | null | null | null | opensocial/simplejson/__init__.py | gitdaniel228/realtor | 4366d57b064be87b31c8a036b3ed7a99b2036461 | [
"BSD-3-Clause"
] | null | null | null | r"""
A simple, fast, extensible JSON encoder and decoder
JSON (JavaScript Object Notation) <http://json.org> is a subset of
JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data
interchange format.
simplejson exposes an API familiar to uses of the standard library
marshal and pickle modules.
Encoding b... | 37.202703 | 78 | 0.630585 |
763cb952c1ae596479123324a6b588bce60fbaa8 | 1,602 | py | Python | siphon/cdmr/xarray_support.py | dopplershift/siphon | 2508ad35b0e5de12e3ed3af2c64f013439301940 | [
"MIT"
] | null | null | null | siphon/cdmr/xarray_support.py | dopplershift/siphon | 2508ad35b0e5de12e3ed3af2c64f013439301940 | [
"MIT"
] | null | null | null | siphon/cdmr/xarray_support.py | dopplershift/siphon | 2508ad35b0e5de12e3ed3af2c64f013439301940 | [
"MIT"
] | null | null | null | # Copyright (c) 2016 University Corporation for Atmospheric Research/Unidata.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""Implement an experimental backend for using xarray to talk to TDS over CDMRemote."""
from xarray import Variable
from xarray.backends.commo... | 39.073171 | 90 | 0.689139 |
ff221e9ebe063a85b8b06891fef6542be1a398f7 | 2,241 | py | Python | oslo/torch/nn/parallel/expert_parallel/utils.py | lipovsek/oslo | c2cde6229068808bf691e200f8af8c97c1631eb4 | [
"Apache-2.0"
] | null | null | null | oslo/torch/nn/parallel/expert_parallel/utils.py | lipovsek/oslo | c2cde6229068808bf691e200f8af8c97c1631eb4 | [
"Apache-2.0"
] | null | null | null | oslo/torch/nn/parallel/expert_parallel/utils.py | lipovsek/oslo | c2cde6229068808bf691e200f8af8c97c1631eb4 | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn.functional as F
from torch import Tensor
from ._ops import OSLO_EP_KERNEL_FLAG
def get_current_device():
if torch.cuda.is_available():
return torch.device(f"cuda:{torch.cuda.current_device()}")
else:
return torch.device("cpu")
def cum_sum_d0_minus_one(inputs: Te... | 27.329268 | 86 | 0.656403 |
a130018ecbfe6e399f43567a15a40e5dd8f8b340 | 34,410 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/operations/_vpn_gateways_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/operations/_vpn_gateways_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/operations/_vpn_gateways_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 47.991632 | 188 | 0.655681 |
55947787237c36d099e4eb33c69c8bc2b7eb9866 | 3,745 | py | Python | statbus/routes/rounds.py | psykzz/statbus | 67fb9ed487b45cdab36b61e7d037952a13fff492 | [
"MIT"
] | null | null | null | statbus/routes/rounds.py | psykzz/statbus | 67fb9ed487b45cdab36b61e7d037952a13fff492 | [
"MIT"
] | null | null | null | statbus/routes/rounds.py | psykzz/statbus | 67fb9ed487b45cdab36b61e7d037952a13fff492 | [
"MIT"
] | null | null | null | from datetime import date, datetime, timedelta
from flask import Blueprint, render_template, request, abort
from playhouse.flask_utils import PaginatedQuery
from statbus.models.player import Player
from statbus.models.round import Round
from statbus.ext import cache
from statbus.utils import github
bp = Blueprint("... | 28.807692 | 85 | 0.622697 |
3c88b1ea2cc8ce3d47898a92fb657b5bef136ca4 | 1,074 | py | Python | tests/ifchain_test.py | targetsm/dace | 297b12804a334df8cc6fad5250d5fb0cce20dc6e | [
"BSD-3-Clause"
] | null | null | null | tests/ifchain_test.py | targetsm/dace | 297b12804a334df8cc6fad5250d5fb0cce20dc6e | [
"BSD-3-Clause"
] | null | null | null | tests/ifchain_test.py | targetsm/dace | 297b12804a334df8cc6fad5250d5fb0cce20dc6e | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2019-2020 ETH Zurich and the DaCe authors. All rights reserved.
import dace
import numpy as np
@dace.program
def noelse(A: dace.float32[1]):
if A[0] > 0:
@dace.tasklet
def mytask():
o >> A[0]
o = 5
@dace.program
def ifchain(A: dace.float32[1]):
if A[0] > ... | 17.606557 | 75 | 0.439479 |
cdd8965ce3419cbb6cbc7e54d9e775a988965e09 | 804 | py | Python | analysis/lib/stats/__init__.py | astutespruce/sa-blueprint-sv | 816dbad42b9fcfc771d9852bcb257f3e4606126b | [
"MIT"
] | null | null | null | analysis/lib/stats/__init__.py | astutespruce/sa-blueprint-sv | 816dbad42b9fcfc771d9852bcb257f3e4606126b | [
"MIT"
] | null | null | null | analysis/lib/stats/__init__.py | astutespruce/sa-blueprint-sv | 816dbad42b9fcfc771d9852bcb257f3e4606126b | [
"MIT"
] | null | null | null | from analysis.lib.stats.blueprint import (
extract_by_geometry as extract_blueprint_by_geometry,
summarize_by_huc12 as summarize_bluprint_by_huc12,
summarize_by_marine_block as summarize_bluprint_by_marine_block,
)
from analysis.lib.stats.ownership import (
summarize_by_huc12 as summarize_ownership_by_... | 30.923077 | 83 | 0.830846 |
f51ec755111a2b98c01218d6780949ec784022b3 | 1,279 | py | Python | barplot FISH results.py | BioJoe/automated-FISH-analyses | c2859fe9ee8fc122e3651537ead3c5ccb7e270a1 | [
"MIT"
] | null | null | null | barplot FISH results.py | BioJoe/automated-FISH-analyses | c2859fe9ee8fc122e3651537ead3c5ccb7e270a1 | [
"MIT"
] | null | null | null | barplot FISH results.py | BioJoe/automated-FISH-analyses | c2859fe9ee8fc122e3651537ead3c5ccb7e270a1 | [
"MIT"
] | null | null | null | #load python included modules
import tkinter as tk
from tkinter import filedialog
#load additional python modules
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
root = tk.Tk()
root.withdraw()
#parameters to load data
x_axis_name = "genotype"
y_axis_name = ... | 26.102041 | 54 | 0.68491 |
6f624ac4bd9792b25f272f56fe4c7a93d9356f34 | 20,049 | py | Python | mayan/apps/sources/views.py | Fourdee/mayan-edms | 39a94f8b4fed519a3b20ab419e920ea53c11eb84 | [
"Apache-2.0"
] | null | null | null | mayan/apps/sources/views.py | Fourdee/mayan-edms | 39a94f8b4fed519a3b20ab419e920ea53c11eb84 | [
"Apache-2.0"
] | null | null | null | mayan/apps/sources/views.py | Fourdee/mayan-edms | 39a94f8b4fed519a3b20ab419e920ea53c11eb84 | [
"Apache-2.0"
] | 1 | 2020-02-05T18:07:08.000Z | 2020-02-05T18:07:08.000Z | from __future__ import absolute_import, unicode_literals
import logging
from django.contrib import messages
from django.http import HttpResponseRedirect, JsonResponse
from django.shortcuts import get_object_or_404
from django.urls import reverse, reverse_lazy
from django.utils.encoding import force_text, uri_to_iri
f... | 34.213311 | 109 | 0.576388 |
c27447350f222d1794c16e705b2273133332a592 | 6,262 | py | Python | NT_SSDA/demo_seed_ENT.py | chamwen/NT-Benchmark | d5a17a07fdfa89d80d47843c35ecf3e078b94371 | [
"MIT"
] | 1 | 2022-03-21T16:30:40.000Z | 2022-03-21T16:30:40.000Z | NT_SSDA/demo_seed_ENT.py | chamwen/NT-Benchmark | d5a17a07fdfa89d80d47843c35ecf3e078b94371 | [
"MIT"
] | null | null | null | NT_SSDA/demo_seed_ENT.py | chamwen/NT-Benchmark | d5a17a07fdfa89d80d47843c35ecf3e078b94371 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# A Survey on Negative Transfer
# https://github.com/chamwen/NT-Benchmark
import numpy as np
import argparse
import os
import torch as tr
import torch.nn as nn
import torch.optim as optim
from utils import network, loss, utils
from utils.LogRecord import LogRecord
from utils.dataloade... | 35.988506 | 112 | 0.598691 |
e66fee70797a514528d1a4491c7a2514a011c7eb | 149,331 | py | Python | keystone/tests/unit/test_v3_federation.py | himanshu-setia/myKeystone | 8a56c161ee29e34e70c6334b048881e8fbbd7514 | [
"Apache-2.0"
] | null | null | null | keystone/tests/unit/test_v3_federation.py | himanshu-setia/myKeystone | 8a56c161ee29e34e70c6334b048881e8fbbd7514 | [
"Apache-2.0"
] | null | null | null | keystone/tests/unit/test_v3_federation.py | himanshu-setia/myKeystone | 8a56c161ee29e34e70c6334b048881e8fbbd7514 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 40.447183 | 79 | 0.558652 |
464daba507ffb985e5b91f13eb4bc6631730624c | 1,105 | py | Python | lib/adb_patch.py | uwol1116/FCS_IoT | 1bc589ef24aa6a9cf5e1eee3b884a9ae8574ca0c | [
"MIT"
] | null | null | null | lib/adb_patch.py | uwol1116/FCS_IoT | 1bc589ef24aa6a9cf5e1eee3b884a9ae8574ca0c | [
"MIT"
] | null | null | null | lib/adb_patch.py | uwol1116/FCS_IoT | 1bc589ef24aa6a9cf5e1eee3b884a9ae8574ca0c | [
"MIT"
] | null | null | null | import subprocess
import shutil
import os
def adb_devices():
subprocess.run("adb kill-server")
output = subprocess.check_output('adb devices', text=True).split('\n', 1)[1].split("device")[0].strip()
return output
def auth_check():
command = "adb shell su -c id"
output = subprocess.check_output(c... | 31.571429 | 107 | 0.668778 |
851810bcee53833b5c7753d2d624b13595f65bca | 609 | py | Python | flypy/runtime/obj/noneobject.py | filmackay/flypy | d64e70959c5c8af9e914dcc3ce1068fb99859c3a | [
"BSD-2-Clause"
] | null | null | null | flypy/runtime/obj/noneobject.py | filmackay/flypy | d64e70959c5c8af9e914dcc3ce1068fb99859c3a | [
"BSD-2-Clause"
] | null | null | null | flypy/runtime/obj/noneobject.py | filmackay/flypy | d64e70959c5c8af9e914dcc3ce1068fb99859c3a | [
"BSD-2-Clause"
] | 1 | 2020-01-01T00:43:24.000Z | 2020-01-01T00:43:24.000Z | # -*- coding: utf-8 -*-
"""
Dummy None implementation.
"""
from __future__ import print_function, division, absolute_import
from flypy import overlay
from ... import jit, typeof
@jit
class NoneType(object):
layout = []
@jit('a -> bool')
def __nonzero__(self):
return False
__bool__ = __nonze... | 16.459459 | 64 | 0.622332 |
3999a10765d601b02013b65dc53300ddd77070f5 | 6,206 | py | Python | SyncNetInstance.py | KeithIMyers/syncnet_python | 543065a22272a8d936fdf2356ec425f88589e379 | [
"CC-BY-4.0"
] | null | null | null | SyncNetInstance.py | KeithIMyers/syncnet_python | 543065a22272a8d936fdf2356ec425f88589e379 | [
"CC-BY-4.0"
] | null | null | null | SyncNetInstance.py | KeithIMyers/syncnet_python | 543065a22272a8d936fdf2356ec425f88589e379 | [
"CC-BY-4.0"
] | null | null | null | #!/usr/bin/python
#-*- coding: utf-8 -*-
# Video 25 FPS, Audio 16000HZ
import torch
import numpy
import time, pdb, argparse, subprocess, os
import cv2
import python_speech_features
from scipy import signal
from scipy.io import wavfile
from SyncNetModel import *
# ==================== Get OFFSET ====================... | 30.875622 | 165 | 0.529649 |
cbe33c895ea29de6bb5e7c1dbc374d8493f9d248 | 10,460 | py | Python | tests/cases/resources/tests/field.py | rysdyk/serrano | 926d874b19efdd18e359d32bca601058b655b288 | [
"BSD-2-Clause"
] | null | null | null | tests/cases/resources/tests/field.py | rysdyk/serrano | 926d874b19efdd18e359d32bca601058b655b288 | [
"BSD-2-Clause"
] | null | null | null | tests/cases/resources/tests/field.py | rysdyk/serrano | 926d874b19efdd18e359d32bca601058b655b288 | [
"BSD-2-Clause"
] | 1 | 2020-01-16T15:26:37.000Z | 2020-01-16T15:26:37.000Z | import json
from django.test.utils import override_settings
from avocado.models import DataField
from avocado.events.models import Log
from .base import BaseTestCase
from tests.models import Project, Title
class FieldResourceTestCase(BaseTestCase):
def test_get_all(self):
response = self.client.get('/api/f... | 39.029851 | 81 | 0.597992 |
3b202814a1d46aa7c9f76ad4808d343b858887e2 | 441 | py | Python | src/image_capture.py | seandiacono/Nav-AI | 8e49914f3af5ed3dcd3f43725f355347b4894f56 | [
"MIT"
] | 1 | 2021-05-26T15:40:58.000Z | 2021-05-26T15:40:58.000Z | src/image_capture.py | seandiacono/Nav-AI | 8e49914f3af5ed3dcd3f43725f355347b4894f56 | [
"MIT"
] | null | null | null | src/image_capture.py | seandiacono/Nav-AI | 8e49914f3af5ed3dcd3f43725f355347b4894f56 | [
"MIT"
] | null | null | null | import airsim
import time
def image_capture(stop):
i = 0
images = []
client = airsim.MultirotorClient()
client.confirmConnection()
client.enableApiControl(True)
while True:
print("Image: " + str(i))
image = client.simGetImage(
"bottom_center", airsim.ImageType.Depth... | 22.05 | 55 | 0.582766 |
465bb78a72b847d555fa3933db3c3729ac709d8c | 4,447 | py | Python | dakotathon/variables/uniform_uncertain.py | csdms/dakotathon | 6af575b0c21384b2a1ab51e26b6a08512313bd84 | [
"MIT"
] | 8 | 2019-09-11T12:59:57.000Z | 2021-08-11T16:31:58.000Z | dakotathon/variables/uniform_uncertain.py | csdms/dakota | 6af575b0c21384b2a1ab51e26b6a08512313bd84 | [
"MIT"
] | 66 | 2015-04-06T17:11:21.000Z | 2019-02-03T18:09:52.000Z | dakotathon/variables/uniform_uncertain.py | csdms/dakota | 6af575b0c21384b2a1ab51e26b6a08512313bd84 | [
"MIT"
] | 5 | 2015-03-24T22:39:34.000Z | 2018-04-21T12:14:05.000Z | """Implementation of a Dakota uniform uncertain variable."""
from .base import VariablesBase
from ..utils import to_iterable
classname = "UniformUncertain"
class UniformUncertain(VariablesBase):
"""Define attributes for Dakota uniform uncertain variables.
The distribution lower and upper bounds are requi... | 28.876623 | 71 | 0.576119 |
be2e6a6a953cfd3f056fd0946074bc143c6b4ee7 | 259 | py | Python | transactions/admin.py | thoth-ky/currency_exhange_app | b1d9495057532c8a24b228e68af98929bb6abdf1 | [
"MIT"
] | null | null | null | transactions/admin.py | thoth-ky/currency_exhange_app | b1d9495057532c8a24b228e68af98929bb6abdf1 | [
"MIT"
] | null | null | null | transactions/admin.py | thoth-ky/currency_exhange_app | b1d9495057532c8a24b228e68af98929bb6abdf1 | [
"MIT"
] | null | null | null | from django.contrib import admin
from transactions.models import Transaction
class TransactionAdmin(admin.ModelAdmin):
list_display = ("id", "source_wallet", "target_wallet", "txn_amount", "status")
admin.site.register(Transaction, TransactionAdmin)
| 23.545455 | 83 | 0.783784 |
60aa039e53725fdd73291a6c509136aa121c0fdb | 1,936 | py | Python | mark-function.py | j-rheinheimer/Mark | 312c58a846e7129c44edccf703b2072e7453ce55 | [
"MIT"
] | null | null | null | mark-function.py | j-rheinheimer/Mark | 312c58a846e7129c44edccf703b2072e7453ce55 | [
"MIT"
] | null | null | null | mark-function.py | j-rheinheimer/Mark | 312c58a846e7129c44edccf703b2072e7453ce55 | [
"MIT"
] | null | null | null | """
MARK project:
Degree conversion analysis
FTIR data
"""
import matplotlib.pyplot as plt
import pandas as pd
import glob
wsl_path = '/mnt/c/Users/jprhe/Dropbox/Codes/Projects/mark/data/*'
linux_path = '/home/rheinheimer/Dropbox/Codes/Projects/mark/data/*'
windows_path = 'C:/Users/jprhe/Dropbox/Codes/Projects/mark/D... | 26.520548 | 73 | 0.652376 |
03cc824e64947b5018720aba53a0983d9961b7c5 | 1,007 | py | Python | examples/8_graph_from_yaml/main.py | YoshikazuArimitsu/DataProcessingPipiline_template | 5f08e3a072b338e9898a8f889c3f7700ba965bb6 | [
"MIT"
] | null | null | null | examples/8_graph_from_yaml/main.py | YoshikazuArimitsu/DataProcessingPipiline_template | 5f08e3a072b338e9898a8f889c3f7700ba965bb6 | [
"MIT"
] | null | null | null | examples/8_graph_from_yaml/main.py | YoshikazuArimitsu/DataProcessingPipiline_template | 5f08e3a072b338e9898a8f889c3f7700ba965bb6 | [
"MIT"
] | null | null | null | import os
from pathlib import Path
from logging import DEBUG, basicConfig, getLogger
from aksdp.task import Task
from aksdp.util import PlantUML
from aksdp.util import graph_factory as gf
logger = getLogger(__name__)
class TaskA(Task):
def __init__(self, params):
super().__init__(params)
def main(s... | 21.425532 | 64 | 0.66137 |
9932f08c05a7a021c7062fccaf100c6ac461d2b7 | 34,338 | py | Python | library_tools/assemble.py | shiwei23/ImageAnalysis3 | 1d2aa1721d188c96feb55b22fc6c9929d7073f49 | [
"MIT"
] | 3 | 2018-10-10T22:15:10.000Z | 2020-11-20T15:17:45.000Z | library_tools/assemble.py | shiwei23/ImageAnalysis3 | 1d2aa1721d188c96feb55b22fc6c9929d7073f49 | [
"MIT"
] | 2 | 2019-10-31T13:29:05.000Z | 2021-08-12T17:32:32.000Z | library_tools/assemble.py | shiwei23/ImageAnalysis3 | 1d2aa1721d188c96feb55b22fc6c9929d7073f49 | [
"MIT"
] | 2 | 2020-06-04T18:40:52.000Z | 2022-03-18T15:53:05.000Z | import os, glob, sys, time
import pickle
import numpy as np
# biopython
from Bio import SeqIO
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
from Bio.Blast.Applications import NcbiblastnCommandline
from Bio.Blast import NCBIXML
# other packages
from . import LibraryDesigner as ld
from . import LibraryToo... | 46.402703 | 145 | 0.612907 |
5bc0ff8e3edfe0bb32ac885b8506fd56019920d7 | 24,122 | py | Python | src/snowflake/connector/converter.py | timgraham/snowflake-connector-python | a14ed5776f25fcca9fa13853bbdb171b4f146b76 | [
"Apache-2.0"
] | 311 | 2017-01-06T03:02:10.000Z | 2022-03-28T12:39:10.000Z | src/snowflake/connector/converter.py | timgraham/snowflake-connector-python | a14ed5776f25fcca9fa13853bbdb171b4f146b76 | [
"Apache-2.0"
] | 720 | 2017-01-12T19:05:15.000Z | 2022-03-31T12:24:36.000Z | src/snowflake/connector/converter.py | timgraham/snowflake-connector-python | a14ed5776f25fcca9fa13853bbdb171b4f146b76 | [
"Apache-2.0"
] | 289 | 2017-02-02T00:01:41.000Z | 2022-03-19T06:01:23.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012-2021 Snowflake Computing Inc. All rights reserved.
#
import binascii
import decimal
import time
from datetime import date, datetime
from datetime import time as dt_t
from datetime import timedelta
from logging import getLogger
from typing import Any,... | 34.312945 | 105 | 0.597421 |
87cc9d59ea3d5fd2d7a93fc0ddffe7344df9319a | 2,443 | py | Python | present/markdown.py | legendofmiracles/present | 0c53ec66f81611e9e811741e0be7c927fd996d24 | [
"Apache-2.0"
] | null | null | null | present/markdown.py | legendofmiracles/present | 0c53ec66f81611e9e811741e0be7c927fd996d24 | [
"Apache-2.0"
] | null | null | null | present/markdown.py | legendofmiracles/present | 0c53ec66f81611e9e811741e0be7c927fd996d24 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import warnings
import yaml
from mistune import markdown
from .slide import (
Slide,
Heading,
Paragraph,
Text,
Strong,
Codespan,
Emphasis,
Link,
List,
Image,
Codio,
BlockCode,
BlockHtml,
BlockQuote,
)
class Markdown(object):
... | 28.08046 | 76 | 0.453131 |
1446a4a212bc53ce7bb208360a29ee5a4002119d | 10,664 | py | Python | python/paddle/fluid/contrib/mixed_precision/decorator.py | JesseyXujin/Paddle | 843bdbaae1253d6dc964e6beddce239a88add113 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/contrib/mixed_precision/decorator.py | JesseyXujin/Paddle | 843bdbaae1253d6dc964e6beddce239a88add113 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/contrib/mixed_precision/decorator.py | JesseyXujin/Paddle | 843bdbaae1253d6dc964e6beddce239a88add113 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 PaddlePaddle 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 appli... | 41.494163 | 86 | 0.62078 |
a99c1966896d513e88240a085f2e39cb0af773b1 | 633 | py | Python | app/spoonderful/main.py | jsilke/spoonderful | 46b5a36bb190f9af23885d214fa490e5c869433c | [
"MIT"
] | 2 | 2022-02-25T02:28:23.000Z | 2022-03-04T17:17:58.000Z | app/spoonderful/main.py | jsilke/spoonderful | 46b5a36bb190f9af23885d214fa490e5c869433c | [
"MIT"
] | null | null | null | app/spoonderful/main.py | jsilke/spoonderful | 46b5a36bb190f9af23885d214fa490e5c869433c | [
"MIT"
] | null | null | null | from fastapi import FastAPI
from .data import models
from .data.database import engine
from .routes import (
register,
user,
login,
vote,
recommendation,
)
# Create tables in the database from the ORM models if they do not exist.
models.Base.metadata.create_all(bind=engine)
app = FastAPI()
app.i... | 21.1 | 95 | 0.731438 |
b6fc1a519f501031fb7f6526c8795fc31874af73 | 1,133 | py | Python | p354h/max_envelopes.py | l33tdaima/l33tdaima | 0a7a9573dc6b79e22dcb54357493ebaaf5e0aa90 | [
"MIT"
] | 1 | 2020-02-20T12:04:46.000Z | 2020-02-20T12:04:46.000Z | p354h/max_envelopes.py | l33tdaima/l33tdaima | 0a7a9573dc6b79e22dcb54357493ebaaf5e0aa90 | [
"MIT"
] | null | null | null | p354h/max_envelopes.py | l33tdaima/l33tdaima | 0a7a9573dc6b79e22dcb54357493ebaaf5e0aa90 | [
"MIT"
] | null | null | null | from typing import List
from bisect import bisect_left
class Solution:
def maxEnvelopesN2(self, envelopes: List[List[int]]) -> int:
heights = [e[1] for e in sorted(envelopes, key=lambda e: (e[0], -e[1]))]
dp, ans = [1] * len(heights), 1
for i in range(1, len(heights)):
dp[i] = ... | 30.621622 | 88 | 0.529568 |
34e0a81c4fc429a0d0c3b77d2758b24e8205f52e | 11,543 | py | Python | spanner/google/cloud/spanner/client.py | alercunha/google-cloud-python | b28a4eb667ae08c3f4dcf9af891ed4931884989c | [
"Apache-2.0"
] | 1 | 2021-01-04T11:40:17.000Z | 2021-01-04T11:40:17.000Z | spanner/google/cloud/spanner/client.py | jujudubai/google-cloud-python | b28a4eb667ae08c3f4dcf9af891ed4931884989c | [
"Apache-2.0"
] | null | null | null | spanner/google/cloud/spanner/client.py | jujudubai/google-cloud-python | b28a4eb667ae08c3f4dcf9af891ed4931884989c | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 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... | 37.599349 | 148 | 0.659101 |
1aa2e5368ac4dd79b41873f12231768b6630e444 | 2,194 | py | Python | molecule/default/tests/test_default.py | bodsch/ansible-json-exporter | d5c47d90b280c980f5520d7fe30c82c8906dcff1 | [
"Apache-2.0"
] | null | null | null | molecule/default/tests/test_default.py | bodsch/ansible-json-exporter | d5c47d90b280c980f5520d7fe30c82c8906dcff1 | [
"Apache-2.0"
] | null | null | null | molecule/default/tests/test_default.py | bodsch/ansible-json-exporter | d5c47d90b280c980f5520d7fe30c82c8906dcff1 | [
"Apache-2.0"
] | null | null | null |
from ansible.parsing.dataloader import DataLoader
from ansible.template import Templar
import json
import pytest
import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def pp_json(json_thing, sort=... | 28.493506 | 105 | 0.712397 |
e1f3ab1285dfd98990e78603fa98094d56e02546 | 14,485 | py | Python | rqalpha/__main__.py | HaidongHe/rqalpha | bb824178425909e051c456f6062a6c5bdc816421 | [
"Apache-2.0"
] | 1 | 2020-11-10T05:44:39.000Z | 2020-11-10T05:44:39.000Z | rqalpha/__main__.py | HaidongHe/rqalpha | bb824178425909e051c456f6062a6c5bdc816421 | [
"Apache-2.0"
] | null | null | null | rqalpha/__main__.py | HaidongHe/rqalpha | bb824178425909e051c456f6062a6c5bdc816421 | [
"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。
# 除非法律有要求或以书面形式达成协议,否则本软件分发时需保持当前许可“原样”... | 36.032338 | 144 | 0.633207 |
a0598ecf3d82fd733959829849b04bed77687e1f | 6,646 | py | Python | ppocr/modeling/backbones/kie_unet_sdmgr.py | pop123123123/PaddleOCR | c7692276ab675a687941debbd86ada179cd790a1 | [
"Apache-2.0"
] | null | null | null | ppocr/modeling/backbones/kie_unet_sdmgr.py | pop123123123/PaddleOCR | c7692276ab675a687941debbd86ada179cd790a1 | [
"Apache-2.0"
] | null | null | null | ppocr/modeling/backbones/kie_unet_sdmgr.py | pop123123123/PaddleOCR | c7692276ab675a687941debbd86ada179cd790a1 | [
"Apache-2.0"
] | null | null | null | # copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve.
#
# 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... | 32.738916 | 75 | 0.577189 |
ca897f2412005125d933155ced4b2c25ecaea403 | 78,297 | py | Python | iot/google/cloud/iot_v1/proto/resources_pb2.py | q-logic/google-cloud-python | a65065c89c059bc564bbdd79288a48970907c399 | [
"Apache-2.0"
] | null | null | null | iot/google/cloud/iot_v1/proto/resources_pb2.py | q-logic/google-cloud-python | a65065c89c059bc564bbdd79288a48970907c399 | [
"Apache-2.0"
] | 40 | 2019-07-16T10:04:48.000Z | 2020-01-20T09:04:59.000Z | iot/google/cloud/iot_v1/proto/resources_pb2.py | q-logic/google-cloud-python | a65065c89c059bc564bbdd79288a48970907c399 | [
"Apache-2.0"
] | 2 | 2019-07-18T00:05:31.000Z | 2019-11-27T14:17:22.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/iot_v1/proto/resources.proto
import sys
_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1"))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descript... | 35.14228 | 5,950 | 0.631646 |
cae02678d281642787e348abb61dd143a3f06275 | 7,166 | py | Python | src/python/pants/bin/remote_pants_runner.py | jakubbujny/pants | e7fe73eaa3bc196d6d976e9f362bf60b69da17b3 | [
"Apache-2.0"
] | null | null | null | src/python/pants/bin/remote_pants_runner.py | jakubbujny/pants | e7fe73eaa3bc196d6d976e9f362bf60b69da17b3 | [
"Apache-2.0"
] | null | null | null | src/python/pants/bin/remote_pants_runner.py | jakubbujny/pants | e7fe73eaa3bc196d6d976e9f362bf60b69da17b3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
import signal
import sys
import time
from builtins import object, str
from... | 37.715789 | 98 | 0.716578 |
cfdaf20807af4afb766ebdf962754b72658410cf | 2,496 | py | Python | pynaoqi-python2.7-2.5.5.5-linux64/lib/python2.7/site-packages/allog.py | applejenny66/docker_pepper | 2469cc4db6585161a31ac44c8fcf2605d71318b1 | [
"MIT"
] | null | null | null | pynaoqi-python2.7-2.5.5.5-linux64/lib/python2.7/site-packages/allog.py | applejenny66/docker_pepper | 2469cc4db6585161a31ac44c8fcf2605d71318b1 | [
"MIT"
] | null | null | null | pynaoqi-python2.7-2.5.5.5-linux64/lib/python2.7/site-packages/allog.py | applejenny66/docker_pepper | 2469cc4db6585161a31ac44c8fcf2605d71318b1 | [
"MIT"
] | null | null | null | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.11
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2,6,0):
def swig_import_helper():
from os.path impo... | 26.273684 | 90 | 0.660657 |
5e0d3388e82c6825323e5d68ea6db9849d9dcce3 | 10,189 | py | Python | trestle/core/resolver/prune.py | deenine/compliance-trestle | 79b2f61baac7adbf69e1474a5e218d664bec65ff | [
"Apache-2.0"
] | null | null | null | trestle/core/resolver/prune.py | deenine/compliance-trestle | 79b2f61baac7adbf69e1474a5e218d664bec65ff | [
"Apache-2.0"
] | null | null | null | trestle/core/resolver/prune.py | deenine/compliance-trestle | 79b2f61baac7adbf69e1474a5e218d664bec65ff | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022 IBM Corp. 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 45.284444 | 113 | 0.641574 |
6cd20a68ab40e7cbe1f7b78275a1298bdd961248 | 935 | py | Python | selfdrive/loggerd/config.py | GratefulJinx77/openpilot-1 | f9af3ddf4c819127119943cafec6e46fe75a49af | [
"MIT"
] | 10 | 2021-10-09T15:32:24.000Z | 2022-02-14T08:31:56.000Z | selfdrive/loggerd/config.py | skyhanil1004/hanilpilot | 102738e4e0dd1702ab01b849e444bd1dfc2ddd1c | [
"MIT"
] | 51 | 2021-11-17T16:13:39.000Z | 2022-03-22T00:14:00.000Z | selfdrive/loggerd/config.py | skyhanil1004/hanilpilot | 102738e4e0dd1702ab01b849e444bd1dfc2ddd1c | [
"MIT"
] | 10 | 2021-11-29T20:45:56.000Z | 2022-03-28T20:15:41.000Z | import os
from pathlib import Path
from selfdrive.hardware import PC
if os.environ.get('LOG_ROOT', False):
ROOT = os.environ['LOG_ROOT']
elif PC:
ROOT = os.path.join(str(Path.home()), ".comma", "media", "0", "realdata")
else:
ROOT = '/data/media/0/realdata/'
CAMERA_FPS = 20
SEGMENT_LENGTH = 60
STATS_DIR_FILE_... | 22.261905 | 75 | 0.716578 |
fc3a097177104ca2d7b564dd204debd1b8401f4a | 10,284 | py | Python | virt/ansible-latest/lib/python2.7/site-packages/ansible/modules/crypto/acme/acme_certificate_revoke.py | lakhlaifi/RedHat-Ansible | 27c5077cced9d416081fcd5d69ea44bca0317fa4 | [
"Apache-2.0"
] | 1 | 2020-03-29T18:41:01.000Z | 2020-03-29T18:41:01.000Z | ansible/ansible/modules/crypto/acme/acme_certificate_revoke.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 7 | 2020-09-07T17:27:56.000Z | 2022-03-02T06:25:46.000Z | ansible/ansible/modules/crypto/acme/acme_certificate_revoke.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 1 | 2020-10-30T12:48:24.000Z | 2020-10-30T12:48:24.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016 Michael Gruener <michael.gruener@chaosmoon.net>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_versio... | 44.908297 | 123 | 0.655873 |
b8ffd72827931da4a759f7940e79201fd6001c1d | 5,447 | py | Python | colour/adaptation/tests/test_cie1994.py | rift-labs-developer/colour | 15112dbe824aab0f21447e0db4a046a28a06f43a | [
"BSD-3-Clause"
] | 1,380 | 2015-01-10T12:30:33.000Z | 2022-03-30T10:19:57.000Z | colour/adaptation/tests/test_cie1994.py | rift-labs-developer/colour | 15112dbe824aab0f21447e0db4a046a28a06f43a | [
"BSD-3-Clause"
] | 638 | 2015-01-02T10:49:05.000Z | 2022-03-29T10:16:22.000Z | colour/adaptation/tests/test_cie1994.py | rift-labs-developer/colour | 15112dbe824aab0f21447e0db4a046a28a06f43a | [
"BSD-3-Clause"
] | 250 | 2015-01-21T15:27:19.000Z | 2022-03-30T10:23:58.000Z | # !/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Defines the unit tests for the :mod:`colour.adaptation.cie1994` module.
"""
import numpy as np
import unittest
from itertools import permutations
from colour.adaptation import chromatic_adaptation_CIE1994
from colour.utilities import domain_range_scale, ignore_numpy_... | 34.474684 | 79 | 0.562695 |
3c3a626496112fb58dd3a16ff08ee5763a6c5fe4 | 20,652 | py | Python | chrisapp/base.py | FNNDSC/chrisapp | dcc6e4493b1592f2dff09e316847fe7e02e7dd42 | [
"MIT"
] | 1 | 2018-03-23T19:26:53.000Z | 2018-03-23T19:26:53.000Z | chrisapp/base.py | FNNDSC/chrisapp | dcc6e4493b1592f2dff09e316847fe7e02e7dd42 | [
"MIT"
] | 9 | 2018-03-16T18:56:03.000Z | 2021-04-15T03:40:09.000Z | chrisapp/base.py | FNNDSC/chrisapp | dcc6e4493b1592f2dff09e316847fe7e02e7dd42 | [
"MIT"
] | 5 | 2018-03-03T00:09:19.000Z | 2020-10-19T16:33:01.000Z | """
/**
*
* sSSs .S S. .S_sSSs .S sSSs
* d%%SP .SS SS. .SS~YS%%b .SS d%%SP
* d%S' S%S S%S S%S `S%b S%S d%S'
* S%S S%S S%S S%S S%S S%S S%|
* S&S S%S SSSS%S S%S d* S S&S S&S
* S&S S&S SSS&S S&S ... | 40.178988 | 105 | 0.545661 |
3bc203e3fb2cb26e26026816ba058d013d2d350b | 5,791 | py | Python | tests/test_swf.py | clbarnes/imageio | 73dadda9d93f9e2c4724095f91a2acd4ecd13c4a | [
"BSD-2-Clause"
] | 1 | 2022-03-24T22:40:13.000Z | 2022-03-24T22:40:13.000Z | tests/test_swf.py | clbarnes/imageio | 73dadda9d93f9e2c4724095f91a2acd4ecd13c4a | [
"BSD-2-Clause"
] | null | null | null | tests/test_swf.py | clbarnes/imageio | 73dadda9d93f9e2c4724095f91a2acd4ecd13c4a | [
"BSD-2-Clause"
] | 1 | 2018-12-29T22:19:50.000Z | 2018-12-29T22:19:50.000Z | """ Tests for the shockwave flash plugin
"""
import os
import numpy as np
from pytest import raises
from imageio.testing import run_tests_if_main, get_test_dir, need_internet
import imageio
from imageio import core
from imageio.core import get_remote_file
test_dir = get_test_dir()
mean = lambda x: x.sum() / x.si... | 28.668317 | 79 | 0.594371 |
e09d660dedaaeb950a7a12d73b8431768c2a5ac8 | 1,785 | py | Python | Quest-3/Challenge-3/main.py | MatejMecka/Stellar-Quest-Python | c6911c6f144e878af354ca0af121372cb3824b8a | [
"MIT"
] | 11 | 2020-10-22T10:49:07.000Z | 2022-03-18T21:09:02.000Z | Quest-3/Challenge-3/main.py | MatejMecka/Stellar-Quest-Python | c6911c6f144e878af354ca0af121372cb3824b8a | [
"MIT"
] | null | null | null | Quest-3/Challenge-3/main.py | MatejMecka/Stellar-Quest-Python | c6911c6f144e878af354ca0af121372cb3824b8a | [
"MIT"
] | 5 | 2021-01-06T12:42:41.000Z | 2021-11-18T05:05:46.000Z | """
Challenge 3: Submit a hash signed transaction
"""
from stellar_sdk import Server, Keypair, TransactionBuilder, Network
import requests
import hashlib
import binascii
# 1. Load Keys
server = Server("https://horizon-testnet.stellar.org")
stellar_quest_keypair = Keypair.from_secret("Shhhhhh")
quest_account_pub_key = ... | 24.452055 | 79 | 0.748459 |
63739a274111a2f58d6f946bd1c35919ec4a22dd | 489 | py | Python | testing/registry/thread_counter/lambda_func.py | open-lambda/s19-lambda | 0c210d5fcb50e87ac8a037c81092f7dd64b5c022 | [
"Apache-2.0"
] | 3 | 2019-04-09T20:52:48.000Z | 2020-12-07T01:52:22.000Z | testing/registry/thread_counter/lambda_func.py | open-lambda/s19-lambda | 0c210d5fcb50e87ac8a037c81092f7dd64b5c022 | [
"Apache-2.0"
] | 3 | 2019-03-27T08:41:31.000Z | 2019-06-04T02:06:09.000Z | testing/registry/thread_counter/lambda_func.py | open-lambda/s19-lambda | 0c210d5fcb50e87ac8a037c81092f7dd64b5c022 | [
"Apache-2.0"
] | 1 | 2019-03-28T03:26:10.000Z | 2019-03-28T03:26:10.000Z | from threading import *
import time, sys
t = None
def worker():
counter = 0
while True:
print 'counter=%d' % counter
sys.stdout.flush()
counter += 1
time.sleep(0.001)
def handler(event):
global t
if t == None:
print 'Init worker thread'
t = Thread(targe... | 17.464286 | 38 | 0.576687 |
bdb96a0464fe81a4e00a569b5f0fa318f48af51d | 11,520 | py | Python | isi_sdk_8_2_1/isi_sdk_8_2_1/models/node_state_readonly_node.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_2_1/isi_sdk_8_2_1/models/node_state_readonly_node.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_2_1/isi_sdk_8_2_1/models/node_state_readonly_node.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 8
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class NodeStateReadonlyNode(obje... | 32.450704 | 450 | 0.593229 |
254a672523f11606bab30f0265bc21aeb4ad2bb3 | 7,104 | py | Python | Code/Components/Synthesis/testdata/current/simulation/synthregression/synthprogrunner.py | rtobar/askapsoft | 6bae06071d7d24f41abe3f2b7f9ee06cb0a9445e | [
"BSL-1.0",
"Apache-2.0",
"OpenSSL"
] | null | null | null | Code/Components/Synthesis/testdata/current/simulation/synthregression/synthprogrunner.py | rtobar/askapsoft | 6bae06071d7d24f41abe3f2b7f9ee06cb0a9445e | [
"BSL-1.0",
"Apache-2.0",
"OpenSSL"
] | null | null | null | Code/Components/Synthesis/testdata/current/simulation/synthregression/synthprogrunner.py | rtobar/askapsoft | 6bae06071d7d24f41abe3f2b7f9ee06cb0a9445e | [
"BSL-1.0",
"Apache-2.0",
"OpenSSL"
] | null | null | null | # helper class for synthesis regression testing
import os,math
# helper class to run a program from synthesis
class SynthesisProgramRunner:
def __init__(self, template_parset = None):
'''
initialise the class
template_parset - file name for the template parset file
co... | 37.389474 | 153 | 0.616554 |
05334b1d05a912bce0aa968400472cf5db523355 | 268 | py | Python | blogproject/comments/admin.py | MrWolffy/django-tutorial | 4b00e35092d47e9a04a7019c3f803c5b09630ec6 | [
"MIT"
] | null | null | null | blogproject/comments/admin.py | MrWolffy/django-tutorial | 4b00e35092d47e9a04a7019c3f803c5b09630ec6 | [
"MIT"
] | null | null | null | blogproject/comments/admin.py | MrWolffy/django-tutorial | 4b00e35092d47e9a04a7019c3f803c5b09630ec6 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Comment
class CommentAdmin(admin.ModelAdmin):
list_display = ['name', 'email', 'url', 'post', 'created_time']
fields = ['name', 'email', 'url', 'text', 'post']
admin.site.register(Comment, CommentAdmin)
| 24.363636 | 67 | 0.690299 |
296a2b8c76fee95fe1a95271db23b9e391185b69 | 1,445 | py | Python | named_entity_recognition/src/classifiers/label_count_driver.py | anishacharya/nlp-wrapper | c9722d541c8f90c178330483eaf060d6dd52f357 | [
"MIT"
] | 2 | 2020-05-17T19:48:25.000Z | 2020-06-11T03:25:37.000Z | named_entity_recognition/src/classifiers/label_count_driver.py | anishacharya/nlp-wrapper | c9722d541c8f90c178330483eaf060d6dd52f357 | [
"MIT"
] | null | null | null | named_entity_recognition/src/classifiers/label_count_driver.py | anishacharya/nlp-wrapper | c9722d541c8f90c178330483eaf060d6dd52f357 | [
"MIT"
] | 4 | 2020-06-11T03:25:41.000Z | 2021-03-26T13:34:07.000Z | from collections import Counter
from typing import List
from src.data_utils.definitions import LabeledSentence, PersonExample
from src.models.label_count import LabelCount, LabelCountBinary
def train_label_count_binary_ner(ner_exs: List[PersonExample]) -> LabelCountBinary:
"""
:param ner_exs: training exampl... | 38.026316 | 88 | 0.688581 |
fa45858d51511af2f49810a21dad0b61aac174d8 | 3,716 | py | Python | test/functional/interface_rpc.py | MrCryptoBeast/WWW | 857e860df0aa1bc7fde2ee6f5918ff32933beeb3 | [
"MIT"
] | null | null | null | test/functional/interface_rpc.py | MrCryptoBeast/WWW | 857e860df0aa1bc7fde2ee6f5918ff32933beeb3 | [
"MIT"
] | null | null | null | test/functional/interface_rpc.py | MrCryptoBeast/WWW | 857e860df0aa1bc7fde2ee6f5918ff32933beeb3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2018-2020 The worldwideweb Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Tests some generic aspects of the RPC interface."""
import os
from test_framework.authproxy impor... | 35.730769 | 99 | 0.655005 |
d0f76fc6f27de361485fada0fb66c0716326f5fd | 6,086 | py | Python | tests/denon/test_http_api.py | JPHutchins/pyavreceiver | 2c86d0ab1f3bca886d2a876096ac760ffb1dcd5f | [
"Apache-2.0"
] | 2 | 2020-12-28T06:09:18.000Z | 2021-01-09T22:36:57.000Z | tests/denon/test_http_api.py | JPHutchins/pyavreceiver | 2c86d0ab1f3bca886d2a876096ac760ffb1dcd5f | [
"Apache-2.0"
] | 1 | 2021-02-03T22:59:49.000Z | 2021-02-03T22:59:49.000Z | tests/denon/test_http_api.py | JPHutchins/pyavreceiver | 2c86d0ab1f3bca886d2a876096ac760ffb1dcd5f | [
"Apache-2.0"
] | null | null | null | """Test getting device information via HTTP API."""
from pyavreceiver.denon import const as denon_const
from pyavreceiver.denon.http_api import DenonHTTPApi
def test_get_renamed_and_deleted_sources():
"""Test getting dict of renamed sources."""
# AppCommand
with open("tests/denon/fixtures/GetRename-Delete... | 37.567901 | 74 | 0.640815 |
9d8fb69936fe9ee89d710b9644df2bde53a12ed8 | 10,536 | py | Python | var/spack/repos/builtin/packages/fftw/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/fftw/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 8 | 2021-11-09T20:28:40.000Z | 2022-03-15T03:26:33.000Z | var/spack/repos/builtin/packages/fftw/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2019-02-08T20:37:20.000Z | 2019-03-31T15:19:26.000Z | # 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)
import os
import os.path
import llnl.util.lang
from spack.package import *
class FftwBase(AutotoolsPackage):
"""Ba... | 40.837209 | 99 | 0.617027 |
81d94496a53b757f933d5f2d56e71618f0e22b68 | 8,108 | py | Python | core_admin/skybot/import_positions.py | linea-it/tno | f973381280504ceb1b606b5b3ccc79b6b8c2aa4f | [
"MIT"
] | null | null | null | core_admin/skybot/import_positions.py | linea-it/tno | f973381280504ceb1b606b5b3ccc79b6b8c2aa4f | [
"MIT"
] | 112 | 2018-04-24T19:10:55.000Z | 2022-02-26T16:55:02.000Z | core_admin/skybot/import_positions.py | linea-it/tno | f973381280504ceb1b606b5b3ccc79b6b8c2aa4f | [
"MIT"
] | null | null | null | import linecache
import logging
from datetime import datetime, timedelta, timezone
from io import StringIO
import humanize
import pandas as pd
from django.conf import settings
from tno.db import DBBase
class ImportSkybotPositions():
def __init__(self):
self.logger = logging.getLogger("skybot_load_data"... | 34.948276 | 258 | 0.575851 |
194db71089f0e98f21c8c9ae74158f3c23db1a53 | 3,912 | py | Python | openstack_monitoring/check_cinder_service.py | tobias-urdin/openstack-monitoring | f9636aeb115e28a385a7485fe03f82cab69b6452 | [
"Apache-2.0"
] | 2 | 2016-10-11T14:58:18.000Z | 2016-10-12T06:22:31.000Z | openstack_monitoring/check_cinder_service.py | tobias-urdin/openstack-monitoring | f9636aeb115e28a385a7485fe03f82cab69b6452 | [
"Apache-2.0"
] | null | null | null | openstack_monitoring/check_cinder_service.py | tobias-urdin/openstack-monitoring | f9636aeb115e28a385a7485fe03f82cab69b6452 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# OpenStack Monitoring
# Copyright (C) 2015 Tobias Urdin
#
# 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/license... | 36.222222 | 80 | 0.662577 |
f3e4bea8c185a65f90ce15752511542aab9f40a4 | 15,549 | py | Python | mrfd/data_management.py | ivineetm007/Fall-detection | d18ac5f1e26a04ed8492b2e215a91c51b55f32dd | [
"MIT"
] | 13 | 2020-11-14T06:26:04.000Z | 2022-03-30T10:46:22.000Z | mrfd/data_management.py | ivineetm007/Fall-detection | d18ac5f1e26a04ed8492b2e215a91c51b55f32dd | [
"MIT"
] | 5 | 2020-11-14T06:27:10.000Z | 2021-03-11T23:20:14.000Z | mrfd/data_management.py | ivineetm007/Fall-detection | d18ac5f1e26a04ed8492b2e215a91c51b55f32dd | [
"MIT"
] | 4 | 2020-09-06T20:56:23.000Z | 2021-11-25T05:46:59.000Z | import os
import glob
# import h5py
import numpy as np
import tqdm
import cv2
# from util import *
import sys
import csv
import config
import shutil
from data_utils import load_ROI_box_csv,create_img_data_set,split_data_tracks,create_ROI_mask,load_fall_labels,sort_frames,computeOpticalFlow
root_drive = config.root_driv... | 43.554622 | 328 | 0.665509 |
709bb5f9008e413b6ac19073761e4686aab525d0 | 897 | py | Python | parse_args.py | cfhaiteeh/FightRoute | 0055b13848d957d3876049ab8cba45d268fc34d6 | [
"MIT"
] | 13 | 2019-11-11T10:26:19.000Z | 2021-07-03T05:08:06.000Z | parse_args.py | cfhaiteeh/FightRoute | 0055b13848d957d3876049ab8cba45d268fc34d6 | [
"MIT"
] | null | null | null | parse_args.py | cfhaiteeh/FightRoute | 0055b13848d957d3876049ab8cba45d268fc34d6 | [
"MIT"
] | 3 | 2020-06-16T06:21:05.000Z | 2020-08-19T04:03:11.000Z | import sys
args = sys.argv
import os
import argparse
def interpret_args():
""" Interprets the command line arguments, and returns a dictionary. """
parser = argparse.ArgumentParser()
parser.add_argument("--alpha1", type=int, default=25)
parser.add_argument("--alpha2", type=int, default=15)
parser.... | 26.382353 | 76 | 0.672241 |
cc00cdd47567a7e5079181a206045efc028f406e | 6,940 | py | Python | samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.py | gasugesu/openapi-generator | e1c43f135639b9f300350f788fec98bbc375c932 | [
"Apache-2.0"
] | 3 | 2021-05-19T03:12:48.000Z | 2022-01-28T19:15:42.000Z | samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.py | gasugesu/openapi-generator | e1c43f135639b9f300350f788fec98bbc375c932 | [
"Apache-2.0"
] | 3 | 2021-05-11T23:55:26.000Z | 2022-02-27T11:17:21.000Z | samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.py | gasugesu/openapi-generator | e1c43f135639b9f300350f788fec98bbc375c932 | [
"Apache-2.0"
] | 1 | 2020-10-05T11:13:04.000Z | 2020-10-05T11:13:04.000Z | """
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
import re # noq... | 38.555556 | 174 | 0.574207 |
dc8a9e90f874644b9f48dd9d8dfb24a5280414cf | 3,447 | py | Python | exchangerates/__init__.py | andylolz/exchangerates | d436698a496f1b8b7234da2e313538ea9af62a9d | [
"MIT"
] | null | null | null | exchangerates/__init__.py | andylolz/exchangerates | d436698a496f1b8b7234da2e313538ea9af62a9d | [
"MIT"
] | null | null | null | exchangerates/__init__.py | andylolz/exchangerates | d436698a496f1b8b7234da2e313538ea9af62a9d | [
"MIT"
] | null | null | null | from bisect import bisect_left
import csv
import datetime
import get_rates
import pkg_resources
class UnknownCurrencyException(Exception):
pass
def make_date_from_iso(iso_str):
return datetime.date(int(iso_str[:4]), int(iso_str[5:7]),
int(iso_str[8:10]))
def take_closest(myList, m... | 35.173469 | 89 | 0.581085 |
028ee13e130aca9f9959ada916c12afb31157d56 | 2,967 | py | Python | tracker/views.py | paul-serafimescu/growth-tracker | 972dd1de534225a9be2e763045db560f420a844c | [
"MIT"
] | 1 | 2021-07-28T04:21:12.000Z | 2021-07-28T04:21:12.000Z | tracker/views.py | paul-serafimescu/growth-tracker | 972dd1de534225a9be2e763045db560f420a844c | [
"MIT"
] | null | null | null | tracker/views.py | paul-serafimescu/growth-tracker | 972dd1de534225a9be2e763045db560f420a844c | [
"MIT"
] | null | null | null | from django.http.response import JsonResponse
from django.shortcuts import get_object_or_404, render
from django.http import HttpRequest, HttpResponse, HttpResponseNotFound
from django.views import View
from django.core.exceptions import ObjectDoesNotExist
from django.utils import timezone
from .middleware import prote... | 36.182927 | 188 | 0.694641 |
684b83abe8d6e9a2b288be48eaadb2e0d558aaf7 | 946 | py | Python | test/test_v1_timestamps.py | metal-stack/metal-python | cdf40fa86d2b2944f9818cef1c6723b1eecc506e | [
"MIT"
] | 7 | 2020-12-21T05:24:24.000Z | 2022-02-12T20:55:32.000Z | test/test_v1_timestamps.py | metal-stack/metal-python | cdf40fa86d2b2944f9818cef1c6723b1eecc506e | [
"MIT"
] | 6 | 2020-09-16T07:23:34.000Z | 2022-01-18T12:05:30.000Z | test/test_v1_timestamps.py | metal-stack/metal-python | cdf40fa86d2b2944f9818cef1c6723b1eecc506e | [
"MIT"
] | null | null | null | # coding: utf-8
"""
metal-api
API to manage and control plane resources like machines, switches, operating system images, machine sizes, networks, IP addresses and more # noqa: E501
OpenAPI spec version: v0.15.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __futur... | 23.073171 | 156 | 0.705074 |
10385f513eb620ee76cee002f03cf9df164fefd9 | 372 | py | Python | plugin.video.youtube/resources/lib/default.py | akuala/REPO.KUALA | ea9a157025530d2ce8fa0d88431c46c5352e89d4 | [
"Apache-2.0"
] | 2 | 2018-11-02T19:55:30.000Z | 2020-08-14T02:22:20.000Z | plugin.video.youtube/resources/lib/default.py | akuala/REPO.KUALA | ea9a157025530d2ce8fa0d88431c46c5352e89d4 | [
"Apache-2.0"
] | null | null | null | plugin.video.youtube/resources/lib/default.py | akuala/REPO.KUALA | ea9a157025530d2ce8fa0d88431c46c5352e89d4 | [
"Apache-2.0"
] | 3 | 2019-12-17T20:47:00.000Z | 2021-02-11T19:03:59.000Z | # -*- coding: utf-8 -*-
"""
Copyright (C) 2014-2016 bromix (plugin.video.youtube)
Copyright (C) 2016-2018 plugin.video.youtube
SPDX-License-Identifier: GPL-2.0-only
See LICENSES/GPL-2.0-only for more information.
"""
from youtube_plugin.kodion import runner
from youtube_plugin import youtube
__provi... | 23.25 | 57 | 0.728495 |
80fe314fd26a8ad7d3d92d7fb3a9861019c6b4a7 | 1,148 | py | Python | project/test/backend/pages/categorias/test_category_slug.py | fael07/portfolio | 9f2bb7f85d195d4f181c59426f653652b3d7b78a | [
"MIT"
] | null | null | null | project/test/backend/pages/categorias/test_category_slug.py | fael07/portfolio | 9f2bb7f85d195d4f181c59426f653652b3d7b78a | [
"MIT"
] | null | null | null | project/test/backend/pages/categorias/test_category_slug.py | fael07/portfolio | 9f2bb7f85d195d4f181c59426f653652b3d7b78a | [
"MIT"
] | null | null | null | from django.test import TestCase, Client
from backend.categories import Category
from backend.core.app.models import Project
from worker.views.manager import create_cache
from worker.views.pages.categorias.category_slug import create_project_list, create_project_list_box
class TestCategoryPage(TestCase):
def se... | 34.787879 | 100 | 0.662892 |
83caf3e0148b0fffa508810cfe4874439b572b28 | 5,078 | py | Python | train.py | amore-upf/masked-coreference | fe2386da21ad54d90dd60d7ccbae7e24f323a072 | [
"Apache-2.0"
] | null | null | null | train.py | amore-upf/masked-coreference | fe2386da21ad54d90dd60d7ccbae7e24f323a072 | [
"Apache-2.0"
] | null | null | null | train.py | amore-upf/masked-coreference | fe2386da21ad54d90dd60d7ccbae7e24f323a072 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import time
import torch
import tensorflow as tf
import util
import logging
import numpy as np
format = '%(asctime)s - %(levelname)s - %(name)s - %(message)s'
logging.basicConfig(format=format)
logg... | 42.316667 | 227 | 0.690429 |
527694e9bd95df91e944cf242a9952d06da7a9b8 | 4,252 | py | Python | cloudshell/shell/standards/core/autoload/utils.py | QualiSystems/cloudshell-shell-standards | a8bf7df7814c70df6d89bddcda51220f3b5329c9 | [
"Apache-2.0"
] | null | null | null | cloudshell/shell/standards/core/autoload/utils.py | QualiSystems/cloudshell-shell-standards | a8bf7df7814c70df6d89bddcda51220f3b5329c9 | [
"Apache-2.0"
] | 15 | 2019-04-23T08:43:35.000Z | 2021-03-10T12:46:32.000Z | cloudshell/shell/standards/core/autoload/utils.py | QualiSystems/cloudshell-shell-standards | a8bf7df7814c70df6d89bddcda51220f3b5329c9 | [
"Apache-2.0"
] | 1 | 2020-11-20T20:58:27.000Z | 2020-11-20T20:58:27.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
import warnings
from cloudshell.shell.core.driver_context import (
AutoLoadAttribute,
AutoLoadDetails,
AutoLoadResource,
)
class AutoloadDetailsBuilder(object):
def __init__(
self, resource_model, filter_empty_modules=False, use_new_unique_id=False
... | 35.731092 | 116 | 0.654516 |
093dc5c4a58f5c5bb39c91a845e3c4212802c62d | 491 | py | Python | output/models/ms_data/regex/re_l4_xsd/re_l4.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/ms_data/regex/re_l4_xsd/re_l4.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/ms_data/regex/re_l4_xsd/re_l4.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from dataclasses import dataclass, field
from typing import List, Optional
@dataclass
class Regex:
att: Optional[str] = field(
default=None,
metadata={
"type": "Attribute",
"pattern": r"\p{IsLatinExtended-B}+",
}
)
@dataclass
class Doc:
class Meta:
... | 17.535714 | 49 | 0.521385 |
8fe74f683c0bf32e3c51ca70712488aec2ac0851 | 9,429 | py | Python | gala-ragdoll/ragdoll/models/realconf_base_info.py | seandong37tt4qu/jeszhengq | 32b3737ab45e89e8c5b71cdce871cefd2c938fa8 | [
"MulanPSL-1.0"
] | null | null | null | gala-ragdoll/ragdoll/models/realconf_base_info.py | seandong37tt4qu/jeszhengq | 32b3737ab45e89e8c5b71cdce871cefd2c938fa8 | [
"MulanPSL-1.0"
] | null | null | null | gala-ragdoll/ragdoll/models/realconf_base_info.py | seandong37tt4qu/jeszhengq | 32b3737ab45e89e8c5b71cdce871cefd2c938fa8 | [
"MulanPSL-1.0"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from ragdoll.models.base_model_ import Model
from ragdoll import util
class RealconfBaseInfo(Model):
"""NOTE: This class is auto generated by the swagger code gen... | 29.744479 | 246 | 0.617881 |
b1d19b9053fac2c94c10b6b0b1e882442a9a64b3 | 14,487 | py | Python | sdk/python/pulumi_azure_native/compute/v20180401/get_virtual_machine_scale_set_vm.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/compute/v20180401/get_virtual_machine_scale_set_vm.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/compute/v20180401/get_virtual_machine_scale_set_vm.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 43.9 | 866 | 0.671292 |
48afed6ff9e8639a626a82ae0976ac26acb35dab | 4,243 | py | Python | src/encoded/types/user.py | procha2/encoded | e9f122362b71f3b8641023b8d2d5ad531d3484b7 | [
"MIT"
] | 102 | 2015-05-20T01:17:43.000Z | 2022-03-07T06:03:55.000Z | src/encoded/types/user.py | procha2/encoded | e9f122362b71f3b8641023b8d2d5ad531d3484b7 | [
"MIT"
] | 901 | 2015-01-07T23:11:57.000Z | 2022-03-18T13:56:12.000Z | src/encoded/types/user.py | procha2/encoded | e9f122362b71f3b8641023b8d2d5ad531d3484b7 | [
"MIT"
] | 65 | 2015-02-06T23:00:26.000Z | 2022-01-22T07:58:44.000Z | # -*- coding: utf-8 -*-
from pyramid.view import (
view_config,
)
from pyramid.security import (
Allow,
Deny,
Everyone,
)
from .base import (
Item,
)
from snovault import (
CONNECTION,
calculated_property,
collection,
load_schema,
)
from snovault.calculated import calculate_properti... | 29.061644 | 90 | 0.631629 |
a47b32211c9425e14f09649431f5d179073bc009 | 82,603 | py | Python | reinforcement_learning.py | NasikNafi/TensorFlow-Tutorials | df9fa594ac3de0756603c81cc76a816324e357ba | [
"MIT"
] | null | null | null | reinforcement_learning.py | NasikNafi/TensorFlow-Tutorials | df9fa594ac3de0756603c81cc76a816324e357ba | [
"MIT"
] | null | null | null | reinforcement_learning.py | NasikNafi/TensorFlow-Tutorials | df9fa594ac3de0756603c81cc76a816324e357ba | [
"MIT"
] | null | null | null | ########################################################################
#
# Reinforcement Learning (Q-Learning) for Atari Games
#
# How to run:
#
# To train a Neural Network for playing the Atari game Breakout,
# run the following command in a terminal window.
#
# python reinforcement-learning.py --env 'Breakout-v0' -... | 41.488197 | 134 | 0.620486 |
e713f13d7973964f177328611d71096d5a70923f | 1,123 | py | Python | day_33/challenge_01/main.py | steveanlorn/python_bootcamp_100_days | e542df58406ecae54c76fc8d5cbe08b81243b92f | [
"MIT"
] | null | null | null | day_33/challenge_01/main.py | steveanlorn/python_bootcamp_100_days | e542df58406ecae54c76fc8d5cbe08b81243b92f | [
"MIT"
] | null | null | null | day_33/challenge_01/main.py | steveanlorn/python_bootcamp_100_days | e542df58406ecae54c76fc8d5cbe08b81243b92f | [
"MIT"
] | 1 | 2021-06-04T03:37:22.000Z | 2021-06-04T03:37:22.000Z | from tkinter import *
import requests
import requests.exceptions
def get_quote():
try:
response = requests.get("https://api.kanye.rest")
response.raise_for_status()
except Exception as error:
canvas.itemconfig(quote_text, text="")
canvas.itemconfig(error_text, text=error)
e... | 32.085714 | 124 | 0.711487 |
77e5c1a6f75dbdf10506db981ba1cf49554d3b2c | 4,402 | py | Python | fastai/core.py | jaidmin/fastai-caffe2 | 416b55c4c1ec6f672c7512a12234e33716712a60 | [
"Apache-2.0"
] | 17 | 2018-07-07T01:39:57.000Z | 2021-01-20T19:24:03.000Z | fastai/core.py | jaidmin/fastai-caffe2 | 416b55c4c1ec6f672c7512a12234e33716712a60 | [
"Apache-2.0"
] | 1 | 2018-04-10T21:26:14.000Z | 2018-04-10T21:26:14.000Z | fastai/core.py | PiotrCzapla/fastai | 848405510b9f3c36eff9af1666514babd8cf165e | [
"Apache-2.0"
] | 4 | 2018-04-18T05:14:38.000Z | 2021-06-14T17:19:43.000Z | from .imports import *
from .torch_imports import *
def sum_geom(a,r,n): return a*n if r==1 else math.ceil(a*(1-r**n)/(1-r))
def is_listy(x): return isinstance(x, (list,tuple))
def is_iter(x): return isinstance(x, collections.Iterable)
def map_over(x, f): return [f(o) for o in x] if is_listy(x) else f(x)
def map_none... | 32.367647 | 108 | 0.650841 |
b5536c0c2b5ca753532bdbff6b1f4e59224e2fbb | 14,306 | py | Python | jyotisha/panchaanga/temporal/zodiac/__init__.py | Prabhakaran-cbe/jyotisha | 689327c5944c6cc84b7e58af4deae2a4ebe94d7b | [
"MIT"
] | 40 | 2017-10-01T04:22:35.000Z | 2020-11-30T03:47:57.000Z | jyotisha/panchaanga/temporal/zodiac/__init__.py | Prabhakaran-cbe/jyotisha | 689327c5944c6cc84b7e58af4deae2a4ebe94d7b | [
"MIT"
] | 71 | 2017-08-27T13:54:06.000Z | 2020-12-11T01:16:47.000Z | jyotisha/panchaanga/temporal/zodiac/__init__.py | Prabhakaran-cbe/jyotisha | 689327c5944c6cc84b7e58af4deae2a4ebe94d7b | [
"MIT"
] | 23 | 2017-08-27T11:54:41.000Z | 2020-11-14T19:41:58.000Z | import logging
import sys
from math import floor
from numbers import Number
from typing import Optional
import methodtools
import numpy
import swisseph as swe
from jyotisha.panchaanga.temporal.body import Graha
from jyotisha.panchaanga.temporal.interval import Interval, AngaSpan
from jyotisha.panchaanga.temporal.zodia... | 39.194521 | 174 | 0.733678 |
733eb8ffdbffb48422f409f7417df400aad983d0 | 24,435 | py | Python | X3_Customizer/Make_Documentation.py | bvbohnen/X3_Customizer | 7e8808ee33c463348a3d12959b9311fff17e224d | [
"MIT"
] | 4 | 2018-01-17T16:49:05.000Z | 2018-05-16T20:41:02.000Z | X3_Customizer/Make_Documentation.py | bvbohnen/X3_Customizer | 7e8808ee33c463348a3d12959b9311fff17e224d | [
"MIT"
] | 1 | 2021-07-23T00:50:08.000Z | 2021-07-23T00:50:08.000Z | X3_Customizer/Make_Documentation.py | bvbohnen/X3_Customizer | 7e8808ee33c463348a3d12959b9311fff17e224d | [
"MIT"
] | 1 | 2018-10-13T18:19:02.000Z | 2018-10-13T18:19:02.000Z | '''
Generate documentation for the customizer.
This will parse the docstrings at the top of X3_Customizer and
for each transform, and write them to a plain text file.
This can generally be called directly as an entry function.
Quick markdown notes, for the readme which will be dispayed on
github, and the main docume... | 37.135258 | 92 | 0.610395 |
84ce543197f01f8d3d94d37d0fd0990de295236a | 5,174 | py | Python | tools/namecoin_dump.py | lavajumper/sexcoin-abe | 531e825a44d0d36efa192425aeb7bcfa7922c968 | [
"MIT"
] | null | null | null | tools/namecoin_dump.py | lavajumper/sexcoin-abe | 531e825a44d0d36efa192425aeb7bcfa7922c968 | [
"MIT"
] | null | null | null | tools/namecoin_dump.py | lavajumper/sexcoin-abe | 531e825a44d0d36efa192425aeb7bcfa7922c968 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Dump the Namecoin name data to standard output.
# Copyright(C) 2011 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# ... | 35.438356 | 79 | 0.597603 |
58d65dc9204cf48a576a592eb9f906a41d16c2a6 | 183 | py | Python | src/v8unpack/MetaDataObject/Catalog.py | fishca/v8unpack-1 | 51e1bb6b57be170f0c19be20649e18abdda04668 | [
"MIT"
] | null | null | null | src/v8unpack/MetaDataObject/Catalog.py | fishca/v8unpack-1 | 51e1bb6b57be170f0c19be20649e18abdda04668 | [
"MIT"
] | null | null | null | src/v8unpack/MetaDataObject/Catalog.py | fishca/v8unpack-1 | 51e1bb6b57be170f0c19be20649e18abdda04668 | [
"MIT"
] | null | null | null | from ..MetaDataObject.core.Container import Container
class Catalog(Container):
pass
@classmethod
def get_decode_header(cls, header):
return header[0][1][9][1]
| 18.3 | 53 | 0.693989 |
ed7f63bac3221447a854c8031353988336511af0 | 1,831 | py | Python | models/experiments/prob_unet.py | gigantenbein/UNet-Zoo | d157c22ef8041ed743aa7bbcf377f0f8ad85e755 | [
"Apache-2.0"
] | 20 | 2020-02-16T07:20:23.000Z | 2022-03-14T04:11:02.000Z | models/experiments/prob_unet.py | suyanzhou626/UNet-Zoo | 76d23952d90a45a01da1cc2926b4d3a24a1adb75 | [
"Apache-2.0"
] | 6 | 2021-06-08T21:03:07.000Z | 2022-03-17T13:28:33.000Z | models/experiments/prob_unet.py | suyanzhou626/UNet-Zoo | 76d23952d90a45a01da1cc2926b4d3a24a1adb75 | [
"Apache-2.0"
] | 5 | 2020-03-20T02:04:49.000Z | 2021-10-20T17:37:52.000Z | import torch
import torch.nn as nn
from models.probabilistic_unet import ProbabilisticUnet
from utils import normalise_image
from data.lidc_data import lidc_data
experiment_name = 'ProbabilisticUnet'
log_dir_name = 'lidc'
data_loader = lidc_data
# number of filter for the latent levels, they will be applied in the o... | 22.604938 | 101 | 0.712725 |
be7f4045f7e83a7b50d0655d5c3d14d51a3a790b | 1,170 | py | Python | tests/storage/cases/test_KT1LGxWyzTTfg5J1tyPhuCLVnQgpUoUp7xoZ_babylon.py | juztin/pytezos-1 | 7e608ff599d934bdcf129e47db43dbdb8fef9027 | [
"MIT"
] | 1 | 2020-08-11T02:31:24.000Z | 2020-08-11T02:31:24.000Z | tests/storage/cases/test_KT1LGxWyzTTfg5J1tyPhuCLVnQgpUoUp7xoZ_babylon.py | juztin/pytezos-1 | 7e608ff599d934bdcf129e47db43dbdb8fef9027 | [
"MIT"
] | 1 | 2020-12-30T16:44:56.000Z | 2020-12-30T16:44:56.000Z | tests/storage/cases/test_KT1LGxWyzTTfg5J1tyPhuCLVnQgpUoUp7xoZ_babylon.py | juztin/pytezos-1 | 7e608ff599d934bdcf129e47db43dbdb8fef9027 | [
"MIT"
] | 1 | 2022-03-20T19:01:00.000Z | 2022-03-20T19:01:00.000Z | from unittest import TestCase
from tests import get_data
from pytezos.michelson.converter import build_schema, decode_micheline, encode_micheline, micheline_to_michelson
class StorageTestKT1LGxWyzTTfg5J1tyPhuCLVnQgpUoUp7xoZ_babylon(TestCase):
@classmethod
def setUpClass(cls):
cls.maxDiff = None
... | 41.785714 | 112 | 0.757265 |
202fce92e1b22ea122d8f880455e939cb002de01 | 1,862 | py | Python | YOLO/build.py | zz00zws/magic_learning | c048d244e9abd38079b5f195e7b2bbfebc616310 | [
"MIT"
] | 1 | 2019-12-02T08:09:54.000Z | 2019-12-02T08:09:54.000Z | YOLO/build.py | zz00zws/magic_learning | c048d244e9abd38079b5f195e7b2bbfebc616310 | [
"MIT"
] | null | null | null | YOLO/build.py | zz00zws/magic_learning | c048d244e9abd38079b5f195e7b2bbfebc616310 | [
"MIT"
] | null | null | null | import torch
import os
import PIL.Image as pimg
import PIL.ImageDraw as draw
path_label='./data/Anno_XML'
path_img='./data/Original'
y=True
#yy={'pedestrian\n','tree\n','car\n','bicycle\n','store\n','building\n','road\n','sky\n','sidewalk\n'}
yy={'pedestrian\n','car\n','bicycle\n'}
dic=dict(zip(yy,range(... | 22.433735 | 103 | 0.436627 |
76c6afe093c0225a3e74afb74cb3e160efc33c3a | 7,463 | py | Python | tests/test_cwe.py | chris-angeli-rft/cloud-custodian | 5ff331b114a591dbaf6d672e30ceefb7ae64a5dd | [
"Apache-2.0"
] | 8 | 2021-05-18T02:22:03.000Z | 2021-09-11T02:49:04.000Z | tests/test_cwe.py | chris-angeli-rft/cloud-custodian | 5ff331b114a591dbaf6d672e30ceefb7ae64a5dd | [
"Apache-2.0"
] | 1 | 2021-04-26T04:38:35.000Z | 2021-04-26T04:38:35.000Z | tests/test_cwe.py | chris-angeli-rft/cloud-custodian | 5ff331b114a591dbaf6d672e30ceefb7ae64a5dd | [
"Apache-2.0"
] | 1 | 2021-11-10T02:28:47.000Z | 2021-11-10T02:28:47.000Z | # Copyright 2016-2017 Capital One Services, 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 ... | 37.883249 | 87 | 0.491491 |
48a0030c6576b5bda33117ff243be7420631e9d9 | 1,747 | py | Python | src/user/urls.py | jhernandez18p/mobyapp | 4add7bd3b3f1e933bbb6941674bf84f4c4462685 | [
"MIT"
] | null | null | null | src/user/urls.py | jhernandez18p/mobyapp | 4add7bd3b3f1e933bbb6941674bf84f4c4462685 | [
"MIT"
] | 7 | 2020-06-05T17:31:06.000Z | 2022-03-11T23:16:34.000Z | src/user/urls.py | jhernandez18p/mobyapp | 4add7bd3b3f1e933bbb6941674bf84f4c4462685 | [
"MIT"
] | null | null | null | from django.contrib.auth import views as auth_views
from django.urls import path, re_path, include
from .views import custom_login,custom_logout,custom_register, \
ActivateAccountView, modal_cookie, error, thanks, newsletter,\
activate, current_user, UserList
app_name = 'auth'
urlpatterns = [
path('modal'... | 39.704545 | 116 | 0.65083 |
33e16283d0f4beef468c99a7827a995d3b37364c | 647 | py | Python | HoldMyPotion/app/migrations/0001_initial.py | holdmypotion/Blog_App | a1ef39293e662534153b83fdd9f486cb87323f7d | [
"MIT"
] | null | null | null | HoldMyPotion/app/migrations/0001_initial.py | holdmypotion/Blog_App | a1ef39293e662534153b83fdd9f486cb87323f7d | [
"MIT"
] | null | null | null | HoldMyPotion/app/migrations/0001_initial.py | holdmypotion/Blog_App | a1ef39293e662534153b83fdd9f486cb87323f7d | [
"MIT"
] | null | null | null | # Generated by Django 3.0.4 on 2020-03-27 19:10
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Article',
fields=[
('id', models.AutoField(... | 25.88 | 114 | 0.553323 |
ed73b3c5f96972b1292cc2a8984f28be5e209422 | 9,788 | py | Python | tensorflow_data_validation/statistics/generators/cross_feature_stats_generator.py | Coulbe/data-validation | a2c5e5dd2cc50cce8a7eab5c7e72a0cb11b74b2c | [
"Apache-2.0"
] | null | null | null | tensorflow_data_validation/statistics/generators/cross_feature_stats_generator.py | Coulbe/data-validation | a2c5e5dd2cc50cce8a7eab5c7e72a0cb11b74b2c | [
"Apache-2.0"
] | null | null | null | tensorflow_data_validation/statistics/generators/cross_feature_stats_generator.py | Coulbe/data-validation | a2c5e5dd2cc50cce8a7eab5c7e72a0cb11b74b2c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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, ... | 41.12605 | 79 | 0.717818 |
81a05cb13625964e54eb84c2cc0b856c8ff086ef | 1,037 | py | Python | count_tags.py | SURJBayArea/everyaction-tools | e50ad188dffcf8ff4b4a9de209f102c7fbd89488 | [
"Apache-2.0"
] | null | null | null | count_tags.py | SURJBayArea/everyaction-tools | e50ad188dffcf8ff4b4a9de209f102c7fbd89488 | [
"Apache-2.0"
] | null | null | null | count_tags.py | SURJBayArea/everyaction-tools | e50ad188dffcf8ff4b4a9de209f102c7fbd89488 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Returns count of csv records wih Action Network tags
Looks for column `can2_user_tags`
email,can2_user_tags
some.one@example.com,"#Trump, ?Direct Action, ?Organizing, Phone_Bank"
Assume tags separated by ", " which misses some tags with embedded "," like
"[Alpine] Donors from 7.18.19 - 10.1.... | 26.589744 | 75 | 0.637416 |
3d1d9d4ef9360848ace76ab4f4e1b94565a92f00 | 5,010 | py | Python | hsdbi/base.py | timniven/hsdbi | a3974972a728f631f9cbced1cf8d88e9ccc37c47 | [
"MIT"
] | null | null | null | hsdbi/base.py | timniven/hsdbi | a3974972a728f631f9cbced1cf8d88e9ccc37c47 | [
"MIT"
] | null | null | null | hsdbi/base.py | timniven/hsdbi | a3974972a728f631f9cbced1cf8d88e9ccc37c47 | [
"MIT"
] | null | null | null | """Base classes."""
class RepositoryFacade:
"""Abstract base class for a Repository Facade.
From the Wikipedia entry on "Facade pattern":
'A facade is an object that provides a simplified interface to a
larger body of code...'
https://en.wikipedia.org/wiki/Facade_pattern
In this case, w... | 32.532468 | 80 | 0.654491 |
383ec3dcd0a4834a3f259dc1042d4aad60a145e4 | 525 | py | Python | olamundo.py/exercicios/ex011.py | gabrielviticov/exercicios-python | 4068cb0029513f8ab8bd12fa3a9055f37b4040d4 | [
"MIT"
] | null | null | null | olamundo.py/exercicios/ex011.py | gabrielviticov/exercicios-python | 4068cb0029513f8ab8bd12fa3a9055f37b4040d4 | [
"MIT"
] | null | null | null | olamundo.py/exercicios/ex011.py | gabrielviticov/exercicios-python | 4068cb0029513f8ab8bd12fa3a9055f37b4040d4 | [
"MIT"
] | null | null | null | #Faça um programa que leia a largura e a altura de uma parede em metros, calcule a sua área e a quantidade de tinta
# necessária para pintá-la, sabendo que cada litro de tinta pinta uma área de 2 metros quadrados.
largura = float(input('Informe a largura da parede: '))
altura = float(input('Informe a altura da parede:... | 52.5 | 157 | 0.731429 |
11a19d9ede3e9306325e98e9f8fcdeb20a0e8362 | 10,657 | py | Python | starks/fft.py | computablelabs/starks | f8e45d56c3934a1cf24220b58e073434379e3d78 | [
"MIT"
] | 9 | 2018-11-30T18:53:54.000Z | 2021-11-15T20:59:08.000Z | starks/fft.py | computablelabs/starks | f8e45d56c3934a1cf24220b58e073434379e3d78 | [
"MIT"
] | 13 | 2018-11-30T00:13:49.000Z | 2019-04-04T20:14:29.000Z | starks/fft.py | computablelabs/starks | f8e45d56c3934a1cf24220b58e073434379e3d78 | [
"MIT"
] | 1 | 2020-05-14T20:35:48.000Z | 2020-05-14T20:35:48.000Z | from typing import List
from starks.numbertype import Field
from starks.numbertype import FieldElement
from starks.numbertype import Vector
from starks.numbertype import Poly
from starks.polynomial import polynomials_over
from starks.modp import IntegersModP
def int_to_bin_string(i):
if i == 0:
return "0"
... | 30.800578 | 135 | 0.595477 |
8144bcbaa5d9ec05a1eca37e5375d74eecb29936 | 1,327 | py | Python | tests/v2/test_incident_team_included_items.py | MichaelTROEHLER/datadog-api-client-python | 12c46626622fb1277bb1e172753b342c671348bd | [
"Apache-2.0"
] | null | null | null | tests/v2/test_incident_team_included_items.py | MichaelTROEHLER/datadog-api-client-python | 12c46626622fb1277bb1e172753b342c671348bd | [
"Apache-2.0"
] | null | null | null | tests/v2/test_incident_team_included_items.py | MichaelTROEHLER/datadog-api-client-python | 12c46626622fb1277bb1e172753b342c671348bd | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
import sys
import unittest
import datadog_api_client.v2
from datadog... | 32.365854 | 108 | 0.77694 |
a5df9e610a08c8f9293fd65b60d8f55b6b542052 | 10,671 | py | Python | tests/core/test_cost_calculation.py | STATION-I/staicoin-blockchain | b8686c75dd5fe7883115d9613858c9c8cadfc4a7 | [
"Apache-2.0"
] | 10 | 2021-10-02T18:33:56.000Z | 2021-11-14T17:10:48.000Z | tests/core/test_cost_calculation.py | STATION-I/staicoin-blockchain | b8686c75dd5fe7883115d9613858c9c8cadfc4a7 | [
"Apache-2.0"
] | 14 | 2021-10-07T22:10:15.000Z | 2021-12-21T09:13:49.000Z | tests/core/test_cost_calculation.py | STATION-I/staicoin-blockchain | b8686c75dd5fe7883115d9613858c9c8cadfc4a7 | [
"Apache-2.0"
] | 6 | 2021-10-29T19:36:59.000Z | 2021-12-19T19:52:57.000Z | import logging
import pathlib
import time
import pytest
from clvm_tools import binutils
from stai.consensus.condition_costs import ConditionCost
from stai.consensus.cost_calculator import NPCResult
from stai.full_node.bundle_tools import simple_solution_generator
from stai.full_node.mempool_check_conditions import ge... | 38.945255 | 120 | 0.664324 |
d5a95cefe97edd354bdc78b420e18d3da3088cc8 | 399 | py | Python | goodpoop/api/tests/factories.py | camilamaia/good-poop-api | 4c1e4ed460387322b14ddd766c1de48d678c9186 | [
"MIT"
] | 1 | 2019-03-06T14:31:55.000Z | 2019-03-06T14:31:55.000Z | goodpoop/api/tests/factories.py | camilamaia/good-poop-api | 4c1e4ed460387322b14ddd766c1de48d678c9186 | [
"MIT"
] | 3 | 2019-02-04T12:43:54.000Z | 2019-02-11T16:35:11.000Z | goodpoop/api/tests/factories.py | camilamaia/good-poop-api | 4c1e4ed460387322b14ddd766c1de48d678c9186 | [
"MIT"
] | null | null | null | import factory
from goodpoop.api import models
class AccountFactory(factory.Factory):
class Meta:
model = models.Account
class RestroomFactory(factory.Factory):
class Meta:
model = models.Restroom
class CheckInFactory(factory.Factory):
class Meta:
model = models.CheckIn
class... | 17.347826 | 39 | 0.701754 |
6c42fbe20c0a2c51fbfa10087875675009c01310 | 10,377 | py | Python | pymatgen/analysis/defects/generators.py | tamuhey/pymatgen | cf1793f0af59844ea9222d973212e3ab83e58209 | [
"MIT"
] | 1 | 2018-10-10T02:37:10.000Z | 2018-10-10T02:37:10.000Z | pymatgen/analysis/defects/generators.py | tamuhey/pymatgen | cf1793f0af59844ea9222d973212e3ab83e58209 | [
"MIT"
] | null | null | null | pymatgen/analysis/defects/generators.py | tamuhey/pymatgen | cf1793f0af59844ea9222d973212e3ab83e58209 | [
"MIT"
] | 2 | 2020-04-30T14:19:12.000Z | 2021-07-30T08:24:48.000Z | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
import six
import logging
from abc import ABCMeta, abstractmethod
from monty.json import MSONable
from pymatgen.core import PeriodicSite
from pymatgen.analys... | 35.782759 | 114 | 0.655103 |
dcd008107f4e6509d56300050afd9fa647319664 | 3,067 | py | Python | dtc/message_types/position_update.py | jseparovic/python-ws-dtc-client | fd3952cdaf7ab8c9d5a26ccf53b5e9acb3a9ea0f | [
"Apache-2.0"
] | 15 | 2020-04-26T05:25:53.000Z | 2022-02-11T19:38:42.000Z | dtc/message_types/position_update.py | jseparovic/python-ws-dtc-client | fd3952cdaf7ab8c9d5a26ccf53b5e9acb3a9ea0f | [
"Apache-2.0"
] | 2 | 2021-01-08T19:58:08.000Z | 2021-11-29T06:08:48.000Z | dtc/message_types/position_update.py | jseparovic/python-ws-dtc-client | fd3952cdaf7ab8c9d5a26ccf53b5e9acb3a9ea0f | [
"Apache-2.0"
] | 4 | 2020-11-23T13:38:01.000Z | 2021-12-27T13:21:06.000Z |
from dtc.enums.message_types import MessageTypes
from lib.base_message_type import BaseMessageType
class PositionUpdate(BaseMessageType):
def __init__(self,
request_id=None,
total_number_messages=None,
message_number=None,
symbol=None,
... | 36.951807 | 74 | 0.61852 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.