hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7945cc3e4f19d33f11a3deee9cf47e0ab17f6c2f | 7,862 | py | Python | baseline.py | renll/MonoDemand | e3e5b8ffa4db53fc7203579eed68ca6b620bc508 | [
"Apache-2.0"
] | null | null | null | baseline.py | renll/MonoDemand | e3e5b8ffa4db53fc7203579eed68ca6b620bc508 | [
"Apache-2.0"
] | null | null | null | baseline.py | renll/MonoDemand | e3e5b8ffa4db53fc7203579eed68ca6b620bc508 | [
"Apache-2.0"
] | null | null | null | # import some libraries
import numpy as np
import pandas as pd
import statsmodels.api as sm
import random
from scipy.stats import t, f
import matplotlib.pyplot as plt
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torch.utils.data as data
from sklearn import metr... | 25.69281 | 113 | 0.641313 |
7945cc9d79842654f374503cc3b7cc3645e24008 | 6,915 | py | Python | main.py | IsharMhzn/Asuma | d92d427caec378f9c9e5ecea0ee07f2a1b31fae7 | [
"MIT"
] | null | null | null | main.py | IsharMhzn/Asuma | d92d427caec378f9c9e5ecea0ee07f2a1b31fae7 | [
"MIT"
] | null | null | null | main.py | IsharMhzn/Asuma | d92d427caec378f9c9e5ecea0ee07f2a1b31fae7 | [
"MIT"
] | null | null | null | import discord
import requests
import json
from itertools import cycle
from PIL import Image, ImageDraw
from io import BytesIO
from utils.languages import LANGUAGES
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
from dotenv import load_dotenv
load_dotenv()
import os
from google_tran... | 36.587302 | 131 | 0.698337 |
7945cdebf21aa607c17c132051496bfb37aab736 | 211 | py | Python | portfolio/views.py | 31-13/portfolio | 86d69abc05ead28823db5def49622f04af0ebfd2 | [
"MIT"
] | null | null | null | portfolio/views.py | 31-13/portfolio | 86d69abc05ead28823db5def49622f04af0ebfd2 | [
"MIT"
] | null | null | null | portfolio/views.py | 31-13/portfolio | 86d69abc05ead28823db5def49622f04af0ebfd2 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from .models import Project
# Create your views here.
def home(request):
projects = Project.objects.all()
return render(request, 'home.html', {"project": projects})
| 23.444444 | 62 | 0.729858 |
7945cea94ec6d8b133b943dd1496efdc86bd6cc1 | 1,092 | py | Python | src/poo_functions/dictionaries_functions.py | alfmorais/poo-python | 78d09ee6fe9595b445c152f270c9dcf6f3e1d242 | [
"MIT"
] | null | null | null | src/poo_functions/dictionaries_functions.py | alfmorais/poo-python | 78d09ee6fe9595b445c152f270c9dcf6f3e1d242 | [
"MIT"
] | null | null | null | src/poo_functions/dictionaries_functions.py | alfmorais/poo-python | 78d09ee6fe9595b445c152f270c9dcf6f3e1d242 | [
"MIT"
] | null | null | null | questions = {
'question1': {
'question': 'How much are 4 + 2?',
'answers': {
'a': 6,
'b': 2,
'c': 5,
},
'correct_answear': 'a',
},
'question2': {
'question': 'How much are 4 + 4?',
'answers': {
'a': 6,
... | 21.84 | 47 | 0.411172 |
7945cfdfb4426b5cb66fd37848aaf29166cdbb31 | 18,128 | py | Python | ns1/__init__.py | fakela/ns1-python | 1e4e125b574f7dec4fd5dfcefaf8f8a5c767e945 | [
"MIT"
] | null | null | null | ns1/__init__.py | fakela/ns1-python | 1e4e125b574f7dec4fd5dfcefaf8f8a5c767e945 | [
"MIT"
] | null | null | null | ns1/__init__.py | fakela/ns1-python | 1e4e125b574f7dec4fd5dfcefaf8f8a5c767e945 | [
"MIT"
] | null | null | null | #
# Copyright (c) 2014 NSONE, Inc.
#
# License under The MIT License (MIT). See LICENSE in project root.
#
from .config import Config
version = "0.16.0"
class NS1:
def __init__(self, apiKey=None, config=None, configFile=None, keyID=None):
"""
Create a new top level NS1 API object
:param ... | 30.013245 | 212 | 0.613967 |
7945d01679f8c513592fc61060f3c11ffe79160c | 4,051 | py | Python | cardinal_pythonlib/django/fields/restrictedcontentfile.py | RudolfCardinal/pythonlib | 4c583ad1aae3c1166a4e6f964df87eb6c02a73cb | [
"Apache-2.0"
] | 10 | 2015-09-30T02:46:48.000Z | 2021-07-23T05:03:38.000Z | cardinal_pythonlib/django/fields/restrictedcontentfile.py | RudolfCardinal/pythonlib | 4c583ad1aae3c1166a4e6f964df87eb6c02a73cb | [
"Apache-2.0"
] | 9 | 2019-07-04T11:10:31.000Z | 2021-09-23T21:11:42.000Z | cardinal_pythonlib/django/fields/restrictedcontentfile.py | RudolfCardinal/pythonlib | 4c583ad1aae3c1166a4e6f964df87eb6c02a73cb | [
"Apache-2.0"
] | 4 | 2017-07-17T15:17:44.000Z | 2021-07-23T05:03:41.000Z | #!/usr/bin/env python
# cardinal_pythonlib/django/fields/restrictedcontentfile.py
"""
===============================================================================
Original code copyright (C) 2009-2021 Rudolf Cardinal (rudolf@pobox.com).
This file is part of cardinal_pythonlib.
Licensed under the Apac... | 36.827273 | 79 | 0.61565 |
7945d16591585efe07166c8e50d83b5b7a38af8e | 6,439 | py | Python | sdk/python/pulumi_azure_nextgen/storage/v20200801preview/blob_inventory_policy.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/storage/v20200801preview/blob_inventory_policy.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/storage/v20200801preview/blob_inventory_policy.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # 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
from ... import _utilities, _tables
from... | 45.666667 | 340 | 0.667029 |
7945d1bb47f980e768d1bd4f608e23b6ad11083d | 3,825 | py | Python | tests/unit/bokeh/util/test_deprecation.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | null | null | null | tests/unit/bokeh/util/test_deprecation.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | null | null | null | tests/unit/bokeh/util/test_deprecation.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | 39.43299 | 145 | 0.453595 |
7945d1cc948b8443d7f83370af19cd433c20e528 | 8,740 | py | Python | static/python/app.py | louis-threedots/louis-threedots.github.io | 89450f5ace80ff380795a80aed4461d06b02ff1a | [
"MIT"
] | 1 | 2020-04-11T16:26:12.000Z | 2020-04-11T16:26:12.000Z | static/python/app.py | louis-threedots/louis-threedots.github.io | 89450f5ace80ff380795a80aed4461d06b02ff1a | [
"MIT"
] | 12 | 2020-03-26T16:03:16.000Z | 2020-04-09T13:14:38.000Z | static/python/app.py | louis-threedots/website | 89450f5ace80ff380795a80aed4461d06b02ff1a | [
"MIT"
] | null | null | null |
from abc import ABC, abstractmethod
class App(ABC):
def __init__(self, name):
self.name = name
self.instruction = "Welcome to " + self.name + ". This application does not have instructions yet."
self.settings = self.load_settings()
@abstractmethod
def on_start(self):
# A... | 40.091743 | 127 | 0.569336 |
7945d2387f7989053c137241c942e633d1d8a5e7 | 180 | py | Python | doltcli/misc_mixin.py | sidphbot/doltcli | 059a7c6dd31f036771b3ce94cd5f064696d64229 | [
"Apache-2.0"
] | 6 | 2021-03-23T20:58:23.000Z | 2022-03-31T22:07:11.000Z | doltcli/misc_mixin.py | sidphbot/doltcli | 059a7c6dd31f036771b3ce94cd5f064696d64229 | [
"Apache-2.0"
] | 22 | 2021-03-10T21:06:22.000Z | 2021-11-06T20:07:12.000Z | doltcli/misc_mixin.py | sidphbot/doltcli | 059a7c6dd31f036771b3ce94cd5f064696d64229 | [
"Apache-2.0"
] | 6 | 2021-06-14T19:07:39.000Z | 2021-11-05T18:50:59.000Z | class MiscMixin:
def read_tables(self):
pass
def gc(self):
pass
def filter_branch(self):
pass
def verify_constraints(self):
pass
| 13.846154 | 33 | 0.566667 |
7945d339ce34bec163617da0f742c3a877a5d1ec | 1,878 | py | Python | game/gamesrc/objects/world/combat.py | GhostshipSoftware/avaloria | 3dbbc281c8746afdcc094d87a4fdd414fd240e77 | [
"BSD-3-Clause"
] | null | null | null | game/gamesrc/objects/world/combat.py | GhostshipSoftware/avaloria | 3dbbc281c8746afdcc094d87a4fdd414fd240e77 | [
"BSD-3-Clause"
] | null | null | null | game/gamesrc/objects/world/combat.py | GhostshipSoftware/avaloria | 3dbbc281c8746afdcc094d87a4fdd414fd240e77 | [
"BSD-3-Clause"
] | null | null | null | from ev import Object
class CombatManager(Object):
"""
Main Combat management object.
"""
def at_object_creation(self):
self.db.pc_combatant = None
self.db.npc_combatant = None
self.db.round = 0
def do_round(self):
pc_initiative = self.db.pc_combatant.get_initiativ... | 36.823529 | 91 | 0.563898 |
7945d3a7f413c6f544ef811edb267a29d60deefc | 100 | py | Python | src/test.py | yangzoudreamer/toolkit_test_gpu | 767debb3cd168f6cb33c9a2cf0b896268f85c586 | [
"MIT"
] | null | null | null | src/test.py | yangzoudreamer/toolkit_test_gpu | 767debb3cd168f6cb33c9a2cf0b896268f85c586 | [
"MIT"
] | null | null | null | src/test.py | yangzoudreamer/toolkit_test_gpu | 767debb3cd168f6cb33c9a2cf0b896268f85c586 | [
"MIT"
] | null | null | null | import os
import torch
#os.environ["CUDA_VISIBLE_DEVICES"] = "11"
print(torch.cuda.is_available())
| 16.666667 | 42 | 0.76 |
7945d8dba3915a3b65a739fe4a26a09364405230 | 61,381 | py | Python | caffe2onnx/src/caffe2onnx.py | vsrad/caffe2onnx | 96576bd9340a89f64e14d52fe11244065a708db1 | [
"BSD-3-Clause"
] | null | null | null | caffe2onnx/src/caffe2onnx.py | vsrad/caffe2onnx | 96576bd9340a89f64e14d52fe11244065a708db1 | [
"BSD-3-Clause"
] | null | null | null | caffe2onnx/src/caffe2onnx.py | vsrad/caffe2onnx | 96576bd9340a89f64e14d52fe11244065a708db1 | [
"BSD-3-Clause"
] | null | null | null | import caffe2onnx.src.OPs as op
from caffe2onnx.src.c2oObject import *
from onnx import helper
import copy
import numpy as np
from caffe2onnx.src.op_layer_info import *
import random
import sys
from typing import *
import onnx
class Caffe2Onnx():
def __init__(self, net, model, onnxname):
# Initialize a c2o... | 54.03257 | 184 | 0.541894 |
7945da5be91ec74a20a9997567aaed456f6afe5b | 2,451 | py | Python | build-support/kudu_util.py | ZeweiChen11/kudu | d97316e70b99a155f5677a8c29545b2b65f40a01 | [
"Apache-2.0"
] | 2 | 2016-09-12T06:53:49.000Z | 2016-09-12T15:47:46.000Z | build-support/kudu_util.py | ZeweiChen11/kudu | d97316e70b99a155f5677a8c29545b2b65f40a01 | [
"Apache-2.0"
] | null | null | null | build-support/kudu_util.py | ZeweiChen11/kudu | d97316e70b99a155f5677a8c29545b2b65f40a01 | [
"Apache-2.0"
] | 2 | 2018-04-03T05:49:03.000Z | 2020-05-29T21:18:46.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
# "... | 29.53012 | 74 | 0.689514 |
7945da85c627e3e5a7b194d397143c5c0f23eb54 | 6,269 | py | Python | sacred/host_info.py | j3soon-pr/sacred | 106731d9e08bb33ca7b33329fa8fa38a7c398f74 | [
"MIT"
] | 1 | 2022-03-28T14:21:07.000Z | 2022-03-28T14:21:07.000Z | sacred/host_info.py | sthagen/IDSIA-sacred | 98a2d08dc8ac9b6330f81de555635b03a33749a1 | [
"MIT"
] | null | null | null | sacred/host_info.py | sthagen/IDSIA-sacred | 98a2d08dc8ac9b6330f81de555635b03a33749a1 | [
"MIT"
] | null | null | null | """Helps to collect information about the host of an experiment."""
import os
import platform
import re
import subprocess
from xml.etree import ElementTree
import warnings
from typing import List
import cpuinfo
from sacred.utils import optional_kwargs_decorator
from sacred.settings import SETTINGS
__all__ = ("host_... | 29.7109 | 88 | 0.661349 |
7945dbd77d1e541b5336bc8290cf833921c0b9b7 | 2,780 | py | Python | bdlb/core/registered.py | uai-paper-839/bdlb | 0530f4cd90c868de7edaeb26b34c4f9a64165650 | [
"Apache-2.0"
] | 1 | 2020-07-15T22:21:52.000Z | 2020-07-15T22:21:52.000Z | bdlb/core/registered.py | uai-paper-839/bdlb | 0530f4cd90c868de7edaeb26b34c4f9a64165650 | [
"Apache-2.0"
] | 4 | 2020-09-25T19:06:35.000Z | 2021-11-10T19:40:34.000Z | bdlb/core/registered.py | icml-paper-2959/bdlb | de746d1911d6f8373435856a551a17773d6f25f7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 BDL Benchmarks Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 36.578947 | 92 | 0.718705 |
7945dc29e0b5b7cb7f15abc847956f6eb56adb3c | 3,042 | py | Python | api/microsoft/tests/test_views.py | suricats/surirobot-api-emotions | 1036f8d9470da016bf8b8d75211382a67116d0a0 | [
"MIT"
] | null | null | null | api/microsoft/tests/test_views.py | suricats/surirobot-api-emotions | 1036f8d9470da016bf8b8d75211382a67116d0a0 | [
"MIT"
] | null | null | null | api/microsoft/tests/test_views.py | suricats/surirobot-api-emotions | 1036f8d9470da016bf8b8d75211382a67116d0a0 | [
"MIT"
] | null | null | null | import json
from unittest.mock import patch
from flask import url_for
from api.exceptions import BadHeaderException, MissingHeaderException, UnknownAPIException, OperationFailedException
from api.microsoft.constants import SUPPORTED_FORMATS
@patch('api.microsoft.views.microsoft_analyse_picture', autospec=True)
def t... | 36.650602 | 116 | 0.753123 |
7945dd047c72d0ffabe57060c631e49310130159 | 7,900 | py | Python | run_xgboost.py | tan1889/gce | 92ad1e6f35c6a3f2df4403b0d3c40af4a66a3133 | [
"MIT"
] | 1 | 2020-10-30T02:39:27.000Z | 2020-10-30T02:39:27.000Z | run_xgboost.py | tan1889/gce | 92ad1e6f35c6a3f2df4403b0d3c40af4a66a3133 | [
"MIT"
] | null | null | null | run_xgboost.py | tan1889/gce | 92ad1e6f35c6a3f2df4403b0d3c40af4a66a3133 | [
"MIT"
] | null | null | null | import argparse
from launcher import launch
parser = argparse.ArgumentParser(description='XGBOOST ALGORITHM LAUNCHER')
parser.add_argument('--desc', type=str, default='', metavar='D',
help='Experiment description, prefix of the output filename, good for grouping output files.')
# Dataset params
p... | 77.45098 | 119 | 0.617848 |
7945dd429d585b412fd1f581a4b587a9c9d7b60f | 1,145 | py | Python | LeetCode/0014_longest_common_prefix.py | adityaarakeri/PythonAlgorithms | 4a042abaf1b501cdc4aed46ef5b57d58dadb5625 | [
"MIT"
] | null | null | null | LeetCode/0014_longest_common_prefix.py | adityaarakeri/PythonAlgorithms | 4a042abaf1b501cdc4aed46ef5b57d58dadb5625 | [
"MIT"
] | null | null | null | LeetCode/0014_longest_common_prefix.py | adityaarakeri/PythonAlgorithms | 4a042abaf1b501cdc4aed46ef5b57d58dadb5625 | [
"MIT"
] | null | null | null | class Solution(object):
def bruteforce(self, strs):
"""
:type strs: List[str]
:rtype: str
"""
result = ''
if len(strs) == 0:
return ''
i = 0
d = {i: len(v) for i,v in enumerate(strs)}
count = min(d.values())
for i i... | 24.891304 | 56 | 0.494323 |
7945dd4a53885d5823e272681e258dc114c53dbb | 9,261 | py | Python | ResourceBundle/BundleTypes/RawResourceBundle.py | felix-zenk/ResourceBundle | 2ffe464d572b38fe286636c4431d40f2505a9a5a | [
"MIT"
] | null | null | null | ResourceBundle/BundleTypes/RawResourceBundle.py | felix-zenk/ResourceBundle | 2ffe464d572b38fe286636c4431d40f2505a9a5a | [
"MIT"
] | null | null | null | ResourceBundle/BundleTypes/RawResourceBundle.py | felix-zenk/ResourceBundle | 2ffe464d572b38fe286636c4431d40f2505a9a5a | [
"MIT"
] | null | null | null | import re
from typing import List, Type
from os.path import exists, isfile, join
from ..util.Locale import Locale, ROOT_LOCALE, from_iso
from ..exceptions import NotInResourceBundleError, MissingResourceBundleError
_STANDARD_FILE_EXTENSION = "properties"
class RawResourceBundle:
_cached_bundles = {}
def _... | 34.047794 | 121 | 0.610733 |
7945dd5732afaef444d5e686503c7c24760a6ea4 | 14,795 | py | Python | test/functional/wallet_address_types.py | derek-mckinney/GrumpyCat | 4f3a54396e55f4bd8b94ec0b59756bceb335d457 | [
"MIT"
] | 431 | 2015-01-21T03:57:18.000Z | 2022-03-30T17:17:18.000Z | test/functional/wallet_address_types.py | derek-mckinney/GrumpyCat | 4f3a54396e55f4bd8b94ec0b59756bceb335d457 | [
"MIT"
] | 140 | 2015-02-04T07:15:14.000Z | 2022-02-07T03:37:28.000Z | test/functional/wallet_address_types.py | derek-mckinney/GrumpyCat | 4f3a54396e55f4bd8b94ec0b59756bceb335d457 | [
"MIT"
] | 249 | 2015-01-03T19:48:55.000Z | 2022-02-23T09:46:33.000Z | #!/usr/bin/env python3
# Copyright (c) 2009-2019 The Bitcoin Core developers
# Copyright (c) 2014-2019 The DigiByte Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test that the wallet can send and receive using ... | 48.990066 | 205 | 0.650828 |
7945ddcaab22afb78c8892bd6329049c3c7b8769 | 1,422 | py | Python | webots/controllers/lib/shared/arguments.py | dan-haessler/dezibot | 18ce64fef4314e3aa426e903de7750bf5f71a6b1 | [
"MIT"
] | null | null | null | webots/controllers/lib/shared/arguments.py | dan-haessler/dezibot | 18ce64fef4314e3aa426e903de7750bf5f71a6b1 | [
"MIT"
] | null | null | null | webots/controllers/lib/shared/arguments.py | dan-haessler/dezibot | 18ce64fef4314e3aa426e903de7750bf5f71a6b1 | [
"MIT"
] | null | null | null | from enum import Enum, IntEnum
import enum
from os import times
import os
from typing import List, Tuple
IDENTIFIER = "-"
class ArgType(IntEnum):
Float = 0
Floats = 1
Integer = 2
Integers = 3
String = 4
Strings = 5
def parseArgs(self, arguments):
if self == ArgType.Float:
return float(argumen... | 24.517241 | 62 | 0.618847 |
7945dec96f958f705736a99fd3bd3d69bdfc28bf | 1,323 | py | Python | onnx/backend/test/case/node/sum.py | rajeevsrao/onnx | 355a4954ea4e5836a5e943589509951c44feb6b4 | [
"MIT"
] | 4,071 | 2018-12-13T04:17:38.000Z | 2022-03-30T03:29:35.000Z | blaze/thirdparty/onnx/onnx-1.2.2/onnx/backend/test/case/node/sum.py | laozhuang727/x-deeplearning | 781545783a4e2bbbda48fc64318fb2c6d8bbb3cc | [
"Apache-2.0"
] | 359 | 2018-12-21T01:14:57.000Z | 2022-02-15T07:18:02.000Z | blaze/thirdparty/onnx/onnx-1.2.2/onnx/backend/test/case/node/sum.py | laozhuang727/x-deeplearning | 781545783a4e2bbbda48fc64318fb2c6d8bbb3cc | [
"Apache-2.0"
] | 1,054 | 2018-12-20T09:57:42.000Z | 2022-03-29T07:16:53.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import numpy as np # type: ignore
import onnx
from ..base import Base
from . import expect
class Sum(Base):
@staticmethod
def export(): # type: () -> None
... | 29.4 | 71 | 0.566893 |
7945df3859285a8462723c5f49c9767d87ede7a4 | 2,928 | py | Python | tests/test_core_functions.py | ellert/jupyter-packaging | b0304d0c07e06f6f7933300e6c841ac006b89e91 | [
"BSD-3-Clause"
] | 59 | 2017-03-23T14:46:02.000Z | 2022-03-27T10:56:18.000Z | tests/test_core_functions.py | ellert/jupyter-packaging | b0304d0c07e06f6f7933300e6c841ac006b89e91 | [
"BSD-3-Clause"
] | 81 | 2017-03-08T01:18:17.000Z | 2022-03-27T20:10:46.000Z | tests/test_core_functions.py | ellert/jupyter-packaging | b0304d0c07e06f6f7933300e6c841ac006b89e91 | [
"BSD-3-Clause"
] | 47 | 2017-03-08T03:21:48.000Z | 2022-03-25T09:50:58.000Z | import os
from unittest.mock import patch, call
import pytest
from setuptools.dist import Distribution
from jupyter_packaging.setupbase import npm_builder, wrap_installers
def test_wrap_installers():
called = False
def func():
nonlocal called
called = True
cmd_class = wrap_installers(pr... | 31.148936 | 73 | 0.692281 |
7945e01ab3fe78dc0636bad19388b72c36e0e9a0 | 449 | py | Python | themebase/hooking/post_build_hook.py | pyrustic/themebase | ab21b961b4d97739a9ed09c2d6377e00a7e3cbe2 | [
"MIT"
] | null | null | null | themebase/hooking/post_build_hook.py | pyrustic/themebase | ab21b961b4d97739a9ed09c2d6377e00a7e3cbe2 | [
"MIT"
] | null | null | null | themebase/hooking/post_build_hook.py | pyrustic/themebase | ab21b961b4d97739a9ed09c2d6377e00a7e3cbe2 | [
"MIT"
] | null | null | null | # post_build_hook.py generated by Pyrustic Manager
import sys
def get_data():
"""
Return None or a dict with the keys:
'script', 'target', 'app_pkg' and 'version'
"""
items = ("script", "target", "app_pkg", "version")
data = None
if len(sys.argv) == len(items):
data = {item: sy... | 19.521739 | 66 | 0.592428 |
7945e0e879ec4420b1dae89dcce525a84a0f3b9b | 244 | py | Python | src/models/subject.py | EOEPCA/um-pdp-engine | 482e6cbe29ef4188eb28c534af9d0a0a3af3004a | [
"Apache-2.0"
] | null | null | null | src/models/subject.py | EOEPCA/um-pdp-engine | 482e6cbe29ef4188eb28c534af9d0a0a3af3004a | [
"Apache-2.0"
] | null | null | null | src/models/subject.py | EOEPCA/um-pdp-engine | 482e6cbe29ef4188eb28c534af9d0a0a3af3004a | [
"Apache-2.0"
] | null | null | null | from models.attribute import Attribute
class Subject(Attribute):
def add_attribute(self, attribute_id, value, issuer, data_type, include_in_result):
super().add_attribute(attribute_id, value, issuer, data_type, include_in_result)
| 34.857143 | 88 | 0.782787 |
7945e13397cbe67e5c1aaf7987180c3073559bd8 | 14,605 | py | Python | openapi-python-client/openapi_client/api/metrics_api.py | yanavasileva/camunda-bpm-examples | 051f8f28c62845e68ce4059ab64264c5a0bdc009 | [
"Apache-2.0"
] | null | null | null | openapi-python-client/openapi_client/api/metrics_api.py | yanavasileva/camunda-bpm-examples | 051f8f28c62845e68ce4059ab64264c5a0bdc009 | [
"Apache-2.0"
] | null | null | null | openapi-python-client/openapi_client/api/metrics_api.py | yanavasileva/camunda-bpm-examples | 051f8f28c62845e68ce4059ab64264c5a0bdc009 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Camunda BPM REST API
OpenApi Spec for Camunda BPM REST API. # noqa: E501
The version of the OpenAPI document: 7.13.0
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library
i... | 47.57329 | 267 | 0.619582 |
7945e193daf64fe04fb34389cc8bb9a5a6c7034f | 215 | py | Python | frappe/geo/doctype/currency/test_currency.py | chentaoz/frappe | ee3c4943bf6177ad3b410cdb0d802af486751a65 | [
"MIT"
] | 5 | 2017-09-12T15:56:31.000Z | 2022-03-09T13:50:21.000Z | frappe/geo/doctype/currency/test_currency.py | chentaoz/frappe | ee3c4943bf6177ad3b410cdb0d802af486751a65 | [
"MIT"
] | 212 | 2017-08-16T13:03:18.000Z | 2020-10-06T12:26:21.000Z | frappe/geo/doctype/currency/test_currency.py | chentaoz/frappe | ee3c4943bf6177ad3b410cdb0d802af486751a65 | [
"MIT"
] | 14 | 2020-11-04T11:22:44.000Z | 2022-02-01T20:59:37.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: See license.txt
# pre loaded
from __future__ import unicode_literals
import frappe
test_records = frappe.get_test_records('Currency') | 26.875 | 68 | 0.8 |
7945e3581429581ee9b7615d5aa3fbf559fc1f69 | 5,714 | py | Python | PyEMD/tests/test_checks.py | oshin94/PyEMD | 5859f5ea7e435ffc6e5130e5a1df9cd71784a75d | [
"Apache-2.0"
] | 1 | 2022-03-27T01:37:57.000Z | 2022-03-27T01:37:57.000Z | PyEMD/tests/test_checks.py | oshin94/PyEMD | 5859f5ea7e435ffc6e5130e5a1df9cd71784a75d | [
"Apache-2.0"
] | null | null | null | PyEMD/tests/test_checks.py | oshin94/PyEMD | 5859f5ea7e435ffc6e5130e5a1df9cd71784a75d | [
"Apache-2.0"
] | null | null | null | """Tests for checks.py."""
import unittest
import numpy as np
from PyEMD.checks import energy, mean_period, significance_aposteriori, significance_apriori, whitenoise_check
class TestCase(unittest.TestCase):
"""Test cases."""
def test_mean_period(self):
"""Test to check if mean period output is cor... | 45.349206 | 110 | 0.636682 |
7945e706ae2dfaa6f77c582567cac81882d0e118 | 2,633 | py | Python | src/markets/tests/fixtures.py | thibault/cryptobalancer | de1db0006514c6b62ec7f1a28b170b97b03d6e65 | [
"MIT"
] | null | null | null | src/markets/tests/fixtures.py | thibault/cryptobalancer | de1db0006514c6b62ec7f1a28b170b97b03d6e65 | [
"MIT"
] | 6 | 2020-06-05T16:52:05.000Z | 2021-09-07T23:48:07.000Z | src/markets/tests/fixtures.py | thibault/cryptobalancer | de1db0006514c6b62ec7f1a28b170b97b03d6e65 | [
"MIT"
] | null | null | null | API_DATA = [
{
"id": "bitcoin",
"name": "Bitcoin",
"symbol": "BTC",
"rank": "1",
"price_usd": "7633.31",
"price_btc": "1.0",
"24h_volume_usd": "4732320000.0",
"market_cap_usd": "129200069231",
"available_supply": "16925825.0",
"total_su... | 31.722892 | 44 | 0.51918 |
7945e758e30cfdf868b3da39df741cf25dcd912b | 15,535 | py | Python | fakenet/listeners/FTPListener.py | evil-e/flare-fakenet-ng | de6e00e21eb0dbe37ce741caba4116b809a17487 | [
"Apache-2.0"
] | 1,360 | 2016-06-27T20:54:26.000Z | 2021-09-15T17:20:39.000Z | fakenet/listeners/FTPListener.py | evil-e/flare-fakenet-ng | de6e00e21eb0dbe37ce741caba4116b809a17487 | [
"Apache-2.0"
] | 90 | 2016-08-29T17:25:24.000Z | 2021-07-17T15:19:46.000Z | fakenet/listeners/FTPListener.py | evil-e/flare-fakenet-ng | de6e00e21eb0dbe37ce741caba4116b809a17487 | [
"Apache-2.0"
] | 335 | 2016-07-11T23:25:54.000Z | 2021-09-08T22:27:33.000Z | import logging
import os
import sys
import threading
import SocketServer
import ssl
import socket
from . import *
from pyftpdlib.authorizers import DummyAuthorizer
from pyftpdlib.handlers import FTPHandler, TLS_FTPHandler
from pyftpdlib.filesystems import AbstractedFS
from pyftpdlib.servers import ThreadedFTPServe... | 43.393855 | 129 | 0.562086 |
7945e78169be2ced69219126ea18c2e766e87085 | 4,544 | py | Python | pose_estimation/exp/top_down_448x320_global_small/config.py | AK391/UniFormer | 22c6b3b98b68236dda6a8fa7152a32af1af62a20 | [
"MIT"
] | 367 | 2022-01-14T03:32:25.000Z | 2022-03-31T04:48:20.000Z | pose_estimation/exp/top_down_448x320_global_small/config.py | hadlang/UniFormer | e8024703bffb89cb7c7d09e0d774a0d2a9f96c25 | [
"MIT"
] | 27 | 2022-01-27T07:12:49.000Z | 2022-03-31T04:31:13.000Z | pose_estimation/exp/top_down_448x320_global_small/config.py | hadlang/UniFormer | e8024703bffb89cb7c7d09e0d774a0d2a9f96c25 | [
"MIT"
] | 53 | 2022-01-18T11:21:43.000Z | 2022-03-31T06:42:41.000Z | log_level = 'INFO'
load_from = None
resume_from = None
dist_params = dict(backend='nccl')
workflow = [('train', 1)]
checkpoint_config = dict(interval=5, create_symlink=False)
evaluation = dict(interval=10, metric='mAP', key_indicator='AP')
optimizer = dict(
type='AdamW',
lr=1.0e-3,
betas=(0.9, 0.999),
... | 28.4 | 96 | 0.630722 |
7945e83218e926ccf4ced98eb59de90b751562f0 | 68 | py | Python | rest-api/flask_app/auth/__init__.py | sinedie/Flask-Svelte-Websockets-Nginx-Docker | 76daeec2c76f9f27ca526f53393ab4363020b92b | [
"WTFPL"
] | 4 | 2021-11-21T14:04:15.000Z | 2022-03-20T15:28:14.000Z | rest-api/flask_app/auth/__init__.py | sinedie/Utimate-flask-websocket-template | 76daeec2c76f9f27ca526f53393ab4363020b92b | [
"WTFPL"
] | null | null | null | rest-api/flask_app/auth/__init__.py | sinedie/Utimate-flask-websocket-template | 76daeec2c76f9f27ca526f53393ab4363020b92b | [
"WTFPL"
] | null | null | null | from flask_app.auth.jwt import *
from flask_app.auth.login import * | 22.666667 | 34 | 0.794118 |
7945e84a74540a2e053f5f7fc21fb5cb96cf7cc4 | 723 | py | Python | src/1_100/0001_Two_Sum/Two_Sum.py | himichael/LeetCode | d54f48e785af3d47a2a67a95fd3343d2b23f8ae5 | [
"Apache-2.0"
] | 1 | 2019-12-18T06:08:47.000Z | 2019-12-18T06:08:47.000Z | src/1_100/0001_Two_Sum/Two_Sum.py | himichael/LeetCode | d54f48e785af3d47a2a67a95fd3343d2b23f8ae5 | [
"Apache-2.0"
] | 1 | 2019-05-18T09:35:22.000Z | 2019-05-18T09:35:22.000Z | src/1_100/0001_Two_Sum/Two_Sum.py | himichael/LeetCode | d54f48e785af3d47a2a67a95fd3343d2b23f8ae5 | [
"Apache-2.0"
] | null | null | null | class Solution(object):
def twoSum(self, arr, target):
#用一个字典记录每个元素的值,以及下标
d = {}
for i,v in enumerate(arr):
d[v] = i
for i,v in enumerate(arr):
x = target - v
#如果target-v的值在字典中,并且这个值的下标和i不同,就是要求的值
if(d.has_key(x) and i!=d[x]):
return [d[x],i]
return []
# 一遍hash的实现方式,边加入值 边... | 22.59375 | 40 | 0.489627 |
7945e8596ac339cf49f9a77940791626d68953a9 | 18,315 | py | Python | applications/FluidDynamicsApplication/python_scripts/navier_stokes_two_fluids_solver.py | Gaoliu19910601/Kratos | 0bac5e132d02061680fc90f1e52d4930b5ed7fa3 | [
"BSD-4-Clause"
] | null | null | null | applications/FluidDynamicsApplication/python_scripts/navier_stokes_two_fluids_solver.py | Gaoliu19910601/Kratos | 0bac5e132d02061680fc90f1e52d4930b5ed7fa3 | [
"BSD-4-Clause"
] | 1 | 2019-10-15T13:11:37.000Z | 2019-10-15T13:11:37.000Z | applications/FluidDynamicsApplication/python_scripts/navier_stokes_two_fluids_solver.py | Gaoliu19910601/Kratos | 0bac5e132d02061680fc90f1e52d4930b5ed7fa3 | [
"BSD-4-Clause"
] | null | null | null | from __future__ import print_function, absolute_import, division # makes KratosMultiphysics backward compatible with python 2.6 and 2.7
# Importing the Kratos Library
import KratosMultiphysics
import KratosMultiphysics.kratos_utilities as KratosUtilities
# Import applications
import KratosMultiphysics.FluidDynamicsA... | 54.186391 | 175 | 0.668905 |
7945e87b21cda20054ed16b1bfcf976b11f7fbcd | 988 | py | Python | matplotlib_examples/examples_src/pylab_examples/coords_demo.py | xzlmark/webspider | 133c620c65aa45abea1718b0dada09618c2115bf | [
"Apache-2.0"
] | 3 | 2020-04-09T02:35:26.000Z | 2021-02-27T17:00:21.000Z | matplotlib_examples/examples_src/pylab_examples/coords_demo.py | colorworlds/webspider | 133c620c65aa45abea1718b0dada09618c2115bf | [
"Apache-2.0"
] | null | null | null | matplotlib_examples/examples_src/pylab_examples/coords_demo.py | colorworlds/webspider | 133c620c65aa45abea1718b0dada09618c2115bf | [
"Apache-2.0"
] | 1 | 2020-04-09T02:35:08.000Z | 2020-04-09T02:35:08.000Z | """
An example of how to interact with the plotting canvas by connecting
to move and click events
"""
from __future__ import print_function
import sys
import matplotlib.pyplot as plt
import numpy as np
t = np.arange(0.0, 1.0, 0.01)
s = np.sin(2*np.pi*t)
fig, ax = plt.subplots()
ax.plot(t, s)
def on_move(event):
... | 24.7 | 68 | 0.672065 |
7945ea0a2b211ec764a2e665dff4570e0bb46301 | 4,472 | py | Python | tests/fpga/multibank_reduce_fpga_test.py | jnice-81/dace | 5211794a2d17b7189037ac485ab0b292fb02aa0d | [
"BSD-3-Clause"
] | 227 | 2019-03-15T23:39:06.000Z | 2022-03-30T07:49:08.000Z | tests/fpga/multibank_reduce_fpga_test.py | jnice-81/dace | 5211794a2d17b7189037ac485ab0b292fb02aa0d | [
"BSD-3-Clause"
] | 834 | 2019-07-31T22:49:31.000Z | 2022-03-28T14:01:32.000Z | tests/fpga/multibank_reduce_fpga_test.py | jnice-81/dace | 5211794a2d17b7189037ac485ab0b292fb02aa0d | [
"BSD-3-Clause"
] | 64 | 2019-03-19T05:40:37.000Z | 2022-03-11T15:02:42.000Z | # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
import dace
from dace import subsets
from dace.fpga_testing import xilinx_test
import numpy as np
# A test checking wcr-reduction with HBM/DDR arrays as inputs and output
def create_multibank_reduce_sdfg(
name,
mem_type,
banks=2... | 30.421769 | 75 | 0.61203 |
7945ea44c7c420a4bfb7b5ff3fa24dfebd25ba56 | 1,046 | py | Python | setup.py | dceoy/create-pypkg | fae0c69ef63ca8f511339be470de453e74e3a318 | [
"MIT"
] | null | null | null | setup.py | dceoy/create-pypkg | fae0c69ef63ca8f511339be470de453e74e3a318 | [
"MIT"
] | null | null | null | setup.py | dceoy/create-pypkg | fae0c69ef63ca8f511339be470de453e74e3a318 | [
"MIT"
] | 1 | 2019-12-31T13:10:06.000Z | 2019-12-31T13:10:06.000Z | #!/usr/bin/env python
from setuptools import find_packages, setup
from createpypkg import __version__
with open('README.md', 'r') as f:
long_description = f.read()
setup(
name='create-pypkg',
version=__version__,
author='Daichi Narushima',
author_email='dnarsil+github@gmail.com',
description... | 29.055556 | 69 | 0.656788 |
7945ea807c9c8844a2d70064eaa826207d637fa4 | 6,788 | py | Python | lipydomics/identification/characterize_lipid_ccs_pred.py | dylanhross/lipydomics | c7c3b72d4549a1a9937f287f3b314eff8e7ed054 | [
"MIT"
] | 3 | 2020-10-30T02:49:08.000Z | 2021-03-30T22:51:45.000Z | lipydomics/identification/characterize_lipid_ccs_pred.py | dylanhross/lipydomics | c7c3b72d4549a1a9937f287f3b314eff8e7ed054 | [
"MIT"
] | 49 | 2019-09-27T19:17:50.000Z | 2021-04-12T16:44:29.000Z | lipydomics/identification/characterize_lipid_ccs_pred.py | dylanhross/lipydomics | c7c3b72d4549a1a9937f287f3b314eff8e7ed054 | [
"MIT"
] | 2 | 2021-06-22T16:35:50.000Z | 2022-02-15T19:31:10.000Z | """
lipydomics/identification/characterize_lipid_ccs_pred.py
Dylan H. Ross
2019/10/09
description:
Characterizes performance of the predictive model for generating predicted CCS values by generating plots
of predicted vs. measured CCS organized by lipid class (along with FA modifier) an... | 40.404762 | 136 | 0.632292 |
7945eab2a85c7d8f7d887ccdbcddf6cb19e5fc6d | 426 | py | Python | deepr/layers/size.py | drohde/deepr | 672772ea3ce9cf391f9f8efc7ae9c9d438957817 | [
"Apache-2.0"
] | 50 | 2020-05-19T17:29:44.000Z | 2022-01-15T20:50:50.000Z | deepr/layers/size.py | drohde/deepr | 672772ea3ce9cf391f9f8efc7ae9c9d438957817 | [
"Apache-2.0"
] | 75 | 2020-05-20T16:53:37.000Z | 2022-01-12T15:53:46.000Z | deepr/layers/size.py | drohde/deepr | 672772ea3ce9cf391f9f8efc7ae9c9d438957817 | [
"Apache-2.0"
] | 17 | 2020-05-25T13:23:03.000Z | 2022-02-21T11:22:08.000Z | """Size Layers"""
import tensorflow as tf
from deepr.layers import base
class IsMinSize(base.Layer):
"""Compare size of inputs to minimum"""
def __init__(self, size: int, **kwargs):
super().__init__(n_in=1, n_out=1, **kwargs)
self.size = size
def forward(self, tensors, mode: str = None... | 23.666667 | 60 | 0.640845 |
7945eaddad797b5a254359ed43419eb5c24b4da8 | 2,744 | py | Python | models/tool.py | wang-chen/lgl-feature-matching | 55bd17ee5e8699a06514bca09a6ef834808448a7 | [
"BSD-3-Clause"
] | 17 | 2022-03-06T16:23:44.000Z | 2022-03-14T08:50:11.000Z | models/tool.py | wang-chen/lgl-feature-matching | 55bd17ee5e8699a06514bca09a6ef834808448a7 | [
"BSD-3-Clause"
] | 2 | 2022-03-09T11:05:19.000Z | 2022-03-25T20:54:42.000Z | models/tool.py | wang-chen/lgl-feature-matching | 55bd17ee5e8699a06514bca09a6ef834808448a7 | [
"BSD-3-Clause"
] | 2 | 2022-03-07T01:18:33.000Z | 2022-03-07T08:28:56.000Z | #!/usr/bin/env python3
import time
import torch
class GlobalStepCounter():
def __init__(self, initial_step=0):
self._steps = initial_step
@property
def steps(self):
return self._steps
def step(self, step=1):
self._steps += 1
return self._steps
class Timer:
def ... | 29.191489 | 101 | 0.590743 |
7945ec8ade35befdcbbcbe4009ba765a6b3cb0d8 | 1,101 | py | Python | nipype/interfaces/semtools/filtering/tests/test_auto_DilateImage.py | felixsc1/nipype | e722d6170593583f16ddfcb95473e5d30b5f1d7c | [
"Apache-2.0"
] | 8 | 2019-05-29T09:38:30.000Z | 2021-01-20T03:36:59.000Z | nipype/interfaces/semtools/filtering/tests/test_auto_DilateImage.py | felixsc1/nipype | e722d6170593583f16ddfcb95473e5d30b5f1d7c | [
"Apache-2.0"
] | 12 | 2021-03-09T03:01:16.000Z | 2022-03-11T23:59:36.000Z | nipype/interfaces/semtools/filtering/tests/test_auto_DilateImage.py | felixsc1/nipype | e722d6170593583f16ddfcb95473e5d30b5f1d7c | [
"Apache-2.0"
] | 1 | 2020-07-17T12:49:49.000Z | 2020-07-17T12:49:49.000Z | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from __future__ import unicode_literals
from ..featuredetection import DilateImage
def test_DilateImage_inputs():
input_map = dict(
args=dict(argstr='%s', ),
environ=dict(
nohash=True,
usedefault=True,
),
... | 33.363636 | 67 | 0.627611 |
7945eca81215abce4accacc4dea017ec7d45a49f | 1,871 | py | Python | sqlite2xls/sqlite2xls.py | dhilipsiva/test | 58b87e072eda51c0b744106926d25f1ec8b6aea4 | [
"MIT"
] | 1 | 2017-03-12T22:54:25.000Z | 2017-03-12T22:54:25.000Z | sqlite2xls/sqlite2xls.py | dhilipsiva/test | 58b87e072eda51c0b744106926d25f1ec8b6aea4 | [
"MIT"
] | 40 | 2015-04-08T06:00:07.000Z | 2020-05-11T05:45:10.000Z | sqlite2xls/sqlite2xls.py | dhilipsiva/test | 58b87e072eda51c0b744106926d25f1ec8b6aea4 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# vim: fenc=utf-8
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
#
# Copyright © dhilipsiva
#
'''
File name: sqlite2xls.py
Version: 0.1
Author: dhilipsiva <dhilipsiva@gmail.com>
Date created: 2015-04-03
'''
__author__ = "dhilipsiva"
__status__ = "... | 23.683544 | 62 | 0.59861 |
7945ecb5a82911c7362c670198896b90663c853d | 6,890 | py | Python | readthedocs/redirects/models.py | phoenixflyinghigh/readthedocs.org | 2dc1615c674b08c8b681ac3543fee913c9d90a11 | [
"MIT"
] | 2 | 2019-01-31T02:20:01.000Z | 2019-02-02T21:47:56.000Z | readthedocs/redirects/models.py | phoenixflyinghigh/readthedocs.org | 2dc1615c674b08c8b681ac3543fee913c9d90a11 | [
"MIT"
] | null | null | null | readthedocs/redirects/models.py | phoenixflyinghigh/readthedocs.org | 2dc1615c674b08c8b681ac3543fee913c9d90a11 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Django models for the redirects app."""
import logging
import re
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext
from django.utils.translation import ugettext_lazy as _
from readthedocs.core.resolver ... | 31.461187 | 79 | 0.585776 |
7945ecdc29aff549e88a93cfe33af08e013190fa | 665 | py | Python | manage.py | Loldozen/cowrywise | 99eeeb167dddce0840f5dd27efc4b058041eb735 | [
"MIT"
] | null | null | null | manage.py | Loldozen/cowrywise | 99eeeb167dddce0840f5dd27efc4b058041eb735 | [
"MIT"
] | null | null | null | manage.py | Loldozen/cowrywise | 99eeeb167dddce0840f5dd27efc4b058041eb735 | [
"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', 'cowrywise.settings')
try:
from django.core.management import execute_from_command_line
except Im... | 28.913043 | 73 | 0.679699 |
7945ed34575f192dbf0ec6340e5896a0731efc73 | 1,441 | py | Python | orange3/Orange/tests/test_basic_stats.py | rgschmitz1/BioDepot-workflow-builder | f74d904eeaf91ec52ec9b703d9fb38e9064e5a66 | [
"MIT"
] | 54 | 2017-01-08T17:21:49.000Z | 2021-11-02T08:46:07.000Z | orange3/Orange/tests/test_basic_stats.py | Synthia-3/BioDepot-workflow-builder | 4ee93abe2d79465755e82a145af3b6a6e1e79fd4 | [
"MIT"
] | 22 | 2017-03-28T06:03:14.000Z | 2021-07-28T05:43:55.000Z | orange3/Orange/tests/test_basic_stats.py | Synthia-3/BioDepot-workflow-builder | 4ee93abe2d79465755e82a145af3b6a6e1e79fd4 | [
"MIT"
] | 21 | 2017-01-26T21:12:09.000Z | 2022-01-31T21:34:59.000Z | # Test methods with long descriptive names can omit docstrings
# pylint: disable=missing-docstring
from unittest import TestCase
from Orange.data import Table
from Orange.statistics.basic_stats import DomainBasicStats, BasicStats
class TestDomainBasicStats(TestCase):
def setUp(self):
self.zoo = Table("zo... | 40.027778 | 79 | 0.700208 |
7945edbbe677333b13dfb78a5d282a921fcef25a | 1,037 | py | Python | mmseg/models/backbones/__init__.py | buoyancy99/DenseCLIP | eac7810ca17c93aaf59f2a6b6c86ccbb4cdfcc9b | [
"Apache-2.0"
] | 11 | 2022-02-04T01:09:45.000Z | 2022-03-08T05:49:16.000Z | mmseg/models/backbones/__init__.py | buoyancy99/DenseCLIP | eac7810ca17c93aaf59f2a6b6c86ccbb4cdfcc9b | [
"Apache-2.0"
] | null | null | null | mmseg/models/backbones/__init__.py | buoyancy99/DenseCLIP | eac7810ca17c93aaf59f2a6b6c86ccbb4cdfcc9b | [
"Apache-2.0"
] | 1 | 2022-02-03T10:29:40.000Z | 2022-02-03T10:29:40.000Z | # Copyright (c) OpenMMLab. All rights reserved.
from .bisenetv1 import BiSeNetV1
from .bisenetv2 import BiSeNetV2
from .cgnet import CGNet
from .erfnet import ERFNet
from .fast_scnn import FastSCNN
from .hrnet import HRNet
from .icnet import ICNet
from .mit import MixVisionTransformer
from .mobilenet_v2 import MobileNe... | 35.758621 | 73 | 0.768563 |
7945eedd3564d189a58d0b888fe7250612ce5dd6 | 5,864 | py | Python | effreq/test/test_treq.py | radix/effreq | 3e217a0d2eafe5eb283e0a7b529ac57ec6090e74 | [
"Unlicense",
"MIT"
] | null | null | null | effreq/test/test_treq.py | radix/effreq | 3e217a0d2eafe5eb283e0a7b529ac57ec6090e74 | [
"Unlicense",
"MIT"
] | null | null | null | effreq/test/test_treq.py | radix/effreq | 3e217a0d2eafe5eb283e0a7b529ac57ec6090e74 | [
"Unlicense",
"MIT"
] | null | null | null | # coding: utf-8
import json
from ..intent import Request, Response
from ..treq import perform_with_treq
from testtools import TestCase
from twisted.internet.defer import succeed
from twisted.trial.unittest import SynchronousTestCase
class TreqTests(SynchronousTestCase):
"""
Tests for the treq performer.
... | 37.589744 | 81 | 0.565825 |
7945efc1798f282c867be2e18b40f69235e2b98b | 36 | py | Python | oils/apps.py | ChristianJStarr/sbs-website | db891f0a67f46cc9cdadc95714304b2ea91a162a | [
"MIT"
] | 2 | 2021-12-28T01:53:00.000Z | 2022-01-22T00:42:39.000Z | oils/apps.py | ChristianJStarr/sbs-website | db891f0a67f46cc9cdadc95714304b2ea91a162a | [
"MIT"
] | 15 | 2020-02-12T00:00:38.000Z | 2022-03-11T23:43:44.000Z | oils/apps.py | ChristianJStarr/sbs-website | db891f0a67f46cc9cdadc95714304b2ea91a162a | [
"MIT"
] | null | null | null | from django.apps import AppConfig
| 9 | 33 | 0.805556 |
7945f0b7b8867d40d1fbf11c7aee277bfb2baf81 | 3,555 | py | Python | TextMagic/models/clear_and_assign_contacts_to_list_input_object.py | textmagic/textmagic-rest-python-v2 | 49055e214a6cf0f7545b85aa03e49e6d92bcef13 | [
"MIT"
] | 2 | 2020-10-21T09:44:33.000Z | 2021-06-29T20:58:57.000Z | TextMagic/models/clear_and_assign_contacts_to_list_input_object.py | textmagic/textmagic-rest-python-v2 | 49055e214a6cf0f7545b85aa03e49e6d92bcef13 | [
"MIT"
] | null | null | null | TextMagic/models/clear_and_assign_contacts_to_list_input_object.py | textmagic/textmagic-rest-python-v2 | 49055e214a6cf0f7545b85aa03e49e6d92bcef13 | [
"MIT"
] | 1 | 2021-12-02T12:15:56.000Z | 2021-12-02T12:15:56.000Z | # coding: utf-8
"""
TextMagic API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
... | 30.127119 | 119 | 0.591842 |
7945f1264d53e3a239d702212d578cef1972c690 | 4,241 | py | Python | localstack/plugins.py | wapmesquita/localstack | 0d67b3da8fefa05a077968be41220cf46764722a | [
"Apache-2.0"
] | null | null | null | localstack/plugins.py | wapmesquita/localstack | 0d67b3da8fefa05a077968be41220cf46764722a | [
"Apache-2.0"
] | null | null | null | localstack/plugins.py | wapmesquita/localstack | 0d67b3da8fefa05a077968be41220cf46764722a | [
"Apache-2.0"
] | null | null | null | import sys
from localstack.services.es import es_starter
from localstack.services.s3 import s3_listener, s3_starter
from localstack.services.kms import kms_starter
from localstack.services.sns import sns_listener
from localstack.services.sqs import sqs_listener, sqs_starter
from localstack.services.iam import iam_liste... | 44.642105 | 100 | 0.705966 |
7945f15a17e4f9a11062eff10634224542ec3536 | 26,037 | py | Python | yocto/poky/bitbake/lib/toaster/orm/migrations/0014_auto__chg_field_package_summary__chg_field_layer_summary__chg_field_re.py | jxtxinbing/ops-build | 9008de2d8e100f3f868c66765742bca9fa98f3f9 | [
"Apache-2.0"
] | 2 | 2019-03-27T08:11:14.000Z | 2020-02-22T20:40:24.000Z | yocto/poky/bitbake/lib/toaster/orm/migrations/0014_auto__chg_field_package_summary__chg_field_layer_summary__chg_field_re.py | jxtxinbing/ops-build | 9008de2d8e100f3f868c66765742bca9fa98f3f9 | [
"Apache-2.0"
] | 39 | 2016-08-23T11:23:28.000Z | 2017-04-07T08:00:52.000Z | yocto/poky/bitbake/lib/toaster/orm/migrations/0014_auto__chg_field_package_summary__chg_field_layer_summary__chg_field_re.py | jxtxinbing/ops-build | 9008de2d8e100f3f868c66765742bca9fa98f3f9 | [
"Apache-2.0"
] | 1 | 2021-09-10T08:10:12.000Z | 2021-09-10T08:10:12.000Z | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'Package.summary'
db.alter_column(u'orm_package', 'summ... | 77.491071 | 177 | 0.558167 |
7945f23692d266c00a73e1661a6da142d10fd2da | 9,240 | py | Python | insights/parsers/tests/test_postgresql_conf.py | mglantz/insights-core | 6f20bbbe03f53ee786f483b2a28d256ff1ad0fd4 | [
"Apache-2.0"
] | 121 | 2017-05-30T20:23:25.000Z | 2022-03-23T12:52:15.000Z | insights/parsers/tests/test_postgresql_conf.py | mglantz/insights-core | 6f20bbbe03f53ee786f483b2a28d256ff1ad0fd4 | [
"Apache-2.0"
] | 1,977 | 2017-05-26T14:36:03.000Z | 2022-03-31T10:38:53.000Z | insights/parsers/tests/test_postgresql_conf.py | mglantz/insights-core | 6f20bbbe03f53ee786f483b2a28d256ff1ad0fd4 | [
"Apache-2.0"
] | 244 | 2017-05-30T20:22:57.000Z | 2022-03-26T10:09:39.000Z | import pytest
from insights.tests import context_wrap
from insights.parsers.postgresql_conf import PostgreSQLConf
postgresql_conf_cnt = """
# -----------------------------
# PostgreSQL configuration file
# -----------------------------
#
# This file consists of lines of the form:
#
# name = value
#
# (The "=" is o... | 40 | 79 | 0.686147 |
7945f2dc4c7157ed50d96b2bef1ea26530f0f499 | 25,667 | py | Python | volttron/platform/vip/agent/subsystems/rpc.py | SKalt/volttron | 79f077b5035188becb2f91514ba1ef97758d0083 | [
"Apache-2.0"
] | null | null | null | volttron/platform/vip/agent/subsystems/rpc.py | SKalt/volttron | 79f077b5035188becb2f91514ba1ef97758d0083 | [
"Apache-2.0"
] | null | null | null | volttron/platform/vip/agent/subsystems/rpc.py | SKalt/volttron | 79f077b5035188becb2f91514ba1ef97758d0083 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*- {{{
# vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et:
#
# Copyright 2019, Battelle Memorial Institute.
#
# 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... | 42.707155 | 120 | 0.538084 |
7945f2ec77908a49a4929ea333d7b27c57bb0187 | 3,944 | py | Python | tu_gerente/reservar/models.py | luzmar7/backend_tugerente | 54aaaf5ee2cd4dc24f4cffb06ac533977c8ed288 | [
"MIT"
] | null | null | null | tu_gerente/reservar/models.py | luzmar7/backend_tugerente | 54aaaf5ee2cd4dc24f4cffb06ac533977c8ed288 | [
"MIT"
] | null | null | null | tu_gerente/reservar/models.py | luzmar7/backend_tugerente | 54aaaf5ee2cd4dc24f4cffb06ac533977c8ed288 | [
"MIT"
] | null | null | null | from django.db import models
import datetime
# Create your models here.
class Habitacion(models.Model):
ESTADO = (
('Bueno','Bueno'),
('Regular','Regular')
)
id_habitacion = models.AutoField(
primary_key=True,
verbose_name="Id Habitacion"
)
descripcion = models.CharField(
verbose_name="de... | 22.157303 | 44 | 0.674189 |
7945f307809734f889d5f001bc83bec7615c5ce0 | 4,232 | py | Python | build/lib/gcn/train.py | jindi-tju/MRFasGCN | 41b94278b80bbcb256097a5a3dfb6a433d9dbdc7 | [
"MIT"
] | 2 | 2021-06-20T03:34:09.000Z | 2022-03-24T07:22:56.000Z | build/lib/gcn/train.py | jindi-tju/MRFasGCN | 41b94278b80bbcb256097a5a3dfb6a433d9dbdc7 | [
"MIT"
] | null | null | null | build/lib/gcn/train.py | jindi-tju/MRFasGCN | 41b94278b80bbcb256097a5a3dfb6a433d9dbdc7 | [
"MIT"
] | 1 | 2022-03-17T01:26:07.000Z | 2022-03-17T01:26:07.000Z | from __future__ import division
from __future__ import print_function
import time
import tensorflow as tf
from gcn.utils import *
from gcn.models import GCN, MLP
# Set random seed
seed = 123
np.random.seed(seed)
tf.set_random_seed(seed)
# Settings
flags = tf.app.flags
FLAGS = flags.FLAGS
flags.DEFINE_string('datase... | 36.8 | 106 | 0.708176 |
7945f319904576257eca8c611cc50101c997456c | 22,984 | py | Python | JumpScale9Portal/portal/docgenerator/Confluence2HTML.py | Jumpscale/portal9 | fd4c9718daf51b877a6a98bd0d1ff4bc0b272f67 | [
"Apache-2.0"
] | 1 | 2017-06-07T08:12:09.000Z | 2017-06-07T08:12:09.000Z | JumpScale9Portal/portal/docgenerator/Confluence2HTML.py | Jumpscale/portal9 | fd4c9718daf51b877a6a98bd0d1ff4bc0b272f67 | [
"Apache-2.0"
] | 36 | 2017-05-18T10:54:44.000Z | 2019-03-27T11:24:20.000Z | JumpScale9Portal/portal/docgenerator/Confluence2HTML.py | Jumpscale/portal9 | fd4c9718daf51b877a6a98bd0d1ff4bc0b272f67 | [
"Apache-2.0"
] | 1 | 2018-06-12T05:18:01.000Z | 2018-06-12T05:18:01.000Z | import re
from js9 import j
from JumpScale9Portal.portal.macrolib import div_base
from .PageHTML import PageHTML
class Confluence2HTML():
def defGet(self, name):
name = name.lower().replace("_", "").replace("-", "").replace(" ", "")
if name in j.portal.tools.defmanager.defmanager.aliases:
... | 41.562387 | 181 | 0.449748 |
7945f5abd9459ce4da5fd0cfa388877439f1e0ab | 286 | py | Python | lonely/items.py | mouse-reeve/lonely-scraper | 2a344e09777a14b95577dd80b43749a3724dab34 | [
"MIT"
] | null | null | null | lonely/items.py | mouse-reeve/lonely-scraper | 2a344e09777a14b95577dd80b43749a3724dab34 | [
"MIT"
] | null | null | null | lonely/items.py | mouse-reeve/lonely-scraper | 2a344e09777a14b95577dd80b43749a3724dab34 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class LonelyItem(scrapy.Item):
# define the fields for your item here like:
# name = scrapy.Field()
pass
| 19.066667 | 52 | 0.685315 |
7945f613dc9a15950235d6dcaf276ec3bb9dbd41 | 1,498 | py | Python | ppapi/generators/idl_visitor.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | ppapi/generators/idl_visitor.py | j4ckfrost/android_external_chromium_org | a1a3dad8b08d1fcf6b6b36c267158ed63217c780 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | ppapi/generators/idl_visitor.py | j4ckfrost/android_external_chromium_org | a1a3dad8b08d1fcf6b6b36c267158ed63217c780 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Visitor Object for traversing AST """
#
# IDLVisitor
#
# The IDLVisitor class will traverse an AST truncating portions of the tree
# when 'VisitFilt... | 32.565217 | 77 | 0.721629 |
7945f6f4f4622f9590a598974236c7033299db71 | 597 | py | Python | google/cloud/datastore/version.py | freelancing-solutions/python-datastore | 160f7751db6a2a27cdf2a5232eadc538de8a8268 | [
"Apache-2.0"
] | null | null | null | google/cloud/datastore/version.py | freelancing-solutions/python-datastore | 160f7751db6a2a27cdf2a5232eadc538de8a8268 | [
"Apache-2.0"
] | null | null | null | google/cloud/datastore/version.py | freelancing-solutions/python-datastore | 160f7751db6a2a27cdf2a5232eadc538de8a8268 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 37.3125 | 74 | 0.757119 |
7945f71d97776ba37e1e170fe8aed3f29d1486ab | 4,587 | py | Python | Forecasting System/main.py | yinghonglin/Projects | 5af56a4fc5ebfade3c0afbfd63a6300d92831a2b | [
"MIT"
] | null | null | null | Forecasting System/main.py | yinghonglin/Projects | 5af56a4fc5ebfade3c0afbfd63a6300d92831a2b | [
"MIT"
] | 7 | 2020-03-24T17:58:58.000Z | 2022-02-10T01:16:50.000Z | Forecasting System/main.py | yinghonglin/Projects | 5af56a4fc5ebfade3c0afbfd63a6300d92831a2b | [
"MIT"
] | null | null | null | from Models import NN, DR, TM
from Helper import helper
import pandas as pd
import datetime
import time
import numpy as np
import json
class LoadPred(object):
def __init__(self, dataframe):
self.data = dataframe.copy()
self.NN = NN.NN(self.data)
self.DR = DR.DR(self.data)
self.TM... | 36.696 | 117 | 0.548725 |
7945f754f398eab5629f3a42e6d86e62076e5810 | 1,179 | py | Python | task1.py | redwin/miscTools | 11779f7130efe58f930870dcde47993b65284aa2 | [
"MIT"
] | null | null | null | task1.py | redwin/miscTools | 11779f7130efe58f930870dcde47993b65284aa2 | [
"MIT"
] | null | null | null | task1.py | redwin/miscTools | 11779f7130efe58f930870dcde47993b65284aa2 | [
"MIT"
] | null | null | null |
maxlen=100000
minval=-1
maxval=200000
def solution(A):
length=len(A)
passedIndex=set()
if length == 0 or length > maxlen:
return 0
i=A[0]
passedIndex.add(0)
if length == 1:
if i == -1:
return 1
else:
return 0
while True:
if i <mi... | 15.513158 | 60 | 0.389313 |
7945f773cadbcc8af1af1231ca693ff3de2ed2bf | 4,091 | py | Python | bi4_export_webi2pdf.py | docmalkovich/sap-bi4-python | 3bebe754d84ab26bee889b02953d92d3b54db4d8 | [
"MIT"
] | null | null | null | bi4_export_webi2pdf.py | docmalkovich/sap-bi4-python | 3bebe754d84ab26bee889b02953d92d3b54db4d8 | [
"MIT"
] | null | null | null | bi4_export_webi2pdf.py | docmalkovich/sap-bi4-python | 3bebe754d84ab26bee889b02953d92d3b54db4d8 | [
"MIT"
] | null | null | null | #.Synopsis
#Exports WebI to PDF.
#.Description
#Logs onto BI Platform, retrieves PDF export of a Web Intelligence document and save to specified file.
#Modify this script to enter the logon credentials, URL to the RESTful Web Services, Language, Document SI_ID and folder path.
#.Uses
#Python 3 and SAP BI4.1 SP3+
... | 38.233645 | 127 | 0.606453 |
7945f795d1cfa63d2a5bb3a49f9e203d5cc5494d | 4,693 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/_policy_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/_policy_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/_policy_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 44.273585 | 132 | 0.705732 |
7945f7a34dc91f25dda17927d66a6b477d6fe619 | 15,271 | py | Python | findthetail/ftt.py | fstroth/findthetail | f4525a1393ab362886395bfb3a789446c1ac5143 | [
"Apache-2.0"
] | 3 | 2018-07-26T23:08:39.000Z | 2021-05-03T20:09:02.000Z | findthetail/ftt.py | fstroth/findthetail | f4525a1393ab362886395bfb3a789446c1ac5143 | [
"Apache-2.0"
] | 1 | 2019-04-29T14:17:24.000Z | 2019-05-09T12:08:56.000Z | findthetail/ftt.py | fstroth/findthetail | f4525a1393ab362886395bfb3a789446c1ac5143 | [
"Apache-2.0"
] | 1 | 2019-11-04T12:59:21.000Z | 2019-11-04T12:59:21.000Z | """
.. module:: ftt
:platform: Unix, Windows
:synopsis: Module for Paper XY.
.. moduleauthor:: Frederik Strothmann <frstrothmann@gmail.com>
"""
import os
from multiprocessing import Pool
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import genpareto
from jinja2 import Environment, FileSystemLoa... | 41.953297 | 135 | 0.607229 |
7945f7d49bcb4909c6deb9cd059c16f8be88d4fb | 1,821 | py | Python | python/project/pandas_data.py | Jai-Doshi/Python-Project | 40a77ae1eb2c66444d94f40aef4dbda2bc8d957a | [
"MIT"
] | null | null | null | python/project/pandas_data.py | Jai-Doshi/Python-Project | 40a77ae1eb2c66444d94f40aef4dbda2bc8d957a | [
"MIT"
] | null | null | null | python/project/pandas_data.py | Jai-Doshi/Python-Project | 40a77ae1eb2c66444d94f40aef4dbda2bc8d957a | [
"MIT"
] | null | null | null | # IMPORTING LIBRARIES
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import datetime
import warnings
# IMPORTING DATASET
df = pd.read_csv('..//assets/data.csv')
# FEATURES
# Basic
df.head()
df.tail()
df.info()
df.describe()
df.columns
# Interme... | 18.773196 | 142 | 0.555739 |
7945f8d06af88b7c18f1120fbabb335540045599 | 7,220 | py | Python | tcapy_examples/gen/non_db_tca_example.py | Ahrvo-Trading-Systems/tcapy | df8439aa5c754fc9a7fde463c44c489b27112f76 | [
"Apache-2.0"
] | 189 | 2020-03-20T17:03:04.000Z | 2022-03-30T13:33:27.000Z | tcapy_examples/gen/non_db_tca_example.py | Ahrvo-Trading-Systems/tcapy | df8439aa5c754fc9a7fde463c44c489b27112f76 | [
"Apache-2.0"
] | 4 | 2020-06-06T14:58:21.000Z | 2022-03-10T22:31:15.000Z | tcapy_examples/gen/non_db_tca_example.py | Ahrvo-Trading-Systems/tcapy | df8439aa5c754fc9a7fde463c44c489b27112f76 | [
"Apache-2.0"
] | 60 | 2020-03-20T17:06:56.000Z | 2022-03-26T02:48:58.000Z | from __future__ import division, print_function
__author__ = 'saeedamen' # Saeed Amen / saeed@cuemacro.com
#
# Copyright 2017 Cuemacro Ltd. - http//www.cuemacro.com / @cuemacro
#
# See the License for the specific language governing permissions and limitations under the License.
#
import os
from collections import ... | 47.5 | 127 | 0.662188 |
7945fa9b1fa77ddbcf7c4474b9d72452d036364c | 4,536 | py | Python | CONFIG/FollowAPP/API/views.py | Brktrlw/Instagram-Clone-Django-and-React | 6390db2133d3beae2097a680097e170bd4fbcabe | [
"MIT",
"PostgreSQL",
"Unlicense"
] | null | null | null | CONFIG/FollowAPP/API/views.py | Brktrlw/Instagram-Clone-Django-and-React | 6390db2133d3beae2097a680097e170bd4fbcabe | [
"MIT",
"PostgreSQL",
"Unlicense"
] | null | null | null | CONFIG/FollowAPP/API/views.py | Brktrlw/Instagram-Clone-Django-and-React | 6390db2133d3beae2097a680097e170bd4fbcabe | [
"MIT",
"PostgreSQL",
"Unlicense"
] | null | null | null | from rest_framework.generics import CreateAPIView,DestroyAPIView
from .serializers import SerializerFollow,SerializerCreateRequest,SerializerDENEME
from UserAPP.models import ModelFollower,ModelUser
from django.shortcuts import get_object_or_404
from NotificationAPP.models import ModelNotification,ModelRequest
class ... | 47.747368 | 133 | 0.731481 |
7945faadcf0a1202da759d7ad0994b0953636f2b | 657 | py | Python | capitalrelacional/views.py | saulm/firedeptmanagement | 06548bf872fc76ac214ec25cc536f34aa8145305 | [
"Unlicense"
] | 2 | 2019-09-24T19:12:04.000Z | 2019-09-28T19:07:57.000Z | capitalrelacional/views.py | saulm/firedeptmanagement | 06548bf872fc76ac214ec25cc536f34aa8145305 | [
"Unlicense"
] | 1 | 2020-08-16T02:34:28.000Z | 2021-03-16T14:15:47.000Z | capitalrelacional/views.py | saulm/firedeptmanagement | 06548bf872fc76ac214ec25cc536f34aa8145305 | [
"Unlicense"
] | 2 | 2017-01-18T21:10:18.000Z | 2020-03-12T20:25:08.000Z | #coding=utf-8
#from haystack.query import SearchQuerySet
from firedeptmanagement.capitalrelacional.models import RelationalCompany, RelationalPerson
from django.shortcuts import render_to_response
from firedeptmanagement.personal.models import Firefighter
from django.contrib.auth.decorators import login_required
from d... | 46.928571 | 121 | 0.820396 |
7945fc2666721373a9c47789603627d5d9969c43 | 3,752 | py | Python | back/education/migrations/0001_initial.py | yeezy-na-izi/.shSkill | 54608cd89ddc90377d190104115debc702d9aa1b | [
"Apache-2.0"
] | null | null | null | back/education/migrations/0001_initial.py | yeezy-na-izi/.shSkill | 54608cd89ddc90377d190104115debc702d9aa1b | [
"Apache-2.0"
] | null | null | null | back/education/migrations/0001_initial.py | yeezy-na-izi/.shSkill | 54608cd89ddc90377d190104115debc702d9aa1b | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2.6 on 2021-08-07 22:52
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('user', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Cour... | 42.636364 | 135 | 0.554904 |
7945fd3cc9d522c6614ba19e5e1aa55ef3a04204 | 1,333 | py | Python | agenda.py | Mateus-Toni/workstation-backend | 209f32604eaf07261679ac95c4dc8dcab8380a90 | [
"MIT"
] | null | null | null | agenda.py | Mateus-Toni/workstation-backend | 209f32604eaf07261679ac95c4dc8dcab8380a90 | [
"MIT"
] | null | null | null | agenda.py | Mateus-Toni/workstation-backend | 209f32604eaf07261679ac95c4dc8dcab8380a90 | [
"MIT"
] | null | null | null | import dao as Bank
# agenda workstation
from datetime import datetime
from datetime import timedelta
# validando e salvando agendamentos
start_date = request.form['data_inicio'] # aaaa/mm/dd
start_hour = request.form["hora_inicio"] # hh:mm:ss
final_hour = request.form["hora_fim"] # hh:mm:ss
final_date = request.for... | 32.512195 | 82 | 0.696174 |
7945fd4337c44e6aa40bb51bc63a9f47ea0b91b9 | 7,127 | py | Python | Demo/InversionHorizontalReflector2D_FrequencyDomain_VariableDensity_Parallel.py | zfang-slim/PysitForPython3 | dc60537b26018e28d92b7a956a2cf96775f0bdf9 | [
"BSD-3-Clause"
] | null | null | null | Demo/InversionHorizontalReflector2D_FrequencyDomain_VariableDensity_Parallel.py | zfang-slim/PysitForPython3 | dc60537b26018e28d92b7a956a2cf96775f0bdf9 | [
"BSD-3-Clause"
] | null | null | null | Demo/InversionHorizontalReflector2D_FrequencyDomain_VariableDensity_Parallel.py | zfang-slim/PysitForPython3 | dc60537b26018e28d92b7a956a2cf96775f0bdf9 | [
"BSD-3-Clause"
] | 1 | 2020-06-13T07:13:07.000Z | 2020-06-13T07:13:07.000Z | import time
import copy
import numpy as np
import matplotlib.pyplot as plt
import math
import os
from shutil import copy2
from mpl_toolkits.axes_grid1 import make_axes_locatable
from mpi4py import MPI
import sys
import scipy.io as sio
from pysit import *
from pysit.gallery import horizontal_reflector
from pysit.util... | 29.572614 | 93 | 0.530237 |
7945fd721995bc73387fcfcc5eecbb1c42bdb564 | 3,515 | py | Python | maxent_irl.py | ufgtb24/IRL | 893377ac1f703be04af91e8923b4907045a1678c | [
"MIT"
] | null | null | null | maxent_irl.py | ufgtb24/IRL | 893377ac1f703be04af91e8923b4907045a1678c | [
"MIT"
] | null | null | null | maxent_irl.py | ufgtb24/IRL | 893377ac1f703be04af91e8923b4907045a1678c | [
"MIT"
] | null | null | null | '''
Implementation of maximum entropy inverse reinforcement learning in
Ziebart et al. 2008 paper: Maximum Entropy Inverse Reinforcement Learning
https://www.aaai.org/Papers/AAAI/2008/AAAI08-227.pdf
Acknowledgement:
This implementation is largely influenced by Matthew Alger's maxent implementation here:
https:... | 31.383929 | 139 | 0.678236 |
7945fdbdd393c872859ae1613f19feca9b11ca26 | 839 | py | Python | JSGridDjangoSample/urls.py | cuauhtemoc-amdg/jsgrid-django | b0cf13ebc32d74be53e21090920f870e85418b26 | [
"MIT"
] | null | null | null | JSGridDjangoSample/urls.py | cuauhtemoc-amdg/jsgrid-django | b0cf13ebc32d74be53e21090920f870e85418b26 | [
"MIT"
] | null | null | null | JSGridDjangoSample/urls.py | cuauhtemoc-amdg/jsgrid-django | b0cf13ebc32d74be53e21090920f870e85418b26 | [
"MIT"
] | null | null | null | """JSGridDjangoSample URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
... | 34.958333 | 77 | 0.712753 |
7945fe5fbcfb072b0327288ea0464e6eafc059fb | 982 | py | Python | handlers/travel_result.py | icoxfog417/enigma_travel | 0b4ab4f2ea0dfbc4110a5f9e97c36245c2cb3ed9 | [
"MIT"
] | 1 | 2015-10-09T01:26:23.000Z | 2015-10-09T01:26:23.000Z | handlers/travel_result.py | icoxfog417/enigma_travel | 0b4ab4f2ea0dfbc4110a5f9e97c36245c2cb3ed9 | [
"MIT"
] | null | null | null | handlers/travel_result.py | icoxfog417/enigma_travel | 0b4ab4f2ea0dfbc4110a5f9e97c36245c2cb3ed9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import tornado.web
from models.travel_model import Travel
from service.ubic_api import UBICApi
class TravelResultHandler(tornado.web.RequestHandler):
"""
グループに対し、学習した結果の旅行プランを提示する。
"""
def get(self, group_id):
budget = int(self.get_query_argument("budget", "10000"))
... | 22.837209 | 64 | 0.59776 |
7945fe7760276ca0200b1f313584835122927696 | 96 | py | Python | apps/app/main.py | acronhub/sls-python-fastapi | a997b83ac8b28412b7932993f1f70fa03f9e28f2 | [
"MIT"
] | null | null | null | apps/app/main.py | acronhub/sls-python-fastapi | a997b83ac8b28412b7932993f1f70fa03f9e28f2 | [
"MIT"
] | null | null | null | apps/app/main.py | acronhub/sls-python-fastapi | a997b83ac8b28412b7932993f1f70fa03f9e28f2 | [
"MIT"
] | null | null | null | from init import create_app
from mangum import Mangum
app = create_app()
handler = Mangum(app)
| 16 | 27 | 0.78125 |
7945ffcebeab90c6e1ab98d7e9302c7c91202352 | 4,935 | py | Python | src/system/sfc.py | ethanejohnsons/Ignition | 2d06c5ac896ba2ff673aa8a522978ffe40eb0471 | [
"MIT"
] | null | null | null | src/system/sfc.py | ethanejohnsons/Ignition | 2d06c5ac896ba2ff673aa8a522978ffe40eb0471 | [
"MIT"
] | null | null | null | src/system/sfc.py | ethanejohnsons/Ignition | 2d06c5ac896ba2ff673aa8a522978ffe40eb0471 | [
"MIT"
] | null | null | null | # Copyright (C) 2018-2021
# Author: Cesar Roman
# Contact: cesar@thecesrom.dev
"""SFC Functions.
The following functions give you access to interact with the SFCs in the
Gateway.
"""
from __future__ import print_function
__all__ = [
"cancelChart",
"getRunningCharts",
"getVariables",
"pauseChart",
... | 28.69186 | 72 | 0.678825 |
7946007bedaf13d4058fd67635c89032d0c7199b | 1,732 | py | Python | elastalert/alerters/sns.py | perceptron01/elastalert2 | bb91ecdb03dedda207237ca83d628fd5d40d29c6 | [
"Apache-2.0"
] | 250 | 2021-04-24T18:06:30.000Z | 2022-03-31T04:37:47.000Z | elastalert/alerters/sns.py | perceptron01/elastalert2 | bb91ecdb03dedda207237ca83d628fd5d40d29c6 | [
"Apache-2.0"
] | 129 | 2021-04-24T17:09:50.000Z | 2022-03-29T08:52:14.000Z | elastalert/alerters/sns.py | perceptron01/elastalert2 | bb91ecdb03dedda207237ca83d628fd5d40d29c6 | [
"Apache-2.0"
] | 128 | 2021-04-25T15:20:34.000Z | 2022-03-31T04:37:49.000Z | import boto3
from elastalert.alerts import Alerter
from elastalert.util import elastalert_logger, EAException
class SnsAlerter(Alerter):
""" Send alert using AWS SNS service """
required_options = frozenset(['sns_topic_arn'])
def __init__(self, *args):
super(SnsAlerter, self).__init__(*args)
... | 36.083333 | 91 | 0.625289 |
7946012c98d27b6de6d23476b1b447e633831fa0 | 348 | py | Python | tests/test_storc.py | cdbethune/d3m-primitives | 5530da1b8efba7de8cec6890401c5d4091acd45a | [
"MIT"
] | null | null | null | tests/test_storc.py | cdbethune/d3m-primitives | 5530da1b8efba7de8cec6890401c5d4091acd45a | [
"MIT"
] | null | null | null | tests/test_storc.py | cdbethune/d3m-primitives | 5530da1b8efba7de8cec6890401c5d4091acd45a | [
"MIT"
] | null | null | null | from kf_d3m_primitives.clustering.k_means.storc_pipeline import StorcPipeline
def _test_fit_produce(dataset):
pipeline = StorcPipeline()
pipeline.write_pipeline()
pipeline.fit_produce(dataset)
pipeline.delete_pipeline()
def test_fit_produce_dataset_chlorine():
_test_fit_produce('66_chlorineCo... | 26.769231 | 77 | 0.804598 |
794601e9665c61f862ce6856c2f2fbfdc14db675 | 422 | py | Python | tests/functional/s3/test_fileformat.py | datavaluepeople/tentaclio | eb6920a0e115c6c08043063a8c1013d812ec34c8 | [
"MIT"
] | 12 | 2019-04-30T16:07:42.000Z | 2021-12-08T08:02:09.000Z | tests/functional/s3/test_fileformat.py | octoenergy/tentaclio | eb6920a0e115c6c08043063a8c1013d812ec34c8 | [
"MIT"
] | 74 | 2019-04-25T11:18:22.000Z | 2022-01-18T11:31:14.000Z | tests/functional/s3/test_fileformat.py | datavaluepeople/tentaclio | eb6920a0e115c6c08043063a8c1013d812ec34c8 | [
"MIT"
] | 4 | 2019-05-05T13:13:21.000Z | 2022-01-14T00:33:07.000Z | import pickle
import tentaclio
def test_pickle(fixture_client):
expected = """
This is a highly convoluted test,
with multiple output...
encountered.
"""
with tentaclio.open("s3://hostname/data.pickle", mode="wb") as f:
pickle.dump(expected, f)
with tentaclio.open("s3://hostnam... | 20.095238 | 69 | 0.646919 |
79460435b15592e5297c2fa1437be47f0f19bc59 | 980 | py | Python | src/second_month/task_2_3.py | NareTorosyan/Python_Introduction_to_Data_Science | 5912ab8ddb147c85f3a798aa9a1ee01aa8a97c40 | [
"Apache-2.0"
] | null | null | null | src/second_month/task_2_3.py | NareTorosyan/Python_Introduction_to_Data_Science | 5912ab8ddb147c85f3a798aa9a1ee01aa8a97c40 | [
"Apache-2.0"
] | null | null | null | src/second_month/task_2_3.py | NareTorosyan/Python_Introduction_to_Data_Science | 5912ab8ddb147c85f3a798aa9a1ee01aa8a97c40 | [
"Apache-2.0"
] | null | null | null | import numpy as np
#1Write a program to find maximum and minimum values of multidimensional NumPY massive
def max_min(array):
return np.max(array), np.min(array)
#2Write a program to find maximum and minimum values of the second column of multidimensional NumPY massive
def max_min_by_2nd_column(array):
return... | 30.625 | 107 | 0.704082 |
794604577aedacd9ff97518decdbc9f421ef7e0c | 204 | py | Python | Student.py | Waine2ge/example | 8d210b4d387025a193626961c4b2e018c988ba1d | [
"Apache-2.0"
] | null | null | null | Student.py | Waine2ge/example | 8d210b4d387025a193626961c4b2e018c988ba1d | [
"Apache-2.0"
] | null | null | null | Student.py | Waine2ge/example | 8d210b4d387025a193626961c4b2e018c988ba1d | [
"Apache-2.0"
] | null | null | null | class Student:
def __init__(self, name, major, gpa, is_on_probation):
self.name = name
self.major = major
self.gpa = gpa
self.is_on_probation = is_on_probation
| 25.5 | 59 | 0.607843 |
794606ff07ee44c194b4226bd3facc03c552150b | 28,862 | py | Python | lib-python/conftest.py | hollmmax/zig | d80baa5a5fcbc82b3e2294b398edc20a98737a52 | [
"MIT"
] | null | null | null | lib-python/conftest.py | hollmmax/zig | d80baa5a5fcbc82b3e2294b398edc20a98737a52 | [
"MIT"
] | null | null | null | lib-python/conftest.py | hollmmax/zig | d80baa5a5fcbc82b3e2294b398edc20a98737a52 | [
"MIT"
] | 1 | 2022-03-30T11:42:37.000Z | 2022-03-30T11:42:37.000Z | """
test configuration(s) for running CPython's regression
test suite on top of PyPy
"""
import py
import pytest
import sys
import re
import pypy
from pypy.interpreter.gateway import ApplevelClass
from pypy.interpreter.error import OperationError
from pypy.interpreter.module import Module as PyPyModule
from pypy.inte... | 40.030513 | 104 | 0.65983 |
7946073a8994e0c05f717aaac9ef034a00662aff | 1,911 | py | Python | old-approach/vgg19.py | Addi-11/Neural_Style_Transfer | 7570eb7deaaea5c18f58e908ac94319d87b3934d | [
"MIT"
] | null | null | null | old-approach/vgg19.py | Addi-11/Neural_Style_Transfer | 7570eb7deaaea5c18f58e908ac94319d87b3934d | [
"MIT"
] | 1 | 2020-07-17T22:59:06.000Z | 2020-07-17T22:59:06.000Z | old-approach/vgg19.py | Addi-11/Neural_Style_Transfer | 7570eb7deaaea5c18f58e908ac94319d87b3934d | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
import scipy.io
import scipy.misc
from utils import CONFIG
class VGG19:
vgg = scipy.io.loadmat(CONFIG.PRE_TRAINED_PATH)
vgg_layers = vgg['layers']
def _weights(self, layer, name):
# matconvnet: weights are [width, height, in_channels, out_channels]
# tensorflow: wei... | 27.695652 | 128 | 0.701727 |
794607ae03df301f89cd93bb71468bbe14414272 | 5,685 | py | Python | Sudoku/sudoku.py | ancientHacker/sudoku-generator | a1b395cef2cc699951e17e56fc699df83309d5e1 | [
"MIT"
] | 4 | 2020-03-29T20:10:52.000Z | 2021-01-04T07:46:21.000Z | Sudoku/sudoku.py | ancientHacker/sudoku-generator | a1b395cef2cc699951e17e56fc699df83309d5e1 | [
"MIT"
] | null | null | null | Sudoku/sudoku.py | ancientHacker/sudoku-generator | a1b395cef2cc699951e17e56fc699df83309d5e1 | [
"MIT"
] | 6 | 2019-07-05T14:54:42.000Z | 2022-01-28T10:34:05.000Z | # MIT License
#
# Copyright (c) 2018-2019 Daniel Brotsky
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify,... | 41.801471 | 112 | 0.625154 |
794608b7f3d6009a330d04a38e8055c191b3981d | 3,706 | py | Python | p2ptracker/tests/test_torrents.py | TMG-nl/p2ptracker | 0e6e77eac77de3fa4f15443920bc6f6886b129b4 | [
"MIT"
] | 5 | 2015-04-29T04:55:21.000Z | 2017-10-27T08:51:56.000Z | p2ptracker/tests/test_torrents.py | TMG-nl/p2ptracker | 0e6e77eac77de3fa4f15443920bc6f6886b129b4 | [
"MIT"
] | null | null | null | p2ptracker/tests/test_torrents.py | TMG-nl/p2ptracker | 0e6e77eac77de3fa4f15443920bc6f6886b129b4 | [
"MIT"
] | null | null | null | """
https://github.com/hyves-org/p2ptracker
Copyright (c) 2011, Ramon van Alteren
MIT license: http://www.opensource.org/licenses/MIT
"""
from __future__ import with_statement
from flaskext.testing import TestCase
from p2ptracker import create_app
from p2ptracker.tests.helpers import utils
import os
import logging
i... | 33.690909 | 93 | 0.621425 |
79460988779aab163b4ca21f92f2794eb5abe65d | 676 | py | Python | MTG/combat.py | wanqizhu/mtg-python-engine | fb68edd9f7a99643c30f70042caf9513cf71493d | [
"MIT"
] | 25 | 2017-11-15T18:08:24.000Z | 2021-11-20T07:11:25.000Z | MTG/combat.py | wanqizhu/mtg-python-engine | fb68edd9f7a99643c30f70042caf9513cf71493d | [
"MIT"
] | 1 | 2020-08-03T03:04:27.000Z | 2020-08-19T14:53:49.000Z | MTG/combat.py | wanqizhu/mtg-python-engine | fb68edd9f7a99643c30f70042caf9513cf71493d | [
"MIT"
] | 7 | 2018-03-04T06:56:53.000Z | 2022-02-03T20:11:33.000Z | # def fight(creature1, creature2):
# creature1.deals_damage(creature2, creature1.power)
# creature2.deals_damage(creature1, creature2.power)
def check_valid_attack(attacker):
# TODO: can't attack alone
return True
def check_valid_block(attacker, defender):
for creature in defender.battlefield:
... | 30.727273 | 67 | 0.692308 |
794609ed83551b7f89023dd3f787f6b99c885912 | 1,967 | py | Python | regreg/affine/tests/test_fused_lasso.py | matthew-brett/regreg | 8a10a79cbaf771c2a6d70e8094ab753ec075aab7 | [
"BSD-3-Clause"
] | null | null | null | regreg/affine/tests/test_fused_lasso.py | matthew-brett/regreg | 8a10a79cbaf771c2a6d70e8094ab753ec075aab7 | [
"BSD-3-Clause"
] | null | null | null | regreg/affine/tests/test_fused_lasso.py | matthew-brett/regreg | 8a10a79cbaf771c2a6d70e8094ab753ec075aab7 | [
"BSD-3-Clause"
] | null | null | null | from itertools import product
import numpy as np
import scipy.sparse
import regreg.api as rr
import regreg.affine.fused_lasso as FL
from regreg.identity_quadratic import identity_quadratic as sq
import nose.tools as nt
def test_class():
p = 50
for order in range(1,3):
fused = FL.trend_filter.grid(p, o... | 42.76087 | 87 | 0.699034 |
79460a3c372aeb32fb8e23c48769ce0619bf540f | 972 | py | Python | azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/network_interface_paged.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/network_interface_paged.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-network/azure/mgmt/network/v2018_02_01/models/network_interface_paged.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2018-08-28T14:36:47.000Z | 2018-08-28T14:36:47.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 34.714286 | 141 | 0.589506 |
79460ad4bd0b71bae5136db4cdd0637bb2a1dbdf | 7,201 | py | Python | vendor/bundle/ruby/2.0.0/gems/pygments.rb-1.1.2/vendor/pygments-main/pygments/lexers/algebra.py | apaigesh/apaigesh.github.io | c79e576c8fb620c9b5cb3cc812e76d1f897a1c37 | [
"MIT"
] | null | null | null | vendor/bundle/ruby/2.0.0/gems/pygments.rb-1.1.2/vendor/pygments-main/pygments/lexers/algebra.py | apaigesh/apaigesh.github.io | c79e576c8fb620c9b5cb3cc812e76d1f897a1c37 | [
"MIT"
] | null | null | null | vendor/bundle/ruby/2.0.0/gems/pygments.rb-1.1.2/vendor/pygments-main/pygments/lexers/algebra.py | apaigesh/apaigesh.github.io | c79e576c8fb620c9b5cb3cc812e76d1f897a1c37 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
pygments.lexers.algebra
~~~~~~~~~~~~~~~~~~~~~~~
Lexers for computer algebra systems.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, bygroups, words
from py... | 32.436937 | 81 | 0.404527 |
79460d13d383fc3be1b7522d870376052d109664 | 4,618 | py | Python | api/spotify.py | SivertUtne/novatorem | d2f66a1821553082cf6c15e2cfc46d23383e9492 | [
"Unlicense"
] | null | null | null | api/spotify.py | SivertUtne/novatorem | d2f66a1821553082cf6c15e2cfc46d23383e9492 | [
"Unlicense"
] | null | null | null | api/spotify.py | SivertUtne/novatorem | d2f66a1821553082cf6c15e2cfc46d23383e9492 | [
"Unlicense"
] | null | null | null | import os
import random
import requests
from base64 import b64encode
from dotenv import load_dotenv, find_dotenv
from flask import Flask, Response, render_template
load_dotenv(find_dotenv())
SPOTIFY_CLIENT_ID = os.getenv("SPOTIFY_CLIENT_ID")
SPOTIFY_SECRET_ID = os.getenv("SPOTIFY_SECRET_ID")
SPOTIFY_REFRESH_TOKEN = o... | 32.293706 | 115 | 0.628844 |
79460db734241f76873ff2d11851a2927027fe9e | 4,470 | py | Python | src/webapp/highscore.py | NullVoxPopuli/html5tetris | b2cea0e189128a441af1249f3a2cc5e9918c270e | [
"Apache-2.0"
] | null | null | null | src/webapp/highscore.py | NullVoxPopuli/html5tetris | b2cea0e189128a441af1249f3a2cc5e9918c270e | [
"Apache-2.0"
] | null | null | null | src/webapp/highscore.py | NullVoxPopuli/html5tetris | b2cea0e189128a441af1249f3a2cc5e9918c270e | [
"Apache-2.0"
] | 1 | 2021-03-23T18:06:32.000Z | 2021-03-23T18:06:32.000Z | import cgi
import datetime
import urllib
import wsgiref.handlers
import random
import datetime
from django.utils import simplejson
from google.appengine.ext import db
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
class Score(db.Model):
name=db.StringProperty()
... | 32.867647 | 110 | 0.575839 |
79460e2a91d222779ba4f1b7255c78da291c05d3 | 1,548 | py | Python | Python/pyworkout/comprehensions/ex29_mod2.py | honchardev/Fun | ca7c0076e9bb3017c5d7e89aa7d5bd54a83c8ecc | [
"MIT"
] | null | null | null | Python/pyworkout/comprehensions/ex29_mod2.py | honchardev/Fun | ca7c0076e9bb3017c5d7e89aa7d5bd54a83c8ecc | [
"MIT"
] | 3 | 2020-03-24T16:26:35.000Z | 2020-04-15T19:40:41.000Z | Python/pyworkout/comprehensions/ex29_mod2.py | honchardev/Fun | ca7c0076e9bb3017c5d7e89aa7d5bd54a83c8ecc | [
"MIT"
] | null | null | null | from typing import List
from string import digits
def number_is_valid(
number: str
) -> bool:
separator = '-'
area_code, telephone_prefix, line_number = \
number.split(sep=separator, maxsplit=3)
length_validators = [
len(area_code) != 3,
len(telephone_prefix) != 3,
len... | 22.434783 | 74 | 0.653747 |
79460f3dd7c9d09746dbac8430597aaa1ec4b32e | 2,586 | py | Python | crazy_crawler/crazy_crawler/spiders/crazy_spider.py | Tabuyos/crazy-crawler | 2cc2c86855d32d682b218414764402b89abcafdf | [
"MIT"
] | null | null | null | crazy_crawler/crazy_crawler/spiders/crazy_spider.py | Tabuyos/crazy-crawler | 2cc2c86855d32d682b218414764402b89abcafdf | [
"MIT"
] | null | null | null | crazy_crawler/crazy_crawler/spiders/crazy_spider.py | Tabuyos/crazy-crawler | 2cc2c86855d32d682b218414764402b89abcafdf | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
@Author Tabuyos
@Time 2020/10/9 10:10
@Site www.tabuyos.com
@Email tabuyos@outlook.com
@Description
"""
import os
from os.path import abspath
from scrapy import Spider, Request
from op_json.op_json import OperateJson
class CrazySpider(Spider):
project_name = "c... | 42.393443 | 120 | 0.621036 |
79461082acd20c805edfa051ba755789194a6e6d | 11,000 | py | Python | homeassistant/components/bmw_connected_drive/__init__.py | DavidDeSloovere/core | 909a20b36d4df6724c955c2ae28cb82fe6d50c2e | [
"Apache-2.0"
] | 4 | 2020-08-10T20:02:24.000Z | 2022-01-31T02:14:22.000Z | homeassistant/components/bmw_connected_drive/__init__.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 78 | 2020-07-23T07:13:08.000Z | 2022-03-31T06:02:04.000Z | homeassistant/components/bmw_connected_drive/__init__.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 3 | 2022-01-17T20:10:54.000Z | 2022-01-17T20:17:22.000Z | """Reads vehicle status from BMW connected drive portal."""
from __future__ import annotations
import logging
from bimmer_connected.account import ConnectedDriveAccount
from bimmer_connected.country_selector import get_region_from_name
import voluptuous as vol
from homeassistant.components.notify import DOMAIN as NO... | 31.428571 | 90 | 0.668818 |
794610ad8a46ae35b3bc2c63fae2e1c2b60d96b6 | 1,849 | py | Python | python/tree/fenwick_tree.py | MacSimmy/algo-and-data-structure | 424ce425ed2205522de17cfddefcdb90fc9fb777 | [
"Apache-2.0"
] | 11,393 | 2015-01-23T20:01:53.000Z | 2022-03-31T18:50:32.000Z | python/tree/fenwick_tree.py | BiswajitMahato/interview | 94be5deb0c0df30ade2a569cf3056b7cc1e012f4 | [
"Apache-2.0"
] | 128 | 2015-06-28T03:01:12.000Z | 2022-01-04T17:27:36.000Z | python/tree/fenwick_tree.py | BiswajitMahato/interview | 94be5deb0c0df30ade2a569cf3056b7cc1e012f4 | [
"Apache-2.0"
] | 5,893 | 2015-01-07T19:48:31.000Z | 2022-03-31T02:41:32.000Z | #################################################################################################################################
#Implementation of Binary Indexed Tree OR Fenwick Tree
#Time Complexities:
# Construction of Tree: O (n.log (n))
# Updating an element: O (log (n))
# Prefix Query (sum of elements 0 to i) or... | 33.618182 | 129 | 0.540833 |
794610b6887174483993c9b87b34aaabd33d61f2 | 1,251 | py | Python | azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-devtestlabs/azure/mgmt/devtestlabs/models/port.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 35.742857 | 76 | 0.611511 |
794610f5c813d2603fadeacc557ddd7d12e88795 | 1,191 | py | Python | Python/robot-return-to-origin.py | RideGreg/LeetCode | b70818b1e6947bf29519a24f78816e022ebab59e | [
"MIT"
] | 1 | 2022-01-30T06:55:28.000Z | 2022-01-30T06:55:28.000Z | Python/robot-return-to-origin.py | RideGreg/LeetCode | b70818b1e6947bf29519a24f78816e022ebab59e | [
"MIT"
] | null | null | null | Python/robot-return-to-origin.py | RideGreg/LeetCode | b70818b1e6947bf29519a24f78816e022ebab59e | [
"MIT"
] | 1 | 2021-12-31T03:56:39.000Z | 2021-12-31T03:56:39.000Z | # Time: O(n)
# Space: O(1)
# Initially, there is a Robot at position (0, 0). Given a sequence of its moves,
# judge if this robot makes a circle, which means it moves back to the original place.
#
# The move sequence is represented by a string. And each move is represent by a character.
# The valid robot moves are R ... | 25.340426 | 90 | 0.528128 |
7946117131373ba2ba5e193685e65b97feec2d93 | 12,716 | py | Python | gordon/resources/s3.py | patgoley/gordon | 4c1cd0c4dea2499d98115672095714592f80f7aa | [
"BSD-3-Clause"
] | 2,204 | 2016-06-02T07:47:45.000Z | 2022-03-29T15:57:28.000Z | gordon/resources/s3.py | patgoley/gordon | 4c1cd0c4dea2499d98115672095714592f80f7aa | [
"BSD-3-Clause"
] | 159 | 2016-06-02T11:04:20.000Z | 2020-08-26T09:07:36.000Z | gordon/resources/s3.py | ericblade/gordon | 0cf326db916b3528eae80ad3c732d8732079a2a6 | [
"BSD-3-Clause"
] | 188 | 2016-06-02T10:58:00.000Z | 2021-11-01T08:15:14.000Z | import re
from collections import defaultdict, Counter
import six
import troposphere
from troposphere import sqs, sns, awslambda
from . import base
from gordon import exceptions
from gordon import utils
from gordon.actions import Ref
from gordon.contrib.s3.resources import (
S3BucketNotificationConfiguration,
... | 37.510324 | 119 | 0.562126 |
794614446a56a2a63403c9b59790bed66db50444 | 872 | py | Python | setup.py | StanfordAHA/Lake | 34df001db107e1a0824b7fdb05b9f2145bf49a3e | [
"BSD-3-Clause"
] | 11 | 2019-10-14T02:05:38.000Z | 2022-03-10T14:10:22.000Z | setup.py | StanfordAHA/Lake | 34df001db107e1a0824b7fdb05b9f2145bf49a3e | [
"BSD-3-Clause"
] | 29 | 2019-09-02T05:49:40.000Z | 2022-02-26T00:57:54.000Z | setup.py | StanfordAHA/Lake | 34df001db107e1a0824b7fdb05b9f2145bf49a3e | [
"BSD-3-Clause"
] | 1 | 2021-04-16T20:26:13.000Z | 2021-04-16T20:26:13.000Z | from setuptools import setup, find_packages
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name='lake-aha',
version="0.0.4",
author='Maxwell Strange',
author_email='mstrange@stanford.edu',
description='Memory Generator based on Kratos: The God of War.'... | 24.222222 | 68 | 0.580275 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.