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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ece3b3fc5faef477a330d2708a248938871df6ae | 462 | py | Python | aula6cap2.py | asalesg/python | 885ff5fae1e685424863286082fbe49ca5f4efe7 | [
"MIT"
] | null | null | null | aula6cap2.py | asalesg/python | 885ff5fae1e685424863286082fbe49ca5f4efe7 | [
"MIT"
] | null | null | null | aula6cap2.py | asalesg/python | 885ff5fae1e685424863286082fbe49ca5f4efe7 | [
"MIT"
] | null | null | null | #solicitando os dados do cliente
valor_compra = input("Informe o valor da compra realizada ")
cupom = input("Digite o cupom de desconto ")
#realizando o teste lógico com o cupom em maiúsculas
if cupom.upper() == "NIVER10":
#cálculo de 10% de desconto
valor_final = float(valor_compra) * 0.9
else:
valor_final... | 38.5 | 60 | 0.731602 |
fa82c4537a79ae79b916103b780590bdcde39b21 | 2,332 | py | Python | gdsctools/__init__.py | Donnyvdm/gdsctools | 164ccd284e33202117f505210af96ae44d819203 | [
"Python-2.0",
"OLDAP-2.7"
] | 28 | 2016-03-19T14:43:00.000Z | 2022-02-26T14:48:02.000Z | gdsctools/__init__.py | Donnyvdm/gdsctools | 164ccd284e33202117f505210af96ae44d819203 | [
"Python-2.0",
"OLDAP-2.7"
] | 182 | 2015-10-14T10:42:41.000Z | 2022-01-06T16:17:14.000Z | gdsctools/__init__.py | Donnyvdm/gdsctools | 164ccd284e33202117f505210af96ae44d819203 | [
"Python-2.0",
"OLDAP-2.7"
] | 13 | 2015-12-27T07:43:39.000Z | 2021-11-14T21:50:32.000Z | """GDSCTools
::
from gdsctools import ANOVA, ic50_test, ANOVAReport
gdsc = ANOVA(ic50_test)
results = gdsc.anova_all()
report = ANOVAReport(gdsc, results)
report.create_html_pages()
Please See documentation on gdsctools.readthedocs.org
"""
import pkg_resources
import os
import warnings
warning... | 28.790123 | 79 | 0.727702 |
05febe4973a96f41568938c627eb134237f9e011 | 532 | py | Python | examples/telebot/handlers.py | dotX12/EventFisher | 437a7a1e87013c14d4018887488b3c8b353487e6 | [
"Apache-2.0"
] | 1 | 2021-02-05T22:35:56.000Z | 2021-02-05T22:35:56.000Z | examples/telebot/handlers.py | dotX12/EventFisher | 437a7a1e87013c14d4018887488b3c8b353487e6 | [
"Apache-2.0"
] | null | null | null | examples/telebot/handlers.py | dotX12/EventFisher | 437a7a1e87013c14d4018887488b3c8b353487e6 | [
"Apache-2.0"
] | null | null | null | from misc import *
@event.on('new_transaction')
def new_transaction():
bot.send_message(ADMIN_ID, f'New Transaction! TX Hash: {event.tx["tx_hash"]}')
@event.on('new_btc_medium_fee')
def btc_new_price():
bot.send_message(ADMIN_ID, f'BTC NEW MEDIUM FEE: {event.medium_fee}')
@bot.message_handler(commands=['h... | 25.333333 | 82 | 0.731203 |
ff38af50a1f1a4db3047c3e06f5c276a02166581 | 3,473 | py | Python | dmriprep/interfaces/vectors.py | dPys/dmriprep | f3c962b586210b2d38075626a812c58d0a58af2f | [
"Apache-2.0"
] | 1 | 2020-08-19T16:00:40.000Z | 2020-08-19T16:00:40.000Z | dmriprep/interfaces/vectors.py | dPys/dmriprep | f3c962b586210b2d38075626a812c58d0a58af2f | [
"Apache-2.0"
] | 1 | 2019-11-01T07:37:45.000Z | 2019-11-02T00:31:58.000Z | dmriprep/interfaces/vectors.py | dPys/dmriprep | f3c962b586210b2d38075626a812c58d0a58af2f | [
"Apache-2.0"
] | 1 | 2020-09-20T02:20:07.000Z | 2020-09-20T02:20:07.000Z | """Handling the gradient table."""
from pathlib import Path
import numpy as np
from nipype.utils.filemanip import fname_presuffix
from nipype.interfaces.base import (
SimpleInterface, BaseInterfaceInputSpec, TraitedSpec,
File, traits, isdefined
)
from ..utils.vectors import DiffusionGradientTable, B0_THRESHOLD,... | 34.04902 | 83 | 0.651598 |
cbf95abadc429ecb28f53fd9dd52aef3858448c5 | 16,151 | py | Python | game/spirit/search/tests.py | Yoann-Vie/esgi-hearthstone | 115d03426c7e8e80d89883b78ac72114c29bed12 | [
"PSF-2.0",
"BSD-3-Clause"
] | 3 | 2019-08-18T19:08:48.000Z | 2019-12-04T18:14:29.000Z | game/spirit/search/tests.py | Yoann-Vie/esgi-hearthstone | 115d03426c7e8e80d89883b78ac72114c29bed12 | [
"PSF-2.0",
"BSD-3-Clause"
] | 10 | 2020-02-12T00:38:24.000Z | 2022-02-10T07:47:09.000Z | game/spirit/search/tests.py | Yoann-Vie/esgi-hearthstone | 115d03426c7e8e80d89883b78ac72114c29bed12 | [
"PSF-2.0",
"BSD-3-Clause"
] | 2 | 2019-12-03T15:43:17.000Z | 2020-04-30T11:50:19.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
from django.test import TestCase, override_settings
from django.urls import reverse
from django.template import Template, Context
from django.core.management import call_command
from django.template.loader import render_to_string
from dja... | 35.41886 | 93 | 0.6199 |
ff7ef44a7acba00d581cbccee667905b88277e47 | 12,032 | py | Python | tutorials/frontend/deploy_model_on_android.py | zhenlohuang/tvm | fd2e6d17120a79533852c6bb705429d9c7bc286b | [
"Apache-2.0"
] | 40 | 2021-06-14T23:14:46.000Z | 2022-03-21T14:32:23.000Z | tutorials/frontend/deploy_model_on_android.py | zhenlohuang/tvm | fd2e6d17120a79533852c6bb705429d9c7bc286b | [
"Apache-2.0"
] | 14 | 2021-06-08T03:15:54.000Z | 2022-02-01T23:50:24.000Z | tutorials/frontend/deploy_model_on_android.py | zhenlohuang/tvm | fd2e6d17120a79533852c6bb705429d9c7bc286b | [
"Apache-2.0"
] | 11 | 2021-06-14T05:56:18.000Z | 2022-02-27T06:52:07.000Z | # 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... | 32.784741 | 173 | 0.651679 |
612f5a9d7e8ae0eff1e053d4addfd1a668aeca2f | 378 | py | Python | 67-maximumPathSumII/67-maximumPathSumII.py | EndlessDex/euler | 4b57c0b1b2d9067b257400b553b472cb1270168f | [
"MIT"
] | null | null | null | 67-maximumPathSumII/67-maximumPathSumII.py | EndlessDex/euler | 4b57c0b1b2d9067b257400b553b472cb1270168f | [
"MIT"
] | null | null | null | 67-maximumPathSumII/67-maximumPathSumII.py | EndlessDex/euler | 4b57c0b1b2d9067b257400b553b472cb1270168f | [
"MIT"
] | null | null | null | with open('data.txt') as file:
triStr = file.read()
triArr = [[int(num) for num in row.split()] for row in triStr.strip('\n').split('\n')]
for level in range(len(triArr) - 2, -1, -1):
for index, _ in enumerate(triArr[level]):
triArr[level][index] += max(triArr[level+1][index],
... | 34.363636 | 86 | 0.566138 |
609b09d5a69dc9f2799e6bee3f8d8b83a2921d46 | 5,483 | py | Python | hangulize/langs/hbs/__init__.py | sublee/hangulize | 488cb85525e2eca795b042b735ba54359c928fd9 | [
"BSD-3-Clause"
] | 145 | 2015-01-05T11:48:05.000Z | 2022-02-08T07:52:16.000Z | hangulize/langs/hbs/__init__.py | dahlia/hangulize | 903e07cb587670f80020818f5c384ceca29ed67b | [
"BSD-3-Clause"
] | 13 | 2015-03-25T14:56:01.000Z | 2018-08-09T14:53:22.000Z | hangulize/langs/hbs/__init__.py | dahlia/hangulize | 903e07cb587670f80020818f5c384ceca29ed67b | [
"BSD-3-Clause"
] | 31 | 2015-02-23T23:21:10.000Z | 2020-06-26T10:08:23.000Z | # -*- coding: utf-8 -*-
from hangulize import *
class SerboCroatian(Language):
"""For transcribing Serbo-Croatian."""
__iso639__ = {3: 'hbs'}
vowels = 'aeiouy'
consonants = 'cCfhst'
notation = Notation([
(u'č', 'C'),
(u'ć', 'C'),
(u'đ',... | 41.854962 | 72 | 0.221412 |
414fb0c699edde4373deaeda66fe65e796590a86 | 25,860 | py | Python | tensorflow/python/kernel_tests/variables_test.py | DHsLc/test | f286c78b619b81ca95ba9f738cc0de4e14440e44 | [
"Apache-2.0"
] | 2 | 2019-05-17T06:08:20.000Z | 2019-05-17T12:00:24.000Z | tensorflow/python/kernel_tests/variables_test.py | radi2015/tensorflow | 4b2fb49fd7578afe7e289936f347af581b5bdab1 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/kernel_tests/variables_test.py | radi2015/tensorflow | 4b2fb49fd7578afe7e289936f347af581b5bdab1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 37.155172 | 94 | 0.657541 |
a63c165b1fd9525d3a04a479dbbb1c171ffe9783 | 54 | py | Python | tests/_tests_scripts/core_contrib_runners.py | and-kul/catalyst | 51428d7756e62b9b8ee5379f38e9fd576eeb36e5 | [
"Apache-2.0"
] | 2 | 2019-04-19T21:34:31.000Z | 2019-05-02T22:50:25.000Z | tests/_tests_scripts/core_contrib_runners.py | and-kul/catalyst | 51428d7756e62b9b8ee5379f38e9fd576eeb36e5 | [
"Apache-2.0"
] | 1 | 2021-01-07T16:13:45.000Z | 2021-01-21T09:27:54.000Z | tests/_tests_scripts/core_contrib_runners.py | and-kul/catalyst | 51428d7756e62b9b8ee5379f38e9fd576eeb36e5 | [
"Apache-2.0"
] | 1 | 2021-01-07T02:50:38.000Z | 2021-01-07T02:50:38.000Z | # flake8: noqa
from catalyst.contrib.runners import *
| 18 | 38 | 0.777778 |
bc3c3481aa5530964fb10fe80b8ab63bd5a55d75 | 3,405 | py | Python | builder/JSBuilder.py | podviaznikov/fs.js | 01787dfb5951f0fda02990e23a2392640c6605c8 | [
"MIT",
"Unlicense"
] | 8 | 2015-01-31T06:24:38.000Z | 2021-08-19T07:48:31.000Z | builder/JSBuilder.py | podviaznikov/fs.js | 01787dfb5951f0fda02990e23a2392640c6605c8 | [
"MIT",
"Unlicense"
] | null | null | null | builder/JSBuilder.py | podviaznikov/fs.js | 01787dfb5951f0fda02990e23a2392640c6605c8 | [
"MIT",
"Unlicense"
] | null | null | null | # python builder by Andrea Giammarchi
# Mit Style License
# Note: this is not "extreme performances oriented" Python code
# it should work on Python 2.6+ tho
import gzip, os, sys, string, re
# I know this sucks but it kinda worked cross .py version ...
def fullPath(file):
i = len(os.path.split(sys.argv[0])[... | 37.01087 | 239 | 0.58091 |
321c88c505a57f7e2d12ca842ec9f662c2dec614 | 10,459 | py | Python | torchreid/data/transforms.py | ioir123ju/deep-person-reid | a1f7c53926dc2e14447603052ae0f6500c43183a | [
"MIT"
] | 8 | 2019-12-04T03:47:37.000Z | 2021-01-06T08:10:34.000Z | torchreid/data/transforms.py | ioir123ju/deep-person-reid | a1f7c53926dc2e14447603052ae0f6500c43183a | [
"MIT"
] | null | null | null | torchreid/data/transforms.py | ioir123ju/deep-person-reid | a1f7c53926dc2e14447603052ae0f6500c43183a | [
"MIT"
] | 1 | 2021-04-23T19:12:44.000Z | 2021-04-23T19:12:44.000Z | from __future__ import division, print_function, absolute_import
import math
import random
from collections import deque
import torch
from PIL import Image
from torchvision.transforms import *
class Random2DTranslation(object):
"""Randomly translates the input image with a probability.
Specifically, given a ... | 32.684375 | 101 | 0.592026 |
6d1c8fdf48f2e11989f2a626f057e3ada32855c4 | 11,132 | py | Python | PulsePy/SimulatePulses.py | penguin2207/PulseTemplate | c5b71980808cf43e7839f738eb62e9d2b02e6f93 | [
"MIT"
] | null | null | null | PulsePy/SimulatePulses.py | penguin2207/PulseTemplate | c5b71980808cf43e7839f738eb62e9d2b02e6f93 | [
"MIT"
] | null | null | null | PulsePy/SimulatePulses.py | penguin2207/PulseTemplate | c5b71980808cf43e7839f738eb62e9d2b02e6f93 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys, os, pylandau
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
from scipy.signal import argrelextrema
from itertools import product
from random import choice
import numpy.polynomial.polynomial as poly
import time
import csv
import ScopeData
output... | 40.333333 | 300 | 0.706252 |
d3838956bdf58833c91f48947088414785c4a982 | 3,846 | py | Python | test/3.routing.py | 43EVER/wb_vrp | 36a6e3910fcfb8d0b29fd4382211c74345148106 | [
"MIT"
] | 4 | 2021-01-12T07:57:04.000Z | 2022-01-14T15:52:31.000Z | test/3.routing.py | 43EVER/wb_vrp | 36a6e3910fcfb8d0b29fd4382211c74345148106 | [
"MIT"
] | null | null | null | test/3.routing.py | 43EVER/wb_vrp | 36a6e3910fcfb8d0b29fd4382211c74345148106 | [
"MIT"
] | null | null | null | """Vehicles Routing Problem (VRP)."""
from __future__ import print_function
from ortools.constraint_solver import routing_enums_pb2
from ortools.constraint_solver import pywrapcp
def create_data_model():
"""Stores the data for the problem."""
data = {}
data['distance_matrix'] = [
[ 0, ... | 37.705882 | 80 | 0.633905 |
49764f52d4652705e709d2b30e2c038ec33be0e1 | 927 | py | Python | bgmi3/core/subscription.py | BGmi/BGmi-NG | 33728bb4584dfc1049e733709aa7c2dbc1310297 | [
"MIT"
] | 1 | 2020-03-09T20:50:30.000Z | 2020-03-09T20:50:30.000Z | bgmi3/core/subscription.py | BGmi/BGmi-NG | 33728bb4584dfc1049e733709aa7c2dbc1310297 | [
"MIT"
] | 35 | 2020-03-25T10:33:53.000Z | 2021-10-18T22:59:22.000Z | bgmi3/core/subscription.py | Trim21/BGmi-NG | e7aa9092846386c976aca97ee6a8c645bc24fc67 | [
"MIT"
] | 1 | 2020-05-16T07:59:08.000Z | 2020-05-16T07:59:08.000Z | import dataclasses
from typing import List
from bgmi3.core.series import Series
from bgmi3.exc import SubscriptionNotFollowed
from bgmi3.protocol import strainer
@dataclasses.dataclass
class Subscription:
name: str
updating: bool = True
episode: int = 1
series: List[Series] = dataclasses.field(defaul... | 25.054054 | 66 | 0.642934 |
afb430aca727529e44f090335d19728a5617ab9a | 2,013 | py | Python | main.py | Hypedpanther/Star-Brightness-ext | 187d2bf7a700b3813f5dd4d0a662cbadea47204f | [
"MIT"
] | null | null | null | main.py | Hypedpanther/Star-Brightness-ext | 187d2bf7a700b3813f5dd4d0a662cbadea47204f | [
"MIT"
] | null | null | null | main.py | Hypedpanther/Star-Brightness-ext | 187d2bf7a700b3813f5dd4d0a662cbadea47204f | [
"MIT"
] | null | null | null | # Victor Manhando
# Practice Assessment March 21
# 22/04/2021
def get_scientists_names():
discoverer_name = input(str("Please enter last name of the person who discovered the star:\n"))
verifier_name = input(str("Please enter last name of the person who verified the star:\n"))
return discoverer_name, ve... | 30.044776 | 99 | 0.706905 |
b53668ec91d081201a70ea14dbb0ef4d68276190 | 4,190 | py | Python | datalad/plugin/tests/test_export_archive.py | loj/datalad | 26e1e54baea82d21748f44adc26b7eacec2d216b | [
"MIT"
] | null | null | null | datalad/plugin/tests/test_export_archive.py | loj/datalad | 26e1e54baea82d21748f44adc26b7eacec2d216b | [
"MIT"
] | null | null | null | datalad/plugin/tests/test_export_archive.py | loj/datalad | 26e1e54baea82d21748f44adc26b7eacec2d216b | [
"MIT"
] | null | null | null | # emacs: -*- mode: python-mode; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
# -*- coding: utf-8 -*-
# ex: set sts=4 ts=4 sw=4 noet:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the datalad package for the
# copyright and... | 37.410714 | 92 | 0.651551 |
e054ccf14f62cdd0f67cc2fa06bd74d9e218b775 | 16,415 | py | Python | lib/spack/spack/test/ci.py | etpalmer63/spack | 9ac207c901c46d005a8cce1460fa110192af6cb5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | lib/spack/spack/test/ci.py | etpalmer63/spack | 9ac207c901c46d005a8cce1460fa110192af6cb5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | lib/spack/spack/test/ci.py | etpalmer63/spack | 9ac207c901c46d005a8cce1460fa110192af6cb5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import collections
import itertools as it
import json
import os
import pytest
import llnl.util.filesystem as fs
import ... | 30.341959 | 85 | 0.61657 |
bc505f439adff579f7d78a42862a1f11291d2152 | 10,029 | py | Python | nevopy/processing/ray_processing.py | Talendar/nevo-py | 706b3356c43d9b71ba06e478bc5135e400a8c028 | [
"MIT"
] | 8 | 2021-02-01T13:59:28.000Z | 2022-01-15T15:25:47.000Z | nevopy/processing/ray_processing.py | Talendar/nevo-py | 706b3356c43d9b71ba06e478bc5135e400a8c028 | [
"MIT"
] | 6 | 2021-02-01T13:57:39.000Z | 2021-10-10T02:18:19.000Z | nevopy/processing/ray_processing.py | Talendar/nevo-py | 706b3356c43d9b71ba06e478bc5135e400a8c028 | [
"MIT"
] | 1 | 2021-02-03T01:12:25.000Z | 2021-02-03T01:12:25.000Z | # MIT License
#
# Copyright (c) 2020 Gabriel Nogueira (Talendar)
#
# 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,... | 48.684466 | 80 | 0.629774 |
6f23d679dcdadfaff2c4171b5c4dbbb62439f2e3 | 7,269 | py | Python | package-system/Blast/build_package_image.py | onecent1101/3p-package-source | 17a61fc64d940371b3673e3b061ded4ce8759cea | [
"Apache-2.0",
"MIT"
] | null | null | null | package-system/Blast/build_package_image.py | onecent1101/3p-package-source | 17a61fc64d940371b3673e3b061ded4ce8759cea | [
"Apache-2.0",
"MIT"
] | null | null | null | package-system/Blast/build_package_image.py | onecent1101/3p-package-source | 17a61fc64d940371b3673e3b061ded4ce8759cea | [
"Apache-2.0",
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (c) Contributors to the Open 3D Engine Project.
# For complete copyright and license terms please see the LICENSE at the root
# of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
import argparse
import functools
import json
import os
import pathlib
from pathli... | 35.632353 | 162 | 0.582336 |
a63124ce0ecc38af5b3d7ec5fb7f03883233e24a | 1,809 | py | Python | tests/test_tools.py | Ivanovitchk/EasyClangComplete | cf1dcde537f9fec413f367c44d66c92f13ee68fa | [
"MIT"
] | 648 | 2016-04-18T16:10:47.000Z | 2022-03-30T01:48:53.000Z | tests/test_tools.py | Ivanovitchk/EasyClangComplete | cf1dcde537f9fec413f367c44d66c92f13ee68fa | [
"MIT"
] | 672 | 2016-04-24T13:55:35.000Z | 2022-03-23T06:38:42.000Z | tests/test_tools.py | Ivanovitchk/EasyClangComplete | cf1dcde537f9fec413f367c44d66c92f13ee68fa | [
"MIT"
] | 130 | 2016-05-26T19:27:00.000Z | 2022-01-15T10:24:17.000Z | """Test tools.
Attributes:
easy_clang_complete (module): this plugin module
SublBridge (SublBridge): class for subl bridge
"""
import imp
from unittest import TestCase
from os import path
from EasyClangComplete.plugin.utils import tools
from EasyClangComplete.plugin.utils import file
imp.reload(tools)
imp.re... | 32.303571 | 76 | 0.678275 |
08b3b39e13a81bd11f64d3a2a332bb94aa46a485 | 1,667 | py | Python | .eggs/docutils-0.14-py2.7.egg/EGG-INFO/scripts/rst2odt_prepstyles.py | MQQ/git-bigstore | 95f1e37fcda7fdce80502593cec31a44c604cf8a | [
"Apache-2.0"
] | null | null | null | .eggs/docutils-0.14-py2.7.egg/EGG-INFO/scripts/rst2odt_prepstyles.py | MQQ/git-bigstore | 95f1e37fcda7fdce80502593cec31a44c604cf8a | [
"Apache-2.0"
] | null | null | null | .eggs/docutils-0.14-py2.7.egg/EGG-INFO/scripts/rst2odt_prepstyles.py | MQQ/git-bigstore | 95f1e37fcda7fdce80502593cec31a44c604cf8a | [
"Apache-2.0"
] | null | null | null | #!python
# $Id: rst2odt_prepstyles.py 5839 2009-01-07 19:09:28Z dkuhlman $
# Author: Dave Kuhlman <dkuhlman@rexx.com>
# Copyright: This module has been placed in the public domain.
"""
Fix a word-processor-generated styles.odt for odtwriter use: Drop page size
specifications from styles.xml in STYLE_FILE.odt.
"""
#
... | 24.514706 | 75 | 0.644271 |
9e62a039385f7e8c1ee89ffb90486ea9a2126d0b | 4,814 | py | Python | tests/integration/services/policy_engine/engine/policy/gates/test_gems.py | rbrady/anchore-engine | 5a5c492d76b5f911e60be422912fe8d42a74872b | [
"Apache-2.0"
] | 1,484 | 2017-09-11T19:08:42.000Z | 2022-03-29T07:47:44.000Z | tests/integration/services/policy_engine/engine/policy/gates/test_gems.py | rbrady/anchore-engine | 5a5c492d76b5f911e60be422912fe8d42a74872b | [
"Apache-2.0"
] | 913 | 2017-09-27T20:37:53.000Z | 2022-03-29T17:21:28.000Z | tests/integration/services/policy_engine/engine/policy/gates/test_gems.py | rbrady/anchore-engine | 5a5c492d76b5f911e60be422912fe8d42a74872b | [
"Apache-2.0"
] | 294 | 2017-09-12T16:54:03.000Z | 2022-03-14T01:28:51.000Z | import pytest
from anchore_engine.db import Image, get_thread_scoped_session
from anchore_engine.services.policy_engine.engine.policy.gates.gems import (
BadVersionTrigger,
BlacklistedGemTrigger,
GemCheckGate,
NoFeedTrigger,
NotLatestTrigger,
NotOfficialTrigger,
)
from anchore_engine.subsys imp... | 39.138211 | 85 | 0.67366 |
4394354a12066d728eba9d9fba052e0ad32021c4 | 945 | py | Python | spresso/view/authentication/identity_provider.py | lujung/python-spresso | 32e0229abe9e18bbbe487184645d66ed1ed95a05 | [
"MIT"
] | null | null | null | spresso/view/authentication/identity_provider.py | lujung/python-spresso | 32e0229abe9e18bbbe487184645d66ed1ed95a05 | [
"MIT"
] | 1 | 2017-03-01T20:10:56.000Z | 2017-03-01T20:10:56.000Z | spresso/view/authentication/identity_provider.py | lujung/python-spresso | 32e0229abe9e18bbbe487184645d66ed1ed95a05 | [
"MIT"
] | null | null | null | from spresso.model.base import Composition
from spresso.view.base import JsonView, SettingsMixin
class SignatureView(JsonView, SettingsMixin):
def __init__(self, signature, **kwargs):
super(SignatureView, self).__init__(**kwargs)
self.signature = signature
def json(self):
schema = sel... | 27 | 63 | 0.657143 |
d4c580c16898901e57e6e9a5338133ca7db65bcc | 3,426 | py | Python | megaputer_blog.py | Megaputer/python-scraper-template | 83204832203c3610aa8a2da85dd9ca87eb07015c | [
"MIT"
] | 2 | 2021-01-30T18:55:21.000Z | 2021-03-15T11:09:26.000Z | megaputer_blog.py | Megaputer/python-scraper-template | 83204832203c3610aa8a2da85dd9ca87eb07015c | [
"MIT"
] | 1 | 2021-03-23T16:51:08.000Z | 2021-03-23T16:51:08.000Z | megaputer_blog.py | Megaputer/python-scraper-template | 83204832203c3610aa8a2da85dd9ca87eb07015c | [
"MIT"
] | null | null | null | """
### Megaputer blog scraper
Downloads articles from https://megaputer.ru/blog. Set `author` option to
download only their articles.
#### Columns
| Name | Type | Description
| :---------- | :-------- | :----------
| `Author` | String | The author of a post
| `Published` | Date/Time | Publication ... | 32.942308 | 115 | 0.527437 |
366217f8d53a8de35d195d0d0d0769e265416427 | 3,827 | py | Python | disco/extensions/pydss_simulation/pydss_configuration.py | daniel-thom/disco | 2de6869888c015ff70985bf6f6b1a0fcc15fc561 | [
"BSD-3-Clause"
] | null | null | null | disco/extensions/pydss_simulation/pydss_configuration.py | daniel-thom/disco | 2de6869888c015ff70985bf6f6b1a0fcc15fc561 | [
"BSD-3-Clause"
] | null | null | null | disco/extensions/pydss_simulation/pydss_configuration.py | daniel-thom/disco | 2de6869888c015ff70985bf6f6b1a0fcc15fc561 | [
"BSD-3-Clause"
] | null | null | null | """Contains functionality to configure PyDss simulations."""
import logging
from jade.exceptions import InvalidParameter
from jade.utils.utils import load_data
from disco.distribution.deployment_parameters import DeploymentParameters
from disco.exceptions import PyDssJobException
from disco.pydss.pydss_configuration_... | 29.898438 | 95 | 0.624771 |
39806a30d84f96befd59dee2ec1ffbfe5134aae1 | 2,761 | py | Python | revproxy/filters.py | ba-amm/dj-revproxy | 1a5b41d645f529f05a7f0db976dfc15fa5d8fdfd | [
"MIT"
] | null | null | null | revproxy/filters.py | ba-amm/dj-revproxy | 1a5b41d645f529f05a7f0db976dfc15fa5d8fdfd | [
"MIT"
] | null | null | null | revproxy/filters.py | ba-amm/dj-revproxy | 1a5b41d645f529f05a7f0db976dfc15fa5d8fdfd | [
"MIT"
] | 1 | 2018-05-24T11:59:33.000Z | 2018-05-24T11:59:33.000Z | # -*- coding: utf-8 -
#
# This file is part of dj-revproxy released under the MIT license.
# See the NOTICE for more information.
# etree object
import posixpath
import urlparse
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
try:
from django.http import absolute_htt... | 24.651786 | 69 | 0.586382 |
3834a0df786e7d0379e0e1e467757a586136e630 | 1,802 | py | Python | riak/setup.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2020-08-08T02:01:01.000Z | 2020-08-08T02:01:01.000Z | riak/setup.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:50:17.000Z | 2018-08-15T05:50:17.000Z | riak/setup.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:45:42.000Z | 2018-08-15T05:45:42.000Z | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from setuptools import setup
from codecs import open
from os import path
HERE = path.abspath(path.dirname(__file__))
# Get version info
ABOUT = {}
with open(path.join(HERE, "datadog_checks", "riak", "__about__.... | 26.895522 | 74 | 0.67758 |
10503b2e215190f8cf38afc895251ed96d8104ae | 1,932 | py | Python | ui_shadow_draw/gangate_vis.py | yudhik11/Artify | 745d4aa29a368a313bcd1b86f4680a7146a4d790 | [
"MIT"
] | null | null | null | ui_shadow_draw/gangate_vis.py | yudhik11/Artify | 745d4aa29a368a313bcd1b86f4680a7146a4d790 | [
"MIT"
] | null | null | null | ui_shadow_draw/gangate_vis.py | yudhik11/Artify | 745d4aa29a368a313bcd1b86f4680a7146a4d790 | [
"MIT"
] | null | null | null | from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
import sys
import numpy as np
import time
import cv2
from .ui_sketch import UISketch
from .ui_recorder import UIRecorder
class GANGATEVis(QWidget):
def __init__( self, win_size = 256 , img_size = 256, interactive = False, disable... | 27.211268 | 106 | 0.641822 |
f20264c872917349bba106c2771325069e8c2abd | 657 | py | Python | adiencealign/affine_alignment/affine_aligner.py | ssiwakot/adience_align | fe549618e31d06912615c5d1efc92e3e670e7531 | [
"MIT"
] | null | null | null | adiencealign/affine_alignment/affine_aligner.py | ssiwakot/adience_align | fe549618e31d06912615c5d1efc92e3e670e7531 | [
"MIT"
] | null | null | null | adiencealign/affine_alignment/affine_aligner.py | ssiwakot/adience_align | fe549618e31d06912615c5d1efc92e3e670e7531 | [
"MIT"
] | null | null | null | '''
Created on May 7, 2014
@author: eran
'''
from adiencealign.common.landmarks import fidu_transform, shift_vector,\
WEIGHTS3
class AffineAligner(object):
def __init__(self, fidu_model_file, ):
self.shift = ( 0.25, 0.25 )
fidu_model = [(int(x.split(',')[1]),int(x.split(',')[2])) for ... | 32.85 | 101 | 0.637747 |
6f6adc98a99d78f1470eefe2dcff6eacaf00c434 | 351 | py | Python | harness/determined/tensorpack/__init__.py | ybt195/determined | 913fdc3b81ef33c2760bdb128c8ce9179e4ab9b2 | [
"Apache-2.0"
] | 3 | 2020-04-30T03:56:15.000Z | 2020-04-30T04:01:24.000Z | harness/determined/tensorpack/__init__.py | ybt195/determined | 913fdc3b81ef33c2760bdb128c8ce9179e4ab9b2 | [
"Apache-2.0"
] | 1 | 2022-02-10T07:31:44.000Z | 2022-02-10T07:31:44.000Z | harness/determined/tensorpack/__init__.py | ybt195/determined | 913fdc3b81ef33c2760bdb128c8ce9179e4ab9b2 | [
"Apache-2.0"
] | 2 | 2020-07-10T23:08:23.000Z | 2021-01-13T10:01:59.000Z | from determined.tensorpack._tensorpack_trial import (
Evaluator,
NamedTensorsEvaluator,
CustomInferenceRunner,
CustomScalarStats,
TensorpackTrialController,
TensorpackTrial,
SchedulePoint,
ScheduleSetter,
)
from determined.tensorpack._monitors import TFEventWriter
from determined.tensorp... | 27 | 57 | 0.806268 |
2f89daa3860896ef0b089422c688392c1a2a8fad | 9,471 | py | Python | aiida/cmdline/utils/ascii_vis.py | PercivalN/aiida-core | b215ed5a7ce9342bb7f671b67e95c1f474cc5940 | [
"BSD-2-Clause"
] | 1 | 2019-07-31T04:08:13.000Z | 2019-07-31T04:08:13.000Z | aiida/cmdline/utils/ascii_vis.py | PercivalN/aiida-core | b215ed5a7ce9342bb7f671b67e95c1f474cc5940 | [
"BSD-2-Clause"
] | null | null | null | aiida/cmdline/utils/ascii_vis.py | PercivalN/aiida-core | b215ed5a7ce9342bb7f671b67e95c1f474cc5940 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 35.739623 | 115 | 0.640798 |
42f22da7fd7272d92d49652310d38da3b2903f48 | 1,162 | py | Python | app/log.py | sandeeppradhan92/python_project_template | 9cb62144ed0eef27cb93328f409e73cf92948b67 | [
"MIT"
] | null | null | null | app/log.py | sandeeppradhan92/python_project_template | 9cb62144ed0eef27cb93328f409e73cf92948b67 | [
"MIT"
] | null | null | null | app/log.py | sandeeppradhan92/python_project_template | 9cb62144ed0eef27cb93328f409e73cf92948b67 | [
"MIT"
] | null | null | null | import logging
import os
from logging.handlers import TimedRotatingFileHandler
from flask import has_request_context, request
class RequestFormatter(logging.Formatter):
def format(self, record):
if has_request_context():
record.url = request.url
record.remote_addr = request.remote... | 25.26087 | 73 | 0.695353 |
d04a992e097fa49f5a5618e5307981ded6ab0cd9 | 2,018 | py | Python | userbot/plugins/_helper.py | HarshTech26/AnonCracker | f1dab2beea0c6e11bee2ecfc73468fe1f062c618 | [
"MIT"
] | null | null | null | userbot/plugins/_helper.py | HarshTech26/AnonCracker | f1dab2beea0c6e11bee2ecfc73468fe1f062c618 | [
"MIT"
] | null | null | null | userbot/plugins/_helper.py | HarshTech26/AnonCracker | f1dab2beea0c6e11bee2ecfc73468fe1f062c618 | [
"MIT"
] | 2 | 2020-05-19T15:01:16.000Z | 2020-05-23T06:21:40.000Z | from userbot import CMD_LIST
@command(pattern="^.help ?(.*)")
async def cmd_list(event):
if not event.text[0].isalpha() and event.text[0] not in ("/", "#", "@", "!"):
tgbotusername = Var.TG_BOT_USER_NAME_BF_HER
input_str = event.pattern_match.group(1)
if tgbotusername is None or input_str =... | 38.807692 | 81 | 0.457879 |
338e31ac966e8ba02144935a7d54a4e371a4f740 | 2,264 | py | Python | bert_seq2seq/bert_seq_labeling_crf.py | liangzongchang/bert_seq2seq | e45b63dc2d9611de5b5f89754591473e33b52a9c | [
"Apache-2.0"
] | 1 | 2020-11-03T08:29:25.000Z | 2020-11-03T08:29:25.000Z | bert_seq2seq/bert_seq_labeling_crf.py | DA-southampton/bert_seq2seq | 808090e31bac11fcc0041c9f099302f33ce4fe57 | [
"Apache-2.0"
] | null | null | null | bert_seq2seq/bert_seq_labeling_crf.py | DA-southampton/bert_seq2seq | 808090e31bac11fcc0041c9f099302f33ce4fe57 | [
"Apache-2.0"
] | 1 | 2021-04-22T09:48:01.000Z | 2021-04-22T09:48:01.000Z | ## bert encoder模型
import torch
import torch.nn as nn
from bert_seq2seq.tokenizer import load_chinese_base_vocab, Tokenizer
from bert_seq2seq.model.crf import CRFLayer
class BertSeqLabelingCRF(nn.Module):
"""
"""
def __init__(self, word2ix, target_size, model_name="roberta"):
super(BertSeqLabeling... | 37.114754 | 107 | 0.624558 |
5dcff2c92525139469c951c4f42a1c60afe75c6f | 16,255 | py | Python | benchmarks/f3_wrong_hints/scaling_ltl_timed_transition_system/4-sender_receiver_29.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 3 | 2021-04-23T23:29:26.000Z | 2022-03-23T10:00:30.000Z | benchmarks/f3_wrong_hints/scaling_ltl_timed_transition_system/4-sender_receiver_29.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | null | null | null | benchmarks/f3_wrong_hints/scaling_ltl_timed_transition_system/4-sender_receiver_29.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 1 | 2021-11-17T22:02:56.000Z | 2021-11-17T22:02:56.000Z | from typing import FrozenSet
from collections import Iterable
from math import log, ceil
from mathsat import msat_term, msat_env
from mathsat import msat_make_constant, msat_declare_function
from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type
from mathsat import msat_make_and, msa... | 40.334988 | 89 | 0.568317 |
fef0826663ddc10dfea739393e2688b73f8c3059 | 7,406 | py | Python | train/tool.py | ydxb7/graduate | 836c47f881ff6c4edfdf1a0ee23bd04602788ca3 | [
"Unlicense"
] | null | null | null | train/tool.py | ydxb7/graduate | 836c47f881ff6c4edfdf1a0ee23bd04602788ca3 | [
"Unlicense"
] | null | null | null | train/tool.py | ydxb7/graduate | 836c47f881ff6c4edfdf1a0ee23bd04602788ca3 | [
"Unlicense"
] | null | null | null |
# coding: utf-8
import numpy as np
import torch
import os
import pickle
from PIL import Image, ImageOps, ImageEnhance
from argparse import ArgumentParser
from torch.optim import SGD, Adam
from torch.autograd import Variable
from torch.utils.data import DataLoader, Dataset
from torchvision.transforms import Normaliz... | 31.117647 | 156 | 0.590602 |
612e69d753433b1ff692d6ef2a10ddcf8e12ffd9 | 2,703 | py | Python | app/core/tests/test_models.py | simonarcher99/recipe-app-api | 6870d14af6dc466c057b10811d3538daea8bc615 | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | simonarcher99/recipe-app-api | 6870d14af6dc466c057b10811d3538daea8bc615 | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | simonarcher99/recipe-app-api | 6870d14af6dc466c057b10811d3538daea8bc615 | [
"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@test.com', password='testpass'):
"""Create a sample user"""
return get_user_model().objects.create_user(email, password)
class ModelTests(Test... | 30.715909 | 70 | 0.63633 |
af33c025794b404f971e4d78b28eeda595e7ca42 | 2,543 | py | Python | Teams/proxy for teams.py | Anirudh66399/msteams-proxy | 273acec92d855c2528b5f5352eaacaae3b34ab37 | [
"BSD-3-Clause"
] | 3 | 2020-10-24T09:40:44.000Z | 2021-09-28T16:56:03.000Z | Teams/proxy for teams.py | Anirudh66399/msteams-proxy | 273acec92d855c2528b5f5352eaacaae3b34ab37 | [
"BSD-3-Clause"
] | null | null | null | Teams/proxy for teams.py | Anirudh66399/msteams-proxy | 273acec92d855c2528b5f5352eaacaae3b34ab37 | [
"BSD-3-Clause"
] | 1 | 2020-11-27T04:47:43.000Z | 2020-11-27T04:47:43.000Z | import os
import time
import pyautogui
import datetime
import pywinauto
#To Link Teams To pywinauto and restore meeting window
def call():
dlg1=app.window(title_re=".*Call in progress*")
dlg1.restore()
#Launch function to launch ms teams and click on calendar
def launch():
... | 17.182432 | 119 | 0.502163 |
3b51bf6f209abd7ed62c9f9448ce09641b300d11 | 408 | py | Python | Keras/fpflu.py | mengzhu0308/PFLU-FPFLU | 628cd472db2913e555e902bdf35af834f84a284b | [
"Apache-2.0"
] | 1 | 2021-01-02T07:18:11.000Z | 2021-01-02T07:18:11.000Z | Keras/fpflu.py | mengzhu0308/PFLU-FPFLU | 628cd472db2913e555e902bdf35af834f84a284b | [
"Apache-2.0"
] | null | null | null | Keras/fpflu.py | mengzhu0308/PFLU-FPFLU | 628cd472db2913e555e902bdf35af834f84a284b | [
"Apache-2.0"
] | 1 | 2021-09-05T18:22:49.000Z | 2021-09-05T18:22:49.000Z | #! -*- coding:utf-8 -*-
'''
@Author: ZM
@Date and Time: 2020/10/25 2:42
@File: fpflu.py
'''
from keras import backend as K
import keras
'''
https://doi.org/10.1016/j.neucom.2020.11.068
PFLU and FPFLU: Two novel non-monotonic activation functions in convolutional neural networks
'''
def fpflu(x):
... | 20.4 | 93 | 0.651961 |
9caa526cba1d8496bd385d3b918edff35fe25f20 | 636 | py | Python | scripts/noise_testing.py | enigma-igm/qso_cont_ml | 6b25e39b7ca514fa595c61b2acc7d1decb1fe233 | [
"BSD-3-Clause"
] | null | null | null | scripts/noise_testing.py | enigma-igm/qso_cont_ml | 6b25e39b7ca514fa595c61b2acc7d1decb1fe233 | [
"BSD-3-Clause"
] | null | null | null | scripts/noise_testing.py | enigma-igm/qso_cont_ml | 6b25e39b7ca514fa595c61b2acc7d1decb1fe233 | [
"BSD-3-Clause"
] | null | null | null |
import os
import numpy as np
from matplotlib import pyplot as plt
from qso_fitting.utils.get_paths import get_sdss_autofit_path
from qso_fitting.data.utils import read_sdss_autofits
from qso_fitting.data.utils import inverse
from astropy.io import fits
lam_min = 980.0
lam_max = 2040.0
outpath = get_sdss_autofit_path(... | 33.473684 | 110 | 0.795597 |
2ba5f68d6254b5d1da7fe03f20203420a68c03b4 | 2,979 | py | Python | elsie/utils/cache.py | spirali/elsie | c221ed68f85d1d5c80b1a58bfc7a473eb1b712d5 | [
"MIT"
] | 30 | 2018-05-21T13:26:47.000Z | 2021-11-08T11:25:13.000Z | elsie/utils/cache.py | spirali/elsie | c221ed68f85d1d5c80b1a58bfc7a473eb1b712d5 | [
"MIT"
] | 30 | 2019-01-04T21:21:41.000Z | 2022-02-05T18:05:30.000Z | elsie/utils/cache.py | spirali/elsie | c221ed68f85d1d5c80b1a58bfc7a473eb1b712d5 | [
"MIT"
] | 4 | 2018-08-17T04:59:40.000Z | 2021-01-02T17:03:30.000Z | import hashlib
import os
import tempfile
import threading
class FsCache:
def __init__(self, cache_dir, version):
start = f"elsie-{version}/".encode()
self.hasher = hashlib.sha1()
self.hasher.update(start)
self.cache_dir = cache_dir
self.touched_files = set()
self.ca... | 34.241379 | 87 | 0.625378 |
3f7b7cab0490028d76a715c01f0681c17ae796bd | 212 | py | Python | decode.py | wijagels/pebble-accelerometer-recorder | 1c22840401f9484f480903c042183e4270817b92 | [
"MIT"
] | null | null | null | decode.py | wijagels/pebble-accelerometer-recorder | 1c22840401f9484f480903c042183e4270817b92 | [
"MIT"
] | null | null | null | decode.py | wijagels/pebble-accelerometer-recorder | 1c22840401f9484f480903c042183e4270817b92 | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
import struct
import sys
with open(sys.argv[1], 'rb') as f:
line = f.read(16)
while line:
out = struct.unpack('<qhhhxx', line)
print(out)
line = f.read(16)
| 21.2 | 44 | 0.575472 |
abcc97026d3d3ea97bf0807850788f79cd7e8467 | 713 | py | Python | app/main/repository/deleted_device_repository.py | michalkoziara/IoT-RESTful-Webservice | ecb0f3e09cded3190f3646e5cd6c913056d94981 | [
"bzip2-1.0.6"
] | 2 | 2021-09-24T02:45:32.000Z | 2021-11-15T09:44:44.000Z | app/main/repository/deleted_device_repository.py | PKramek/IoT-RESTful-Webservice-1 | ecb0f3e09cded3190f3646e5cd6c913056d94981 | [
"bzip2-1.0.6"
] | null | null | null | app/main/repository/deleted_device_repository.py | PKramek/IoT-RESTful-Webservice-1 | ecb0f3e09cded3190f3646e5cd6c913056d94981 | [
"bzip2-1.0.6"
] | 1 | 2021-09-11T11:47:32.000Z | 2021-09-11T11:47:32.000Z | # pylint: disable=no-self-use
from typing import List
from sqlalchemy import and_
from app.main.model.deleted_device import DeletedDevice
from app.main.model.device_group import DeviceGroup
from app.main.repository.base_repository import BaseRepository
class DeletedDeviceRepository(BaseRepository):
_instance = ... | 26.407407 | 62 | 0.713885 |
246e1b70c92d16a158e3d23eb155fab430ed2f0e | 9,199 | py | Python | release/scripts/addons/sequencer_kinoraw_tools/recursive_loader.py | noorbeast/BlenderSource | 65ebecc5108388965678b04b43463b85f6c69c1d | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 2 | 2019-03-20T13:10:46.000Z | 2019-05-15T20:00:31.000Z | engine/2.80/scripts/addons/sequencer_kinoraw_tools/recursive_loader.py | byteinc/Phasor | f7d23a489c2b4bcc3c1961ac955926484ff8b8d9 | [
"Unlicense"
] | null | null | null | engine/2.80/scripts/addons/sequencer_kinoraw_tools/recursive_loader.py | byteinc/Phasor | f7d23a489c2b4bcc3c1961ac955926484ff8b8d9 | [
"Unlicense"
] | null | null | null | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | 34.453184 | 85 | 0.544081 |
9d20a84741d14a679965cc5253bb8618a6ba1833 | 958 | py | Python | scripts/automation/trex_control_plane/interactive/trex/utils/zipmsg.py | timgates42/trex-core | efe94752fcb2d0734c83d4877afe92a3dbf8eccd | [
"Apache-2.0"
] | 956 | 2015-06-24T15:04:55.000Z | 2022-03-30T06:25:04.000Z | scripts/automation/trex_control_plane/interactive/trex/utils/zipmsg.py | angelyouyou/trex-core | fddf78584cae285d9298ef23f9f5c8725e16911e | [
"Apache-2.0"
] | 782 | 2015-09-20T15:19:00.000Z | 2022-03-31T23:52:05.000Z | scripts/automation/trex_control_plane/interactive/trex/utils/zipmsg.py | angelyouyou/trex-core | fddf78584cae285d9298ef23f9f5c8725e16911e | [
"Apache-2.0"
] | 429 | 2015-06-27T19:34:21.000Z | 2022-03-23T11:02:51.000Z | import zlib
import struct
class ZippedMsg:
MSG_COMPRESS_THRESHOLD = 0
MSG_COMPRESS_HEADER_MAGIC = 0xABE85CEA
def check_threshold(self, msg):
return len(msg) >= self.MSG_COMPRESS_THRESHOLD
def compress (self, msg):
# compress
compressed = zlib.compress(msg)
new_msg ... | 21.288889 | 91 | 0.569937 |
d8680b98dc791b80061353497ccb3a1d63736d6a | 329 | py | Python | 81verificar_valor_especifico.py | wcalazans81/Mundo_02_Python | 00a5c905efdb4ace7ee4a03301bd9bb9ad22dce7 | [
"MIT"
] | null | null | null | 81verificar_valor_especifico.py | wcalazans81/Mundo_02_Python | 00a5c905efdb4ace7ee4a03301bd9bb9ad22dce7 | [
"MIT"
] | null | null | null | 81verificar_valor_especifico.py | wcalazans81/Mundo_02_Python | 00a5c905efdb4ace7ee4a03301bd9bb9ad22dce7 | [
"MIT"
] | null | null | null | num = list()
while True:
num.append(int(input('Digite um número: ')))
r = str(input('Quer continuar? [S/N] '))
if r in 'Nn':
break
num.sort(reverse=True)
print(f'Você digitou {len(num)} elementos')
if 5 in num:
print('O número 5 faz parte da lista.')
else:
print('O número não 5 faz parte da... | 27.416667 | 48 | 0.620061 |
001ae1c030a4dc165975b1e2721ad7e9fd09d3eb | 2,260 | py | Python | witms/spiders/time.py | mwesthelle/what_is_the_media_saying | 6f6b50a4ca466f74c34b3fd6964679006fe2ff00 | [
"MIT"
] | null | null | null | witms/spiders/time.py | mwesthelle/what_is_the_media_saying | 6f6b50a4ca466f74c34b3fd6964679006fe2ff00 | [
"MIT"
] | 4 | 2021-02-11T14:23:46.000Z | 2021-04-27T21:21:34.000Z | witms/spiders/time.py | mwesthelle/what_is_the_media_saying | 6f6b50a4ca466f74c34b3fd6964679006fe2ff00 | [
"MIT"
] | null | null | null | from scrapy import Spider
from scrapy.linkextractors import LinkExtractor
from witms.items import Article
from witms.loaders import ArticleLoader
class TimeSpider(Spider):
name = "time"
portal_name = "Time"
allowed_domains = ["time.com"]
start_urls = ["https://time.com/"]
link_extractor = LinkExtr... | 42.641509 | 86 | 0.611062 |
7f8a386f483081c844d16a41ae9c4bac1f31b531 | 780 | py | Python | packages/syft/tests/syft/lib/sympc/sympc_test.py | exityan/PySyft | 35166c487a5be57f9ad28929ed88a8ba6bdd5aeb | [
"Apache-2.0"
] | 1 | 2020-08-01T08:23:54.000Z | 2020-08-01T08:23:54.000Z | packages/syft/tests/syft/lib/sympc/sympc_test.py | exityan/PySyft | 35166c487a5be57f9ad28929ed88a8ba6bdd5aeb | [
"Apache-2.0"
] | 5 | 2020-09-11T05:47:12.000Z | 2020-10-13T08:36:17.000Z | packages/syft/tests/syft/lib/sympc/sympc_test.py | exityan/PySyft | 35166c487a5be57f9ad28929ed88a8ba6bdd5aeb | [
"Apache-2.0"
] | 1 | 2020-10-15T06:13:38.000Z | 2020-10-15T06:13:38.000Z | # third party
import pytest
import torch as th
# syft absolute
import syft as sy
sympc = pytest.importorskip("sympc")
Session = sympc.session.Session
SessionManager = sympc.session.SessionManager
MPCTensor = sympc.tensor.MPCTensor
@pytest.mark.asyncio
@pytest.mark.vendor(lib="sympc")
def test_load_sympc() -> None:
... | 26 | 85 | 0.696154 |
646b34d9febae3ae5c339217703d6aca2f43f661 | 14,556 | py | Python | selfdrive/controls/lib/latcontrol.py | ShaneSmiskol/openpilot-speed-controller | a1e045d8847f8f3cce408becda7b88d429a89ce2 | [
"MIT"
] | 2 | 2019-02-16T00:56:16.000Z | 2019-10-26T13:37:09.000Z | selfdrive/controls/lib/latcontrol.py | ShaneSmiskol/openpilot-speed-controller | a1e045d8847f8f3cce408becda7b88d429a89ce2 | [
"MIT"
] | null | null | null | selfdrive/controls/lib/latcontrol.py | ShaneSmiskol/openpilot-speed-controller | a1e045d8847f8f3cce408becda7b88d429a89ce2 | [
"MIT"
] | 1 | 2019-02-17T02:35:52.000Z | 2019-02-17T02:35:52.000Z | import zmq
import math
import numpy as np
import time
import json
from selfdrive.controls.lib.pid import PIController
from selfdrive.controls.lib.drive_helpers import MPC_COST_LAT
from selfdrive.controls.lib.lateral_mpc import libmpc_py
from common.numpy_fast import interp
from common.realtime import sec_since_boot
fro... | 55.346008 | 801 | 0.686452 |
80e6141c3333acef73b0eecab7c413e7e064f649 | 65,859 | py | Python | salt/transport/tcp.py | Noah-Huppert/salt | 998c382f5f2c3b4cbf7d96aa6913ada6993909b3 | [
"Apache-2.0"
] | 19 | 2016-01-29T14:37:52.000Z | 2022-03-30T18:08:01.000Z | salt/transport/tcp.py | Noah-Huppert/salt | 998c382f5f2c3b4cbf7d96aa6913ada6993909b3 | [
"Apache-2.0"
] | 223 | 2016-03-02T16:39:41.000Z | 2022-03-03T12:26:35.000Z | salt/transport/tcp.py | Noah-Huppert/salt | 998c382f5f2c3b4cbf7d96aa6913ada6993909b3 | [
"Apache-2.0"
] | 64 | 2016-02-04T19:45:26.000Z | 2021-12-15T02:02:31.000Z | # -*- coding: utf-8 -*-
"""
TCP transport classes
Wire protocol: "len(payload) msgpack({'head': SOMEHEADER, 'body': SOMEBODY})"
"""
# Import Python Libs
from __future__ import absolute_import, print_function, unicode_literals
import errno
import logging
import os
import socket
import sys
import threading
import tim... | 38.514035 | 101 | 0.562991 |
d29776949f3cc4b846f51906b9ab76ed35254123 | 461 | py | Python | armulator/armv6/opcodes/thumb_instruction_set/thumb_instruction_set_encoding_32_bit/thumb_branches_and_miscellaneous_control/thumb_miscellaneous_control_instructions/dsb_t1.py | matan1008/armulator | 04d24dcec6ab42326018f5e09331e5b4738d6b52 | [
"MIT"
] | 16 | 2018-01-22T14:36:49.000Z | 2021-12-17T15:39:52.000Z | armulator/armv6/opcodes/thumb_instruction_set/thumb_instruction_set_encoding_32_bit/thumb_branches_and_miscellaneous_control/thumb_miscellaneous_control_instructions/dsb_t1.py | AhmedMounir/armulator | 04d24dcec6ab42326018f5e09331e5b4738d6b52 | [
"MIT"
] | 3 | 2019-02-19T17:51:47.000Z | 2022-03-31T20:45:21.000Z | armulator/armv6/opcodes/thumb_instruction_set/thumb_instruction_set_encoding_32_bit/thumb_branches_and_miscellaneous_control/thumb_miscellaneous_control_instructions/dsb_t1.py | AhmedMounir/armulator | 04d24dcec6ab42326018f5e09331e5b4738d6b52 | [
"MIT"
] | 4 | 2020-06-18T23:51:03.000Z | 2022-02-09T17:43:13.000Z | from armulator.armv6.opcodes.abstract_opcodes.dsb import Dsb
from armulator.armv6.opcodes.opcode import Opcode
class DsbT1(Dsb, Opcode):
def __init__(self, instruction, option):
Opcode.__init__(self, instruction)
Dsb.__init__(self, option)
def is_pc_changing_opcode(self):
return False... | 27.117647 | 60 | 0.696312 |
ad03bbd002e01f90f4ed2c578b2bf4a7b8807a72 | 15,591 | py | Python | Python/Automate_Image_Caption/caption_generator_Xception.py | Spratiher9/Rotten-Scripts | 1aca594569ea04b4cf3c90f2e40d23e96f124d0f | [
"MIT"
] | 1 | 2021-11-17T19:18:32.000Z | 2021-11-17T19:18:32.000Z | Python/Automate_Image_Caption/caption_generator_Xception.py | Spratiher9/Rotten-Scripts | 1aca594569ea04b4cf3c90f2e40d23e96f124d0f | [
"MIT"
] | null | null | null | Python/Automate_Image_Caption/caption_generator_Xception.py | Spratiher9/Rotten-Scripts | 1aca594569ea04b4cf3c90f2e40d23e96f124d0f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import string
from PIL import Image
import os
from pickle import dump, load
import numpy as np
from keras.applications.xception import Xception, preprocess_input
from keras.preprocessing.image import load_img, img_to_array
from keras.preprocessing.text import Tokenizer
from keras.preprocessing.... | 34.646667 | 105 | 0.591688 |
32c12da060af287f9f44c6f37869f449171aee61 | 914 | py | Python | repo/components/lib/surface/macro/library_list_jobs.py | salrashid123/gcloud_component | e6a3a5a7a2bbbb43f0fa3760b634febf166d3a7c | [
"Apache-2.0"
] | 2 | 2019-08-05T15:36:03.000Z | 2021-08-25T07:17:35.000Z | repo/components/lib/surface/macro/library_list_jobs.py | salrashid123/gcloud_component | e6a3a5a7a2bbbb43f0fa3760b634febf166d3a7c | [
"Apache-2.0"
] | null | null | null | repo/components/lib/surface/macro/library_list_jobs.py | salrashid123/gcloud_component | e6a3a5a7a2bbbb43f0fa3760b634febf166d3a7c | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Google Inc. All Rights Reserved.
"""Cloud Script start command."""
import os
from googlecloudsdk.calliope import base
from googlecloudsdk.api_lib.macro import library_list_jobs
class LibraryListJobs(base.Command):
"""Lists currently running BQ jobs"""
detailed_help = {
'DESCRIPTION':
... | 23.435897 | 69 | 0.647702 |
7b480dc0010014d3079c647c6e4b90098996c3e0 | 12,284 | py | Python | rpython/rlib/test/test_rfloat.py | olliemath/pypy | 8b873bd0b8bf76075aba3d915c260789f26f5788 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | rpython/rlib/test/test_rfloat.py | olliemath/pypy | 8b873bd0b8bf76075aba3d915c260789f26f5788 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | rpython/rlib/test/test_rfloat.py | olliemath/pypy | 8b873bd0b8bf76075aba3d915c260789f26f5788 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | from __future__ import print_function
import sys, py, math
from rpython.rlib.rfloat import float_as_rbigint_ratio
from rpython.rlib.rfloat import round_away
from rpython.rlib.rfloat import round_double
from rpython.rlib.rfloat import erf, erfc, gamma, lgamma
from rpython.rlib.rfloat import ulps_check, acc_check
from r... | 38.149068 | 93 | 0.587268 |
a111058772da58fc53bb48469d2b8175486f241f | 6,754 | py | Python | src/models/RainbowModel.py | Sensors-in-Paradise/OpportunityML | a123b4842de45f735d517be6bcd96ca35171db91 | [
"MIT"
] | 1 | 2022-03-25T16:00:36.000Z | 2022-03-25T16:00:36.000Z | src/models/RainbowModel.py | Sensors-in-Paradise/OpportunityML | a123b4842de45f735d517be6bcd96ca35171db91 | [
"MIT"
] | 1 | 2022-03-28T13:50:28.000Z | 2022-03-28T13:50:28.000Z | src/models/RainbowModel.py | Sensors-in-Paradise/OpportunityML | a123b4842de45f735d517be6bcd96ca35171db91 | [
"MIT"
] | null | null | null | # pylint: disable=locally-disabled, multiple-statements, fixme, line-too-long, no-name-in-module, unused_import, wrong-import-order, bad-option-value
from abc import ABC, abstractmethod
from math import sqrt
from typing import Any, Union
from numpy.core.numeric import full
from sklearn.preprocessing import MinMaxScale... | 36.117647 | 149 | 0.60764 |
3064d391cc4dde4dac1ddb7518262a66a3aa8a40 | 20,122 | py | Python | ikabot/function/constructionList.py | leon1995/ikabot | 31f5294b1c95eb4e2bfa74f87499d6885a529bd7 | [
"MIT"
] | null | null | null | ikabot/function/constructionList.py | leon1995/ikabot | 31f5294b1c95eb4e2bfa74f87499d6885a529bd7 | [
"MIT"
] | null | null | null | ikabot/function/constructionList.py | leon1995/ikabot | 31f5294b1c95eb4e2bfa74f87499d6885a529bd7 | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
import re
import time
import json
import math
import random
import gettext
import traceback
import threading
from decimal import *
from ikabot.config import *
from ikabot.helpers.gui import *
from ikabot.helpers.varios import *
from ikabot.helpers.botComm import *
from i... | 35.116928 | 286 | 0.606351 |
95735f7d219389fb7669777577cfd6738bed372a | 7,182 | py | Python | data/p3BR/R2/benchmark/startQiskit_noisy344.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R2/benchmark/startQiskit_noisy344.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R2/benchmark/startQiskit_noisy344.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=3
# total number=67
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collections import Counter
from... | 31.92 | 140 | 0.638402 |
604e32fe07ec58e9155e255c713a341b0d83f9a7 | 5,097 | py | Python | fastclasses_json/mypy_plugin.py | cakemanny/fastclasses-json | 6d8173e3de97760678fd134600b3637392d2139c | [
"MIT"
] | 7 | 2021-05-11T23:19:10.000Z | 2022-01-17T14:35:02.000Z | fastclasses_json/mypy_plugin.py | cakemanny/fastclasses-json | 6d8173e3de97760678fd134600b3637392d2139c | [
"MIT"
] | 5 | 2021-05-08T09:22:45.000Z | 2022-03-30T13:36:04.000Z | fastclasses_json/mypy_plugin.py | cakemanny/fastclasses-json | 6d8173e3de97760678fd134600b3637392d2139c | [
"MIT"
] | 1 | 2021-11-12T14:19:48.000Z | 2021-11-12T14:19:48.000Z | from typing import Optional, List
from mypy.plugin import Plugin, ClassDefContext
from mypy.plugins.common import add_method_to_class
from mypy.types import (
AnyType, TypeOfAny, CallableType, UnionType, NoneType, Type, Instance
)
from mypy.typevars import fill_typevars
from mypy.nodes import (
ARG_POS, ARG_N... | 30.890909 | 78 | 0.66961 |
a45e4c8ec4cc11a8dcb8cc6bccfa32e171f7b330 | 9,873 | py | Python | python/perspective/perspective/core/manager.py | TomOrth/perspective | c19bacc5e47bb30e3ec69703719833f90f0e08fa | [
"Apache-2.0"
] | 1 | 2020-09-03T05:13:14.000Z | 2020-09-03T05:13:14.000Z | python/perspective/perspective/core/manager.py | amitnyc83/perspective | 013cd59b00187257026dc78e229b21d19acd0d98 | [
"Apache-2.0"
] | null | null | null | python/perspective/perspective/core/manager.py | amitnyc83/perspective | 013cd59b00187257026dc78e229b21d19acd0d98 | [
"Apache-2.0"
] | null | null | null | # *****************************************************************************
#
# Copyright (c) 2019, the Perspective Authors.
#
# This file is part of the Perspective library, distributed under the terms of
# the Apache License 2.0. The full license can be found in the LICENSE file.
#
import logging
import json
imp... | 41.483193 | 151 | 0.599919 |
714d6b4008b1d56cef4b1737535349df2e81b6e1 | 1,726 | py | Python | app/user/serializers.py | juanjo-vlc/recipe-app-api | 73c3459f0936c13d9f888ccf6e4530c2b6f921a1 | [
"MIT"
] | null | null | null | app/user/serializers.py | juanjo-vlc/recipe-app-api | 73c3459f0936c13d9f888ccf6e4530c2b6f921a1 | [
"MIT"
] | null | null | null | app/user/serializers.py | juanjo-vlc/recipe-app-api | 73c3459f0936c13d9f888ccf6e4530c2b6f921a1 | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model, authenticate
from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
class UserSerializer(serializers.ModelSerializer):
"""Serializers for the user object"""
class Meta:
model = get_user_model()
fields = ('... | 32.566038 | 74 | 0.647161 |
6c7587b261dca5a5c8d0c84d852f956d5f6b34c9 | 3,065 | py | Python | keystone/service.py | ericwanghp/keystone | 533bb01947199e20b840917ab5ee387451b174a0 | [
"Apache-2.0"
] | 1 | 2021-04-18T15:23:01.000Z | 2021-04-18T15:23:01.000Z | keystone/service.py | ericwanghp/keystone | 533bb01947199e20b840917ab5ee387451b174a0 | [
"Apache-2.0"
] | null | null | null | keystone/service.py | ericwanghp/keystone | 533bb01947199e20b840917ab5ee387451b174a0 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack 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 requ... | 32.956989 | 75 | 0.671778 |
4ae25746379c636dba0d571ffc600807a1932ebf | 6,469 | py | Python | models/efficientdet.py | Jintao-Huang/EfficientDet_PyTorch | 79616be397b7f57992cd43b772f65b58b5e25a8b | [
"Apache-2.0"
] | 18 | 2020-05-22T08:24:36.000Z | 2021-09-01T08:08:38.000Z | models/efficientdet.py | Jintao-Huang/EfficientDet_PyTorch | 79616be397b7f57992cd43b772f65b58b5e25a8b | [
"Apache-2.0"
] | 1 | 2021-12-24T06:11:38.000Z | 2021-12-24T06:11:38.000Z | models/efficientdet.py | Jintao-Huang/EfficientDet_PyTorch | 79616be397b7f57992cd43b772f65b58b5e25a8b | [
"Apache-2.0"
] | 5 | 2020-05-22T20:39:25.000Z | 2021-12-04T07:49:18.000Z | # Author: Jintao Huang
# Time: 2020-5-19
import torch.nn as nn
import torch
from .backbone import EfficientNetWithBiFPN
from .anchor import AnchorGenerator
from .classifier_regressor import Classifier, Regressor
from .loss import FocalLoss
from .utils import load_state_dict_from_url, PreProcess, PostProcess
from .confi... | 45.237762 | 114 | 0.697789 |
ebb5412735ee70dc51484f677902db6799734544 | 535 | py | Python | core/models.py | andrewyamagata/manga01 | f7051f97a5cc2bac0655c0076ee3c94ad8668918 | [
"MIT"
] | null | null | null | core/models.py | andrewyamagata/manga01 | f7051f97a5cc2bac0655c0076ee3c94ad8668918 | [
"MIT"
] | null | null | null | core/models.py | andrewyamagata/manga01 | f7051f97a5cc2bac0655c0076ee3c94ad8668918 | [
"MIT"
] | null | null | null | from django.db import models
# Modelos de banco de dados
class Produto(models.Model):
nome = models.CharField('Nome', max_length=100)
preco = models.DecimalField('Preço', decimal_places=2, max_digits=8)
estoque = models.IntegerField('Quantidade em Estoque')
def __str__(self):
return f'{self.no... | 31.470588 | 72 | 0.704673 |
7185339c37a2dbc8f7bec686338c68d5b65a0778 | 2,178 | py | Python | model.py | johnztoth/agents | 0b882975531e1c633a07cef823462eb1e5c5043a | [
"CC0-1.0"
] | null | null | null | model.py | johnztoth/agents | 0b882975531e1c633a07cef823462eb1e5c5043a | [
"CC0-1.0"
] | null | null | null | model.py | johnztoth/agents | 0b882975531e1c633a07cef823462eb1e5c5043a | [
"CC0-1.0"
] | null | null | null | """
Agents!
Create a number of Agents, each with a random x and y coordinate (0-99).
Cycle through a number of iteration steps.
For each iteration randomly move the agent by +/- 1 unit in each direction.
The agent must stay within the bounds of the model 0-99.
Calculate the final distance between all the agents.
Plot ... | 31.114286 | 76 | 0.709366 |
72dc6456d4aaf9c6d7928ebcc6c4c03972d70754 | 934 | py | Python | venv/Lib/site-packages/fbs_runtime/_fbs.py | Acuf5928/check- | 4b993e0bcee33434506565dab11ece3dfa9c5cab | [
"MIT"
] | 1 | 2020-03-30T00:08:41.000Z | 2020-03-30T00:08:41.000Z | venv/Lib/site-packages/fbs_runtime/_fbs.py | Acuf5928/check- | 4b993e0bcee33434506565dab11ece3dfa9c5cab | [
"MIT"
] | null | null | null | venv/Lib/site-packages/fbs_runtime/_fbs.py | Acuf5928/check- | 4b993e0bcee33434506565dab11ece3dfa9c5cab | [
"MIT"
] | 2 | 2018-12-29T07:49:59.000Z | 2020-03-18T02:44:31.000Z | from fbs_runtime import platform
from fbs_runtime.platform import is_ubuntu, is_linux, is_arch_linux, is_fedora
def get_core_settings(project_dir):
return {
'project_dir': project_dir
}
def get_default_profiles():
result = ['base']
# The "secret" profile lets the user store sensitive settings ... | 34.592593 | 79 | 0.683084 |
dc14fdffc041758f5f211f8b3f35cb77d4948b84 | 203 | py | Python | CODE/size.py | Sid2697/Anime-Classificaton | b3c641924f9f1fcbb25ead4ea917d832477b1974 | [
"MIT"
] | 1 | 2021-01-27T07:15:08.000Z | 2021-01-27T07:15:08.000Z | CODE/size.py | Sid2697/Anime-Classificaton | b3c641924f9f1fcbb25ead4ea917d832477b1974 | [
"MIT"
] | null | null | null | CODE/size.py | Sid2697/Anime-Classificaton | b3c641924f9f1fcbb25ead4ea917d832477b1974 | [
"MIT"
] | null | null | null | max1 = 0
max2 = 0
for file in glob.glob('images/*.jpg'):
image = cv2.imread(file)
sh = image.shape
a = sh[0]
b = sh[1]
if a > max1:
max1 = a
if b > max2:
max2 = b
| 16.916667 | 38 | 0.482759 |
2fff60a2279b2e6d11e18d9e2bbce8285a3c101e | 218,172 | py | Python | octoprint_Octoslack/__init__.py | schweigel/Octoslack | 6e973c8401ccb0ec3bddae729fecf3799b8bf5a6 | [
"MIT"
] | null | null | null | octoprint_Octoslack/__init__.py | schweigel/Octoslack | 6e973c8401ccb0ec3bddae729fecf3799b8bf5a6 | [
"MIT"
] | null | null | null | octoprint_Octoslack/__init__.py | schweigel/Octoslack | 6e973c8401ccb0ec3bddae729fecf3799b8bf5a6 | [
"MIT"
] | null | null | null | # coding=utf-8
# encoding: utf-8
from __future__ import absolute_import, division, print_function, unicode_literals
from octoprint.util.version import get_octoprint_version_string
from tempfile import mkstemp
from datetime import timedelta
from slacker import Slacker, IncomingWebhook
from imgurpython import ImgurClient... | 39.863329 | 297 | 0.469859 |
16482f49a0eb7256f1af775a58094dcb181c7910 | 703 | py | Python | src/process/infrastructure/cryptography/CryptoService.py | PythonDataIntegrator/pythondataintegrator | 6167778c36c2295e36199ac0d4d256a4a0c28d7a | [
"MIT"
] | 14 | 2020-12-19T15:06:13.000Z | 2022-01-12T19:52:17.000Z | src/api/infrastructure/cryptography/CryptoService.py | PythonDataIntegrator/pythondataintegrator | 6167778c36c2295e36199ac0d4d256a4a0c28d7a | [
"MIT"
] | 43 | 2021-01-06T22:05:22.000Z | 2022-03-10T10:30:30.000Z | src/api/infrastructure/cryptography/CryptoService.py | PythonDataIntegrator/pythondataintegrator | 6167778c36c2295e36199ac0d4d256a4a0c28d7a | [
"MIT"
] | 4 | 2020-12-18T23:10:09.000Z | 2021-04-02T13:03:12.000Z | from cryptography.fernet import Fernet
from injector import inject
from infrastructure.dependency.scopes import IScoped
from models.configs.ApplicationConfig import ApplicationConfig
class CryptoService(IScoped):
@inject
def __init__(self, application_config: ApplicationConfig):
self.application_confi... | 33.47619 | 64 | 0.755334 |
e67cde230c620a474983ce9ed85d2819fed5037c | 7,291 | py | Python | app.py | coastrock/black-friday-prediction | d1e48512bd285152a36697d346261bf5e9e322dc | [
"MIT"
] | null | null | null | app.py | coastrock/black-friday-prediction | d1e48512bd285152a36697d346261bf5e9e322dc | [
"MIT"
] | null | null | null | app.py | coastrock/black-friday-prediction | d1e48512bd285152a36697d346261bf5e9e322dc | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request
from sklearn.externals import joblib
import os
import pandas as pd
import numpy as np
app = Flask(__name__, static_url_path='/static/')
@app.route('/')
def form():
return render_template('index.html')
@app.route('/predict_purchase', methods=['POST', 'GET'])
def... | 38.989305 | 125 | 0.673844 |
80ea2eeea5e5c5035b82c35e94499e5d3b9e1830 | 86,933 | py | Python | llvmlite/tests/test_ir.py | efeslab/llvmlite | 7d4cd04cd8339d6eaeef3d97d500c9c10a435f3e | [
"BSD-2-Clause"
] | 1 | 2021-05-24T10:08:51.000Z | 2021-05-24T10:08:51.000Z | llvmlite/tests/test_ir.py | efeslab/llvmlite | 7d4cd04cd8339d6eaeef3d97d500c9c10a435f3e | [
"BSD-2-Clause"
] | null | null | null | llvmlite/tests/test_ir.py | efeslab/llvmlite | 7d4cd04cd8339d6eaeef3d97d500c9c10a435f3e | [
"BSD-2-Clause"
] | 1 | 2021-01-31T18:58:54.000Z | 2021-01-31T18:58:54.000Z | """
IR Construction Tests
"""
import copy
import itertools
import pickle
import re
import textwrap
import unittest
from . import TestCase
from llvmlite import ir
from llvmlite import binding as llvm
int1 = ir.IntType(1)
int8 = ir.IntType(8)
int16 = ir.IntType(16)
int32 = ir.IntType(32)
int64 = ir.IntType(64)
hlf = ... | 38.844057 | 193 | 0.531352 |
42614f1eee8af55bc711b1f4d7e6a2ed37c755ff | 180,585 | py | Python | pandas/tests/io/pytables/test_store.py | gabriellm1/pandas | 020040b3b92516b445ddd8daba3b9818340e82d4 | [
"BSD-3-Clause"
] | 1 | 2021-07-16T04:28:42.000Z | 2021-07-16T04:28:42.000Z | pandas/tests/io/pytables/test_store.py | gabriellm1/pandas | 020040b3b92516b445ddd8daba3b9818340e82d4 | [
"BSD-3-Clause"
] | null | null | null | pandas/tests/io/pytables/test_store.py | gabriellm1/pandas | 020040b3b92516b445ddd8daba3b9818340e82d4 | [
"BSD-3-Clause"
] | 1 | 2022-03-15T14:46:56.000Z | 2022-03-15T14:46:56.000Z | import datetime
from datetime import timedelta
from distutils.version import LooseVersion
import hashlib
from io import BytesIO
import os
from pathlib import Path
import re
import time
from warnings import catch_warnings, simplefilter
import numpy as np
import pytest
from pandas.compat import is_platform_little_endia... | 36.91435 | 88 | 0.530271 |
fc9ce48526bb535bfd5a8992d98bb4e12724f6f3 | 11,243 | py | Python | tests/test_git.py | jensens/libvcs | bb806b0f919011cecdd3d8063d226b278c0bdaee | [
"MIT"
] | 11 | 2018-03-18T10:42:14.000Z | 2021-06-24T20:12:39.000Z | tests/test_git.py | jensens/libvcs | bb806b0f919011cecdd3d8063d226b278c0bdaee | [
"MIT"
] | 194 | 2018-03-10T21:08:05.000Z | 2022-03-31T22:40:01.000Z | tests/test_git.py | jensens/libvcs | bb806b0f919011cecdd3d8063d226b278c0bdaee | [
"MIT"
] | 6 | 2018-11-24T03:58:45.000Z | 2022-03-11T13:39:46.000Z | """Tests for libvcs git repos."""
import datetime
import os
import textwrap
import pytest
from libvcs import exc
from libvcs.git import GitRemote, convert_pip_url as git_convert_pip_url, extract_status
from libvcs.shortcuts import create_repo_from_pip_url
from libvcs.util import run, which
if not which('git'):
p... | 30.80274 | 138 | 0.62092 |
00ef89ed51cdee181ce8062c4d8cd3008b2f2106 | 10,457 | py | Python | tools/mo/unit_tests/mo/back/ConvolutionNormalizer_test.py | ieliz/openvino | 6f60a7d8f098c7cf3195ba96d964a11bf1babe55 | [
"Apache-2.0"
] | null | null | null | tools/mo/unit_tests/mo/back/ConvolutionNormalizer_test.py | ieliz/openvino | 6f60a7d8f098c7cf3195ba96d964a11bf1babe55 | [
"Apache-2.0"
] | 18 | 2022-01-21T08:42:58.000Z | 2022-03-28T13:21:31.000Z | tools/mo/unit_tests/mo/back/ConvolutionNormalizer_test.py | ematroso/openvino | 403339f8f470c90dee6f6d94ed58644b2787f66b | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import unittest
import numpy as np
from openvino.tools.mo.back.ConvolutionNormalizer import PullReshapeThroughFQ, V7ConvolutionWithGroupsResolver, \
V10ConvolutionWithGroupsResolver
from openvino.tools.mo.ops.fakequantize import Fa... | 40.847656 | 128 | 0.612413 |
9b92559370df29c6e75fe3e4df5f65c5ab3f36da | 8,714 | py | Python | docs/conf.py | xesscorp/xsconnect | b08b2e24e7a017d9f87ad4651f82915179f1fd52 | [
"MIT"
] | null | null | null | docs/conf.py | xesscorp/xsconnect | b08b2e24e7a017d9f87ad4651f82915179f1fd52 | [
"MIT"
] | 1 | 2017-01-26T12:09:44.000Z | 2021-03-07T14:13:14.000Z | docs/conf.py | xesscorp/xsconnect | b08b2e24e7a017d9f87ad4651f82915179f1fd52 | [
"MIT"
] | 1 | 2021-08-16T07:31:24.000Z | 2021-08-16T07:31:24.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# xsconnect documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in... | 31.572464 | 77 | 0.693711 |
b7bebb8179263aeab1c41fd25cd8f2d3a12b6265 | 3,938 | py | Python | main.py | panoti/CH_QuadraticCongruenceSolver | 16b03f2c2f3fbfb496c20e623dad5f6717e4bd90 | [
"MIT"
] | null | null | null | main.py | panoti/CH_QuadraticCongruenceSolver | 16b03f2c2f3fbfb496c20e623dad5f6717e4bd90 | [
"MIT"
] | null | null | null | main.py | panoti/CH_QuadraticCongruenceSolver | 16b03f2c2f3fbfb496c20e623dad5f6717e4bd90 | [
"MIT"
] | 1 | 2020-06-08T14:30:40.000Z | 2020-06-08T14:30:40.000Z | #!/usr/bin/env python
def pow_mod(base, exponent, modulus):
"""
Computing Modular exponentiation: base ^ exponent (mod modulus)
Parameters
----------
base : integer
exponent : integer
modulus : unsigned integer
Returns
-------
int
Result of calculation
"""
re... | 18.575472 | 69 | 0.471051 |
4f2ef88a46f98241db14e644a685efbb30416c0f | 5,225 | py | Python | torchkbnufft/nufft/sparse_interp_mat.py | zaccharieramzi/torchkbnufft | 37e5808ab73ddb52cbd4655f3d7fd6273b3dd89a | [
"MIT"
] | 1 | 2021-04-16T15:41:28.000Z | 2021-04-16T15:41:28.000Z | torchkbnufft/nufft/sparse_interp_mat.py | edongdongchen/torchkbnufft | f9ac098c8f122026e8e8866828cb5957118a5679 | [
"MIT"
] | null | null | null | torchkbnufft/nufft/sparse_interp_mat.py | edongdongchen/torchkbnufft | f9ac098c8f122026e8e8866828cb5957118a5679 | [
"MIT"
] | null | null | null | import itertools
import numpy as np
import torch
from ..math import complex_mult, conj_complex_mult
from .interp_functions import calc_coef_and_indices
def get_interpob(model):
"""Retrieves the interpolation dictionary from model.
Different nufft objects use different interpolation objects. This function
... | 32.453416 | 78 | 0.633684 |
10fb031d6e2035918b35333615d480343ea3160a | 1,395 | py | Python | topojson/topojson/stitchpoles.py | ishuah91/MtaaSafi-Web-App | b3ed936c13d090388986b278d611387c1651b823 | [
"MIT"
] | null | null | null | topojson/topojson/stitchpoles.py | ishuah91/MtaaSafi-Web-App | b3ed936c13d090388986b278d611387c1651b823 | [
"MIT"
] | null | null | null | topojson/topojson/stitchpoles.py | ishuah91/MtaaSafi-Web-App | b3ed936c13d090388986b278d611387c1651b823 | [
"MIT"
] | null | null | null | from mytypes import Types
def stitch (objects, options=False):
verbose = False;
if type(options)==type({}) and options.has_key("verbose"):
verbose = not not options['verbose']
class Stitch(Types):
def polygon(self,polygon):
for line in polygon:
n = len(... | 33.214286 | 68 | 0.33405 |
7bb3b9235029e24be8a14b958a0f66edbf66ac3e | 1,687 | py | Python | src/xuex-ai/storage/stores/sql/dao/rdf.py | johnlito123/Xuez_AI | 5eba129ba9e6864bf32cbe0fd7551a4ac27f7f9d | [
"MIT"
] | null | null | null | src/xuex-ai/storage/stores/sql/dao/rdf.py | johnlito123/Xuez_AI | 5eba129ba9e6864bf32cbe0fd7551a4ac27f7f9d | [
"MIT"
] | null | null | null | src/xuex-ai/storage/stores/sql/dao/rdf.py | johnlito123/Xuez_AI | 5eba129ba9e6864bf32cbe0fd7551a4ac27f7f9d | [
"MIT"
] | 4 | 2019-04-01T15:42:23.000Z | 2020-11-05T08:14:27.000Z | """
Copyright (c) 2016-2019 Keith Sterling http://www.keithsterling.com
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, m... | 43.25641 | 120 | 0.75163 |
3fa0527ddaee79d98ee06c861341f5fc507c878f | 357,728 | py | Python | ChiTest/TriangleMeshTests/YMesh_Test1.py | Jrgriss2/chi-tech | db75df761d5f25ca4b79ee19d36f886ef240c2b5 | [
"MIT"
] | 7 | 2019-09-10T12:16:08.000Z | 2021-05-06T16:01:59.000Z | ChiTest/TriangleMeshTests/YMesh_Test1.py | Jrgriss2/chi-tech | db75df761d5f25ca4b79ee19d36f886ef240c2b5 | [
"MIT"
] | 72 | 2019-09-04T15:00:25.000Z | 2021-12-02T20:47:29.000Z | ChiTest/TriangleMeshTests/YMesh_Test1.py | Jrgriss2/chi-tech | db75df761d5f25ca4b79ee19d36f886ef240c2b5 | [
"MIT"
] | 41 | 2019-09-02T15:33:31.000Z | 2022-02-10T13:26:49.000Z | import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import mpl_toolkits.mplot3d as a3
from matplotlib import colors
import scipy as sp
xyz=np.zeros((1311,3))
xyz[0][0]=-1.000000; xyz[0][1]=-1.000000; xyz[0][2]=0.000000;
xyz[1][0]=1.000000; xyz[1][1]=-1.000000; xyz[1][2]=0.0000... | 31.634949 | 72 | 0.718823 |
e4327c9696b6c735061d44f19c016940d84f6744 | 2,124 | py | Python | end_to_end_tests/golden-master/my_test_api_client/api/users.py | acgray/openapi-python-client | d47bc429660738dfd120797ddca032dca93ef210 | [
"MIT"
] | null | null | null | end_to_end_tests/golden-master/my_test_api_client/api/users.py | acgray/openapi-python-client | d47bc429660738dfd120797ddca032dca93ef210 | [
"MIT"
] | null | null | null | end_to_end_tests/golden-master/my_test_api_client/api/users.py | acgray/openapi-python-client | d47bc429660738dfd120797ddca032dca93ef210 | [
"MIT"
] | null | null | null | from dataclasses import asdict
from datetime import date, datetime
from typing import Any, Dict, List, Optional, Union, cast
import httpx
from ..client import AuthenticatedClient, Client
from ..errors import ApiResponseError
from ..models.a_model import AModel
from ..models.an_enum_value import AnEnumValue
from ..mod... | 31.235294 | 97 | 0.716573 |
c22a31db991f01d311dfd2c1eba4ec7daa7a3f2f | 29,647 | py | Python | ProgettoLube/WebInspector/venv/Lib/site-packages/skimage/filters/rank/tests/test_rank.py | Lube-Project/ProgettoLube | cbf33971e2c2e865783ec1a2302625539186a338 | [
"MIT"
] | 2 | 2022-03-19T09:45:18.000Z | 2022-03-19T15:26:24.000Z | ProgettoLube/WebInspector/venv/Lib/site-packages/skimage/filters/rank/tests/test_rank.py | Lube-Project/ProgettoLube | cbf33971e2c2e865783ec1a2302625539186a338 | [
"MIT"
] | 7 | 2021-06-08T21:46:24.000Z | 2022-03-12T00:35:31.000Z | ProgettoLube/WebInspector/venv/Lib/site-packages/skimage/filters/rank/tests/test_rank.py | Lube-Project/ProgettoLube | cbf33971e2c2e865783ec1a2302625539186a338 | [
"MIT"
] | null | null | null | import numpy as np
from skimage._shared.testing import (assert_equal, assert_array_equal,
assert_allclose)
from skimage._shared import testing
from skimage.util import img_as_ubyte, img_as_float
from skimage import data, util, morphology
from skimage.morphology import grey, disk
fr... | 39.741287 | 83 | 0.546733 |
2d7c91a59aed2147eeebb1cbbc71612ebb927793 | 3,661 | py | Python | torchgeometry/utils.py | tina300399/torchgeometry | 48d8026f0a5f3d4ac5567b7b2738390892b3cc8d | [
"Apache-2.0"
] | null | null | null | torchgeometry/utils.py | tina300399/torchgeometry | 48d8026f0a5f3d4ac5567b7b2738390892b3cc8d | [
"Apache-2.0"
] | null | null | null | torchgeometry/utils.py | tina300399/torchgeometry | 48d8026f0a5f3d4ac5567b7b2738390892b3cc8d | [
"Apache-2.0"
] | 1 | 2019-10-04T05:05:28.000Z | 2019-10-04T05:05:28.000Z | from typing import Optional
import torch
import torch.nn as nn
import torchgeometry as tgm
import numpy as np
__all__ = [
"tensor_to_image",
"image_to_tensor",
"create_meshgrid",
]
def create_meshgrid(
height: int,
width: int,
normalized_coordinates: Optional[bool] = True):
... | 29.764228 | 79 | 0.630702 |
914a45af54355970edcb55eb8999fac8feb61bb2 | 4,523 | py | Python | nova/tests/api/openstack/compute/test_api.py | russellb/nova | 99c2e02b44a1012c8e26fc7658dc40ec4620a1ee | [
"Apache-2.0"
] | null | null | null | nova/tests/api/openstack/compute/test_api.py | russellb/nova | 99c2e02b44a1012c8e26fc7658dc40ec4620a1ee | [
"Apache-2.0"
] | null | null | null | nova/tests/api/openstack/compute/test_api.py | russellb/nova | 99c2e02b44a1012c8e26fc7658dc40ec4620a1ee | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 OpenStack LLC.
# 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/... | 34.007519 | 78 | 0.667035 |
0b00ed6a664d48280a5c07fe4102e964362bbf5d | 899 | py | Python | setup.py | Balkeerat/django-url-shortening | 1a5d1671298f6a556f99a079fdc3910adf687cde | [
"BSD-3-Clause"
] | null | null | null | setup.py | Balkeerat/django-url-shortening | 1a5d1671298f6a556f99a079fdc3910adf687cde | [
"BSD-3-Clause"
] | null | null | null | setup.py | Balkeerat/django-url-shortening | 1a5d1671298f6a556f99a079fdc3910adf687cde | [
"BSD-3-Clause"
] | null | null | null | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="django-url-shortening",
version="1.0.0",
url='https://github.com/Balkeerat/django-url-shortening',
license='BSD',
description="A URL shorteni... | 25.685714 | 70 | 0.630701 |
20884a3390774bb64dc209f82176895b147db73a | 697 | py | Python | src/news/views.py | Busaka/esl | 66ef2216b6bb14be23a59a1b1038d1e897874939 | [
"MIT"
] | null | null | null | src/news/views.py | Busaka/esl | 66ef2216b6bb14be23a59a1b1038d1e897874939 | [
"MIT"
] | null | null | null | src/news/views.py | Busaka/esl | 66ef2216b6bb14be23a59a1b1038d1e897874939 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.views.generic.base import TemplateView
from .models import New
# Create your views here.
class News(TemplateView):
template_name = "news/news.html"
def get_context_data(self, **kwargs):
context = super(News, self).get_context_data(**kwargs)
con... | 33.190476 | 100 | 0.710187 |
c57b39bb1d102138a9c47227a677c3f5d6ddee5a | 33,411 | py | Python | python/tvm/auto_scheduler/measure.py | tom-gall/tvm | 74254c374ac49be64ea440f7abdeb9f5a91273a4 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | 1 | 2021-12-09T20:38:43.000Z | 2021-12-09T20:38:43.000Z | python/tvm/auto_scheduler/measure.py | tom-gall/tvm | 74254c374ac49be64ea440f7abdeb9f5a91273a4 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | null | null | null | python/tvm/auto_scheduler/measure.py | tom-gall/tvm | 74254c374ac49be64ea440f7abdeb9f5a91273a4 | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-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... | 34.875783 | 99 | 0.625303 |
94c731d348957bb305d253c6252be9fbad17eb85 | 20,963 | py | Python | ait/core/seq.py | acliu88/AIT-Core | d1340405b1f2c180d97bad0b4a3184cc24c0d541 | [
"MIT"
] | null | null | null | ait/core/seq.py | acliu88/AIT-Core | d1340405b1f2c180d97bad0b4a3184cc24c0d541 | [
"MIT"
] | null | null | null | ait/core/seq.py | acliu88/AIT-Core | d1340405b1f2c180d97bad0b4a3184cc24c0d541 | [
"MIT"
] | null | null | null | # Advanced Multi-Mission Operations System (AMMOS) Instrument Toolkit (AIT)
# Bespoke Link to Instruments and Small Satellites (BLISS)
#
# Copyright 2013, by the California Institute of Technology. ALL RIGHTS
# RESERVED. United States Government Sponsorship acknowledged. Any
# commercial use must be negotiated with the... | 28.062918 | 81 | 0.621762 |
16adcb1ded5e684e8a4da7956e5d158a3a322f6a | 701 | py | Python | lib/djtables/row.py | czue/djtables | e6158a67ad5422736853aa7759ed68e08d6dbd40 | [
"MIT"
] | null | null | null | lib/djtables/row.py | czue/djtables | e6158a67ad5422736853aa7759ed68e08d6dbd40 | [
"MIT"
] | null | null | null | lib/djtables/row.py | czue/djtables | e6158a67ad5422736853aa7759ed68e08d6dbd40 | [
"MIT"
] | 1 | 2019-09-29T04:19:21.000Z | 2019-09-29T04:19:21.000Z | #!/usr/bin/env python
# vim: et ts=4 sw=4
class Row(object):
def __init__(self, table, obj):
self.table = table
self.obj = obj
def __getattr__(self, name):
if hasattr(self.obj, name):
val = getattr(self.obj, name)
elif hasattr(self.obj, "__getitem__") and (name in... | 22.612903 | 69 | 0.577746 |
6781096700b532dbb1132574cc26bba135324891 | 6,692 | py | Python | src/storage-blob-preview/azext_storage_blob_preview/vendored_sdks/azure_storage_blob/v2019_12_12/_serialize.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 3 | 2019-02-21T20:46:26.000Z | 2021-06-22T15:35:52.000Z | src/storage-blob-preview/azext_storage_blob_preview/vendored_sdks/azure_storage_blob/v2019_12_12/_serialize.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 11 | 2017-10-05T18:20:40.000Z | 2020-10-10T09:20:19.000Z | src/storage-blob-preview/azext_storage_blob_preview/vendored_sdks/azure_storage_blob/v2019_12_12/_serialize.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 15 | 2017-10-02T18:48:20.000Z | 2022-03-03T14:03:49.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
# pylint: ... | 37.177778 | 111 | 0.67887 |
da6c0727b00e82833a61128b22f377f6571ca341 | 3,745 | py | Python | installer/filedownloader.py | username-is-already-taken2/photon | 5be3d8c956156f494a2479274ca8eb9723fa2057 | [
"Apache-2.0"
] | 1 | 2020-05-27T17:47:17.000Z | 2020-05-27T17:47:17.000Z | installer/filedownloader.py | username-is-already-taken2/photon | 5be3d8c956156f494a2479274ca8eb9723fa2057 | [
"Apache-2.0"
] | null | null | null | installer/filedownloader.py | username-is-already-taken2/photon | 5be3d8c956156f494a2479274ca8eb9723fa2057 | [
"Apache-2.0"
] | 1 | 2021-01-10T01:05:18.000Z | 2021-01-10T01:05:18.000Z | #
# © 2019 VMware Inc.,
#
# Date: Tue Oct 15 14:17:13 IST 2019
# Author: Siddharth Chandrasekaran <csiddharth@vmware.com>
import os
import tempfile
from commandutils import CommandUtils
from window import Window
from windowstringreader import WindowStringReader
from actionresult import ActionResult
fr... | 41.153846 | 93 | 0.61255 |
be44e70d50956f5a56fd8c86bff03b42bf6bbc93 | 3,688 | py | Python | aliyun-python-sdk-cloudauth/aliyunsdkcloudauth/request/v20190307/LivenessFaceVerifyRequest.py | leafcoder/aliyun-openapi-python-sdk | 26b441ab37a5cda804de475fd5284bab699443f1 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-cloudauth/aliyunsdkcloudauth/request/v20190307/LivenessFaceVerifyRequest.py | leafcoder/aliyun-openapi-python-sdk | 26b441ab37a5cda804de475fd5284bab699443f1 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-cloudauth/aliyunsdkcloudauth/request/v20190307/LivenessFaceVerifyRequest.py | leafcoder/aliyun-openapi-python-sdk | 26b441ab37a5cda804de475fd5284bab699443f1 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.000Z | # 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... | 31.793103 | 77 | 0.758677 |
0dc948238a8a471391f21eecb98afa93db24d5d8 | 48,597 | py | Python | etcd3/client.py | PingHao/python-etcd3 | b694fd8a465787dfec191a6eaf69919019b5eb89 | [
"Apache-2.0"
] | 362 | 2016-10-13T09:00:45.000Z | 2022-03-31T06:44:47.000Z | etcd3/client.py | PingHao/python-etcd3 | b694fd8a465787dfec191a6eaf69919019b5eb89 | [
"Apache-2.0"
] | 1,630 | 2016-10-02T22:50:01.000Z | 2022-03-28T23:19:51.000Z | etcd3/client.py | PingHao/python-etcd3 | b694fd8a465787dfec191a6eaf69919019b5eb89 | [
"Apache-2.0"
] | 159 | 2016-10-11T13:38:53.000Z | 2022-03-21T06:45:41.000Z | import functools
import random
import threading
import time
import grpc
import grpc._channel
from six.moves import queue
import etcd3.etcdrpc as etcdrpc
import etcd3.exceptions as exceptions
import etcd3.leases as leases
import etcd3.locks as locks
import etcd3.members
import etcd3.transactions as transactions
impor... | 34.441531 | 79 | 0.5859 |
277f0a8ae6b6cdf49dec4f4f62da24dad7fe2216 | 120,222 | py | Python | tests/ut/python/ops/test_ops.py | LaiYongqiang/mindspore | 1b7a38ccd86b55af50a0ea55c7f2f43813ed3e0e | [
"Apache-2.0"
] | 1 | 2021-11-19T14:21:45.000Z | 2021-11-19T14:21:45.000Z | tests/ut/python/ops/test_ops.py | LaiYongqiang/mindspore | 1b7a38ccd86b55af50a0ea55c7f2f43813ed3e0e | [
"Apache-2.0"
] | null | null | null | tests/ut/python/ops/test_ops.py | LaiYongqiang/mindspore | 1b7a38ccd86b55af50a0ea55c7f2f43813ed3e0e | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 39.071173 | 120 | 0.521236 |
8fc9f5b5ee7dd7d3ce1d6e468240529e2a640023 | 4,196 | py | Python | scripts/csv-to-wiki.py | pstirparo/mac4n6 | 5c0d2acba55fcfa27852326f01c0324033e48fc6 | [
"Apache-2.0"
] | 254 | 2015-08-17T14:24:27.000Z | 2022-03-18T05:28:53.000Z | scripts/csv-to-wiki.py | bfuzzy/mac4n6 | 544c302750b28f4d00b1741ff2acf463d1ec0011 | [
"Apache-2.0"
] | 2 | 2016-08-11T03:38:49.000Z | 2022-03-13T07:24:08.000Z | scripts/csv-to-wiki.py | bfuzzy/mac4n6 | 544c302750b28f4d00b1741ff2acf463d1ec0011 | [
"Apache-2.0"
] | 42 | 2015-09-23T04:06:13.000Z | 2022-03-30T17:08:20.000Z | #!/usr/bin/python
#########################################################################
# #
# This script is meant to convert the csv file containg the OSX/iOS #
# artifacts into a forensicswiki page #
# ... | 39.961905 | 243 | 0.448999 |
070fecc4e29430b7f6a47a8d718c53eeddac6315 | 570 | py | Python | filter_plugins/clean_config.py | aegiacometti/netconf-backup-gogs | c7532dd90e72f5c1e5b74ab4bf91cab02d83aceb | [
"Apache-2.0"
] | 3 | 2020-11-04T00:40:18.000Z | 2021-01-15T08:27:56.000Z | filter_plugins/clean_config.py | aegiacometti/netconf-backup-gogs | c7532dd90e72f5c1e5b74ab4bf91cab02d83aceb | [
"Apache-2.0"
] | null | null | null | filter_plugins/clean_config.py | aegiacometti/netconf-backup-gogs | c7532dd90e72f5c1e5b74ab4bf91cab02d83aceb | [
"Apache-2.0"
] | null | null | null | #
# Simple list append filter
#
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from jinja2 import TemplateError
import re
def clean_config(l, *argv):
for element in argv:
if type(element) is list:
for value in element:
l = clean_config(... | 20.357143 | 66 | 0.582456 |
9fc3ea052fb6d08457864d85649402f4ac5446ba | 429 | py | Python | ztag/annotations/integ_mei.py | justinbastress/ztag | 137b754dfe22b7d6e0945ae33def372ec67d092b | [
"Apache-2.0"
] | 107 | 2015-10-13T16:03:21.000Z | 2021-11-08T10:53:07.000Z | ztag/annotations/integ_mei.py | justinbastress/ztag | 137b754dfe22b7d6e0945ae33def372ec67d092b | [
"Apache-2.0"
] | 73 | 2015-10-14T17:27:10.000Z | 2018-10-01T14:32:44.000Z | ztag/annotations/integ_mei.py | justinbastress/ztag | 137b754dfe22b7d6e0945ae33def372ec67d092b | [
"Apache-2.0"
] | 36 | 2015-10-14T17:13:20.000Z | 2021-10-05T19:41:10.000Z | from ztag.annotation import Annotation, Manufacturer
from ztag import protocols
class INTEGDevice(Annotation):
protocol = protocols.MODBUS
subprotocol = protocols.MODBUS.DEVICE_ID
port = None
vals = {
"manufacturer": Manufacturer.INTEG,
}
def _process(self, d):
vendor = d["... | 21.45 | 63 | 0.643357 |
0130ad240f75a02caa430bf44a2b5bf8dcd428e4 | 3,047 | py | Python | couchbase/datadog_checks/couchbase/config_models/instance.py | mindovermiles262/integrations-core | 663cdf0e172094a72e92b4704353d19b7392514a | [
"BSD-3-Clause"
] | null | null | null | couchbase/datadog_checks/couchbase/config_models/instance.py | mindovermiles262/integrations-core | 663cdf0e172094a72e92b4704353d19b7392514a | [
"BSD-3-Clause"
] | null | null | null | couchbase/datadog_checks/couchbase/config_models/instance.py | mindovermiles262/integrations-core | 663cdf0e172094a72e92b4704353d19b7392514a | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from __future__ import annotations
from typing import Any, Mapping, Optional, Sequence
from pydantic import BaseModel, root_validator, validator
from datadog_checks.base.utils.functions import identity
... | 30.168317 | 110 | 0.720053 |
9e57e44e0f9431670f87218503f788f662b9a4fb | 232 | py | Python | DiscreteOptmization/week1/anyint/solver.py | joaoandre/coursera | 8eb17525a86b410dbdc4410bb96c0f1b6322cb20 | [
"MIT"
] | null | null | null | DiscreteOptmization/week1/anyint/solver.py | joaoandre/coursera | 8eb17525a86b410dbdc4410bb96c0f1b6322cb20 | [
"MIT"
] | null | null | null | DiscreteOptmization/week1/anyint/solver.py | joaoandre/coursera | 8eb17525a86b410dbdc4410bb96c0f1b6322cb20 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
def solve_it(input_data):
# return a positive integer, as a string
return '1234567890'
if __name__ == '__main__':
print('This script submits the integer: %s\n' % solve_it(''))
| 23.2 | 65 | 0.646552 |
c543bf56cf6aad8a26a6e250863b3009a6e23e59 | 3,114 | py | Python | test/integration_test/tools/lib/datastore_cmd.py | ryoon/lagopus | 624b27b28121c913764cb8de8f14e8f586651442 | [
"Apache-2.0"
] | 281 | 2015-01-06T13:36:14.000Z | 2022-03-14T03:29:46.000Z | test/integration_test/tools/lib/datastore_cmd.py | ryoon/lagopus | 624b27b28121c913764cb8de8f14e8f586651442 | [
"Apache-2.0"
] | 115 | 2015-01-06T11:09:21.000Z | 2020-11-26T11:44:23.000Z | test/integration_test/tools/lib/datastore_cmd.py | ryoon/lagopus | 624b27b28121c913764cb8de8f14e8f586651442 | [
"Apache-2.0"
] | 108 | 2015-01-06T05:12:01.000Z | 2022-01-02T03:28:50.000Z | #!/usr/bin/env python
import sys
import socket
import ssl
import os
import six
import select
import json
import logging
from contextlib import contextmanager
from const import *
class DataStoreCmd(object):
def __init__(self, host="127.0.0.1", port=12345, is_tls=False,
certfile=None, keyfile=No... | 25.735537 | 81 | 0.526654 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.