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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dc89c2d0b9607d854cd2cf76ef96a6907daf716f | 245 | py | Python | GeeksForGeeks/Pallindrome String/solution3.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 165 | 2020-10-03T08:01:11.000Z | 2022-03-31T02:42:08.000Z | GeeksForGeeks/Pallindrome String/solution3.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 383 | 2020-10-03T07:39:11.000Z | 2021-11-20T07:06:35.000Z | GeeksForGeeks/Pallindrome String/solution3.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 380 | 2020-10-03T08:05:04.000Z | 2022-03-19T06:56:59.000Z | # one-line solution for palindrome string
# check if a string is the same as its reverse
palindrome_check = lambda s: s[::-1] == s
#tests
print(palindrome_check("racecar"))
print(palindrome_check("abba"))
print(palindrome_check("palindrome"))
| 24.5 | 46 | 0.75102 |
df2127e1d22b586e7eb031dc8b0eee829834ec7d | 972 | py | Python | lib/util/MazeBuilder.py | Thukor/MazeSolver | c953e193ce27a7348e8ec9c5592144426dfce193 | [
"MIT"
] | 5 | 2018-02-06T22:48:34.000Z | 2020-01-07T20:19:05.000Z | lib/util/MazeBuilder.py | Thukor/MazeSolver | c953e193ce27a7348e8ec9c5592144426dfce193 | [
"MIT"
] | 11 | 2018-01-31T21:47:49.000Z | 2018-04-21T16:42:52.000Z | lib/util/MazeBuilder.py | Thukor/MazeSolver | c953e193ce27a7348e8ec9c5592144426dfce193 | [
"MIT"
] | 2 | 2020-06-18T05:40:03.000Z | 2022-02-02T03:46:30.000Z | from .MazeBuilderUtil import *
import networkx as nx
class MazeBuilder:
@staticmethod
def build_maze(table):
x_bound = len(table)
y_bound = len(table[0])
Maze = nx.Graph()
def build_maze_helper(i,j):
if i >= x_bound or i < 0:
return None
if j >= y_bound or y < 0:
return None
Maze.add_node((... | 28.588235 | 41 | 0.666667 |
df721cb2c31ba942e4da7d34e182d8f1ce1b785f | 896 | py | Python | Contests/VM7WC '16 #3 Silver - Can Shahir even get there.py | MastaCoder/Projects | ebb0a3134522b12f052fec8d753005f384adf1b1 | [
"MIT"
] | 5 | 2018-10-11T01:55:40.000Z | 2021-12-25T23:38:22.000Z | Contests/VM7WC '16 #3 Silver - Can Shahir even get there.py | MastaCoder/mini_projects | ebb0a3134522b12f052fec8d753005f384adf1b1 | [
"MIT"
] | null | null | null | Contests/VM7WC '16 #3 Silver - Can Shahir even get there.py | MastaCoder/mini_projects | ebb0a3134522b12f052fec8d753005f384adf1b1 | [
"MIT"
] | 1 | 2019-02-22T14:42:50.000Z | 2019-02-22T14:42:50.000Z | info = list(map(int, input().split(" ")))
obj = {n: [] for n in range(1, int(info[0]) + 1)}
for a in range(info[1]):
val = list(map(int, input().split(" ")))
if val[1] not in obj[val[0]]:
obj[val[0]].append(val[1])
if val[0] not in obj[val[1]]:
obj[val[1]].append(val[0])
print(obj)... | 21.333333 | 57 | 0.473214 |
338ac89050f027516acf7e9271cacbe9220dc3e0 | 4,236 | py | Python | genutil/email.py | MZH-bust/genutil | f17190ec484d5844f8950908cc07556a5b1429e7 | [
"MIT"
] | null | null | null | genutil/email.py | MZH-bust/genutil | f17190ec484d5844f8950908cc07556a5b1429e7 | [
"MIT"
] | null | null | null | genutil/email.py | MZH-bust/genutil | f17190ec484d5844f8950908cc07556a5b1429e7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import smtplib
from smtplib import SMTPResponseException,SMTPServerDisconnected,SMTPAuthenticationError, SMTPConnectError, \
SMTPException
from socket import error as socketerror
import mimetypes
from email.mime.multipart import MIMEMultipart
from email import encoders
from email.mime.audio... | 34.439024 | 109 | 0.623229 |
8938b4ff8f260fe6f57eb778cc33253bf13585a0 | 618 | py | Python | Tests/scripts/add_pr_comment.py | PAM360/content | 928aac9c586c6e593b2a452c402a37cb5df28dac | [
"MIT"
] | 2 | 2021-12-06T21:38:24.000Z | 2022-01-13T08:23:36.000Z | Tests/scripts/add_pr_comment.py | PAM360/content | 928aac9c586c6e593b2a452c402a37cb5df28dac | [
"MIT"
] | 87 | 2022-02-23T12:10:53.000Z | 2022-03-31T11:29:05.000Z | Tests/scripts/add_pr_comment.py | PAM360/content | 928aac9c586c6e593b2a452c402a37cb5df28dac | [
"MIT"
] | 2 | 2022-01-05T15:27:01.000Z | 2022-02-01T19:27:43.000Z | import os
from demisto_sdk.commands.test_content.execute_test_content import _add_pr_comment
from demisto_sdk.commands.test_content.execute_test_content import ParallelLoggingManager
JOB_ID = os.environ.get("CI_JOB_ID")
COVERAGE_LINK = f'https://xsoar.docs.pan.run/-/content/-/jobs/{JOB_ID}/artifacts/artifacts/coverag... | 41.2 | 115 | 0.794498 |
985caaa80e80cd4f1ab3bf6f85835430914bca49 | 3,852 | py | Python | notebooks_and_scripts/graph_miner/repositories/models/wikipedia_graph_retrieval_file.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | null | null | null | notebooks_and_scripts/graph_miner/repositories/models/wikipedia_graph_retrieval_file.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | null | null | null | notebooks_and_scripts/graph_miner/repositories/models/wikipedia_graph_retrieval_file.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | null | null | null | def {graph_method_name}(
directed: bool = False,
load_nodes: bool = True,
load_node_types: bool = True,
keep_nodes_without_descriptions: bool = True,
keep_nodes_without_categories: bool = True,
keep_interwikipedia_nodes: bool = True,
keep_external_nodes: bool = True,
compute_node_descrip... | 42.32967 | 99 | 0.702752 |
7f78773b4bbbb87c52bfa93f2279551a2a173cd3 | 26,159 | py | Python | hisim/components/heat_pump.py | sdickler/HiSim | 09a11d99f220f7cadb3cb7b09a6fce8f147243c8 | [
"MIT"
] | null | null | null | hisim/components/heat_pump.py | sdickler/HiSim | 09a11d99f220f7cadb3cb7b09a6fce8f147243c8 | [
"MIT"
] | null | null | null | hisim/components/heat_pump.py | sdickler/HiSim | 09a11d99f220f7cadb3cb7b09a6fce8f147243c8 | [
"MIT"
] | null | null | null | # Generic/Built-in
import numpy as np
import copy
import matplotlib
import seaborn
from math import pi
# Owned
import hisim.utils as utils
from hisim.components.weather import Weather
from hisim import component as cp
from hisim.loadtypes import LoadTypes, Units
from hisim.simulationparameters import SimulationParamet... | 45.414931 | 175 | 0.58068 |
63e9f85fddcb5984b55532e44d71a5274014a9ae | 4,554 | py | Python | _Dist/NeuralNetworks/h_RNN/RNN.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 1,107 | 2016-09-21T02:18:36.000Z | 2022-03-29T02:52:12.000Z | _Dist/NeuralNetworks/h_RNN/RNN.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 18 | 2016-12-22T10:24:47.000Z | 2022-03-11T23:18:43.000Z | _Dist/NeuralNetworks/h_RNN/RNN.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 776 | 2016-12-21T12:08:08.000Z | 2022-03-21T06:12:08.000Z | import os
import sys
root_path = os.path.abspath("../../../")
if root_path not in sys.path:
sys.path.append(root_path)
import numpy as np
import tensorflow as tf
from _Dist.NeuralNetworks.NNUtil import Toolbox
from _Dist.NeuralNetworks.Base import Generator3d
from _Dist.NeuralNetworks.c_BasicNN.NN import Basic
fr... | 39.6 | 102 | 0.641634 |
126675b6322d3d9c4bc2efcdb51114b1b4fde840 | 1,659 | py | Python | lat/correlation_test.py | Omaam/lat | bb72c43fc870a36e26a32b05000d091871e07ad5 | [
"MIT"
] | null | null | null | lat/correlation_test.py | Omaam/lat | bb72c43fc870a36e26a32b05000d091871e07ad5 | [
"MIT"
] | null | null | null | lat/correlation_test.py | Omaam/lat | bb72c43fc870a36e26a32b05000d091871e07ad5 | [
"MIT"
] | null | null | null | import unittest
import numpy as np
import correlation as corr
def _detect_lag_at_maxcorrelation(lags, r):
idx_rmax = np.argmax(r)
lag_rmax = lags[idx_rmax]
return lag_rmax
def _create_curve_with_normaldist(n_sample: int):
return np.random.normal(0, 1, n_sample)
def _create_lagging_paircurve(n_sam... | 23.7 | 57 | 0.655817 |
61396569f5c40f03a384185a746ce44a01d1d9f1 | 3,503 | py | Python | azext_keyvault/keyvault/models/deleted_sas_definition_bundle_py3.py | jdmartinez36/azure-keyvault-cli-extension | 4dc674b9c30cac13e27347782c49b3ed7dca2e2f | [
"MIT"
] | 2 | 2019-06-12T13:44:34.000Z | 2020-06-01T13:24:04.000Z | azext_keyvault/keyvault/models/deleted_sas_definition_bundle_py3.py | jdmartinez36/azure-keyvault-cli-extension | 4dc674b9c30cac13e27347782c49b3ed7dca2e2f | [
"MIT"
] | 5 | 2018-04-26T01:14:29.000Z | 2021-01-05T00:45:39.000Z | azext_keyvault/keyvault/models/deleted_sas_definition_bundle_py3.py | jdmartinez36/azure-keyvault-cli-extension | 4dc674b9c30cac13e27347782c49b3ed7dca2e2f | [
"MIT"
] | 8 | 2018-04-24T22:52:48.000Z | 2021-11-16T06:29:28.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 43.7875 | 83 | 0.640308 |
61bdb462dfb432087d165da710f33fb8da48abbb | 427 | py | Python | etl/data_enhancement/enhancement_translation/enhancement_translation.py | Betadinho/einander-helfen | 272f11397d80ab5267f39a7b36734495f1c00b0c | [
"MIT"
] | 7 | 2020-04-23T20:16:11.000Z | 2022-01-04T14:57:16.000Z | etl/data_enhancement/enhancement_translation/enhancement_translation.py | Betadinho/einander-helfen | 272f11397d80ab5267f39a7b36734495f1c00b0c | [
"MIT"
] | 361 | 2020-04-23T17:20:14.000Z | 2022-03-02T11:29:45.000Z | etl/data_enhancement/enhancement_translation/enhancement_translation.py | Betadinho/einander-helfen | 272f11397d80ab5267f39a7b36734495f1c00b0c | [
"MIT"
] | 1 | 2021-11-29T06:02:52.000Z | 2021-11-29T06:02:52.000Z | import pycountry
import gettext
def translate_english_countries(data):
"""Translates the country names from english to german."""
german = gettext.translation('iso3166', pycountry.LOCALES_DIR, languages=['de'])
for post in data:
if post['post_struct']['location']['country'] is not None:
... | 35.583333 | 115 | 0.690867 |
f65f6b7976a5b7f12732ce5d056461fe1404633b | 563 | py | Python | leetcode/377-Combination-Sum-IV/CombSumIV.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/377-Combination-Sum-IV/CombSumIV.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/377-Combination-Sum-IV/CombSumIV.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution(object):
def combinationSum4(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: int
"""
def func(nums, target, combSum):
res = 0
if target < 0 or target in combSum:
return combSum
... | 28.15 | 59 | 0.492007 |
9f43c7e1fbb707adaf569912e9c8b0a02175f751 | 647 | py | Python | tarefas-poo/lista-02/processa-numeros/view/paineis/painel_em_posicoes_impares.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-02/processa-numeros/view/paineis/painel_em_posicoes_impares.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-02/processa-numeros/view/paineis/painel_em_posicoes_impares.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | # --------------------------
# UFSC - CTC - INE - INE5603
# Exercício Processa Números
# --------------------------
# Classe responsável por encontrar os números em posições ímpares.
from view.paineis.painel_abstrato import PainelAbstrato
from model.processa_numeros import em_posicoes_impares
class PainelEmPosicoesIm... | 32.35 | 72 | 0.661515 |
4cb0262a3b1f4947cdd7a1dff7a7dc45401641b5 | 281 | py | Python | 3_intro_to_conditional_statements/solution.py | sourabhedake/hackerrank-30-days-of-code | c2d4ff6e8d9b4b1a2bb72a3b0a675b9ae09a8a5d | [
"MIT"
] | null | null | null | 3_intro_to_conditional_statements/solution.py | sourabhedake/hackerrank-30-days-of-code | c2d4ff6e8d9b4b1a2bb72a3b0a675b9ae09a8a5d | [
"MIT"
] | null | null | null | 3_intro_to_conditional_statements/solution.py | sourabhedake/hackerrank-30-days-of-code | c2d4ff6e8d9b4b1a2bb72a3b0a675b9ae09a8a5d | [
"MIT"
] | null | null | null | #!/bin/python3
if __name__ == '__main__':
N = int(input())
if N % 2 == 1:
print ("Weird")
else:
if N in range(2,6):
print ("Not Weird")
elif N in range(6,21):
print ("Weird")
else:
print ("Not Weird") | 21.615385 | 31 | 0.437722 |
64a183350508d24edbc6502d2427173ef88e6ccc | 21,389 | py | Python | Aoyama-master/client.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Aoyama-master/client.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Aoyama-master/client.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #!/usr/bin/env python3
#Code By Leeon123
###################################################
# This is a new version of python3-botnet project #
# Added new stuff like daemon, slowloris... #
# Good Luck have Fun #
###################################################
#-- Aoyama ... | 29.3 | 264 | 0.606386 |
3737a9cead800280aca44d18aa6817bbd32b44e6 | 1,399 | py | Python | 0-notes/job-search/Cracking the Coding Interview/C02LinkedLists/python/2.1-answer.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/Cracking the Coding Interview/C02LinkedLists/python/2.1-answer.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/Cracking the Coding Interview/C02LinkedLists/python/2.1-answer.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | # 2.1 Remove Dups
# Write code to remove duplicates from an unsorted linked list.
# FOLLOW UP: How would you solve this problem if a temporary buffer isn't allowed?
class Node:
def __init__(self, data):
self.data = data
self.next = None
class LinkedList:
def __init__(self):
self.hea... | 31.795455 | 83 | 0.581129 |
374944388345fcd304bc8f8295d7c997cd2c5fd0 | 1,109 | py | Python | test/test_roman_numerals.py | BilkisKhan/SASD | ea151f0ead9183e79a9995f6c951fcb2f6e3eca4 | [
"Apache-2.0"
] | null | null | null | test/test_roman_numerals.py | BilkisKhan/SASD | ea151f0ead9183e79a9995f6c951fcb2f6e3eca4 | [
"Apache-2.0"
] | null | null | null | test/test_roman_numerals.py | BilkisKhan/SASD | ea151f0ead9183e79a9995f6c951fcb2f6e3eca4 | [
"Apache-2.0"
] | null | null | null |
import unittest
# import sys
# print(sys.path)
from src.roman_numeral_converter import RomanNumeralConverter
class RomanNumeralConverterTest(unittest.TestCase):
def setUp(self):
self.my_converter = RomanNumeralConverter()
def test_converts_one(self):
self.assertEqual(self.my_converter.conv... | 27.04878 | 69 | 0.719567 |
ff1876efc96ae3715de9cab817b9404ea543839f | 91 | py | Python | superset/arm/data/superset_config.py | lichtwellenreiter/dockerfiles | bad31b1dafffdf95cfc7a83c7f012ae80245b501 | [
"MIT"
] | null | null | null | superset/arm/data/superset_config.py | lichtwellenreiter/dockerfiles | bad31b1dafffdf95cfc7a83c7f012ae80245b501 | [
"MIT"
] | null | null | null | superset/arm/data/superset_config.py | lichtwellenreiter/dockerfiles | bad31b1dafffdf95cfc7a83c7f012ae80245b501 | [
"MIT"
] | null | null | null | LOG_LEVEL = 'WARN'
ENABLE_PROXY_FIX = True
SECRET_KEY = '\2\1thisismyscretkey\1\2\e\y\y\h'
| 22.75 | 47 | 0.736264 |
4563c2bc027a83917ff42b7be96bc4e32c9cdbf6 | 723 | py | Python | Algorithms/2_Implementation/13.py | abphilip-codes/Hackerrank_DSA | bb9e233d9d45c5b14c138830602695ad4113fba4 | [
"MIT"
] | 1 | 2021-11-25T13:39:30.000Z | 2021-11-25T13:39:30.000Z | Algorithms/2_Implementation/13.py | abphilip-codes/Hackerrank_DSA | bb9e233d9d45c5b14c138830602695ad4113fba4 | [
"MIT"
] | null | null | null | Algorithms/2_Implementation/13.py | abphilip-codes/Hackerrank_DSA | bb9e233d9d45c5b14c138830602695ad4113fba4 | [
"MIT"
] | null | null | null | # https://www.hackerrank.com/challenges/day-of-the-programmer/problem
#!/bin/python3
import math
import os
import random
import re
import sys
#
# Complete the 'dayOfProgrammer' function below.
#
# The function is expected to return a STRING.
# The function accepts INTEGER year as parameter.
#
def dayOfProgrammer(y)... | 22.59375 | 123 | 0.648686 |
b341027beb6dfe0236287f2b1766888640452542 | 2,228 | py | Python | tests/core/test_plugin.py | ph7vc/CL4M-B0T | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 9 | 2019-02-17T06:33:14.000Z | 2021-10-05T02:19:00.000Z | tests/core/test_plugin.py | ns-phennessy/Bolt | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 28 | 2019-02-10T07:48:05.000Z | 2021-12-20T00:15:37.000Z | tests/core/test_plugin.py | ph7vc/CL4M-B0T | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 4 | 2015-03-13T03:58:55.000Z | 2015-05-27T08:29:46.000Z | import unittest
from bolt.core.plugin import Plugin
from bolt import interval, command, cron, webhook
from bolt import Bot
import yaml
class TestPlugin(Plugin):
def activate(self):
self.activated = True
def deactivate(self):
self.activated = False
@webhook("/test")
def webhooktest(s... | 25.318182 | 66 | 0.609964 |
b35e155c27c10c98038e5bf2a1e527ac639a978e | 5,819 | py | Python | tests/web.adblockplus.org/data/dataStripe.py | adblockplus/web.adblockplus.org | c2c570ce4f4296afc3577afe233c6b23b128f206 | [
"MIT"
] | 9 | 2016-01-29T18:05:29.000Z | 2021-10-06T04:21:55.000Z | tests/web.adblockplus.org/data/dataStripe.py | adblockplus/web.adblockplus.org | c2c570ce4f4296afc3577afe233c6b23b128f206 | [
"MIT"
] | 9 | 2015-04-06T19:03:32.000Z | 2019-05-28T13:34:55.000Z | tests/web.adblockplus.org/data/dataStripe.py | adblockplus/web.adblockplus.org | c2c570ce4f4296afc3577afe233c6b23b128f206 | [
"MIT"
] | 18 | 2015-04-06T17:42:31.000Z | 2021-10-06T04:26:29.000Z | TEST_EMAIL = 'testing@eyeotesting.com'
TEST_CARD_NUMBER = '4242424242424242'
TEST_CARD_EXPIRY = '0725'
TEST_CVC = '705'
TEST_ZIP = '70205'
MONTHLY_AMOUNT_UNDER_MINIMUM = '0.99'
ONE_TIME_AMOUNT_UNDER_MINIMUM = '4.99'
YEARLY_AMOUNT_UNDER_MINIMUM = '4.99'
MONTHLY_AMOUNT_UNDER_MINIMUM_ERROR = \
'Oops! To help cover... | 20.065517 | 120 | 0.560062 |
2fbf5741cf9f08107c2fb58d287509d1c4737936 | 583 | py | Python | frappe-bench/apps/erpnext/erpnext/healthcare/doctype/physician/test_physician.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/healthcare/doctype/physician/test_physician.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/healthcare/doctype/physician/test_physician.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015, ESS LLP and Contributors
# See license.txt
from __future__ import unicode_literals
import unittest
import frappe
test_dependencies = ['Physician Schedule']
class TestPhysician(unittest.TestCase):
def tearDown(self):
frappe.delete_doc_if_exists('Physician', '_Testdocto... | 27.761905 | 95 | 0.768439 |
ff259e92ad6ec8504d32a6af2ae5b9acec545639 | 2,150 | py | Python | tests/test_tarifkosten.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | tests/test_tarifkosten.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | tests/test_tarifkosten.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | import pytest # type:ignore[import]
from bo4e.bo.tarifkosten import Tarifkosten, TarifkostenSchema
from bo4e.enum.kundentyp import Kundentyp
from bo4e.enum.sparte import Sparte
from bo4e.enum.tarifart import Tarifart
from bo4e.enum.tarifmerkmal import Tarifmerkmal
from bo4e.enum.tariftyp import Tariftyp
from tests.se... | 41.346154 | 93 | 0.665116 |
443251783f3fe1cce11618d3a7a4983e6b85297f | 3,399 | py | Python | tests/test_004_mitgliedHinzufuegen.py | mribrgr/StuRa-Mitgliederdatenbank | 87a261d66c279ff86056e315b05e6966b79df9fa | [
"MIT"
] | 8 | 2019-11-26T13:34:46.000Z | 2021-06-21T13:41:57.000Z | src/tests/test_004_mitgliedHinzufuegen.py | Sumarbrander/Stura-Mitgliederdatenbank | 691dbd33683b2c2d408efe7a3eb28e083ebcd62a | [
"MIT"
] | 93 | 2019-12-16T09:29:10.000Z | 2021-04-24T12:03:33.000Z | src/tests/test_004_mitgliedHinzufuegen.py | Sumarbrander/Stura-Mitgliederdatenbank | 691dbd33683b2c2d408efe7a3eb28e083ebcd62a | [
"MIT"
] | 2 | 2020-12-03T12:43:19.000Z | 2020-12-22T21:48:47.000Z | import time
from selenium import webdriver
from django.urls import reverse
from tests.MyTestCase import MyTestCase
from tests.MyFuncLogin import loginAsLukasAdmin, loginAsLukasUser
from tests.MyFuncMitglieder import *
from tests.MyFuncAemter import createAmt
class TestMitgliedHinzufuegen(MyTestCase):
"""
... | 38.625 | 116 | 0.626066 |
9284a8efe14cff8966b1d7590030ec9930540fc9 | 979 | py | Python | apps/util/forms.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 1 | 2017-01-08T13:21:43.000Z | 2017-01-08T13:21:43.000Z | apps/util/forms.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 17 | 2018-12-03T14:22:14.000Z | 2021-07-14T15:15:12.000Z | apps/util/forms.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 2 | 2018-12-03T14:58:49.000Z | 2019-12-01T13:24:42.000Z | from django.core.cache import cache
from django.forms.models import ModelChoiceIterator, ModelChoiceField, ModelMultipleChoiceField
class CachingModelChoiceIterator(ModelChoiceIterator):
def _queryset_key(self):
return str(self.queryset.model._meta.label) + str(self.queryset.query.where).replace(" ", "")
... | 36.259259 | 101 | 0.665986 |
2bffb304910143c9f4a902c59d0fe0c5924024d0 | 496 | py | Python | 7-assets/past-student-repos/LambdaSchool-master/m6/61a1/src/16_sieve.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/LambdaSchool-master/m6/61a1/src/16_sieve.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/LambdaSchool-master/m6/61a1/src/16_sieve.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | def sieve(x):
print('haha x ' + str(x))
possiblePrimes = [True for i in range(x + 1)]
y = 2
while (y * y <= x):
if (possiblePrimes[y] == True):
for i in range(y * 2, x + 1, y):
possiblePrimes[i] = False
y += 1
possiblePrimes[0] = False
possiblePrime... | 23.619048 | 72 | 0.522177 |
5ba96986ddec3c76cb63af52f7bc5540014e6b1c | 195 | py | Python | src/nfz_module/model/ProcessedSensorData.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | src/nfz_module/model/ProcessedSensorData.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | src/nfz_module/model/ProcessedSensorData.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | from abc import ABCMeta, abstractmethod, abstractproperty
__author__ = 'Hans-Werner Roitzsch'
class ProcessedSensorData(metaclass=ABCMeta):
"""
Abstract Base Class: ProcessedSensorData
"""
| 19.5 | 57 | 0.789744 |
1b399b4a95d4c6a430545b95de1de2db85110021 | 3,990 | py | Python | haas_lib_bundles/python/docs/examples/fall_detection/esp32/code/fall_detection.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/docs/examples/fall_detection/esp32/code/fall_detection.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/docs/examples/fall_detection/esp32/code/fall_detection.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | ITER_NUM = 50
ACCELERATION_LOW_THREADHOLD = 4 # 加速度变化下限阈值,越大越灵敏
ACCELERATION_UP_THREADHOLD = 12 # 加速度变化上限阈值,越小越灵敏
ANGULAR_VELOCITY_LOW_THREADHOLD = 1 # 角速度变化下限阈值,越小越灵敏
ANGULAR_VELOCITY_UP_THREADHOLD = 40 # 角速度变化下限阈值,越大越灵敏
class fall_detection:
def __init__(self, mpu6886Dev):
self.mpu6886Dev = mpu6886D... | 37.641509 | 114 | 0.571178 |
1b8f8b4ef10f41a1f9b18db4f6ce142674457a05 | 99 | py | Python | tintz/newsletter/apps.py | dcfranca/tintz-backend | 9f29e17cafc31ab7dc568d1e2c984e6f1b1fc3fc | [
"MIT"
] | null | null | null | tintz/newsletter/apps.py | dcfranca/tintz-backend | 9f29e17cafc31ab7dc568d1e2c984e6f1b1fc3fc | [
"MIT"
] | 2 | 2021-03-19T21:51:51.000Z | 2021-06-10T18:22:50.000Z | tintz/newsletter/apps.py | danielfranca/tintz-backend | 9f29e17cafc31ab7dc568d1e2c984e6f1b1fc3fc | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class EmailMarketingConfig(AppConfig):
name = 'newsletter'
| 16.5 | 38 | 0.777778 |
1bbc6c51f41f1cdcbbc4aec7d599145e0cec6230 | 1,117 | py | Python | spell_check.py | fadhilthomas/PyIndonesianSpellChecker | a479c787438c2368b805bc246489cd838ded790e | [
"MIT"
] | 1 | 2021-04-05T18:18:22.000Z | 2021-04-05T18:18:22.000Z | spell_check.py | fadhilthomas/PyIndonesianSpellChecker | a479c787438c2368b805bc246489cd838ded790e | [
"MIT"
] | null | null | null | spell_check.py | fadhilthomas/PyIndonesianSpellChecker | a479c787438c2368b805bc246489cd838ded790e | [
"MIT"
] | null | null | null | import enchant
import sys
import re
from collections import Counter as mset
from argparse import ArgumentParser
def check(arr, string):
out = []
for i in arr:
if len(list((mset(i) & mset(string)).elements())) == len(string):
out.append(i)
if len(out) == 0:
out = arr
return out[0]
def load():... | 21.901961 | 73 | 0.606088 |
944f1b1c212cb48be734d62714d3d6b89d326d70 | 177 | py | Python | scripts/holaworld_sid.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/holaworld_sid.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/holaworld_sid.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | 1 | 2019-10-24T06:45:21.000Z | 2019-10-24T06:45:21.000Z | # LANGUAGE: python
# AUTHOR: Siddhant Verma
# GITHUB: https://github.com/siddver007
import time
message = 'Hola World! Amigos.'
for ch in message:
print ch,
time.sleep(0.5)
| 16.090909 | 39 | 0.717514 |
84fb5db69b6593861442910e322c2df31ef3c4e9 | 312 | py | Python | rfvision/models/human_analyzers/__init__.py | mvig-robotflow/rfvision | cc662f213dfe5a3e8864a6b5685a668a4436e397 | [
"Apache-2.0"
] | 6 | 2021-09-25T03:53:06.000Z | 2022-02-19T03:25:11.000Z | rfvision/models/human_analyzers/__init__.py | mvig-robotflow/rfvision | cc662f213dfe5a3e8864a6b5685a668a4436e397 | [
"Apache-2.0"
] | 1 | 2021-07-21T13:14:54.000Z | 2021-07-21T13:14:54.000Z | rfvision/models/human_analyzers/__init__.py | mvig-robotflow/rfvision | cc662f213dfe5a3e8864a6b5685a668a4436e397 | [
"Apache-2.0"
] | 2 | 2021-07-16T03:25:04.000Z | 2021-11-22T06:04:01.000Z | # from .handtailor import HandTailor
from .pose_lifter import PoseLifter
from .top_down import TopDown
from .interhand_3d import Interhand3D
from .base import BasePose
from .iknet import IKNet
from .handtailor import *
__all__ = ['TopDown', 'Interhand3D', 'BasePose',
'IKNet',
'PoseLifter'] | 31.2 | 48 | 0.733974 |
1e45a7367357cdb1c31e71a8ab1ab7fbe2c17fef | 2,373 | py | Python | frappe-bench/apps/erpnext/erpnext/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/selling/report/available_stock_for_packing_items/available_stock_for_packing_items.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import flt
def execute(filters=None):
if not filters: filters = {}
columns = get_columns()
iwq_map = get_item_ware... | 29.6625 | 88 | 0.702065 |
94f999edf1b9ef964097474d877378965cd5797b | 2,399 | py | Python | tarefas-poo/lista-03/relogio/view/interface_com_usuario.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-03/relogio/view/interface_com_usuario.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-03/relogio/view/interface_com_usuario.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | # --------------------------
# UFSC - CTC - INE - INE5663
# Exercício do Relógio
# --------------------------
# Classe que representa a interface com o usuário
#
from view.menu import Menu
from view.paineis.painel_cria_relogio import PainelCriaRelogio
from view.paineis.painel_manipula_relogio import PainelManipulaRelo... | 36.907692 | 87 | 0.538141 |
bf61cd0a28a0fb6ca45f232a5c0507e64627f69e | 508 | py | Python | USACOClassGold/src/talldraw.py | javaarchive/USACOClass2020 | 4ae563014b9b2da3e1361e175d38e72308a8da89 | [
"MIT"
] | null | null | null | USACOClassGold/src/talldraw.py | javaarchive/USACOClass2020 | 4ae563014b9b2da3e1361e175d38e72308a8da89 | [
"MIT"
] | null | null | null | USACOClassGold/src/talldraw.py | javaarchive/USACOClass2020 | 4ae563014b9b2da3e1361e175d38e72308a8da89 | [
"MIT"
] | null | null | null | fline = list(map(int,input().split(" ")))
N = fline[0]
R = fline[3]
spaces = 2
def fillStr(instr, a, b,content):
instr = list(instr)
for x in range(a, b):
instr[x] = content
return "".join(instr)
for x in range(N):
print(str(x).ljust(spaces, " ")+" ",end="")
print(" ",end="")
print()
fullstr... | 29.882353 | 86 | 0.535433 |
bf65450c3a9e2224c6d9847b4511c82b0f882416 | 874 | py | Python | CareerTinderServer/CareerTinder/urls.py | sarojaerabelli/HVGS | 86ec3d2de496540ca439c40f4a0c58c47aa181cf | [
"MIT"
] | 1 | 2016-09-18T16:40:27.000Z | 2016-09-18T16:40:27.000Z | CareerTinderServer/CareerTinder/urls.py | sarojaerabelli/HVGS | 86ec3d2de496540ca439c40f4a0c58c47aa181cf | [
"MIT"
] | null | null | null | CareerTinderServer/CareerTinder/urls.py | sarojaerabelli/HVGS | 86ec3d2de496540ca439c40f4a0c58c47aa181cf | [
"MIT"
] | null | null | null | from django.conf.urls import url, include
from material.frontend import urls as frontend_urls
from . import views, tinder, resume_upload, resume_retrieval, take_picture
urlpatterns = [
url(r'^review/(?P<idx>[0-9]+)/', tinder.review_page, name='review_page'),
url(r'^review', tinder.review_page, name='review_p... | 46 | 94 | 0.693364 |
bfb7ddd4299b53ffa5a5067c5e03e3218af8c84a | 176 | py | Python | exercises/ja/solution_03_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/ja/solution_03_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/ja/solution_03_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
# ja_core_news_sm モデルを読み込む
nlp = spacy.load("ja_core_news_sm")
# パイプラインの名前を出力
print(nlp.pipe_names)
# (name, component) のタプルからなるパイプライン情報を表示
print(nlp.pipeline)
| 16 | 39 | 0.789773 |
ec6f8afc3a5cb150d56ab25d0e337ae6a818cbe8 | 862 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v7_2/empty_supplied_items_for_non_subcontracted.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/v7_2/empty_supplied_items_for_non_subcontracted.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v7_2/empty_supplied_items_for_non_subcontracted.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
for doctype in ["Purchase Order", "Purchase Invoice", "Purchase Receipt"]:
child_table = 'Purchase Receipt Item Supp... | 61.571429 | 115 | 0.725058 |
171fa91a118847dcec0d731a56fd053652ba63e9 | 540 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch04_strings/ex11_morse_code_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch04_strings/ex11_morse_code_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch04_strings/ex11_morse_code_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
import pytest
from ch04_strings.solutions.ex11_morse_code import to_morse_code
@pytest.mark.parametrize("input, expected",
[("SOS", ". . . - - - . . ."),
("TWEET", "- . - ... | 30 | 64 | 0.47037 |
9720f5918a2982a0177541b058198c2a8c22871d | 1,674 | py | Python | official/cv/c3d/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/c3d/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/c3d/export.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... | 42.923077 | 100 | 0.74552 |
2e86c4845383068a21c3fe1518de4db03761336b | 419 | py | Python | Programming Languages/Python/Theory/100_Python_Challenges/Section _1_Basic_Coding_Exercises/11. check if given year, month has Friday 13th.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 101 | 2021-12-20T11:57:11.000Z | 2022-03-23T09:49:13.000Z | Programming Languages/Python/Theory/100_Python_Challenges/Section _1_Basic_Coding_Exercises/11. check if given year, month has Friday 13th.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 4 | 2022-01-12T11:55:56.000Z | 2022-02-12T04:53:33.000Z | Programming Languages/Python/Theory/100_Python_Challenges/Section _1_Basic_Coding_Exercises/11. check if given year, month has Friday 13th.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 38 | 2022-01-12T11:56:16.000Z | 2022-03-23T10:07:52.000Z | """
Write a function that accepts two arguments year and month, and then checks if the month has Friday the 13th.
Example:
year = 2020, month = 3
Expected output = True
"""
from datetime import datetime
def check_friday_13(yr, mon):
user_date = datetime(yr, mon, 13)
if user_date.strftime("%A") == "Friday... | 22.052632 | 109 | 0.670644 |
8fc72c9a84ee4d0499ff9ab5378f63ef0df84b05 | 1,088 | py | Python | CodeStatistics/files/c54f7e2c-0728-439d-aa48-93e29cbac5c0/django_rbac/rbac/migrations/0002_auto_20181005_0748.py | zhangyafeii/Flask | 9c9a5ea282f77aabcda838796dad2411af9b519f | [
"MIT"
] | null | null | null | CodeStatistics/files/c54f7e2c-0728-439d-aa48-93e29cbac5c0/django_rbac/rbac/migrations/0002_auto_20181005_0748.py | zhangyafeii/Flask | 9c9a5ea282f77aabcda838796dad2411af9b519f | [
"MIT"
] | null | null | null | CodeStatistics/files/c54f7e2c-0728-439d-aa48-93e29cbac5c0/django_rbac/rbac/migrations/0002_auto_20181005_0748.py | zhangyafeii/Flask | 9c9a5ea282f77aabcda838796dad2411af9b519f | [
"MIT"
] | null | null | null | # Generated by Django 2.0.5 on 2018-10-04 23:48
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('rbac', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
name='permission',
options={'verbose_name_plu... | 26.536585 | 61 | 0.545956 |
713b22078da649e1888a71d7b77b8a53478aecc8 | 2,021 | py | Python | Challenge_4/challange_4.py | joeherold/weekly_coding_challenge_fwkwkw_python | 5c2795fdf38970a387540141ad95408c527a7779 | [
"MIT"
] | 1 | 2020-05-15T13:43:16.000Z | 2020-05-15T13:43:16.000Z | Challenge_4/challange_4.py | joeherold/weekly_coding_challenge_fwkwkw_python | 5c2795fdf38970a387540141ad95408c527a7779 | [
"MIT"
] | 4 | 2020-05-15T17:46:52.000Z | 2020-07-06T11:48:37.000Z | Challenge_4/challange_4.py | joeherold/weekly_coding_challenge_fwkwkw_python | 5c2795fdf38970a387540141ad95408c527a7779 | [
"MIT"
] | null | null | null |
def getAbstand(p1, p2):
# Calculate distance between two point tupels
# frist get delta x
x1 = p1[0]
x2 = p2[0]
deltaX = x2 - x1
# then get delta y
y1 = p1[1]
y2 = p2[1]
deltaY = y2 - y1
# then we take advantage of Pythagoras a^2 + b^2 = c^2
distance = ( deltaX**2 + deltaY**2 ) ** 0.5
retu... | 24.349398 | 98 | 0.602672 |
f11a31770a0d3176ad78be5d73cbaf3a7732871d | 48,006 | py | Python | crawl.py | LukasWillin/NLP-Wiki-Crawler | e1fdad7c25b0947d8ca5a845fa247c957c42b75d | [
"MIT"
] | null | null | null | crawl.py | LukasWillin/NLP-Wiki-Crawler | e1fdad7c25b0947d8ca5a845fa247c957c42b75d | [
"MIT"
] | null | null | null | crawl.py | LukasWillin/NLP-Wiki-Crawler | e1fdad7c25b0947d8ca5a845fa247c957c42b75d | [
"MIT"
] | null | null | null | # coding=utf-8
#
# Original Source (24 September 2011) http://www.netinstructions.com/how-to-make-a-web-crawler-in-under-50-lines-of-python-code/
# Original Author: Stephen
# License: -
#
# Adapted for nlp 4iCa @FHNW Fachhochschule Nordwestschweiz
# Author: Lukas Willin
# Date: 14.15.2019
# License: GPLv3
from html.pa... | 80.277592 | 3,814 | 0.701683 |
77d5193862f3667da53d5976ba44226c28ed740b | 3,051 | py | Python | home-assistant/custom_components/cracow_air_quality/sensor.py | Adamvg/SmartHouse | 740b010260f6f6b38a19e2a75d431446abd54253 | [
"MIT"
] | 136 | 2019-06-27T08:11:47.000Z | 2022-03-11T12:26:53.000Z | home-assistant/custom_components/cracow_air_quality/sensor.py | Venkysgithu/SmartHouse | d4e42dbbbb1f535f1684d507de411a4421b92e4d | [
"MIT"
] | 5 | 2020-05-30T00:19:22.000Z | 2022-03-25T18:49:47.000Z | home-assistant/custom_components/cracow_air_quality/sensor.py | Venkysgithu/SmartHouse | d4e42dbbbb1f535f1684d507de411a4421b92e4d | [
"MIT"
] | 63 | 2019-07-15T21:11:58.000Z | 2022-03-13T09:43:24.000Z | import logging
import json
from datetime import datetime, timedelta
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from requests import (Request, Session)
_LOGGER = logging.getLogger(__name__)
from homeassistant.helpers.entity import Entity
from homeassistant.components.sensor import PLA... | 26.763158 | 71 | 0.675844 |
248d6e7ab88e3567e3950771e7d65ab7727e91e1 | 724 | py | Python | PYTHON/Basic_Data_Types/nested_lists.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Basic_Data_Types/nested_lists.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Basic_Data_Types/nested_lists.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
import operator
if __name__ == '__main__':
students = []
for _ in range(int(input())):
temp = []
name = input()
score = float(input())
temp.append(name)
temp.append(score)
students.append(temp)
min_val = min(students, key=o... | 23.354839 | 64 | 0.571823 |
d955c0efb749c5f2a2066724dd058b53a234d2a3 | 2,222 | py | Python | 20-hs-redez-sem/groups/05-decentGames/src/IdkYet.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-hs-redez-sem/groups/05-decentGames/src/IdkYet.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-hs-redez-sem/groups/05-decentGames/src/IdkYet.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | import sys
from AbsGame import AbsGame
from Chess import Chess
from Commands import Invoker, Display, Move, TurnOf, Allowed, GInfo, WhoAmI, Forfeit, Status, Refresh, Fetch
from DontGetAngry import DontGetAngry
from RPC import RequestServer
import _thread as t
def initialise_server():
RequestServer()
class Game... | 33.666667 | 108 | 0.521602 |
798b14ffaf0230582213e640d5aedc94f50ed2f1 | 10,294 | py | Python | NaiveBayes/src/NaiveBayes.py | quqixun/MLAlgorithms | 1ad46a899a6280a08c196fb4eb0931408c8636c7 | [
"MIT"
] | 2 | 2018-04-25T18:00:28.000Z | 2018-08-08T09:39:18.000Z | NaiveBayes/src/NaiveBayes.py | quqixun/MLAlgorithms | 1ad46a899a6280a08c196fb4eb0931408c8636c7 | [
"MIT"
] | null | null | null | NaiveBayes/src/NaiveBayes.py | quqixun/MLAlgorithms | 1ad46a899a6280a08c196fb4eb0931408c8636c7 | [
"MIT"
] | 2 | 2019-03-03T02:55:48.000Z | 2021-01-21T04:50:46.000Z | # Conventional Machine Learning Algorithms
# Class of "NaiveBayes".
# Author: Qixun Qu
# Create on: 2018/04/23
# Modify on: 2018/04/25
# ,,, ,,,
# ;" '; ;' ",
# ; @.ss$$$$$$s.@ ;
# `s$$$$$$$$$$$$$$$'
# $$$$$$$$$$$$$$$$$$
# $$$$P""Y$$$Y""W$$$$$
# $$$$ p"$$$"q $$$$$
# $$$$ .$$$$$. $$... | 30.455621 | 92 | 0.430251 |
79a04537234ffbcf585d0bb532e99e0f00fc909e | 1,586 | py | Python | tests/onegov/newsletter/test_collection.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/newsletter/test_collection.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/newsletter/test_collection.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import pytest
from onegov.newsletter import NewsletterCollection, RecipientCollection
from onegov.newsletter.errors import AlreadyExistsError
def test_newsletter_collection(session):
newsletters = NewsletterCollection(session)
n = newsletters.add("My Newsletter", "<h1>My Newsletter</h1>")
assert n.name... | 25.580645 | 71 | 0.699243 |
30b5613f637e11b04608e8535761a57bbd6e6ab2 | 1,383 | py | Python | leetcode/352-Data-Stream-as-Disjoint-Intervals/DataStreamasDisjointIntervals.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/352-Data-Stream-as-Disjoint-Intervals/DataStreamasDisjointIntervals.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/352-Data-Stream-as-Disjoint-Intervals/DataStreamasDisjointIntervals.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | # Definition for an interval.
# class Interval(object):
# def __init__(self, s=0, e=0):
# self.start = s
# self.end = e
class SummaryRanges(object):
def __init__(self):
"""
Initialize your data structure here.
"""
self.intervals = []
def addNum(self, val):
... | 26.09434 | 93 | 0.455531 |
695bd174bf755040880cbb274fca2f74cc6c007e | 381 | py | Python | Vorlesungsinhalte/2020-11-02_Damen/Python-Code/main.py | wwi20ama-programmierung/python-intro | e779e3f600b7e54b7c5baef503b79065bdc3cdb6 | [
"MIT"
] | null | null | null | Vorlesungsinhalte/2020-11-02_Damen/Python-Code/main.py | wwi20ama-programmierung/python-intro | e779e3f600b7e54b7c5baef503b79065bdc3cdb6 | [
"MIT"
] | null | null | null | Vorlesungsinhalte/2020-11-02_Damen/Python-Code/main.py | wwi20ama-programmierung/python-intro | e779e3f600b7e54b7c5baef503b79065bdc3cdb6 | [
"MIT"
] | 2 | 2020-10-08T18:08:59.000Z | 2020-10-29T19:53:34.000Z | import test
import spielfeld
import damen
# Tests ausführen!
test.test_zeile()
test.test_spalte()
test.test_diagonale1()
test.test_diagonale2()
feld = spielfeld.new_spielfeld(4)
spielfeld.print_spielfeld(feld)
damen.damen(feld,0)
spielfeld.print_spielfeld(feld)
# Konzepte - Wiederholung
# - List Comprehensions
#... | 15.24 | 37 | 0.779528 |
ebf1d3b1ff0b241f8c813af98ac89c638ebcb5df | 3,061 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/trigger/csv2vss.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/trigger/csv2vss.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/trigger/csv2vss.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2013-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.ec... | 36.440476 | 99 | 0.605684 |
23653366d6c9831883af21f08bc21993fb367b92 | 3,403 | py | Python | babelbox/cli.py | OrangeUtan/babelbox | 3dd01e078aea8aa352ff5606179d5e1e09f4b827 | [
"MIT"
] | 2 | 2021-03-18T04:34:23.000Z | 2021-03-23T17:35:07.000Z | babelbox/cli.py | OrangeUtan/babelbox | 3dd01e078aea8aa352ff5606179d5e1e09f4b827 | [
"MIT"
] | null | null | null | babelbox/cli.py | OrangeUtan/babelbox | 3dd01e078aea8aa352ff5606179d5e1e09f4b827 | [
"MIT"
] | null | null | null | import enum
import logging
from pathlib import Path
from typing import List, Optional
import typer
import babelbox
from .parser import load_languages, merge_languages, write_language_files
class CSVDialect(enum.Enum):
EXCEL = "excel"
EXCEL_TAB = "excel-tab"
UNIX = "unix"
def version_callback(value: b... | 28.123967 | 96 | 0.60094 |
237e8563a3328859896a08f9211cb705306c6854 | 619 | py | Python | Problems/Two Pointers/easy/ReverseVowelsOfString/reverse_vowels_of_string.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Problems/Two Pointers/easy/ReverseVowelsOfString/reverse_vowels_of_string.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Problems/Two Pointers/easy/ReverseVowelsOfString/reverse_vowels_of_string.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | # def reverseVowels(s: str) -> str:
# vowel = 'AEIOUaeiou'
# s = list(s)
# p1, p2 = 0, len(s) - 1
#
# while p1 < p2:
# while s[p1] not in vowel and p1 < p2:
# p1 = p1 + 1
# while s[p2] not in vowel and p1 < p2:
# p2 = p2 - 1
# s[p1], s[p2] = s[p2], s[p1]
#... | 28.136364 | 77 | 0.462036 |
0032aea959f3354303615e3cc5f258e53704290e | 3,902 | py | Python | verto/processors/VideoBlockProcessor.py | uccser/verto | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 4 | 2017-04-10T06:09:54.000Z | 2019-05-04T02:07:40.000Z | verto/processors/VideoBlockProcessor.py | uccser/verto | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 268 | 2017-04-03T20:40:46.000Z | 2022-02-04T20:10:08.000Z | verto/processors/VideoBlockProcessor.py | uccser/kordac | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 1 | 2019-01-07T15:46:31.000Z | 2019-01-07T15:46:31.000Z | from verto.processors.GenericTagBlockProcessor import GenericTagBlockProcessor
from verto.errors.NoVideoIdentifierError import NoVideoIdentifierError
from verto.errors.UnsupportedVideoPlayerError import UnsupportedVideoPlayerError
from verto.processors.utils import parse_arguments
from verto.utils.HtmlParser import Htm... | 37.519231 | 100 | 0.615325 |
cc96c8b312a8d3c7892a3fc70f1f80dc2438ed00 | 2,420 | py | Python | Tests/Marketplace/Tests/remove_existing_pack_from_private_id_set_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Tests/Marketplace/Tests/remove_existing_pack_from_private_id_set_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Tests/Marketplace/Tests/remove_existing_pack_from_private_id_set_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from Tests.Marketplace.remove_existing_pack_from_private_id_set import remove_old_pack_from_private_id_set
PRIVATE_ID_SET = {
"scripts": [],
"playbooks": [],
"integrations": [
{
"Accessdata": {
"name": "Accessdata",
"pack": "Accessdata"
}
... | 29.512195 | 110 | 0.599174 |
9d929aff4979b9dc0dd413afcbbea199838d20c8 | 148 | py | Python | sks/sks/doctype/compliant/test_compliant.py | Shankarv19bcr/SKSSSSS | c5899d125b635e199fc6817282a13cf0aa60f2bc | [
"MIT"
] | null | null | null | sks/sks/doctype/compliant/test_compliant.py | Shankarv19bcr/SKSSSSS | c5899d125b635e199fc6817282a13cf0aa60f2bc | [
"MIT"
] | null | null | null | sks/sks/doctype/compliant/test_compliant.py | Shankarv19bcr/SKSSSSS | c5899d125b635e199fc6817282a13cf0aa60f2bc | [
"MIT"
] | null | null | null | # Copyright (c) 2022, Thirvusoft and Contributors
# See license.txt
# import frappe
import unittest
class TestCompliant(unittest.TestCase):
pass
| 16.444444 | 49 | 0.783784 |
ee07dacbb45df7a3435e94c86728572ec8ee75ec | 269 | py | Python | books/SystemProgramming/ch3_introduction/settings.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/SystemProgramming/ch3_introduction/settings.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/SystemProgramming/ch3_introduction/settings.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import os
from dotenv import load_dotenv
base_dir = os.path.dirname(__file__)
env_path = os.path.join(base_dir, ".env")
load_dotenv(dotenv_path=env_path)
MANAGEMENT_SERVER = os.getenv("MANAGEMENT_SERVER")
SERVER1 = os.getenv("SERVER1")
SERVER2 = os.getenv("SERVER2")
| 24.454545 | 50 | 0.776952 |
4e8a7a0d6246c068e71ace0c68494fd217379a8d | 4,589 | py | Python | python/correct_designations.py | sma-h/openapc-de | 0ec2d42d525219d801f71538f5b30ca6fecd9d3a | [
"Cube"
] | 89 | 2015-02-13T13:46:06.000Z | 2022-03-13T16:42:44.000Z | python/correct_designations.py | sma-h/openapc-de | 0ec2d42d525219d801f71538f5b30ca6fecd9d3a | [
"Cube"
] | 91 | 2015-03-12T13:31:36.000Z | 2022-01-14T07:37:37.000Z | python/correct_designations.py | sma-h/openapc-de | 0ec2d42d525219d801f71538f5b30ca6fecd9d3a | [
"Cube"
] | 138 | 2015-03-04T15:23:43.000Z | 2022-03-09T15:11:52.000Z | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import argparse
import codecs
import re
import sys
import openapc_toolkit as oat
ARG_HELP_STRINGS = {
"csv_file": "The OpenAPC-conforming file where journal and publisher " +
"names should be updated should be updated",
"encoding": "The encoding ... | 42.100917 | 85 | 0.573328 |
4e8a7cd6b708c1726614388b9e36455f4ed49364 | 884 | py | Python | src/api/main.py | hvuhsg/LinkSH | 8d315a2f8df6be45abb8e62732764b3af85cb8f8 | [
"MIT"
] | 2 | 2021-04-12T21:51:59.000Z | 2021-04-13T14:56:28.000Z | src/api/main.py | hvuhsg/LinkSH | 8d315a2f8df6be45abb8e62732764b3af85cb8f8 | [
"MIT"
] | null | null | null | src/api/main.py | hvuhsg/LinkSH | 8d315a2f8df6be45abb8e62732764b3af85cb8f8 | [
"MIT"
] | null | null | null | from secrets import token_urlsafe
from fastapi import APIRouter, HTTPException, status
from fastapi.responses import RedirectResponse
from pydantic import AnyUrl
from db import DB
api_router = APIRouter()
@api_router.post("/link")
def new_link(long_link: AnyUrl):
db = DB.get_instance()
length = 50
while... | 27.625 | 97 | 0.708145 |
4e9d510570157ad6719d8111a2a90f142e08560d | 9,499 | py | Python | beispielanwendungen/apfelmann/apfelmann.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 5 | 2017-03-11T13:27:27.000Z | 2022-01-09T10:52:05.000Z | beispielanwendungen/apfelmann/apfelmann.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 2 | 2021-02-14T10:59:59.000Z | 2021-10-30T21:46:32.000Z | beispielanwendungen/apfelmann/apfelmann.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 1 | 2019-08-07T03:08:18.000Z | 2019-08-07T03:08:18.000Z |
# -*- coding: utf-8 -*-
import sys, numpy
from PyQt4 import QtCore, QtGui
def main(argv):
app = QtGui.QApplication(argv)
mainwindow = MainWindow()
mainwindow.show()
sys.exit(app.exec_())
class RenderThread(QtCore.QThread):
__pyqtSignals__ = ( "imageRendered(QImage)" )
def __init__... | 37.397638 | 125 | 0.49721 |
14f2579d7f973931ff66916d2ebf1ce64ccf58e9 | 182 | py | Python | python/primary/break.py | EstherLacan/jiangfw | a449b1925742873c76dc1b3284aedb359204bc76 | [
"Apache-2.0"
] | 1 | 2020-07-29T16:43:46.000Z | 2020-07-29T16:43:46.000Z | python/primary/break.py | EstherLacan/jiangfw | a449b1925742873c76dc1b3284aedb359204bc76 | [
"Apache-2.0"
] | null | null | null | python/primary/break.py | EstherLacan/jiangfw | a449b1925742873c76dc1b3284aedb359204bc76 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Filename: break.py
while True:
s=raw_input('Enter an integer:')
if s=='quit':
break
print('Length of the string is ', len(s))
print('done')
| 16.545455 | 45 | 0.598901 |
eec465a3cc33724075c4168d17bb1ee6d2e28dae | 2,522 | py | Python | etl/data_enhancement/enhancement_location/request_string_cleaner.py | Betadinho/einander-helfen | 272f11397d80ab5267f39a7b36734495f1c00b0c | [
"MIT"
] | 7 | 2020-04-23T20:16:11.000Z | 2022-01-04T14:57:16.000Z | etl/data_enhancement/enhancement_location/request_string_cleaner.py | Betadinho/einander-helfen | 272f11397d80ab5267f39a7b36734495f1c00b0c | [
"MIT"
] | 361 | 2020-04-23T17:20:14.000Z | 2022-03-02T11:29:45.000Z | etl/data_enhancement/enhancement_location/request_string_cleaner.py | Betadinho/einander-helfen | 272f11397d80ab5267f39a7b36734495f1c00b0c | [
"MIT"
] | 1 | 2021-11-29T06:02:52.000Z | 2021-11-29T06:02:52.000Z | import re
from bs4 import BeautifulSoup
from shared.logger_factory import LoggerFactory
class RequestStringCleaner:
"""Class that handles removing irrelevant address fields, leading to better api results"""
@staticmethod
def clean_request_string(request_string):
"""Cleans the given request string... | 36.028571 | 112 | 0.666138 |
6d80a2a8aca14e8c08abd541a97c31adc2ec3c8c | 979 | py | Python | INBa/2015/Ermashov_A_V/task_4_5.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Ermashov_A_V/task_4_5.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Ermashov_A_V/task_4_5.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Напишите программу, которая выводит имя, под которым скрывается Фредерик Аустерлиц.
#Дополнительно необходимо вывести область интересов указанной личности, место рождения,
#годы рождения и смерти (если человек умер), вычислить возраст на данный момент (или момент смерти).
#Для хранения всех необходимых данных требу... | 46.619048 | 113 | 0.779367 |
09d748d183c4a40332147dd13463b7760d229dd5 | 1,086 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/ch07_recursion_advanced/intro/nqueens_intro.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch07_recursion_advanced/intro/nqueens_intro.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch07_recursion_advanced/intro/nqueens_intro.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
from ch06_arrays.intro.intro import get_dimension
def solve_n_queens(size):
board = initialize_board(size)
solved = solve_n_queens_helper(board, 0)
return solved, board
def initialize_board(size):
return [[' ' ... | 20.490566 | 64 | 0.643646 |
115909c54bc481096226c408cb140c5ada199ca9 | 14,253 | py | Python | Src/features.py | hazemalsaied/IdenSys | 9b6220ff7e65f7059240b742c81952132a765007 | [
"MIT"
] | 2 | 2017-09-28T13:54:57.000Z | 2018-06-28T05:03:06.000Z | Src/features.py | hazemalsaied/IdenSys | 9b6220ff7e65f7059240b742c81952132a765007 | [
"MIT"
] | null | null | null | Src/features.py | hazemalsaied/IdenSys | 9b6220ff7e65f7059240b742c81952132a765007 | [
"MIT"
] | null | null | null | from config import Configuration
from corpus import Corpus, Sentence, Token, getTokens
from param import FeatParams
class Extractor:
@staticmethod
def extract(sent):
transition = sent.initialTransition
labels, features = [], []
while transition.next:
if transition.next is ... | 48.152027 | 157 | 0.592647 |
fecb927ead5ad4426d076d5c2778770a39b77d75 | 81,999 | py | Python | python/sxlParser.py | nussbrot/code-exchange | 3427798c4391e5f9c17cd19399ac56997c091ee2 | [
"MIT"
] | null | null | null | python/sxlParser.py | nussbrot/code-exchange | 3427798c4391e5f9c17cd19399ac56997c091ee2 | [
"MIT"
] | null | null | null | python/sxlParser.py | nussbrot/code-exchange | 3427798c4391e5f9c17cd19399ac56997c091ee2 | [
"MIT"
] | null | null | null | # Generated from sxl.g4 by ANTLR 4.7
# encoding: utf-8
from antlr4 import *
from io import StringIO
from typing.io import TextIO
import sys
def serializedATN():
with StringIO() as buf:
buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\63")
buf.write("\u00e4\4\2\t\2\4\3\t\3\4\4\t\4\4\5... | 34.804329 | 317 | 0.579592 |
fee85ad3b0572d677a9c70faaddb667254a898fb | 808 | py | Python | lang-python/sandbox/print.py | xd23fe39/technical-notes | bb6348705a95db24d07b1081b1aa0265dda131ce | [
"MIT"
] | null | null | null | lang-python/sandbox/print.py | xd23fe39/technical-notes | bb6348705a95db24d07b1081b1aa0265dda131ce | [
"MIT"
] | null | null | null | lang-python/sandbox/print.py | xd23fe39/technical-notes | bb6348705a95db24d07b1081b1aa0265dda131ce | [
"MIT"
] | null | null | null | #!/usr/bin/python
## -*- coding: utf-8 -*-
# Imports
import os
import math
# print/format demo
print('A little string with format placeholder for PI: {}.'.format(math.pi))
print('A little string with format placeholder for PI: {:5.4f}.'.format(math.pi))
print('A little string with format placeholder for PI: {:>15.4f}... | 33.666667 | 110 | 0.684406 |
a3311a76dfc14cca80179c9eb74eef44d5b8b38a | 37,578 | py | Python | Packs/CofenseTriage/Integrations/CofenseTriagev2/CofenseTriagev2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CofenseTriage/Integrations/CofenseTriagev2/CofenseTriagev2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CofenseTriage/Integrations/CofenseTriagev2/CofenseTriagev2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import datetime
from pathlib import Path
from unittest.mock import patch
import pytest
from CofenseTriagev2 import TriageInboxReports
from CofenseTriagev2 import TriageReport
from CofenseTriagev2 import TriageReporter
from CofenseTriagev2 import TriageRequestFailedError
from CofenseTriagev2 import TriageNoReportersFou... | 53.377841 | 1,116 | 0.648651 |
a36add9640ad34d06a10f2d304f41787b024d889 | 666 | py | Python | python/coursera_python/WESLEYAN/week3/COURSERA/week_3/csv/third.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/WESLEYAN/week3/COURSERA/week_3/csv/third.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/WESLEYAN/week3/COURSERA/week_3/csv/third.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | def write_csv(filename):
import csv
L = [['Date', 'Name', 'Notes'],
['2016/1/18', 'Martin Luther King Day', 'Federal Holiday'],
['2016/2/2','Groundhog Day', 'Observance'],
['2016/2/8','Chinese New Year', 'Observance'],
['2016/2/14','Valentine\'s Day', 'Obervance'],
... | 28.956522 | 68 | 0.542042 |
42c2fe6d905bb2def8584485ab735e99e8b892e7 | 1,622 | py | Python | mod/models/ticket.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | 1 | 2015-06-28T15:26:52.000Z | 2015-06-28T15:26:52.000Z | mod/models/ticket.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | null | null | null | mod/models/ticket.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | 6 | 2015-03-20T16:36:22.000Z | 2021-08-28T07:58:18.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2014-12-12 12:42:38
# @Author : yml_bright@163.com
from sqlalchemy import Column, String, Integer, ForeignKey
from sqlalchemy.ext.declarative import declarative_base
from db import engine
Base = declarative_base()
class TicketType(Base):
__t... | 36.863636 | 85 | 0.710851 |
9560f0cc252b63eeb28c5a58209723f189b898e7 | 3,289 | py | Python | Imagenes/FC72/Fint/Coexistencia/runMaxwell.py | efogliatto/Tesis | 058fa0c2e23cd538621d17d41bb216a4db4d211a | [
"CC0-1.0"
] | null | null | null | Imagenes/FC72/Fint/Coexistencia/runMaxwell.py | efogliatto/Tesis | 058fa0c2e23cd538621d17d41bb216a4db4d211a | [
"CC0-1.0"
] | null | null | null | Imagenes/FC72/Fint/Coexistencia/runMaxwell.py | efogliatto/Tesis | 058fa0c2e23cd538621d17d41bb216a4db4d211a | [
"CC0-1.0"
] | null | null | null | import os
import MaxwellConstruction as mx
import numpy as np
import matplotlib.pyplot as plt
import argparse
def run_pr_case( a_eos, b_eos, w_eos, sigma, beta, TrList ):
"""
Ejecucion de casos de construccion de Maxwell
"""
# Directorio del caso y limpieza
main_dir = os.getcwd()
... | 23.833333 | 129 | 0.592277 |
95bc4196bc0ec0bd64fadde1f72fcf6454922acf | 632 | py | Python | src/onegov/form/errors.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/form/errors.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/form/errors.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | class FormError(Exception):
pass
class DuplicateLabelError(FormError):
def __init__(self, label):
self.label = label
def __repr__(self):
return "DuplicateLabelError(label='{}')".format(self.label)
class InvalidMimeType(FormError):
pass
class UnableToComplete(FormError):
pass
... | 18.057143 | 67 | 0.696203 |
255fd73a2059360f4ed7c89e25d33a210a126c5e | 1,202 | py | Python | tools/sanitizer/lib/init.py | torsten-rathmann/rdmo-catalog | 8cc58d6c5a94369ed06ed1e1cb96694eba76f519 | [
"CC0-1.0"
] | 10 | 2017-03-17T13:13:44.000Z | 2022-02-09T17:12:03.000Z | tools/sanitizer/lib/init.py | torsten-rathmann/rdmo-catalog | 8cc58d6c5a94369ed06ed1e1cb96694eba76f519 | [
"CC0-1.0"
] | 74 | 2017-12-14T18:42:43.000Z | 2022-03-08T16:22:52.000Z | tools/sanitizer/lib/init.py | torsten-rathmann/rdmo-catalog | 8cc58d6c5a94369ed06ed1e1cb96694eba76f519 | [
"CC0-1.0"
] | 36 | 2017-12-19T17:00:24.000Z | 2022-03-04T13:06:52.000Z | import os
import re
import sys
from os.path import join as pj
from lib.util import detect_xml_files, get_uris_from_file, mkdir
class Init():
def __init__(self, dirs, args):
self.conf = {}
self.conf['dirs'] = dirs
self.conf['args'] = args
self.check_dirs()
self.shared_xmls ... | 31.631579 | 71 | 0.583195 |
66983ea9995b20f9ca0cc5acecac0946052224e8 | 1,172 | py | Python | vkapp/bot/logic/core/QueueMachine.py | ParuninPavel/lenta4_hack | 6d3340201deadf5757e37ddd7cf5580b928d7bda | [
"MIT"
] | 1 | 2017-11-23T13:33:13.000Z | 2017-11-23T13:33:13.000Z | vkapp/bot/logic/core/QueueMachine.py | ParuninPavel/lenta4_hack | 6d3340201deadf5757e37ddd7cf5580b928d7bda | [
"MIT"
] | null | null | null | vkapp/bot/logic/core/QueueMachine.py | ParuninPavel/lenta4_hack | 6d3340201deadf5757e37ddd7cf5580b928d7bda | [
"MIT"
] | null | null | null | from enum import Enum
from vkapp.bot.logic.user_states import BootStrapState, RootState
# class UserStates(Enum):
# news_proposing = 1
# chat_with_admin = 2
# statistics_mode = 3
# undefined = 0
class UserStruct:
def __init__(self):
self.message_queue=[]
self.state=BootStrapState()... | 23.918367 | 65 | 0.610068 |
66b712ccc4618468a44d4fc44087f9f277931bec | 221 | py | Python | src/visual/SlowmotionFilter.py | florianletsch/kinect-juggling | f320cc0b55adf65d338d25986a03106a7e3f46ef | [
"Unlicense",
"MIT"
] | 7 | 2015-11-27T09:53:32.000Z | 2021-01-13T17:35:54.000Z | src/visual/SlowmotionFilter.py | florianletsch/kinect-juggling | f320cc0b55adf65d338d25986a03106a7e3f46ef | [
"Unlicense",
"MIT"
] | null | null | null | src/visual/SlowmotionFilter.py | florianletsch/kinect-juggling | f320cc0b55adf65d338d25986a03106a7e3f46ef | [
"Unlicense",
"MIT"
] | null | null | null | import time
class SlowmotionFilter(object):
def __init__(self, delay):
self.delay = delay
def filter(self, rgb, depth, balls, args={}):
time.sleep(self.delay)
return rgb, depth, balls
| 17 | 49 | 0.624434 |
06f16392e9a2b039b4df446e7cdcec2d5a871985 | 1,059 | py | Python | tests/measures/test_general.py | mgao6767/wrds | 7dca2651a181bf38c61ebde675c9f64d6c96f608 | [
"MIT"
] | 31 | 2020-06-17T13:19:12.000Z | 2022-03-27T08:56:38.000Z | tests/measures/test_general.py | mgao6767/wrds | 7dca2651a181bf38c61ebde675c9f64d6c96f608 | [
"MIT"
] | null | null | null | tests/measures/test_general.py | mgao6767/wrds | 7dca2651a181bf38c61ebde675c9f64d6c96f608 | [
"MIT"
] | 8 | 2020-06-14T15:21:51.000Z | 2021-09-29T06:28:53.000Z | import unittest
from frds.measures import general
import numpy as np
class KyleLambdaCase(unittest.TestCase):
def test_lamdba(self):
volumes = np.array(
[
[100, 180, 900, 970, 430, 110],
[300, 250, 400, 590, 260, 600],
[200, 700, 220, 110, 290, 3... | 28.621622 | 79 | 0.511804 |
6613ee75eb8e555f5ff65160a1086c53f788ec7a | 2,788 | py | Python | pupil_invisible_monitor/deployment/_packaging/utils.py | JuBepy/Gaze_Mouse | 4ddea30b4f53deb744dac3f370e7f48baa3b99c2 | [
"MIT"
] | null | null | null | pupil_invisible_monitor/deployment/_packaging/utils.py | JuBepy/Gaze_Mouse | 4ddea30b4f53deb744dac3f370e7f48baa3b99c2 | [
"MIT"
] | null | null | null | pupil_invisible_monitor/deployment/_packaging/utils.py | JuBepy/Gaze_Mouse | 4ddea30b4f53deb744dac3f370e7f48baa3b99c2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Author: Douglas Creager <dcreager@dcreager.net>
# Changes, Additions: Moritz Kassner <moritz@pupil-labs.com>, Will Patera <will@pupil-labs.com>
# This file is placed into the public domain.
import logging
import os
import sys
from itertools import filterfalse
from pathlib import Path... | 29.347368 | 96 | 0.622669 |
b0e20a9910f0fe5cd001e02f568f3fb5a41e429c | 736 | py | Python | module/SpmAlarm.py | TechLabCommunity/SaintPeterTalent | eb80237de4d73f3a99e82e02edb714f5057bd559 | [
"MIT"
] | 1 | 2019-01-03T12:59:19.000Z | 2019-01-03T12:59:19.000Z | module/SpmAlarm.py | TechLabCommunity/SaintPeterTalent | eb80237de4d73f3a99e82e02edb714f5057bd559 | [
"MIT"
] | null | null | null | module/SpmAlarm.py | TechLabCommunity/SaintPeterTalent | eb80237de4d73f3a99e82e02edb714f5057bd559 | [
"MIT"
] | null | null | null | from threading import Thread
from lib.SPControl import TypeAlarmAction
from lib.SPDbCall import SPDbCall
from lib.AlarmNotification import AlarmNotification
from time import sleep
class SpmAlarm(Thread):
NAMEMODULE = "Alarm"
def __init__(self):
print(self.NAMEMODULE)
Thread.__init__(self)
... | 30.666667 | 78 | 0.641304 |
c665f74c08f88deedba60ade533c9494e6d59075 | 23,124 | py | Python | Packs/AzureKeyVault/Integrations/AzureKeyVault/AzureKeyVault_test.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | null | null | null | Packs/AzureKeyVault/Integrations/AzureKeyVault/AzureKeyVault_test.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 60 | 2022-02-24T14:54:47.000Z | 2022-03-31T10:38:41.000Z | Packs/AzureKeyVault/Integrations/AzureKeyVault/AzureKeyVault_test.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | null | null | null | from CommonServerPython import *
from AzureKeyVault import KeyVaultClient, create_or_update_key_vault_command, list_key_vaults_command, \
get_key_vault_command, delete_key_vault_command, update_access_policy_command, list_keys_command, get_key_command, \
delete_key_command, list_secrets_command, get_secret_comm... | 36.530806 | 120 | 0.700917 |
c6ad42fb7d20156f8111f13c85941ab522db5e13 | 2,653 | py | Python | research/nlp/dam/src/dynamic_lr.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/nlp/dam/src/dynamic_lr.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/nlp/dam/src/dynamic_lr.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.373333 | 105 | 0.673954 |
af49fd7c3bca87275a4e8ab27360d6e1d4ba54fa | 3,853 | py | Python | research/cv/ICNet/src/metric.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/ICNet/src/metric.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/ICNet/src/metric.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.009346 | 118 | 0.65741 |
af8454530123130e313c5d321296eecc99297328 | 2,420 | py | Python | tf/clasificador2/_et/lector_entrenador_3multi.py | alffore/lokroids-python | ac3bbc328140e53ab181034d2e3d5d5d17dc9203 | [
"MIT"
] | null | null | null | tf/clasificador2/_et/lector_entrenador_3multi.py | alffore/lokroids-python | ac3bbc328140e53ab181034d2e3d5d5d17dc9203 | [
"MIT"
] | null | null | null | tf/clasificador2/_et/lector_entrenador_3multi.py | alffore/lokroids-python | ac3bbc328140e53ab181034d2e3d5d5d17dc9203 | [
"MIT"
] | null | null | null | # coding=UTF-8
import numpy as np
import tensorflow.keras as keras
import tensorflow as tf
import os
import cv2
from tqdm import tqdm
import random
import filetype
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Dropout, Activation, Flatten
from tensorflow.keras.callbacks impor... | 27.816092 | 109 | 0.678926 |
bb615a39b88044b238b5ee531241d35f2942b272 | 326 | py | Python | python/coursera_python/MICHIGAN/WEB/week4/webr.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/MICHIGAN/WEB/week4/webr.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/MICHIGAN/WEB/week4/webr.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import urllib.request, urllib.parse, urllib.error
import pyttsx
engine = pyttsx.init()
#engine.say('Greetings!')
#engine.say('How are you today?')
engine.runAndWait()
fhand = urllib.request.urlopen('http://data.pr4e.org/romeo.txt')
for line in fhand:
h=line.decode().strip()
print(h)
engine.say(h)
engine.runAndWait(... | 20.375 | 64 | 0.723926 |
a525a5969e871bef244b11b920ee76a84fe3a77c | 1,294 | py | Python | HotUpdateDemo/tools/ModifyFileTime.py | Lmz521/CocosCreatorTutorial | 43ad296e77bd91b96d75d3bfa79d79a6fbfb3033 | [
"Apache-2.0"
] | 512 | 2018-04-24T14:57:38.000Z | 2022-03-22T06:23:41.000Z | HotUpdateDemo/tools/ModifyFileTime.py | xlearns/CocosCreatorTutorial | 43ad296e77bd91b96d75d3bfa79d79a6fbfb3033 | [
"Apache-2.0"
] | 2 | 2019-03-06T14:28:11.000Z | 2019-06-30T04:33:43.000Z | HotUpdateDemo/tools/ModifyFileTime.py | xlearns/CocosCreatorTutorial | 43ad296e77bd91b96d75d3bfa79d79a6fbfb3033 | [
"Apache-2.0"
] | 281 | 2018-03-31T11:03:29.000Z | 2022-03-13T13:53:35.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import os.path
import json
relativePath = ''
zipDirList = []
TIMESTAMP = 1330712292
def modifyFileTime(filePath, time):
# 修改访问和修改时间
os.utime(filePath, (time, time))
def modify(rootdir):
for parent, dirnames, filenames in os.walk(rootdi... | 23.527273 | 78 | 0.639104 |
3c83664d1e93c7579243701bb04892d9d2a805d9 | 618 | py | Python | CrazyProgramer/python/CrazyProgramer.py | Lian0123/TextArt | 26a2378a48fb1e49df067240fcb1dbd50e346a8e | [
"MIT"
] | 2 | 2018-07-29T05:02:53.000Z | 2021-08-16T10:52:59.000Z | CrazyProgramer/python/CrazyProgramer.py | Lian0123/TextArt | 26a2378a48fb1e49df067240fcb1dbd50e346a8e | [
"MIT"
] | null | null | null | CrazyProgramer/python/CrazyProgramer.py | Lian0123/TextArt | 26a2378a48fb1e49df067240fcb1dbd50e346a8e | [
"MIT"
] | null | null | null | # ☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
# ☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
# ☆\(○ ▽ ○)/☆★☆★ 哈~哈~哈~哈~哈~哈~哈~☆★☆★☆★☆★☆★☆★☆★☆★☆★
# ☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
# ☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
# ☆★☆★☆★☆★☆★☆★☆★☆★☆★☆ ☆★
# ☆★☆★☆★☆★☆★☆★☆★☆★☆★☆ Progrm... | 47.538462 | 57 | 0.05178 |
3ce82b7780730eab664e23208c503dc5bd0ecff9 | 457 | py | Python | 2_postitionierung/5_vierQuadrate.py | Coding-for-the-Arts/drawbot-samples-solutions | 7191610d6efd7d788056070e7826d255b7ef496b | [
"CC0-1.0"
] | null | null | null | 2_postitionierung/5_vierQuadrate.py | Coding-for-the-Arts/drawbot-samples-solutions | 7191610d6efd7d788056070e7826d255b7ef496b | [
"CC0-1.0"
] | null | null | null | 2_postitionierung/5_vierQuadrate.py | Coding-for-the-Arts/drawbot-samples-solutions | 7191610d6efd7d788056070e7826d255b7ef496b | [
"CC0-1.0"
] | null | null | null | """
Vier Quadrate in RGB
Versuche die Quadrate mit translate() nebeneinander anzuordnen,
so dass sie die gesamte Fläche ausfüllen.
"""
newPage(300, 300)
dia = width()/2
x=0
y=0
fill(1,0,0)
stroke(0)
rect(x, y, dia, dia);
# 1. Translate
translate(width()/2,0)
fill(0,1,0)
rect(x, y, dia, dia);
# 2. Translate
... | 11.146341 | 64 | 0.641138 |
e63320ba502c872ab5f53e14ea141ad5f971cdd7 | 1,094 | py | Python | algorithms.py | yashpatel5400/anonychain | 921804832839f3639477cfc441f138bc2f5ad685 | [
"MIT"
] | 1 | 2018-08-31T07:16:40.000Z | 2018-08-31T07:16:40.000Z | algorithms.py | yashpatel5400/anonychain | 921804832839f3639477cfc441f138bc2f5ad685 | [
"MIT"
] | null | null | null | algorithms.py | yashpatel5400/anonychain | 921804832839f3639477cfc441f138bc2f5ad685 | [
"MIT"
] | 1 | 2018-07-01T18:03:01.000Z | 2018-07-01T18:03:01.000Z | """
__author__ = Yash Patel
__name__ = algorithms.py
__description__ = Defines the clustering algorithms to be used and tested for the
deanonymization graph data
"""
import sklearn.cluster
def get_algorithms(num_clusters):
return {
"KMeans": (sklearn.cluster.KMeans, (), {
'n_clus... | 28.789474 | 82 | 0.501828 |
75ec21fa7e4b559dfb28d644a3c9d3ec71aca408 | 35 | py | Python | PEP8.py | lcarlin/guppe | a0ee7b85e8687e8fb8243fbb509119a94bc6460f | [
"Apache-2.0"
] | 1 | 2021-12-18T15:29:24.000Z | 2021-12-18T15:29:24.000Z | PEP8.py | lcarlin/guppe | a0ee7b85e8687e8fb8243fbb509119a94bc6460f | [
"Apache-2.0"
] | null | null | null | PEP8.py | lcarlin/guppe | a0ee7b85e8687e8fb8243fbb509119a94bc6460f | [
"Apache-2.0"
] | 3 | 2021-08-23T22:45:20.000Z | 2022-02-17T13:17:09.000Z | """
PEP8 do python
"""
import this | 7 | 14 | 0.628571 |
75f4c7ac88fbe4e40ebb2cfe8212a189df908c4b | 3,355 | py | Python | test/test_npu/test_network_ops/test_log1p.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_log1p.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_log1p.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... | 34.587629 | 74 | 0.597615 |
348ea10ff3803714d50505c8a42828bc605d32eb | 996 | py | Python | data-input/create-csv-files.py | technologiestiftung/bezirksregionenprofile-daten | d796f3c6ab9080a63fc4dcc4a67cb7dba4a32784 | [
"MIT"
] | 1 | 2020-10-16T07:37:15.000Z | 2020-10-16T07:37:15.000Z | data-input/create-csv-files.py | technologiestiftung/bezirksregionenprofile-daten | d796f3c6ab9080a63fc4dcc4a67cb7dba4a32784 | [
"MIT"
] | 4 | 2019-12-09T10:06:32.000Z | 2021-08-31T17:50:14.000Z | data-input/create-csv-files.py | technologiestiftung/bezirksregionenprofile-daten | d796f3c6ab9080a63fc4dcc4a67cb7dba4a32784 | [
"MIT"
] | 2 | 2019-10-22T14:23:30.000Z | 2020-09-24T14:31:05.000Z | from xlrd import open_workbook
import csv
import os
bzr_input_file_list = ['data-input/lichtenberg/rummelsburgerbucht']
for bzr in bzr_input_file_list:
if not os.path.exists(bzr):
os.makedirs(bzr)
wb = open_workbook('{}.xlsx'.format(bzr))
def is_whole_int(cellvalue):
if isinstance(cellv... | 27.666667 | 84 | 0.577309 |
b5bd43c459c32368ec51989a8af7eef0c6892f29 | 1,495 | py | Python | src/austria/views_api.py | frocentus/offenewahlen_api | 71860583890f8a4c23df67f271e8f13558fa9582 | [
"MIT"
] | 14 | 2017-07-12T14:42:57.000Z | 2017-09-08T20:32:53.000Z | src/austria/views_api.py | frocentus/offenewahlen_api | 71860583890f8a4c23df67f271e8f13558fa9582 | [
"MIT"
] | 209 | 2017-07-11T21:36:01.000Z | 2017-11-05T01:10:50.000Z | src/austria/views_api.py | OKFNat/offenewahlen-api | 71860583890f8a4c23df67f271e8f13558fa9582 | [
"MIT"
] | 8 | 2017-07-15T09:40:42.000Z | 2018-01-12T03:02:06.000Z | from rest_framework import generics, viewsets
from rest_framework.views import APIView
from rest_framework.response import Response
from austria import models
from austria import serializers
class ElectionInterface(viewsets.ReadOnlyModelViewSet):
queryset = models.Election.objects.all()
serializer_class = serialize... | 32.5 | 72 | 0.855518 |
1f49a4946fa4bfc5321bf416384c439cf1fc00e7 | 5,532 | py | Python | scripts/train_test_builder.py | PyGeoL/GeoL | 67a5bd2f63091e19041094c14d419055fa5ce6f0 | [
"MIT"
] | 8 | 2018-03-09T16:44:38.000Z | 2021-04-07T11:33:30.000Z | scripts/deprecated_train_test_builder.py | PyGeoL/GeoL | 67a5bd2f63091e19041094c14d419055fa5ce6f0 | [
"MIT"
] | 4 | 2020-03-24T15:34:54.000Z | 2021-06-01T21:54:33.000Z | scripts/deprecated_train_test_builder.py | PyGeoL/GeoL | 67a5bd2f63091e19041094c14d419055fa5ce6f0 | [
"MIT"
] | 1 | 2020-05-13T14:30:55.000Z | 2020-05-13T14:30:55.000Z | """
Script to split a dataset in train+test sets based on a given collection of cell IDs .
"""
# Authors: Gianni Barlacchi <gianni.barlacchi@gmail.com>
# Michele Ferretti <mic.ferretti@gmail.com>
import argparse
import os
import sys
import pandas as pd
from functools import reduce
def features_prepper(f... | 34.148148 | 142 | 0.586587 |
c8090781bef2a61800496faebae6889c32d1b475 | 86 | py | Python | algorithms/dynamic_programming/coin_change.py | PlamenHristov/HackerRank | 2c875995f0d51d7026c5cf92348d9fb94fa509d6 | [
"MIT"
] | null | null | null | algorithms/dynamic_programming/coin_change.py | PlamenHristov/HackerRank | 2c875995f0d51d7026c5cf92348d9fb94fa509d6 | [
"MIT"
] | null | null | null | algorithms/dynamic_programming/coin_change.py | PlamenHristov/HackerRank | 2c875995f0d51d7026c5cf92348d9fb94fa509d6 | [
"MIT"
] | null | null | null | import sys
if __name__ == 'main':
N, M = map(int, sys.stdin.read_line().split())
| 17.2 | 50 | 0.616279 |
9b12b042a85e7a461a03276fdc0a472a47a0bb3c | 1,590 | py | Python | rev/sissyrev/chall.py | vidner/codepwnda-ctf | 7e086044b753fe555b44395b79827d2f5b89da1d | [
"Unlicense"
] | 6 | 2021-02-18T15:07:55.000Z | 2022-02-04T01:38:10.000Z | rev/sissyrev/chall.py | vidner/codepwnda-ctf | 7e086044b753fe555b44395b79827d2f5b89da1d | [
"Unlicense"
] | null | null | null | rev/sissyrev/chall.py | vidner/codepwnda-ctf | 7e086044b753fe555b44395b79827d2f5b89da1d | [
"Unlicense"
] | null | null | null | import sys
from binascii import hexlify
def tukar(blok):
blokyangtertukar = ""
penukar = [10, 13, 0, 8, 11, 7, 6, 12, 15, 14, 3, 4, 2, 1, 5, 9]
for dijit in blok:
dijitbaru = penukar[int(dijit, 16)]
blokyangtertukar += hex(dijitbaru)[2:]
return blokyangtertukar
def pad(pesan... | 30.576923 | 134 | 0.578616 |
cdabdca4c19af8bc3f2452be93d1c576623220a3 | 997 | py | Python | INBa/2015/KURCHATOV_N_V/z9_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/KURCHATOV_N_V/z9_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/KURCHATOV_N_V/z9_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 9. Вариант 11.
#1-50. Создайте игру, в которой компьютер выбирает какое-либо слово, а игрок должен его отгадать. Компьютер сообщает игроку, сколько букв в слове, и дает пять попыток узнать, есть ли какая-либо буква в слове, причем программа может отвечать только "Да" и "Нет". Вслед за тем игрок должен попробова... | 34.37931 | 315 | 0.711133 |
a82895ab716e5a70730a1379d004e1ce3021820d | 165 | py | Python | iablaka-env/bin/django-admin.py | mactov/iablaka | 7006782cf1a9843f2e5111235ce4c389186ecab9 | [
"MIT"
] | null | null | null | iablaka-env/bin/django-admin.py | mactov/iablaka | 7006782cf1a9843f2e5111235ce4c389186ecab9 | [
"MIT"
] | null | null | null | iablaka-env/bin/django-admin.py | mactov/iablaka | 7006782cf1a9843f2e5111235ce4c389186ecab9 | [
"MIT"
] | null | null | null | #!/Users/mactov/projects/iablaka/iablaka-env/bin/python3.6
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| 27.5 | 58 | 0.787879 |
8d146555d19ce1c8bb9344c6f71b482469d4bb44 | 1,252 | py | Python | py-basics/src/lectures/lists/exercise4.py | AndrasTarlos/s4f | bfe2d631a9a2715953d8ac5ddc8ef97d3cefb426 | [
"CC0-1.0"
] | null | null | null | py-basics/src/lectures/lists/exercise4.py | AndrasTarlos/s4f | bfe2d631a9a2715953d8ac5ddc8ef97d3cefb426 | [
"CC0-1.0"
] | null | null | null | py-basics/src/lectures/lists/exercise4.py | AndrasTarlos/s4f | bfe2d631a9a2715953d8ac5ddc8ef97d3cefb426 | [
"CC0-1.0"
] | 4 | 2021-12-13T15:52:00.000Z | 2022-03-28T13:54:53.000Z | """
Lists Exercise 4
Implementieren Sie die Funktion move() so, dass das List-Element an Position 'index' um 'offset' Stellen nach
rechts verschoben wird. Falls 'offset' negativ ist, wird das Element entsprechend nach links verschoben.
Überprüfen Sie, ob die neue Position in der Liste enthalten ist. Wenn nicht, geben ... | 33.837838 | 120 | 0.655751 |
276848ad877c17adcdebedf09c27dd816509dbdc | 537 | py | Python | source/pkgsrc/devel/bpython/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/devel/bpython/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/devel/bpython/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-setup.py,v 1.3 2021/03/20 15:14:48 adam Exp $
Use the same man directory across all platforms.
--- setup.py.orig 2021-01-25 08:13:17.000000000 +0000
+++ setup.py
@@ -141,10 +141,7 @@ if using_sphinx:
build.sub_commands.insert(0, ("build_sphinx_man", None))
cmdclass["build_sphinx_man"] = Build... | 28.263158 | 61 | 0.629423 |
fdcd71727e32467b3a5e757d5ca5aac491d88d91 | 919 | py | Python | test/flink_kafka_ds.py | wybosys/nnt.logic.jvm | 249aedd7f8dd03d94dcb0780b91dadacd4b25270 | [
"BSD-3-Clause"
] | 2 | 2020-09-22T11:01:31.000Z | 2020-09-22T11:12:29.000Z | test/flink_kafka_ds.py | wybosys/nnt.logic.jvm | 249aedd7f8dd03d94dcb0780b91dadacd4b25270 | [
"BSD-3-Clause"
] | null | null | null | test/flink_kafka_ds.py | wybosys/nnt.logic.jvm | 249aedd7f8dd03d94dcb0780b91dadacd4b25270 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# flink测试使用的kafka数据源
# 定时给kafka投放数据
import kafka
import kafka.admin
import json
import time
TOPIC = "nnt-logic-test"
HOST = "localhost:9092,localhost:9093,localhost:9094"
cli = kafka.KafkaClient(
bootstrap_servers=HOST
)
produ = kafka.KafkaProducer(
bootstrap_servers=HOST
)
admin = ... | 16.709091 | 53 | 0.651795 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.