hexsha stringlengths 40 40 | size int64 6 782k | ext stringclasses 7
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 237 | max_stars_repo_name stringlengths 6 72 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses list | max_stars_count int64 1 53k ⌀ | 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 184 | max_issues_repo_name stringlengths 6 72 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses list | max_issues_count int64 1 27.1k ⌀ | 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 184 | max_forks_repo_name stringlengths 6 72 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses list | max_forks_count int64 1 12.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 6 782k | avg_line_length float64 2.75 664k | max_line_length int64 5 782k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3b3dfee82605d8633a976e690da98746f94b5ef8 | 26,208 | py | Python | ImageCaption/lib/tf_data_utils_xrh.py | Xinrihui/DeepLearningApp | 8d86b88251ee8d37358c642b1ec4a341767bfd17 | [
"Apache-2.0"
] | 2 | 2021-08-25T01:13:29.000Z | 2021-10-10T14:49:59.000Z | ImageCaption/lib/tf_data_utils_xrh.py | Xinrihui/DeepLearningApp | 8d86b88251ee8d37358c642b1ec4a341767bfd17 | [
"Apache-2.0"
] | null | null | null | ImageCaption/lib/tf_data_utils_xrh.py | Xinrihui/DeepLearningApp | 8d86b88251ee8d37358c642b1ec4a341767bfd17 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import os
import numpy as np
from tqdm import tqdm
from PIL import Image
import pickle
import pandas as pd
import re
import string
from collections import *
import tensorflow as tf
from tensorflow.keras.models import Model
class DataPreprocess:
"""
利用 tf.data 数据流水线的数... | 32.39555 | 188 | 0.618742 |
8e9e7f527913af1acd0612f2b64017b27acfd0fa | 105 | py | Python | scripts/hello_world_sergeygorky.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/hello_world_sergeygorky.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/hello_world_sergeygorky.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | 1 | 2019-10-24T06:45:21.000Z | 2019-10-24T06:45:21.000Z | # LANGUAGE: Python
# AUTHOR:Sergey Gorky
# GITHUB: https://github.com/sergeygorky
print("Hello, World!") | 21 | 40 | 0.733333 |
d926cf9939f6fba734cc988b08fa63ddc80894f6 | 557 | py | Python | packages/watchmen-cli/src/watchmen_cli/common/constants.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-cli/src/watchmen_cli/common/constants.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-cli/src/watchmen_cli/common/constants.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from enum import Enum
class MixedImportType(str, Enum):
NON_REDUNDANT = 'non-redundant'
REPLACE = 'replace'
FORCE_NEW = 'force-new'
NON_REDUNDANT = 'non-redundant'
REPLACE = 'replace'
FORCE_NEW = 'force-new'
login_url = '/login'
access_token = 'accessToken'
pipeline_id = 'pipelineId'
topic_id = 'topic... | 17.967742 | 58 | 0.723519 |
cced108d0ef9cd300cc1b279fccf2ea8013b3e0e | 2,917 | py | Python | python/oneflow/compatible/single_client/experimental/nn/__init__.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 1 | 2021-09-13T02:34:53.000Z | 2021-09-13T02:34:53.000Z | python/oneflow/compatible/single_client/experimental/nn/__init__.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | python/oneflow/compatible/single_client/experimental/nn/__init__.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 1 | 2021-01-17T03:34:39.000Z | 2021-01-17T03:34:39.000Z | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 29.17 | 87 | 0.773055 |
691931a482d1c99c8300dd5afc665433c8e5c79d | 12,509 | py | Python | zencad/gui/actions.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | zencad/gui/actions.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | zencad/gui/actions.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
import os
import tempfile
import subprocess
import signal
import zencad.gui.util
import zencad.gui.settingswdg
from zencad.settings import Settings
from zenframe.actions import ZenFrameActionsMixin
ABOUT_TEXT = "CAD system for righte... | 34.844011 | 102 | 0.591494 |
c6315d9463999b4b50db924577990aba7d37c1e9 | 1,013 | py | Python | _bin/update-page-sections.py | NicoKiaru/imagej.github.io | e334937e361f1aa0ad45cf46ba5c8fadfc32be28 | [
"CC-BY-3.0"
] | 16 | 2020-08-03T20:08:00.000Z | 2022-03-02T15:50:47.000Z | _bin/update-page-sections.py | NicoKiaru/imagej.github.io | e334937e361f1aa0ad45cf46ba5c8fadfc32be28 | [
"CC-BY-3.0"
] | 196 | 2015-09-14T19:15:07.000Z | 2022-03-31T02:22:39.000Z | _bin/update-page-sections.py | NicoKiaru/imagej.github.io | e334937e361f1aa0ad45cf46ba5c8fadfc32be28 | [
"CC-BY-3.0"
] | 60 | 2020-06-04T14:18:37.000Z | 2022-03-30T23:10:55.000Z | import os, sys
with open('_includes/layout/menu', 'r') as f:
lines = f.readlines()
section = []
for line in lines:
line = line.strip()
if line.startswith("{% include menu/section "):
q1 = line.find('"') + 1
q2 = line.find('"', q1 + 1)
section.append(line[q1:q2])
elif line.start... | 34.931034 | 72 | 0.499506 |
c642ef9c27b3c0e43d7cdc328e466288837cab21 | 605 | py | Python | projects/views.py | gopnikmaksim/website-portfolio | 159b75a3236cc91e16f752a8bbbbd753e22207a3 | [
"MIT"
] | null | null | null | projects/views.py | gopnikmaksim/website-portfolio | 159b75a3236cc91e16f752a8bbbbd753e22207a3 | [
"MIT"
] | null | null | null | projects/views.py | gopnikmaksim/website-portfolio | 159b75a3236cc91e16f752a8bbbbd753e22207a3 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from projects.models import Project
def project_index(request):
projects = Project.objects.all()
context = {"projects": projects}
return render(request, "project_index.html", context)
def project_detail(request, pk):
project = Project.objects.get(pk=pk)
contex... | 22.407407 | 58 | 0.720661 |
d6eaf19dcdfd704610d3358cee2b4c0dbbcc0f99 | 1,975 | py | Python | research/cv/AttentionCluster/preprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/AttentionCluster/preprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/AttentionCluster/preprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # 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... | 35.267857 | 78 | 0.684051 |
303389e749c6a17a4169fcbbccf812730edccb1f | 1,433 | py | Python | misc/mergesort.py | Floozutter/coursework | 244548f415553f058098cae84ccdd4ce3f58c245 | [
"Unlicense"
] | null | null | null | misc/mergesort.py | Floozutter/coursework | 244548f415553f058098cae84ccdd4ce3f58c245 | [
"Unlicense"
] | null | null | null | misc/mergesort.py | Floozutter/coursework | 244548f415553f058098cae84ccdd4ce3f58c245 | [
"Unlicense"
] | null | null | null | """
A recursive implementation of mergesort, for Ryan (not Rayan).
"""
from abc import ABCMeta, abstractmethod
from typing import TypeVar, Any, List
class Comparable(metaclass=ABCMeta):
@abstractmethod
def __lt__(self, other: Any) -> bool: ...
C = TypeVar("C", bound=Comparable)
def merge(a: List[C], b: Li... | 30.489362 | 77 | 0.621773 |
23153edac94debc8450cc081f0eb969fd639d9cc | 1,286 | py | Python | mod/units/renew_handler.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | 1 | 2015-06-28T15:26:52.000Z | 2015-06-28T15:26:52.000Z | mod/units/renew_handler.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | null | null | null | mod/units/renew_handler.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | 6 | 2015-03-20T16:36:22.000Z | 2021-08-28T07:58:18.000Z | # -*- coding: utf-8 -*-
# @Date : 2014-06-30 19:28:08
# @Author : xindervella@gamil.com yml_bright@163.com
from sqlalchemy.orm.exc import NoResultFound
from ..models.user import User
from get_api_return import get_api_return
import tornado.web
import tornado.gen
TEMPLATE = '<center><h1 style="margin-top... | 29.906977 | 75 | 0.570762 |
aeef5b3b031bdfb55e1aebad89b3f51c3ae4b8d8 | 2,461 | py | Python | python_experiments/data_analysis/parallel_statistics/err_mem_size_statistics.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 8 | 2020-04-14T23:17:00.000Z | 2021-06-21T12:34:04.000Z | python_experiments/data_analysis/parallel_statistics/err_mem_size_statistics.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | null | null | null | python_experiments/data_analysis/parallel_statistics/err_mem_size_statistics.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 1 | 2021-01-17T16:26:50.000Z | 2021-01-17T16:26:50.000Z | import json
import os
mem_size_tag = 'mem size'
mean_err_tag = 'mean err'
max_err_tag = 'max err'
prlp_tag = 'prlp-with-lock'
prlp_lock_free_tag = 'prlp-lock-free'
pflp_tag = 'pflp-with-lock'
rlp_tag = 'rlp'
flp_tag = 'flp'
def get_tag_info(file_path, tag, functor):
if not os.path.exists(file_path):
ret... | 35.157143 | 120 | 0.59041 |
4e0d9160aa0cb06639f847ecaf1b773a2a0c0b03 | 599 | py | Python | src/03_4_point_transform.py | fablab-ka/labdo-python-video | 9ce9ef6c08f4989bc3d8c2f00c029589a94770aa | [
"Unlicense"
] | 1 | 2016-09-22T18:31:15.000Z | 2016-09-22T18:31:15.000Z | src/03_4_point_transform.py | fablab-ka/labdo-python-video | 9ce9ef6c08f4989bc3d8c2f00c029589a94770aa | [
"Unlicense"
] | null | null | null | src/03_4_point_transform.py | fablab-ka/labdo-python-video | 9ce9ef6c08f4989bc3d8c2f00c029589a94770aa | [
"Unlicense"
] | null | null | null | import cv2, imutils, numpy, time
from imutils import perspective
camera = cv2.VideoCapture(0)
time.sleep(0.25)
while True:
(grabbed, frame) = camera.read()
if not grabbed:
break
frame = imutils.resize(frame, width=800)
pts = numpy.array([(100, 80), (300, 50), (300, 200), (50, 180)])
warped = perspec... | 19.322581 | 66 | 0.644407 |
d18c761a50d40b66665f85e71a383963a7547af8 | 861 | py | Python | packages/watchmen-data-kernel/src/watchmen_data_kernel/cache/tenant_cache.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/cache/tenant_cache.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/cache/tenant_cache.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import List, Optional
from watchmen_model.common import TenantId
from watchmen_model.system import Tenant
from .cache_manager import get_tenant_by_id_cache
from .internal_cache import InternalCache
# noinspection DuplicatedCode
class TenantCache:
"""
tenant cache will not impact other caches
"""
def... | 24.6 | 62 | 0.770035 |
d1fe4420d8f35cfafcd02ed78d91b79853ccf6ce | 147 | py | Python | src/onegov/core/orm/func.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/orm/func.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/orm/func.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from sqlalchemy.sql.functions import ReturnTypeFromArgs
class unaccent(ReturnTypeFromArgs):
""" Produce a UNACCENT expression. """
pass
| 18.375 | 55 | 0.755102 |
ee2edc59b9b0b9f7cdc9c576edf38b8bdac0c21f | 486 | py | Python | Cracking_the_Coding_Interview/arrays_left_rotation.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Cracking_the_Coding_Interview/arrays_left_rotation.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Cracking_the_Coding_Interview/arrays_left_rotation.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
def shift(input_list, n):
n = n % len(input_list)
return input_list[n:] + input_list[:n]
def array_left_rotation_slow(a, n, k):
ret = []
for i in range(0, k + 1):
ret = shift(a, i)
return ret
def array_left_rotation(a, n, k):
ret = a[k:] + a[0:k]
... | 22.090909 | 46 | 0.588477 |
c991a9ef560a8e51e88658b21ccd6cbcb1f3732a | 1,647 | py | Python | DnDxMTG/dndxmtg.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | DnDxMTG/dndxmtg.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | DnDxMTG/dndxmtg.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | import logging
from discord.ext.commands import Bot
from discord.ext import commands
from discord import Intents
import asyncio
import os
import sys
from os.path import getmtime, isfile
from mtg.card import CardCog
from mtg.game import GameCog
from mtg.gm import GMCog
from mtg.deck import DeckCog
with open('../.env') ... | 31.673077 | 139 | 0.724347 |
c99a6b9c0340f3b6837ad50ceeb39ceeb54b1de5 | 287 | py | Python | MAIN/STM32F405/V02/NEXTION.py | ozturkahmetcevdet/VSenst | 07c068fefcbd66ae4d8ec0480b4da10d6b5c7410 | [
"MIT"
] | null | null | null | MAIN/STM32F405/V02/NEXTION.py | ozturkahmetcevdet/VSenst | 07c068fefcbd66ae4d8ec0480b4da10d6b5c7410 | [
"MIT"
] | null | null | null | MAIN/STM32F405/V02/NEXTION.py | ozturkahmetcevdet/VSenst | 07c068fefcbd66ae4d8ec0480b4da10d6b5c7410 | [
"MIT"
] | null | null | null | from pyb import UART
import time
class NEXTION():
def __init__(self):
super().__init__()
self.Setup()
def Setup(self):
self.UART = UART(2, 38400)
def Test(self, str = ""):
self.UART.write(str)
self.UART.write((0xFF, 0xFF, 0xFF)) | 20.5 | 43 | 0.560976 |
c9c14d3a5f7fa9fd0cb5478c207455429ec3bd1e | 2,769 | py | Python | spangle/cli/run.py | tkamenoko/spangle | 068479660a03239aa69c935d7ca0418c491d92da | [
"MIT"
] | 2 | 2019-11-17T06:38:56.000Z | 2019-12-01T15:32:03.000Z | spangle/cli/run.py | tkamenoko/spangle | 068479660a03239aa69c935d7ca0418c491d92da | [
"MIT"
] | null | null | null | spangle/cli/run.py | tkamenoko/spangle | 068479660a03239aa69c935d7ca0418c491d92da | [
"MIT"
] | null | null | null | import argparse
import importlib
import inspect
import os
import sys
from parse import compile
from spangle.api import Api
def urls_ts(args: argparse.Namespace) -> None:
"""
Print `url_for` function written in TypeScript.
API is a place of your spangle app, like "path.to.file:instance".
"""
api... | 27.69 | 88 | 0.554352 |
4ea80290a9aa25a886289f9b6257e104e9966c33 | 2,931 | py | Python | Scripts/searchSwagger.py | HuttonICS/API | 22d61759a77f2ab3c4e610bb251684c78f71d2e6 | [
"MIT"
] | 40 | 2016-09-13T12:54:11.000Z | 2021-09-05T18:45:38.000Z | Scripts/searchSwagger.py | HuttonICS/API | 22d61759a77f2ab3c4e610bb251684c78f71d2e6 | [
"MIT"
] | 351 | 2016-08-10T17:58:38.000Z | 2021-09-15T12:19:48.000Z | Scripts/searchSwagger.py | HuttonICS/API | 22d61759a77f2ab3c4e610bb251684c78f71d2e6 | [
"MIT"
] | 32 | 2016-09-09T16:04:01.000Z | 2021-01-21T13:27:40.000Z | #! /usr/bin/env python
# --------------------------------------------READ ME-------------------------------------------------------
# This script is designed to search a Swagger YAML document for a generic set of criteria.
# Modify the search() method as needed to locate different objects and circumstances within the... | 34.482353 | 108 | 0.554077 |
14c64111924b8877004e50328635b32878192453 | 162 | py | Python | components/py_engine/tests/timerisr.py | ekmixon/AliOS-Things | 00334295af8aa474d818724149726ca93da4645d | [
"Apache-2.0"
] | 4,538 | 2017-10-20T05:19:03.000Z | 2022-03-30T02:29:30.000Z | components/py_engine/tests/timerisr.py | ekmixon/AliOS-Things | 00334295af8aa474d818724149726ca93da4645d | [
"Apache-2.0"
] | 1,088 | 2017-10-21T07:57:22.000Z | 2022-03-31T08:15:49.000Z | components/py_engine/tests/timerisr.py | willianchanlovegithub/AliOS-Things | 637c0802cab667b872d3b97a121e18c66f256eab | [
"Apache-2.0"
] | 1,860 | 2017-10-20T05:22:35.000Z | 2022-03-27T10:54:14.000Z | from driver import TIMER
tim0 = TIMER(0)
tim0.init(period=1000000, mode=TIMER.PERIODIC, callback=lambda t:print('timer_test_log2222'))
tim0.stop()
tim0.deinit() | 23.142857 | 93 | 0.771605 |
01264319a0aca4875565919d0cce5196c2d6ce31 | 3,754 | py | Python | Examples/terminal/door_open/door_open.py | andino-systems/andinopy | 28fc09fbdd67dd690b9b3f80f03a05c342c777e1 | [
"Apache-2.0"
] | null | null | null | Examples/terminal/door_open/door_open.py | andino-systems/andinopy | 28fc09fbdd67dd690b9b3f80f03a05c342c777e1 | [
"Apache-2.0"
] | null | null | null | Examples/terminal/door_open/door_open.py | andino-systems/andinopy | 28fc09fbdd67dd690b9b3f80f03a05c342c777e1 | [
"Apache-2.0"
] | null | null | null | import time
from threading import Timer
import logging
from andinopy.base_devices import terminal
class door_open:
terminal: terminal.terminal = None
inputMode = False
inputString = ""
check_pass: str = None
password_len: int = 6
timer: Timer = None
# Enter your custom rfid cards here
... | 37.54 | 96 | 0.620139 |
0168fc3c0f227c58e91cf5160517d53570900b2d | 142 | py | Python | set_union.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | set_union.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | set_union.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | n = int(input())
English = set(list(input().split()))
b = int(input())
French = set(list(input().split()))
print(len(English.union(French)))
| 20.285714 | 36 | 0.640845 |
feba41c911160c5ebe6cb7cff289a446e235dd70 | 556 | py | Python | src/bo4e/enum/gueltigkeitstyp.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/enum/gueltigkeitstyp.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/enum/gueltigkeitstyp.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | # pylint: disable=missing-module-docstring
from bo4e.enum.strenum import StrEnum
class Gueltigkeitstyp(StrEnum):
"""
Übersicht der verschiedenen Gültigkeiten zur Umsetzung von Positiv- bzw. Negativlisten.
"""
NUR_IN = "NUR_IN" #: Ein so eingeschränktes Merkmal gilt nur mit den angebenen Werten
N... | 37.066667 | 106 | 0.746403 |
e90bcc40954b9a0edad1d1b1fef77a706ef4f350 | 8,103 | py | Python | tests/cli/test_main.py | OrangeUtan/babelbox | 3dd01e078aea8aa352ff5606179d5e1e09f4b827 | [
"MIT"
] | 2 | 2021-03-18T04:34:23.000Z | 2021-03-23T17:35:07.000Z | tests/cli/test_main.py | OrangeUtan/babelbox | 3dd01e078aea8aa352ff5606179d5e1e09f4b827 | [
"MIT"
] | null | null | null | tests/cli/test_main.py | OrangeUtan/babelbox | 3dd01e078aea8aa352ff5606179d5e1e09f4b827 | [
"MIT"
] | null | null | null | import logging
from pathlib import Path
from unittest.mock import MagicMock, patch
import pytest
from pytest_insta import SnapshotFixture
from typer.testing import CliRunner
from babelbox import cli
@pytest.fixture
def runner():
return CliRunner()
class Test_sources_arg:
def test_no_source(self, runner: C... | 38.221698 | 106 | 0.560533 |
286f8a8e0fb6a278ae5745a0544c0d092b803791 | 1,016 | py | Python | pupil_invisible_monitor/src/pupil_invisible_monitor/texture.py | JuBepy/Gaze_Mouse | 4ddea30b4f53deb744dac3f370e7f48baa3b99c2 | [
"MIT"
] | null | null | null | pupil_invisible_monitor/src/pupil_invisible_monitor/texture.py | JuBepy/Gaze_Mouse | 4ddea30b4f53deb744dac3f370e7f48baa3b99c2 | [
"MIT"
] | null | null | null | pupil_invisible_monitor/src/pupil_invisible_monitor/texture.py | JuBepy/Gaze_Mouse | 4ddea30b4f53deb744dac3f370e7f48baa3b99c2 | [
"MIT"
] | null | null | null | import logging
import sys
from pathlib import Path
import numpy as np
from pyglui.cygl.utils import Named_Texture
logger = logging.getLogger(__name__)
class PITextureController:
def _initialize(self):
self._texture = Named_Texture()
self.reset()
def update(self, frame):
... | 26.736842 | 69 | 0.603346 |
c2de5780e546519c728cf919ffce26d57de25aa1 | 1,514 | py | Python | src/onegov/org/models/clipboard.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/models/clipboard.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/models/clipboard.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from cached_property import cached_property
class Clipboard(object):
""" The clipboard holds a url that should be copied and then pasted.
The url is expected to be stored in a token that has been created by
:meth:`onegov.core.request.CoreRequest.new_url_safe_token`.
The reason behind this is that the... | 28.566038 | 77 | 0.628798 |
c2df94a2cb8693446cab73cb934b42a6de3d3b67 | 1,483 | py | Python | kicker_pong/SimpleHumanAI_Controller.py | GeorgJohn/kicker_pong_git | 2263737cab1f74f324772855028f8a4c3b23c4de | [
"MIT"
] | null | null | null | kicker_pong/SimpleHumanAI_Controller.py | GeorgJohn/kicker_pong_git | 2263737cab1f74f324772855028f8a4c3b23c4de | [
"MIT"
] | null | null | null | kicker_pong/SimpleHumanAI_Controller.py | GeorgJohn/kicker_pong_git | 2263737cab1f74f324772855028f8a4c3b23c4de | [
"MIT"
] | null | null | null | import math
from kicker_pong.HumanKeeper_Model import HumanKeeper
from kicker_pong.Constant import *
class SimpleHumanAI:
def new_strategy_step(self, gamer_bar, ball):
if - math.pi / 2 < ball.get_angle() < math.pi / 2:
self._new_desired_pos(gamer_bar, ball.get_y_position() - HumanKeeper.POSITI... | 40.081081 | 98 | 0.679029 |
669c32e8a89e4b41e31993191870c73a44e1bded | 3,962 | py | Python | scripts/update_extension.py | jdmartinez36/azure-keyvault-cli-extension | 4dc674b9c30cac13e27347782c49b3ed7dca2e2f | [
"MIT"
] | 2 | 2019-06-12T13:44:34.000Z | 2020-06-01T13:24:04.000Z | scripts/update_extension.py | jdmartinez36/azure-keyvault-cli-extension | 4dc674b9c30cac13e27347782c49b3ed7dca2e2f | [
"MIT"
] | 5 | 2018-04-26T01:14:29.000Z | 2021-01-05T00:45:39.000Z | scripts/update_extension.py | jdmartinez36/azure-keyvault-cli-extension | 4dc674b9c30cac13e27347782c49b3ed7dca2e2f | [
"MIT"
] | 8 | 2018-04-24T22:52:48.000Z | 2021-11-16T06:29:28.000Z | import os, sys, argparse, shutil
from subprocess import Popen, PIPE
from distutils.dir_util import copy_tree, remove_tree
_source_md = '### Source Origin:'
_replacements = {
'azure.keyvault': 'azext_keyvault.keyvault',
'azure.mgmt.keyvault': 'azext_keyvault.mgmt.keyvault',
'azure.cli.command_modules.keyvau... | 33.863248 | 114 | 0.625189 |
06f14c215907f8dcda89c3cdbcc8b7ddf3c1285f | 1,860 | py | Python | python/course/leetcode/38. Count and Say.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | 1 | 2019-05-22T07:12:34.000Z | 2019-05-22T07:12:34.000Z | python/course/leetcode/38. Count and Say.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | 3 | 2021-12-10T01:13:54.000Z | 2021-12-14T21:18:42.000Z | python/course/leetcode/38. Count and Say.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
# @Time:2020/6/27 10:26
# @Author:TimVan
# @File:38. Count and Say.py
# @Software:PyCharm
# # 38. Count and Say
# The count-and-say sequence is the sequence of integers with the first five terms as following:
# 1. 1
# 2. 11
# 3. 21
# 4. 1211
# 5. 111221
# 1 is read off as "on... | 25.833333 | 96 | 0.562903 |
9fdf898aece94c6811cbcf316c2f65c31f7c66c9 | 664 | py | Python | src/onegov/user/collections/group.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/user/collections/group.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/user/collections/group.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.user.models import UserGroup
from onegov.core.collection import GenericCollection
class UserGroupCollection(GenericCollection):
""" Manages a list of user groups.
Use it like this::
from onegov.user import UserGroupCollection
groups = UserGroupCollection(session)
"""
de... | 25.538462 | 76 | 0.694277 |
b0085e445e0808af634a033ebdac99fe0cc875bf | 125 | py | Python | events/admin.py | rocky-roll-call/rrc-backend | 02e8e11c3dab7661e48650e2e861a4a97788a4ce | [
"MIT"
] | null | null | null | events/admin.py | rocky-roll-call/rrc-backend | 02e8e11c3dab7661e48650e2e861a4a97788a4ce | [
"MIT"
] | null | null | null | events/admin.py | rocky-roll-call/rrc-backend | 02e8e11c3dab7661e48650e2e861a4a97788a4ce | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Casting, Event
admin.site.register(Casting)
admin.site.register(Event)
| 20.833333 | 34 | 0.816 |
c65b88e2931a9f6d083c7d7b8e3d60cec51e383c | 16,883 | py | Python | Packs/FireMonSecurityManager/Integrations/FireMonSecurityManager/FireMonSecurityManager.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/FireMonSecurityManager/Integrations/FireMonSecurityManager/FireMonSecurityManager.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/FireMonSecurityManager/Integrations/FireMonSecurityManager/FireMonSecurityManager.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from CommonServerPython import *
""" IMPORTS """
import demistomock as demisto
""" CONSTANTS """
DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ'
AUTH_URL = "securitymanager/api/authentication/login"
WORKFLOW_URL = "/policyplanner/api/domain/{0}/workflow/version/latest/all"
CREATE_PP_TICKET_URL = "/policyplanner/api/domain/{0}/wor... | 44.428947 | 120 | 0.542617 |
c6823088c4ea8bb282c4bd8567ddb6c01fed2590 | 2,528 | py | Python | test/unit/group_markov_test.py | hdkai/Raw-IO | f0fa928d7ef59a363c6f4c876d642af6dede6ae4 | [
"Apache-2.0"
] | null | null | null | test/unit/group_markov_test.py | hdkai/Raw-IO | f0fa928d7ef59a363c6f4c876d642af6dede6ae4 | [
"Apache-2.0"
] | null | null | null | test/unit/group_markov_test.py | hdkai/Raw-IO | f0fa928d7ef59a363c6f4c876d642af6dede6ae4 | [
"Apache-2.0"
] | null | null | null | #
# RawIO
# Copyright (c) 2021 Yusuf Olokoba.
#
from cv2 import drawMatches
from imageio import imwrite
from numpy import asarray
from pathlib import Path
from PIL import Image
from pytest import fixture, mark
from rawio.grouping import group_exposures, markov_similarity
def test_group_markov_ambient_a (): # fa... | 32.410256 | 100 | 0.65269 |
05d2de5ffddc62fdd9a8bc8cc18832ce64426f1c | 2,010 | py | Python | code/logic/statemachine.py | dieterpl/iDogstra | 62ee246763e107335b9caf0a4f96239fa0953234 | [
"MIT"
] | null | null | null | code/logic/statemachine.py | dieterpl/iDogstra | 62ee246763e107335b9caf0a4f96239fa0953234 | [
"MIT"
] | null | null | null | code/logic/statemachine.py | dieterpl/iDogstra | 62ee246763e107335b9caf0a4f96239fa0953234 | [
"MIT"
] | null | null | null | from sensors import pipeline
from utils.functions import overrides, current_time_millis
import logging
class StateMachine(object):
""" The interface to the state machine. """
def __init__(self):
self._current_state = _InitialState()
self.__history = []
def run(self):
try:
... | 24.814815 | 99 | 0.626866 |
05f55baa481e01ea0b66512640e91054fd88237d | 8,639 | py | Python | DCM/hemodynamicExample-1-exe.py | l-althueser/NiMoNa_DCM16 | d93ee253ade8ccb4da1f17a91f064258adcf29c0 | [
"BSD-2-Clause"
] | 1 | 2018-04-20T07:44:11.000Z | 2018-04-20T07:44:11.000Z | DCM/hemodynamicExample-1-exe.py | l-althueser/NiMoNa_DCM16 | d93ee253ade8ccb4da1f17a91f064258adcf29c0 | [
"BSD-2-Clause"
] | null | null | null | DCM/hemodynamicExample-1-exe.py | l-althueser/NiMoNa_DCM16 | d93ee253ade8ccb4da1f17a91f064258adcf29c0 | [
"BSD-2-Clause"
] | null | null | null | """
@author: Timo
Beschreibung:
Simulation eines Netzwerkes bestehend aus 3 Regionen.
Grafik folgt.
Pythonversion:
3.5.1
"""
import numpy as np
import matplotlib.pyplot as plt
from programs import RK4 as RK4
#from programs import Euler as RK1
from programs import hemodynamicModel as HM
#from programs import b... | 32.235075 | 148 | 0.594745 |
bb6e1ea4691245426b9acffba2f0d383da45bf47 | 8,420 | py | Python | research/nlp/senta/modelarts/start.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/nlp/senta/modelarts/start.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/nlp/senta/modelarts/start.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # 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... | 34.793388 | 115 | 0.67114 |
a550d093fabcd08aa79e7a8455d93dc0a525e5d0 | 380 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v8_9/set_default_fields_in_variant_settings.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | frappe-bench/apps/erpnext/erpnext/patches/v8_9/set_default_fields_in_variant_settings.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v8_9/set_default_fields_in_variant_settings.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2017, Frappe and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc('stock', 'doctype', 'item_variant_settings')
frappe.reload_doc('stock', 'doctype', 'variant_field')
doc = frappe.get_doc('I... | 29.230769 | 63 | 0.765789 |
a589ea4cb75d0b193122587091078a6e850e90fb | 9,657 | py | Python | crm/tests/test_views.py | baniasbaabe/happy-qr | bf44ac19306ea6405cc7c9a100e6f83afca125b4 | [
"MIT"
] | 1 | 2021-01-23T21:42:10.000Z | 2021-01-23T21:42:10.000Z | crm/tests/test_views.py | baniasbaabe/happy-qr | bf44ac19306ea6405cc7c9a100e6f83afca125b4 | [
"MIT"
] | null | null | null | crm/tests/test_views.py | baniasbaabe/happy-qr | bf44ac19306ea6405cc7c9a100e6f83afca125b4 | [
"MIT"
] | null | null | null | from django.test import TestCase, Client
from django.urls import reverse
from crm.models import *
from django.contrib.auth.models import User, Permission, Group
class TestViews(TestCase):
def setUp(self):
self.user = User.objects.create_superuser(username="user1", email="user1@example.de", password="Hall... | 37.722656 | 116 | 0.650098 |
b1cef6aab88387fe10955e849820c0070b14faef | 6,681 | py | Python | research/cv/siamRPN/src/util.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/siamRPN/src/util.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/siamRPN/src/util.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # 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... | 33.238806 | 112 | 0.602604 |
b1e021d8f8ca2ae36ad7f36a4aef39dd2e8d06a4 | 4,314 | py | Python | common/landmark_utils.py | JACKYLUO1991/FaceLandmarks | 0e7eb636d25ba93e64cc3433a79239be51c883cc | [
"Apache-2.0"
] | 24 | 2019-09-01T09:02:59.000Z | 2022-03-22T08:38:16.000Z | common/landmark_utils.py | HeroOneHY/FaceLandmarks | 0e7eb636d25ba93e64cc3433a79239be51c883cc | [
"Apache-2.0"
] | 2 | 2019-10-25T02:39:03.000Z | 2022-03-20T15:45:22.000Z | common/landmark_utils.py | HeroOneHY/FaceLandmarks | 0e7eb636d25ba93e64cc3433a79239be51c883cc | [
"Apache-2.0"
] | 11 | 2019-10-25T01:36:18.000Z | 2021-04-09T06:51:58.000Z | import numpy as np
import cv2
import os
from tqdm import tqdm
np.random.seed(2018)
class LandmarkImageCrop(object):
'''
Facial 106 landmarks augmentation.
'''
def __init__(self):
pass
def __visualize(self, image, landmarks, output_size):
'''
Visualize images and correspon... | 32.43609 | 117 | 0.49351 |
3ce7cf1f701776b307cbd2d30a772f0a7d9d9adf | 89 | py | Python | Python/M01_ProgrammingBasics/L05_WhileLoop/Lab/Solutions/P04_Sequence2kPlus1.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L05_WhileLoop/Lab/Solutions/P04_Sequence2kPlus1.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L05_WhileLoop/Lab/Solutions/P04_Sequence2kPlus1.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | 1 | 2022-02-23T13:03:14.000Z | 2022-02-23T13:03:14.000Z | n = int(input())
start = 1
while start <= n:
print(start)
start = start * 2 + 1
| 12.714286 | 25 | 0.539326 |
59bbefde1d3145f033f8f078a42d2cf34e8d24ae | 13,623 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/contrib/long_range_interaction.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/contrib/long_range_interaction.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/contrib/long_range_interaction.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | from __future__ import print_function
import os
import sys
import itertools
import time
import numpy as np
import pandas
import pysam
import pybedtools
def tag_bedpe(b, beds, verbose=False):
"""
Tag each end of a BEDPE with a set of (possibly many) query BED files.
For example, given a BEDPE of interacti... | 38.159664 | 83 | 0.579902 |
abff1be335ac430d220f78d7f2bf604c6e06d7bc | 67 | py | Python | lib/config.py | jxtrbtk/bindex | 8feee8ff9db371d9e691e10ea70467446c0412b1 | [
"MIT"
] | 1 | 2022-03-09T20:44:33.000Z | 2022-03-09T20:44:33.000Z | lib/config.py | jxtrbtk/bindex | 8feee8ff9db371d9e691e10ea70467446c0412b1 | [
"MIT"
] | null | null | null | lib/config.py | jxtrbtk/bindex | 8feee8ff9db371d9e691e10ea70467446c0412b1 | [
"MIT"
] | null | null | null | ROOT = "https://dex-european.binance.org/api/v1/"
STORAGE = "data"
| 22.333333 | 49 | 0.686567 |
05516a8b81d139b583317694ccfc89deb3a4f993 | 810 | py | Python | UnityPython.FrontEnd/unitypython/CLI.py | franklin1dev/Traffy.UnityPython-main | b616e4c0043af05f5c34ebd245c09b21bfa79a10 | [
"MIT"
] | null | null | null | UnityPython.FrontEnd/unitypython/CLI.py | franklin1dev/Traffy.UnityPython-main | b616e4c0043af05f5c34ebd245c09b21bfa79a10 | [
"MIT"
] | null | null | null | UnityPython.FrontEnd/unitypython/CLI.py | franklin1dev/Traffy.UnityPython-main | b616e4c0043af05f5c34ebd245c09b21bfa79a10 | [
"MIT"
] | null | null | null | from wisepy2 import wise
from unitypython.Transpile import compile_module
from unitypython.TraffyAsm import fast_asdict
from unitypython.JSON import dump_json
def pipeline(filename: str, includesrc: bool = False):
"""
:param filename: input python file
:param includesrc: compile to traffy asm with source ... | 35.217391 | 101 | 0.697531 |
5561607ecc9c76741e4798ba71d6706707ac602a | 9,161 | py | Python | research/cvtmodel/vgg/src/vgg16_bn.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cvtmodel/vgg/src/vgg16_bn.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cvtmodel/vgg/src/vgg16_bn.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # 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... | 50.894444 | 119 | 0.561947 |
f9d9334846bb6672c6e99e1c525f70fbf8fb8017 | 3,817 | py | Python | apps/facedetector/facedetector.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 2 | 2017-11-30T21:12:11.000Z | 2017-12-01T07:52:43.000Z | apps/facedetector/facedetector.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 14 | 2017-11-14T18:12:53.000Z | 2018-06-03T16:07:57.000Z | apps/facedetector/facedetector.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 3 | 2018-02-05T10:40:03.000Z | 2018-02-09T09:29:19.000Z | import cv2
import numpy as np
import os.path
from urllib.request import urlretrieve
def download_xml(url, filename):
if os.path.isfile(filename):
print("{} already present, to re-download it remove the file.".format(filename))
else:
print("{} not found, downloading it from: {} ".format(filenam... | 32.07563 | 122 | 0.648153 |
9b3d93d7dc53d16d08e1c2624cc1bd6661654dec | 941 | py | Python | getIP/getip.py | hanyanze/FS_AILPB | 7756551cf926aa6296ec851dd696c97d56e06bca | [
"Apache-2.0"
] | 1 | 2020-07-16T02:52:47.000Z | 2020-07-16T02:52:47.000Z | getIP/getip.py | hanyanze/FS_AILPB | 7756551cf926aa6296ec851dd696c97d56e06bca | [
"Apache-2.0"
] | null | null | null | getIP/getip.py | hanyanze/FS_AILPB | 7756551cf926aa6296ec851dd696c97d56e06bca | [
"Apache-2.0"
] | null | null | null | import socket
import platform
def getip():
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(('www.baidu.com', 0))
ip = s.getsockname()[0]
except:
ip = "x.x.x.x"
finally:
s.close()
return ip
class GetIP:
def __init__(self):
self.mod... | 24.763158 | 67 | 0.5356 |
fd6010d8a60755586d6355fba238e694cdd59474 | 1,178 | py | Python | 10.3389/fimmu.2018.00251/bin/check_orf.py | jqsunac/doi | c5912a40c7bfda8270e5d51fbdd82a9f0650bd23 | [
"MIT"
] | null | null | null | 10.3389/fimmu.2018.00251/bin/check_orf.py | jqsunac/doi | c5912a40c7bfda8270e5d51fbdd82a9f0650bd23 | [
"MIT"
] | null | null | null | 10.3389/fimmu.2018.00251/bin/check_orf.py | jqsunac/doi | c5912a40c7bfda8270e5d51fbdd82a9f0650bd23 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
import argparse
def parse_pydair_simple(i):
cnt_productive = 0
cnt_nonproductive = 0
cnt_cdr3len0 = 0
cnt_cdr3orf = 0
cnt_cdr3stop = 0
with open(i, 'r') as fh:
for buf in fh:
if buf[0:2] == 'OP':
orf_codes = buf[3:4]... | 26.772727 | 86 | 0.502547 |
bd209cc114cf84f1b7c2c995f3080c19917246e0 | 2,288 | py | Python | Packs/Campaign/Scripts/ShowCampaignHighestSeverity/ShowCampaignHighestSeverity.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Campaign/Scripts/ShowCampaignHighestSeverity/ShowCampaignHighestSeverity.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Campaign/Scripts/ShowCampaignHighestSeverity/ShowCampaignHighestSeverity.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
INFORMATIONAL_SEVERITY_COLOR = "rgb(64,65,66)" # Black
LOW_SEVERITY_COLOR = "rgb(29,184,70)" # Green
MEDIUM_SEVERITY_COLOR = "rgb(209,125,0)" # Orange
HIGH_SEVERITY_COLOR = "rgb(209,60,60)" # Red
CRITICAL_SEVERITY_COLOR = "... | 39.448276 | 118 | 0.680944 |
1fc6d89903e3cd6784f738fe08cccd1316ce9433 | 1,954 | py | Python | 10.3389/fimmu.2018.00251/bin/make_cluster_abundance_seq.py | jqsunac/doi | c5912a40c7bfda8270e5d51fbdd82a9f0650bd23 | [
"MIT"
] | null | null | null | 10.3389/fimmu.2018.00251/bin/make_cluster_abundance_seq.py | jqsunac/doi | c5912a40c7bfda8270e5d51fbdd82a9f0650bd23 | [
"MIT"
] | null | null | null | 10.3389/fimmu.2018.00251/bin/make_cluster_abundance_seq.py | jqsunac/doi | c5912a40c7bfda8270e5d51fbdd82a9f0650bd23 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
import argparse
import re
from Bio import SeqIO
def create_tsv(i, o):
cls2type = {}
cls2nt = {}
with open(i, 'r') as fhin:
for buf in fhin:
r = buf.replace('\r', '').replace('\n', '').split('\t')
cls2type[r[0]] = r[1]
... | 31.015873 | 101 | 0.47697 |
1f5244f06b7d8032e389233d01562c79a0c925d9 | 1,549 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/ch05_datastructures/solutions/ex01_find_common.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch05_datastructures/solutions/ex01_find_common.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch05_datastructures/solutions/ex01_find_common.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
def find_common_build_in(values1, values2):
return set(values1).intersection(values2)
def find_common_short(values1, values2):
results = set()
for elem1 in values1:
if elem1 in values2:
results.add... | 23.469697 | 85 | 0.652679 |
23cd87387cfcad487ec3a508f56a27c577328a8c | 723 | py | Python | oldp/apps/courts/urls.py | ImgBotApp/oldp | 575dc6f711dde3470d910e21c9440ee9b79a69ed | [
"MIT"
] | 3 | 2020-06-27T08:19:35.000Z | 2020-12-27T17:46:02.000Z | oldp/apps/courts/urls.py | ImgBotApp/oldp | 575dc6f711dde3470d910e21c9440ee9b79a69ed | [
"MIT"
] | null | null | null | oldp/apps/courts/urls.py | ImgBotApp/oldp | 575dc6f711dde3470d910e21c9440ee9b79a69ed | [
"MIT"
] | null | null | null | from django.conf.urls import url
from . import views
app_name = 'courts'
urlpatterns = [
# url(r'^$', views.index, name='index'),
# url(r'^state/(?P<state_slug>[-a-z0-9]+)/$', views.index, name='index_state'),
url(r'^$', views.CourtListView.as_view(), name='index'),
url(r'^state/(?P<state_slug>[-a-z0-... | 36.15 | 99 | 0.583679 |
f1aa8cd2a2fe996edab625356010019a20e5802f | 852 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch05_datastructures/ex10_haeufigstes_element_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch05_datastructures/ex10_haeufigstes_element_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch05_datastructures/ex10_haeufigstes_element_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
import pytest
from ch05_datastructures.solutions.ex10_häufigstes_element import value_count, sort_dict_by_value
@pytest.mark.parametrize("values, expected",
[([1, 2, 3, 4, 4, 4, 3, 3, 2, 4],
... | 30.428571 | 97 | 0.544601 |
9e600530a81c08084bcb75be8db503d31d07214b | 1,837 | py | Python | Curso-Em-Video-Python/2Exercicios/098_Funcao_de_contador.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/098_Funcao_de_contador.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/098_Funcao_de_contador.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | from time import sleep
'''
def cont(n1, n2, passo):
print(f'Contagem de {n1} ate {n2} passo {passo} em {passo}')
print('-' * 40)
if n1 < n2 and passo >= 1:
for c in range(n1, n2 + 1, passo):
print(c, end=' ')
sleep(0.5)
print('FIM!')
elif n1 > n2 and passo >= 1:
... | 23.551282 | 64 | 0.451279 |
c8ee5452a06d139e7500ac8241fbf198ea5bc400 | 1,433 | py | Python | gemtown/songs/urls.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | gemtown/songs/urls.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | 5 | 2020-09-04T20:13:39.000Z | 2022-02-17T22:03:33.000Z | gemtown/songs/urls.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
app_name = "songs"
urlpatterns = [
path("all/", view=views.ListAllSongs.as_view(), name="all_songs"),
path("verify/", view=views.VerifySong.as_view(), name="verify_song"),
path("<int:user_id>/cover_images/", view=views.CoverImage.as_view(), na... | 65.136364 | 109 | 0.67411 |
cdc5d573da9a117968af141dc98fede23e12a3df | 8,781 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/zabbix_template_info.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/zabbix_template_info.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/zabbix_template_info.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2019, sky-joker
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | 32.047445 | 138 | 0.571461 |
a943115d5285b7982575cab90ab51e4b892853f3 | 2,755 | py | Python | server/bumf/api/serializers/transaction.py | bumfiness/bumf | 71c404c0a8f804b8f0e127df3de6d8916db4c660 | [
"Apache-2.0"
] | 6 | 2017-01-07T17:59:46.000Z | 2017-02-10T13:19:46.000Z | server/bumf/api/serializers/transaction.py | rixx/bumf | 71c404c0a8f804b8f0e127df3de6d8916db4c660 | [
"Apache-2.0"
] | null | null | null | server/bumf/api/serializers/transaction.py | rixx/bumf | 71c404c0a8f804b8f0e127df3de6d8916db4c660 | [
"Apache-2.0"
] | null | null | null | from django.db import transaction
from rest_framework import serializers
from bumf.api.serializers.account import (
RealAccountSerializer, VirtualAccountSerializer,
)
from bumf.core.models import (
Dossier, RealTransaction, VirtualAccount, VirtualTransaction,
)
class DossierSerializer(serializers.ModelSerial... | 30.611111 | 104 | 0.643194 |
f576d31f7b54afa9a574d028ae71b8897c5f1d75 | 2,102 | py | Python | Python/Courses/LearnToCodeInPython3ProgrammingBeginnerToAdvancedYourProgress/python_course/Section4Modules/32WorkingWithJSON.py | JamieBort/LearningDirectory | afca79c5f1333c079d0e96202ff44ca21b2ceb81 | [
"Info-ZIP"
] | 1 | 2022-02-02T21:56:08.000Z | 2022-02-02T21:56:08.000Z | Python/Courses/LearnToCodeInPython3ProgrammingBeginnerToAdvancedYourProgress/python_course/Section4Modules/32WorkingWithJSON.py | JamieBort/LearningDirectory | afca79c5f1333c079d0e96202ff44ca21b2ceb81 | [
"Info-ZIP"
] | 27 | 2020-06-27T23:25:59.000Z | 2022-02-27T20:40:56.000Z | Python/Courses/LearnToCodeInPython3ProgrammingBeginnerToAdvancedYourProgress/python_course/Section4Modules/32WorkingWithJSON.py | JamieBort/LearningDirectory | afca79c5f1333c079d0e96202ff44ca21b2ceb81 | [
"Info-ZIP"
] | null | null | null | # NOTE: The files
# ./LearningDirectory/Python/LearnToCodeInPython3ProgrammingBeginnerToAdvancedYourProgress/python_course/Section4Modules/30Requests.py
# ./LearningDirectory/Python/LearnToCodeInPython3ProgrammingBeginnerToAdvancedYourProgress/python_course/Section4Modules/31SendingHTTPRequestsToAPIs.py
# and
# ./Learn... | 41.215686 | 267 | 0.720266 |
197aebb003495cab0f60439e071af62af1e9738f | 1,191 | py | Python | python_playground/analysis/timestamp_verification.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 8 | 2020-04-14T23:17:00.000Z | 2021-06-21T12:34:04.000Z | python_playground/analysis/timestamp_verification.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | null | null | null | python_playground/analysis/timestamp_verification.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 1 | 2021-01-17T16:26:50.000Z | 2021-01-17T16:26:50.000Z | import os
if __name__ == '__main__':
root_dir = '/home/yche/mnt/wangyue-clu/csproject/biggraph/ywangby/yche/new_dynamic_datasets/edge_list_raw/'
def check_incremental_timestamp(dataset_name='flickr-growth'):
with open(os.sep.join([root_dir, dataset_name, 'out.' + dataset_name])) as ifs:
l... | 37.21875 | 111 | 0.541562 |
27135941408c88dd08bb91abb97adb822df1f01c | 20,345 | py | Python | tests/onegov/pdf/test_pdf.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/pdf/test_pdf.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/pdf/test_pdf.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from copy import deepcopy
from datetime import date
from io import BytesIO
from onegov.core.utils import module_path
from onegov.pdf import page_fn_footer
from onegov.pdf import page_fn_header
from onegov.pdf import page_fn_header_and_footer
from onegov.pdf import page_fn_header_logo
from onegov.pdf import page_fn_head... | 30.919453 | 79 | 0.580929 |
278f412761658ef0ee45c0ed343642d0e16b8a6e | 4,274 | py | Python | tos/main.py | Bodia2cat/ToS | 1b8c19fd4ab5f8458f5dc1832b764430ac6e02d9 | [
"Unlicense"
] | null | null | null | tos/main.py | Bodia2cat/ToS | 1b8c19fd4ab5f8458f5dc1832b764430ac6e02d9 | [
"Unlicense"
] | null | null | null | tos/main.py | Bodia2cat/ToS | 1b8c19fd4ab5f8458f5dc1832b764430ac6e02d9 | [
"Unlicense"
] | null | null | null | #-----------------------#
i = 10 #
#-----------------------#
import subprocess #
import time #
import os #
import requests #-------------#
from terminaltables import SingleTable#
#-------------------------------------#
#log function
def log():
log = datetime.datetime.now().time()
handle = open(".... | 24.284091 | 81 | 0.557089 |
27c7057790be632c29b2eedbe9588e93c0f9d7b9 | 5,346 | py | Python | Skripts/svm_train.py | galberding/Klassifikation_von_Erschoepfung | 33331762baf0a5ea2898004e63d9a98d26bb3070 | [
"Apache-2.0"
] | null | null | null | Skripts/svm_train.py | galberding/Klassifikation_von_Erschoepfung | 33331762baf0a5ea2898004e63d9a98d26bb3070 | [
"Apache-2.0"
] | null | null | null | Skripts/svm_train.py | galberding/Klassifikation_von_Erschoepfung | 33331762baf0a5ea2898004e63d9a98d26bb3070 | [
"Apache-2.0"
] | null | null | null | """
Helper Module to train the SVM, balance the Dataset and creaating the resulting Plots.
"""
import numpy as np
from scipy import interp
import matplotlib.pyplot as plt
from itertools import cycle
from sklearn import svm, datasets
from sklearn.metrics import roc_curve, auc
from sklearn.model_selection import Stra... | 32.4 | 124 | 0.618219 |
4740af6dd8e97510722feab34ed53c1a396df6a9 | 3,462 | py | Python | python/reduce/reduce_example.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/reduce/reduce_example.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/reduce/reduce_example.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | from functools import reduce
from pprint import pprint
def func_call(func):
def wrapper(*args, **kwargs):
print(f" {func.__name__} start ".center(50, "="))
func(*args, **kwargs)
print(f" {func.__name__} end ".center(50, "="))
return wrapper
@func_call
def example_1():
... | 28.61157 | 89 | 0.533218 |
478b991458469c0376e98b1d8e4891a001f8bac0 | 3,513 | py | Python | backend/api/btb/api/schema/mutations/match.py | prototypefund/project-c | a87a49d7c1317b1e3ec03ddd0ce146ad0391b5d2 | [
"MIT"
] | 4 | 2020-04-30T16:11:24.000Z | 2020-06-02T10:08:07.000Z | backend/api/btb/api/schema/mutations/match.py | prototypefund/project-c | a87a49d7c1317b1e3ec03ddd0ce146ad0391b5d2 | [
"MIT"
] | 291 | 2020-04-20T13:11:13.000Z | 2022-02-10T21:54:46.000Z | backend/api/btb/api/schema/mutations/match.py | prototypefund/project-c | a87a49d7c1317b1e3ec03ddd0ce146ad0391b5d2 | [
"MIT"
] | 2 | 2020-04-19T14:56:01.000Z | 2020-04-19T18:09:34.000Z | import graphene
from btb.api.schema.types import Company, JSONScalar
from btb.api.models import db
from sqlalchemy.dialects.postgresql import insert
from sqlalchemy import text
from flask import g, current_app
import boto3
import json
from os import environ
from btb.templates import match_template, send_email
from grap... | 25.642336 | 96 | 0.583547 |
47b0ba386e7d74b3514cbab61f7fc9de46fdada2 | 3,102 | py | Python | tests/test_error.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 2 | 2020-12-25T19:37:42.000Z | 2021-03-26T04:59:12.000Z | tests/test_error.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 6 | 2018-08-07T22:48:52.000Z | 2021-10-07T18:38:20.000Z | tests/test_error.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
"""test_error.py - tests of the error-handling-module of DHParser
Author: Eckhart Arnold <arnold@badw.de>
Copyright 2017 Bavarian Academy of Sciences and Humanities
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License... | 33.717391 | 95 | 0.627337 |
9a2b60253adb78598eb63c8e85da4cef2e84de5c | 1,048 | py | Python | Contrib-Microsoft/Olympus_rack_manager/python-ocs/rackmanager/ocsrest/authentication.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 5 | 2019-11-11T07:57:26.000Z | 2022-03-28T08:26:53.000Z | Contrib-Microsoft/Olympus_rack_manager/python-ocs/rackmanager/ocsrest/authentication.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 3 | 2019-09-05T21:47:07.000Z | 2019-09-17T18:10:45.000Z | Contrib-Microsoft/Olympus_rack_manager/python-ocs/rackmanager/ocsrest/authentication.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 11 | 2019-07-20T00:16:32.000Z | 2022-01-11T14:17:48.000Z | # Copyright (C) Microsoft Corporation. All rights reserved.
# 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.
import ocs... | 29.942857 | 68 | 0.660305 |
f5ccb18d2d2709ed28c2f3b105034f9a17561fef | 127 | py | Python | src/server/app/repository/ShortcutRepository.py | MatthiasRiener/DigiPen | 9b4aff4a1c431e06d73733dc3dd3f3f3d4631704 | [
"MIT"
] | null | null | null | src/server/app/repository/ShortcutRepository.py | MatthiasRiener/DigiPen | 9b4aff4a1c431e06d73733dc3dd3f3f3d4631704 | [
"MIT"
] | null | null | null | src/server/app/repository/ShortcutRepository.py | MatthiasRiener/DigiPen | 9b4aff4a1c431e06d73733dc3dd3f3f3d4631704 | [
"MIT"
] | null | null | null | from ..helper.helpers import getShortcutsFromJson
shortcuts = getShortcutsFromJson()
def getShortcuts():
return shortcuts | 21.166667 | 49 | 0.80315 |
dfbbabe1d34a44668b1f92247911f1e23b9bfccf | 679 | py | Python | divvydash/dashboard/migrations/0001_initial.py | Sawyer-Middeleer/divvy-dash | 5ef1738d47516949f7288b56b5c92a5c7d1d9d42 | [
"MIT"
] | null | null | null | divvydash/dashboard/migrations/0001_initial.py | Sawyer-Middeleer/divvy-dash | 5ef1738d47516949f7288b56b5c92a5c7d1d9d42 | [
"MIT"
] | 5 | 2020-06-06T01:45:31.000Z | 2021-06-10T19:59:14.000Z | divvydash/dashboard/migrations/0001_initial.py | Sawyer-Middeleer/divvy-dash | 5ef1738d47516949f7288b56b5c92a5c7d1d9d42 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.4 on 2020-03-26 03:47
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Station',
fields=[
('id', models.AutoField(... | 27.16 | 114 | 0.575847 |
e433bbdfea514a0c4c7b5ee9bb7142898e067b28 | 1,118 | py | Python | django_project/utils/restful_res.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | django_project/utils/restful_res.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | django_project/utils/restful_res.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | #restful风格统一返回 json
#返回示例
#{"code":400,"message":"","data":{"name":""}}
from django.http import JsonResponse
class HttpCode(object):
success = 200
paramserror = 400
unauth = 401
methoderror = 405
servererror = 500
#统一返回的方法
def result(code=HttpCode.success,message="",data=None,kwargs=None):
jso... | 28.666667 | 70 | 0.734347 |
90317b9bc26fa82cd3d86a147658c029f3d3fdcd | 11,326 | py | Python | official/nlp/lstm/modelarts/data_process.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/nlp/lstm/modelarts/data_process.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/nlp/lstm/modelarts/data_process.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # -*- encoding: utf-8 -*-
"""
@Project: LSTM
@File: data_process.py
@Author: Joy
@Created Time: 2021-11-12 19:59
"""
import argparse
import os
import time
import moxing as mox
import numpy as np
import mindspore.dataset as ds
from mindspore import context
from src.model_utils.device_adapter import get_device_... | 45.123506 | 120 | 0.69027 |
f2dbd33be05ba38728baed52d13faaa7ff0fdff1 | 1,111 | py | Python | Offsets.py | Lynext/VordLraxx | fb63c2e3e1608d947981832349d32fffe222f3db | [
"MIT"
] | null | null | null | Offsets.py | Lynext/VordLraxx | fb63c2e3e1608d947981832349d32fffe222f3db | [
"MIT"
] | 1 | 2020-12-27T21:12:40.000Z | 2022-03-17T00:08:47.000Z | Offsets.py | Lynext/VordLraxx | fb63c2e3e1608d947981832349d32fffe222f3db | [
"MIT"
] | null | null | null |
ginputBaseOffset = 0x34
entitySig = b'\x90\x64.\x04.\x00\x00.........\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00'
baseEntitySig = b"\x90\x64" # Is it fully true ?
recursivePtrOffsets = [0x32C, 0x98]
offsets = {}
offsets["local"] = (b'Adobe AIR.dll', [0x01315500,0x330,0x78,0x4,0x324,0x574])
offs... | 25.837209 | 110 | 0.69937 |
ffeb10e8ef3eb8e557065a85e137f37235c94f4b | 1,027 | py | Python | SpamMail-master/main.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 11 | 2019-01-20T17:11:11.000Z | 2021-12-17T05:00:15.000Z | SpamMail-master/main.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | SpamMail-master/main.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 10 | 2019-05-12T02:28:06.000Z | 2022-03-06T14:21:43.000Z | import os,time,sys,shutil
class Main:
def __init__(self):
self.detekos()
def menu(self):
print("""
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; S P A M E M A I L ;
;---------------------------;
; Author : Kang-newbie ;
; Contact : t.me/kang_nuubi ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1. ... | 19.377358 | 52 | 0.532619 |
f27e460106faeafe2416c49ddb7256217d907365 | 5,067 | py | Python | kts/tests/test_feature_set.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 18 | 2019-02-14T13:10:07.000Z | 2021-11-26T07:10:13.000Z | kts/tests/test_feature_set.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 2 | 2019-02-17T14:06:42.000Z | 2019-09-15T18:05:54.000Z | kts/tests/test_feature_set.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 2 | 2019-09-15T13:12:42.000Z | 2020-04-15T14:05:54.000Z | from itertools import product
import pandas as pd
import pytest
from kts.core.backend.run_manager import run_manager
from kts.core.feature_constructor.user_defined import FeatureConstructor
from kts.core.feature_set import FeatureSet
from kts.settings import cfg
@pytest.mark.parametrize('remote_1,remote_2', product... | 37.257353 | 110 | 0.679495 |
4b7e7fa7173668c2f1658755000995cb44c190af | 300 | py | Python | tests/test_stdlib.py | yaph/logya | 9647f58a0b8653b56ad64332e235a76cab3acda9 | [
"MIT"
] | 12 | 2015-03-04T03:23:56.000Z | 2020-11-17T08:09:17.000Z | tests/test_stdlib.py | elaOnMars/logya | a9f256ac8840e21b348ac842b35683224e25b613 | [
"MIT"
] | 78 | 2015-01-05T11:40:41.000Z | 2022-01-23T21:05:39.000Z | tests/test_stdlib.py | elaOnMars/logya | a9f256ac8840e21b348ac842b35683224e25b613 | [
"MIT"
] | 6 | 2015-04-20T06:58:42.000Z | 2022-01-31T00:36:29.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from collections import ChainMap
d1 = {
'/': {'name': 'd1 /'},
'/a/': {'name': 'd1 /a/'},
'/b/': {'name': 'd1 /b/'},
}
d2 = {
'/': {'name': 'd2 /'},
'/b/': {'name': 'd2 /b/'},
'/c/': {'name': 'd2 /c/'},
}
cm = ChainMap(d1, d2) | 16.666667 | 32 | 0.386667 |
4b8b8b08f9c6b7ec5b4fa2d6332a691c5a5564b3 | 9,863 | py | Python | python/game/player.py | rissom/RC3MUD | d5ffb8b79a6a95e9389ee0576f52dfee1f52c4ee | [
"MIT"
] | 1 | 2020-09-29T17:44:31.000Z | 2020-09-29T17:44:31.000Z | python/game/player.py | rissom/RC3MUD | d5ffb8b79a6a95e9389ee0576f52dfee1f52c4ee | [
"MIT"
] | null | null | null | python/game/player.py | rissom/RC3MUD | d5ffb8b79a6a95e9389ee0576f52dfee1f52c4ee | [
"MIT"
] | null | null | null | import json
import string
import tornado
from game.room import Room
from system.helper import i18n
from system.log import log
from game.area import Area
class Player(object):
actions = [ { "command": { "de": "sage" , "en": "say" } ,
"function" : "action_say",
"description": ... | 41.267782 | 210 | 0.509176 |
d9d8b162e63c27d876d062e8183c69bc76d39484 | 1,190 | py | Python | Algorithms/5_Searching/14.py | abphilip-codes/Hackerrank_DSA | bb9e233d9d45c5b14c138830602695ad4113fba4 | [
"MIT"
] | 1 | 2021-11-25T13:39:30.000Z | 2021-11-25T13:39:30.000Z | Algorithms/5_Searching/14.py | abphilip-codes/Hackerrank_DSA | bb9e233d9d45c5b14c138830602695ad4113fba4 | [
"MIT"
] | null | null | null | Algorithms/5_Searching/14.py | abphilip-codes/Hackerrank_DSA | bb9e233d9d45c5b14c138830602695ad4113fba4 | [
"MIT"
] | null | null | null | # https://www.hackerrank.com/challenges/cut-the-tree/problem
#!/bin/python3
import math
import os
import random
import re
import sys
#
# Complete the 'cutTheTree' function below.
#
# The function is expected to return an INTEGER.
# The function accepts following parameters:
# 1. INTEGER_ARRAY data
# 2. 2D_INTEGE... | 20.877193 | 62 | 0.555462 |
6a5c8d149616ca3441ce363cb9b5383e9621a2cd | 2,590 | py | Python | Packs/Cherwell/Scripts/CherwellIncidentUnlinkTask/CherwellIncidentUnlinkTask.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Cherwell/Scripts/CherwellIncidentUnlinkTask/CherwellIncidentUnlinkTask.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Cherwell/Scripts/CherwellIncidentUnlinkTask/CherwellIncidentUnlinkTask.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from CommonServerPython import *
args = demisto.args()
# ####################################################################################
# ############################## CONFIGURATION PART ##################################
# ####################################################################################
"... | 47.962963 | 120 | 0.633977 |
0aa14cc5c5cc8b09f0adf0e55d61f17afbd90b34 | 1,265 | py | Python | Hackerrank_problems/diagonal-difference/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 165 | 2020-10-03T08:01:11.000Z | 2022-03-31T02:42:08.000Z | Hackerrank_problems/diagonal-difference/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 383 | 2020-10-03T07:39:11.000Z | 2021-11-20T07:06:35.000Z | Hackerrank_problems/diagonal-difference/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 380 | 2020-10-03T08:05:04.000Z | 2022-03-19T06:56:59.000Z | #!/bin/python3
import math
import os
import random
import re
import sys
# The function accepts 2D_INTEGER_ARRAY arr as parameter and returns an integer as the diagonal difference.
def diagonalDifference(arr):
#Initialising the sum of left diagonal elements to be 0
left = 0
#Initialising the sum of left d... | 28.111111 | 127 | 0.675889 |
861f7c402288a7830bab98b1fd0e6fecd7822c54 | 12,738 | py | Python | frappe-bench/apps/erpnext/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015, ESS LLP and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
import json
from frappe.utils import getdate
from frappe import _
import datetime
from frappe.core.do... | 37.575221 | 142 | 0.748783 |
8622e98f07b93a78dcf2346a21af1e89a6f765ae | 2,641 | py | Python | src/graph3.py | gpu0/nnGraph | ae68af41804ce95dd4dbd6deeea57e377915acc9 | [
"MIT"
] | null | null | null | src/graph3.py | gpu0/nnGraph | ae68af41804ce95dd4dbd6deeea57e377915acc9 | [
"MIT"
] | null | null | null | src/graph3.py | gpu0/nnGraph | ae68af41804ce95dd4dbd6deeea57e377915acc9 | [
"MIT"
] | null | null | null | # f(x,w) = 1 / (1 + exp(-(w0*x0 + w1*x1 + w2)))
import math
class Num:
def __init__(self, val):
self.val = val
def forward(self):
return self.val
def backward(self, val):
print val
class Mul:
def __init__(self, left, right):
self.left = left
self.right = right
... | 26.41 | 63 | 0.576676 |
86ac7aa35d6c28de9fbcc48bc066efb4881ec5bc | 4,721 | py | Python | examples/text_to_sql/IGSQL/data_util/utterance.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/text_to_sql/IGSQL/data_util/utterance.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/text_to_sql/IGSQL/data_util/utterance.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 39.672269 | 80 | 0.63906 |
0791cfb71f1394a828ad4c2b8649bee484bab217 | 695 | py | Python | partner_ngos/fund_management/doctype/outputs/outputs.py | AkramMutaher/partner_ngos | 4a345fb6989ff5a21db7fca07aa4e5174dca8f59 | [
"MIT"
] | null | null | null | partner_ngos/fund_management/doctype/outputs/outputs.py | AkramMutaher/partner_ngos | 4a345fb6989ff5a21db7fca07aa4e5174dca8f59 | [
"MIT"
] | null | null | null | partner_ngos/fund_management/doctype/outputs/outputs.py | AkramMutaher/partner_ngos | 4a345fb6989ff5a21db7fca07aa4e5174dca8f59 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Akram Mutaher and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _, throw
from frappe.model.document import Document
from frappe.utils import (cstr)
class Outputs(Document):
def vali... | 31.590909 | 94 | 0.741007 |
ed123e923294f2dfe1cf1425ac3d20140c91c3fe | 4,663 | py | Python | src/main/python/client/clientController.py | mfentler-tgm/sew5-simple-user-database-mfentler-tgm | 98fba2cdca4243c3b2f25c45ceb043c258a5db53 | [
"MIT"
] | null | null | null | src/main/python/client/clientController.py | mfentler-tgm/sew5-simple-user-database-mfentler-tgm | 98fba2cdca4243c3b2f25c45ceb043c258a5db53 | [
"MIT"
] | null | null | null | src/main/python/client/clientController.py | mfentler-tgm/sew5-simple-user-database-mfentler-tgm | 98fba2cdca4243c3b2f25c45ceb043c258a5db53 | [
"MIT"
] | null | null | null | from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QPushButton, QWidget
#from clientView import Ui_Client
from client.clientView import Ui_Client
#from clientModel import Model
from client.clientModel import Model
import requests, json
from functools import partial
import... | 40.198276 | 141 | 0.622775 |
92ce5ea7a3bdac550b67611e0e6c28419d8ae2e8 | 1,117 | py | Python | nz_crawl_demo/day2/renren2.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | nz_crawl_demo/day2/renren2.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | nz_crawl_demo/day2/renren2.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | from http.cookiejar import CookieJar,FileCookieJar,MozillaCookieJar,LWPCookieJar
from urllib import parse
from urllib import request
headers = {
"User-Agent":"Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; en) Presto/2.8.131 Version/11.11",
}
#创建打开器
def get_opener():
cookiejar = CookieJar()
handler = requ... | 27.925 | 101 | 0.68308 |
137d61b7e6d4b6c6c67c7ec1ec45e534fca380c4 | 1,119 | py | Python | home/views.py | DeepakDarkiee/stockbinz | 53512e9eb7d7214662e38828b23e4b664e6a6cda | [
"Apache-2.0"
] | 1 | 2022-01-08T14:18:14.000Z | 2022-01-08T14:18:14.000Z | home/views.py | DeepakDarkiee/stockbinz | 53512e9eb7d7214662e38828b23e4b664e6a6cda | [
"Apache-2.0"
] | null | null | null | home/views.py | DeepakDarkiee/stockbinz | 53512e9eb7d7214662e38828b23e4b664e6a6cda | [
"Apache-2.0"
] | null | null | null | from django.core.mail import send_mail
from django.views.generic import CreateView, View
from django.shortcuts import render,redirect,HttpResponse
from home.utils import get_day_quote
from home.models import Quotation
from home.models import Contact
# Create your views here.
from home.tasks import contact_mail
class ... | 30.243243 | 81 | 0.664879 |
137f74b89148900cc269e070b93225002bbd7cca | 571 | py | Python | lesson6/bfundme/scripts/utils.py | raynardj/sbs | 726dd47c7a3da0874b97b3df8dcf5b34060d79f6 | [
"MIT"
] | null | null | null | lesson6/bfundme/scripts/utils.py | raynardj/sbs | 726dd47c7a3da0874b97b3df8dcf5b34060d79f6 | [
"MIT"
] | null | null | null | lesson6/bfundme/scripts/utils.py | raynardj/sbs | 726dd47c7a3da0874b97b3df8dcf5b34060d79f6 | [
"MIT"
] | null | null | null | from brownie import network, accounts, config,MockV3Aggregator
from web3 import Web3
# Constants
DECIMALS = 8
STARTING_PRICE = 200000000000
FORKED_LOCAL = ["mainnet-fork-dev",]
def get_account():
if network.show_active() == "development" or network.show_active() in FORKED_LOCAL:
return accounts[0]
els... | 28.55 | 87 | 0.702277 |
13802d136b86d2b48fe66387c333de0ac973c333 | 2,374 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/doc_fragments/oneview.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | 17 | 2017-06-07T23:15:01.000Z | 2021-08-30T14:32:36.000Z | ansible/ansible/plugins/doc_fragments/oneview.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 9 | 2017-06-25T03:31:52.000Z | 2021-05-17T23:43:12.000Z | ansible/ansible/plugins/doc_fragments/oneview.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 3 | 2018-05-26T21:31:22.000Z | 2019-09-28T17:00:45.000Z | # -*- coding: utf-8 -*-
#
# Copyright: (c) 2016-2017, Hewlett Packard Enterprise Development LP
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# OneView doc fragment
DOCUMENTATION = r'''
options:
config:
description:
... | 41.649123 | 119 | 0.689132 |
13a9454f0c2fae452523f30546c9fd34a57c3a8f | 8,973 | py | Python | scripts/package_build.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 2,816 | 2018-06-26T18:52:52.000Z | 2021-04-06T10:39:15.000Z | scripts/package_build.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 1,310 | 2021-04-06T16:04:52.000Z | 2022-03-31T13:52:53.000Z | scripts/package_build.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 270 | 2021-04-09T06:18:28.000Z | 2022-03-31T11:55:37.000Z | import os
import sys
import shutil
import subprocess
from python_helpers import open_utf8
excluded_objects = ['utf8proc_data.cpp']
def get_libraries(binary_dir, libraries, extensions):
result_libs = []
def find_library_recursive(search_dir, potential_libnames):
flist = os.listdir(search_dir)
f... | 37.860759 | 111 | 0.640923 |
dbf4726bba21f46af141096680b500033f509f17 | 27,913 | py | Python | Packs/PhishLabs/Integrations/PhishLabsIOC/PhishLabsIOC.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | null | null | null | Packs/PhishLabs/Integrations/PhishLabsIOC/PhishLabsIOC.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | 40 | 2022-03-03T07:34:00.000Z | 2022-03-31T07:38:35.000Z | Packs/PhishLabs/Integrations/PhishLabsIOC/PhishLabsIOC.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | null | null | null | import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
''' IMPORTS '''
import json
import requests
from typing import Callable
# Disable insecure warnings
requests.packages.urllib3.disable_warnings() # type: ignore
''' GLOBALS/PARAMS '''
HEADERS: dict = {
'Content-T... | 37.976871 | 129 | 0.590943 |
bcf1f1f52149aecc0d7754589edcfa9f5a524241 | 30,527 | py | Python | Packs/SailPointIdentityIQ/Integrations/SailPointIdentityIQ/SailPointIdentityIQ.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/SailPointIdentityIQ/Integrations/SailPointIdentityIQ/SailPointIdentityIQ.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/SailPointIdentityIQ/Integrations/SailPointIdentityIQ/SailPointIdentityIQ.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
''' IMPORTS '''
import base64
import datetime as dt
import json
import traceback
import dateparser
import requests
import urllib3
# Disable insecure warnings
urllib3.disable_warnings()
''' CONSTANTS '''
# IdentityIQ OAuth t... | 38.838422 | 122 | 0.648868 |
bcff897d1b5f79a9b187efa2e91853f0f198e5a4 | 2,376 | py | Python | Worker/messageIO/MqttClient.py | th-nuernberg/ml-cloud | 6d7527cbf6cceb7062e74dbc43d51998381aa6c8 | [
"MIT"
] | null | null | null | Worker/messageIO/MqttClient.py | th-nuernberg/ml-cloud | 6d7527cbf6cceb7062e74dbc43d51998381aa6c8 | [
"MIT"
] | 7 | 2020-07-19T03:29:21.000Z | 2022-03-02T06:46:12.000Z | Worker/messageIO/MqttClient.py | th-nuernberg/ml-cloud | 6d7527cbf6cceb7062e74dbc43d51998381aa6c8 | [
"MIT"
] | null | null | null | import paho.mqtt.client as mqtt
import time
class MqttClient:
def __init__(self, unid):
self.broker = None
self.port = 1883
self.subscription_list = {}
self.callback = None
self.client = mqtt.Client(unid)
self.external_on_connect = None
# The callback for whe... | 34.941176 | 95 | 0.61069 |
4c459daad229c398234dfe237a75181460d13c8d | 1,009 | py | Python | Automaten/Python/nka_vorlage.py | jneug/schule-projekte | 4f1d56d6bb74a47ca019cf96d2d6cc89779803c9 | [
"MIT"
] | 2 | 2020-09-24T12:11:16.000Z | 2022-03-31T04:47:24.000Z | Automaten/Python/nka_vorlage.py | jneug/schule-projekte | 4f1d56d6bb74a47ca019cf96d2d6cc89779803c9 | [
"MIT"
] | 1 | 2021-02-27T15:06:27.000Z | 2021-03-01T16:32:48.000Z | Automaten/Python/nka_vorlage.py | jneug/schule-projekte | 4f1d56d6bb74a47ca019cf96d2d6cc89779803c9 | [
"MIT"
] | 1 | 2021-02-24T05:12:35.000Z | 2021-02-24T05:12:35.000Z | # Scanner-Funktion für ein Wort
# True, wenn das Wort in der Sprache liegt
def scan_word(state, word, stack):
# obersten Kellerbuchstaben "popen" (wenn vorhanden)
stack_char = stack.pop(0) if stack else ""
# Rekursionsabbruch wenn Wort leer (Länge = 0)
if len(word) == 0:
# Akzeptiert, wenn Auto... | 30.575758 | 63 | 0.657086 |
e6c2a85c8d1ac8957fb16488c3500456885abfa1 | 1,477 | py | Python | 神经网络可视化/modelviz.py | yujmo/mlbt | 43c42e15e6a63aa05c7e564f508641bce3fbdf55 | [
"MIT"
] | null | null | null | 神经网络可视化/modelviz.py | yujmo/mlbt | 43c42e15e6a63aa05c7e564f508641bce3fbdf55 | [
"MIT"
] | null | null | null | 神经网络可视化/modelviz.py | yujmo/mlbt | 43c42e15e6a63aa05c7e564f508641bce3fbdf55 | [
"MIT"
] | null | null | null | # -*-coding:utf-8 -*-
# --------------------
# author: cjs
# time: 20200910
# usage: 进行pytorch模型的可视化
# packages: pytorch, tensorflow, tensorboard, tensorboardX
# --------------------
import torch
import torch.nn as nn
import torch.nn.functional as F
from tensorboardX import SummaryWriter # 用于进行可视化
from torchviz impor... | 26.375 | 76 | 0.60325 |
fc065458275c7b2d79a892c4b260942b36886da2 | 2,407 | py | Python | christopher_wyczisk/ex1/ex1.py | appfs/appfs | 8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3 | [
"MIT"
] | 11 | 2017-04-21T11:39:55.000Z | 2022-02-11T20:25:18.000Z | christopher_wyczisk/ex1/ex1.py | appfs/appfs | 8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3 | [
"MIT"
] | 69 | 2017-04-26T09:30:38.000Z | 2017-08-01T11:31:21.000Z | christopher_wyczisk/ex1/ex1.py | appfs/appfs | 8cbbfa0e40e4d4a75a498ce8dd894bb2fbc3a9e3 | [
"MIT"
] | 53 | 2017-04-20T16:16:11.000Z | 2017-07-19T12:53:01.000Z | """
Author: Christopher Wyczisk
Version: 1.0
DESCRIPTION
Dieses Programm wir mit "python ex1.py filename" gestartet. Es liesst die Daten aus filename ein und berechnet
fuer dessen Werten das Geometrische Mittel, fehlerhaftewerte werden herausgefiltert.
"""
import math, types, sys
# Diesen Code hat Christopher Wyc... | 37.609375 | 113 | 0.596178 |
f8fa1e9012eff217927ce25010edfd7f65243e93 | 1,327 | py | Python | Interview Preparation Kits/Interview Preparation Kit/Sorting/Fraudulent Activity Notifications/fraud_notices_naive.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | 1 | 2021-02-22T17:37:45.000Z | 2021-02-22T17:37:45.000Z | Interview Preparation Kits/Interview Preparation Kit/Sorting/Fraudulent Activity Notifications/fraud_notices_naive.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Interview Preparation Kits/Interview Preparation Kit/Sorting/Fraudulent Activity Notifications/fraud_notices_naive.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | #!/bin/python3
import math
import os
import random
import re
import sys
# Complete the activityNotifications function below.
def counting_sort(arr):
size = len(arr)
output = [0] * size
# Initialize the counting array
count = [0] * 201
for i in range(size):
count[arr[i]] += 1
# Updat... | 18.690141 | 58 | 0.573474 |
db9d2ceaa93f41dc1a03c5348ecf3519103e9b11 | 3,226 | py | Python | app.py | brunoluan/MicroML | 1f96afac040abffe5a90545735f076a835e0fc18 | [
"MIT"
] | null | null | null | app.py | brunoluan/MicroML | 1f96afac040abffe5a90545735f076a835e0fc18 | [
"MIT"
] | null | null | null | app.py | brunoluan/MicroML | 1f96afac040abffe5a90545735f076a835e0fc18 | [
"MIT"
] | null | null | null | import gunicorn
from fastapi import FastAPI, File, Form, UploadFile, Query
import shutil
import pandas as pd
from pandas_profiling import ProfileReport
from fastapi.responses import FileResponse
from datetime import datetime
import pickle
import numpy as np
app = FastAPI()
@app.post("/UploadCSV/")
async ... | 31.320388 | 134 | 0.636702 |
72556dbe79802490cf976ebcb9e02c1397819c9f | 486 | py | Python | python/en/_matplotlib/topics/plot_gaussian_filter.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_matplotlib/topics/plot_gaussian_filter.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_matplotlib/topics/plot_gaussian_filter.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
aimldl > python3 > packages > matplotlib > topics > plot_gaussian_filter.py
2019-11-15 (Fri)
Plot Gaussian Filter to file a patent.
"""
import numpy as np
import matplotlib.pyplot as plt
sigma = 1.0
sigma2 = sigma*sigma # sigma
n_samples = 1000
x = np.linspace(... | 18.692308 | 75 | 0.650206 |
f452a32bcc977a22438862bd359eeb1d72e6a528 | 99 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-006/pg-6.6-dara-1-50.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-006/pg-6.6-dara-1-50.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-006/pg-6.6-dara-1-50.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | result = 0
num = 1
for i in range(50):
result = result + num
num = num + 1
print(result)
| 11 | 25 | 0.575758 |
22c5e4172a318c16afc5b3b111b07c3253de9005 | 718 | pyde | Python | sketches/magmaakt/magmaakt.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/magmaakt/magmaakt.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/magmaakt/magmaakt.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | myMagma = ['#000003', '#140D35', '#3B0F6F', '#63197F', '#8C2980',
'#B53679', '#DD4968', '#F66E5B', '#FD9F6C', '#FDCD90', '#FBFCBF']
def setup():
global akt
size(800, 640)
this.surface.setTitle("Magma-Akt")
akt = loadImage("akt.jpg")
image(akt, 0, 0)
noLoop()
def index(x, y):
ret... | 25.642857 | 76 | 0.527855 |
22c7ad3b400469bed430ab83028df9c6ea70e7ab | 8,173 | py | Python | frappe-bench/env/lib/python2.7/site-packages/github/Authorization.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 113 | 2015-06-24T19:36:22.000Z | 2022-03-05T05:15:49.000Z | frappe-bench/env/lib/python2.7/site-packages/github/Authorization.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 18 | 2016-05-03T08:21:54.000Z | 2022-03-26T18:24:21.000Z | frappe-bench/env/lib/python2.7/site-packages/github/Authorization.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 13 | 2015-07-02T03:16:04.000Z | 2022-03-15T10:42:38.000Z | # -*- coding: utf-8 -*-
############################ Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> ... | 42.790576 | 205 | 0.571149 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.