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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cc37dfa33a663a02ada364c1ee333a355dde9511 | 1,655 | py | Python | pyvisdk/do/weekly_task_scheduler.py | Infinidat/pyvisdk | f2f4e5f50da16f659ccc1d84b6a00f397fa997f8 | [
"MIT"
] | null | null | null | pyvisdk/do/weekly_task_scheduler.py | Infinidat/pyvisdk | f2f4e5f50da16f659ccc1d84b6a00f397fa997f8 | [
"MIT"
] | null | null | null | pyvisdk/do/weekly_task_scheduler.py | Infinidat/pyvisdk | f2f4e5f50da16f659ccc1d84b6a00f397fa997f8 | [
"MIT"
] | null | null | null |
import logging
from pyvisdk.exceptions import InvalidArgumentError
########################################
# Automatically generated, do not edit.
########################################
log = logging.getLogger(__name__)
def WeeklyTaskScheduler(vim, *args, **kwargs):
'''The WeeklyTaskScheduler data object set... | 40.365854 | 124 | 0.653172 |
f679b579d3321d256521b0996472668f3ab5880b | 742 | py | Python | examples/src/Presentations/Properties/CheckPasswordExample.py | aspose-slides/Aspose.Slides-for-Python-via-.NET | c55ad5c71f942598f1e67e22a52cbcd1cb286467 | [
"MIT"
] | null | null | null | examples/src/Presentations/Properties/CheckPasswordExample.py | aspose-slides/Aspose.Slides-for-Python-via-.NET | c55ad5c71f942598f1e67e22a52cbcd1cb286467 | [
"MIT"
] | null | null | null | examples/src/Presentations/Properties/CheckPasswordExample.py | aspose-slides/Aspose.Slides-for-Python-via-.NET | c55ad5c71f942598f1e67e22a52cbcd1cb286467 | [
"MIT"
] | null | null | null | import aspose.slides as slides
def props_check_password():
# The example below demonstrates how to check a password to open a presentation
#Path for source presentation
dataDir = "./examples/data/"
outDir = "./examples/out/"
# Check the Password via IPresentationInfo Interface
presentationInf... | 46.375 | 121 | 0.756065 |
ec328de9d817cb86073ffd3e50c4ded94949752d | 2,071 | py | Python | trees/interview_questions/binary_search_tree_check.py | vcelis/python-data-structures-algorithms-interviews | 41e21968e3fd35a4a04b45ce68a0a6c952cfca92 | [
"MIT"
] | null | null | null | trees/interview_questions/binary_search_tree_check.py | vcelis/python-data-structures-algorithms-interviews | 41e21968e3fd35a4a04b45ce68a0a6c952cfca92 | [
"MIT"
] | null | null | null | trees/interview_questions/binary_search_tree_check.py | vcelis/python-data-structures-algorithms-interviews | 41e21968e3fd35a4a04b45ce68a0a6c952cfca92 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''Binary Search Tree Check
Given a binary tree, check whether it’s a binary search tree or not.
'''
from nose.tools import assert_equal
class BinaryTree():
def __init__(self, root_obj):
self.key = root_obj
self.left_child = None
self.right_... | 24.081395 | 68 | 0.574119 |
88a1ab42c92b04c55d81f6d737f7f09fb9d01b5b | 5,066 | py | Python | tensorflow_transform/tf_metadata/dataset_schema.py | devidipak/transform | 56efe455b29fa3d0a29ce2f8872adc41ed6012c3 | [
"Apache-2.0"
] | null | null | null | tensorflow_transform/tf_metadata/dataset_schema.py | devidipak/transform | 56efe455b29fa3d0a29ce2f8872adc41ed6012c3 | [
"Apache-2.0"
] | null | null | null | tensorflow_transform/tf_metadata/dataset_schema.py | devidipak/transform | 56efe455b29fa3d0a29ce2f8872adc41ed6012c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 33.773333 | 106 | 0.726806 |
3c9f59ac5503670d6b8e2165afd5d7a25b00dde7 | 852 | py | Python | instacat/urls.py | merhan-mohamed/CREATE-INSTAGRAM-LIKE-APP-IN-PYTHON-DJANGO-Find-projects | 94e92faff4970b7d7e9e5e7c8c1e000a00a41ce7 | [
"MIT"
] | 1 | 2022-02-04T19:20:08.000Z | 2022-02-04T19:20:08.000Z | instacat/urls.py | merhan-mohamed/CREATE-INSTAGRAM-LIKE-APP-IN-PYTHON-DJANGO-Find-projects | 94e92faff4970b7d7e9e5e7c8c1e000a00a41ce7 | [
"MIT"
] | 2 | 2020-05-01T08:16:32.000Z | 2020-07-21T12:55:15.000Z | instacat/urls.py | merhan-mohamed/CREATE-INSTAGRAM-LIKE-APP-IN-PYTHON-DJANGO-Find-projects | 94e92faff4970b7d7e9e5e7c8c1e000a00a41ce7 | [
"MIT"
] | null | null | null | """instacat URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/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')
Cl... | 31.555556 | 78 | 0.681925 |
c7d8a0edd3b3bf9645b20ca5967a8abf480617ab | 5,932 | py | Python | nightlightpi/config.py | jmb/NightLightPi | 82f5d37a35e3457e31ca100524011908e5b33c4d | [
"MIT"
] | 2 | 2018-10-01T21:45:22.000Z | 2020-07-26T09:07:09.000Z | nightlightpi/config.py | jmb/NightLightPi | 82f5d37a35e3457e31ca100524011908e5b33c4d | [
"MIT"
] | 4 | 2017-09-29T19:19:07.000Z | 2019-10-08T05:15:29.000Z | nightlightpi/config.py | jmb/NightLightPi | 82f5d37a35e3457e31ca100524011908e5b33c4d | [
"MIT"
] | 4 | 2017-10-08T22:08:25.000Z | 2019-10-20T06:03:47.000Z | # -*- coding: utf-8; -*-
"""Handle configuration file loading and fallback behaviors.
This module exports the load_config method which will attempt to load
application configuration from disk. It will first check to see if an
environment variable has been set to indicate the path of the config
file. If the environment... | 30.265306 | 106 | 0.710216 |
7f9ff188f20997e0a7864f8c3b5866169f47372a | 1,609 | py | Python | salt/modules/sapcarmod.py | aleksei-burlakov/salt-shaptools | a3e16de2380f3255e92c5e6e1b5c4f28acc52e8b | [
"Apache-2.0"
] | 9 | 2019-10-31T23:30:35.000Z | 2022-02-04T02:41:59.000Z | salt/modules/sapcarmod.py | aleksei-burlakov/salt-shaptools | a3e16de2380f3255e92c5e6e1b5c4f28acc52e8b | [
"Apache-2.0"
] | 42 | 2019-04-25T12:07:40.000Z | 2022-03-31T14:19:23.000Z | salt/modules/sapcarmod.py | aleksei-burlakov/salt-shaptools | a3e16de2380f3255e92c5e6e1b5c4f28acc52e8b | [
"Apache-2.0"
] | 10 | 2019-05-08T22:23:24.000Z | 2021-07-21T07:49:58.000Z | # -*- coding: utf-8 -*-
'''
Module to provide SAP tools functionality to Salt
.. versionadded:: pending
:maintainer: Simranpal Singh <sisingh@suse.com>
:maturity: alpha
:depends: ``shaptools`` Python module
:platform: all
:configuration: This module requires the shaptools package
'''
# Import Py... | 24.753846 | 100 | 0.68179 |
835f251026a762d06eef5c926f17ceb315a07f29 | 6,534 | py | Python | tools/inference_for_coco.py | tyunist/FPN_Tensorflow | ec8b746e539994b28a7d949040c597c543c5f8d5 | [
"MIT"
] | 374 | 2018-12-02T06:59:44.000Z | 2022-03-15T10:34:00.000Z | tools/inference_for_coco.py | tyunist/FPN_Tensorflow | ec8b746e539994b28a7d949040c597c543c5f8d5 | [
"MIT"
] | 157 | 2018-12-02T07:37:39.000Z | 2022-03-16T09:49:11.000Z | tools/inference_for_coco.py | tyunist/FPN_Tensorflow | ec8b746e539994b28a7d949040c597c543c5f8d5 | [
"MIT"
] | 141 | 2018-12-12T11:57:59.000Z | 2022-02-28T13:12:58.000Z | # -*- coding:utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import os, sys
import tensorflow as tf
import time
import cv2
import pickle
import numpy as np
sys.path.append("../")
sys.path.insert(0, '/home/yjr/PycharmProjects/Faster-RCNN_TF/data/li... | 36.3 | 111 | 0.591062 |
5d60d7c525bbffd6e1ab1b7eb020b48d41605955 | 6,705 | py | Python | baselines/arch/layoutvae/bboxVAE.py | atmacvit/meronymnet | 47e1a7caadc0f770439bb26a93b885f790f62804 | [
"MIT"
] | 1 | 2021-11-02T05:13:12.000Z | 2021-11-02T05:13:12.000Z | baselines/arch/layoutvae/bboxVAE.py | atmacvit/meronymnet | 47e1a7caadc0f770439bb26a93b885f790f62804 | [
"MIT"
] | 1 | 2021-12-17T14:29:18.000Z | 2021-12-17T14:29:18.000Z | baselines/arch/layoutvae/bboxVAE.py | atmacvit/meronymnet | 47e1a7caadc0f770439bb26a93b885f790f62804 | [
"MIT"
] | null | null | null | import tensorflow as tf
from tensorflow.keras.layers import Concatenate, Dense, LSTM, Input, Layer
from tensorflow.keras import Model
import numpy as np
def ConditioningInputModel(n_labels, is_class_condition=False):
label_set_count = Input(shape=(n_labels,))
curr_label = Input(shape=(n_labels,))
previous... | 37.458101 | 193 | 0.644295 |
892109cc3c001173bd3a73fca24209f66a23bf61 | 841 | py | Python | main.py | waynenilsen/VectorStrength | e42ef8a513e6770ac56a6cbc80e19cdd404e0ec6 | [
"MIT"
] | null | null | null | main.py | waynenilsen/VectorStrength | e42ef8a513e6770ac56a6cbc80e19cdd404e0ec6 | [
"MIT"
] | null | null | null | main.py | waynenilsen/VectorStrength | e42ef8a513e6770ac56a6cbc80e19cdd404e0ec6 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import database
from flask import Flask, render_template, request, abort
app = Flask(__name__)
@app.route("/")
def hello():
return render_template('sensors.html')
@app.route('/data', methods=['GET', 'POST'])
def post_data():
if request.method == 'POST':
data = request.get_json()... | 22.72973 | 56 | 0.652794 |
db96b587b7e0e7b6f0ba69a3cd404dd5a4e57a47 | 11,434 | py | Python | okl4_kernel/okl4_2.1.1-patch.9/tools/pyelf/weaver/rootprogram_xml.py | CyberQueenMara/baseband-research | e1605537e10c37e161fff1a3416b908c9894f204 | [
"MIT"
] | 77 | 2018-12-31T22:12:09.000Z | 2021-12-31T22:56:13.000Z | okl4_kernel/okl4_2.1.1-patch.9/tools/pyelf/weaver/rootprogram_xml.py | CyberQueenMara/baseband-research | e1605537e10c37e161fff1a3416b908c9894f204 | [
"MIT"
] | null | null | null | okl4_kernel/okl4_2.1.1-patch.9/tools/pyelf/weaver/rootprogram_xml.py | CyberQueenMara/baseband-research | e1605537e10c37e161fff1a3416b908c9894f204 | [
"MIT"
] | 24 | 2019-01-20T15:51:52.000Z | 2021-12-25T18:29:13.000Z | ##############################################################################
# Copyright (c) 2007 Open Kernel Labs, Inc. (Copyright Holder).
# All rights reserved.
#
# 1. Redistribution and use of OKL4 (Software) in source and binary
# forms, with or without modification, are permitted provided that the
# following ... | 41.729927 | 100 | 0.606699 |
59f863ed9958597bb869596437ab39082a0e5bb7 | 2,114 | py | Python | src/deeplearning/QuantumDataset.py | philipco/mcm-bidirectional-compression | 64f9d1cb2f302e948d8331477e5ef8f4fc7d872f | [
"MIT"
] | null | null | null | src/deeplearning/QuantumDataset.py | philipco/mcm-bidirectional-compression | 64f9d1cb2f302e948d8331477e5ef8f4fc7d872f | [
"MIT"
] | null | null | null | src/deeplearning/QuantumDataset.py | philipco/mcm-bidirectional-compression | 64f9d1cb2f302e948d8331477e5ef8f4fc7d872f | [
"MIT"
] | null | null | null | """
Created by Philippenko, 13rd May 2021.
"""
import itertools
import torch
from torch.utils.data import Dataset
from src.utils.Utilities import get_project_root, create_folder_if_not_existing
from src.utils.data.RealDatasetPreparation import prepare_quantum
class QuantumDataset(Dataset):
def __init__(self, t... | 32.030303 | 156 | 0.574267 |
3b1716217017764bfa156dbe791b5396f73a6bca | 1,506 | py | Python | server.py | kanishk98/transaction-scheduler | 778f3f59704623ad53c008d28ea64e2e3665aa1e | [
"MIT"
] | null | null | null | server.py | kanishk98/transaction-scheduler | 778f3f59704623ad53c008d28ea64e2e3665aa1e | [
"MIT"
] | 1 | 2018-10-07T21:46:33.000Z | 2018-10-08T04:56:08.000Z | server.py | kanishk98/transaction-scheduler | 778f3f59704623ad53c008d28ea64e2e3665aa1e | [
"MIT"
] | null | null | null | from flask import Flask, request
import json
from request_handler import send_to_scheduler
import fifo
import ldsf
from datamodel import Operation, Item, Schedule
import jsonpickle
import time
operations = []
app = Flask(__name__)
@app.route('/add-operation', methods=['POST'])
def add_operation():
arr = json.loads... | 25.1 | 60 | 0.687251 |
6d6ea046537ab7c86e729213e35002ea3ad32eb1 | 1,144 | py | Python | benchmarks/utils.py | insolor/pymorphy2 | 92d546f042ff14601376d3646242908d5ab786c1 | [
"MIT"
] | 859 | 2015-01-05T00:48:23.000Z | 2022-03-19T07:42:23.000Z | benchmarks/utils.py | insolor/pymorphy2 | 92d546f042ff14601376d3646242908d5ab786c1 | [
"MIT"
] | 106 | 2015-01-03T12:21:56.000Z | 2022-03-30T11:07:46.000Z | benchmarks/utils.py | insolor/pymorphy2 | 92d546f042ff14601376d3646242908d5ab786c1 | [
"MIT"
] | 118 | 2015-01-05T21:10:35.000Z | 2022-03-15T14:29:29.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals, division
import time
import timeit
import gc
def measure(func, inner_iterations=1, repeats=5):
"""
Runs func ``repeats`` times and returns the fastest speed
(inner loop iterations per second). Use ``inner_iterations`` to spec... | 26 | 75 | 0.648601 |
bd54505836347ab30425ef887fda27a22860ea85 | 1,037 | py | Python | setup.py | hephex/asyncache | 27ec0ad90ccb2a86ffaa8dcf55bb388059b484a0 | [
"MIT"
] | 44 | 2018-12-14T00:03:40.000Z | 2022-03-31T07:42:37.000Z | setup.py | hephex/asyncache | 27ec0ad90ccb2a86ffaa8dcf55bb388059b484a0 | [
"MIT"
] | 2 | 2020-09-28T10:55:42.000Z | 2020-10-27T01:23:49.000Z | setup.py | hephex/asyncache | 27ec0ad90ccb2a86ffaa8dcf55bb388059b484a0 | [
"MIT"
] | 2 | 2020-11-27T15:16:57.000Z | 2022-02-13T06:12:00.000Z | from setuptools import find_packages, setup
setup(
name="asyncache",
version="0.1.1",
url="https://github.com/hephex/asyncache",
license="MIT",
author="Hephex",
description="Helpers to use cachetools with async functions",
long_description=open("README.rst").read(),
keywords="cache cac... | 37.035714 | 71 | 0.641273 |
58acfa03d5c545e4d28f6806649dbe09bdc5025f | 1,452 | py | Python | Jokenpo.py | Graziela-Silva/Jogos-Games | 48d8dd45f8471cd3ec1a79747183987ceb0a4630 | [
"MIT"
] | null | null | null | Jokenpo.py | Graziela-Silva/Jogos-Games | 48d8dd45f8471cd3ec1a79747183987ceb0a4630 | [
"MIT"
] | null | null | null | Jokenpo.py | Graziela-Silva/Jogos-Games | 48d8dd45f8471cd3ec1a79747183987ceb0a4630 | [
"MIT"
] | null | null | null | import random
print('*'*25)
print('Vamos jogar jokenpô!!')
opcoes = ['Pedra','Papel','Tesoura']
computador = random.choice(opcoes).lower()
usuario = str(input('Sua escolha: ')).lower().strip()
while usuario != 'pedra' and usuario != 'papel' and usuario != 'tesoura':
print('No jokenpô as opções de escolha são apena... | 46.83871 | 80 | 0.663223 |
033f3f8d2b25f6c01d93ddd8b9ea1c8a9fa70504 | 7,139 | py | Python | python/ccxt/async/paymium.py | morgwn-shaw/bttb | a0e8dac53f233f747ad1c50c13a1d4b2d0ca14a5 | [
"MIT"
] | 3 | 2017-11-19T22:08:29.000Z | 2018-02-21T11:14:41.000Z | python/ccxt/async/paymium.py | morgwn-shaw/bttb | a0e8dac53f233f747ad1c50c13a1d4b2d0ca14a5 | [
"MIT"
] | null | null | null | python/ccxt/async/paymium.py | morgwn-shaw/bttb | a0e8dac53f233f747ad1c50c13a1d4b2d0ca14a5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from ccxt.async.base.exchange import Exchange
from ccxt.base.errors import ExchangeError
class paymium (Exchange):
def describe(self):
return self.deep_extend(super(paymium, self).describe(), {
'id': 'paymium',
'name': 'Paymium',
'countries': [... | 37.376963 | 126 | 0.470094 |
3b5d2bebe768720085d85710dec7af5d6db3a64a | 4,765 | py | Python | ariadne/contrib/tracing/opentracing.py | d-danilkin/ariadne | 62b1363752394439f21d8be1b48074b4ba280493 | [
"BSD-3-Clause"
] | 1,778 | 2018-07-09T09:54:24.000Z | 2022-03-31T18:22:56.000Z | ariadne/contrib/tracing/opentracing.py | d-danilkin/ariadne | 62b1363752394439f21d8be1b48074b4ba280493 | [
"BSD-3-Clause"
] | 639 | 2018-07-12T12:39:25.000Z | 2022-03-28T04:02:52.000Z | ariadne/contrib/tracing/opentracing.py | d-danilkin/ariadne | 62b1363752394439f21d8be1b48074b4ba280493 | [
"BSD-3-Clause"
] | 154 | 2018-08-10T18:50:49.000Z | 2022-03-31T17:48:14.000Z | import cgi
import os
from functools import partial
from inspect import isawaitable
from typing import Any, Callable, Dict, Optional, Union
from graphql import GraphQLResolveInfo
from opentracing import Scope, Tracer, global_tracer
from opentracing.ext import tags
from starlette.datastructures import UploadFile
from .... | 34.280576 | 87 | 0.656243 |
5a7ee169ab706b3dd4e65494eb39d6df9932d6a2 | 772 | py | Python | dictances/pearson.py | DavidBerdik/dictances | 7b804b62032bbdecc8e73946cf74b171681fe4f5 | [
"MIT"
] | 30 | 2018-08-30T16:00:14.000Z | 2022-03-14T14:36:17.000Z | dictances/pearson.py | DavidBerdik/dictances | 7b804b62032bbdecc8e73946cf74b171681fe4f5 | [
"MIT"
] | 6 | 2019-06-18T15:37:23.000Z | 2021-04-15T12:40:42.000Z | dictances/pearson.py | DavidBerdik/dictances | 7b804b62032bbdecc8e73946cf74b171681fe4f5 | [
"MIT"
] | 6 | 2019-02-10T23:22:25.000Z | 2020-10-01T16:25:40.000Z | """Return the nth power distance beetween a and b."""
from math import sqrt
from typing import Dict
def pearson(a: Dict, b: Dict)->float:
"""Return the nth power distance beetween a and b."""
bget = b.get
ab = 0
n_mul = 0
a_sum = 0
b_sum = 0
a_sum2 = 0
b_sum2 = 0
for k, a_val in a... | 22.057143 | 117 | 0.537565 |
b6648e6d55217c4be576e9045d14df741e7ea8c3 | 167 | py | Python | examples/more_custom_filters/filter_patriots2.py | jsnavarr/dactyl | 70adf8c562161a96d4ab99964541027dfae329e0 | [
"MIT"
] | 61 | 2017-03-22T09:21:02.000Z | 2021-12-16T21:23:41.000Z | examples/more_custom_filters/filter_patriots2.py | jsnavarr/dactyl | 70adf8c562161a96d4ab99964541027dfae329e0 | [
"MIT"
] | 61 | 2017-02-22T01:07:25.000Z | 2022-02-24T01:08:46.000Z | examples/more_custom_filters/filter_patriots2.py | jsnavarr/dactyl | 70adf8c562161a96d4ab99964541027dfae329e0 | [
"MIT"
] | 28 | 2017-05-29T13:20:06.000Z | 2022-03-26T16:42:20.000Z | ## 'Patriots' custom filter v2
def filter_markdown(md, **kwargs):
s = md.replace("patriots", "la-li-lu-le-lo")
return s.replace("Patriots", "La-Li-Lu-Le-Lo")
| 27.833333 | 50 | 0.646707 |
2796cce0579b36c39e1d1c9286a159b59b02008d | 1,136 | py | Python | api_request/request.py | felixwortmann/tweeKaLytics | 1930147d5e09f559c1c5490b32ef8821c86decbe | [
"MIT"
] | 2 | 2020-11-05T08:58:02.000Z | 2020-11-18T16:38:49.000Z | api_request/request.py | felixwortmann/tweeKaLytics | 1930147d5e09f559c1c5490b32ef8821c86decbe | [
"MIT"
] | null | null | null | api_request/request.py | felixwortmann/tweeKaLytics | 1930147d5e09f559c1c5490b32ef8821c86decbe | [
"MIT"
] | null | null | null | import tweepy
import kafka_publish
with open("api_key.txt", "r") as f:
api_key = f.read()
with open("api_key_secret.txt", "r") as f:
api_key_secret = f.read()
with open("access_token.txt", "r") as f:
access_token = f.read()
with open("access_token_secret.txt", "r") as f:
access_token_secret = f.read... | 22.27451 | 65 | 0.683979 |
885e63f2061633ae94044890120bfccc5eaa0526 | 2,426 | py | Python | bigml/tests/test_29_library.py | javinp/python | bdec1e206ed028990503ed4bebcbc7023d3ff606 | [
"Apache-2.0"
] | 1 | 2021-06-20T11:51:22.000Z | 2021-06-20T11:51:22.000Z | bigml/tests/test_29_library.py | javinp/python | bdec1e206ed028990503ed4bebcbc7023d3ff606 | [
"Apache-2.0"
] | null | null | null | bigml/tests/test_29_library.py | javinp/python | bdec1e206ed028990503ed4bebcbc7023d3ff606 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Copyright 2015 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 39.129032 | 102 | 0.609646 |
3cc0dcfb008cd5aebc479de1c41092efe8906f13 | 1,259 | py | Python | pnc_cli/builds.py | vibe13/pnc-cli | 9020462cac5254bdd40cc7d8fa239433242cce45 | [
"Apache-2.0"
] | 2 | 2016-05-18T15:01:34.000Z | 2016-08-11T14:04:17.000Z | pnc_cli/builds.py | vibe13/pnc-cli | 9020462cac5254bdd40cc7d8fa239433242cce45 | [
"Apache-2.0"
] | 47 | 2016-06-23T19:58:40.000Z | 2020-03-10T17:58:11.000Z | pnc_cli/builds.py | vibe13/pnc-cli | 9020462cac5254bdd40cc7d8fa239433242cce45 | [
"Apache-2.0"
] | 21 | 2016-05-30T20:34:17.000Z | 2021-09-07T13:22:20.000Z | __author__ = 'thauser'
from argh import arg
from six import iteritems
import logging
from pnc_cli import swagger_client
from pnc_cli import utils
import pnc_cli.cli_types as types
from pnc_cli.pnc_api import pnc_api
@arg("-p", "--page-size", help="Limit the amount of builds returned")
@arg("--page-index", help="Sele... | 30.707317 | 132 | 0.707705 |
0663ffca3af7bad61f14c999230b3aa3884b61f7 | 36,887 | py | Python | noxfile.py | agraul/salt-1 | b6665030d91fb7045467b4dc408169d5127aa9be | [
"Apache-2.0"
] | null | null | null | noxfile.py | agraul/salt-1 | b6665030d91fb7045467b4dc408169d5127aa9be | [
"Apache-2.0"
] | null | null | null | noxfile.py | agraul/salt-1 | b6665030d91fb7045467b4dc408169d5127aa9be | [
"Apache-2.0"
] | null | null | null | """
noxfile
~~~~~~~
Nox configuration script
"""
# pylint: disable=resource-leakage,3rd-party-module-not-gated
import datetime
import glob
import os
import shutil
import sys
import tempfile
# fmt: off
if __name__ == "__main__":
sys.stderr.write(
"Do not execute this file directly. Use nox instead, it wi... | 32.499559 | 135 | 0.614173 |
a33899d106180f039e66d3105c7e9403fb8a4f90 | 607 | py | Python | Session1_2018/constructStringFromBinaryString.py | vedantc6/LCode | 43aec4da9cc22ef43e877a16dbee380b98d9089f | [
"MIT"
] | 1 | 2018-09-21T10:51:15.000Z | 2018-09-21T10:51:15.000Z | Session1_2018/constructStringFromBinaryString.py | vedantc6/LCode | 43aec4da9cc22ef43e877a16dbee380b98d9089f | [
"MIT"
] | null | null | null | Session1_2018/constructStringFromBinaryString.py | vedantc6/LCode | 43aec4da9cc22ef43e877a16dbee380b98d9089f | [
"MIT"
] | null | null | null | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def tree2str(self, t):
"""
:type t: TreeNode
:rtype: str
"""
if not t:
... | 28.904762 | 98 | 0.479407 |
e92cd5fcdbfc3bbf5f3dda51183a5499fdd4e400 | 2,530 | py | Python | aliyun-python-sdk-polardb/aliyunsdkpolardb/request/v20170801/ModifyDBEndpointAddressRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-polardb/aliyunsdkpolardb/request/v20170801/ModifyDBEndpointAddressRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-polardb/aliyunsdkpolardb/request/v20170801/ModifyDBEndpointAddressRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | # 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
# "License"); you may not u... | 35.138889 | 90 | 0.778656 |
ff84f24de8f807761a937bcbb3464776ce397a70 | 21,562 | py | Python | netbox/netbox/settings.py | pierrechev/netbox | 312246fec2d12bfb1816c88e62a1b9729efd9092 | [
"Apache-2.0"
] | null | null | null | netbox/netbox/settings.py | pierrechev/netbox | 312246fec2d12bfb1816c88e62a1b9729efd9092 | [
"Apache-2.0"
] | null | null | null | netbox/netbox/settings.py | pierrechev/netbox | 312246fec2d12bfb1816c88e62a1b9729efd9092 | [
"Apache-2.0"
] | null | null | null | import importlib
import logging
import os
import platform
import re
import socket
import warnings
from urllib.parse import urlsplit
from django.contrib.messages import constants as messages
from django.core.exceptions import ImproperlyConfigured, ValidationError
from django.core.validators import URLValidator
#
# En... | 34.609952 | 123 | 0.720944 |
a5dea0a02d280400410abf5e87de51e5335ee980 | 4,215 | py | Python | mmcls/datasets/cifar.py | anthracene/mmclassification | 4b46fd6dc75d26b5604fdec75f6cc49e1d96d2a7 | [
"Apache-2.0"
] | 1 | 2020-07-20T09:52:50.000Z | 2020-07-20T09:52:50.000Z | mmcls/datasets/cifar.py | anthracene/mmclassification | 4b46fd6dc75d26b5604fdec75f6cc49e1d96d2a7 | [
"Apache-2.0"
] | null | null | null | mmcls/datasets/cifar.py | anthracene/mmclassification | 4b46fd6dc75d26b5604fdec75f6cc49e1d96d2a7 | [
"Apache-2.0"
] | 1 | 2020-08-04T05:47:52.000Z | 2020-08-04T05:47:52.000Z | import os
import os.path
import pickle
import numpy as np
from .base_dataset import BaseDataset
from .builder import DATASETS
from .utils import check_integrity, download_and_extract_archive
@DATASETS.register_module()
class CIFAR10(BaseDataset):
"""`CIFAR10 <https://www.cs.toronto.edu/~kriz/cifar.html>`_ Datas... | 32.929688 | 93 | 0.598577 |
9e0a51f633abca6393dc4f759652e23c29f306a5 | 8,582 | py | Python | podaac/podaac_utils.py | wongvh07/SPAC4C | d8186bd4dab25472f3a45a7b0464aa95553c92f9 | [
"Apache-2.0"
] | null | null | null | podaac/podaac_utils.py | wongvh07/SPAC4C | d8186bd4dab25472f3a45a7b0464aa95553c92f9 | [
"Apache-2.0"
] | null | null | null | podaac/podaac_utils.py | wongvh07/SPAC4C | d8186bd4dab25472f3a45a7b0464aa95553c92f9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016-2019 California Institute of Technology.
#
# 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... | 37.806167 | 89 | 0.639711 |
d15863c8e7c1ab5da04d1a6b4c43eae22cfb31df | 4,445 | py | Python | pyOCD/coresight/fpb.py | dragoniteArm/pyOCD_CC3220sf | d871dfc66a6185da7ed77a0b557fc933f5c499bc | [
"Apache-2.0"
] | null | null | null | pyOCD/coresight/fpb.py | dragoniteArm/pyOCD_CC3220sf | d871dfc66a6185da7ed77a0b557fc933f5c499bc | [
"Apache-2.0"
] | null | null | null | pyOCD/coresight/fpb.py | dragoniteArm/pyOCD_CC3220sf | d871dfc66a6185da7ed77a0b557fc933f5c499bc | [
"Apache-2.0"
] | 1 | 2021-09-25T05:04:28.000Z | 2021-09-25T05:04:28.000Z | """
mbed CMSIS-DAP debugger
Copyright (c) 2015-2017 ARM Limited
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 ... | 36.138211 | 98 | 0.64207 |
f295f70d549fc20a5523a0a4afdcf910a93b9a97 | 329 | py | Python | lab_6.py | anas21-meet/meet2019y1lab6 | dd73f213b98863411474ce842d3961b476523a2e | [
"MIT"
] | null | null | null | lab_6.py | anas21-meet/meet2019y1lab6 | dd73f213b98863411474ce842d3961b476523a2e | [
"MIT"
] | null | null | null | lab_6.py | anas21-meet/meet2019y1lab6 | dd73f213b98863411474ce842d3961b476523a2e | [
"MIT"
] | null | null | null | def fizzbuzz(n):
result=[]
for number in range(1,n):
if number%3==0 and number%5==0:
result.append('FizzBuzz')
elif number%3==0:
result.append('Fizz')
elif number%5==0:
result.append("Buzz")
else:
result.append(number)
return(result)
x=fizzbuzz(9)
p... | 19.352941 | 37 | 0.556231 |
9070acf41a2d76dcf675461bc7a74ab3323e9d2c | 4,861 | py | Python | custom_components/lkcomu_interrao/const.py | avbor/HomeAssistantConf | 1f0fe16c8e3f3dcea7cc350f3fb9c233b6a22614 | [
"Unlicense"
] | 35 | 2021-02-25T06:30:42.000Z | 2022-03-09T20:18:47.000Z | custom_components/lkcomu_interrao/const.py | avbor/HomeAssistantConf | 1f0fe16c8e3f3dcea7cc350f3fb9c233b6a22614 | [
"Unlicense"
] | 22 | 2021-06-16T09:32:55.000Z | 2022-03-27T10:26:34.000Z | custom_components/lkcomu_interrao/const.py | avbor/HomeAssistantConf | 1f0fe16c8e3f3dcea7cc350f3fb9c233b6a22614 | [
"Unlicense"
] | 19 | 2021-02-20T05:29:58.000Z | 2022-02-05T16:22:30.000Z | """Constants for lkcomu_interrao integration"""
from typing import Final
DOMAIN: Final = "lkcomu_interrao"
ATTRIBUTION_EN: Final = "Data acquired from %s"
ATTRIBUTION_RU: Final = "Данные получены с %s"
ATTR_ACCOUNT_CODE: Final = "account_code"
ATTR_ACCOUNT_ID: Final = "account_id"
ATTR_ADDRESS: Final = "address"
ATT... | 40.173554 | 98 | 0.778029 |
db05d75421e5f06cb2b44f3b9c5a4a660b0ca393 | 913 | py | Python | invenio_config_tugraz/ext.py | utnapischtim/invenio-config-tugraz | 0a37a8015e107ccbe6b389e9d568030c9826ff46 | [
"MIT"
] | null | null | null | invenio_config_tugraz/ext.py | utnapischtim/invenio-config-tugraz | 0a37a8015e107ccbe6b389e9d568030c9826ff46 | [
"MIT"
] | null | null | null | invenio_config_tugraz/ext.py | utnapischtim/invenio-config-tugraz | 0a37a8015e107ccbe6b389e9d568030c9826ff46 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2020 Mojib Wali.
#
# invenio-config-tugraz is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see LICENSE file for more
# details.
"""invenio module that adds tugraz configs."""
from flask_babelex import gettext as _
from . impor... | 26.852941 | 73 | 0.647317 |
89ea0e9845ca5b5dee5cbbc6eab1feba4c30406b | 607 | py | Python | django_joblog/migrations/0004_alter_state_choices.py | defgsus/django-joblog | 88467f951d7ebc586c69e421cab39e4caa395cca | [
"MIT"
] | null | null | null | django_joblog/migrations/0004_alter_state_choices.py | defgsus/django-joblog | 88467f951d7ebc586c69e421cab39e4caa395cca | [
"MIT"
] | null | null | null | django_joblog/migrations/0004_alter_state_choices.py | defgsus/django-joblog | 88467f951d7ebc586c69e421cab39e4caa395cca | [
"MIT"
] | null | null | null | # Generated by Django 2.2 on 2019-04-29 20:34
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('django_joblog', '0003_alter_state_choices'),
]
operations = [
migrations.AlterField(
model_name='joblogmodel',
name='s... | 31.947368 | 262 | 0.616145 |
0e9594f02a486f41d99a6acd8345d5013aaaa039 | 163 | py | Python | Coursera/Week.5/Task.8.py | v1nnyb0y/Coursera.BasePython | bbfb3184dc27a4cdb16b087123890991afbc5506 | [
"MIT"
] | null | null | null | Coursera/Week.5/Task.8.py | v1nnyb0y/Coursera.BasePython | bbfb3184dc27a4cdb16b087123890991afbc5506 | [
"MIT"
] | null | null | null | Coursera/Week.5/Task.8.py | v1nnyb0y/Coursera.BasePython | bbfb3184dc27a4cdb16b087123890991afbc5506 | [
"MIT"
] | null | null | null | '''
Замечательные числа - 1
'''
for i in range(10, 100):
string = str(i)
power = int(string[0]) * int(string[1]) * 2
if (power == i):
print(i)
| 18.111111 | 47 | 0.521472 |
c38f49a5244546a8bc04200a2fb529d7602685f1 | 10,253 | py | Python | docs/conf.py | spinleft/M-LOOP | 32cefcde89811edf7b9df8c8831b7ee99a3e7401 | [
"MIT"
] | null | null | null | docs/conf.py | spinleft/M-LOOP | 32cefcde89811edf7b9df8c8831b7ee99a3e7401 | [
"MIT"
] | null | null | null | docs/conf.py | spinleft/M-LOOP | 32cefcde89811edf7b9df8c8831b7ee99a3e7401 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# M-LOOP documentation build configuration file, created by
# sphinx-quickstart on Wed Aug 24 11:34:47 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# aut... | 32.446203 | 95 | 0.721545 |
87213dc33a8a88e10ad452b178ee5c73cbb15631 | 5,145 | py | Python | lldb/test/API/functionalities/swift-runtime-reporting/objc-inference/TestObjcInference.py | LaudateCorpus1/llvm-project | ff2e0f0c1112558b3f30d8afec7c9882c33c79e3 | [
"Apache-2.0"
] | 765 | 2015-12-03T16:44:59.000Z | 2022-03-07T12:41:10.000Z | lldb/test/API/functionalities/swift-runtime-reporting/objc-inference/TestObjcInference.py | LaudateCorpus1/llvm-project | ff2e0f0c1112558b3f30d8afec7c9882c33c79e3 | [
"Apache-2.0"
] | 3,180 | 2019-10-18T01:21:21.000Z | 2022-03-31T23:25:41.000Z | lldb/test/API/functionalities/swift-runtime-reporting/objc-inference/TestObjcInference.py | LaudateCorpus1/llvm-project | ff2e0f0c1112558b3f30d8afec7c9882c33c79e3 | [
"Apache-2.0"
] | 284 | 2015-12-03T16:47:25.000Z | 2022-03-12T05:39:48.000Z | # TestObjcInference.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.txt for license information
# See https://swift.org/CONTRI... | 45.131579 | 122 | 0.665112 |
332c1948ac22997e1b4d06db767c5f41f132275d | 3,107 | py | Python | data/p2DJ/New/program/qiskit/QC/startQiskit_QC126.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p2DJ/New/program/qiskit/QC/startQiskit_QC126.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p2DJ/New/program/qiskit/QC/startQiskit_QC126.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=2
# total number=10
import cirq
import qiskit
from qiskit import IBMQ
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from math import log2,floor, sqrt, pi
import numpy a... | 27.990991 | 82 | 0.622787 |
3e9247d8f63888251ebda0de00ca145ac66c5b48 | 106 | py | Python | safe/safe.py | tom-010/exception-safe | 0804f095452669af0b99a24fe9d3564fa55a8272 | [
"Apache-2.0"
] | null | null | null | safe/safe.py | tom-010/exception-safe | 0804f095452669af0b99a24fe9d3564fa55a8272 | [
"Apache-2.0"
] | null | null | null | safe/safe.py | tom-010/exception-safe | 0804f095452669af0b99a24fe9d3564fa55a8272 | [
"Apache-2.0"
] | null | null | null | def safe(cb, default=None):
try:
return cb()
except Exception as e:
return default | 21.2 | 27 | 0.584906 |
828e13f03dc884b594a50aaa459c86b0ba020a32 | 977 | py | Python | 2020-04-20-ML-linear-regression/2020-04-20-ML-linear-regression.py | jetorz/Data2Science | 771b581aba9962d006a0dceb39eb6bf4f35e139e | [
"MIT"
] | 1 | 2020-05-07T13:47:37.000Z | 2020-05-07T13:47:37.000Z | 2020-04-20-ML-linear-regression/2020-04-20-ML-linear-regression.py | Future-SuperStar/Data2Science | 771b581aba9962d006a0dceb39eb6bf4f35e139e | [
"MIT"
] | null | null | null | 2020-04-20-ML-linear-regression/2020-04-20-ML-linear-regression.py | Future-SuperStar/Data2Science | 771b581aba9962d006a0dceb39eb6bf4f35e139e | [
"MIT"
] | 2 | 2020-06-26T09:57:15.000Z | 2021-12-10T03:27:23.000Z | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib as mpl
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split
data = np.loadtxt('ex1data1.txt', delimiter=',')
X = data[:, 0].reshape(-1, 1); y = data[:, 1]
X_train, X_test, y_train... | 27.914286 | 70 | 0.703173 |
e517db25c6a8882db390ac07d8553ce05ef76fb6 | 3,854 | py | Python | jsonprocessor/MemberProcessor.py | abhishek9sharma/MeetupDataCollection | dc528a4490e3b288022fe2943045e2f9df8a2b8b | [
"MIT"
] | null | null | null | jsonprocessor/MemberProcessor.py | abhishek9sharma/MeetupDataCollection | dc528a4490e3b288022fe2943045e2f9df8a2b8b | [
"MIT"
] | null | null | null | jsonprocessor/MemberProcessor.py | abhishek9sharma/MeetupDataCollection | dc528a4490e3b288022fe2943045e2f9df8a2b8b | [
"MIT"
] | null | null | null | __author__ = 'abhisheksh'
from jsonprocessor.TransformationUtil import TransformHelper as thlp
import pandas as pd
import os
import pandas.io.common
import gc
class ProcessSingleGroupMembers:
def __init__(self,memberfilecsvin,opfolder=None):
self.member_file_group=memberfilecsvin
self.opfolder=... | 33.807018 | 129 | 0.608459 |
fc68a491354252905993c0fc973d288671149384 | 8,266 | py | Python | Janaagraha Bot/venv/Lib/site-packages/google/api/config_change_pb2.py | CFGIndia20/team-19 | e2b27ad8009303d262c2dc60551d6fcc4645b3b5 | [
"MIT"
] | 11 | 2021-09-19T06:32:44.000Z | 2022-03-14T19:09:46.000Z | Janaagraha Bot/venv/Lib/site-packages/google/api/config_change_pb2.py | CFGIndia20/team-19 | e2b27ad8009303d262c2dc60551d6fcc4645b3b5 | [
"MIT"
] | null | null | null | Janaagraha Bot/venv/Lib/site-packages/google/api/config_change_pb2.py | CFGIndia20/team-19 | e2b27ad8009303d262c2dc60551d6fcc4645b3b5 | [
"MIT"
] | 2 | 2020-09-22T06:01:26.000Z | 2020-09-22T18:23:49.000Z | # -*- coding: utf-8 -*-
# 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 o... | 32.163424 | 746 | 0.636584 |
1613388897f445fe3c2b8c71ef94b4c6fdede377 | 3,264 | py | Python | glance/db/sqlalchemy/migrate_repo/schema.py | wkoathp/glance | eb0c47047ddc28371f546437118986ed904f41d3 | [
"Apache-2.0"
] | null | null | null | glance/db/sqlalchemy/migrate_repo/schema.py | wkoathp/glance | eb0c47047ddc28371f546437118986ed904f41d3 | [
"Apache-2.0"
] | null | null | null | glance/db/sqlalchemy/migrate_repo/schema.py | wkoathp/glance | eb0c47047ddc28371f546437118986ed904f41d3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 29.944954 | 79 | 0.710172 |
3795017fe3998db49a9495c74dfa523706cb0427 | 2,296 | py | Python | firmware/scripts/verify_signature.py | jreesun/krux-wallet | bdb88dabd28df276b4d9deea8afc23ed7dd2b5b4 | [
"MIT"
] | 21 | 2021-07-28T12:00:58.000Z | 2022-01-27T01:59:12.000Z | firmware/scripts/verify_signature.py | jreesun/krux | bdb88dabd28df276b4d9deea8afc23ed7dd2b5b4 | [
"MIT"
] | 69 | 2021-07-28T09:17:15.000Z | 2022-03-17T04:49:16.000Z | firmware/scripts/verify_signature.py | jreesun/krux-wallet | bdb88dabd28df276b4d9deea8afc23ed7dd2b5b4 | [
"MIT"
] | 11 | 2021-07-28T15:34:58.000Z | 2021-12-08T13:37:33.000Z | # The MIT License (MIT)
# Copyright (c) 2021 Tom J. Sun
# 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, ... | 36.444444 | 88 | 0.707753 |
106659a0baf07c29ae002744b35229be061e2ac1 | 8,835 | py | Python | ffn/training/model.py | drewlinsley/ffn_membrane | 4b4638c00eed847fa6a7958a7fdbeedca4236561 | [
"Apache-2.0"
] | 1 | 2019-07-30T11:28:47.000Z | 2019-07-30T11:28:47.000Z | ffn/training/model.py | drewlinsley/ffn_membrane | 4b4638c00eed847fa6a7958a7fdbeedca4236561 | [
"Apache-2.0"
] | null | null | null | ffn/training/model.py | drewlinsley/ffn_membrane | 4b4638c00eed847fa6a7958a7fdbeedca4236561 | [
"Apache-2.0"
] | 1 | 2019-04-17T07:56:28.000Z | 2019-04-17T07:56:28.000Z | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | 38.246753 | 125 | 0.634748 |
73f55c5c81b4c5ed39e8ab79fec3141da72a0d8d | 5,279 | py | Python | venv/Lib/site-packages/pusher/pusher_client.py | wailord90/Capstone | 5d82339e31905f5c7ef3131f15526d9bc29f0a98 | [
"Apache-2.0"
] | 1 | 2019-03-14T19:29:55.000Z | 2019-03-14T19:29:55.000Z | venv/Lib/site-packages/pusher/pusher_client.py | wailord90/Capstone | 5d82339e31905f5c7ef3131f15526d9bc29f0a98 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/pusher/pusher_client.py | wailord90/Capstone | 5d82339e31905f5c7ef3131f15526d9bc29f0a98 | [
"Apache-2.0"
] | 2 | 2019-02-09T21:13:50.000Z | 2019-03-14T21:03:52.000Z | # -*- coding: utf-8 -*-
from __future__ import (
print_function,
unicode_literals,
absolute_import,
division)
import collections
import hashlib
import os
import re
import six
import time
import json
import string
from pusher.util import (
ensure_text,
validate_channel,
validate_socket_id,... | 29.994318 | 137 | 0.604092 |
88d05f9a42838c78ad8ffbe33fa253a2419c7d51 | 1,997 | py | Python | meilisearch/tests/index/test_index_wait_for_pending_update.py | alallema/meilisearch-python | 866e9e2089aa08abd9a03dced03134f21bd8abda | [
"MIT"
] | null | null | null | meilisearch/tests/index/test_index_wait_for_pending_update.py | alallema/meilisearch-python | 866e9e2089aa08abd9a03dced03134f21bd8abda | [
"MIT"
] | null | null | null | meilisearch/tests/index/test_index_wait_for_pending_update.py | alallema/meilisearch-python | 866e9e2089aa08abd9a03dced03134f21bd8abda | [
"MIT"
] | null | null | null | # pylint: disable=invalid-name
from datetime import datetime
import pytest
from meilisearch.errors import MeiliSearchTimeoutError
def test_wait_for_pending_update_default(index_with_documents):
"""Tests waiting for an update with default parameters."""
index = index_with_documents()
response = index.add_d... | 38.403846 | 85 | 0.736605 |
c135af59bbaa4c6a66cf58230862a7a3726071d0 | 8,752 | py | Python | parsl/tests/conftest.py | benclifford/parsl | 21f8681882779050d2e074591e95ada43789748f | [
"Apache-2.0"
] | 2 | 2019-02-25T16:43:30.000Z | 2019-03-04T17:25:00.000Z | parsl/tests/conftest.py | benclifford/parsl | 21f8681882779050d2e074591e95ada43789748f | [
"Apache-2.0"
] | null | null | null | parsl/tests/conftest.py | benclifford/parsl | 21f8681882779050d2e074591e95ada43789748f | [
"Apache-2.0"
] | 2 | 2019-04-30T13:46:23.000Z | 2019-06-04T16:14:46.000Z | import importlib.util
import logging
import os
import shutil
import subprocess
from glob import glob
from itertools import chain
import pytest
import _pytest.runner as runner
from pytest_forked import forked_run_report
import parsl
from parsl.dataflow.dflow import DataFlowKernelLoader
from parsl.tests.utils import ge... | 36.466667 | 121 | 0.621458 |
78adfd233ce27f3183b59b0f01d9d05073b86e48 | 376 | py | Python | tests/misc/helper_tests.py | jack3343/xrd-core | 48a6d890d62485c627060b017eadf85602268caf | [
"MIT"
] | null | null | null | tests/misc/helper_tests.py | jack3343/xrd-core | 48a6d890d62485c627060b017eadf85602268caf | [
"MIT"
] | null | null | null | tests/misc/helper_tests.py | jack3343/xrd-core | 48a6d890d62485c627060b017eadf85602268caf | [
"MIT"
] | null | null | null | # coding=utf-8
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
from unittest import TestCase
from xrd.core.misc import logger
logger.initialize_default()
class TestHelpers(TestCase):
def __init__(self, *args, **kwargs):
... | 26.857143 | 69 | 0.75266 |
f7f0aa85b69dac8cab67a45a04e8000589e5e735 | 30,004 | py | Python | backend/apps/datamodel/models.py | gabrielmbmb/intry4.0-backend | 1ac28ad333c93ed6069dc2db4d9fe3a12b8a1b24 | [
"MIT"
] | null | null | null | backend/apps/datamodel/models.py | gabrielmbmb/intry4.0-backend | 1ac28ad333c93ed6069dc2db4d9fe3a12b8a1b24 | [
"MIT"
] | 5 | 2021-03-30T15:05:05.000Z | 2021-09-22T19:41:51.000Z | backend/apps/datamodel/models.py | gabrielmbmb/intry4.0-backend | 1ac28ad333c93ed6069dc2db4d9fe3a12b8a1b24 | [
"MIT"
] | null | null | null | import io
import uuid
import pytz
import json
import logging
import pandas as pd
from constance import config
from django.db import models
from django.contrib.postgres.fields import ArrayField, JSONField
from django.core.validators import (
int_list_validator,
MinValueValidator,
)
from django.db.models.signals ... | 33.116998 | 105 | 0.582822 |
7b75ed9d16814974207b44c49d7baa0e3ea6e4e9 | 1,038 | py | Python | measured-vs-model.py | afiskon/radiation-pattern-measurement | 40feb2bb1cbb845c107945ae49582966e4325ce6 | [
"MIT"
] | 2 | 2022-02-21T23:02:45.000Z | 2022-03-23T08:56:21.000Z | measured-vs-model.py | afiskon/radiation-pattern-measurement | 40feb2bb1cbb845c107945ae49582966e4325ce6 | [
"MIT"
] | null | null | null | measured-vs-model.py | afiskon/radiation-pattern-measurement | 40feb2bb1cbb845c107945ae49582966e4325ce6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3 -u
# vim: set ai et ts=4 sw=4:
from math import pi
import matplotlib.pyplot as plt
import csv
def load_data(fname):
xs, ys = [], []
with open(fname, newline = '') as f:
for row in csv.reader(f, delimiter = ',', quotechar = '"'):
xs += [ 2*pi*float(row[0])/360 ]
... | 28.054054 | 67 | 0.631985 |
85ddfe4c73b30524e5d418acab4e9e4f05a10b86 | 6,122 | py | Python | src/common/sequence.py | janka2012/digIS | 0386c36e49880af25390d208a37129318516e502 | [
"MIT"
] | 2 | 2021-05-23T02:49:23.000Z | 2021-05-24T19:10:32.000Z | src/common/sequence.py | janka2012/digIS | 0386c36e49880af25390d208a37129318516e502 | [
"MIT"
] | 2 | 2021-06-10T06:44:12.000Z | 2021-12-15T21:24:37.000Z | src/common/sequence.py | janka2012/digIS | 0386c36e49880af25390d208a37129318516e502 | [
"MIT"
] | null | null | null | import os
import re
from Bio import SeqIO
from Bio.Alphabet import IUPAC
from Bio.SeqRecord import SeqRecord
def transform_range(start, end, frame, seqlen):
offset = [0, 1, 2, 2, 1, 0][frame-1]
if frame <= 3:
start_pos = (start-1)*3 + offset + 1
end_pos = end*3 + offset
else:
star... | 26.733624 | 112 | 0.618425 |
5d28ba15273caeab003eb8ca0f704633f24cf09e | 1,560 | py | Python | evap/development/management/commands/reload_testdata.py | felixrindt/EvaP | fe65fcc511cc942695ce1edbaab170894f0d37b1 | [
"MIT"
] | 29 | 2020-02-28T23:03:41.000Z | 2022-02-19T09:29:36.000Z | evap/development/management/commands/reload_testdata.py | felixrindt/EvaP | fe65fcc511cc942695ce1edbaab170894f0d37b1 | [
"MIT"
] | 247 | 2020-02-19T17:18:15.000Z | 2022-03-31T20:59:47.000Z | evap/development/management/commands/reload_testdata.py | felixrindt/EvaP | fe65fcc511cc942695ce1edbaab170894f0d37b1 | [
"MIT"
] | 35 | 2020-04-10T21:50:02.000Z | 2022-03-10T16:42:11.000Z | from django.core.management import call_command
from django.core.management.base import BaseCommand
from evap.evaluation.management.commands.tools import confirm_harmful_operation
class Command(BaseCommand):
args = ""
help = "Drops the database, recreates it and then loads the testdata."
def handle(self... | 38.04878 | 98 | 0.695513 |
95ae99dbf33c6237e2b5b7a7fee7cd30decb0d97 | 587 | py | Python | article/migrations/0063_auto_20181130_1837.py | higab85/drugsandme | 7db66d9687ac9a04132de94edda364f191d497d7 | [
"MIT"
] | 3 | 2016-10-10T10:07:39.000Z | 2018-10-29T19:57:52.000Z | article/migrations/0063_auto_20181130_1837.py | higab85/drugsandme | 7db66d9687ac9a04132de94edda364f191d497d7 | [
"MIT"
] | 12 | 2016-11-04T18:59:17.000Z | 2022-03-11T23:32:52.000Z | article/migrations/0063_auto_20181130_1837.py | higab85/drugsandme | 7db66d9687ac9a04132de94edda364f191d497d7 | [
"MIT"
] | 2 | 2016-09-29T22:48:26.000Z | 2019-10-01T19:55:14.000Z | # Generated by Django 2.1 on 2018-11-30 18:37
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('article', '0062_auto_20181130_1144'),
]
operations = [
migrations.AlterField(
model_name='articleconstants',
name='coo... | 24.458333 | 47 | 0.609881 |
0e49cebee2b5d4602ff8025126e9cd506647030f | 8,921 | py | Python | tensorflow/python/distribute/cluster_resolver/slurm_cluster_resolver.py | PaulWang1905/tensorflow | ebf12d22b4801fb8dab5034cc94562bf7cc33fa0 | [
"Apache-2.0"
] | 36 | 2016-12-17T15:25:25.000Z | 2022-01-29T21:50:53.000Z | tensorflow/python/distribute/cluster_resolver/slurm_cluster_resolver.py | PaulWang1905/tensorflow | ebf12d22b4801fb8dab5034cc94562bf7cc33fa0 | [
"Apache-2.0"
] | 59 | 2019-06-17T09:37:49.000Z | 2022-01-19T01:21:34.000Z | tensorflow/python/distribute/cluster_resolver/slurm_cluster_resolver.py | PaulWang1905/tensorflow | ebf12d22b4801fb8dab5034cc94562bf7cc33fa0 | [
"Apache-2.0"
] | 36 | 2017-07-27T21:12:40.000Z | 2022-02-03T16:45:56.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 39.299559 | 92 | 0.71696 |
759e52eb8d5c2acb7e4bde15a8c1ba47faa1d5f3 | 3,345 | py | Python | ckanext/metadata/model/workflow_state.py | SAEONData/ckanext-metadata | af1a137e5d924f05ea1835b81f36f808700d3aa7 | [
"MIT"
] | null | null | null | ckanext/metadata/model/workflow_state.py | SAEONData/ckanext-metadata | af1a137e5d924f05ea1835b81f36f808700d3aa7 | [
"MIT"
] | 76 | 2018-04-10T12:51:56.000Z | 2021-02-22T11:41:03.000Z | ckanext/metadata/model/workflow_state.py | SAEONData/ckanext-metadata | af1a137e5d924f05ea1835b81f36f808700d3aa7 | [
"MIT"
] | null | null | null | # encoding: utf-8
from sqlalchemy import types, Table, Column, ForeignKey
import vdm.sqlalchemy
from ckan.model import meta, core, types as _types, domain_object
workflow_state_table = Table(
'workflow_state', meta.metadata,
Column('id', types.UnicodeText, primary_key=True, default=_types.make_uuid),
Co... | 35.585106 | 87 | 0.677429 |
2f8d7e873bc13a4ac0a1127578e447e6916863de | 770 | py | Python | jp.atcoder/abc177/abc177_e/27749342.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-09T03:06:25.000Z | 2022-02-09T03:06:25.000Z | jp.atcoder/abc177/abc177_e/27749342.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-05T22:53:18.000Z | 2022-02-09T01:29:30.000Z | jp.atcoder/abc177/abc177_e/27749342.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | null | null | null | import collections
import typing
def main() -> typing.NoReturn:
n = int(input())
a = list(map(int, input().split()))
appeared_cnt = collections.defaultdict(int)
for x in a:
for p in prime_factorize(x):
appeared_cnt[p] += 1
cnt = appeared_cnt.values()
if max(cnt)... | 21.388889 | 61 | 0.516883 |
acde3d0e0065ac7181e3afcb9d61888ef9e42eb2 | 1,120 | py | Python | var/spack/repos/builtin/packages/r-biobase/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2015-10-04T02:17:46.000Z | 2018-02-07T18:23:00.000Z | var/spack/repos/builtin/packages/r-biobase/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 22 | 2017-08-01T22:45:10.000Z | 2022-03-10T07:46:31.000Z | var/spack/repos/builtin/packages/r-biobase/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 4 | 2016-06-10T17:57:39.000Z | 2018-09-11T04:59:38.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)
from spack import *
class RBiobase(RPackage):
"""Biobase: Base functions for Bioconductor.
Functions that ar... | 40 | 80 | 0.724107 |
48f88e2f86a8b5ae8b249190e581680dd99fb696 | 11,002 | py | Python | PyDSS/reports.py | dvaidhyn/PyDSS | 0d220d00900da4945e2ab6e7774de5edb58b36a9 | [
"BSD-3-Clause"
] | null | null | null | PyDSS/reports.py | dvaidhyn/PyDSS | 0d220d00900da4945e2ab6e7774de5edb58b36a9 | [
"BSD-3-Clause"
] | null | null | null | PyDSS/reports.py | dvaidhyn/PyDSS | 0d220d00900da4945e2ab6e7774de5edb58b36a9 | [
"BSD-3-Clause"
] | null | null | null | """Creates reports on data exported by PyDSS"""
import abc
import logging
import os
from PyDSS.exceptions import InvalidConfiguration, InvalidParameter
from PyDSS.utils.dataframe_utils import write_dataframe
from PyDSS.utils.utils import dump_data
REPORTS_DIR = "Reports"
logger = logging.getLogger(__name__)
clas... | 31.889855 | 94 | 0.59162 |
ffc00ad0b6c81e1d27835ffe4b5ecdba7884455d | 2,043 | py | Python | ecommerce/accounts/views.py | mishelshaji/py-2-ecommerce | e30940609ed191b98585b24baccf4925f404ec32 | [
"MIT"
] | null | null | null | ecommerce/accounts/views.py | mishelshaji/py-2-ecommerce | e30940609ed191b98585b24baccf4925f404ec32 | [
"MIT"
] | null | null | null | ecommerce/accounts/views.py | mishelshaji/py-2-ecommerce | e30940609ed191b98585b24baccf4925f404ec32 | [
"MIT"
] | null | null | null | from django.shortcuts import redirect, render
from django.views.decorators.http import require_POST
from django.contrib import messages
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.forms import AuthenticationForm
from .forms import *
# Create your views here.
def user_login(requ... | 34.627119 | 78 | 0.633872 |
c378b117939d33c1b8c342896d8d83e4f79e49ea | 12,538 | py | Python | tiled/client/constructors.py | zthatch/tiled | 156811c1cc180bb2744bcfcd9e09fc91389f3c93 | [
"BSD-3-Clause"
] | null | null | null | tiled/client/constructors.py | zthatch/tiled | 156811c1cc180bb2744bcfcd9e09fc91389f3c93 | [
"BSD-3-Clause"
] | null | null | null | tiled/client/constructors.py | zthatch/tiled | 156811c1cc180bb2744bcfcd9e09fc91389f3c93 | [
"BSD-3-Clause"
] | null | null | null | import collections
import collections.abc
import urllib.parse
import httpx
from .context import context_from_tree, Context, DEFAULT_TOKEN_CACHE
from .node import Node
from .utils import DEFAULT_ACCEPTED_ENCODINGS, EVENT_HOOKS
from ..utils import import_object
def from_uri(
uri,
structure_clients="numpy",
... | 32.908136 | 93 | 0.648828 |
0b2edbb644269a5a19208c9090aa14af45638a69 | 4,124 | py | Python | bentoml/adapters/tensorflow_tensor_input.py | narennadig/BentoML | c4c4e1a0f0273804be7bcc36b7a5dab9e61dda0e | [
"Apache-2.0"
] | null | null | null | bentoml/adapters/tensorflow_tensor_input.py | narennadig/BentoML | c4c4e1a0f0273804be7bcc36b7a5dab9e61dda0e | [
"Apache-2.0"
] | null | null | null | bentoml/adapters/tensorflow_tensor_input.py | narennadig/BentoML | c4c4e1a0f0273804be7bcc36b7a5dab9e61dda0e | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Atalaya Tech, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, ... | 35.247863 | 86 | 0.583657 |
c76196680b6678b4d4c8ba6148f1a6e31d8733d7 | 8,475 | py | Python | 3_Inference/Detector.py | imsanika03/TrainYourOwnYOLO | c03d78f1d9594b44f39096bfb8aa018dfcfff908 | [
"MIT"
] | null | null | null | 3_Inference/Detector.py | imsanika03/TrainYourOwnYOLO | c03d78f1d9594b44f39096bfb8aa018dfcfff908 | [
"MIT"
] | null | null | null | 3_Inference/Detector.py | imsanika03/TrainYourOwnYOLO | c03d78f1d9594b44f39096bfb8aa018dfcfff908 | [
"MIT"
] | null | null | null | import os
import sys
def get_parent_dir(n=1):
""" returns the n-th parent dicrectory of the current
working directory """
current_path = os.path.dirname(os.path.abspath(__file__))
for k in range(n):
current_path = os.path.dirname(current_path)
return current_path
src_path = os.path.join(... | 29.224138 | 120 | 0.554454 |
1c295f4a3e105467abaf2c4d1e2dd38fb48202a7 | 7,563 | py | Python | migratemonitors.py | psi09/nr-account-migration | 31ab8a2d998b2ee66305fe454346f3c874982f42 | [
"Apache-2.0"
] | null | null | null | migratemonitors.py | psi09/nr-account-migration | 31ab8a2d998b2ee66305fe454346f3c874982f42 | [
"Apache-2.0"
] | null | null | null | migratemonitors.py | psi09/nr-account-migration | 31ab8a2d998b2ee66305fe454346f3c874982f42 | [
"Apache-2.0"
] | null | null | null | import argparse
import os
import sys
import time
import library.localstore as store
import library.migrationlogger as migrationlogger
from library.clients.monitorsclient import get_monitor, post_monitor_definition, populate_script, \
put_script, apply_tags
import library.monitortypes as monitortypes
import library... | 50.42 | 127 | 0.693772 |
b0aaa8d4804628e399e3e960bdf90657addfe094 | 224 | py | Python | setupIBM.py | hpssjellis/qiskit-community-tutorials | 94ccdd7ef7197c452e57839142c054ff8b7171a9 | [
"Apache-2.0"
] | 1 | 2021-05-11T22:13:28.000Z | 2021-05-11T22:13:28.000Z | setupIBM.py | hpssjellis/qiskit-community-tutorials | 94ccdd7ef7197c452e57839142c054ff8b7171a9 | [
"Apache-2.0"
] | null | null | null | setupIBM.py | hpssjellis/qiskit-community-tutorials | 94ccdd7ef7197c452e57839142c054ff8b7171a9 | [
"Apache-2.0"
] | 1 | 2021-05-11T22:13:34.000Z | 2021-05-11T22:13:34.000Z | #from qiskit import IBMQ
#IBMQ.save_account('MY_API_TOKEN')
#
#login and find your IBM Quantum computing account token
#https://quantum-computing.ibm.com/account
#
from qiskit import IBMQ
IBMQ.save_account('MY_API_TOKEN')
| 20.363636 | 56 | 0.790179 |
0517863a19c0278c1e39f2cb12b1f70fbf7e98d2 | 816 | py | Python | migrations/versions/40f6977ec0bf_make_session_id_on_form_response_not_.py | drewbent/duo-backend | 5a947ff2bf90aa92104d8fd15e63c9b31226852a | [
"MIT"
] | null | null | null | migrations/versions/40f6977ec0bf_make_session_id_on_form_response_not_.py | drewbent/duo-backend | 5a947ff2bf90aa92104d8fd15e63c9b31226852a | [
"MIT"
] | null | null | null | migrations/versions/40f6977ec0bf_make_session_id_on_form_response_not_.py | drewbent/duo-backend | 5a947ff2bf90aa92104d8fd15e63c9b31226852a | [
"MIT"
] | null | null | null | """Make session id on form_response not nullable
Revision ID: 40f6977ec0bf
Revises: d99bd085cddc
Create Date: 2020-02-17 16:35:14.531274
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '40f6977ec0bf'
down_revision = 'd99bd085cddc'
branch_labels = None
depends_o... | 24.727273 | 65 | 0.664216 |
6c709c529cabdff6fb41c3f6e58b2bc52ed29624 | 659 | py | Python | fireworks/examples/tutorial_examples/introduction.py | jmmshn/fireworks | 5c2f0586e76ab08cadf8b9f4f85638d838f15448 | [
"BSD-3-Clause-LBNL"
] | 251 | 2015-01-05T17:44:47.000Z | 2022-03-28T07:25:42.000Z | fireworks/examples/tutorial_examples/introduction.py | jmmshn/fireworks | 5c2f0586e76ab08cadf8b9f4f85638d838f15448 | [
"BSD-3-Clause-LBNL"
] | 332 | 2015-01-06T18:40:53.000Z | 2022-03-18T04:44:33.000Z | fireworks/examples/tutorial_examples/introduction.py | jmmshn/fireworks | 5c2f0586e76ab08cadf8b9f4f85638d838f15448 | [
"BSD-3-Clause-LBNL"
] | 176 | 2015-01-16T14:06:53.000Z | 2022-02-15T00:45:57.000Z | """
This code is described in the Introductory tutorial,
https://materialsproject.github.io/fireworks/introduction.html
"""
from fireworks import Firework, LaunchPad, ScriptTask
from fireworks.core.rocket_launcher import launch_rocket
if __name__ == "__main__":
# set up the LaunchPad and reset it
launchpad = ... | 31.380952 | 83 | 0.751138 |
75471d41fe25ead143a94b83944eb71f60b7d114 | 2,946 | py | Python | tabular/src/autogluon/tabular/models/lgb/hyperparameters/parameters.py | zhiqiangdon/autogluon | 71ee7ef0f05d8f0aad112d8c1719174aa33194d9 | [
"Apache-2.0"
] | 4,462 | 2019-12-09T17:41:07.000Z | 2022-03-31T22:00:41.000Z | tabular/src/autogluon/tabular/models/lgb/hyperparameters/parameters.py | zhiqiangdon/autogluon | 71ee7ef0f05d8f0aad112d8c1719174aa33194d9 | [
"Apache-2.0"
] | 1,408 | 2019-12-09T17:48:59.000Z | 2022-03-31T20:24:12.000Z | tabular/src/autogluon/tabular/models/lgb/hyperparameters/parameters.py | zhiqiangdon/autogluon | 71ee7ef0f05d8f0aad112d8c1719174aa33194d9 | [
"Apache-2.0"
] | 623 | 2019-12-10T02:04:18.000Z | 2022-03-20T17:11:01.000Z | """ Default (fixed) hyperparameter values used in Gradient Boosting model. """
from autogluon.core.constants import BINARY, MULTICLASS, REGRESSION, SOFTCLASS
DEFAULT_NUM_BOOST_ROUND = 10000 # default for single training run
def get_param_baseline_custom(problem_type):
if problem_type == BINARY:
return ... | 25.842105 | 78 | 0.652749 |
2ade7fffbc61a1d77b2e7de82abd64bd338f215b | 21,172 | py | Python | oscar/lib/python2.7/site-packages/PIL/ImageFont.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/PIL/ImageFont.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/PIL/ImageFont.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | #
# The Python Imaging Library.
# $Id$
#
# PIL raster font management
#
# History:
# 1996-08-07 fl created (experimental)
# 1997-08-25 fl minor adjustments to handle fonts from pilfont 0.3
# 1999-02-06 fl rewrote most font management stuff in C
# 1999-03-17 fl take pth files into account in load_path ... | 46.429825 | 105 | 0.712828 |
a73d14e31bff7b9102b04a05a7ee6cd3bc535e7b | 1,791 | py | Python | models/mean_predictor/container/mean_predictor.py | AlexandreRozier/BigDataAnalytics | 50ac5fe0d87d29a1938b9f19c3785baa59e0b83e | [
"Apache-2.0"
] | null | null | null | models/mean_predictor/container/mean_predictor.py | AlexandreRozier/BigDataAnalytics | 50ac5fe0d87d29a1938b9f19c3785baa59e0b83e | [
"Apache-2.0"
] | null | null | null | models/mean_predictor/container/mean_predictor.py | AlexandreRozier/BigDataAnalytics | 50ac5fe0d87d29a1938b9f19c3785baa59e0b83e | [
"Apache-2.0"
] | null | null | null | import numpy as np
import pandas as pd
class MeanPredictor():
def __init__(self, freq='5min'):
self.freq = freq
def fit(self,x,square_deviation=False):
# Fits the model with a dataframe provided in x
# param: square_deviation - Weather to use the standard deviation or mea... | 39.8 | 111 | 0.61474 |
5915aaee17d5fb55bcef6f1c7a74d6647271fbb0 | 1,555 | py | Python | onnx_tf/handlers/backend/cast.py | malisit/onnx-tensorflow | 3eb41dc923f350ca533f1024f602a842dd55de45 | [
"Apache-2.0"
] | 1,110 | 2017-11-13T19:34:24.000Z | 2022-03-29T09:14:56.000Z | onnx_tf/handlers/backend/cast.py | malisit/onnx-tensorflow | 3eb41dc923f350ca533f1024f602a842dd55de45 | [
"Apache-2.0"
] | 768 | 2017-11-17T00:06:27.000Z | 2022-03-31T20:20:09.000Z | onnx_tf/handlers/backend/cast.py | malisit/onnx-tensorflow | 3eb41dc923f350ca533f1024f602a842dd55de45 | [
"Apache-2.0"
] | 281 | 2017-11-16T19:56:17.000Z | 2022-03-28T06:25:33.000Z | import tensorflow as tf
from onnx_tf.handlers.backend_handler import BackendHandler
from onnx_tf.handlers.handler import onnx_op
from onnx_tf.handlers.handler import tf_func
from onnx_tf.handlers.handler import partial_support
from onnx_tf.handlers.handler import ps_description
@onnx_op("Cast")
@tf_func(tf.cast)
@par... | 28.796296 | 77 | 0.701608 |
324172e51a9efe3e0d626880912102eea1fad27e | 4,771 | py | Python | library/oneview_storage_pool_facts.py | nabhajit-ray/oneview-ansible | b31af8a696013bac7a1900748a2fa5ba491fe8e2 | [
"Apache-2.0"
] | 108 | 2016-06-28T18:14:08.000Z | 2022-02-21T09:16:06.000Z | library/oneview_storage_pool_facts.py | HPE-Japan-Presales/oneview-ansible | 26eb13354333d862d9e80f07e3fe9bbe2eb59af3 | [
"Apache-2.0"
] | 248 | 2016-07-14T12:50:17.000Z | 2022-02-06T18:57:16.000Z | library/oneview_storage_pool_facts.py | HPE-Japan-Presales/oneview-ansible | 26eb13354333d862d9e80f07e3fe9bbe2eb59af3 | [
"Apache-2.0"
] | 88 | 2016-06-29T15:52:44.000Z | 2022-03-10T12:34:41.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
###
# Copyright (2016-2020) Hewlett Packard Enterprise Development LP
#
# 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/licen... | 31.183007 | 103 | 0.685181 |
725240532860f9e3f85418690c7a1c2c417aa937 | 967 | py | Python | setup.py | karjanme/wx-twitter-bot | 6e026b76dd581fcd1322611f43414a6de0fdac6c | [
"MIT"
] | null | null | null | setup.py | karjanme/wx-twitter-bot | 6e026b76dd581fcd1322611f43414a6de0fdac6c | [
"MIT"
] | 2 | 2022-01-27T19:04:03.000Z | 2022-01-30T03:14:09.000Z | setup.py | karjanme/wx-twitter-bot | 6e026b76dd581fcd1322611f43414a6de0fdac6c | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="wxtwitterbot",
version="0.2.1",
author="Karl Jansen",
author_email="jnsnkrl@live.com",
license="MIT",
description="Wx Twitter Bot",
long_description=long_description,
... | 27.628571 | 54 | 0.584281 |
7cf75330a5a303ac57eca72fa4859c38b3125e84 | 374 | py | Python | game/game_objects/windows/SplashScreen.py | mikaelparsekyan/SpaceWars | 97fba68a6f95a6ea55af8e81d36e904a3e6269a3 | [
"MIT"
] | null | null | null | game/game_objects/windows/SplashScreen.py | mikaelparsekyan/SpaceWars | 97fba68a6f95a6ea55af8e81d36e904a3e6269a3 | [
"MIT"
] | null | null | null | game/game_objects/windows/SplashScreen.py | mikaelparsekyan/SpaceWars | 97fba68a6f95a6ea55af8e81d36e904a3e6269a3 | [
"MIT"
] | null | null | null | import time
import pygame
pygame.init()
class SplashScreen():
def __init__(self, screen):
text = str("splashhhh")
font = pygame.font.SysFont('arial', 200)
text = font.render(text, True, (255,0,0))
try:
screen.screen.blit(text, (12, 12))
time.sleep(1.5)
... | 22 | 49 | 0.561497 |
7c287c3ddc4169e9d15aca1951c4d2ed6df2ba20 | 8,393 | py | Python | GArDen/transform/minimal_cycle_annotation.py | zaidurrehman/EDeN | 1f29d4c9d458edb2bd62a98e57254d78a1f2093f | [
"MIT"
] | null | null | null | GArDen/transform/minimal_cycle_annotation.py | zaidurrehman/EDeN | 1f29d4c9d458edb2bd62a98e57254d78a1f2093f | [
"MIT"
] | null | null | null | GArDen/transform/minimal_cycle_annotation.py | zaidurrehman/EDeN | 1f29d4c9d458edb2bd62a98e57254d78a1f2093f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Provides annotation of minimal cycles."""
import eden
from collections import defaultdict
from sklearn.base import BaseEstimator, ClassifierMixin
import networkx as nx
import logging
logger = logging.getLogger(__name__)
class AnnotateMinimalCycles(BaseEstimator, ClassifierMixin):
"""Ann... | 32.657588 | 79 | 0.553437 |
9c5831689fee97fab76df799ad7676723ed8649e | 2,926 | py | Python | app/core/tests/test_models.py | PFrangeskos/recipe-app-api | 79654094c8c0a160ebc82c90eda3f504ed7b6a64 | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | PFrangeskos/recipe-app-api | 79654094c8c0a160ebc82c90eda3f504ed7b6a64 | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | PFrangeskos/recipe-app-api | 79654094c8c0a160ebc82c90eda3f504ed7b6a64 | [
"MIT"
] | null | null | null | from unittest.mock import patch
from django.test import TestCase
from django.contrib.auth import get_user_model
from core import models
def sample_user(email='test@londonappdev.com', password='testpass'):
# create a sample user.
return get_user_model().objects.create_user(email, password)
class ModelTests(... | 31.804348 | 73 | 0.646617 |
acbd1f6e08ad2586cfd9c2e86fdef3447f5c9f3b | 16,469 | py | Python | src/python/DTNRMLibs/pycurl_manager.py | cmscaltech/siterm | 6af2b0cc61d52391255e0b125d221e8cdebb1997 | [
"Apache-2.0"
] | null | null | null | src/python/DTNRMLibs/pycurl_manager.py | cmscaltech/siterm | 6af2b0cc61d52391255e0b125d221e8cdebb1997 | [
"Apache-2.0"
] | null | null | null | src/python/DTNRMLibs/pycurl_manager.py | cmscaltech/siterm | 6af2b0cc61d52391255e0b125d221e8cdebb1997 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: ISO-8859-1 -*-
# pylint: disable=R0913,W0702,R0914,R0912,R0201
"""
File: pycurl_manager.py
Author: Valentin Kuznetsov <vkuznet@gmail.com>
Description: a basic wrapper around pycurl library.
The RequestHandler class provides basic APIs to get data
from a single resource or submit mutl... | 36.27533 | 111 | 0.556864 |
38a664573b1d3442683e507afca893580e6ef49e | 1,389 | py | Python | savecode/pythonpackages/commonbaby/proxy/proxydbconfig.py | Octoberr/swm0920 | 8f05a6b91fc205960edd57f9076facec04f49a1a | [
"Apache-2.0"
] | 2 | 2019-05-19T11:54:26.000Z | 2019-05-19T12:03:49.000Z | savecode/pythonpackages/commonbaby/proxy/proxydbconfig.py | Octoberr/swm0920 | 8f05a6b91fc205960edd57f9076facec04f49a1a | [
"Apache-2.0"
] | 1 | 2020-11-27T07:55:15.000Z | 2020-11-27T07:55:15.000Z | savecode/pythonpackages/commonbaby/proxy/proxydbconfig.py | Octoberr/swm0920 | 8f05a6b91fc205960edd57f9076facec04f49a1a | [
"Apache-2.0"
] | 2 | 2021-09-06T18:06:12.000Z | 2021-12-31T07:44:43.000Z | """db sqlite config"""
# -*- coding:utf-8 -*-
import os
class ProxyDbConfig:
"""表示sqlite专用配置。\n
dbdir: 数据库文件存放路径,默认./_db\n
dbname: 数据库文件名,默认data.db\n
maxdbfisize: 最大数据库文件大小,默认100MB\n
errordbdelete: 异常数据库文件是否删除,默认False不删除,而是改名存放。\n
connecttimeoutsec: 数据库链接超时时间,float,单位秒,默认60秒\n
delete_on_... | 29.553191 | 60 | 0.607631 |
72639bba261018a41514143ec5217124b25f898b | 672 | py | Python | test.py | pgupta119/LeetCode | 3e7418402d736cba19362fe7525fdc9067cfcaef | [
"MIT"
] | null | null | null | test.py | pgupta119/LeetCode | 3e7418402d736cba19362fe7525fdc9067cfcaef | [
"MIT"
] | null | null | null | test.py | pgupta119/LeetCode | 3e7418402d736cba19362fe7525fdc9067cfcaef | [
"MIT"
] | null | null | null | # You have a set of integers s, which originally contains all the numbers from 1 to n. Unfortunately, due to some error, one of the numbers in s got duplicated to another number in the set, which results in repetition of one number and loss of another number.
# You are given an integer array nums representing the data... | 51.692308 | 259 | 0.723214 |
6c0f81d67436f0b8d4fddfd44fb06994c15ede6e | 2,908 | py | Python | pygui/widget/editor/tabbed_textpad.py | clark3493/pygui | 7de660341dfd1486de269edd116f642805e9ecb0 | [
"MIT"
] | null | null | null | pygui/widget/editor/tabbed_textpad.py | clark3493/pygui | 7de660341dfd1486de269edd116f642805e9ecb0 | [
"MIT"
] | null | null | null | pygui/widget/editor/tabbed_textpad.py | clark3493/pygui | 7de660341dfd1486de269edd116f642805e9ecb0 | [
"MIT"
] | null | null | null | import os
import tkinter as tk
from .textpad import TextPad
from ..tab_view import AbstractTabView
class TabbedTextpad(AbstractTabView):
NEW_TAB_BASENAME = "new%d"
def __init__(self, parent, *args, **kwargs):
super().__init__(parent, *args, **kwargs)
self.set_options()
self.ad... | 30.93617 | 93 | 0.594911 |
f2a800a9dae55fa650c4e2617b5b23f7180177ba | 6,325 | py | Python | selfdrive/car/hyundai/values.py | raykholo/openpilot | 12a79cdd7ea2c38b3938b6c37663cf08e65009a1 | [
"MIT"
] | 85 | 2019-06-14T17:51:31.000Z | 2022-02-09T22:18:20.000Z | selfdrive/car/hyundai/values.py | raykholo/openpilot | 12a79cdd7ea2c38b3938b6c37663cf08e65009a1 | [
"MIT"
] | 2 | 2018-05-25T04:12:56.000Z | 2018-10-24T19:09:08.000Z | selfdrive/car/hyundai/values.py | raykholo/openpilot | 12a79cdd7ea2c38b3938b6c37663cf08e65009a1 | [
"MIT"
] | 25 | 2019-08-13T09:52:05.000Z | 2021-11-03T02:04:58.000Z | from cereal import car
from selfdrive.car import dbc_dict
VisualAlert = car.CarControl.HUDControl.VisualAlert
def get_hud_alerts(visual_alert):
if visual_alert == VisualAlert.steerRequired:
return 5
else:
return 0
# Steer torque limits
class SteerLimitParams:
STEER_MAX = 255 # 409 is the max, 255 is... | 68.75 | 781 | 0.574545 |
90b8d878967e9913da03f1c316be31584a72199f | 269 | py | Python | core/migrations/0008_merge_20200424_1243.py | methods/phe-cv19-site | fd5f877b8a0725a9893fa3c24a54e9495e749744 | [
"MIT"
] | 1 | 2020-09-21T16:35:16.000Z | 2020-09-21T16:35:16.000Z | core/migrations/0008_merge_20200424_1243.py | methods/phe-cv19-site | fd5f877b8a0725a9893fa3c24a54e9495e749744 | [
"MIT"
] | 14 | 2020-03-25T10:29:26.000Z | 2022-01-13T03:45:38.000Z | core/migrations/0008_merge_20200424_1243.py | methods/phe-cv19-site | fd5f877b8a0725a9893fa3c24a54e9495e749744 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.11 on 2020-04-24 12:43
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0006_auto_20200414_0959'),
('core', '0007_merge_20200416_1038'),
]
operations = [
]
| 17.933333 | 48 | 0.643123 |
9cb14027003c468788977684bf1f7f72a3bc6e91 | 2,216 | py | Python | example/testspider.py | bopopescu/pspider | b83430f00d168deb1ab3f15e7a7c93735bd307f7 | [
"MIT"
] | 168 | 2017-10-13T08:20:49.000Z | 2018-08-17T08:42:27.000Z | example/testspider.py | bopopescu/pspider | b83430f00d168deb1ab3f15e7a7c93735bd307f7 | [
"MIT"
] | 2 | 2021-03-31T19:10:18.000Z | 2021-12-13T19:56:02.000Z | example/testspider.py | bopopescu/pspider | b83430f00d168deb1ab3f15e7a7c93735bd307f7 | [
"MIT"
] | 7 | 2019-05-09T05:00:12.000Z | 2021-12-06T03:39:32.000Z | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# @Created on : 2019-03-07 12:28
# @Author : zpy
# @Software: PyCharm
from spider.pspider import Pspider, req
from spider.model import BaseModel
class LagouSpider(Pspider):
def task(self):
return self.tasks
def req_resp(self):
self.jobmodel = Ba... | 29.157895 | 109 | 0.525722 |
8dbc64d621c06184f0da8675ed32647555452720 | 2,771 | py | Python | src/ndn/bin/nfdc/cmd_get_status.py | tianyuan129/python-ndn | f390b3122d2a233a9a22a1ee9468b1241c46ef86 | [
"Apache-2.0"
] | 5 | 2019-10-03T01:26:43.000Z | 2020-07-07T15:21:52.000Z | src/ndn/bin/nfdc/cmd_get_status.py | tianyuan129/python-ndn | f390b3122d2a233a9a22a1ee9468b1241c46ef86 | [
"Apache-2.0"
] | 12 | 2019-10-28T03:17:16.000Z | 2020-08-26T22:10:52.000Z | src/ndn/bin/nfdc/cmd_get_status.py | tianyuan129/python-ndn | f390b3122d2a233a9a22a1ee9468b1241c46ef86 | [
"Apache-2.0"
] | 10 | 2019-10-18T21:16:43.000Z | 2021-06-24T07:26:22.000Z | # -----------------------------------------------------------------------------
# Copyright (C) 2019-2021 The python-ndn authors
#
# This file is part of python-ndn.
#
# 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 ... | 43.296875 | 86 | 0.61061 |
7a031d870e82ceb26b6f058d2445ef4a4b49e90c | 1,488 | py | Python | pyopengl/triforce/triforce.py | kenjisatoh/pygame | cf5ba2331dc6b4a930f9c3dacbaa7954f51498db | [
"MIT"
] | 22 | 2016-06-02T06:05:59.000Z | 2021-05-17T03:38:28.000Z | pyopengl/triforce/triforce.py | kenjisatoh/pygame | cf5ba2331dc6b4a930f9c3dacbaa7954f51498db | [
"MIT"
] | null | null | null | pyopengl/triforce/triforce.py | kenjisatoh/pygame | cf5ba2331dc6b4a930f9c3dacbaa7954f51498db | [
"MIT"
] | 17 | 2016-03-04T12:29:15.000Z | 2020-11-29T13:11:28.000Z | #!/usr/bin/env python
#coding:utf-8
from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GLUT import *
import sys
angle = 0.0
def main():
glutInit(sys.argv)
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH)
glutInitWindowSize(300, 300)
glutInitWindowPosition(100, 100)
glutCreateWind... | 21.257143 | 60 | 0.633065 |
d9d3469186bb06173219a7d0d2fce6daaa7dbb8a | 11,261 | py | Python | maskrcnn_benchmark/config/defaults.py | qixuxiang/maskrcnn_tianchi_stage2 | 52023b64268dc91f0b5b9f085203ab00a542458a | [
"MIT"
] | null | null | null | maskrcnn_benchmark/config/defaults.py | qixuxiang/maskrcnn_tianchi_stage2 | 52023b64268dc91f0b5b9f085203ab00a542458a | [
"MIT"
] | null | null | null | maskrcnn_benchmark/config/defaults.py | qixuxiang/maskrcnn_tianchi_stage2 | 52023b64268dc91f0b5b9f085203ab00a542458a | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import os
from yacs.config import CfgNode as CN
# -----------------------------------------------------------------------------
# Convention about Training / Test specific parameters
# ------------------------------------------------------------... | 40.65343 | 83 | 0.638487 |
a2e627d0b18a32696752c06ece81e1f73a69758f | 7,355 | py | Python | store/apps/models/models.py | Boring-Mind/sbc-store | d16cce07bcb05ff2ea901411a5129ab1f0540161 | [
"MIT"
] | null | null | null | store/apps/models/models.py | Boring-Mind/sbc-store | d16cce07bcb05ff2ea901411a5129ab1f0540161 | [
"MIT"
] | null | null | null | store/apps/models/models.py | Boring-Mind/sbc-store | d16cce07bcb05ff2ea901411a5129ab1f0540161 | [
"MIT"
] | null | null | null | from django.db import models
from django.utils import timezone
from datetime import date as pydate
# Site-related tables
# -------------------------
class Customers(models.Model):
first_name = models.CharField(max_length=90)
second_name = models.CharField(max_length=120)
surname = models.CharField(max_len... | 25.538194 | 70 | 0.674371 |
5dc83b3e1ce4ff6cd2432e8944d8c15026444368 | 2,414 | py | Python | main.py | emersonrafaels/deep_check_orientation | 6c98b29f88b29fe2e707b700cbd6a08e474f9933 | [
"MIT"
] | null | null | null | main.py | emersonrafaels/deep_check_orientation | 6c98b29f88b29fe2e707b700cbd6a08e474f9933 | [
"MIT"
] | null | null | null | main.py | emersonrafaels/deep_check_orientation | 6c98b29f88b29fe2e707b700cbd6a08e474f9933 | [
"MIT"
] | null | null | null | """
UTILIZAÇÃO DE APRENDIZADO PROFUNDO (DEEP LEARNING) PARA VERIFICAÇÃO DA ORIENTAÇÃO DE UMA IMAGEM
E ROTAÇÃO ADEQUADA DA MESMA. AO SER ENVIADA UMA IMAGEM (EM QUALQUER FORMATO),
RETORNA-SE O NÚMERO DE ROTAÇÕES NECESÁRIAS E A IMAGEM ROTACIONADA CORRETAMENTE.
OS PASSOS REALIZADOS SÃO:
1) LEITURA DA ... | 40.233333 | 133 | 0.658658 |
89bd2d3056b29a261d3d4b1b1d6309c820bd45ac | 3,914 | py | Python | python/bifrost/blocks/reverse.py | Radio-Camera-Initiative/bifrost | d4891bcc97335fb6e7955314c40631ef9136f556 | [
"BSD-3-Clause"
] | null | null | null | python/bifrost/blocks/reverse.py | Radio-Camera-Initiative/bifrost | d4891bcc97335fb6e7955314c40631ef9136f556 | [
"BSD-3-Clause"
] | 1 | 2022-02-09T00:25:09.000Z | 2022-02-09T00:25:09.000Z | python/bifrost/blocks/reverse.py | Radio-Camera-Initiative/bifrost | d4891bcc97335fb6e7955314c40631ef9136f556 | [
"BSD-3-Clause"
] | 1 | 2021-12-14T21:59:46.000Z | 2021-12-14T21:59:46.000Z |
# Copyright (c) 2016, The Bifrost Authors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions a... | 41.638298 | 75 | 0.661983 |
d4c18a78c242bb70a8f383c5bf65a65401d006d0 | 652 | py | Python | fbpcs/pid/service/pid_service/pid_stage_input.py | bliud/fbpcs | 35a479fb7f3673a11ccfb012bf882b1de00b0b28 | [
"MIT"
] | 63 | 2021-08-18T01:50:22.000Z | 2022-03-25T06:44:36.000Z | fbpcs/pid/service/pid_service/pid_stage_input.py | bliud/fbpcs | 35a479fb7f3673a11ccfb012bf882b1de00b0b28 | [
"MIT"
] | 672 | 2021-08-18T05:20:32.000Z | 2022-03-31T23:30:13.000Z | fbpcs/pid/service/pid_service/pid_stage_input.py | bliud/fbpcs | 35a479fb7f3673a11ccfb012bf882b1de00b0b28 | [
"MIT"
] | 61 | 2021-08-18T20:02:30.000Z | 2022-03-31T22:44:17.000Z | #!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from dataclasses import dataclass
from typing import List, Optional
@dataclass
class PIDStageInput:
input_paths... | 27.166667 | 65 | 0.728528 |
2887bd3df62ccbd017f3aaf9e671e9e698b28751 | 20,516 | py | Python | Game5/modules/sprites/tanks.py | ttkaixin1998/pikachupythongames | 609a3a5a2be3f5a187c332c7980bb5bb14548f02 | [
"MIT"
] | 4,013 | 2018-06-16T08:00:02.000Z | 2022-03-30T11:48:14.000Z | Game5/modules/sprites/tanks.py | pigbearcat/Games | b8c47ef1bcce9a9db3f3730c162e6e8e08b508a2 | [
"MIT"
] | 22 | 2018-10-18T00:15:50.000Z | 2022-01-13T08:16:15.000Z | Game5/modules/sprites/tanks.py | pigbearcat/Games | b8c47ef1bcce9a9db3f3730c162e6e8e08b508a2 | [
"MIT"
] | 2,172 | 2018-07-20T04:03:14.000Z | 2022-03-31T14:18:29.000Z | '''
Function:
坦克类
Author:
Charles
微信公众号:
Charles的皮卡丘
'''
import pygame
import random
from .foods import Foods
from .bullet import Bullet
'''玩家坦克类'''
class PlayerTank(pygame.sprite.Sprite):
def __init__(self, name, player_tank_image_paths, position, border_len, screensize, direction='up', bullet_image_... | 42.920502 | 208 | 0.595486 |
332017817e281c8d4761ee99399c7c579124d674 | 2,128 | py | Python | valohai_cli/commands/project/status.py | JohnCHarrington/valohai-cli | 8703538d43331b97f5dd8339047a6b84b97aed79 | [
"MIT"
] | null | null | null | valohai_cli/commands/project/status.py | JohnCHarrington/valohai-cli | 8703538d43331b97f5dd8339047a6b84b97aed79 | [
"MIT"
] | null | null | null | valohai_cli/commands/project/status.py | JohnCHarrington/valohai-cli | 8703538d43331b97f5dd8339047a6b84b97aed79 | [
"MIT"
] | null | null | null | import click
from valohai_cli.api import request
from valohai_cli.ctx import get_project
from valohai_cli.table import print_table
from valohai_cli.models.project import Project
@click.command()
@click.option('--summary/--no-summary', default=True, help='Show execution summary')
@click.option('--incomplete/--no-inco... | 33.25 | 105 | 0.651316 |
e9ea7416d5781e834e9fabbf3b99c1e356ab4332 | 1,997 | py | Python | retro/i3info/track_and_cascade_photon_parameterizations.py | eat5210/retro | 4b426422bcb102d8031bc2f5715fd766630162fc | [
"Apache-2.0"
] | null | null | null | retro/i3info/track_and_cascade_photon_parameterizations.py | eat5210/retro | 4b426422bcb102d8031bc2f5715fd766630162fc | [
"Apache-2.0"
] | null | null | null | retro/i3info/track_and_cascade_photon_parameterizations.py | eat5210/retro | 4b426422bcb102d8031bc2f5715fd766630162fc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# pylint: disable=invalid-name
"""
Display photon production info for tracks and cascades, as parameterized in
IceCube software
"""
from __future__ import absolute_import, division, print_function
from os.path import expandvars
from icecube.clsim.traysegments.common imp... | 31.203125 | 75 | 0.718077 |
e9b8c5e52eb8b3d5d12182b24c0fe555e51a3a7a | 3,771 | py | Python | server/app.py | jsdelivrbot/allocate-me | 88ccf78d664d06b2885efeb83f4e340de60c28ec | [
"MIT"
] | null | null | null | server/app.py | jsdelivrbot/allocate-me | 88ccf78d664d06b2885efeb83f4e340de60c28ec | [
"MIT"
] | null | null | null | server/app.py | jsdelivrbot/allocate-me | 88ccf78d664d06b2885efeb83f4e340de60c28ec | [
"MIT"
] | 1 | 2018-12-08T11:33:37.000Z | 2018-12-08T11:33:37.000Z | #!/usr/bin/env python3
import os
import re
import uuid
from datetime import timedelta
import pyexcel
import pytz
import vobject
from dateutil.parser import parse
from dateutil.rrule import rrule, rruleset, WEEKLY
from flask import Flask, render_template, request, send_from_directory
from xlrd.biffh import XLRDError
f... | 32.508621 | 109 | 0.632458 |
f63db5828ef2da8e787ab600e19a956026e9f0d2 | 3,892 | py | Python | poloniex/api.py | luisan00/poloniex-wrapper | 8b676f25103f6a0b47e22fe55a6a44e1fa3bd14b | [
"MIT"
] | null | null | null | poloniex/api.py | luisan00/poloniex-wrapper | 8b676f25103f6a0b47e22fe55a6a44e1fa3bd14b | [
"MIT"
] | null | null | null | poloniex/api.py | luisan00/poloniex-wrapper | 8b676f25103f6a0b47e22fe55a6a44e1fa3bd14b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import certifi
import json
import time
import urllib3
class public():
'''
Acording to the documentation available in:
https://poloniex.com/support/api/
There is six API public methods.
'''
def __init__(self):
self.pool = urllib3.PoolManager(
... | 29.938462 | 77 | 0.501542 |
398e73be6f6a466c4db3a11250b01b5ff23cac5a | 24,924 | py | Python | samples/deploy_and_test.py | dirkrichtsteiger/cloud-security-xsuaa-integration | 712941a94fa1eb4d74b714194628f5d318bb9cde | [
"Apache-2.0"
] | null | null | null | samples/deploy_and_test.py | dirkrichtsteiger/cloud-security-xsuaa-integration | 712941a94fa1eb4d74b714194628f5d318bb9cde | [
"Apache-2.0"
] | null | null | null | samples/deploy_and_test.py | dirkrichtsteiger/cloud-security-xsuaa-integration | 712941a94fa1eb4d74b714194628f5d318bb9cde | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import abc
import subprocess
import urllib.request
from urllib.parse import urlencode
from urllib.error import HTTPError
from base64 import b64encode
import json
import unittest
import logging
import os
import time
import re
from getpass import getpass
# Usage information
# To run this script yo... | 43.649737 | 1,295 | 0.667549 |
dedb67ba08576881950196e8c081818e57a24cea | 10,534 | py | Python | features/steps/project_steps.py | Reveal-Energy-Services/orchid-python-api | 21ed6058009f6b8793050a934238d2858a7fa0c9 | [
"Apache-2.0"
] | null | null | null | features/steps/project_steps.py | Reveal-Energy-Services/orchid-python-api | 21ed6058009f6b8793050a934238d2858a7fa0c9 | [
"Apache-2.0"
] | 28 | 2020-08-14T14:08:43.000Z | 2022-02-07T14:11:38.000Z | features/steps/project_steps.py | Reveal-Energy-Services/orchid-python-api | 21ed6058009f6b8793050a934238d2858a7fa0c9 | [
"Apache-2.0"
] | 1 | 2021-12-01T21:20:07.000Z | 2021-12-01T21:20:07.000Z | # Copyright 2017-2021 Reveal Energy Services, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | 40.053232 | 117 | 0.724701 |
2cfcb1b9f33bf6860ca90c3f3c4d82a2442eabc0 | 3,057 | py | Python | magnebot/object_static.py | neuroailab/magnebot | 3f537fcd95685efeadf7200208a310a4c6a2f10c | [
"MIT"
] | null | null | null | magnebot/object_static.py | neuroailab/magnebot | 3f537fcd95685efeadf7200208a310a4c6a2f10c | [
"MIT"
] | null | null | null | magnebot/object_static.py | neuroailab/magnebot | 3f537fcd95685efeadf7200208a310a4c6a2f10c | [
"MIT"
] | null | null | null | import numpy as np
from json import loads
from tdw.object_init_data import TransformInitData
from magnebot.paths import OBJECT_CATEGORIES_PATH
class ObjectStatic:
"""
Info for an object that doesn't change between frames, such as its ID and mass.
```python
from magnebot import Magnebot
m = Magne... | 39.701299 | 134 | 0.643441 |
30d160db52cdff97ef4865dad0b96e27b41fd45e | 4,639 | py | Python | torchkge/utils/operations.py | sucpark/kge_visualization | 547e501a38b129a030a66295c03a98aefc899c68 | [
"MIT"
] | null | null | null | torchkge/utils/operations.py | sucpark/kge_visualization | 547e501a38b129a030a66295c03a98aefc899c68 | [
"MIT"
] | null | null | null | torchkge/utils/operations.py | sucpark/kge_visualization | 547e501a38b129a030a66295c03a98aefc899c68 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Copyright TorchKGE developers
@author: Armand Boschin <aboschin@enst.fr>
"""
from pandas import DataFrame
from torch import zeros, cat
def get_mask(length, start, end):
"""Create a mask of length `length` filled with 0s except between indices
`start` (included) and `end` (exclude... | 29.547771 | 77 | 0.602285 |
98d92e515fa4da6531cc091c7883a3c043c3ff74 | 22,356 | py | Python | tests/test_lambda.py | prubesh/cloud-custodian | 2d8d135256d34ed7edeee104eab9b1956f457076 | [
"Apache-2.0"
] | 1 | 2020-12-31T05:09:30.000Z | 2020-12-31T05:09:30.000Z | tests/test_lambda.py | prubesh/cloud-custodian | 2d8d135256d34ed7edeee104eab9b1956f457076 | [
"Apache-2.0"
] | 11 | 2019-12-15T17:52:14.000Z | 2020-12-09T05:06:24.000Z | tests/test_lambda.py | lfranchini31/cloud-custodian | 1830fe4b9a59ff6afb675985c9ea531571616a76 | [
"Apache-2.0"
] | 9 | 2019-11-18T07:46:44.000Z | 2020-04-15T11:20:20.000Z | # Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
import json
from mock import patch
from botocore.exceptions import ClientError
from .common import BaseTest, functional
from c7n.executor import MainThreadExecutor
from c7n.resources.aws import shape_validate
from c7n.resources.awslambda im... | 38.150171 | 123 | 0.529388 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.