hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8c806655a98372e3737c71b32958435ab122164a | 2,069 | py | Python | combine_classifiers.py | kevincobain2000/nltk-trainer | 5c0b53ccecb7a5042d5af6c4325e134f7d83cb45 | [
"Apache-2.0"
] | 1 | 2021-10-08T11:40:09.000Z | 2021-10-08T11:40:09.000Z | combine_classifiers.py | kevincobain2000/nltk-trainer | 5c0b53ccecb7a5042d5af6c4325e134f7d83cb45 | [
"Apache-2.0"
] | null | null | null | combine_classifiers.py | kevincobain2000/nltk-trainer | 5c0b53ccecb7a5042d5af6c4325e134f7d83cb45 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import argparse, os.path
import nltk.data
from nltk_trainer import dump_object
from nltk_trainer.classification import multi
########################################
## command options & argument parsing ##
########################################
parser = argparse.ArgumentParser(description='Combin... | 29.557143 | 100 | 0.658772 |
0f82fa97a8f8ff6afb5752fb69df5ce497e8db2c | 6,500 | py | Python | ymir/command/mir/commands/model_importing.py | phoenix-xhuang/ymir | 537d3ac389c4a365ce4daef431c95b42ddcd5b1b | [
"Apache-2.0"
] | 64 | 2021-11-15T03:48:00.000Z | 2022-03-25T07:08:46.000Z | ymir/command/mir/commands/model_importing.py | phoenix-xhuang/ymir | 537d3ac389c4a365ce4daef431c95b42ddcd5b1b | [
"Apache-2.0"
] | 35 | 2021-11-23T04:14:35.000Z | 2022-03-26T09:03:43.000Z | ymir/command/mir/commands/model_importing.py | phoenix-xhuang/ymir | 537d3ac389c4a365ce4daef431c95b42ddcd5b1b | [
"Apache-2.0"
] | 57 | 2021-11-11T10:15:40.000Z | 2022-03-29T07:27:54.000Z | import argparse
import logging
import os
import shutil
import yaml
from mir.commands import base
from mir.protos import mir_command_pb2 as mirpb
from mir.tools import checker, mir_storage_ops, revs_parser
from mir.tools import settings as mir_settings, utils as mir_utils
from mir.tools.code import MirCode
from mir.to... | 51.587302 | 116 | 0.545692 |
f0bb775ef3d4325d9576af8c2db8ab59e676304f | 34,055 | py | Python | arcade/sprite_list.py | biggzlar/arcade | fc444db356452660ac6cb2ffe241f0b1a3d4bcf3 | [
"MIT"
] | 1 | 2020-01-18T04:48:38.000Z | 2020-01-18T04:48:38.000Z | arcade/sprite_list.py | biggzlar/arcade | fc444db356452660ac6cb2ffe241f0b1a3d4bcf3 | [
"MIT"
] | null | null | null | arcade/sprite_list.py | biggzlar/arcade | fc444db356452660ac6cb2ffe241f0b1a3d4bcf3 | [
"MIT"
] | null | null | null | """
This module provides functionality to manage Sprites in a list.
"""
from typing import Iterable
from typing import Any
from typing import TypeVar
from typing import Generic
from typing import List
from typing import Tuple
from typing import Optional
import pyglet.gl as gl
import math
import array
from PIL impo... | 34.089089 | 120 | 0.605197 |
497e59ee8be21d8f1b99304aa0afe9ce3050c92c | 8,450 | py | Python | yardstick/benchmark/scenarios/networking/pktgen_dpdk_throughput.py | mythwm/yardstick | ea13581f450c9c44f6f73d383e6a192697a95cc1 | [
"Apache-2.0"
] | 1 | 2019-12-08T21:39:38.000Z | 2019-12-08T21:39:38.000Z | yardstick/benchmark/scenarios/networking/pktgen_dpdk_throughput.py | mythwm/yardstick | ea13581f450c9c44f6f73d383e6a192697a95cc1 | [
"Apache-2.0"
] | null | null | null | yardstick/benchmark/scenarios/networking/pktgen_dpdk_throughput.py | mythwm/yardstick | ea13581f450c9c44f6f73d383e6a192697a95cc1 | [
"Apache-2.0"
] | null | null | null | ##############################################################################
# Copyright (c) 2017 Nokia and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# ... | 37.22467 | 78 | 0.573373 |
255253a037431d1da4aadca745059315227b9b24 | 6,480 | py | Python | lib/ansiblelint/skip_utils.py | ragne/ansible-lint | 70376e9da602aca9b6d3fa1d0ee62d314d6d8885 | [
"MIT"
] | null | null | null | lib/ansiblelint/skip_utils.py | ragne/ansible-lint | 70376e9da602aca9b6d3fa1d0ee62d314d6d8885 | [
"MIT"
] | null | null | null | lib/ansiblelint/skip_utils.py | ragne/ansible-lint | 70376e9da602aca9b6d3fa1d0ee62d314d6d8885 | [
"MIT"
] | null | null | null | # (c) 2019–2020, Ansible by Red Hat
#
# 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, merge, publish, dist... | 36.404494 | 86 | 0.697222 |
191fb6b3ed98935af0680952088c8b9e58b67482 | 8,380 | py | Python | pycfn_elasticsearch/vendored/botocore/docs/params.py | elelsee/pycfn-elasticsearch | 74f644f5e508736bab8d45a8ac56e8edeb4e1ca9 | [
"Apache-2.0"
] | 4 | 2015-10-20T15:18:40.000Z | 2018-01-17T10:03:19.000Z | pycfn_elasticsearch/vendored/botocore/docs/params.py | elelsee/pycfn-elasticsearch | 74f644f5e508736bab8d45a8ac56e8edeb4e1ca9 | [
"Apache-2.0"
] | null | null | null | pycfn_elasticsearch/vendored/botocore/docs/params.py | elelsee/pycfn-elasticsearch | 74f644f5e508736bab8d45a8ac56e8edeb4e1ca9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... | 42.538071 | 78 | 0.648807 |
9feaa974de55f76b370a107bf278a7aebf515f62 | 6,711 | py | Python | jamtoolsbuild.py | smallhoe/JamTools | 4033ff3b5f200fff826986e3449c3d859c6f567a | [
"Apache-2.0"
] | null | null | null | jamtoolsbuild.py | smallhoe/JamTools | 4033ff3b5f200fff826986e3449c3d859c6f567a | [
"Apache-2.0"
] | null | null | null | jamtoolsbuild.py | smallhoe/JamTools | 4033ff3b5f200fff826986e3449c3d859c6f567a | [
"Apache-2.0"
] | null | null | null | import time
jamfilelist = ["PyQt5CoreModels", "jamcontroller", "WEBFilesTransmitter", "clientFilesTransmitter",
"jamscreenshot", "jampublic", "jamroll_screenshot"]
print("说明:test.py文件为主文件,main.py为存放引入库的文件(无需管),scr文件夹是fbs打包的项目目录.\n"
"运行本文件打包时,会自动将test.py文件覆盖到PyQt5CoreModels.py(这是前期为了防反编译搞的hh)中,然后会自... | 43.019231 | 117 | 0.547161 |
77deefc7ce037705b2f887af17a9ab683b64b1c9 | 9,209 | py | Python | modules/userinput.py | rufotheone-fr/retool | be776847d02f711faf58d834dd52554959bef45b | [
"BSD-3-Clause"
] | 117 | 2020-05-02T07:44:41.000Z | 2022-03-31T07:37:07.000Z | modules/userinput.py | rufotheone-fr/retool | be776847d02f711faf58d834dd52554959bef45b | [
"BSD-3-Clause"
] | 150 | 2020-05-17T22:26:10.000Z | 2022-03-20T01:37:27.000Z | modules/userinput.py | rufotheone-fr/retool | be776847d02f711faf58d834dd52554959bef45b | [
"BSD-3-Clause"
] | 14 | 2020-07-08T04:54:32.000Z | 2022-02-20T09:15:56.000Z | import argparse
import os
import sys
from strictyaml import load, Map, MapPattern, Str, Seq, YAMLError
from modules.classes import SmartFormatter, UserInput
from modules.utils import Font, regex_test
def check_input():
""" Checks user input values"""
parser = argparse.ArgumentParser(
us... | 41.111607 | 219 | 0.541753 |
1a719fa160b85a30de322ea98735f1a3f74e533d | 2,609 | py | Python | Numerical_Methods_Physics/Gauss_Elimination.py | Simba2805/Computational_Physics_Python | be687939c16a1d08066939830ac31ba666a3e1bb | [
"MIT"
] | null | null | null | Numerical_Methods_Physics/Gauss_Elimination.py | Simba2805/Computational_Physics_Python | be687939c16a1d08066939830ac31ba666a3e1bb | [
"MIT"
] | null | null | null | Numerical_Methods_Physics/Gauss_Elimination.py | Simba2805/Computational_Physics_Python | be687939c16a1d08066939830ac31ba666a3e1bb | [
"MIT"
] | null | null | null | # #from numpy import array, zeros
# from array import *
import numpy as np
#from numpy import fabs
'''
a=np.array([[25,5,1],
[64,8,1],
[144,12,1]],float)
b=[106.8,177,279.2]
n= len(b)
x= np.zeros(n,float)
# Elimination
for k in range(n - 1):
for i in range(k + 1, n):
if a[i... | 25.578431 | 158 | 0.48716 |
63e4fabe50d8c3257ee6b6e16a6cb561eb8b4586 | 1,333 | py | Python | xlsxwriter/test/comparison/test_chart_blank03.py | adgear/XlsxWriter | 79bcaad28d57ac29038b1c74bccc6d611b7a385e | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2019-07-25T06:08:09.000Z | 2019-11-01T02:33:56.000Z | xlsxwriter/test/comparison/test_chart_blank03.py | adgear/XlsxWriter | 79bcaad28d57ac29038b1c74bccc6d611b7a385e | [
"BSD-2-Clause-FreeBSD"
] | 13 | 2019-07-14T00:29:05.000Z | 2019-11-26T06:16:46.000Z | xlsxwriter/test/comparison/test_chart_blank03.py | adgear/XlsxWriter | 79bcaad28d57ac29038b1c74bccc6d611b7a385e | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2019, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | 24.685185 | 79 | 0.56039 |
7f48ff2758ca1da69efc97e333be34fa3b8a2d3b | 16,438 | py | Python | Notebook/KL Divergence Loop.py | yxie367/Mushrooms | 9b0fc5dfb6ab20c7c0c4146bff0d04de561302c5 | [
"MIT"
] | null | null | null | Notebook/KL Divergence Loop.py | yxie367/Mushrooms | 9b0fc5dfb6ab20c7c0c4146bff0d04de561302c5 | [
"MIT"
] | null | null | null | Notebook/KL Divergence Loop.py | yxie367/Mushrooms | 9b0fc5dfb6ab20c7c0c4146bff0d04de561302c5 | [
"MIT"
] | null | null | null | # %% [Algorithm 1c Loop]
# # MUSHROOMS
# %% [markdown]
# ## Binary Classification
# %% [markdown]
# ### Imports
# %%
import os
import pandas as pd
import numpy as np
import tensorflow as tf
from tensorflow import keras
import matplotlib.pyplot as plt
# %% [markdown]
# ### Load Data
dataset = pd.read_csv(r"C:\User... | 27.673401 | 177 | 0.592469 |
ab5a2d297c17fda8c540f8f0177b9c9013791e11 | 4,187 | py | Python | zhihu_user_info_spider/zhihu_user_info_spider/parser/Parser.py | takhello/spider_collection | 05d2a517f52527cebbbf82de3072673f06c90d81 | [
"MIT"
] | null | null | null | zhihu_user_info_spider/zhihu_user_info_spider/parser/Parser.py | takhello/spider_collection | 05d2a517f52527cebbbf82de3072673f06c90d81 | [
"MIT"
] | null | null | null | zhihu_user_info_spider/zhihu_user_info_spider/parser/Parser.py | takhello/spider_collection | 05d2a517f52527cebbbf82de3072673f06c90d81 | [
"MIT"
] | null | null | null | from zhihu_user_info_spider.entities.UserEntity import UserEntityList
import parsel
import re
from zhihu_user_info_spider.Exception import SpiderException
user_entity = UserEntityList()
class Parser(object):
'''该方法后续加入的is_add属性和database属性主要是为了迎合接口
is_add 主要是用来区分是否要加入到csv中的,默认为True,
database 主要是用来解析从数据库中读... | 43.614583 | 111 | 0.62097 |
4e2eb8172e6bd87037ea5907a8a4c4b6e711db84 | 8,091 | py | Python | legal-api/src/legal_api/core/meta/filing.py | vysakh-menon-aot/lear | 7bae45efa2f9f89a7e826567c85de55fde68e09e | [
"Apache-2.0"
] | null | null | null | legal-api/src/legal_api/core/meta/filing.py | vysakh-menon-aot/lear | 7bae45efa2f9f89a7e826567c85de55fde68e09e | [
"Apache-2.0"
] | null | null | null | legal-api/src/legal_api/core/meta/filing.py | vysakh-menon-aot/lear | 7bae45efa2f9f89a7e826567c85de55fde68e09e | [
"Apache-2.0"
] | null | null | null | # Copyright © 2021 Province of British Columbia
#
# 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 agr... | 32.757085 | 120 | 0.5736 |
8902c847354456e87db15d82d6e24a5f7a8b5c32 | 285 | py | Python | Python/16 - 077 - contando vogais em tupla.py | matheusguerreiro/python | f39a1b92409f11cbe7fef5d9261f863f9e0fac0d | [
"MIT"
] | null | null | null | Python/16 - 077 - contando vogais em tupla.py | matheusguerreiro/python | f39a1b92409f11cbe7fef5d9261f863f9e0fac0d | [
"MIT"
] | null | null | null | Python/16 - 077 - contando vogais em tupla.py | matheusguerreiro/python | f39a1b92409f11cbe7fef5d9261f863f9e0fac0d | [
"MIT"
] | null | null | null | # Aula 16 (Tuplas)
palavras = ('Computador', 'Windows', 'Linux', 'Acer', 'Dell', 'Monitor', 'Smartphone')
print(palavras)
for c in range(0, len(palavras)):
print(f'\n{palavras[c]}', end=': ')
for l in palavras[c]:
if l in 'aeiouAEIOU':
print(l, end=' ')
| 23.75 | 86 | 0.564912 |
099f32e801648b1dd676ff3a1fcf57ecbee704e4 | 5,533 | py | Python | http/url.py | JNRowe-retired/http | 8961180cbff000965e723ce8f800198c45488334 | [
"MIT"
] | 4 | 2019-07-10T10:12:14.000Z | 2021-09-16T13:03:41.000Z | http/url.py | JNRowe-retired/http | 8961180cbff000965e723ce8f800198c45488334 | [
"MIT"
] | 5 | 2019-07-10T09:56:45.000Z | 2021-07-16T09:35:36.000Z | http/url.py | JNRowe-retired/http | 8961180cbff000965e723ce8f800198c45488334 | [
"MIT"
] | 1 | 2021-07-13T10:15:16.000Z | 2021-07-13T10:15:16.000Z | from urlparse import urlunparse as urlimplode, urlparse as urlexplode
from urlparse import parse_qsl as queryexplode, urljoin
from urllib import urlencode as queryimplode, quote
import re
"""
:copyright: (c) 2012 by Damien 'bl0b' Leroux
:license: MIT
"""
__author__ = "Damien 'bl0b' Leroux <damien.leroux@gmail.com>"... | 30.910615 | 77 | 0.548346 |
66d112866a6518d0a2493bbf4ea2e8f417a37620 | 769 | py | Python | flask_rebar/authenticators/base.py | sanketsaurav/flask-rebar | a58488e2ed8a9ab94c7c5bf9825ae28e547385bf | [
"MIT"
] | null | null | null | flask_rebar/authenticators/base.py | sanketsaurav/flask-rebar | a58488e2ed8a9ab94c7c5bf9825ae28e547385bf | [
"MIT"
] | null | null | null | flask_rebar/authenticators/base.py | sanketsaurav/flask-rebar | a58488e2ed8a9ab94c7c5bf9825ae28e547385bf | [
"MIT"
] | null | null | null | """
Base Authenticator
~~~~~~~~~~~~~~~~~~
Base class for authenticators.
:copyright: Copyright 2018 PlanGrid, Inc., see AUTHORS.
:license: MIT, see LICENSE for details.
"""
class Authenticator(object):
"""
Abstract authenticator class. Custom authentication methods should
extend this... | 25.633333 | 80 | 0.656697 |
a460a76413a4d661a5da8fb7491ba488cf36b8cb | 20,285 | py | Python | src/graph/trans_sys.py | MuvvalaKaran/Adam-Can-Play-Any-Strategy | ea8d3ae87bc73e1285833f599797c90321026f5e | [
"MIT"
] | null | null | null | src/graph/trans_sys.py | MuvvalaKaran/Adam-Can-Play-Any-Strategy | ea8d3ae87bc73e1285833f599797c90321026f5e | [
"MIT"
] | null | null | null | src/graph/trans_sys.py | MuvvalaKaran/Adam-Can-Play-Any-Strategy | ea8d3ae87bc73e1285833f599797c90321026f5e | [
"MIT"
] | null | null | null | import warnings
import queue
import math
import networkx as nx
from graphviz import Digraph
# local packages
from .two_player_graph import TwoPlayerGraph
from ..factory.builder import Builder
class FiniteTransSys(TwoPlayerGraph):
def __init__(self, graph_name: str, config_yaml: str, save_flag: bool = False,
... | 41.99793 | 123 | 0.529505 |
f0323e013b2598192d2c60b9bb9b6d51436bfe26 | 3,485 | py | Python | phm_robot_task_completion/test/test_phm_robot_task_completion_node.py | inomuh/phm_tools | 849de95081c5a3e9709697dfa1a9c9bea6c0ef99 | [
"Apache-2.0"
] | 12 | 2019-09-20T16:45:07.000Z | 2022-03-16T00:21:59.000Z | phm_robot_task_completion/test/test_phm_robot_task_completion_node.py | inomuh/phm_tools | 849de95081c5a3e9709697dfa1a9c9bea6c0ef99 | [
"Apache-2.0"
] | null | null | null | phm_robot_task_completion/test/test_phm_robot_task_completion_node.py | inomuh/phm_tools | 849de95081c5a3e9709697dfa1a9c9bea6c0ef99 | [
"Apache-2.0"
] | 6 | 2019-12-05T12:17:16.000Z | 2022-02-17T07:07:18.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import math
import rosunit
from phm_robot_task_completion.phm_robot_task_completion_node import RobotTaskCompletionNode
from phm_msgs.msg import Potc
PKG = 'phm_robot_task_completion'
NAME = 'test_phm_robot_task_completion_node'
class TestRobotTaskComple... | 47.094595 | 243 | 0.755524 |
62b97dff5d8079e036aea8fa8b0be1872e349b28 | 2,065 | py | Python | cms/core/templatetags/frontend_tags.py | dragon-dxw/nhs-ei.website | 6b513040f2cbf5c4359dc0f9431712d74bc6aa02 | [
"MIT"
] | null | null | null | cms/core/templatetags/frontend_tags.py | dragon-dxw/nhs-ei.website | 6b513040f2cbf5c4359dc0f9431712d74bc6aa02 | [
"MIT"
] | 35 | 2021-06-25T10:22:48.000Z | 2022-03-30T11:26:22.000Z | cms/core/templatetags/frontend_tags.py | dxw/nhs-ei.website | 6b513040f2cbf5c4359dc0f9431712d74bc6aa02 | [
"MIT"
] | null | null | null | from django import template
from wagtail.core.models import Page, PageRevision
from cms.core.models import UpperFooterLinks, LowerFooterLinks
from django.contrib.contenttypes.models import ContentType
register = template.Library()
@register.inclusion_tag("tags/breadcrumb.html", takes_context=True)
def breadcrumb(con... | 30.820896 | 78 | 0.668281 |
ad52c9a9d1e53a09c907da1ec4b6a6f40c2682bd | 3,801 | py | Python | S4/S4 Library/simulation/cas/cas_enums.py | NeonOcean/Environment | ca658cf66e8fd6866c22a4a0136d415705b36d26 | [
"CC-BY-4.0"
] | 1 | 2021-05-20T19:33:37.000Z | 2021-05-20T19:33:37.000Z | S4/S4 Library/simulation/cas/cas_enums.py | NeonOcean/Environment | ca658cf66e8fd6866c22a4a0136d415705b36d26 | [
"CC-BY-4.0"
] | null | null | null | S4/S4 Library/simulation/cas/cas_enums.py | NeonOcean/Environment | ca658cf66e8fd6866c22a4a0136d415705b36d26 | [
"CC-BY-4.0"
] | null | null | null | import enum
class CASPaintPose(enum.Int):
NONE = 0
SIT = 1
BACK = 2
SIT_UP = 3
STAND = 4
class CASMode(enum.Int):
BODY = 0
FACE = 1
FACE_DETAIL = 2
NOACTION = 3
class RandomizationMode(enum.Int):
SELECTIVE_RANDOMIZATION = 1
MENU_RANDOMIZATION = 2
CAREER_OUTFIT_RANDOMIZ... | 20.884615 | 41 | 0.556959 |
dad07fa823b276f46be491b369cb6881a892115d | 6,141 | py | Python | sdk/python/pulumi_azure_native/web/v20160801/list_web_app_backup_configuration.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/web/v20160801/list_web_app_backup_configuration.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/web/v20160801/list_web_app_backup_configuration.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 35.912281 | 173 | 0.651197 |
109d71b7aaabbe8679f1e6d92adf710150e262ea | 3,222 | py | Python | dm_control/suite/cheetah.py | rdaems/dm_control | c682e626fde95a98b53f67f07b0c1021e4200bb8 | [
"Apache-2.0"
] | 1 | 2022-03-22T11:53:38.000Z | 2022-03-22T11:53:38.000Z | dm_control/suite/cheetah.py | robot0102/dm_control | 3e1736d7e641ab751eb25bfa7622fea71c8da9c6 | [
"Apache-2.0"
] | null | null | null | dm_control/suite/cheetah.py | robot0102/dm_control | 3e1736d7e641ab751eb25bfa7622fea71c8da9c6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The dm_control Authors.
#
# 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 i... | 34.645161 | 78 | 0.693979 |
fc65d14db388fed57bdd7bd0abcf09a0ea124cad | 8,974 | py | Python | algos.py | sameerkumar94/Movie-Recommendation-System | d22e0e8e19a9df7e9fd560bfa67255324fd25d06 | [
"BSD-4-Clause-UC"
] | null | null | null | algos.py | sameerkumar94/Movie-Recommendation-System | d22e0e8e19a9df7e9fd560bfa67255324fd25d06 | [
"BSD-4-Clause-UC"
] | null | null | null | algos.py | sameerkumar94/Movie-Recommendation-System | d22e0e8e19a9df7e9fd560bfa67255324fd25d06 | [
"BSD-4-Clause-UC"
] | null | null | null | import operator
from data import load, load_movielens
import numpy as np
# load the biparte graph: np matrix
user_movie_matrix = load()
def greedy():
"""
This uses greedy approach for the recommendation
It traverses the graph based on the greedy approach : pick highest rating while travers... | 26.62908 | 151 | 0.589592 |
a1fd1ce42fb1d4d000579449981172c470f7b3b5 | 4,348 | py | Python | tests/components/fritz/__init__.py | andersop91/core | 0e0ef0aa17073609eae7c974cf4c73306b7c414b | [
"Apache-2.0"
] | 22,481 | 2020-03-02T13:09:59.000Z | 2022-03-31T23:34:28.000Z | tests/components/fritz/__init__.py | andersop91/core | 0e0ef0aa17073609eae7c974cf4c73306b7c414b | [
"Apache-2.0"
] | 31,101 | 2020-03-02T13:00:16.000Z | 2022-03-31T23:57:36.000Z | tests/components/fritz/__init__.py | Vaarlion/core | f3de8b9f28de01abf72c0f5bb0b457eb1841f201 | [
"Apache-2.0"
] | 11,411 | 2020-03-02T14:19:20.000Z | 2022-03-31T22:46:07.000Z | """Tests for the AVM Fritz!Box integration."""
from unittest import mock
from homeassistant.components.fritz.const import DOMAIN
from homeassistant.const import (
CONF_DEVICES,
CONF_HOST,
CONF_PASSWORD,
CONF_PORT,
CONF_USERNAME,
)
MOCK_CONFIG = {
DOMAIN: {
CONF_DEVICES: [
{... | 33.96875 | 85 | 0.538638 |
967dff7666d3d1093c53af046a2bfaacf64e93d6 | 3,562 | py | Python | bsd2/vagrant-ansible/ansible/plugins/inventory/openshift.py | dlab-berkeley/collaboratool-archive | fa474e05737f78e628d6b9398c58cf7c966a7bba | [
"Apache-2.0"
] | 1 | 2016-01-20T14:36:02.000Z | 2016-01-20T14:36:02.000Z | bsd2/vagrant-ansible/ansible/plugins/inventory/openshift.py | dlab-berkeley/collaboratool-archive | fa474e05737f78e628d6b9398c58cf7c966a7bba | [
"Apache-2.0"
] | null | null | null | bsd2/vagrant-ansible/ansible/plugins/inventory/openshift.py | dlab-berkeley/collaboratool-archive | fa474e05737f78e628d6b9398c58cf7c966a7bba | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# (c) 2013, Michael Scherer <misc@zarb.org>
#
# This file is part of Ansible,
#
# Ansible 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 3 of the License, or
# (at your o... | 30.444444 | 95 | 0.703257 |
b20ff94265333dd074308d3f32c149d264b0d70e | 180 | py | Python | part22/blog/urls.py | yllew36/WellyGI | 7d53fac4c81bb994f61b22761e5ac7e48994ade4 | [
"Apache-2.0"
] | 1 | 2019-11-15T08:02:45.000Z | 2019-11-15T08:02:45.000Z | part22/blog/urls.py | yllew36/WellyGI | 7d53fac4c81bb994f61b22761e5ac7e48994ade4 | [
"Apache-2.0"
] | null | null | null | part22/blog/urls.py | yllew36/WellyGI | 7d53fac4c81bb994f61b22761e5ac7e48994ade4 | [
"Apache-2.0"
] | null | null | null | from django.urls import path
from . import views
urlpatterns =[
path('',views.index),
path('jurnal/',views.jurnal),
path('berita/',views.berita),
path('gosip/',views.gosip),
] | 20 | 30 | 0.694444 |
a14c67b49bc95f32df18d27afbc27236948820fc | 5,687 | py | Python | seisflows/tools/legacy/segy/headers.py | zhengjing8628/Seisflows_SRVM | af2734404757d907b88e5b58e8175bcf2b1967e6 | [
"BSD-2-Clause"
] | 2 | 2021-05-12T03:28:31.000Z | 2021-12-08T14:43:20.000Z | seisflows/tools/legacy/segy/headers.py | zhengjing8628/Seisflows_SRVM | af2734404757d907b88e5b58e8175bcf2b1967e6 | [
"BSD-2-Clause"
] | null | null | null | seisflows/tools/legacy/segy/headers.py | zhengjing8628/Seisflows_SRVM | af2734404757d907b88e5b58e8175bcf2b1967e6 | [
"BSD-2-Clause"
] | 1 | 2020-04-16T08:38:49.000Z | 2020-04-16T08:38:49.000Z |
SEGY_TAPE_LABEL = [
['uchar', 4, 0, 'StorageUnitSeqNumber'],
['uchar', 5, 4, 'SEGYRevision'],
['uchar', 6, 9, 'StorageUnitStructure'],
['uchar', 4, 15, 'BindingEdition'],
['uchar', 10, 19, 'MaxBlockSize'],
['uchar', 10, 29, 'ProducerOrganizationCode'],
['uchar', 11, 39, 'CreationDate'],
... | 41.210145 | 69 | 0.582205 |
2c8d3a3f1b4209a6973fa9b52c88d4eb6c3ebc49 | 2,664 | py | Python | sss/kcenter_sss.py | gongzhimin/ActiveThief-attack-MLaaS | 542ac43a94ec8b96b4dffc101f561e85ce564865 | [
"MIT"
] | 2 | 2022-03-07T13:45:43.000Z | 2022-03-07T13:45:52.000Z | sss/kcenter_sss.py | gongzhimin/ActiveThief-attack-MLaaS | 542ac43a94ec8b96b4dffc101f561e85ce564865 | [
"MIT"
] | null | null | null | sss/kcenter_sss.py | gongzhimin/ActiveThief-attack-MLaaS | 542ac43a94ec8b96b4dffc101f561e85ce564865 | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2019 Soham Pal, Yash Gupta, Aditya Shukla, Aditya Kanade,
Shirish Shevade, Vinod Ganapathy. Indian Institute of Science.
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 Softw... | 36 | 122 | 0.645646 |
d6e49c38e5c0a167b6621c6f6cc72cb78c2206eb | 10,986 | py | Python | ion/agents/platform/rsn/simulator/oms_simulator.py | ooici/coi-services | 43246f46a82e597345507afd7dfc7373cb346afa | [
"BSD-2-Clause"
] | 3 | 2016-09-20T09:50:06.000Z | 2018-08-10T01:41:38.000Z | ion/agents/platform/rsn/simulator/oms_simulator.py | ooici/coi-services | 43246f46a82e597345507afd7dfc7373cb346afa | [
"BSD-2-Clause"
] | null | null | null | ion/agents/platform/rsn/simulator/oms_simulator.py | ooici/coi-services | 43246f46a82e597345507afd7dfc7373cb346afa | [
"BSD-2-Clause"
] | 2 | 2016-03-16T22:25:49.000Z | 2016-11-26T14:54:21.000Z | #!/usr/bin/env python
"""
@package ion.agents.platform.rsn.simulator.oms_simulator
@file ion/agents/platform/rsn/simulator/oms_simulator.py
@author Carlos Rueda
@brief OMS simulator
"""
__author__ = 'Carlos Rueda'
import time
import ntplib
from ion.agents.platform.responses import NormalResponse, InvalidRes... | 35.43871 | 95 | 0.650737 |
83b6fcb0b35894378534e93b9f7aa30984f97f0f | 803 | py | Python | Code/Python/PenTesting/labDecrypt.py | dks1018/CoffeeShopCoding | 13ac1700673c86c601eb2758570920620a956e4c | [
"ADSL"
] | null | null | null | Code/Python/PenTesting/labDecrypt.py | dks1018/CoffeeShopCoding | 13ac1700673c86c601eb2758570920620a956e4c | [
"ADSL"
] | null | null | null | Code/Python/PenTesting/labDecrypt.py | dks1018/CoffeeShopCoding | 13ac1700673c86c601eb2758570920620a956e4c | [
"ADSL"
] | null | null | null | import sys
import r2pipe
r2 = r2pipe.open("./lab4")
r2.cmd("e dbg.profile=lab4.rr2")
r2.cmd("doo") # reopen in debug mode
r2.cmd("aaaa")
r2.cmd("db (frist break number)") # sets the break point
r2.cmd("dc") # Continue
def step():
r2.cmd("ds") # single step
r2.cmd("sr rip") # seek to the current RIP the ... | 25.903226 | 64 | 0.519303 |
0511744ab000708e51fff53432bf1678f7635551 | 114 | py | Python | pash/__init__.py | iansmcf/pash | 273786a0e830bd582294419c5a93211552e692ba | [
"BSD-3-Clause"
] | null | null | null | pash/__init__.py | iansmcf/pash | 273786a0e830bd582294419c5a93211552e692ba | [
"BSD-3-Clause"
] | null | null | null | pash/__init__.py | iansmcf/pash | 273786a0e830bd582294419c5a93211552e692ba | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
__author__ = 'Ian McFarlane'
__email__ = 'iansmcfarlane@gmail.com'
__version__ = '1.0.0'
| 19 | 37 | 0.666667 |
64f62485e123e929c9ad50d75ae376d20ab59142 | 115 | py | Python | src/errors.py | AndrewLaganaro/specter-diy | 5d986c281d0a8e494f47ad4265a54dd9e6912d8e | [
"MIT"
] | null | null | null | src/errors.py | AndrewLaganaro/specter-diy | 5d986c281d0a8e494f47ad4265a54dd9e6912d8e | [
"MIT"
] | null | null | null | src/errors.py | AndrewLaganaro/specter-diy | 5d986c281d0a8e494f47ad4265a54dd9e6912d8e | [
"MIT"
] | 1 | 2021-01-14T09:45:18.000Z | 2021-01-14T09:45:18.000Z | class BaseError(Exception):
"""
All generic custom errors inherit from this one
"""
NAME = "Error"
| 19.166667 | 51 | 0.626087 |
56fd3b779406d90528d8d8469fe38821af1b5d2e | 3,361 | py | Python | test/likelihoods/test_gaussian_likelihood.py | lrast/gpytorch | 2e0bbc9f59e4b4b54780c3e55db784c3d2c9a5bf | [
"MIT"
] | 2 | 2021-10-30T03:50:28.000Z | 2022-02-22T22:01:14.000Z | test/likelihoods/test_gaussian_likelihood.py | lrast/gpytorch | 2e0bbc9f59e4b4b54780c3e55db784c3d2c9a5bf | [
"MIT"
] | null | null | null | test/likelihoods/test_gaussian_likelihood.py | lrast/gpytorch | 2e0bbc9f59e4b4b54780c3e55db784c3d2c9a5bf | [
"MIT"
] | 3 | 2020-09-18T18:58:12.000Z | 2021-05-27T15:39:00.000Z | #!/usr/bin/env python3
import unittest
import torch
from gpytorch.distributions import MultivariateNormal
from gpytorch.lazy import DiagLazyTensor
from gpytorch.likelihoods import FixedNoiseGaussianLikelihood, GaussianLikelihood
from gpytorch.likelihoods.noise_models import FixedGaussianNoise
from gpytorch.test.base... | 33.277228 | 92 | 0.687891 |
1ce3a2c7ca9c5e30def2053ba1d36a05bdc96a3b | 2,007 | py | Python | dbt_gen/warehouse.py | norton120/dbt_gen | 712fc8698a77c3372f5a403a5ae50711d0cb3c7d | [
"MIT"
] | null | null | null | dbt_gen/warehouse.py | norton120/dbt_gen | 712fc8698a77c3372f5a403a5ae50711d0cb3c7d | [
"MIT"
] | null | null | null | dbt_gen/warehouse.py | norton120/dbt_gen | 712fc8698a77c3372f5a403a5ae50711d0cb3c7d | [
"MIT"
] | null | null | null | from global_logger import GLOBAL_LOGGER
import sys
class Warehouse:
logger = GLOBAL_LOGGER
platform = ''
def __init__(self,creds):
# platform is the warehouse type from config.
self.creds = creds
if self.creds['type'] == 'snowflake':
import snowflake.connector as... | 37.166667 | 181 | 0.530144 |
4bef842a096dd00f9e85c086169ec61928944093 | 25,038 | py | Python | discord/webhook.py | data-navigator/discord.py | c30a366106f9d6114dcf38a31aed58dec6747054 | [
"MIT"
] | 1 | 2021-05-19T19:53:43.000Z | 2021-05-19T19:53:43.000Z | discord/webhook.py | data-navigator/discord.py | c30a366106f9d6114dcf38a31aed58dec6747054 | [
"MIT"
] | null | null | null | discord/webhook.py | data-navigator/discord.py | c30a366106f9d6114dcf38a31aed58dec6747054 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
The MIT License (MIT)
Copyright (c) 2015-2019 Rapptz
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 u... | 34.440165 | 115 | 0.59238 |
ebb0520f046c9ce2bd91d15ca07eec82e751e45d | 3,860 | py | Python | bin/main.py | commandarmy/discord-event-manager | 709dd307b046158ddf9e49a559852d486168a94f | [
"Apache-2.0"
] | 4 | 2019-11-20T22:52:00.000Z | 2021-04-29T17:26:09.000Z | bin/main.py | commandarmy/discord-event-manager | 709dd307b046158ddf9e49a559852d486168a94f | [
"Apache-2.0"
] | 14 | 2020-02-10T17:16:22.000Z | 2022-03-02T12:55:33.000Z | bin/main.py | commandarmy/discord-event-manager | 709dd307b046158ddf9e49a559852d486168a94f | [
"Apache-2.0"
] | 3 | 2021-06-26T17:34:16.000Z | 2021-11-03T06:36:32.000Z | #!/usr/bin/env python3
"""Flask web runtime script."""
from __future__ import annotations
__LICENSE__ = """
Copyright 2019 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://w... | 29.692308 | 73 | 0.659326 |
7557082b13b4073e905c8ee0cd9dd0fbcb2af29a | 7,520 | py | Python | heat/engine/api.py | citrix-openstack-build/heat | fa31873529481472e037e3ce157b87f8057fe622 | [
"Apache-2.0"
] | null | null | null | heat/engine/api.py | citrix-openstack-build/heat | fa31873529481472e037e3ce157b87f8057fe622 | [
"Apache-2.0"
] | null | null | null | heat/engine/api.py | citrix-openstack-build/heat | fa31873529481472e037e3ce157b87f8057fe622 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# 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... | 38.172589 | 79 | 0.686436 |
1109779ffd9647869dd16611828cee03c3d71013 | 2,051 | py | Python | src/components/MaskOrientGenerator/faceSegmentation.py | jinwoo1225/HAiR | 944d0254329a31b0132d19f903d40d86c8c0071a | [
"Apache-2.0"
] | 2 | 2021-03-29T06:32:47.000Z | 2021-05-03T03:29:16.000Z | src/components/MaskOrientGenerator/faceSegmentation.py | jinwoo1225/HAiR | 944d0254329a31b0132d19f903d40d86c8c0071a | [
"Apache-2.0"
] | 28 | 2021-05-04T02:27:52.000Z | 2022-02-12T13:37:11.000Z | src/components/MaskOrientGenerator/faceSegmentation.py | jinwoo1225/HAiR | 944d0254329a31b0132d19f903d40d86c8c0071a | [
"Apache-2.0"
] | 3 | 2021-07-05T01:38:05.000Z | 2022-01-09T14:38:31.000Z | import cv2
import numpy as np
from PIL import Image
import torch
from torchvision import transforms
import os
from models.MobileNetV2_unet import MobileNetV2_unet
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
face_seg_model_path = BASE_DIR + '/../../../models/checkpoints/model.pt'
def write_to_txt(mask_arr:... | 30.61194 | 92 | 0.629937 |
ace67be360cfcd671da9b4328bc91830abfba6a9 | 22,576 | py | Python | kivymd/uix/card.py | shashi278/KivyMD | d920196358e17f6d4bd74ce6e19f6ecb462e4290 | [
"MIT"
] | null | null | null | kivymd/uix/card.py | shashi278/KivyMD | d920196358e17f6d4bd74ce6e19f6ecb462e4290 | [
"MIT"
] | null | null | null | kivymd/uix/card.py | shashi278/KivyMD | d920196358e17f6d4bd74ce6e19f6ecb462e4290 | [
"MIT"
] | null | null | null | """
Components/Card
===============
.. seealso::
`Material Design spec, Cards <https://material.io/components/cards>`_
.. rubric:: Cards contain content and actions about a single subject.
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/cards.gif
:align: center
`KivyMD` pr... | 25.567384 | 111 | 0.583097 |
2870f01c76895160f294a089767958ff3b0792d3 | 1,208 | py | Python | src/roles/nfts.py | re-nft/animetas-discord-bot | 29f223729aa6fd01663c6a808a1b4e247c8e9df5 | [
"MIT"
] | null | null | null | src/roles/nfts.py | re-nft/animetas-discord-bot | 29f223729aa6fd01663c6a808a1b4e247c8e9df5 | [
"MIT"
] | 2 | 2021-09-15T15:35:11.000Z | 2021-09-22T15:11:36.000Z | src/roles/nfts.py | re-nft/animetas-discord-bot | 29f223729aa6fd01663c6a808a1b4e247c8e9df5 | [
"MIT"
] | null | null | null | import dotenv
import os
import requests
from web3 import Web3
from utils.utils import get_all_nft_addresses
from env import get_env_file
def verify_wallet_has_token(wallet_address: str, token_address: str) -> bool:
dotenv.load_dotenv(get_env_file())
project_id = os.environ.get("INFURA_PROJECT_ID", "")
me... | 28.761905 | 77 | 0.67798 |
a7c841dc7ddafc2fc057ec77cc474213cd0e8a06 | 1,432 | py | Python | venv/lib/python3.6/site-packages/scripts/__init__.py | coolkapil/flask-Api | 53b42dcba298bd94c07dbe18f0f8cb7f5710d3bc | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/scripts/__init__.py | coolkapil/flask-Api | 53b42dcba298bd94c07dbe18f0f8cb7f5710d3bc | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/scripts/__init__.py | coolkapil/flask-Api | 53b42dcba298bd94c07dbe18f0f8cb7f5710d3bc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 1999-2015, Raffaele Salmaso <raffaele@salmaso.org>
#
# 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... | 46.193548 | 82 | 0.773743 |
2375ee4f550616ff60d20b87b5773704d8fbbe1e | 4,320 | py | Python | tensorflow/contrib/framework/python/ops/accumulate_n_v2.py | harunpehlivan/tensorflow | 376e2cfdab31f4da251ea2e50992a9bf97fd171b | [
"Apache-2.0"
] | 24 | 2018-02-01T15:49:22.000Z | 2021-01-11T16:31:18.000Z | tensorflow/contrib/framework/python/ops/accumulate_n_v2.py | hamzabekkouri/tensorflow | d87a9fbbc5f49ec5ae8eb52c62628f0b1a0bf67f | [
"Apache-2.0"
] | 3 | 2018-05-09T11:31:58.000Z | 2021-01-27T12:26:21.000Z | tensorflow/contrib/framework/python/ops/accumulate_n_v2.py | hamzabekkouri/tensorflow | d87a9fbbc5f49ec5ae8eb52c62628f0b1a0bf67f | [
"Apache-2.0"
] | 13 | 2018-02-22T21:04:13.000Z | 2020-11-17T11:38:36.000Z | # 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... | 38.571429 | 80 | 0.686574 |
40f924e9361bb79346116b340d44e52b15b8743f | 923 | py | Python | __main__.py | christopher-wolff/News-Analysis | f249ed4654cc3fcebd69f99b4ba577f5afe42a91 | [
"MIT"
] | null | null | null | __main__.py | christopher-wolff/News-Analysis | f249ed4654cc3fcebd69f99b4ba577f5afe42a91 | [
"MIT"
] | null | null | null | __main__.py | christopher-wolff/News-Analysis | f249ed4654cc3fcebd69f99b4ba577f5afe42a91 | [
"MIT"
] | 1 | 2017-11-27T03:55:55.000Z | 2017-11-27T03:55:55.000Z | """Sample use of analyzer module."""
from analyzer import query
from analyzer import scrape_stories
from analyzer import label_articles
from analyzer import train_model
from analyzer import analyze
from analyzer import visualize
if __name__ == '__main__':
print('Requesting articles from NYT API')
print('=====... | 23.666667 | 57 | 0.566631 |
7d8da92be4161ef272c88f041da7f55d9020d7cc | 1,176 | py | Python | train/run_training.py | aws-samples/amazon-mlops-example-tensorflow | 5e35727f486426029c7e3c8ccd64d5292f2a6bd8 | [
"MIT-0"
] | 2 | 2021-08-30T15:53:39.000Z | 2021-08-31T09:38:02.000Z | train/run_training.py | aws-samples/amazon-mlops-example-tensorflow | 5e35727f486426029c7e3c8ccd64d5292f2a6bd8 | [
"MIT-0"
] | null | null | null | train/run_training.py | aws-samples/amazon-mlops-example-tensorflow | 5e35727f486426029c7e3c8ccd64d5292f2a6bd8 | [
"MIT-0"
] | null | null | null |
from sagemaker.tensorflow import TensorFlow
import os
import numpy as np
# set environment
src_bucket = os.getenv("BUCKET_NAME")
print(src_bucket)
sm_role = os.getenv("SAGEMAKER_IAM_ROLE")
artifact_path = f's3://{src_bucket}/toxic_comments'
instance = os.getenv("INSTANCE")
# create an estimator object
estimator = Te... | 29.4 | 100 | 0.731293 |
9634a24f33400627a5a6d8417dc923da1d5ab07f | 2,299 | py | Python | docker/models/resource.py | glensc/python-docker-py | c66c7f8b0a8ca216e21c9fe1903eb79f4406a93e | [
"Apache-2.0"
] | 2 | 2016-06-28T03:59:36.000Z | 2017-03-16T22:31:29.000Z | docker/models/resource.py | glensc/python-docker-py | c66c7f8b0a8ca216e21c9fe1903eb79f4406a93e | [
"Apache-2.0"
] | null | null | null | docker/models/resource.py | glensc/python-docker-py | c66c7f8b0a8ca216e21c9fe1903eb79f4406a93e | [
"Apache-2.0"
] | null | null | null |
class Model(object):
"""
A base class for representing a single object on the server.
"""
id_attribute = 'Id'
def __init__(self, attrs=None, client=None, collection=None):
#: A client pointing at the server that this object is on.
self.client = client
#: The collection tha... | 27.047059 | 79 | 0.587647 |
4160e732809ff1cbeaf04aff75e35300853a91bb | 1,664 | py | Python | udacity-program_self_driving_car_engineer_v1.0/part01-computer vision and deep learning/module03-deep learning/lesson02-miniflow/exercise08-stochastic gradient descent/nn1.py | linksdl/futuretec-project-self_driving_cars_projects | 38e8f14543132ec86a8bada8d708eefaef23fee8 | [
"MIT"
] | null | null | null | udacity-program_self_driving_car_engineer_v1.0/part01-computer vision and deep learning/module03-deep learning/lesson02-miniflow/exercise08-stochastic gradient descent/nn1.py | linksdl/futuretec-project-self_driving_cars_projects | 38e8f14543132ec86a8bada8d708eefaef23fee8 | [
"MIT"
] | null | null | null | udacity-program_self_driving_car_engineer_v1.0/part01-computer vision and deep learning/module03-deep learning/lesson02-miniflow/exercise08-stochastic gradient descent/nn1.py | linksdl/futuretec-project-self_driving_cars_projects | 38e8f14543132ec86a8bada8d708eefaef23fee8 | [
"MIT"
] | null | null | null | """
# !/usr/bin/env python
# -*- coding: utf-8 -*-
@Time : 2022/3/26 17:16
@File : nn1.py
"""
"""
Have fun with the number of epochs!
Be warned that if you increase them too much,
the VM will time out :)
"""
import numpy as np
from sklearn.datasets import load_boston
from sklearn.utils import shuffle, ... | 19.348837 | 70 | 0.618389 |
3bd7f225c64ff2bc210c8ef4433fc43831df7e6a | 2,193 | py | Python | meraki/aio/api/malware_settings.py | NoFliesOnYou/dashboard-api-python | 3185d0e8a9a38eba9127ac640dcbb02444e7adf2 | [
"MIT"
] | null | null | null | meraki/aio/api/malware_settings.py | NoFliesOnYou/dashboard-api-python | 3185d0e8a9a38eba9127ac640dcbb02444e7adf2 | [
"MIT"
] | 3 | 2020-11-08T08:50:59.000Z | 2021-12-13T20:47:15.000Z | flask/meraki/aio/api/malware_settings.py | cyberdevnet/mer-hacker | a7dddd03c5b02a2f8c84d711b69868d2b94f1f99 | [
"MIT"
] | null | null | null | class AsyncMalwareSettings:
def __init__(self, session):
super().__init__()
self._session = session
async def getNetworkSecurityMalwareSettings(self, networkId: str):
"""
**Returns all supported malware settings for an MX network**
https://developer.cisco.com/meraki/... | 43.86 | 236 | 0.648883 |
f4a2fcfe754676982ae5eee1f6659028c2c7f23d | 12,043 | py | Python | src/snps/io/writer.py | arvkevi/snps | b3ebe4c5985c881314495d8040c28faafd9bb6d9 | [
"BSD-3-Clause"
] | null | null | null | src/snps/io/writer.py | arvkevi/snps | b3ebe4c5985c881314495d8040c28faafd9bb6d9 | [
"BSD-3-Clause"
] | null | null | null | src/snps/io/writer.py | arvkevi/snps | b3ebe4c5985c881314495d8040c28faafd9bb6d9 | [
"BSD-3-Clause"
] | null | null | null | """ Class for writing SNPs.
"""
"""
BSD 3-Clause License
Copyright (c) 2019, Andrew Riha
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyri... | 30.643766 | 137 | 0.530184 |
f879a29b16cc6a23ce93d78d951ea32b8cda73a4 | 2,088 | py | Python | examples/exp_configs/non_rl/ring_with_control.py | georgegunter/flow | 15848ec9bafd250364a51fa162786037645b19bf | [
"MIT"
] | null | null | null | examples/exp_configs/non_rl/ring_with_control.py | georgegunter/flow | 15848ec9bafd250364a51fa162786037645b19bf | [
"MIT"
] | null | null | null | examples/exp_configs/non_rl/ring_with_control.py | georgegunter/flow | 15848ec9bafd250364a51fa162786037645b19bf | [
"MIT"
] | null | null | null | """Used as an example of ring experiment.
This example consists of 22 IDM cars on a ring creating shockwaves.
"""
from flow.controllers import FollowerStopper, IDMController, ContinuousRouter
from flow.core.params import SumoParams, EnvParams, InitialConfig, NetParams
from flow.core.params import VehicleParams
from f... | 28.216216 | 77 | 0.694923 |
b50019d44e11f4296027cb01523b4b68844c9c25 | 7,141 | py | Python | api/tests/test_views.py | msb/sms-webapp | b663e850f2cad0c10ecc1d52a530c0de5da9cb6b | [
"MIT"
] | null | null | null | api/tests/test_views.py | msb/sms-webapp | b663e850f2cad0c10ecc1d52a530c0de5da9cb6b | [
"MIT"
] | null | null | null | api/tests/test_views.py | msb/sms-webapp | b663e850f2cad0c10ecc1d52a530c0de5da9cb6b | [
"MIT"
] | null | null | null | from unittest import mock
from django.contrib.auth import get_user_model
from django.test import TestCase
from rest_framework.test import APIRequestFactory, force_authenticate
from smsjwplatform.models import CachedResource
from .. import views
class ViewTestCase(TestCase):
def setUp(self):
self.factor... | 32.022422 | 98 | 0.589413 |
cf3d06ac9451b947d76323f281d664eb112b9df9 | 2,906 | py | Python | tutorial-contents/402_RNN_classification.py | deep1leaning/tensorflow | 7bc80fa9e1d29f670bf0e7b1201093dbea5fd7c1 | [
"MIT"
] | 4,612 | 2017-05-11T06:53:00.000Z | 2022-03-30T13:07:33.000Z | tutorial-contents/402_RNN_classification.py | vvejmin/Tensorflow-Tutorial | 7bc80fa9e1d29f670bf0e7b1201093dbea5fd7c1 | [
"MIT"
] | 25 | 2017-05-24T12:53:00.000Z | 2020-02-29T10:02:26.000Z | tutorial-contents/402_RNN_classification.py | vvejmin/Tensorflow-Tutorial | 7bc80fa9e1d29f670bf0e7b1201093dbea5fd7c1 | [
"MIT"
] | 2,213 | 2017-05-11T13:20:33.000Z | 2022-03-31T02:50:51.000Z | """
Know more, visit my Python tutorial page: https://morvanzhou.github.io/tutorials/
My Youtube Channel: https://www.youtube.com/user/MorvanZhou
Dependencies:
tensorflow: 1.1.0
matplotlib
numpy
"""
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
import numpy as np
import matplotlib.... | 39.808219 | 122 | 0.665175 |
251063a41b4c25b7adf4bde8c75ae8c1d10c99ef | 2,722 | py | Python | test.py | Lamply/SSD | f62fec376a6ce67b28944eaa915ae223bb934d5b | [
"MIT"
] | null | null | null | test.py | Lamply/SSD | f62fec376a6ce67b28944eaa915ae223bb934d5b | [
"MIT"
] | null | null | null | test.py | Lamply/SSD | f62fec376a6ce67b28944eaa915ae223bb934d5b | [
"MIT"
] | null | null | null | import argparse
import logging
import os
import torch
import torch.utils.data
from ssd.config import cfg
from ssd.engine.inference import do_evaluation
from ssd.modeling.detector import build_detection_model
from ssd.utils import dist_util
from ssd.utils.checkpoint import CheckPointer
from ssd.utils.dist_util import ... | 30.931818 | 124 | 0.693975 |
f927693039c01082a12cdd3db0003d67da2da044 | 18,368 | py | Python | mesonbuild/scripts/depfixer.py | TRUEPIC/meson | f8d35aa42073e2bd03020b0b5a119ee96fa073c2 | [
"Apache-2.0"
] | 44 | 2022-03-16T08:32:31.000Z | 2022-03-31T16:02:35.000Z | mesonbuild/scripts/depfixer.py | TRUEPIC/meson | f8d35aa42073e2bd03020b0b5a119ee96fa073c2 | [
"Apache-2.0"
] | 1 | 2022-03-29T02:30:28.000Z | 2022-03-30T03:40:46.000Z | mesonbuild/scripts/depfixer.py | TRUEPIC/meson | f8d35aa42073e2bd03020b0b5a119ee96fa073c2 | [
"Apache-2.0"
] | 18 | 2022-03-19T04:41:04.000Z | 2022-03-31T03:32:12.000Z | # Copyright 2013-2016 The Meson development team
# 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 agree... | 38.346555 | 115 | 0.585747 |
c7a3937ef27a6fcfa13ff17b7aeaae98d3088d56 | 1,473 | py | Python | torch_geometric/utils/undirected.py | DL-85/pytorch_geometric | eb12a94a667e881c4a6bff26b0453428bcb72393 | [
"MIT"
] | 13 | 2019-11-07T02:57:41.000Z | 2021-12-28T08:19:56.000Z | torch_geometric/utils/undirected.py | LiJFrank/pytorch_geometric | 70e575d69c77f6c234373257dcf02014a290bed8 | [
"MIT"
] | 3 | 2019-10-30T20:20:27.000Z | 2022-03-12T22:56:11.000Z | torch_geometric/utils/undirected.py | LiJFrank/pytorch_geometric | 70e575d69c77f6c234373257dcf02014a290bed8 | [
"MIT"
] | 3 | 2020-10-19T02:53:20.000Z | 2022-01-31T04:31:02.000Z | import torch
from torch_sparse import coalesce
from .num_nodes import maybe_num_nodes
def is_undirected(edge_index, num_nodes=None):
r"""Returns :obj:`True` if the graph given by :attr:`edge_index` is
undirected.
Args:
edge_index (LongTensor): The edge indices.
num_nodes (int, optional):... | 33.477273 | 78 | 0.666667 |
759c32e67359b387ae44cccbd4a165d4e1acd25f | 655 | py | Python | 1049.py | ErFer7/URI-Python | 94c36985852204e34806650e4ffec48d4d9e9ab1 | [
"MIT"
] | 1 | 2022-02-06T19:36:33.000Z | 2022-02-06T19:36:33.000Z | 1049.py | ErFer7/URI-Python | 94c36985852204e34806650e4ffec48d4d9e9ab1 | [
"MIT"
] | null | null | null | 1049.py | ErFer7/URI-Python | 94c36985852204e34806650e4ffec48d4d9e9ab1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
a = input()
if a == "vertebrado":
b = input()
if b == "ave":
c = input()
if c == "carnivoro":
print("aguia")
else:
print("pomba")
else:
d = input()
if d == "onivoro":
print("homem")
else:
... | 12.596154 | 32 | 0.374046 |
d8cf091b7aa8f90c63cf927c6d1febbe5299de04 | 4,038 | py | Python | tests/test_imp_export.py | d3d9/DINO2 | 524a6e4639c268ed1f8cb0ebba8436ad6ffaac23 | [
"0BSD"
] | 1 | 2020-12-11T16:43:50.000Z | 2020-12-11T16:43:50.000Z | tests/test_imp_export.py | d3d9/DINO2 | 524a6e4639c268ed1f8cb0ebba8436ad6ffaac23 | [
"0BSD"
] | 2 | 2021-06-20T11:10:57.000Z | 2021-07-26T20:50:44.000Z | tests/test_imp_export.py | d3d9/DINO2 | 524a6e4639c268ed1f8cb0ebba8436ad6ffaac23 | [
"0BSD"
] | null | null | null | import pytest
from datetime import date, timedelta
from enum import Enum
from filecmp import cmp, dircmp
import os
from shutil import rmtree
from sqlalchemy.exc import IntegrityError
from DINO2 import Database
from DINO2.model import Version
from DINO2.model.location import Stop
from DINO2.model.schedule import Trip
... | 31.061538 | 78 | 0.674839 |
e917e065e6bf08cbb18cf2aff5008487a6d0c4a0 | 3,094 | py | Python | _draft/coordtransform/coordtransform.py | OmarG247/autopew | df15e9529aa82ba6b7580573d51980a178f13a9a | [
"BSD-3-Clause"
] | 3 | 2021-01-11T20:59:55.000Z | 2022-02-16T19:47:46.000Z | _draft/coordtransform/coordtransform.py | OmarG247/autopew | df15e9529aa82ba6b7580573d51980a178f13a9a | [
"BSD-3-Clause"
] | 23 | 2019-10-10T04:27:49.000Z | 2021-11-11T08:01:47.000Z | _draft/coordtransform/coordtransform.py | OmarG247/autopew | df15e9529aa82ba6b7580573d51980a178f13a9a | [
"BSD-3-Clause"
] | 3 | 2019-10-15T16:02:54.000Z | 2020-05-23T04:11:16.000Z | import logging
import itertools
from autopew.transform import (
affine_from_AB,
transform_from_affine,
inverse_affine_transform,
)
class CoordinateTransform(object):
library = []
def __init__(self, source, dest, *args, **kwargs):
self.forward = None
self.reverse = None
se... | 32.568421 | 86 | 0.610213 |
7b866f3929a0f4b6b8337a6b663137ec4f97a9ff | 567 | py | Python | main/dash/template.py | yopito/cports | ef5f808a46724ee3cd215eb95192904ebb7ddcd1 | [
"BSD-2-Clause"
] | null | null | null | main/dash/template.py | yopito/cports | ef5f808a46724ee3cd215eb95192904ebb7ddcd1 | [
"BSD-2-Clause"
] | null | null | null | main/dash/template.py | yopito/cports | ef5f808a46724ee3cd215eb95192904ebb7ddcd1 | [
"BSD-2-Clause"
] | null | null | null | pkgname = "dash"
pkgver = "0.5.11.3"
pkgrel = 0
build_style = "gnu_configure"
pkgdesc = "POSIX-compliant Unix shell, much smaller than GNU bash"
maintainer = "q66 <daniel@octaforge.org>"
license = "BSD-3-Clause"
url = "http://gondor.apana.org.au/~herbert/dash"
sources = [f"http://gondor.apana.org.au/~herbert/dash/files... | 33.352941 | 87 | 0.728395 |
fb29f38dbefa0699c27258a1192e294fc02f2b93 | 11,352 | py | Python | examples/full_analys.py | seeker8529/face_recognition | 7a85e47fdb7d9d2f0167a7e75c69e14aadfcb64a | [
"MIT"
] | null | null | null | examples/full_analys.py | seeker8529/face_recognition | 7a85e47fdb7d9d2f0167a7e75c69e14aadfcb64a | [
"MIT"
] | null | null | null | examples/full_analys.py | seeker8529/face_recognition | 7a85e47fdb7d9d2f0167a7e75c69e14aadfcb64a | [
"MIT"
] | null | null | null |
from PIL import Image, ImageDraw, ImageFont
from PyQt5.QtWidgets import *
import sys
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import QApplication, QPushButton, QWidget, QLabel
from PyQt5.QtGui import QIcon, QPixmap
import face_recognition
# Image for opening
nameImage = "C:\\Users\\Ni... | 34.929231 | 149 | 0.603594 |
740383d36ed66846594b82c547bdd20e1660c254 | 1,061 | py | Python | tools/c7n_azure/c7n_azure/resources/key_vault.py | kaskrish/cloud-custodian | 97fd1048d866657c0e85816eaeff55018c336fe8 | [
"Apache-2.0"
] | null | null | null | tools/c7n_azure/c7n_azure/resources/key_vault.py | kaskrish/cloud-custodian | 97fd1048d866657c0e85816eaeff55018c336fe8 | [
"Apache-2.0"
] | null | null | null | tools/c7n_azure/c7n_azure/resources/key_vault.py | kaskrish/cloud-custodian | 97fd1048d866657c0e85816eaeff55018c336fe8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Capital One Services, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 32.151515 | 74 | 0.700283 |
ffe0ff6106224a92fcfa0192480399537971ae59 | 13,984 | py | Python | maltpynt/tests/test_unit.py | matteobachetti/MaLTPyNT | 6c93d2e23041b6c932810b5a8d727ee1b6dabfed | [
"BSD-3-Clause"
] | 8 | 2015-02-23T13:43:21.000Z | 2021-07-17T11:35:24.000Z | maltpynt/tests/test_unit.py | matteobachetti/MaLTPyNT | 6c93d2e23041b6c932810b5a8d727ee1b6dabfed | [
"BSD-3-Clause"
] | 1 | 2017-09-14T07:55:07.000Z | 2017-09-14T07:55:07.000Z | maltpynt/tests/test_unit.py | matteobachetti/MaLTPyNT | 6c93d2e23041b6c932810b5a8d727ee1b6dabfed | [
"BSD-3-Clause"
] | 4 | 2016-03-02T20:36:07.000Z | 2018-02-26T13:23:53.000Z | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""First set of tests."""
from __future__ import (absolute_import, unicode_literals, division,
print_function)
import maltpynt as mp
import numpy as np
import logging
import os
import unittest
import pytest
MP_FILE_EXTENSION = mp... | 39.502825 | 77 | 0.552918 |
9fe85cee41c0ee3793f909bcd6e28df714a7da01 | 581 | py | Python | users/urls.py | aashaka/twitter-analyser | 313ea4e342d100dac78b0fd07822cac7457450f9 | [
"MIT"
] | null | null | null | users/urls.py | aashaka/twitter-analyser | 313ea4e342d100dac78b0fd07822cac7457450f9 | [
"MIT"
] | null | null | null | users/urls.py | aashaka/twitter-analyser | 313ea4e342d100dac78b0fd07822cac7457450f9 | [
"MIT"
] | null | null | null | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='user_home'),
url(r'^dashboard/$', views.dashboard, name='dashboard'),
url(r'complete/?$', views.complete, name='complete'),
url(r'delete/?$', views.delete_account, name='user.delete'),
url(r'access_s... | 38.733333 | 70 | 0.672978 |
74f8363382761dfce4653a928cb24fb5aa518e46 | 2,371 | py | Python | Lab 06 Functions/labs06.05-studentreadmodules.py | Silvio622/pands-problems-2020 | 7a9c93b513c881eaf80f20ed4e6e7d2969883596 | [
"MIT"
] | null | null | null | Lab 06 Functions/labs06.05-studentreadmodules.py | Silvio622/pands-problems-2020 | 7a9c93b513c881eaf80f20ed4e6e7d2969883596 | [
"MIT"
] | null | null | null | Lab 06 Functions/labs06.05-studentreadmodules.py | Silvio622/pands-problems-2020 | 7a9c93b513c881eaf80f20ed4e6e7d2969883596 | [
"MIT"
] | null | null | null | # Silvio Dunst
# We can now write the function doAdd(). So we need to think what we want this to do.
# a. Read in the students name (that is straightforward)
# b. Read in the module names and grades (this is a bit more complicated so lets put this in separate function and think about it by itself,
# c. Test this fun... | 64.081081 | 148 | 0.716997 |
ab29303b3a7f4127593de9e41fb7b910ba1ea98f | 5,213 | py | Python | service/generated_flatbuffers/tflite/Pool2DOptions.py | lcrh/falken | 7545431c7bfa34a9b45c2243cae40dbb58adefaa | [
"Apache-2.0"
] | 213 | 2021-06-11T01:15:16.000Z | 2022-02-25T16:18:57.000Z | service/generated_flatbuffers/tflite/Pool2DOptions.py | lcrh/falken | 7545431c7bfa34a9b45c2243cae40dbb58adefaa | [
"Apache-2.0"
] | 32 | 2021-06-17T17:58:54.000Z | 2022-02-02T05:58:10.000Z | service/generated_flatbuffers/tflite/Pool2DOptions.py | lcrh/falken | 7545431c7bfa34a9b45c2243cae40dbb58adefaa | [
"Apache-2.0"
] | 28 | 2021-06-17T17:34:21.000Z | 2022-03-24T14:05:20.000Z | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 37.775362 | 133 | 0.703817 |
408e60644b562baf75388d834a6b1df3a0da1296 | 570 | py | Python | Chapter03/killing_processes.py | awangga/Python-Parallel-Programming-Cookbook-Second-Edition | ce6055e0187a334a2210249202f2efd307dd8a61 | [
"MIT"
] | null | null | null | Chapter03/killing_processes.py | awangga/Python-Parallel-Programming-Cookbook-Second-Edition | ce6055e0187a334a2210249202f2efd307dd8a61 | [
"MIT"
] | 72 | 2021-03-15T17:48:02.000Z | 2021-04-23T03:36:02.000Z | Chapter03/killing_processes.py | awangga/Python-Parallel-Programming-Cookbook-Second-Edition | ce6055e0187a334a2210249202f2efd307dd8a61 | [
"MIT"
] | 100 | 2020-05-06T06:58:10.000Z | 2022-03-30T15:52:11.000Z | import multiprocessing
import time
def foo():
print ('Starting function')
for i in range(0,10):
print('-->%d\n' %i)
time.sleep(1)
print ('Finished function')
if __name__ == '__main__':
p = multiprocessing.Process(target=foo)
print ('Process before execution:', p, p.is_alive())
... | 25.909091 | 56 | 0.608772 |
1e366a776d0083b8a12f220492a25faa6171bfe8 | 748 | py | Python | backend/config.py | MargoWM/codeforpoznan.pl_v3 | 4eee987d2f6c1d81878f14ea1f6878f4d868f0cd | [
"MIT"
] | null | null | null | backend/config.py | MargoWM/codeforpoznan.pl_v3 | 4eee987d2f6c1d81878f14ea1f6878f4d868f0cd | [
"MIT"
] | 1 | 2020-07-08T09:24:29.000Z | 2020-07-08T09:24:29.000Z | backend/config.py | MargoWM/codeforpoznan.pl_v3 | 4eee987d2f6c1d81878f14ea1f6878f4d868f0cd | [
"MIT"
] | null | null | null | import os
from os import urandom
class Config(object):
DEBUG = False
TESTING = False
class ProductionConfig(Config):
DEBUG = False
TESTING = False
class DevelopmentConfig(Config):
DEBUG = True
TESTING = True
"""db config"""
DB_USER = os.environ.get("DB_USER")
DB_PASSWORD = os.... | 22 | 81 | 0.677807 |
60f99826c96d96ce2ea25473b12a147e6f494606 | 13,747 | py | Python | integration_tests/test_upgrade.py | stanleeeqwe/chain-main | 1257c1c7eade0aeb6be9e936c436c2d37ad04623 | [
"Apache-2.0"
] | 1 | 2021-09-22T11:11:44.000Z | 2021-09-22T11:11:44.000Z | integration_tests/test_upgrade.py | stanleeeqwe/chain-main | 1257c1c7eade0aeb6be9e936c436c2d37ad04623 | [
"Apache-2.0"
] | null | null | null | integration_tests/test_upgrade.py | stanleeeqwe/chain-main | 1257c1c7eade0aeb6be9e936c436c2d37ad04623 | [
"Apache-2.0"
] | null | null | null | import configparser
import json
import re
import subprocess
import time
from datetime import datetime, timedelta
from pathlib import Path
import pytest
from dateutil.parser import isoparse
from pystarport.cluster import SUPERVISOR_CONFIG_FILE
from pystarport.ports import rpc_port
from .utils import (
cluster_fixt... | 30.892135 | 88 | 0.635702 |
aaf2d4070af487b06f4f2d8f7feeca7bca3a4435 | 14,169 | py | Python | neo/Settings.py | WhisperQFun/neo-python | 1790581bfb9c91e92814fe6624997f90c08f989f | [
"MIT"
] | null | null | null | neo/Settings.py | WhisperQFun/neo-python | 1790581bfb9c91e92814fe6624997f90c08f989f | [
"MIT"
] | null | null | null | neo/Settings.py | WhisperQFun/neo-python | 1790581bfb9c91e92814fe6624997f90c08f989f | [
"MIT"
] | null | null | null | """
These are the core network and system settings. For user-preferences, take a
look at `UserPreferences.py`.
The settings are dynamically configurable, for instance to set them depending
on CLI arguments. By default these are the testnet settings, but you can
reconfigure them by calling the `setup(..)` methods.
"""
... | 38.819178 | 183 | 0.675559 |
438e2285f9c44956d1692579f0c17fb0bcfdb838 | 32,347 | py | Python | tools/dockerize/webportal/usr/lib/python2.7/site-packages/daoliproxy/api/openstack/xmlutil.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | tools/dockerize/webportal/usr/lib/python2.7/site-packages/daoliproxy/api/openstack/xmlutil.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | tools/dockerize/webportal/usr/lib/python2.7/site-packages/daoliproxy/api/openstack/xmlutil.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"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... | 32.444333 | 79 | 0.601478 |
2a8334be23dfe562b10bdde3242d864f2fa855c8 | 11,219 | py | Python | mayaSDK/maya/app/renderSetup/model/renderLayer.py | FXTD-ODYSSEY/vscode-mayapy | 7a21872f80b5b740fc653e79c3f9b5268e87b3c3 | [
"MIT"
] | 20 | 2019-09-20T00:30:22.000Z | 2021-12-26T06:56:16.000Z | mayaSDK/maya/app/renderSetup/model/renderLayer.py | minjiang999/vscode-mayapy | 7a21872f80b5b740fc653e79c3f9b5268e87b3c3 | [
"MIT"
] | 5 | 2019-12-29T15:19:03.000Z | 2022-03-29T16:54:19.000Z | mayaSDK/maya/app/renderSetup/model/renderLayer.py | minjiang999/vscode-mayapy | 7a21872f80b5b740fc653e79c3f9b5268e87b3c3 | [
"MIT"
] | 8 | 2019-09-23T05:46:44.000Z | 2022-01-11T14:42:14.000Z | """
This module provides the render layer class, as well as utility
functions to operate on render layers.
Note:
In order to better control the update of the render layer, two flags were added
to each render layer instance to control the update of 1) the list of nodes owned
by the legacy layer and 2) the... | 21.369524 | 112 | 0.597914 |
da8c2c2b5763922c66471e767dd717f375f5f9f1 | 10,531 | py | Python | data_steward/resources.py | ChaoPang/curation | a754bd51e0f63e306da5b685dac9b31a8154b579 | [
"MIT"
] | null | null | null | data_steward/resources.py | ChaoPang/curation | a754bd51e0f63e306da5b685dac9b31a8154b579 | [
"MIT"
] | null | null | null | data_steward/resources.py | ChaoPang/curation | a754bd51e0f63e306da5b685dac9b31a8154b579 | [
"MIT"
] | null | null | null | import csv
import hashlib
import inspect
import json
import logging
import os
from io import open
import cachetools
from common import ACHILLES_TABLES, ACHILLES_HEEL_TABLES, VOCABULARY_TABLES, PROCESSED_TXT, RESULTS_HTML
LOGGER = logging.getLogger(__name__)
base_path = os.path.dirname(
os.path.abspath(inspect.g... | 32.806854 | 104 | 0.691862 |
1b2ff41fe75280eba2b7f0974c8972fca03580af | 2,503 | py | Python | official/transformer/compute_bleu_test.py | jdavidagudelo/tensorflow-models | 6f019beec73b01861363bf717706e27f4210b979 | [
"Apache-2.0"
] | 1 | 2021-05-17T01:42:29.000Z | 2021-05-17T01:42:29.000Z | official/transformer/compute_bleu_test.py | jdavidagudelo/tensorflow-models | 6f019beec73b01861363bf717706e27f4210b979 | [
"Apache-2.0"
] | null | null | null | official/transformer/compute_bleu_test.py | jdavidagudelo/tensorflow-models | 6f019beec73b01861363bf717706e27f4210b979 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 37.924242 | 80 | 0.675589 |
f891d5fc1992532399d2d4e8784bfd081a4d47a7 | 246 | py | Python | ch04/04_24.py | leeseedong/book-cryptocurrency | 58c0bb3f5a80f8cc73ba47c4839be3bd33c9d67c | [
"Apache-2.0"
] | 121 | 2019-03-23T13:53:06.000Z | 2022-03-28T15:15:03.000Z | ch04/04_24.py | leeseedong/book-cryptocurrency | 58c0bb3f5a80f8cc73ba47c4839be3bd33c9d67c | [
"Apache-2.0"
] | 3 | 2021-04-14T14:31:26.000Z | 2021-05-09T13:46:14.000Z | ch04/04_24.py | leeseedong/book-cryptocurrency | 58c0bb3f5a80f8cc73ba47c4839be3bd33c9d67c | [
"Apache-2.0"
] | 114 | 2019-03-21T13:43:03.000Z | 2022-03-31T18:42:11.000Z | from pandas import Series, DataFrame
data = {"open": [737, 750], "high": [755, 780], "low": [700, 710], "close": [750, 770]}
df = DataFrame(data)
s = Series([300, 400])
df["volume"] = s
upper = df["open"] * 1.3
df["upper"] = upper
print(df)
| 22.363636 | 88 | 0.585366 |
6a33dca9f675b2bf9c11127fe6c16036ad21a91f | 833 | py | Python | build-support/list_packaged_targets.py | hstenzel/yugabyte-db | b25c8f4d7a9e66d106c41c446b71af870aefa304 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | build-support/list_packaged_targets.py | hstenzel/yugabyte-db | b25c8f4d7a9e66d106c41c446b71af870aefa304 | [
"Apache-2.0",
"CC0-1.0"
] | 1 | 2022-02-16T01:17:34.000Z | 2022-02-16T01:17:34.000Z | build-support/list_packaged_targets.py | hstenzel/yugabyte-db | b25c8f4d7a9e66d106c41c446b71af870aefa304 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python2.7
# Copyright (c) YugaByte, Inc.
# Lists the targets that need to be built for a YB release.
import json
import os
import re
YB_SRC_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
LATEST_BINARY_RE = re.compile('^\$BUILD_ROOT/bin/([^/]+)$')
def main():
with open(os.pa... | 26.03125 | 94 | 0.684274 |
13a1fa6421a6d14a60f1177a83c8679b4e78fd81 | 6,937 | py | Python | qiskit/providers/ibmq/runtime/utils.py | merav-aharoni/qiskit-ibmq-provider | 4f6b7f693d0b6f8afd63f389bb7576ac1be70b91 | [
"Apache-2.0"
] | 1 | 2021-10-19T10:38:25.000Z | 2021-10-19T10:38:25.000Z | qiskit/providers/ibmq/runtime/utils.py | merav-aharoni/qiskit-ibmq-provider | 4f6b7f693d0b6f8afd63f389bb7576ac1be70b91 | [
"Apache-2.0"
] | null | null | null | qiskit/providers/ibmq/runtime/utils.py | merav-aharoni/qiskit-ibmq-provider | 4f6b7f693d0b6f8afd63f389bb7576ac1be70b91 | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 35.943005 | 95 | 0.628081 |
b71be3e29aadf251397166f598752ca0e6a053a6 | 35,001 | py | Python | pypy/module/micronumpy/loop.py | reingart/pypy | 9d6b4fb5eaabe6d2bbe63e063709d72d86f8b153 | [
"Apache-2.0",
"OpenSSL"
] | 4 | 2017-09-17T03:27:47.000Z | 2020-04-29T00:10:20.000Z | pypy/module/micronumpy/loop.py | reingart/pypy | 9d6b4fb5eaabe6d2bbe63e063709d72d86f8b153 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | pypy/module/micronumpy/loop.py | reingart/pypy | 9d6b4fb5eaabe6d2bbe63e063709d72d86f8b153 | [
"Apache-2.0",
"OpenSSL"
] | 5 | 2017-09-20T08:08:43.000Z | 2022-02-02T08:19:30.000Z | """ This file is the main run loop as well as evaluation loops for various
operations. This is the place to look for all the computations that iterate
over all the array elements.
"""
from pypy.interpreter.error import OperationError
from rpython.rlib import jit
from rpython.rlib.rstring import StringBuilder
from rpyth... | 40.793706 | 93 | 0.60264 |
4cd595d8bc663e599f28ad64abd48dcd6b450dc5 | 1,783 | py | Python | froide/account/oauth_urls.py | lanmarc77/froide | bddc8bb27c8a7c2a959003dda724194948bc381a | [
"MIT"
] | null | null | null | froide/account/oauth_urls.py | lanmarc77/froide | bddc8bb27c8a7c2a959003dda724194948bc381a | [
"MIT"
] | null | null | null | froide/account/oauth_urls.py | lanmarc77/froide | bddc8bb27c8a7c2a959003dda724194948bc381a | [
"MIT"
] | null | null | null | from django.urls import path
from django.http import HttpResponseRedirect
from oauth2_provider.views import (AuthorizationView, TokenView,
ApplicationList, ApplicationRegistration, ApplicationDetail,
ApplicationDelete, ApplicationUpdate)
class CustomAuthorizationView(AuthorizationView):
def render_to_res... | 41.465116 | 92 | 0.685362 |
525214804e4de2a979b6d5bab9bc4c11a5566d55 | 3,458 | py | Python | test/test_basic.py | kaelzhang/stock-pandas | 6b31a3bc24b37a113d610ab2ab3eaf2f6412f5f2 | [
"MIT"
] | 100 | 2020-03-13T15:23:04.000Z | 2022-03-23T12:35:06.000Z | test/test_basic.py | kaelzhang/stock-pandas | 6b31a3bc24b37a113d610ab2ab3eaf2f6412f5f2 | [
"MIT"
] | 25 | 2020-03-13T16:09:21.000Z | 2021-08-13T17:17:02.000Z | test/test_basic.py | kaelzhang/stock-pandas | 6b31a3bc24b37a113d610ab2ab3eaf2f6412f5f2 | [
"MIT"
] | 12 | 2020-04-03T07:19:05.000Z | 2022-02-09T07:24:45.000Z | import numpy as np
import itertools
import pytest
import pandas as pd
from stock_pandas import (
StockDataFrame,
directive_stringify
)
from .common import (
simple_list,
create_stock,
get_stock_update,
get_tencent
)
@pytest.fixture
def stock():
return create_stock()
def test_directive_... | 20.706587 | 92 | 0.617409 |
d8f7bbee34e26feec651d58bad020608cdebd449 | 998 | py | Python | tests/test_io.py | thejonaslab/tinygraph | f1638168ed084dbb0515cafbf69282b38c4b5810 | [
"BSD-3-Clause"
] | null | null | null | tests/test_io.py | thejonaslab/tinygraph | f1638168ed084dbb0515cafbf69282b38c4b5810 | [
"BSD-3-Clause"
] | 16 | 2021-01-13T15:34:26.000Z | 2021-05-14T12:27:56.000Z | tests/test_io.py | thejonaslab/tinygraph | f1638168ed084dbb0515cafbf69282b38c4b5810 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import networkx
import tinygraph as tg
import pytest
import graph_test_suite
import io
suite = graph_test_suite.get_full_suite()
@pytest.mark.parametrize("test_name", [k for k in suite.keys()])
def test_binary(test_name):
"""
Test the conversion to and from binary.
"""
for g in sui... | 22.177778 | 64 | 0.612224 |
9c259817150b96ec872c274799eb730edcc09e04 | 16,640 | py | Python | brozzler/ydl.py | galgeek/brozzler | 040a942ef261a81cf1f13365a1d916a3f748fa98 | [
"Apache-2.0"
] | null | null | null | brozzler/ydl.py | galgeek/brozzler | 040a942ef261a81cf1f13365a1d916a3f748fa98 | [
"Apache-2.0"
] | null | null | null | brozzler/ydl.py | galgeek/brozzler | 040a942ef261a81cf1f13365a1d916a3f748fa98 | [
"Apache-2.0"
] | 1 | 2021-06-11T11:25:49.000Z | 2021-06-11T11:25:49.000Z | '''
brozzler/ydl.py - youtube-dl support for brozzler
Copyright (C) 2020 Internet Archive
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 req... | 41.809045 | 126 | 0.592728 |
32172d19a040ba5a0f1c8a9c0669bfd71b60c0e9 | 413 | py | Python | lwlPackage/sms/SMSmain.py | 2892211452/myPackage | acadc6a2dcc36900e6e742745af95c1a60a37448 | [
"MIT"
] | null | null | null | lwlPackage/sms/SMSmain.py | 2892211452/myPackage | acadc6a2dcc36900e6e742745af95c1a60a37448 | [
"MIT"
] | null | null | null | lwlPackage/sms/SMSmain.py | 2892211452/myPackage | acadc6a2dcc36900e6e742745af95c1a60a37448 | [
"MIT"
] | null | null | null | from twilio.rest import Client
account_sid = 'AC988415bd476b4abc248b4afaa8bc6717'
auth_token = '3b62cb9653d077b61f0d1f50bc06e718'
client = Client(account_sid, auth_token)
message = client.messages.create(
from_='+13343423628',
body='asdf',
... | 29.5 | 53 | 0.549637 |
9aef12f9cff394567093bf98b6ee5ff06d1a18a0 | 5,509 | py | Python | tools/stats/grouping.py | ramezrawas/galaxy-1 | c03748dd49c060a68d07bce56eae33e0ba154414 | [
"CC-BY-3.0"
] | null | null | null | tools/stats/grouping.py | ramezrawas/galaxy-1 | c03748dd49c060a68d07bce56eae33e0ba154414 | [
"CC-BY-3.0"
] | 7 | 2016-12-07T22:19:37.000Z | 2019-01-30T15:04:26.000Z | tools/stats/grouping.py | ramezrawas/galaxy-1 | c03748dd49c060a68d07bce56eae33e0ba154414 | [
"CC-BY-3.0"
] | null | null | null | #!/usr/bin/env python
# Guruprasad Ananda
# Refactored 2011 to use numpy instead of rpy, Kanwei Li
"""
This tool provides the SQL "group by" functionality.
"""
from __future__ import print_function
import random
import subprocess
import sys
import tempfile
from itertools import groupby
import numpy
def stop_err(msg... | 30.776536 | 150 | 0.516609 |
1847e9c1eed0ea3d0bc425bd43e7174644f1ecb8 | 837 | py | Python | src/sentry/api/bases/integration.py | mlapkin/sentry | 83a852b7a2ff5154a9e65721e031582c4c3ca9c3 | [
"BSD-3-Clause"
] | 1 | 2018-12-04T12:57:00.000Z | 2018-12-04T12:57:00.000Z | src/sentry/api/bases/integration.py | mlapkin/sentry | 83a852b7a2ff5154a9e65721e031582c4c3ca9c3 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/api/bases/integration.py | mlapkin/sentry | 83a852b7a2ff5154a9e65721e031582c4c3ca9c3 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import six
import sys
import traceback
from rest_framework.response import Response
from sentry.utils.sdk import capture_exception
from .organization import OrganizationEndpoint, OrganizationPermission
class IntegrationEndpoint(OrganizationEndpoint):
permission_classes = ... | 29.892857 | 78 | 0.681004 |
a6b6b9953130146b91be50a618ecc012f1279846 | 2,426 | py | Python | airbyte-integrations/connectors/source-zendesk-chat/source_zendesk_chat/source.py | OTRI-Unipd/OTRI-airbyte | 50eeeb773f75246e86c6e167b0cd7d2dda6efe0d | [
"MIT"
] | 2 | 2022-03-02T13:46:05.000Z | 2022-03-05T12:31:28.000Z | airbyte-integrations/connectors/source-zendesk-chat/source_zendesk_chat/source.py | OTRI-Unipd/OTRI-airbyte | 50eeeb773f75246e86c6e167b0cd7d2dda6efe0d | [
"MIT"
] | 29 | 2021-10-07T17:20:29.000Z | 2021-12-27T13:07:09.000Z | airbyte-integrations/connectors/source-zendesk-chat/source_zendesk_chat/source.py | OTRI-Unipd/OTRI-airbyte | 50eeeb773f75246e86c6e167b0cd7d2dda6efe0d | [
"MIT"
] | 1 | 2022-03-11T06:21:24.000Z | 2022-03-11T06:21:24.000Z | #
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
#
from typing import Any, Dict, List, Mapping, Tuple
from airbyte_cdk.models import SyncMode
from airbyte_cdk.sources import AbstractSource
from airbyte_cdk.sources.streams import Stream
from airbyte_cdk.sources.streams.http.requests_native_auth import Token... | 40.433333 | 139 | 0.703215 |
fe2162f15f555adb9eabaf6aadeae0ecb5930f22 | 1,644 | py | Python | zerver/webhooks/papertrail/tests.py | zhoufeng1989/zulip | 74143a0801f76051ae30e8037b62205ffc4ccc61 | [
"Apache-2.0"
] | 4 | 2019-06-04T09:06:53.000Z | 2019-06-04T09:07:47.000Z | zerver/webhooks/papertrail/tests.py | 991rajat/zulip | 648a60baf63f9afade83148bd9ae1fc480510178 | [
"Apache-2.0"
] | 4 | 2020-06-06T00:51:42.000Z | 2022-02-10T21:38:40.000Z | zerver/webhooks/papertrail/tests.py | 991rajat/zulip | 648a60baf63f9afade83148bd9ae1fc480510178 | [
"Apache-2.0"
] | 1 | 2020-02-06T13:56:40.000Z | 2020-02-06T13:56:40.000Z |
from zerver.lib.test_classes import WebhookTestCase
class PapertrailHookTests(WebhookTestCase):
STREAM_NAME = 'papertrail'
URL_TEMPLATE = "/api/v1/external/papertrail?&api_key={api_key}&stream={stream}"
FIXTURE_DIR_NAME = 'papertrail'
def test_short_message(self) -> None:
expected_topic = u"l... | 29.357143 | 91 | 0.663625 |
b2337206b44c69cf6140e9c2bb25ad0ac12706fa | 983 | py | Python | tests/conftest.py | digirati-co-uk/drf-iiif-store | e7053ea197f6324a7efcb23aff67246634c84841 | [
"MIT"
] | null | null | null | tests/conftest.py | digirati-co-uk/drf-iiif-store | e7053ea197f6324a7efcb23aff67246634c84841 | [
"MIT"
] | null | null | null | tests/conftest.py | digirati-co-uk/drf-iiif-store | e7053ea197f6324a7efcb23aff67246634c84841 | [
"MIT"
] | null | null | null | import json
import pytest
import pathlib
from .utils import is_responsive_404
@pytest.fixture
def tests_dir():
return pathlib.Path(__file__).resolve().parent
@pytest.fixture(scope="session")
def docker_compose_file(pytestconfig):
return pathlib.Path(__file__).resolve().parent / "docker-compose.test.yml"
... | 25.205128 | 79 | 0.717192 |
7eedcf81040e18d16658a3677c2a45dab83a4d0c | 2,577 | py | Python | grr/proto/makefile.py | Dazbeni/grr | 5b49a83eba2f84e346a2b50d154264c190a24f08 | [
"Apache-2.0"
] | 1 | 2020-06-25T14:25:51.000Z | 2020-06-25T14:25:51.000Z | grr/proto/makefile.py | Dazbeni/grr | 5b49a83eba2f84e346a2b50d154264c190a24f08 | [
"Apache-2.0"
] | 44 | 2021-05-14T22:49:24.000Z | 2022-03-13T21:54:02.000Z | grr/proto/makefile.py | Dazbeni/grr | 5b49a83eba2f84e346a2b50d154264c190a24f08 | [
"Apache-2.0"
] | 1 | 2020-06-25T14:25:54.000Z | 2020-06-25T14:25:54.000Z | #!/usr/bin/env python
"""A script to prepare the source tree for building."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
# This script must have no special requirements because it wont be able to
# import any GRR ... | 28.01087 | 79 | 0.655413 |
b4e16af6f1b0364ee7af511ef0a18fad1a73eaac | 4,917 | py | Python | examples/TkPlot2.0.py | AndreIglesias/tkplot | 1c7ec2d9b72909a1785529d4b5cda574bb88ab6e | [
"MIT"
] | null | null | null | examples/TkPlot2.0.py | AndreIglesias/tkplot | 1c7ec2d9b72909a1785529d4b5cda574bb88ab6e | [
"MIT"
] | null | null | null | examples/TkPlot2.0.py | AndreIglesias/tkplot | 1c7ec2d9b72909a1785529d4b5cda574bb88ab6e | [
"MIT"
] | null | null | null | # ============================================================================================
# AUTHORS : QEDD & Ldar01
# PROGRAM : TkPlot.py
# DESCRIPTION : Library based on Tkinter.
# DATE : 12/7/17
# ============================================================================================
from math import *
... | 36.422222 | 109 | 0.622534 |
5882d3cc18159d150a57d2cb45cc48114cb65458 | 425 | py | Python | pyyasm/exception.py | srounet/PyYasm | 55883a7d8201240d36c30aee65fbf11a07f93346 | [
"BSD-2-Clause"
] | 3 | 2017-07-06T01:03:46.000Z | 2020-03-04T12:46:13.000Z | pyyasm/exception.py | srounet/PyYasm | 55883a7d8201240d36c30aee65fbf11a07f93346 | [
"BSD-2-Clause"
] | null | null | null | pyyasm/exception.py | srounet/PyYasm | 55883a7d8201240d36c30aee65fbf11a07f93346 | [
"BSD-2-Clause"
] | null | null | null | """pyyasm Exceptions"""
class PyYasmError(Exception):
"""Global pyyasm Exception"""
pass
class PyYasmArchitectureError(PyYasmError):
"""Exception in case the client architecture is not supported"""
pass
class PyYasmVersionError(PyYasmError):
"""Exception in case we could not find version"""
... | 20.238095 | 68 | 0.712941 |
c4ce5062b8787c333c63d419e828dcd83219901e | 2,182 | py | Python | play_game4.py | redfire/tzaar-python-ai | 87766f57ea406c030a45122e8c1790c3741fcfa4 | [
"MIT"
] | 2 | 2016-09-12T15:31:50.000Z | 2017-02-12T23:44:55.000Z | play_game4.py | jeroenmaas/tzaar-python-ai | 87766f57ea406c030a45122e8c1790c3741fcfa4 | [
"MIT"
] | null | null | null | play_game4.py | jeroenmaas/tzaar-python-ai | 87766f57ea406c030a45122e8c1790c3741fcfa4 | [
"MIT"
] | null | null | null | from shared.queueUtils import *
from shared.board import *
import shared.simpleAI3
import json
def jdefault(o):
if isinstance(o, set):
return list(o)
return o.__dict__
def callback(ch, method, properties, body):
dataContainer = json.loads(body.decode('utf-8'))
game_id = dataContainer['game_id'... | 34.09375 | 83 | 0.622823 |
fba201775176ae6722f97c614e0d1fc1fdf60896 | 6,311 | py | Python | bin/dbunloader.py | tofu-rocketry/apel | 4f8dd77636b62415cfdc49f3ac66005d7e4e9762 | [
"Apache-2.0"
] | 9 | 2017-05-03T17:59:33.000Z | 2021-11-14T17:11:03.000Z | bin/dbunloader.py | apel/apel | ef23b80716da51d44a18a82ebf594faaa2e50cf0 | [
"Apache-2.0"
] | 161 | 2015-01-13T15:55:37.000Z | 2022-03-08T15:56:51.000Z | bin/dbunloader.py | tofu-rocketry/apel | 4f8dd77636b62415cfdc49f3ac66005d7e4e9762 | [
"Apache-2.0"
] | 28 | 2015-01-28T13:55:16.000Z | 2021-08-09T15:06:20.000Z | #!/usr/bin/env python
# Copyright (C) 2012 STFC
#
# 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 applicab... | 36.270115 | 107 | 0.618444 |
6ddc0b4c40f8d85ba140288d40986d6b18e984db | 1,033 | py | Python | getSenderNumberMgtURL.py | linkhub-sdk/popbill.message.example.py | e8dc7d46ff3ce21da2c6fc4fda2624f40c0a8438 | [
"MIT"
] | null | null | null | getSenderNumberMgtURL.py | linkhub-sdk/popbill.message.example.py | e8dc7d46ff3ce21da2c6fc4fda2624f40c0a8438 | [
"MIT"
] | null | null | null | getSenderNumberMgtURL.py | linkhub-sdk/popbill.message.example.py | e8dc7d46ff3ce21da2c6fc4fda2624f40c0a8438 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# code for console Encoding difference. Dont' mind on it
import sys
import imp
imp.reload(sys)
try:
sys.setdefaultencoding('UTF8')
except Exception as E:
pass
import testValue
from popbill import MessageService, PopbillException
messageService = MessageService(testValue.LinkID, testV... | 24.595238 | 70 | 0.734753 |
48ccaf1198610562527bad698173d50b53e048b4 | 149 | py | Python | exercise/test_if_not.py | KeoghRee/python_learn | 30769c799adf04fec0c972c271fa74c2dbaaf719 | [
"MIT"
] | null | null | null | exercise/test_if_not.py | KeoghRee/python_learn | 30769c799adf04fec0c972c271fa74c2dbaaf719 | [
"MIT"
] | null | null | null | exercise/test_if_not.py | KeoghRee/python_learn | 30769c799adf04fec0c972c271fa74c2dbaaf719 | [
"MIT"
] | null | null | null | a = input('输入')
if bool(a):
aa = int(a)
else:
aa = 0
if not aa>1:
print('this way is ok')
else:
print('dame')
b = input()
print(str(b)) | 13.545455 | 25 | 0.536913 |
d722414f2aad60c90423ad4acb539058940e1b36 | 2,208 | py | Python | day3/api/collateral/api_modify_example1.py | austind/pyplus-ons | f0fcd6b2a980f75968ab54cd2ae39b42c1f68302 | [
"Apache-2.0"
] | null | null | null | day3/api/collateral/api_modify_example1.py | austind/pyplus-ons | f0fcd6b2a980f75968ab54cd2ae39b42c1f68302 | [
"Apache-2.0"
] | null | null | null | day3/api/collateral/api_modify_example1.py | austind/pyplus-ons | f0fcd6b2a980f75968ab54cd2ae39b42c1f68302 | [
"Apache-2.0"
] | 5 | 2019-11-19T18:41:41.000Z | 2020-06-18T14:58:09.000Z | import requests
import os
import json
from pprint import pprint
from urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning)
if __name__ == "__main__":
"""
--------------------------------------------------------------------------------
HTTP P... | 37.423729 | 96 | 0.580163 |
3c862c0387cc93013cfdf1dd1bf875ce27508597 | 690 | py | Python | controller/login.py | aamir4813/chatbox | c98f12ce58ea497c43f888f19b571bce0eca0278 | [
"MIT"
] | null | null | null | controller/login.py | aamir4813/chatbox | c98f12ce58ea497c43f888f19b571bce0eca0278 | [
"MIT"
] | null | null | null | controller/login.py | aamir4813/chatbox | c98f12ce58ea497c43f888f19b571bce0eca0278 | [
"MIT"
] | null | null | null | from application import app , db
from flask import render_template , flash , redirect , url_for , request
from app_data.forms_wtf import *
from flask_login import current_user , login_user
@app.route("/login", methods=['GET', 'POST'])
def login():
if current_user.is_authenticated :
return redirect(url_f... | 28.75 | 85 | 0.710145 |
4473064c7a059074969c1b25c94d6cbdeb3b2819 | 581 | py | Python | dbank.py | adesolagbenga0052/web-app | c6d6ca3f998897986ac25a1e93477af0a8bfacf6 | [
"Apache-2.0"
] | null | null | null | dbank.py | adesolagbenga0052/web-app | c6d6ca3f998897986ac25a1e93477af0a8bfacf6 | [
"Apache-2.0"
] | null | null | null | dbank.py | adesolagbenga0052/web-app | c6d6ca3f998897986ac25a1e93477af0a8bfacf6 | [
"Apache-2.0"
] | null | null | null | def TEST_DATA_BANK():
jsn = []
with open('filtered.csv', "r") as csv:
index = 0
head = ''
geo_point = ""
for line in csv:
dic = {}
line = line.replace("\n", "").split(',')
if index == 0:
head = line
in... | 29.05 | 53 | 0.349398 |
d35c6e9f922723a0b47237ba91776bfbc5d906f5 | 194 | py | Python | competitive-programming/atcoder/abc228/a.py | sanchopanca/coding-for-pleasure | fed1910e8a5a4241bd55aed333afd79b4405a71d | [
"MIT"
] | null | null | null | competitive-programming/atcoder/abc228/a.py | sanchopanca/coding-for-pleasure | fed1910e8a5a4241bd55aed333afd79b4405a71d | [
"MIT"
] | null | null | null | competitive-programming/atcoder/abc228/a.py | sanchopanca/coding-for-pleasure | fed1910e8a5a4241bd55aed333afd79b4405a71d | [
"MIT"
] | null | null | null | def main():
s, t, x = map(int, input().split())
if t > s:
print('Yes') if s <= x < t else print('No')
else:
print('Yes') if x >= s or x < t else print('No')
main()
| 19.4 | 56 | 0.458763 |
2e9cff624cd54cb73f6bf6be184ef77b435d796a | 21,481 | py | Python | salt/auth/__init__.py | Bacon-Unlimited/salt | 9b1b791d212a6810c430dd15c63fbce3a4f7e1d6 | [
"Apache-2.0"
] | null | null | null | salt/auth/__init__.py | Bacon-Unlimited/salt | 9b1b791d212a6810c430dd15c63fbce3a4f7e1d6 | [
"Apache-2.0"
] | null | null | null | salt/auth/__init__.py | Bacon-Unlimited/salt | 9b1b791d212a6810c430dd15c63fbce3a4f7e1d6 | [
"Apache-2.0"
] | null | null | null | """
Salt's pluggable authentication system
This system allows for authentication to be managed in a module pluggable way
so that any external authentication system can be used inside of Salt
"""
# 1. Create auth loader instance
# 2. Accept arguments as a dict
# 3. Verify with function introspection
# 4. Execute auth ... | 33.616588 | 101 | 0.55463 |
dc5924ce92f848e9651c7321f68c76bd31b273f0 | 736 | py | Python | rest/api/urls.py | forafekt/curly-spoon | 4826a8da22bbaee33561052169212f5afec60a5a | [
"MIT"
] | 1 | 2021-10-31T08:46:06.000Z | 2021-10-31T08:46:06.000Z | rest/api/urls.py | forafekt/curly-spoon | 4826a8da22bbaee33561052169212f5afec60a5a | [
"MIT"
] | 1 | 2022-03-02T09:47:10.000Z | 2022-03-02T09:47:10.000Z | rest/api/urls.py | forafekt/curly-spoon | 4826a8da22bbaee33561052169212f5afec60a5a | [
"MIT"
] | null | null | null | from django.urls import path, include, re_path
from rest_framework.authtoken.views import obtain_auth_token
from rest.api import views
app_name = 'api'
""" REST URLS """
urlpatterns = [
path('', views.APIBaseView.as_view(), name='api'),
path('', include('rest_framework.urls', namespace='rest_framework')),
... | 30.666667 | 76 | 0.686141 |
504782e83dfa6046cc81e58414258257ecf13bdb | 2,579 | py | Python | raylab/agents/svg/policy.py | angelolovatto/raylab | ebaea8df1a391fb844e75df62ccf1e2e07311d88 | [
"MIT"
] | 29 | 2020-05-05T13:25:33.000Z | 2022-01-03T14:12:29.000Z | raylab/agents/svg/policy.py | angelolovatto/raylab | ebaea8df1a391fb844e75df62ccf1e2e07311d88 | [
"MIT"
] | 215 | 2019-11-26T12:59:39.000Z | 2022-02-01T12:38:31.000Z | raylab/agents/svg/policy.py | angelolovatto/raylab | ebaea8df1a391fb844e75df62ccf1e2e07311d88 | [
"MIT"
] | 7 | 2020-06-12T01:42:02.000Z | 2021-05-27T03:40:42.000Z | """Base Policy with common methods for all SVG variations."""
import torch
from nnrl.nn.utils import update_polyak
from ray.rllib import SampleBatch
from raylab.options import configure, option
from raylab.policy import EnvFnMixin, TorchPolicy
from raylab.policy.action_dist import WrapStochasticPolicy
from raylab.poli... | 39.075758 | 83 | 0.721598 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.