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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3856af84d4e363390653ee12d54089e355ce2ee6 | 92 | py | Python | 2014/12/grandparent-families-race/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2014/12/grandparent-families-race/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2014/12/grandparent-families-race/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 7 | 2015-04-04T04:45:54.000Z | 2021-02-18T11:12:48.000Z | #!/usr/bin/env python
COPY_GOOGLE_DOC_KEY = '1Fy5FSSWS948RJztNjYR6V7l2ychngUI7KGQW2J8VZXo'
| 23 | 68 | 0.847826 |
aadbb4ac24faa4f3f5d3afc0da5ebfef9607ad39 | 2,976 | py | Python | frappe-bench/env/lib/python2.7/site-packages/stdnum/lt/pvm.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/stdnum/lt/pvm.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/stdnum/lt/pvm.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # pvm.py - functions for handling Lithuanian VAT numbers
# coding: utf-8
#
# Copyright (C) 2012, 2013 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1... | 33.438202 | 77 | 0.689516 |
2d5ff2f88ca5f1639501aa22f65592490b61dd7d | 6,262 | py | Python | AI_Engine_Development/Design_Tutorials/02-super_sampling_rate_fir/Utils/ProcessAIEOutputLib.py | jlamperez/Vitis-Tutorials | 9a5b611caabb5656bbb2879116e032227b164bfd | [
"Apache-2.0"
] | 1 | 2022-02-23T23:56:54.000Z | 2022-02-23T23:56:54.000Z | AI_Engine_Development/Design_Tutorials/02-super_sampling_rate_fir/Utils/ProcessAIEOutputLib.py | jlamperez/Vitis-Tutorials | 9a5b611caabb5656bbb2879116e032227b164bfd | [
"Apache-2.0"
] | null | null | null | AI_Engine_Development/Design_Tutorials/02-super_sampling_rate_fir/Utils/ProcessAIEOutputLib.py | jlamperez/Vitis-Tutorials | 9a5b611caabb5656bbb2879116e032227b164bfd | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2021 Xilinx, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 26.200837 | 93 | 0.540083 |
2dec1bc0284ae3c1bca791821204b8821506a527 | 1,784 | py | Python | src/service/RadarService.py | dreaming-coder/RadarSet | c912298d0d6058c6647986524e5d95a205b51c1d | [
"MIT"
] | null | null | null | src/service/RadarService.py | dreaming-coder/RadarSet | c912298d0d6058c6647986524e5d95a205b51c1d | [
"MIT"
] | null | null | null | src/service/RadarService.py | dreaming-coder/RadarSet | c912298d0d6058c6647986524e5d95a205b51c1d | [
"MIT"
] | null | null | null | from pathlib import Path
import numpy as np
from entity import apv_mapper
from entity.RadarReader import RadarReader
from log import logger
from type import PathLike
from utils.visualize.convert import mask_to_png
from utils.mask.mask import get_systematic_mask
from utils.mask.noise import get_background_noise
__all... | 25.855072 | 70 | 0.659193 |
2dfc6b8248be88a3b8a611bc7897ec5fd7d11a87 | 13,158 | py | Python | cbm/datas/object_storage.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 17 | 2021-01-18T07:27:01.000Z | 2022-03-10T12:26:21.000Z | cbm/datas/object_storage.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 4 | 2021-04-29T11:20:44.000Z | 2021-12-06T10:19:17.000Z | cbm/datas/object_storage.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 47 | 2021-01-21T08:25:22.000Z | 2022-03-21T14:28:42.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# This file is part of CbM (https://github.com/ec-jrc/cbm).
# Author : Guido Lemoine, Konstantinos Anastasakis
# Credits : GTCAP Team
# Copyright : 2021 European Commission, Joint Research Centre
# License : 3-Clause BSD
"""
Project: Copernicus DIAS for CAP 'chec... | 38.7 | 108 | 0.604727 |
fac894fb43ee9e933053c14ff3687a47e551b3d9 | 6,867 | py | Python | test/test_npu/test_network_ops/test_reciprocal.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_network_ops/test_reciprocal.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_network_ops/test_reciprocal.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 43.738854 | 91 | 0.588758 |
87ba2cf817c3eb946ebe35ce0de575f1501fd58f | 225 | py | Python | 01.DataStructure/Stack&Queue/HG/B1158.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | 1 | 2021-11-21T06:03:06.000Z | 2021-11-21T06:03:06.000Z | 01.DataStructure/Stack&Queue/HG/B1158.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | 2 | 2021-10-13T07:21:09.000Z | 2021-11-14T13:53:08.000Z | 01.DataStructure/Stack&Queue/HG/B1158.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | null | null | null | N, K = input().split(" ")
answer = []
q = [i for i in range(1, int(N)+1)]
# print(q)
idx = 0
while q:
idx = (idx + int(K)-1) % len(q)
# print(idx, q)
answer.append(str(q.pop(idx)))
print("<"+", ".join(answer)+">") | 22.5 | 35 | 0.506667 |
aa1e441465d9ea670a22e34dcc1c43062c4987cb | 242 | py | Python | aufbauschrift2-kürzel.py | effjot/stiefogen | da149f22912fa3b31fc2660ff01e4e0ca08d5efe | [
"MIT"
] | 14 | 2015-04-30T08:50:53.000Z | 2021-08-23T13:58:12.000Z | aufbauschrift2-kürzel.py | effjot/stiefogen | da149f22912fa3b31fc2660ff01e4e0ca08d5efe | [
"MIT"
] | 4 | 2020-08-28T20:45:47.000Z | 2021-04-06T21:56:25.000Z | aufbauschrift2-kürzel.py | effjot/stiefogen | da149f22912fa3b31fc2660ff01e4e0ca08d5efe | [
"MIT"
] | 5 | 2015-05-01T06:40:40.000Z | 2019-12-12T22:17:29.000Z | import stiefo
filenamebase = "Kürzelliste_Materialien_Aufbauschrift2"
with open(filenamebase + '.txt', "r", encoding="utf-8") as f:
text = f.read()
st = stiefo.text_to_list(text)
stiefo.render_pdf(st, filenamebase + ".pdf")
| 22 | 62 | 0.690083 |
a4be2a4ca889b2b0316c82f4ced0e72fddf69d0d | 2,103 | py | Python | day12/numberGuessingGame.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day12/numberGuessingGame.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day12/numberGuessingGame.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | #Number Guessing Game Objectives:
# Include an ASCII art logo.
# Allow the player to submit a guess for a number between 1 and 100.
# Check user's guess against actual answer. Print "Too high." or "Too low." depending on the user's answer.
# If they got the answer correct, show the actual answer to the player.
# Trac... | 32.353846 | 108 | 0.512601 |
a4c69c56156d43f5a107dc700cedd21e99bb866e | 13,219 | py | Python | tests/onegov/activity/test_iso20022.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/activity/test_iso20022.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/activity/test_iso20022.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from datetime import date
from decimal import Decimal
from onegov.activity.collections import InvoiceCollection
from onegov.activity.iso20022 import extract_transactions
from onegov.activity.iso20022 import match_iso_20022_to_usernames
from onegov.activity.utils import generate_xml
def test_extract_transactions(postf... | 32.39951 | 78 | 0.662834 |
104f674149e91bf907e0b1b9be97c40e56f6e62f | 3,219 | py | Python | Contrib-Microsoft/Olympus_rack_manager/python-ocs/commonapi/models/blade_system.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/commonapi/models/blade_system.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/commonapi/models/blade_system.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.
# -*- codi... | 30.367925 | 74 | 0.646474 |
d82b3ff59f6eaea8ee56fcc2d25111d14f4da9e1 | 2,863 | py | Python | spark_sql/deme.py | xiaolifeipiao/xiaolifeipiao-spark-integrated-curriculum | f9b502ac4a7bd8663005f1bfd2c8ebec5bce9e74 | [
"Apache-2.0"
] | 6 | 2021-11-11T01:06:08.000Z | 2021-11-18T02:45:25.000Z | spark_sql/deme.py | xiaolifeipiao/xiaolifeipiao-spark-integrated-curriculum | f9b502ac4a7bd8663005f1bfd2c8ebec5bce9e74 | [
"Apache-2.0"
] | null | null | null | spark_sql/deme.py | xiaolifeipiao/xiaolifeipiao-spark-integrated-curriculum | f9b502ac4a7bd8663005f1bfd2c8ebec5bce9e74 | [
"Apache-2.0"
] | null | null | null | #-*- coding: utf-8 -*-
from __future__ import print_function
import findspark
findspark.init()
from pyspark.sql.functions import col
from pyspark.ml.clustering import KMeans
from pyspark.ml.evaluation import ClusteringEvaluator
from pyspark.ml.feature import HashingTF, IDF, Tokenizer
from pyspark.sql import SparkSessi... | 32.168539 | 110 | 0.702061 |
219e6cf10b842232a934fc4283f25d3927695874 | 669 | py | Python | controller/monodelay.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | 1 | 2021-06-15T08:59:02.000Z | 2021-06-15T08:59:02.000Z | controller/monodelay.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | null | null | null | controller/monodelay.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | null | null | null |
class Monodelay:
def __init__(self, ticks):
self.n = 0
self.secs = 0
self.callback = None
self.start = None
ticks.subscribe(self.tick)
def set_delay(self, n):
self.secs = n
def set_cb(self, f):
self.callback = f
def run(self):
... | 19.114286 | 37 | 0.476831 |
df880910c6a9285e0beed0abb8e5def7cbe7c51c | 1,318 | py | Python | Implementierung/ResearchEnvironment/AuthorizationManagement/admin.py | Sashks/PSE | ae2d8133a85563c33583f15b9ba76a3a2bf0c762 | [
"MIT"
] | null | null | null | Implementierung/ResearchEnvironment/AuthorizationManagement/admin.py | Sashks/PSE | ae2d8133a85563c33583f15b9ba76a3a2bf0c762 | [
"MIT"
] | null | null | null | Implementierung/ResearchEnvironment/AuthorizationManagement/admin.py | Sashks/PSE | ae2d8133a85563c33583f15b9ba76a3a2bf0c762 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.admin.sites import AdminSite
from .models import *
admin.site.register(Resource)
admin.site.register(AccessRequest)
# Register your models here.
#this is the subpage 'Manage Resources' only displayable to the admin
class ResourceManager(AdminSite):
pas... | 27.458333 | 70 | 0.574355 |
10c1aebaec9a5cd2d7950d0106aad0b1342e84f9 | 284 | py | Python | ProjectEuler_plus/euler_030.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | ProjectEuler_plus/euler_030.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | ProjectEuler_plus/euler_030.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
N = int(input().strip())
npower = [i ** N for i in range(0, 10)]
MAX_N = N * npower[9]
result = 0
for i in range(MAX_N, 1, -1):
digits = list(map(int, str(i)))
total = 0
if sum([npower[j] for j in digits]) == i:
result += i
print(result)
| 18.933333 | 45 | 0.559859 |
801329f907f67e9b7ad19a31dc594f52d4f4200c | 508 | py | Python | core/__init__.py | pedroolynth0/Ghost | 485b53dedbd790770b51f1c52d70d3d892efaf2d | [
"MIT"
] | null | null | null | core/__init__.py | pedroolynth0/Ghost | 485b53dedbd790770b51f1c52d70d3d892efaf2d | [
"MIT"
] | null | null | null | core/__init__.py | pedroolynth0/Ghost | 485b53dedbd790770b51f1c52d70d3d892efaf2d | [
"MIT"
] | null | null | null | import datetime
import locale
class SystemInfom:
def __init__(self):
pass
@staticmethod
def get_time():
now = datetime.datetime.now()
answer = 'São {} horas e {} minutos.'.format(now.hour,now.minute)
return answer
@staticmethod
def get_date():
locale.... | 24.190476 | 88 | 0.600394 |
1d69010b3ae613fd90189fb30cd2f23e4de6f987 | 210,116 | py | Python | PictureGuard-master/guard.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | PictureGuard-master/guard.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | PictureGuard-master/guard.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z |
# coding=utf-8
# Record Teroooosss
d=['yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy', 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy', 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy', 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy... | 26,264.5 | 210,075 | 0.954911 |
6343c44fb429f9f8c028ec8b02f2025e7799e063 | 344 | py | Python | exercises/de/test_02_05_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/de/test_02_05_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/de/test_02_05_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert (
"from spacy.tokens import Doc" in __solution__
), "Importierst du die Klasse Doc?"
assert (
doc.text == "spaCy ist cool!"
), "Bist du dir sicher, dass du das Doc richtig erstellt hast?"
assert "print(doc.text)" in __solution__, "Druckst du den Text des Docs?"
... | 34.4 | 77 | 0.633721 |
987fccd1febb23331085b2d08c11dd275c408a53 | 13,803 | py | Python | src/Sephrasto/CharakterWaffenWrapper.py | Ilaris-Tools/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | 1 | 2022-02-02T16:15:59.000Z | 2022-02-02T16:15:59.000Z | src/Sephrasto/CharakterWaffenWrapper.py | Ilaris-Tools/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | 1 | 2022-01-14T11:04:19.000Z | 2022-01-14T11:04:19.000Z | src/Sephrasto/CharakterWaffenWrapper.py | lukruh/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Mar 10 17:25:53 2017
@author: Lennart
"""
from Wolke import Wolke
import UI.CharakterWaffen
from PyQt5 import QtWidgets, QtCore, QtGui
import Objekte
import Definitionen
from CharakterWaffenPickerWrapper import WaffenPicker
import logging
from Hilfsmethoden import Hilfsmethod... | 41.326347 | 231 | 0.592118 |
988163f2c75982c33abb451158b36baf5106f32b | 398 | py | Python | exercises/pt/exc_01_07.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/exc_01_07.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/exc_01_07.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | import spacy
# Carregue o fluxo de processamento pequeno do idioma portugues "pt_core_web_sm"
# Faça antes o download do fluxo com o comando: python -m spacy download pt_core_news_sm
nlp = ____
text = "É oficial: a Apple é a primeira empresa dos Estados Unidos a ter o valor de mercado acima de 1 trilhão."
# Processe... | 28.428571 | 112 | 0.771357 |
7f83ee9940e77c92662cdf7f4fa9460ab9eb1441 | 481 | py | Python | 04_SQL/commerce/auctions/migrations/0011_auto_20201104_1711.py | DaviNakamuraCardoso/Harvard-CS50-Web-Programming | afec745eede41f7b294c3ee6ebaff9ac042e5e4c | [
"MIT"
] | null | null | null | 04_SQL/commerce/auctions/migrations/0011_auto_20201104_1711.py | DaviNakamuraCardoso/Harvard-CS50-Web-Programming | afec745eede41f7b294c3ee6ebaff9ac042e5e4c | [
"MIT"
] | null | null | null | 04_SQL/commerce/auctions/migrations/0011_auto_20201104_1711.py | DaviNakamuraCardoso/Harvard-CS50-Web-Programming | afec745eede41f7b294c3ee6ebaff9ac042e5e4c | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-11-04 17:11
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('auctions', '0010_auto_20201103_2318'),
]
operations = [
migrations.AlterField(
model_name='list... | 24.05 | 108 | 0.648649 |
f69fbfe83a9ede9376849ca8c7ce1ab8a2948695 | 154 | py | Python | python/gdal_cookbook/cookbook_geometry/create_geometry_from_wkt.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/gdal_cookbook/cookbook_geometry/create_geometry_from_wkt.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/gdal_cookbook/cookbook_geometry/create_geometry_from_wkt.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | from osgeo import ogr
wkt = "POINT (1120351.5712494177 741921.4223245403)"
point = ogr.CreateGeometryFromWkt(wkt)
print(f'{point.GetX()},{point.GetY()}') | 30.8 | 52 | 0.746753 |
f6c4475cfa74de206d62594b1dd63dee86676458 | 963 | py | Python | src/rqt_bt/rqt_bt.py | mortenmj/rqt_bt | 9aee7aef14bb22da4ac47d6ce71dc7f8040e16fa | [
"MIT"
] | null | null | null | src/rqt_bt/rqt_bt.py | mortenmj/rqt_bt | 9aee7aef14bb22da4ac47d6ce71dc7f8040e16fa | [
"MIT"
] | null | null | null | src/rqt_bt/rqt_bt.py | mortenmj/rqt_bt | 9aee7aef14bb22da4ac47d6ce71dc7f8040e16fa | [
"MIT"
] | null | null | null | from __future__ import division
from python_qt_binding.QtCore import QAbstractListModel, QFile, QIODevice, QTimer, Qt, Signal, Slot
from python_qt_binding.QtGui import QIcon, QImage, QPainter
from python_qt_binding.QtWidgets import QCompleter, QFileDialog, QGraphicsScene, QWidget
from python_qt_binding.QtSvg import QS... | 32.1 | 99 | 0.7892 |
101aa9dabf37e706884da81184edec568864e95c | 2,996 | py | Python | official/cv/resnet/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/resnet/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/resnet/postprocess.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... | 36.096386 | 118 | 0.642523 |
6157b4647531499bf06fb9dafd30fc9f9b923b13 | 2,592 | py | Python | src/onegov/feriennet/forms/occasion_need.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/forms/occasion_need.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/forms/occasion_need.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.activity import OccasionNeed
from onegov.feriennet import _
from onegov.form import Form
from wtforms.fields import BooleanField, StringField, TextAreaField
from wtforms.fields.html5 import IntegerField
from wtforms.validators import InputRequired, NumberRange
from psycopg2.extras import NumericRange
clas... | 26.181818 | 79 | 0.592593 |
dcf462a3fa98c8ff0c7954e3e75f1577139baf02 | 385 | py | Python | rrc/settings/prod.py | rocky-roll-call/rrc-backend | 02e8e11c3dab7661e48650e2e861a4a97788a4ce | [
"MIT"
] | null | null | null | rrc/settings/prod.py | rocky-roll-call/rrc-backend | 02e8e11c3dab7661e48650e2e861a4a97788a4ce | [
"MIT"
] | null | null | null | rrc/settings/prod.py | rocky-roll-call/rrc-backend | 02e8e11c3dab7661e48650e2e861a4a97788a4ce | [
"MIT"
] | null | null | null | """
Production Settings
"""
from decouple import config, Csv
from dj_database_url import parse as db_url
from rrc.settings.dev import *
DATABASES = {"default": config("DATABASE_URL", cast=db_url)}
DEBUG = config("SECRET_KEY")
SECRET_KEY = config("SECRET_KEY")
ALLOWED_HOSTS = config("ALLOWED_HOSTS", cast=Csv())
JW... | 21.388889 | 66 | 0.758442 |
0d4b1b884e83337fa7f97e0c59b3474a8a782c40 | 329 | py | Python | Algorithms/Implementation/circular_array_rotation.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Implementation/circular_array_rotation.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Implementation/circular_array_rotation.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
n,k,q = input().strip().split(' ')
n,k,q = [int(n),int(k),int(q)]
a = [int(a_temp) for a_temp in input().strip().split(' ')]
max_idx = len(a)
k = k % max_idx
for _ in range(q):
m = int(input().strip())
ri = m - k # rotated index
if ri < 0:
ri += max_idx
prin... | 19.352941 | 58 | 0.541033 |
d30d06215903dac95094300165ef9df8e438a588 | 267 | py | Python | begin-python/cp14/chpater14.py | Jocs/reading-notes | 26b8331877a2de034b8860bc3e3967893112d52d | [
"MIT"
] | 3 | 2021-08-04T07:59:48.000Z | 2022-03-26T23:58:17.000Z | begin-python/cp14/chpater14.py | Jocs/reading-notes | 26b8331877a2de034b8860bc3e3967893112d52d | [
"MIT"
] | null | null | null | begin-python/cp14/chpater14.py | Jocs/reading-notes | 26b8331877a2de034b8860bc3e3967893112d52d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf8 -*-
import socket
s = socket.socket()
host = socket.gethostname()
port = 1234
s.bind((host, port))
s.listen(5)
while True:
c, addr = s.accept()
print 'GET CONNECT FROM :', addr
c.send('Thank you for connecting')
c.close() | 17.8 | 35 | 0.659176 |
d30d8274b4d44d36e4c32dfbffeab96129c278a5 | 2,949 | py | Python | official/cv/ctpn/src/CTPN/anchor_generator.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/ctpn/src/CTPN/anchor_generator.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/ctpn/src/CTPN/anchor_generator.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... | 39.851351 | 88 | 0.610715 |
d3711445467e16f5b6bc641c18826004e8c02543 | 4,283 | py | Python | src/ui/views.py | oguzhanakan0/covidlab-server | 68ea4e6cd3b1244117ae43275335896b911a9b2a | [
"MIT"
] | null | null | null | src/ui/views.py | oguzhanakan0/covidlab-server | 68ea4e6cd3b1244117ae43275335896b911a9b2a | [
"MIT"
] | 1 | 2022-03-25T05:33:19.000Z | 2022-03-25T05:33:19.000Z | src/ui/views.py | oguzhanakan0/covidlab-server | 68ea4e6cd3b1244117ae43275335896b911a9b2a | [
"MIT"
] | null | null | null | from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render, redirect
from rest_framework.response import Response
from rest_framework.views import APIView
from rest_framework.permissions import IsAuthenticated, IsAdminUser
from notif.models import Notif
from .authentication import T... | 32.44697 | 243 | 0.635769 |
d3a4df96e82b1640538e8cb34c4737298a7251c6 | 1,509 | py | Python | tools/flags_from_git_diff.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | tools/flags_from_git_diff.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | tools/flags_from_git_diff.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | import subprocess
def get_changed_files(base=None, head=None):
changed = subprocess.check_output(
f"git diff --name-only --diff-filter=ACMRT {base} {head}",
shell=True,
text=True,
)
changed = str(changed).splitlines()
return changed
def should_run_single_client_tests(changed=... | 31.4375 | 86 | 0.671306 |
e2ed82a6e905088f990065f585f799e6577ac994 | 218 | py | Python | core/admin.py | attachemd/moviedb | c2e3b7bc3c1537c64834c2ee94492122dafdfcd4 | [
"MIT"
] | null | null | null | core/admin.py | attachemd/moviedb | c2e3b7bc3c1537c64834c2ee94492122dafdfcd4 | [
"MIT"
] | null | null | null | core/admin.py | attachemd/moviedb | c2e3b7bc3c1537c64834c2ee94492122dafdfcd4 | [
"MIT"
] | null | null | null | from django.contrib import admin
from core.models import WatchListModel, StreamPlatformModel, ReviewModel
admin.site.register(WatchListModel)
admin.site.register(StreamPlatformModel)
admin.site.register(ReviewModel)
| 27.25 | 72 | 0.857798 |
394f9cba02be920ba49e5c0bf6c72c27188a8bfd | 2,296 | py | Python | frappe-bench/env/lib/python2.7/site-packages/stdnum/lu/tva.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/stdnum/lu/tva.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/stdnum/lu/tva.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # tva.py - functions for handling Luxembourgian VAT numbers
# coding: utf-8
#
# Copyright (C) 2012, 2013 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version ... | 31.888889 | 73 | 0.707317 |
37c770fb9c0f3f58c44e56b6794d9682af17369a | 17,117 | py | Python | Subrake-master/subrake/__main__.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Subrake-master/subrake/__main__.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Subrake-master/subrake/__main__.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | import sys
if sys.version_info[0] != 3:
sys.exit( "[~] Only Version 3 Supported!" )
import optparse
import re
import os
import socket
import time
import ssl
import csv
import requests
import random
import signal
import threading
import string
from dns import resolver
from subrake.pull import PULLY
from subrake.parser ... | 29.110544 | 175 | 0.640474 |
80729be9c88931d7ea6315a6b494f16985eba31d | 19,521 | py | Python | Library/StrategyBuilder.py | rccannizzaro/QC-StrategyBacktest | 847dbd61680466bc60ce7893eced8a8f70d16b2e | [
"Apache-2.0"
] | 11 | 2021-12-02T15:41:47.000Z | 2022-03-14T03:49:22.000Z | Library/StrategyBuilder.py | ikamanu/QC-StrategyBacktest | 847dbd61680466bc60ce7893eced8a8f70d16b2e | [
"Apache-2.0"
] | null | null | null | Library/StrategyBuilder.py | ikamanu/QC-StrategyBacktest | 847dbd61680466bc60ce7893eced8a8f70d16b2e | [
"Apache-2.0"
] | 5 | 2022-02-02T12:07:51.000Z | 2022-02-13T02:24:19.000Z | ########################################################################################
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with... | 48.439206 | 178 | 0.591005 |
03bb462700143e6d1fe5f1a5af50170838ed1474 | 6,428 | py | Python | calculator-python/calculator.py | hspbc666/calculators | 7e6da277673b95b9a3aacebe20e74e839a06f0c7 | [
"Apache-2.0"
] | null | null | null | calculator-python/calculator.py | hspbc666/calculators | 7e6da277673b95b9a3aacebe20e74e839a06f0c7 | [
"Apache-2.0"
] | null | null | null | calculator-python/calculator.py | hspbc666/calculators | 7e6da277673b95b9a3aacebe20e74e839a06f0c7 | [
"Apache-2.0"
] | null | null | null | import tkinter as tk
def printout(result1, result2, frm):
label1 = tk.Label(frm, font=('微软雅黑', 20), bg='#0a0a0a', bd='9', fg='#ffffff', anchor='se', textvariable=result1)
label1.place(relx=1, rely=0.5, relwidth=1, relheight=0.5, anchor='se')
label2 = tk.Label(frm, font=('微软雅黑', 20), bg='#0a0a0a', bd... | 40.175 | 117 | 0.626167 |
207d919dfa4101e3ff353058b92b79093c535e34 | 1,866 | py | Python | src/test/tests/hybrid/clonefirstref.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/hybrid/clonefirstref.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/hybrid/clonefirstref.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: clonefirstref.py
#
# Tests: mesh - 2D, curvilinear, single domain
# plots - FilledBoundary
# databases - PDB
#
# Purpose: This test case tests the viewer's abi... | 29.619048 | 78 | 0.631833 |
20c90827354a5cbb68ed6e98a5d3b08d45e35602 | 2,075 | py | Python | python/course/leetcode/28. Implement strStr().py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | 1 | 2019-05-22T07:12:34.000Z | 2019-05-22T07:12:34.000Z | python/course/leetcode/28. Implement strStr().py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | 3 | 2021-12-10T01:13:54.000Z | 2021-12-14T21:18:42.000Z | python/course/leetcode/28. Implement strStr().py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
# @Time:2020/6/23 16:10
# @Author:TimVan
# @File:28. Implement strStr().py
# @Software:PyCharm
# 28. Implement strStr()
# Implement strStr().
# Return the index of the first occurrence of needle in haystack,
# or -1 if needle is not part of haystack.
# Example 1:
# Input: haystack = "hello", nee... | 28.040541 | 83 | 0.511325 |
b3051c92189ec0dc157857f56c2371fd67d62101 | 2,146 | py | Python | query_all_stock.py | davidnvrstop/AStockAnalyzer | a0c94fd4b22bbb26f134ef9260dd7d587d413e33 | [
"MIT"
] | null | null | null | query_all_stock.py | davidnvrstop/AStockAnalyzer | a0c94fd4b22bbb26f134ef9260dd7d587d413e33 | [
"MIT"
] | null | null | null | query_all_stock.py | davidnvrstop/AStockAnalyzer | a0c94fd4b22bbb26f134ef9260dd7d587d413e33 | [
"MIT"
] | null | null | null | import baostock as bs
import pandas as pd
import datetime
import time
from sqlalchemy import create_engine
def download_data(date):
# 获取指定日期的指数、股票数据
stock_rs = bs.query_all_stock(date)
stock_df = stock_rs.get_data()
data_df = pd.DataFrame()
start = time.time()
count = 0
# 交... | 31.558824 | 190 | 0.595527 |
b360e38f7755c48f1541ee1f76cd248ae146423b | 352 | py | Python | Algorithms/Strings/Funny String/funny_string.py | Nidita/Data-Structures-Algorithms | 7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a | [
"MIT"
] | 26 | 2019-07-17T11:05:43.000Z | 2022-02-06T08:31:40.000Z | Algorithms/Strings/Funny String/funny_string.py | Nidita/Data-Structures-Algorithms | 7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a | [
"MIT"
] | 7 | 2019-07-16T19:52:25.000Z | 2022-01-08T08:03:44.000Z | Algorithms/Strings/Funny String/funny_string.py | Nidita/Data-Structures-Algorithms | 7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a | [
"MIT"
] | 19 | 2020-01-14T02:44:28.000Z | 2021-12-27T17:31:59.000Z | def is_funny(str):
rev = str[::-1]
i = 1
j = len(str) - 2
while(i<=j):
diff_1 = abs(ord(str[i]) - ord(str[i-1]))
diff_2 = abs(ord(str[j]) - ord(str[j+1]))
if diff_1 != diff_2:
return False
i = i+1
j = j-1
return True
input_string = 'SPNMKH'... | 14.666667 | 49 | 0.482955 |
640269d7fcf47095e4d2ee3f48ee012d2559dca5 | 1,077 | py | Python | v601/python/ionspannung.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 2 | 2019-12-10T10:25:11.000Z | 2021-01-26T13:59:40.000Z | v601/python/ionspannung.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | null | null | null | v601/python/ionspannung.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 1 | 2020-12-06T21:24:58.000Z | 2020-12-06T21:24:58.000Z | import numpy as np
import matplotlib.pyplot as plt
from uncertainties import ufloat
import uncertainties.unumpy as unp
from scipy import optimize
import scipy.constants as const
from scipy.stats import sem
h = const.Planck
c = const.speed_of_light
q = const.elementary_charge
# scale
laenge = np.array([1,2,3,4,5,6,7,8... | 34.741935 | 85 | 0.763231 |
ff43b34c3d6618b3f0ff292d8b20ad4e8970f23d | 11,005 | py | Python | Chapter2/userCF.py | 7125messi/rencommend_system_learning | 4a8bcef241c4c0357cfbe4d1a9828b847974b69c | [
"Apache-2.0"
] | 3 | 2019-10-10T15:49:42.000Z | 2020-05-31T07:39:10.000Z | Chapter2/userCF.py | 7125messi/rencommend_system_learning | 4a8bcef241c4c0357cfbe4d1a9828b847974b69c | [
"Apache-2.0"
] | null | null | null | Chapter2/userCF.py | 7125messi/rencommend_system_learning | 4a8bcef241c4c0357cfbe4d1a9828b847974b69c | [
"Apache-2.0"
] | 2 | 2019-09-18T07:59:48.000Z | 2020-01-16T15:00:48.000Z | # 导入包
import random
import math
import time
from tqdm import tqdm
# 通用函数定义
## 定义装饰器,监控运行时间
def timmer(func):
def wrapper(*args, **kwargs):
start_time = time.time()
res = func(*args, **kwargs)
stop_time = time.time()
print('Func %s, run time: %s' % (func.__name__, stop_time - start_t... | 27.240099 | 85 | 0.506497 |
3470336bbe46762b4ab68543ccac47e09bc41f9a | 2,648 | py | Python | Textadventure/items/player_stats.py | clemens2107/textadventure | 870f3ff98accdadad386a2cae4bd4328341f7eb9 | [
"CC0-1.0"
] | null | null | null | Textadventure/items/player_stats.py | clemens2107/textadventure | 870f3ff98accdadad386a2cae4bd4328341f7eb9 | [
"CC0-1.0"
] | null | null | null | Textadventure/items/player_stats.py | clemens2107/textadventure | 870f3ff98accdadad386a2cae4bd4328341f7eb9 | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
from enemies import player
player_stats_dic = {"name": player.name,
"level": 0,
"live": player.hp,
"strength": 0,
"intelligence": 0,
"dexterity": 0,
"vitality": 0,
... | 48.145455 | 84 | 0.578927 |
1b6739d5924387eb91d598829128f4aa1028a783 | 9,017 | py | Python | tests/discord/test_discord_models.py | ph7vc/CL4M-B0T | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 9 | 2019-02-17T06:33:14.000Z | 2021-10-05T02:19:00.000Z | tests/discord/test_discord_models.py | ns-phennessy/Bolt | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 28 | 2019-02-10T07:48:05.000Z | 2021-12-20T00:15:37.000Z | tests/discord/test_discord_models.py | ph7vc/CL4M-B0T | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 4 | 2015-03-13T03:58:55.000Z | 2015-05-27T08:29:46.000Z | import unittest
from bolt.discord.models.base import ModelValidationError
from bolt.discord.models.user import User
from bolt.discord.models.embed import Embed
from bolt.discord.models.channel import Channel, ChannelType
from bolt.discord.models.guild import Guild
class TestDiscordModel(unittest.TestCase):
def te... | 36.654472 | 97 | 0.547743 |
9472103a4187d9a6ea58fd8284582cc995f3e617 | 1,158 | py | Python | source/pkgsrc/devel/meson/patches/patch-mesonbuild_modules_pkgconfig.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/devel/meson/patches/patch-mesonbuild_modules_pkgconfig.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/devel/meson/patches/patch-mesonbuild_modules_pkgconfig.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-mesonbuild_modules_pkgconfig.py,v 1.2 2021/02/21 12:45:23 adam Exp $
Revert https://github.com/mesonbuild/meson/commit/aba8792 that introduced
a condition to match FreeBSD path norm for pkg-config files.
--- mesonbuild/modules/pkgconfig.py.orig 2021-02-01 20:35:16.000000000 +0000
+++ mesonbuild/modules... | 57.9 | 132 | 0.69171 |
846b6fa28feb0876a0a997f72328fc923e2bd539 | 3,760 | py | Python | .venv/Lib/site-packages/dexpy/tests/test_samplers.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | 21 | 2016-10-19T18:13:03.000Z | 2021-11-02T13:58:31.000Z | .venv/Lib/site-packages/dexpy/tests/test_samplers.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | 43 | 2016-10-11T20:56:28.000Z | 2020-08-20T16:39:38.000Z | .venv/Lib/site-packages/dexpy/tests/test_samplers.py | AI-Assistant/FEMAG-Python | ff86e8f41485ae9df6034e6b8e810b59f8094c70 | [
"MIT"
] | 6 | 2017-12-22T03:47:37.000Z | 2021-03-13T03:45:26.000Z | import unittest
import numpy as np
from dexpy.samplers import hit_and_run, uniform_simplex_sample
class TestSimplexSampler(unittest.TestCase):
"""Tests the uniform simplex sampler."""
def test_simplex_sample(self):
"""Generates a uniform sample, checks dimensions, and that the rows sum to 1."""
... | 32.695652 | 88 | 0.5625 |
ca4585de08342ca189901d8b334b504b729d46da | 161 | py | Python | exercises/ja/exc_03_14_03.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/ja/exc_03_14_03.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/ja/exc_03_14_03.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | import spacy
nlp = spacy.blank("ja")
people = ["デヴィッド・ボウイ", "アンゲラ・メルケル", "レディー・ガガ"]
# PhraseMatcherのパターンのリストを作成
patterns = [nlp(person) for person in people]
| 17.888889 | 46 | 0.701863 |
ca756e6c92db1fbbb85591bea20635fe435f1587 | 659 | py | Python | 996A-hit-the-lottery.py | spreusler/codeforces-loesungen | cc8ddcc8a3c5a25906dc92ad001f7e9570a62de3 | [
"MIT"
] | null | null | null | 996A-hit-the-lottery.py | spreusler/codeforces-loesungen | cc8ddcc8a3c5a25906dc92ad001f7e9570a62de3 | [
"MIT"
] | null | null | null | 996A-hit-the-lottery.py | spreusler/codeforces-loesungen | cc8ddcc8a3c5a25906dc92ad001f7e9570a62de3 | [
"MIT"
] | null | null | null | # Name: 996 A. Hit the Lottery
# URL: https://codeforces.com/problemset/problem/996/A
# Language: Python 3.x
def main():
# Deklaration der Summe der erforderlichen Scheine
sum_bills = 0
# Einlesen des Input als Integer
n = int(input())
# Erzeugen einer Liste an moeglichen Scheinen
bills = [10... | 22.724138 | 61 | 0.629742 |
04cf5c8c6824bebb92d6eca8ccb97fa20d28f687 | 592 | py | Python | divvydash/dashboard/migrations/0002_auto_20200409_2152.py | Sawyer-Middeleer/divvy-dash | 5ef1738d47516949f7288b56b5c92a5c7d1d9d42 | [
"MIT"
] | null | null | null | divvydash/dashboard/migrations/0002_auto_20200409_2152.py | Sawyer-Middeleer/divvy-dash | 5ef1738d47516949f7288b56b5c92a5c7d1d9d42 | [
"MIT"
] | 5 | 2020-06-06T01:45:31.000Z | 2021-06-10T19:59:14.000Z | divvydash/dashboard/migrations/0002_auto_20200409_2152.py | Sawyer-Middeleer/divvy-dash | 5ef1738d47516949f7288b56b5c92a5c7d1d9d42 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.4 on 2020-04-10 02:52
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='station',
name='num_bikes_disabled',
... | 23.68 | 58 | 0.586149 |
04ff3c2b41462993edf0b4a7976abf201605d509 | 26,359 | py | Python | MILITAN-main/RAKA.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | MILITAN-main/RAKA.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | MILITAN-main/RAKA.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | # -*- coding: utf-8
# Author by : ☆ ANGGA ☆
# Github : Bajingan-Z
# Facebook : Angga
# Instagram : raka_andrian27
# Twitter : Bangsat_XD
# NOTE ...!!!
# JANGAN DI UBAH LAGI ANJING SCRIPT UDAH ENAK ...
# Meskipun Mau di Ubah IZIN DULU YA CUK ???
import os
try:
import requests
except ImportError:
os.system("pip2... | 48.454044 | 565 | 0.615691 |
b6ee84a0b56f285e76f96009b5a46b4cb632d5c8 | 446 | py | Python | TestCodeArchive/PythonCode/SocketTest/vibrationWithInterface.py | tobiasdossinger/percy | c2ca6f21fcd6830ffd6d3879f7bcaaa5b87335e5 | [
"MIT"
] | null | null | null | TestCodeArchive/PythonCode/SocketTest/vibrationWithInterface.py | tobiasdossinger/percy | c2ca6f21fcd6830ffd6d3879f7bcaaa5b87335e5 | [
"MIT"
] | null | null | null | TestCodeArchive/PythonCode/SocketTest/vibrationWithInterface.py | tobiasdossinger/percy | c2ca6f21fcd6830ffd6d3879f7bcaaa5b87335e5 | [
"MIT"
] | null | null | null | from tkinter import *
import socket
HOST = '192.168.178.41' # The server's hostname or IP address
PORT = 80 # The port used by the server
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((HOST, PORT))
def sliderChanged(value):
sock.sendall(str.encode(value + "\n"))
master = Tk()
w =... | 16.518519 | 76 | 0.692825 |
b61e089aad25344891dae8bb76cf2a041132967a | 1,275 | py | Python | src/nfz_module/adapter/CameraAdapter.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | src/nfz_module/adapter/CameraAdapter.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | src/nfz_module/adapter/CameraAdapter.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | import time
import picamera
import picamera.array
import numpy as np
from model.CameraData import CameraData
from adapter.SensorAdapter import SensorAdapter
__author__ = 'Hans-Werner Roitzsch'
class CameraAdapter(SensorAdapter):
def __init__(self):
try:
self.camera = picamera.PiCamera()
#self.camera.resolu... | 28.333333 | 79 | 0.709804 |
b683a116bb572eb57542110d55951e76806bdb45 | 402 | py | Python | source/pkgsrc/lang/py-cmake-language-server/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/lang/py-cmake-language-server/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/lang/py-cmake-language-server/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-setup.py,v 1.1 2020/05/18 15:19:01 wiz Exp $
Don't hardcode version numbers.
--- setup.py.orig 2020-03-01 07:51:19.388557700 +0000
+++ setup.py
@@ -11,7 +11,7 @@ package_data = \
{'': ['*']}
install_requires = \
-['pygls>=0.8.1,<0.9.0', 'pyparsing>=2.4,<3.0']
+['pygls', 'pyparsing']
entry_points... | 25.125 | 76 | 0.636816 |
1e43e25c57439ebc4a8e0e734ff54b5333387514 | 16,943 | py | Python | keyboards/signum/3_0/elitec/keymaps/default/layout.py | fzf/qmk_toolbox | 10d6b425bd24b45002555022baf16fb11254118b | [
"MIT"
] | null | null | null | keyboards/signum/3_0/elitec/keymaps/default/layout.py | fzf/qmk_toolbox | 10d6b425bd24b45002555022baf16fb11254118b | [
"MIT"
] | null | null | null | keyboards/signum/3_0/elitec/keymaps/default/layout.py | fzf/qmk_toolbox | 10d6b425bd24b45002555022baf16fb11254118b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Add all used Unicode symbols to this list.
# The key (e.g. "SNEK") is used in keymap.c for "enum", "unicode_map" and "keymaps", so it needs to be a valid C variable name.
# The key is also used in this file to define the layout, so use recognizeable names.
# The value (e.g. "0x1f40d") is used... | 34.159274 | 227 | 0.459246 |
a211c9c517d5f3c056a4e40c62db622a1553a085 | 1,463 | py | Python | chapter7/facedetection.py | yangzhijiang/GeektimeTensorflow | 80479426a216d1d27fc78e53c581008ccec46cbe | [
"MIT"
] | 1 | 2020-02-16T13:31:42.000Z | 2020-02-16T13:31:42.000Z | chapter7/facedetection.py | yangzhijiang/GeektimeTensorflow | 80479426a216d1d27fc78e53c581008ccec46cbe | [
"MIT"
] | null | null | null | chapter7/facedetection.py | yangzhijiang/GeektimeTensorflow | 80479426a216d1d27fc78e53c581008ccec46cbe | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# @Time : 2019/3/15 14:36
# @Author : LunaFire
# @Email : gilgemesh2012@gmail.com
# @File : facedetection.py
import cv2
import matplotlib.pyplot as plt
import face_recognition
IMAGE_PATH = '../data/chapter7/test_face_detection.jpg'
CASC_PATH = '../data/chapter7/haarcascade_frontalfa... | 23.983607 | 74 | 0.654819 |
7881ace615b384ff104bce9104df5ec23ad593b9 | 2,453 | py | Python | src/onegov/org/models/person_move.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/models/person_move.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/models/person_move.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.page import Page
from onegov.form import FormDefinition
from onegov.reservation import Resource
class PersonMove(object):
""" Represents a single move of a linked person. """
def __init__(self, session, obj, subject, target, direction):
self.session = session
self.obj = obj
... | 27.561798 | 79 | 0.599266 |
152ef9cfcb905d4fc49d69393f460a1a67ad9107 | 1,442 | py | Python | packages/OpenCV/nodes/OpenCV___PutText0/OpenCV___PutText0.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | packages/OpenCV/nodes/OpenCV___PutText0/OpenCV___PutText0.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | packages/OpenCV/nodes/OpenCV___PutText0/OpenCV___PutText0.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | from custom_src.NodeInstance import NodeInstance
from custom_src.Node import Node
import cv2
# USEFUL
# self.input(index) <- access to input data
# self.outputs[index].set_val(val) <- set output data port value
# self.main_widget <- access to main widget
class PutText_NodeI... | 27.207547 | 127 | 0.634535 |
157ce618c1b067d002531fae160db14b735a7090 | 207 | py | Python | Scripts/AdditonOfDigitsOfAGivenNumber.py | kenanchristian/hacktoberfest | b55750bf4facb77abd532b66ed37101e2895c4d7 | [
"MIT"
] | 8 | 2020-10-26T06:51:06.000Z | 2021-04-02T13:01:27.000Z | Scripts/AdditonOfDigitsOfAGivenNumber.py | kenanchristian/hacktoberfest | b55750bf4facb77abd532b66ed37101e2895c4d7 | [
"MIT"
] | 71 | 2020-10-25T22:46:02.000Z | 2021-10-14T06:47:39.000Z | Scripts/AdditonOfDigitsOfAGivenNumber.py | kenanchristian/hacktoberfest | b55750bf4facb77abd532b66ed37101e2895c4d7 | [
"MIT"
] | 77 | 2020-10-24T01:53:46.000Z | 2021-10-01T06:25:27.000Z | # Python program to
# compute sum of digits in
# number.
# Function to get sum of digits
def getSum(n):
sum = 0
for digit in str(n):
sum += int(digit)
return sum
n = 12345
print(getSum(n))
| 13.8 | 32 | 0.63285 |
eccd5a64518922a6a8441a01bd5cf8b02c95fcf9 | 1,780 | py | Python | Chapter7_CNN/Chapter7_3_CNN_Optimization/cnnMnistData.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter7_CNN/Chapter7_3_CNN_Optimization/cnnMnistData.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter7_CNN/Chapter7_3_CNN_Optimization/cnnMnistData.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | from typing import Tuple
from tensorflow.keras.layers import Activation
from tensorflow.keras.layers import Conv2D
from tensorflow.keras.layers import Dense
from tensorflow.keras.layers import Flatten
from tensorflow.keras.layers import Input
from tensorflow.keras.layers import MaxPool2D
from tensorflow.keras.models i... | 24.054054 | 76 | 0.646067 |
ece3adf5fd2438e15096bb73405e3a480d5dbbf4 | 8,437 | py | Python | backtester.py | matthewmercuri/mdbacktestv2 | 2525113458cdf71e7d99ac208ad35aea92169b99 | [
"MIT"
] | null | null | null | backtester.py | matthewmercuri/mdbacktestv2 | 2525113458cdf71e7d99ac208ad35aea92169b99 | [
"MIT"
] | null | null | null | backtester.py | matthewmercuri/mdbacktestv2 | 2525113458cdf71e7d99ac208ad35aea92169b99 | [
"MIT"
] | null | null | null | import os
from datetime import datetime, timedelta
from loggingmod import Log
import pandas as pd
from portfolio import Portfolio
''' TODO:
- Make adjustments to cash while executing trades
- Fix methods of checking trades validity
- Fix cost basis adjustment
- Figure out a way to get only call _get_todays_df() method... | 39.985782 | 109 | 0.640868 |
1795872f3e6a4016771f03180469ac5eb0cb718b | 1,755 | py | Python | Home/views.py | NAL0/nalbt | c411ead60fac8923e960e67f4bbad5c7aeffc614 | [
"MIT"
] | null | null | null | Home/views.py | NAL0/nalbt | c411ead60fac8923e960e67f4bbad5c7aeffc614 | [
"MIT"
] | null | null | null | Home/views.py | NAL0/nalbt | c411ead60fac8923e960e67f4bbad5c7aeffc614 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.contrib.auth.decorators import login_required
# Create your views here.
def index(request):
return render(request, 'Home/home.html')
def index2(request):
return render(request, "Home/SDG's.html")
@login_required
def index3(request):
return render(request, 'Home... | 21.666667 | 60 | 0.7151 |
bdc2fd3b1424707b508b4fd981ce49c5da3c600e | 1,659 | py | Python | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_05_Kontrollstrukturen/07_kapitel_05_repetitionsaufgabe_06_loan_repayment.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_05_Kontrollstrukturen/07_kapitel_05_repetitionsaufgabe_06_loan_repayment.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_05_Kontrollstrukturen/07_kapitel_05_repetitionsaufgabe_06_loan_repayment.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
###
# File: 07_kapitel_05_repetitionsaufgabe_06_loan_repayment.py
# Project: Kapitel_05_Kontrollstrukturen
# Created Date: Saturday 23.02.2019, 22:54
# Author: Apop85
# -----
# Last Modified: Saturday 23.02.2019, 23:20
# -----
# Copyright (c) 2019 Apop85
# This software is ... | 34.5625 | 192 | 0.715491 |
e55cca37cb6671bc4c54e5e61254b341d624041a | 1,121 | py | Python | SleekSecurity/layers/frontend.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | SleekSecurity/layers/frontend.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | SleekSecurity/layers/frontend.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | from tkinter import *
from tkinter.filedialog import askopenfile
from tkinter import messagebox
import os
import sys
import subprocess
root = Tk()
w, h = root.winfo_screenwidth(), root.winfo_screenheight()
root.geometry("%dx%d+0+0" % (w, h))
root.focus_set()
root.bind("<Escape>", lambda e: e.widget.quit())
root.config... | 35.03125 | 122 | 0.67975 |
c114d2c0d3026cb2acaa3a000fb982bd29f74caf | 6,104 | py | Python | Packs/AzureSQLManagement/Integrations/AzureSQLManagement/AzureSQLManagement_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/AzureSQLManagement/Integrations/AzureSQLManagement/AzureSQLManagement_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/AzureSQLManagement/Integrations/AzureSQLManagement/AzureSQLManagement_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import json
import io
import demistomock as demisto
from AzureSQLManagement import Client
def util_load_json(path):
with io.open(path, mode='r', encoding='utf-8') as f:
return json.loads(f.read())
def mock_client(mocker, http_request_result=None):
mocker.patch.object(demisto, 'getIntegrationContext'... | 42.685315 | 117 | 0.698067 |
8243285c7737e7661cce42a8e43d3f3056f82314 | 1,173 | py | Python | smsbomber.py | Nxuser741/SMSBomber-python | 9df768427b0d22451b837d7ea5c68be2069b7142 | [
"Apache-2.0"
] | null | null | null | smsbomber.py | Nxuser741/SMSBomber-python | 9df768427b0d22451b837d7ea5c68be2069b7142 | [
"Apache-2.0"
] | null | null | null | smsbomber.py | Nxuser741/SMSBomber-python | 9df768427b0d22451b837d7ea5c68be2069b7142 | [
"Apache-2.0"
] | null | null | null | import requests
def start():
spanduk = "\n ______ __________ __ \n / __/ |/ / __/ _ )___ __ _ / / ___ ____\n _\ \/ /|_/ /\ \/ _ / _ \/ ' \/ _ \/ -_) __/\n/___/_/ /_/___/____/\___/_/_/_/_.__/\__/_/ \n"
print(spanduk)
def hajar(nope):
BASE = "PC Me"
head = {"LANG":"en"... | 30.076923 | 210 | 0.542199 |
d4099593d96d3d780138cbe57b6e423cb1484997 | 793 | py | Python | Packs/CommonScripts/Scripts/CompareLists/CompareLists.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/CompareLists/CompareLists.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/CompareLists/CompareLists.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import *
def compare(left, right):
return {
'ListCompare':
{
'LeftOnly': [x for x in left if x not in right],
'RightOnly': [x for x in right if x not in left],
'Both': [x for x in left if x in... | 24.030303 | 65 | 0.556116 |
2e28a1105cac1924cc5b9e90c0c70ddd55d561b2 | 615 | py | Python | Beginner/03. Python/Factorial of any number.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | 1 | 2021-10-04T05:41:43.000Z | 2021-10-04T05:41:43.000Z | Beginner/03. Python/Factorial of any number.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | null | null | null | Beginner/03. Python/Factorial of any number.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | null | null | null | f=1
ui=int(input("enter the number to get factorial : "))
for x in range(1,ui+1):
f= f*x
print("factoral of ",ui ," is ",f)
//adding another method of finding factorial using recursion//
def factorial(n):
if n == 1:
return n
else:
return n*recur_factorial(n-1)
# take input from the u... | 25.625 | 66 | 0.629268 |
5acee9e26eee8d411eba9f8b66501e40a2dbe15f | 265 | py | Python | listings/chapter09/fork.py | rh0-me/ITHandbuch10 | 1582d6317e11cc958a14e157440dccf94d44583b | [
"Apache-2.0"
] | 6 | 2021-08-04T19:42:53.000Z | 2022-01-17T14:24:45.000Z | listings/chapter09/fork.py | rh0-me/ITHandbuch10 | 1582d6317e11cc958a14e157440dccf94d44583b | [
"Apache-2.0"
] | 1 | 2021-08-30T06:32:08.000Z | 2021-08-30T06:42:46.000Z | listings/chapter09/fork.py | rh0-me/ITHandbuch10 | 1582d6317e11cc958a14e157440dccf94d44583b | [
"Apache-2.0"
] | 1 | 2022-02-17T10:32:17.000Z | 2022-02-17T10:32:17.000Z | import os
pid = os.fork()
if pid == 0:
print("Child process")
for i in range(1, 10000):
print(" Child: {}".format(i))
else:
print("Parent process. Child: {}".format(pid))
for i in range(1, 10000):
print("Parent: {}".format(i))
| 18.928571 | 50 | 0.54717 |
5ad5997c0936a5b1d18252b0321a5b58496c326e | 441 | py | Python | app/models/abtms/Email.py | nucleo-de-telessaude-do-maranhao/abtms | 8d1b1df223d9f07fc4447836011f3e3678625d59 | [
"MIT"
] | null | null | null | app/models/abtms/Email.py | nucleo-de-telessaude-do-maranhao/abtms | 8d1b1df223d9f07fc4447836011f3e3678625d59 | [
"MIT"
] | null | null | null | app/models/abtms/Email.py | nucleo-de-telessaude-do-maranhao/abtms | 8d1b1df223d9f07fc4447836011f3e3678625d59 | [
"MIT"
] | 1 | 2019-03-13T14:34:24.000Z | 2019-03-13T14:34:24.000Z |
from flask import request, session, render_template, jsonify, redirect
from flask_mail import Message
from app import app, mail
class Email():
def __init__(self):
pass
def send(self, title="", message="", email=""):
msg = Message(
title,
sender='lawsclassroom@gmail.co... | 20.045455 | 70 | 0.578231 |
cffdde71d47d927ba3c47e6c4c05a88faa83624a | 425 | py | Python | Beginner/03. Python/MoveZeroes.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | 3 | 2021-03-16T16:44:04.000Z | 2021-06-07T17:32:51.000Z | Beginner/03. Python/MoveZeroes.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | 1 | 2020-10-03T16:21:40.000Z | 2020-10-03T16:21:40.000Z | Beginner/03. Python/MoveZeroes.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | 2 | 2020-10-12T15:58:02.000Z | 2020-10-20T05:31:11.000Z | #Given an array nums, write a function to move all zeroes to the end of it while maintaining the relative order of
#the non-zero elements.
array1 = [0,1,0,3,12]
array2 = [1,7,0,0,8,0,10,12,0,4]
def solution(nums):
for i in nums:
if 0 in nums:
nums.remove(0)
nums.append(0)
retu... | 18.478261 | 115 | 0.604706 |
7a2f3ccb080f30ac0a27d80652a57a4df475fbc8 | 16,918 | py | Python | Python/GuiStepscope/s11.py | jimwaschura/Automation | f655feeea74ff22ebe44d8b68374ba6983748f60 | [
"BSL-1.0"
] | null | null | null | Python/GuiStepscope/s11.py | jimwaschura/Automation | f655feeea74ff22ebe44d8b68374ba6983748f60 | [
"BSL-1.0"
] | null | null | null | Python/GuiStepscope/s11.py | jimwaschura/Automation | f655feeea74ff22ebe44d8b68374ba6983748f60 | [
"BSL-1.0"
] | null | null | null | # s11.py
# ================================================================================
# BOOST SOFTWARE LICENSE
#
# Copyright 2020 BitWise Laboratories Inc.
# Original Author.......Jim Waschura
# Contact...............info@bitwiselabs.com
#
# Permission is hereby granted, free of charge, to any person or organizat... | 42.295 | 119 | 0.589372 |
7a3ad0e4ff9c13c39a331d9f4fc348d8c184a56c | 3,534 | py | Python | python/coursera_python/MICHIGAN/WEB/week5/ass/ass_f.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/MICHIGAN/WEB/week5/ass/ass_f.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/MICHIGAN/WEB/week5/ass/ass_f.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import xml.etree.ElementTree as ET
#data = '''
#<person>
# <name>Chuck</name>
# <phone type="intl">
# +1 734 303 4456
# </phone>
# <email hide="yes"/>
#</person>'''
data = '''
<commentinfo>
<note>This file contains the actual data for your assignment - good luck!</note>
<comments>
<comment>
<name>Aon</name>
... | 14.911392 | 80 | 0.665818 |
a433f1f0ea5f4d2970a06511136e442621f4c406 | 716 | py | Python | simple-sklearn-demo/test1/chineseCountVector.py | crackedcd/Intern.MT | 36398837af377a7e1c4edd7cbb15eabecd2c3103 | [
"MIT"
] | 1 | 2019-07-05T03:42:17.000Z | 2019-07-05T03:42:17.000Z | simple-sklearn-demo/test1/chineseCountVector.py | crackedcd/Intern.MT | 36398837af377a7e1c4edd7cbb15eabecd2c3103 | [
"MIT"
] | null | null | null | simple-sklearn-demo/test1/chineseCountVector.py | crackedcd/Intern.MT | 36398837af377a7e1c4edd7cbb15eabecd2c3103 | [
"MIT"
] | 1 | 2019-06-24T05:56:55.000Z | 2019-06-24T05:56:55.000Z | from sklearn.feature_extraction.text import CountVectorizer
import jieba
def count_demo():
data = [
"中文文本特征这里是一个苹果苹果苹果",
"中文文本特征这里是一个梨",
"中文文本特征这些是一些桔子桔子"
]
data = cut_word_list(data)
# 使用stop_words传入列表, 使用停用词
# cv = CountVectorizer(stop_words=["apple"])
cv = CountVecto... | 19.888889 | 59 | 0.649441 |
a48959a058149288f80b0c8ee37961c412aa7b13 | 2,193 | py | Python | 3_DeepLearning-CNNs/04_CNN_Optimization/3-Validation/CNN.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | 3_DeepLearning-CNNs/04_CNN_Optimization/3-Validation/CNN.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | 3_DeepLearning-CNNs/04_CNN_Optimization/3-Validation/CNN.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | import os
from tensorflow.keras.layers import *
from tensorflow.keras.activations import *
from tensorflow.keras.models import *
from tensorflow.keras.optimizers import *
from tensorflow.keras.initializers import *
from tensorflow.keras.callbacks import *
from Dataset_class import MNIST
mnist = MNIST()
mnist.data_au... | 26.743902 | 92 | 0.715002 |
f1551c9428123e392246c79b5a16b93a16b14b61 | 6,087 | py | Python | frappe-bench/apps/erpnext/erpnext/stock/doctype/delivery_trip/delivery_trip.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/stock/doctype/delivery_trip/delivery_trip.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/stock/doctype/delivery_trip/delivery_trip.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import datetime
import frappe
import googlemaps
from frappe import _
from frappe.model.document import Document
from frappe.utils.user i... | 33.445055 | 101 | 0.74848 |
f15ca9a0ab26c8134273a03d7b50618afcec06d2 | 5,543 | py | Python | src/diagrams/icons/osaPng.py | kkaruso/niv | 67ba82c93279db4dae503d4dceec7ba5e9931c0a | [
"MIT"
] | null | null | null | src/diagrams/icons/osaPng.py | kkaruso/niv | 67ba82c93279db4dae503d4dceec7ba5e9931c0a | [
"MIT"
] | null | null | null | src/diagrams/icons/osaPng.py | kkaruso/niv | 67ba82c93279db4dae503d4dceec7ba5e9931c0a | [
"MIT"
] | null | null | null | # This module is automatically generated by autogen.sh. DO NOT EDIT.
from . import _ICONS
class _OSA(_ICONS):
_type = "osa"
_icon_dir = "../resources/icons/osa/png"
class OsaArrowGreenLeftPng(_OSA):
_icon = "osa-arrow-green-left.png"
class OsaArrowYellowRightPng(_OSA):
_icon = "osa-arrow-yellow-r... | 17.376176 | 68 | 0.711348 |
74db7b3e269916a734b60e3dd5131359f6d0006e | 340 | py | Python | lib/python/qmk/tests/test_qmk_path.py | fzf/qmk_toolbox | 10d6b425bd24b45002555022baf16fb11254118b | [
"MIT"
] | null | null | null | lib/python/qmk/tests/test_qmk_path.py | fzf/qmk_toolbox | 10d6b425bd24b45002555022baf16fb11254118b | [
"MIT"
] | null | null | null | lib/python/qmk/tests/test_qmk_path.py | fzf/qmk_toolbox | 10d6b425bd24b45002555022baf16fb11254118b | [
"MIT"
] | null | null | null | import os
from pathlib import Path
import qmk.path
def test_keymap_onekey_pytest():
path = qmk.path.keymap('handwired/onekey/pytest')
assert path.samefile('keyboards/handwired/onekey/keymaps')
def test_normpath():
path = qmk.path.normpath('lib/python')
assert path.samefile(Path(os.environ['ORIG_CWD... | 22.666667 | 69 | 0.732353 |
2470e9aed42b897ab009417ca0c38fc79cf85f10 | 603 | py | Python | src/test/mock.py | kaphka/imi-master-thesis | 2331a3534dc32e30a1333bb21c68c1e1b07ec9e4 | [
"MIT"
] | 2 | 2018-04-27T09:02:15.000Z | 2019-04-19T19:12:13.000Z | src/test/mock.py | kaphka/imi-master-thesis | 2331a3534dc32e30a1333bb21c68c1e1b07ec9e4 | [
"MIT"
] | 1 | 2019-04-19T19:13:08.000Z | 2021-02-22T21:29:55.000Z | src/test/mock.py | kaphka/imi-master-thesis | 2331a3534dc32e30a1333bb21c68c1e1b07ec9e4 | [
"MIT"
] | null | null | null | from torch.utils.data import Dataset
import numpy as np
import torch
class RandDataset(Dataset):
def __init__(self, size=10, img_size=32, channels= 3, labels=3):
self.size = size
self.img_size = img_size
self.channels = channels
self.y = torch.zeros((self.size)).long()
for ... | 30.15 | 71 | 0.618574 |
7056d239e2b16052d5ee777f21db36d04092d025 | 1,297 | py | Python | Projects/CFP-Scrapper/conf_scraper.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | 3 | 2021-03-16T16:44:04.000Z | 2021-06-07T17:32:51.000Z | Projects/CFP-Scrapper/conf_scraper.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | null | null | null | Projects/CFP-Scrapper/conf_scraper.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | 1 | 2020-10-26T08:44:01.000Z | 2020-10-26T08:44:01.000Z | # -*- coding: utf-8 -*-
"""Conf_Scraper.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1RI_PvSSKJl-t3dGJNxeTIXiRXPbrbzyM
"""
!pip install git+https://github.com/alirezamika/autoscraper.git
from autoscraper import AutoScraper
url = 'http://wi... | 23.160714 | 94 | 0.674634 |
3b22eb2e44ce7109aeb18df897f8f223476afd8e | 2,192 | py | Python | frappe-bench/apps/erpnext/erpnext/hr/doctype/leave_allocation/test_leave_allocation.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/hr/doctype/leave_allocation/test_leave_allocation.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/hr/doctype/leave_allocation/test_leave_allocation.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import frappe
import unittest
from frappe.utils import getdate
class TestLeaveAllocation(unittest.TestCase):
def test_overlapping_allocation(self):
frappe.db.sql("delete from `tabLeave Allocation`")
employee = frappe.get_doc("Employee", frappe.db.sql_list("select name ... | 30.873239 | 102 | 0.68385 |
3b38e1df5c30d7d2d9f3f9c05d6fe32da3b1d162 | 892 | py | Python | Grundlagen/TigerJython/07.2-Billard.py | jneug/schule-projekte | 4f1d56d6bb74a47ca019cf96d2d6cc89779803c9 | [
"MIT"
] | 2 | 2020-09-24T12:11:16.000Z | 2022-03-31T04:47:24.000Z | Grundlagen/TigerJython/07.2-Billard.py | jneug/schule-projekte | 4f1d56d6bb74a47ca019cf96d2d6cc89779803c9 | [
"MIT"
] | 1 | 2021-02-27T15:06:27.000Z | 2021-03-01T16:32:48.000Z | Grundlagen/TigerJython/07.2-Billard.py | jneug/schule-projekte | 4f1d56d6bb74a47ca019cf96d2d6cc89779803c9 | [
"MIT"
] | 1 | 2021-02-24T05:12:35.000Z | 2021-02-24T05:12:35.000Z | from gturtle import *
# Lässt eine Billardkugel (dot) über den Bildschirm wandern
def laufe(geschwindigkeit, durchmesser):
# Änderung der Kugel in X- und Y-Richtung festlegen
deltaX = geschwindigkeit
deltaY = geschwindigkeit/2
# Größe des Bildschirms ermitteln
# siehe dazu das Bild im Tauschor... | 25.485714 | 59 | 0.613229 |
8e70d89aa16c8cc5662d85866a1d5fb958166a1a | 1,122 | py | Python | Packs/CommonScripts/Scripts/ModifyDateTime/ModifyDateTime_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/ModifyDateTime/ModifyDateTime_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/ModifyDateTime/ModifyDateTime_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import pytest
import dateparser
from ModifyDateTime import apply_variation
@pytest.mark.parametrize('original_time, variation, expected', [
# sanity
('2020/01/01', 'in 1 day', '2020-01-02T00:00:00'),
# textual variation 1
('2020/01/01', 'yesterday', '2019-12-31T00:00:00'),
# textual variation 2
... | 38.689655 | 83 | 0.648841 |
d94c6aea1034df1bb9d36acd4611b2c3ab72d97f | 2,602 | py | Python | repo/script.module.urlresolver/lib/urlresolver/plugins/hdgo.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | 1 | 2017-11-26T18:18:46.000Z | 2017-11-26T18:18:46.000Z | repo/script.module.urlresolver/lib/urlresolver/plugins/hdgo.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | null | null | null | repo/script.module.urlresolver/lib/urlresolver/plugins/hdgo.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | 3 | 2019-09-30T19:52:05.000Z | 2020-04-12T21:20:56.000Z | """
Kodi urlresolver plugin
Copyright (C) 2016 script.module.urlresolver
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 3 of the License, or
(at your option) ... | 40.030769 | 114 | 0.601845 |
8db20683f1e14c6a44f13f8ac2c85eb14115a454 | 2,234 | py | Python | reports/sep/code/old/convert_dense_into_fcn.py | klawr/deepmech | 61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff | [
"MIT"
] | 1 | 2020-04-17T12:27:06.000Z | 2020-04-17T12:27:06.000Z | reports/sep/code/old/convert_dense_into_fcn.py | klawr/deepmech | 61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff | [
"MIT"
] | 1 | 2022-02-27T13:13:17.000Z | 2022-02-27T13:13:17.000Z | reports/sep/code/old/convert_dense_into_fcn.py | klawr/deepmech | 61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff | [
"MIT"
] | null | null | null | from tensorflow import keras
from os.path import join
import tensorflow as tf
path = join('reports', 'sep', 'code', 'reversed.jpg')
blob = tf.io.read_file(path)
blob = tf.image.decode_jpeg(blob, channels=1)
blob = tf.image.convert_image_dtype(blob, tf.float32)
print(blob.shape)
blob = tf.image.resize(blob, (231, 180)... | 35.460317 | 91 | 0.508953 |
30baf04419a04043a77771ccf5fc0e1775a7e35b | 402 | py | Python | exercises/zh/exc_04_12_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/zh/exc_04_12_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/zh/exc_04_12_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | import spacy
from spacy.tokens import Span
nlp = spacy.blank("zh")
doc1 = nlp("哔哩哔哩与阿里巴巴合作为博主们建立社群")
doc1.ents = [
Span(doc1, ____, ____, label="WEBSITE"),
Span(doc1, ____, ____, label="WEBSITE"),
]
doc2 = nlp("李子柒打破了Youtube的记录")
doc2.ents = [Span(doc2, ____, ____, label="WEBSITE")]
doc3 = nlp("阿里巴巴的创始人马云提供... | 21.157895 | 53 | 0.674129 |
c634efa117d45db24487dd4b6584a35b5875bf39 | 987 | py | Python | jumeaux/addons/dump/json.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 11 | 2017-10-02T01:29:12.000Z | 2022-03-31T08:37:22.000Z | jumeaux/addons/dump/json.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 79 | 2017-07-16T14:47:17.000Z | 2022-03-31T08:49:14.000Z | jumeaux/addons/dump/json.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 2 | 2019-01-28T06:11:58.000Z | 2021-01-25T07:21:21.000Z | # -*- coding:utf-8 -*-
import json
from owlmixin import OwlMixin, TList
from jumeaux.addons.dump import DumpExecutor
from jumeaux.models import DumpAddOnPayload
class Config(OwlMixin):
default_encoding: str = 'utf8'
force: bool = False
class Executor(DumpExecutor):
def __init__(self, config: dict):
... | 29.909091 | 77 | 0.641337 |
c657fe862b74f9f260435ce463801d32b2465cbd | 646 | py | Python | Curso-Em-Video-Python/1Materias/013_Estrutura_de_repeticoo_for/#013 - Estrutura de repetição for.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/1Materias/013_Estrutura_de_repeticoo_for/#013 - Estrutura de repetição for.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/1Materias/013_Estrutura_de_repeticoo_for/#013 - Estrutura de repetição for.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | '''for c in range(6, 0, -1):
(6, 0, -1) O -1 vai contar ao contrario e tbm da pra pular Ex(0, 6, 2)
print(c)
print('Fim')'''
'''n = int(input('Digite um numero: '))
for c in range(n+1): # colocar o +1 para chegar no numero correto do usuario
print(c)
print('Fim')'''
'''inicio = int(input('Qual n... | 29.363636 | 84 | 0.603715 |
d67e7663b57f9ac2474053d7cb9b0deab657e347 | 332 | py | Python | data.py | michhottinger/MedCab2bw | ba47b5cdfbde459393cf3708c018d60f8d021851 | [
"MIT"
] | null | null | null | data.py | michhottinger/MedCab2bw | ba47b5cdfbde459393cf3708c018d60f8d021851 | [
"MIT"
] | null | null | null | data.py | michhottinger/MedCab2bw | ba47b5cdfbde459393cf3708c018d60f8d021851 | [
"MIT"
] | null | null | null | #imports
import sqlite3
#connect to db
conn = sqlite3.connect('db.sqlite')
#create a function to query data
def q_all(query):
curs = conn.cursor()
curs.execute(query)
rows = curs.fetchall()
curs.close()
return rows
def q_one(query):
row = q_all(query)
return row[0][0]
#Create the table v... | 16.6 | 35 | 0.671687 |
ba5ba3dfb0eafc557d6801aa72cbbb810a492c09 | 5,552 | py | Python | research/cv/StarGAN/src/loss.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/StarGAN/src/loss.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/StarGAN/src/loss.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.819355 | 106 | 0.668768 |
baa7d22edb303b52af00cf28a118519b88370c20 | 2,394 | py | Python | ProjectEuler_plus/euler_012.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | ProjectEuler_plus/euler_012.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | ProjectEuler_plus/euler_012.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# https://www.hackerrank.com/contests/projecteuler/challenges/euler012
import sys
from collections import OrderedDict
from math import sqrt
def factors(n):
results = set()
for i in range(1, int(sqrt(n)) + 1):
if n % i == 0:
results.add(i)
results.add(int(n... | 36.272727 | 998 | 0.686299 |
244ade0babe6b11164dc4a8b5eedbdbd5f010135 | 4,333 | py | Python | src/data_science/data_science/in_out/widgetlords.py | viclule/api_models_deployment_framework | 7595cf0b4f3e277925b968014102d7561547bcd4 | [
"MIT"
] | null | null | null | src/data_science/data_science/in_out/widgetlords.py | viclule/api_models_deployment_framework | 7595cf0b4f3e277925b968014102d7561547bcd4 | [
"MIT"
] | null | null | null | src/data_science/data_science/in_out/widgetlords.py | viclule/api_models_deployment_framework | 7595cf0b4f3e277925b968014102d7561547bcd4 | [
"MIT"
] | null | null | null | """Tools to communicate with Widgetlords Devices."""
from platform import PLATFORM, LINUX
if PLATFORM == LINUX:
import widgetlords.pi_spi_din as wl
class WidgetLords():
def __init__(self):
wl.init()
def ai_module(self, chip_select):
"""
Analog input modul... | 39.752294 | 66 | 0.549735 |
d178b0b326f5ddfe097464af7123a4f01bd77039 | 3,772 | py | Python | frappe-bench/apps/erpnext/erpnext/healthcare/doctype/lab_test_template/lab_test_template.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/healthcare/doctype/lab_test_template/lab_test_template.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/healthcare/doctype/lab_test_template/lab_test_template.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015, ESS and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe, json
from frappe.model.document import Document
from frappe import _
class LabTestTemplate(Document):
def on_update(self):
#Item and Price List... | 30.918033 | 97 | 0.729321 |
d189b0ebd65e56b29985267682381b075f0a5b38 | 399 | py | Python | tag_1/p_3_5_groesster_gemeinsamer_teiler.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | tag_1/p_3_5_groesster_gemeinsamer_teiler.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | tag_1/p_3_5_groesster_gemeinsamer_teiler.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | """
3 for/while-Schleifen (Tag 1)
3.5 Berechne für zwei Zahlen den GGT unter Verwendung einer Variante des euklidischen Algorithmus.
Beispiel: Ergebnis für 7 und 9 ist 1, für 5 und 10 ist 5, für 24 und 87 ist 3.
"""
def ggT(a, b):
while b != 0:
a, b = b, a % b
return a
if __name__ == '__main__':
... | 21 | 98 | 0.611529 |
d19ba1a741e556fa98838da8634cee1a761383b6 | 1,385 | py | Python | Datastructures/bst-dfs.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | Datastructures/bst-dfs.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | Datastructures/bst-dfs.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | class BST:
def __init__(self, data):
self.data = data
self.left = None
self.right = None
def addNode(self, data):
if self.data == data:
return
if data < self.data:
if self.left:
self.left.addNode(data)
else:
... | 22.704918 | 53 | 0.488087 |
c99acb0b88bc34c03a587a62ad03fc3ab6b5b846 | 403 | py | Python | pyconuk/templatetags/sponsors.py | PyconUK/2017.pyconuk.org | 337a00c034a15e5b41a8ea8683dd44310e14fb9c | [
"MIT"
] | 3 | 2017-10-24T13:33:29.000Z | 2017-10-30T10:47:28.000Z | pyconuk/templatetags/sponsors.py | PyconUK/2017.pyconuk.org | 337a00c034a15e5b41a8ea8683dd44310e14fb9c | [
"MIT"
] | 78 | 2017-02-14T16:49:58.000Z | 2018-04-19T06:28:42.000Z | pyconuk/templatetags/sponsors.py | PyconUK/2017.pyconuk.org | 337a00c034a15e5b41a8ea8683dd44310e14fb9c | [
"MIT"
] | 36 | 2017-06-19T07:48:38.000Z | 2018-01-19T11:08:10.000Z | # -*- encoding: utf-8
from django import template
register = template.Library()
@register.filter
def colspan(row):
# Each row in the sponsor table will have 1, 2 or 3 entries. That means
# there are six columns overall, which we divide up based on row length.
if len(row) not in (1, 2, 3):
raise... | 26.866667 | 76 | 0.669975 |
4e6fc91cef914ce41b3e80062af6a9db76ecc5e9 | 193 | py | Python | geotagger/__init__.py | jakubroztocil/geotagger | fa79945e88facafadc29090a991abe95f57e7ad5 | [
"MIT"
] | 26 | 2017-03-14T01:20:12.000Z | 2021-11-30T20:37:10.000Z | geotagger/geotagger/__init__.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 2 | 2017-06-25T22:08:04.000Z | 2018-05-26T20:10:06.000Z | geotagger/__init__.py | jakubroztocil/geotagger | fa79945e88facafadc29090a991abe95f57e7ad5 | [
"MIT"
] | 10 | 2017-04-18T13:18:15.000Z | 2020-04-27T11:50:26.000Z | import logging
__author__ = 'Jakub Roztocil'
__version__ = '0.0.3'
__licence__ = 'MIT'
log = logging.getLogger(__name__)
log.setLevel(logging.DEBUG)
log.addHandler(logging.StreamHandler())
| 16.083333 | 39 | 0.761658 |
11286cd9db0bc883cef2c135f30bf59f566dc1ba | 33,801 | py | Python | model_zoo/ernie-3.0/compress_trainer.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | model_zoo/ernie-3.0/compress_trainer.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | model_zoo/ernie-3.0/compress_trainer.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020-present the HuggingFace Inc. team.
# Copyright (c) 2022 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.o... | 43.279129 | 101 | 0.586077 |
3a0807d8d7c4100ac622b265d1014250259fe599 | 1,223 | py | Python | Django/ballon/migrations/0001_initial.py | ballon3/GRAD | c630e32272fe34ead590c04d8360169e02be87f1 | [
"MIT"
] | null | null | null | Django/ballon/migrations/0001_initial.py | ballon3/GRAD | c630e32272fe34ead590c04d8360169e02be87f1 | [
"MIT"
] | null | null | null | Django/ballon/migrations/0001_initial.py | ballon3/GRAD | c630e32272fe34ead590c04d8360169e02be87f1 | [
"MIT"
] | null | null | null | # Generated by Django 2.1 on 2018-08-28 06:29
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Category',
fields=[
... | 33.972222 | 136 | 0.568275 |
a333b2fcc9f338298f19003904ad8747ea415319 | 4,642 | py | Python | internal/auto_download.py | WarcraftPriests/sl-shadow-priest | 4c8753592b3cc18c6d2de7e9227e5adb8cef3208 | [
"MIT"
] | 13 | 2020-04-10T17:34:49.000Z | 2022-02-13T04:04:30.000Z | internal/auto_download.py | WarcraftPriests/sl-shadow-priest | 4c8753592b3cc18c6d2de7e9227e5adb8cef3208 | [
"MIT"
] | 213 | 2020-04-10T04:15:00.000Z | 2022-01-20T19:18:55.000Z | internal/auto_download.py | WarcraftPriests/sl-shadow-priest | 4c8753592b3cc18c6d2de7e9227e5adb8cef3208 | [
"MIT"
] | 7 | 2020-10-08T07:22:08.000Z | 2021-07-08T21:09:33.000Z | """downloads the nightly simc"""
#!/usr/bin/env python
import glob
import os
import re
import subprocess
import time
import shutil
import requests
from requests.exceptions import RequestException
BASE_URL = "http://downloads.simulationcraft.org/nightly"
def download_latest():
"""
Find, download, and extract... | 33.395683 | 90 | 0.660922 |
281cb2caa6fa7ac7d1db792461f5235d7cafc9e6 | 9,557 | py | Python | plugins/tff_backend/bizz/kyc/rogerthat_callbacks.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | null | null | null | plugins/tff_backend/bizz/kyc/rogerthat_callbacks.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 178 | 2017-08-02T12:58:06.000Z | 2017-12-20T15:01:12.000Z | plugins/tff_backend/bizz/kyc/rogerthat_callbacks.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 2 | 2018-01-10T10:43:12.000Z | 2018-03-18T10:42:23.000Z | # -*- coding: utf-8 -*-
# Copyright 2017 GIG Technology NV
#
# 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... | 53.99435 | 120 | 0.73182 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.