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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cfeeb5b3c36152697a40c602e06f20bbde93683d | 307 | py | Python | 451-sort-characters-by-frequency/451-sort-characters-by-frequency.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | 451-sort-characters-by-frequency/451-sort-characters-by-frequency.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | 451-sort-characters-by-frequency/451-sort-characters-by-frequency.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def frequencySort(self, s: str) -> str:
set_letter = set(s)
output = dict()
for letter in set(s):
output[letter]=s.count(letter)
soutput = sorted(output.items(), key=lambda x: x[1], reverse=True)
return "".join(s*c for s, c in soutput) | 38.375 | 74 | 0.57329 |
7a72b210655d750fd4342696d0b892c057f2f08b | 1,573 | py | Python | tool_discovery/tool_discoverer/tool_discoverer/__main__.py | FAIRplus/WP3_FAIR_tooling | 3c6470c4f5fc3d686b4571711bb7ed6f849a9622 | [
"Apache-2.0"
] | null | null | null | tool_discovery/tool_discoverer/tool_discoverer/__main__.py | FAIRplus/WP3_FAIR_tooling | 3c6470c4f5fc3d686b4571711bb7ed6f849a9622 | [
"Apache-2.0"
] | 13 | 2021-06-01T10:07:02.000Z | 2022-03-24T12:16:26.000Z | tool_discovery/tool_discoverer/tool_discoverer/__main__.py | FAIRplus/WP3_FAIR_tooling | 3c6470c4f5fc3d686b4571711bb7ed6f849a9622 | [
"Apache-2.0"
] | null | null | null | import argparse
import configparser
import biotools_API_querying as bAq
import sys
# Command-line argument
parser = argparse.ArgumentParser()
parser.add_argument("config_file",
help="path of configuration file")
parser.add_argument("-v", "--verbose",
help="prints detail infor... | 30.843137 | 118 | 0.591863 |
56be656080e0695c27ecf60be711d2aefde95096 | 368 | py | Python | exercises/de/solution_03_16_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/de/solution_03_16_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/de/solution_03_16_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
nlp = spacy.load("de_core_news_sm")
text = (
"Die McDonald’s Corporation ist ein Betreiber und Franchisegeber von "
"weltweit vertretenen Schnellrestaurants."
)
# Deaktiviere den Tagger und den Parser
with nlp.disable_pipes("tagger", "parser"):
# Verarbeite den Text
doc = nlp(text)
# ... | 24.533333 | 74 | 0.714674 |
77de643f7e21404df1212822724c80a522ac9a99 | 2,648 | py | Python | letspuppet/tradetools.py | pchaos/wanggejiaoyi | 60242d465bf10d4be46ee6eafc99557affc2a52e | [
"MIT"
] | 15 | 2018-05-16T02:39:01.000Z | 2021-05-22T13:12:55.000Z | letspuppet/tradetools.py | pchaos/wanggejiaoyi | 60242d465bf10d4be46ee6eafc99557affc2a52e | [
"MIT"
] | null | null | null | letspuppet/tradetools.py | pchaos/wanggejiaoyi | 60242d465bf10d4be46ee6eafc99557affc2a52e | [
"MIT"
] | 9 | 2018-05-16T00:47:34.000Z | 2021-11-26T05:39:48.000Z | # -*- coding: utf-8 -*-
"""
-------------------------------------------------
@File : tradetools.py
Description :
@Author :
date: 18-4-15
-------------------------------------------------
Change Activity:
2018 04 10 18:06:42 CST
重构getsignal;首先再当前目录查找数据库,如果没有找到,则返回系统临时目录+数据库名
@Contact : p199920... | 22.066667 | 120 | 0.560423 |
bb5ae330503c9fb78f74ba5d3cec2fa797bc46c0 | 2,178 | py | Python | packages/watchmen-inquiry-kernel/src/watchmen_inquiry_kernel/schema/report_schema.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-inquiry-kernel/src/watchmen_inquiry_kernel/schema/report_schema.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-inquiry-kernel/src/watchmen_inquiry_kernel/schema/report_schema.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import Any, Dict, List, Optional
from watchmen_model.chart import ChartTruncationType
from watchmen_model.console import Report, ReportDimension, ReportIndicator
from watchmen_utilities import ArrayHelper, is_blank
class ReportSchema:
def __init__(self, report: Report):
self.report = report
def get_... | 35.704918 | 96 | 0.756198 |
5606e905bbbcb6bc74903018acf65630a2385b8e | 343 | py | Python | pages/themes/beginners/sequenceDataTypes/Tasks_and_HW/task5_solution_with_range.py | ProgressBG-Python-Course/ProgressBG-Python | 6429833696c2c50d9f902f62cc3a65ca62659c69 | [
"MIT"
] | null | null | null | pages/themes/beginners/sequenceDataTypes/Tasks_and_HW/task5_solution_with_range.py | ProgressBG-Python-Course/ProgressBG-Python | 6429833696c2c50d9f902f62cc3a65ca62659c69 | [
"MIT"
] | null | null | null | pages/themes/beginners/sequenceDataTypes/Tasks_and_HW/task5_solution_with_range.py | ProgressBG-Python-Course/ProgressBG-Python | 6429833696c2c50d9f902f62cc3a65ca62659c69 | [
"MIT"
] | null | null | null | names_count = int(input("How many names are you going to enter? "))
# names will be stored in next list:
names = []
for i in range(names_count):
name = input("Enter a name, please: ")
# append user input to names list:
names.append(name)
print("*" * 30)
print("The names you've entered are:")
for name in ... | 22.866667 | 67 | 0.661808 |
7969aad7532309b78af41494a28cd17b2863d6bb | 1,701 | py | Python | dga_ktrain.py | amir1m/dga-detection | 001df4e352a99d345ca3b928d5e946e3b5499829 | [
"MIT"
] | null | null | null | dga_ktrain.py | amir1m/dga-detection | 001df4e352a99d345ca3b928d5e946e3b5499829 | [
"MIT"
] | null | null | null | dga_ktrain.py | amir1m/dga-detection | 001df4e352a99d345ca3b928d5e946e3b5499829 | [
"MIT"
] | null | null | null | SEED = 42
import numpy as np
np.random.seed(SEED)
import pandas as pd
from sklearn.model_selection import train_test_split
import ktrain
from ktrain import text
dga_df = pd.read_csv("data/legit-dga_domains.csv")
dga_df.head()
dga_df['class'].value_counts()
dga_df['subclass'].value_counts()
dga_df_pp = dga_df.cop... | 23.957746 | 67 | 0.692534 |
8dfdd0521c680fab9b34d5db043c5e17e525ae55 | 529 | py | Python | Curso_Python/Secao2-Python-Basico-Logica-Programacao/39_operacao_termaria/39_operação_termaria.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao2-Python-Basico-Logica-Programacao/39_operacao_termaria/39_operação_termaria.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao2-Python-Basico-Logica-Programacao/39_operacao_termaria/39_operação_termaria.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | """
Operador ternário em python
"""
logged_user = True
"""if logged_user:
msg = 'Usuário logado.'
else:
msg = 'Usuário precisa logar.'
print(msg)""" #todo: isso da pra fazer com isso
"""
msg = 'Usuário logado.' if logged_user else 'Usuário precisa logar'
print(msg)
"""
idade = input('Qual a sua idade: ')
if n... | 22.041667 | 67 | 0.663516 |
30e62bb3cc2768c3db152e426368d43efedc62b2 | 419 | py | Python | packages/watchmen-rest/src/watchmen_rest/cors.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest/src/watchmen_rest/cors.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest/src/watchmen_rest/cors.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from fastapi import FastAPI
from .settings import RestSettings
def install_cors(app: FastAPI, settings: RestSettings) -> None:
from fastapi.middleware.cors import CORSMiddleware
app.add_middleware(
CORSMiddleware,
allow_origins=settings.CORS_ALLOWED_ORIGINS,
allow_credentials=settings.CORS_ALLOW_CREDENTIALS... | 26.1875 | 63 | 0.832936 |
a506d1c5413cae504e40f8ccf211e3f98c3ac162 | 92 | py | Python | 2015/01/measles-az-exemptions/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2015/01/measles-az-exemptions/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2015/01/measles-az-exemptions/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 = '1Rwq68Nie5az31VKFPn9elSc24QKCL0OraJDT_bk422o'
| 23 | 68 | 0.847826 |
ebcff5b11bc4ada9f6dfb1ef2a73f364f5aae0c2 | 3,381 | py | Python | src/data_key_points.py | tuanminh3395/gr-bone-age | 248c929d75e9d88dc9fa102ea11f4eae1e0f3157 | [
"MIT"
] | null | null | null | src/data_key_points.py | tuanminh3395/gr-bone-age | 248c929d75e9d88dc9fa102ea11f4eae1e0f3157 | [
"MIT"
] | null | null | null | src/data_key_points.py | tuanminh3395/gr-bone-age | 248c929d75e9d88dc9fa102ea11f4eae1e0f3157 | [
"MIT"
] | null | null | null | import os
from skimage.io import imsave, imread, imshow
from skimage.transform import resize
from matplotlib import pyplot as plt
from constants import data_root_path, key_points_max_size, key_points_desired_size, kp_train_path, kp_test_path, kp_manual_json_path, kp_json_path, constrast, kp_train_row, kp_train_col
impo... | 29.657895 | 185 | 0.703046 |
ba7b9e96bff22214c65f9c22c38d52c76fa3e3a6 | 8,459 | py | Python | kiosk/bot.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | null | null | null | kiosk/bot.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | 14 | 2018-09-12T06:59:55.000Z | 2020-02-26T07:17:48.000Z | kiosk/bot.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | null | null | null | from kiosk.queries import readFromDatabase
from kiosk.models import Produktpalette, Einkaufsliste, EinkaufslisteGroups
from profil.models import KioskUser
from django.db import transaction
from django.db.models import Max
import math
from django.conf import settings
from slackclient import SlackClient
def slack_Send... | 35.84322 | 863 | 0.743941 |
035d149f29cee610c5cc69c4dd806c28ca3ead91 | 662 | py | Python | py-td3-cinema/a.py | HuguesGuilleus/istyPOO | f460665799be2b2f34a1ebaa9878e06bb028a410 | [
"BSD-3-Clause"
] | null | null | null | py-td3-cinema/a.py | HuguesGuilleus/istyPOO | f460665799be2b2f34a1ebaa9878e06bb028a410 | [
"BSD-3-Clause"
] | null | null | null | py-td3-cinema/a.py | HuguesGuilleus/istyPOO | f460665799be2b2f34a1ebaa9878e06bb028a410 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from storage.struct import Struct as Struct
from storage.db import DB as DB
class Salle(Struct):
"""Une salle (pour la diffusion de cinéma, concert...)."""
def __init__(self, db):
super(Salle, self).__init__({
"*addresse": "",
"nbPlace": 0,
"type": "cinema",... | 25.461538 | 114 | 0.601208 |
06a009e5eadefa88e89cca52236455817009208e | 373 | py | Python | day18/spirograph.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day18/spirograph.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day18/spirograph.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | import turtle as t
import random
timmy = t.Turtle()
timmy.speed("fastest")
def drawSpirograph(sizeOfGap):
r = 100
for _ in range(int(360/sizeOfGap)):
timmy.pencolor(random.random(), random.random(), random.random())
timmy.circle(r)
timmy.setheading(timmy.heading() + sizeOfGap)
drawSp... | 20.722222 | 73 | 0.680965 |
2309c5fca7268be79a80ffcbcb92fb23a738b1a9 | 18,268 | py | Python | backend/apps/accounts/views.py | match4healthcare/match4healthcare | acf69e3b781d715f0a947c2a9df6646e94f1ca6b | [
"MIT"
] | 2 | 2020-03-28T13:56:39.000Z | 2020-03-29T10:16:12.000Z | backend/apps/accounts/views.py | match4healthcare/match4healthcare | acf69e3b781d715f0a947c2a9df6646e94f1ca6b | [
"MIT"
] | 76 | 2020-03-27T21:53:04.000Z | 2020-03-30T20:27:43.000Z | backend/apps/accounts/views.py | match4healthcare/match4healthcare | acf69e3b781d715f0a947c2a9df6646e94f1ca6b | [
"MIT"
] | null | null | null | from datetime import datetime
import logging
from django.contrib import messages
from django.contrib.admin.views.decorators import staff_member_required
from django.contrib.auth import logout
from django.contrib.auth.decorators import login_required
from django.contrib.auth.views import LoginView
from django.db import... | 34.018622 | 142 | 0.655627 |
88f368fa47599f1db0d42ff68997df47913ee4ae | 324 | py | Python | Python/Courses/LearnToCodeInPython3ProgrammingBeginnerToAdvancedYourProgress/python_course/Section1PytonBasics/01_Average.py | JamieBort/LearningDirectory | afca79c5f1333c079d0e96202ff44ca21b2ceb81 | [
"Info-ZIP"
] | 1 | 2022-02-02T21:56:08.000Z | 2022-02-02T21:56:08.000Z | Python/Courses/LearnToCodeInPython3ProgrammingBeginnerToAdvancedYourProgress/python_course/Section1PytonBasics/01_Average.py | JamieBort/LearningDirectory | afca79c5f1333c079d0e96202ff44ca21b2ceb81 | [
"Info-ZIP"
] | 27 | 2020-06-27T23:25:59.000Z | 2022-02-27T20:40:56.000Z | Python/Courses/LearnToCodeInPython3ProgrammingBeginnerToAdvancedYourProgress/python_course/Section1PytonBasics/01_Average.py | JamieBort/LearningDirectory | afca79c5f1333c079d0e96202ff44ca21b2ceb81 | [
"Info-ZIP"
] | null | null | null | print("This program calculates the average of two numbers.")
number1 = float(input("Please enter the first number: "))
print("You entered: ", number1)
number2 = float(input("Please enter the second number: "))
print("You entered: ", number2)
print("The average of ", number1, " and ", number2, " is: " , (number1+number2... | 54 | 82 | 0.703704 |
ccbbf5d2fc88f2e1e907fecabdea15c5f040ad77 | 1,312 | py | Python | ___Python/Torsten/Python-Kurs/p02_datenstrukturen/m01_temperaturen.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Torsten/Python-Kurs/p02_datenstrukturen/m01_temperaturen.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Torsten/Python-Kurs/p02_datenstrukturen/m01_temperaturen.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | from p01_kennenlernen import PythonLib
temperaturenGC = [0.7, 2.1, 4.2, 8.2, 12.5, 15.6, 16.9, 16.3, 13.6, 9.5, 4.6, 2.3] #Durchschnittstemp. in Bielefeld
print("Temperaturen in °C:", temperaturenGC)
durchschnittstemperaturGC = sum(temperaturenGC) / len(temperaturenGC)
print("Durchschnittstemperatur in °C:", du... | 33.641026 | 116 | 0.727896 |
aedf89ad0c4a3b5b60fbe4a28c5cd68e7a855b73 | 2,997 | py | Python | ledger/util.py | Thames1990/BadBatBets | 8dffb69561668b8991bf4103919e4b254d4ca56a | [
"MIT"
] | null | null | null | ledger/util.py | Thames1990/BadBatBets | 8dffb69561668b8991bf4103919e4b254d4ca56a | [
"MIT"
] | null | null | null | ledger/util.py | Thames1990/BadBatBets | 8dffb69561668b8991bf4103919e4b254d4ca56a | [
"MIT"
] | null | null | null | def sum_credit_debit(credit, debit):
"""
Calculates the total of the transactions
:param credit: Credits
:param debit: Debits
:return:
"""
credit_sum = 0
for entry in credit:
credit_sum += entry.amount
debit_sum = 0
for entry in debit:
debit_sum += entry.amount
... | 29.382353 | 82 | 0.698699 |
aee4d7561f68a84e67653244a192eb6fcb9cd2dd | 109 | py | Python | middleware/utils/__init__.py | fsr/infoscreen | 60930853934b6e278eeca70202f24ea8c41cb356 | [
"MIT"
] | 6 | 2016-05-03T12:14:00.000Z | 2021-07-06T16:34:21.000Z | middleware/utils/__init__.py | fsr/infoscreen | 60930853934b6e278eeca70202f24ea8c41cb356 | [
"MIT"
] | 23 | 2015-01-09T15:50:51.000Z | 2019-02-01T10:00:49.000Z | middleware/utils/__init__.py | fsr/infoscreen | 60930853934b6e278eeca70202f24ea8c41cb356 | [
"MIT"
] | 5 | 2015-06-08T17:27:37.000Z | 2017-06-09T15:07:33.000Z | from .mensa import *
from .ticker import *
from .news import *
from .get_dvb import *
from .weather import *
| 18.166667 | 22 | 0.724771 |
9de9b97f69916f21c528f0301a0853e405ae90ed | 2,177 | py | Python | src/doc/tutorials/tutorial_examples/aneurysm/aneurysm_part1.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/doc/tutorials/tutorial_examples/aneurysm/aneurysm_part1.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/doc/tutorials/tutorial_examples/aneurysm/aneurysm_part1.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | #
# file: aneurysm_part1.py
# info: Corresponds to actions taken in
# https://visit-sphinx-github-user-manual.readthedocs.io/en/develop/tutorials/Aneurysm.html
#
OpenDatabase("aneurysm.visit")
AddPlot("Mesh", "Mesh")
DrawPlots()
View3DAtts = View3DAttributes()
View3DAtts.viewNormal = (-1, 0, 0)
View3DAtts.focus = (3.... | 25.611765 | 91 | 0.783647 |
ee1220e3abe25d18458eb15c71ad6f9a19078dbc | 115,555 | py | Python | Packs/F5/Integrations/F5_ASM/F5_ASM.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/F5/Integrations/F5_ASM/F5_ASM.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/F5/Integrations/F5_ASM/F5_ASM.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from typing import Optional, List
import demistomock as demisto
from CommonServerPython import *
# Disable insecure warnings
requests.packages.urllib3.disable_warnings()
DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ'
LIST_FIELDS = ['name', 'id', 'ipAddress', 'type', 'protocol', 'method', 'actAsMethod',
'serverTech... | 46.632365 | 109 | 0.621263 |
ee330ad258ce146d3e1ae76545b2bbd856f64e25 | 22,311 | py | Python | main.py | inventivejon/ExSyNL | daf5b5923ed0e65107ce2904933afeba8bfa99ea | [
"Apache-2.0"
] | null | null | null | main.py | inventivejon/ExSyNL | daf5b5923ed0e65107ce2904933afeba8bfa99ea | [
"Apache-2.0"
] | 5 | 2021-05-11T02:08:51.000Z | 2022-02-26T23:08:18.000Z | main.py | inventivejon/ExSyL | daf5b5923ed0e65107ce2904933afeba8bfa99ea | [
"Apache-2.0"
] | null | null | null | import copy
import json
import re
with open('config.json') as json_data_file:
configuration = json.load(json_data_file)
print("Reading config: {}".format(configuration))
predicates = {}
predicate_equals = {}
functions = []
def AddEqualsPredicate(eqPrName, predicate):
global predicates
global predicate_eq... | 51.05492 | 190 | 0.592354 |
4e73f9b41700daaf2ca5cec50f1aa8155ffcc138 | 4,021 | py | Python | src/doc/tutorials/tutorial_examples/aneurysm/aneurysm_part2.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/doc/tutorials/tutorial_examples/aneurysm/aneurysm_part2.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/doc/tutorials/tutorial_examples/aneurysm/aneurysm_part2.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | #
# file: aneurysm_part2.py
# info: Corresponds to actions taken in
# https://visit-sphinx-github-user-manual.readthedocs.io/en/develop/tutorials/Aneurysm.html
#
OpenDatabase("aneurysm.visit")
AddPlot("Mesh", "Mesh")
MeshAtts = MeshAttributes()
MeshAtts.opaqueColor = (204, 255, 255, 255)
MeshAtts.opacity = 0.25
SetPl... | 29.137681 | 91 | 0.775926 |
094362b8cb3b07b5f3db1192267254938d0167cd | 2,532 | py | Python | Packs/RubrikPolaris/Scripts/RubrikSonarSensitiveHits/RubrikSonarSensitiveHits.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/RubrikPolaris/Scripts/RubrikSonarSensitiveHits/RubrikSonarSensitiveHits.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/RubrikPolaris/Scripts/RubrikSonarSensitiveHits/RubrikSonarSensitiveHits.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
def main() -> None:
try:
try:
sonar_context = demisto.context()["Rubrik"]["Sonar"]
# TODO - We can be more programmatic here.
hit_summary = [
{
... | 32.883117 | 94 | 0.446682 |
e11b35d790fb1e1ccf95096f3acbc060fbfab34c | 1,764 | py | Python | demo/lib/test_hmac.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | demo/lib/test_hmac.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | demo/lib/test_hmac.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | #!/usr/bin/env python3
import binascii
import lopy4_hmac as hmac
def test(digestmod, key, data, digest):
try:
a = getattr(hmac._hashlib, digestmod)
except:
print("this platform does not support", digestmod)
return
h = hmac.HMAC(key, data, digestmod=digestmod).digest()
assert h ... | 22.909091 | 77 | 0.595805 |
0123ac44d65f63a57f646217ab41a46dd4eeb847 | 650 | py | Python | tests/onegov/org/test_views_homepage.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/org/test_views_homepage.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/org/test_views_homepage.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import transaction
def test_homepage(client):
client.app.org.meta['homepage_cover'] = "<b>0xdeadbeef</b>"
client.app.org.meta['homepage_structure'] = """
<row>
<column span="8">
<homepage-cover />
</column>
<column span="4">
<panel>
... | 23.214286 | 63 | 0.453846 |
013303e5b842c8cd0c5758e85383ec84a20d71ee | 978 | py | Python | exercises/ja/test_04_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/ja/test_04_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/ja/test_04_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert len(pattern1) == 2, "pattern1は2つのトークンについて表します"
assert len(pattern2) == 2, "pattern2は2つのトークンについて表します"
assert len(pattern1[0]) == 1, "pattern1の最初のトークンの属性の数は1です。"
assert any(
pattern1[0].get(l) == "iphone" for l in ("LOWER", "lower")
), "pattern1の最初のトークンは、小文字が'iphone'にマッチするよう... | 44.454545 | 78 | 0.659509 |
6d6e3058fa85ec9c35f3f22e9b88810c4f940208 | 5,515 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/ch06_arrays/solutions/ex06_erase_and_fall_down.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch06_arrays/solutions/ex06_erase_and_fall_down.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch06_arrays/solutions/ex06_erase_and_fall_down.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 print_array, get_dimension
from ch06_arrays.intro.intro_directions_example import Direction
def erase_chains(values2dim):
mark_elements_for_removal(values2dim)
return erase_all_marked(... | 27.994924 | 78 | 0.533454 |
6e48ac89134bfe28841758459bcd221a33ac60c7 | 625 | py | Python | backend/conftest.py | Marcuse7/openschufa | 6a44ddca9eda0d2fde7103d4ae76d7e1ac3ee40e | [
"MIT"
] | 46 | 2018-05-16T05:52:29.000Z | 2021-12-10T14:52:52.000Z | backend/conftest.py | algorithmwatch/2018-openschufa | 6a44ddca9eda0d2fde7103d4ae76d7e1ac3ee40e | [
"MIT"
] | 45 | 2018-05-10T05:56:44.000Z | 2020-09-04T18:41:48.000Z | backend/conftest.py | algorithmwatch/2018-openschufa | 6a44ddca9eda0d2fde7103d4ae76d7e1ac3ee40e | [
"MIT"
] | 8 | 2018-05-16T05:38:46.000Z | 2020-06-29T09:00:14.000Z | import os
import shutil
import pytest
from app import create_app, db
from config import APP_ROOT
class Config(object):
DEBUG = False
TESTING = True
CACHE_NO_NULL_WARNING = True # silence Flask-Cache warning
SQLALCHEMY_DATABASE_URI = os.environ.get('OPENSCHUFA_DATABASE_TEST_URL')
UPLOADED_PHOTOS... | 22.321429 | 76 | 0.6944 |
b0be37b81dd6fe29c63992be782357e9a743b441 | 47 | py | Python | Crypto/RSA_Lab/src/flag.py | TheReturnOfTheKing/ACTF_Junior_2019 | 73635a8ea3f741d50153f01ca0ff9ca1a8e4db93 | [
"MIT"
] | 6 | 2019-02-27T08:40:05.000Z | 2021-01-29T10:04:03.000Z | Crypto/RSA_Lab/src/flag.py | CSUwangj/ACTF_Junior_2019 | a2c0ee378ed02c5353176df3490f717f7d04785f | [
"MIT"
] | null | null | null | Crypto/RSA_Lab/src/flag.py | CSUwangj/ACTF_Junior_2019 | a2c0ee378ed02c5353176df3490f717f7d04785f | [
"MIT"
] | 3 | 2019-02-27T08:40:15.000Z | 2019-03-03T06:07:45.000Z | flag = r"ACTF{Mastering_RSA_is_Still_far_away}" | 47 | 47 | 0.851064 |
b0c33e22d96a434e38096401ee1d2c0828498939 | 4,502 | py | Python | lambdas/sdd-api-db/sdd-api-db-get-timeseries_data/lambda_function.py | cfleschhut/virushack | 2fe7ded0be8672b066edef7fed52573794db2ba5 | [
"Apache-2.0"
] | 29 | 2020-03-21T00:47:51.000Z | 2021-07-17T15:50:33.000Z | lambdas/sdd-api-db/sdd-api-db-get-timeseries_data/lambda_function.py | cfleschhut/virushack | 2fe7ded0be8672b066edef7fed52573794db2ba5 | [
"Apache-2.0"
] | 7 | 2020-03-21T14:04:26.000Z | 2022-03-02T08:05:40.000Z | lambdas/sdd-api-db/sdd-api-db-get-timeseries_data/lambda_function.py | cfleschhut/virushack | 2fe7ded0be8672b066edef7fed52573794db2ba5 | [
"Apache-2.0"
] | 13 | 2020-03-21T01:08:08.000Z | 2020-04-08T17:21:11.000Z | """ This Script retrieves data from db and delivers spacial data for dashboard requests."""
import json
import pandas as pd
from datetime import datetime, timedelta
import re
import pymysql
from sqlalchemy import create_engine
from sqlalchemy.pool import NullPool
import dateutil.parser
config = json.load(open("crede... | 29.81457 | 185 | 0.650378 |
c69981411f57f0618aba1d64848a40644a7f88cb | 1,545 | py | Python | backend/products/serializers.py | saulhappy/drf | 5e62da54cdf0f0fead742c891d34e7eacd488a1b | [
"MIT"
] | null | null | null | backend/products/serializers.py | saulhappy/drf | 5e62da54cdf0f0fead742c891d34e7eacd488a1b | [
"MIT"
] | null | null | null | backend/products/serializers.py | saulhappy/drf | 5e62da54cdf0f0fead742c891d34e7eacd488a1b | [
"MIT"
] | null | null | null | from rest_framework import serializers
from rest_framework.reverse import reverse
from products.models import Product
from products.validators import unique_product_title
from api.serializers import UserPublicSerializer
class ProductSerializer(serializers.ModelSerializer):
owner = UserPublicSerializer(source="us... | 29.711538 | 78 | 0.622654 |
59b35f62a6c604405effb3dd67faaecd1018ba39 | 7,718 | py | Python | BSidesCanberra/2021/crypto/Rot_Away_Rust/client_responder.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | BSidesCanberra/2021/crypto/Rot_Away_Rust/client_responder.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | BSidesCanberra/2021/crypto/Rot_Away_Rust/client_responder.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | import json
import Crypto.Cipher.AES as aes
import Crypto.Random as rand
from binascii import *
import struct
import string
import argparse
from RARsecrets import flag
from RARsecrets import secrets_server as ss
def validate(value, check, minimum=None, maximum=None):
valid_types = ["bool", "int", "hex"]
if c... | 32.982906 | 115 | 0.551568 |
f9cc5ee6940a0ea439b4c1e9a394e35ed9c67807 | 1,753 | py | Python | Video_stream_webcam.py | KR-16/Flask | b996c16378690d46a2e17d5c382aa78ec504e4ff | [
"MIT"
] | null | null | null | Video_stream_webcam.py | KR-16/Flask | b996c16378690d46a2e17d5c382aa78ec504e4ff | [
"MIT"
] | null | null | null | Video_stream_webcam.py | KR-16/Flask | b996c16378690d46a2e17d5c382aa78ec504e4ff | [
"MIT"
] | null | null | null | from flask import Flask,render_template,url_for,Response
import cv2
# from camera import Camera
app = Flask(__name__)
camera = cv2.VideoCapture(0)
def generate_frames():
while True:
# reading the camera frame
# ret is a bool type with True or False as the output
ret,frame = came... | 37.297872 | 183 | 0.609812 |
dddf1ca2abed0994c507ff586a52e627f5345359 | 86 | py | Python | python/python_backup/PRAC_PYTHON/fd.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/fd.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/fd.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | out=open("abc.txt","w")
for i in range(1,10,1):
out.write("Hello")
out.close()
| 14.333333 | 24 | 0.581395 |
34d5b530d97c7a4f37c2d940f928dd99f5bb79f9 | 17,565 | py | Python | research/nlp/tprr/src/build_reranker_data.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/nlp/tprr/src/build_reranker_data.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/nlp/tprr/src/build_reranker_data.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... | 40.75406 | 119 | 0.586507 |
9b3e1d2f96218c6555230f46bcacc744df102784 | 21,125 | py | Python | Packs/Cybersixgill-DVE/Integrations/CybersixgillDVEEnrichment/CybersixgillDVEEnrichment_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Cybersixgill-DVE/Integrations/CybersixgillDVEEnrichment/CybersixgillDVEEnrichment_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Cybersixgill-DVE/Integrations/CybersixgillDVEEnrichment/CybersixgillDVEEnrichment_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import requests
import pytest
import json
import demistomock as demisto
cve_enrich = {
"created": "2020-06-26T00:00:00.001000Z",
"description": "A vulnerability exists that could allow the execution of unauthorized code or operating "
"system commands on systems running exacqVision Web Service versions 20... | 44.010417 | 113 | 0.478249 |
9b492e355d9d55c09e30b94b91ce18842090cb85 | 5,389 | py | Python | test/test_npu/test_network_ops/test_upsample_linear1d_backward.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_upsample_linear1d_backward.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_upsample_linear1d_backward.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... | 41.453846 | 94 | 0.531639 |
1fd275e77fb09652e856119afc0262a04ef6e943 | 7,471 | py | Python | official/cv/posenet/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/posenet/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/posenet/train.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... | 48.512987 | 107 | 0.636595 |
2f44cce96bf2257af3c333ddc0dced9187a091ef | 5,781 | py | Python | src/shapes/ellipse.py | ceofil/uni-python-project | 531e73218a3d53448f1fd39a0bf9404a6d6bb284 | [
"MIT"
] | null | null | null | src/shapes/ellipse.py | ceofil/uni-python-project | 531e73218a3d53448f1fd39a0bf9404a6d6bb284 | [
"MIT"
] | null | null | null | src/shapes/ellipse.py | ceofil/uni-python-project | 531e73218a3d53448f1fd39a0bf9404a6d6bb284 | [
"MIT"
] | null | null | null | import numpy as np
class Ellipse:
"""
Ellipse class, stores coords and style props.
Attributes:
x, y: center coords
rx, ry: ellipse dimensions
fill_color: 3-int tuple representing rgb color
stroke_color: 3-int tuple representing rgb color
stroke_width: int represen... | 38.798658 | 116 | 0.53745 |
2f61c693aa761ad3591207382a1b8a01fff55d09 | 738 | py | Python | plotly-unsupported/airfoil.py | rreusser/demos | 4aafa7e7cef8a044ffd2f6f31853cf25edaa4f38 | [
"MIT"
] | 217 | 2016-10-23T16:37:59.000Z | 2022-02-02T19:57:09.000Z | plotly-unsupported/airfoil.py | davchezt/demos | 4aafa7e7cef8a044ffd2f6f31853cf25edaa4f38 | [
"MIT"
] | null | null | null | plotly-unsupported/airfoil.py | davchezt/demos | 4aafa7e7cef8a044ffd2f6f31853cf25edaa4f38 | [
"MIT"
] | 15 | 2016-12-05T09:00:09.000Z | 2021-08-04T10:37:47.000Z | import numpy as np
import json
r = np.linspace(0, 1, 101)
th = np.linspace(0, np.pi * 2.0, 100, endpoint=True)
rr, tth = np.meshgrid(r, th)
n = 1.94
mux = -0.08
muy = 0.08
Rmin = np.sqrt(muy * muy + (1.0 - mux)**2.0)
Rmax = 10.0
zzeta = (mux + (Rmin * (1.0 - rr) + Rmax * rr) * np.cos(tth)) + \
1.0j * (muy + (Rmin ... | 27.333333 | 149 | 0.493225 |
85d6df1231aa0d989fd50167c0e9b9103f92129f | 93 | py | Python | helper/tsv_convert.py | BackInBash/cov19-ki | 793239f5ed2de985f367c590316fe0b710724d82 | [
"MIT"
] | null | null | null | helper/tsv_convert.py | BackInBash/cov19-ki | 793239f5ed2de985f367c590316fe0b710724d82 | [
"MIT"
] | null | null | null | helper/tsv_convert.py | BackInBash/cov19-ki | 793239f5ed2de985f367c590316fe0b710724d82 | [
"MIT"
] | null | null | null | tsv = "2020-12-26\tcomirnaty\tDE-BW\t9750\timpfzentren"
tsv = tsv.split('\t')
print(tsv[1]) | 18.6 | 55 | 0.688172 |
9b181e7c19f55625a085395826c8446c6a36d543 | 519 | py | Python | ___Python/KarPoo/po1_kennenlernen/p07_file_io/m01_count_files.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/KarPoo/po1_kennenlernen/p07_file_io/m01_count_files.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/KarPoo/po1_kennenlernen/p07_file_io/m01_count_files.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
# Zähle die Anzahl Ordner in einem Ordner (inkl. allen Unterordnern)
def count_dirs(path):
try:
subdirs = [subdir for subdir in path.iterdir() if subdir.is_dir()] # Bestimme die direkten Unterordner des Ordners Path
print(subdirs)
count = 1
for subdi... | 25.95 | 128 | 0.637765 |
9e45691de5aeed370c8159b1e0f512c05265ddfe | 2,304 | py | Python | oldp/urls.py | ImgBotApp/oldp | 575dc6f711dde3470d910e21c9440ee9b79a69ed | [
"MIT"
] | 3 | 2020-06-27T08:19:35.000Z | 2020-12-27T17:46:02.000Z | oldp/urls.py | ImgBotApp/oldp | 575dc6f711dde3470d910e21c9440ee9b79a69ed | [
"MIT"
] | null | null | null | oldp/urls.py | ImgBotApp/oldp | 575dc6f711dde3470d910e21c9440ee9b79a69ed | [
"MIT"
] | null | null | null | """OLDP URL Configuration"""
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.flatpages import views as flatpages_views
from django.views.generic import RedirectView, TemplateView
from rest_framewo... | 38.4 | 114 | 0.717448 |
9e82f7d3822d1ead8cd7845c9ec3310af2587e01 | 7,264 | py | Python | src/listener.py | msei/insectcounter | 1e9356e5639789b70c614da6c74307ec2b8c8304 | [
"MIT"
] | null | null | null | src/listener.py | msei/insectcounter | 1e9356e5639789b70c614da6c74307ec2b8c8304 | [
"MIT"
] | null | null | null | src/listener.py | msei/insectcounter | 1e9356e5639789b70c614da6c74307ec2b8c8304 | [
"MIT"
] | 2 | 2020-02-05T05:19:18.000Z | 2020-02-05T15:04:32.000Z | #! /usr/bin/env python3
"""
This is the main pi module. Only works on a raspberry pi (4).
usage: python3 listener.py [-h] [--dirpath DIRPATH] [--modelpath MODELPATH]
[--tokenfile TOKENFILE] [--permanent PERMANENT]
[--server_url SERVER_URL] [--threshold THRESHOLD]
... | 45.118012 | 120 | 0.640143 |
7b623b8f6dd9509fe8ea0ff0966037e068dfe17a | 7,593 | py | Python | research/cv/ssd_resnet34/src/resnet34.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/ssd_resnet34/src/resnet34.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/ssd_resnet34/src/resnet34.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 33.597345 | 102 | 0.551297 |
7b62b7d29d668f38151757d210be9a7e962bc03a | 2,136 | py | Python | plugins/tff_backend/migrations/fix_investments.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | null | null | null | plugins/tff_backend/migrations/fix_investments.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 178 | 2017-08-02T12:58:06.000Z | 2017-12-20T15:01:12.000Z | plugins/tff_backend/migrations/fix_investments.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... | 36.827586 | 118 | 0.699438 |
7b9fd469c26e04744a4cfe8a02d673a9afe60449 | 2,896 | py | Python | src/model/conv1d.py | msei/insectcounter | 1e9356e5639789b70c614da6c74307ec2b8c8304 | [
"MIT"
] | null | null | null | src/model/conv1d.py | msei/insectcounter | 1e9356e5639789b70c614da6c74307ec2b8c8304 | [
"MIT"
] | null | null | null | src/model/conv1d.py | msei/insectcounter | 1e9356e5639789b70c614da6c74307ec2b8c8304 | [
"MIT"
] | 2 | 2020-02-05T05:19:18.000Z | 2020-02-05T15:04:32.000Z | """
This module contains a convolutional network class for a keras
wingbeats model.
"""
from . import model_base
from tensorflow import keras
class Conv1D(model_base.Model):
"""
Class that inherits from model base class and constructs the keras model
as a Conv1D model similar to the one given on kaggle.
... | 40.788732 | 112 | 0.680594 |
a80d06205e6cc64816b99005578c5c04ba71f33d | 5,564 | py | Python | Crawler/crawl_rki_cases.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 15 | 2020-04-24T20:18:11.000Z | 2022-01-31T21:05:05.000Z | Crawler/crawl_rki_cases.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 2 | 2021-05-19T07:15:09.000Z | 2022-03-07T08:29:34.000Z | Crawler/crawl_rki_cases.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 4 | 2020-04-27T16:20:13.000Z | 2021-02-23T10:39:42.000Z | #!/usr/bin/env python
# coding: utf-8
# author: Max Fischer
import json
import sys
import time
import datetime
import logging
from datetime import date
import jsonschema
import psycopg2 as pg
import psycopg2.extras
import requests
import loadenv
from db_config import get_connection
logger = logging.getLogger(__name_... | 33.926829 | 259 | 0.660855 |
a5de1405e8246bf70bb321302870f4b33ac22431 | 2,337 | py | Python | hello/hello_ml/hello_knn.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2017-10-23T14:58:47.000Z | 2017-10-23T14:58:47.000Z | hello/hello_ml/hello_knn.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | null | null | null | hello/hello_ml/hello_knn.py | East196/hello-py | a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21 | [
"Apache-2.0"
] | 1 | 2018-04-06T07:49:18.000Z | 2018-04-06T07:49:18.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pickle
import urllib.request, urllib.error, urllib.parse
from collections import Counter
import math
from bs4 import BeautifulSoup
def vector_subtract(v, w):
"""subtracts two vectors componentwise"""
return [v_i - w_i for v_i, w_i in zip(v, w)]
def dot(v... | 29.582278 | 77 | 0.640137 |
19343ef8e199fc77cd21723618b4f5dc80f5b706 | 1,193 | py | Python | bot/exts/utils/command_maker.py | thecoderkitty/fluffington-bot | f518e7b66487aaf9e6c507ced43e15760d604be2 | [
"MIT"
] | null | null | null | bot/exts/utils/command_maker.py | thecoderkitty/fluffington-bot | f518e7b66487aaf9e6c507ced43e15760d604be2 | [
"MIT"
] | null | null | null | bot/exts/utils/command_maker.py | thecoderkitty/fluffington-bot | f518e7b66487aaf9e6c507ced43e15760d604be2 | [
"MIT"
] | null | null | null | import asyncio
import typing
import discord
from discord.ext import commands
from bot.bot import Bot
class CommandMaker(commands.Cog):
"""tools to create commands"""
def __init__(self, bot: Bot) -> None:
self.bot = bot
@commands.group(aliases=("cmdmaker",))
async def commands_maker(self, c... | 25.382979 | 59 | 0.599329 |
276fad48dac267fb6ab639d65cbef8843d877599 | 3,480 | py | Python | src/main.py | dfrommi/alfred-mvv | 5310f80ca3e17686fb534db0e53a613043a1b352 | [
"MIT"
] | 2 | 2019-07-07T19:24:15.000Z | 2019-10-16T09:07:25.000Z | src/main.py | dfrommi/alfred-mvv | 5310f80ca3e17686fb534db0e53a613043a1b352 | [
"MIT"
] | 1 | 2020-06-05T16:49:17.000Z | 2020-06-05T16:49:17.000Z | src/main.py | dfrommi/alfred-mvv | 5310f80ca3e17686fb534db0e53a613043a1b352 | [
"MIT"
] | 2 | 2017-04-03T11:47:59.000Z | 2019-10-16T09:09:26.000Z | #!/usr/bin/python
# encoding: utf-8
import sys
import argparse
import time
import datetime
import json
from mvg import MVG,Favorites
from workflow import Workflow,ICON_CLOCK,ICON_INFO,ICON_FAVORITE
DEFAULT_SETTINGS = {'stations': []}
resultItems = []
def main(wf):
parser = getCommandLineParser()
args = par... | 27.401575 | 103 | 0.581034 |
fd6cd5989668216abf445b7378a7f63fe3c1d211 | 29,064 | py | Python | repo/service.vpn.manager/libs/alternativeShellfire.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | 1 | 2017-11-26T18:18:46.000Z | 2017-11-26T18:18:46.000Z | repo/service.vpn.manager/libs/alternativeShellfire.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | null | null | null | repo/service.vpn.manager/libs/alternativeShellfire.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | 3 | 2019-09-30T19:52:05.000Z | 2020-04-12T21:20:56.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2018 Zomboided
#
# 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... | 43.771084 | 220 | 0.62531 |
8b67119acfca2dd41f78ce0a0dad4072a37c6768 | 2,095 | py | Python | ppyt/rules/conditions/financial_conditions.py | yusukemurayama/ppytrading | 9804d0de870d77bf8a1c847736a636b1342d4600 | [
"MIT"
] | 4 | 2016-08-16T07:47:15.000Z | 2017-12-11T10:08:47.000Z | ppyt/rules/conditions/financial_conditions.py | yusukemurayama/ppytrading | 9804d0de870d77bf8a1c847736a636b1342d4600 | [
"MIT"
] | null | null | null | ppyt/rules/conditions/financial_conditions.py | yusukemurayama/ppytrading | 9804d0de870d77bf8a1c847736a636b1342d4600 | [
"MIT"
] | 2 | 2018-06-15T04:43:15.000Z | 2020-05-02T07:47:15.000Z | # coding: utf-8
import logging
from ppyt.rules.conditions import ConditionBase
from ppyt.models.orm import start_session, FinancialData
logger = logging.getLogger(__name__)
class AnnualOperatingCfIncreasingCondtion(ConditionBase):
"""営業キャッシュフローが増加しているかを判定します。"""
_findkey = '年次営業キャッシュフロー増加エントリー'
def _set... | 29.507042 | 77 | 0.591885 |
47e5571bf678d5e013ee4c296cffd1d62a233cf7 | 1,139 | py | Python | aoc2020/day_23/part_1.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | aoc2020/day_23/part_1.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | aoc2020/day_23/part_1.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | from aoc2020 import *
class Solution(SolutionABC):
expected = "67384529"
def solve(self) -> any:
cups = next(self.resource_lines("input", lambda l: [int(i) for i in l]))
max_cup_value = max(cups)
round = 0
for _ in range(100):
round += 1
print(round, cu... | 27.780488 | 80 | 0.515364 |
9a35a2bff2d0c74bf0e788cfe3b7552c81cf777f | 78,101 | py | Python | AllTools-main/Mulai.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | AllTools-main/Mulai.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | AllTools-main/Mulai.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 os,sys,requests,json,time,string #
from datetime import datetime #
from random import randint #
from random import choice
import getpass,platform
import platform
import random
import itertools
import threading
import time
from requests import Session
import ... | 25.955799 | 232 | 0.545089 |
d03d8c6ef0f7e8a52974114bf1841ff6236f6693 | 550 | py | Python | exercises/pt/test_02_14.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/pt/test_02_14.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/pt/test_02_14.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert (
"from spacy.matcher import PhraseMatcher" in __solution__
), "Você importou corretamente o PhraseMatcher?"
assert (
"PhraseMatcher(nlp.vocab)" in __solution__
), "Você inicializou corretamente o PhraseMatcher?"
assert "matcher(doc)" in __solution__, "Você chamou ... | 50 | 100 | 0.723636 |
32827a0e3fe288fc5fef67556c711613ba2851f4 | 40 | py | Python | BtmManager-Prototyp-py/algo_test.py | datend3nker/JuFo-BtM | a01e931ec4862c12e8a4861eed0661806ee2d19e | [
"BSD-Source-Code"
] | null | null | null | BtmManager-Prototyp-py/algo_test.py | datend3nker/JuFo-BtM | a01e931ec4862c12e8a4861eed0661806ee2d19e | [
"BSD-Source-Code"
] | null | null | null | BtmManager-Prototyp-py/algo_test.py | datend3nker/JuFo-BtM | a01e931ec4862c12e8a4861eed0661806ee2d19e | [
"BSD-Source-Code"
] | null | null | null | import yaml
x = 0
y = float(x)
print(y) | 8 | 12 | 0.625 |
08cf4802adcd392b2ee411ea1aeb87dd2cb980a1 | 1,129 | py | Python | 5_Closures_and_Decorators/decorator_stacked.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | 1 | 2022-03-02T07:16:30.000Z | 2022-03-02T07:16:30.000Z | 5_Closures_and_Decorators/decorator_stacked.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | 5_Closures_and_Decorators/decorator_stacked.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | import time
from functools import wraps
def debug(fn):
print("Entering debug!")
@wraps(fn)
def debugger(*args, **kwargs):
print("Entering debugger!")
args_values_types = [(a, type(a)) for a in args]
kwargs_values_types = [(k, v, type(v)) for k, v in kwargs.items()]
print("Ar... | 30.513514 | 74 | 0.618246 |
f5e7568a7145876874c25f832a81e8619a73c7ce | 2,519 | py | Python | mps/server_nonstop.py | CcTtry/PipeSwitch | c6d632ee20b6dbbaea9a6fb95b9ea0ed4bbbf67e | [
"Apache-2.0"
] | null | null | null | mps/server_nonstop.py | CcTtry/PipeSwitch | c6d632ee20b6dbbaea9a6fb95b9ea0ed4bbbf67e | [
"Apache-2.0"
] | null | null | null | mps/server_nonstop.py | CcTtry/PipeSwitch | c6d632ee20b6dbbaea9a6fb95b9ea0ed4bbbf67e | [
"Apache-2.0"
] | null | null | null | import sys
import queue
import struct
import threading
import importlib
import torch
import torch.multiprocessing as mp
from util.utils import TcpServer, TcpAgent, timestamp
from mps.train import TrainProc
from mps.inference import InferProc
def func_get_request(active_model_name, qout):
# Listen c... | 28.625 | 106 | 0.621675 |
ded06b3d0445c1d0adac35af320e2cf698cb5969 | 3,780 | py | Python | pocketthrone/widgets/sidebar.py | herrschr/pocket-throne | 819ebae250f45b0a4b15a8320e2836c0b5113528 | [
"BSD-2-Clause"
] | 4 | 2016-06-05T16:48:04.000Z | 2020-03-23T20:06:06.000Z | pocketthrone/widgets/sidebar.py | herrschr/pocket-throne | 819ebae250f45b0a4b15a8320e2836c0b5113528 | [
"BSD-2-Clause"
] | null | null | null | pocketthrone/widgets/sidebar.py | herrschr/pocket-throne | 819ebae250f45b0a4b15a8320e2836c0b5113528 | [
"BSD-2-Clause"
] | null | null | null | __all__ = ('SideBar')
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.scrollview import ScrollView
from kivy.uix.label import Label
from kivy.uix.button import Button
from kivy.uix.image import Image
from kivy.uix.boxlayout import BoxLayout
from pocketthrone.entities.event import *
from pocketthrone.entities.e... | 32.869565 | 151 | 0.740476 |
deedcc1cf0e5220f69c755e895ceb950398e4750 | 888 | py | Python | common/models/stat/StatDailyMember.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | 2 | 2019-06-10T08:57:47.000Z | 2021-06-12T16:22:15.000Z | common/models/stat/StatDailyMember.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | null | null | null | common/models/stat/StatDailyMember.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from sqlalchemy import Column, Date, DateTime, Index, Integer, Numeric
from sqlalchemy.schema import FetchedValue
from application import db
class StatDailyMember(db.Model):
__tablename__ = 'stat_daily_member'
__table_args__ = (
db.Index('idx_date_member_id', 'date', 'member_id'),
... | 44.4 | 100 | 0.746622 |
19d7805b61dee3fe63f7f8b61d1909bf6a3dfdec | 532 | py | Python | urlopownik/models.py | EE/flexdb | 08a80b9e56201e678ef055af27bdefa6d52bcbf5 | [
"MIT"
] | null | null | null | urlopownik/models.py | EE/flexdb | 08a80b9e56201e678ef055af27bdefa6d52bcbf5 | [
"MIT"
] | null | null | null | urlopownik/models.py | EE/flexdb | 08a80b9e56201e678ef055af27bdefa6d52bcbf5 | [
"MIT"
] | null | null | null | from django.db import models
class Status(models.Model):
status = models.CharField(max_length=30)
def __unicode__(self):
return self.status
class Vacation(models.Model):
user = models.ForeignKey('custom_user.CustomUser')
fromdate = models.DateField()
todate = models.DateField()
#wh... | 23.130435 | 89 | 0.680451 |
cd5d5eb52a6ea9410318fb2fe6650e0e5ecf00d2 | 276 | py | Python | python/python_new/Python 3/bubblesort.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_new/Python 3/bubblesort.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_new/Python 3/bubblesort.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | def bubblesort(arr):
n= len(arr)
for i in range(n):
for j in range(0,n-1-i):
if arr[j] > arr[j+1]:
arr[j],arr[j+1]=arr[j+1],arr[j]
arr=[64,31,55,88,90,54]
bubblesort(arr)
print("Sorted array is: ")
for i in range(len(arr)):
print("%d"%arr[i])
| 23 | 41 | 0.550725 |
f891853ae87b5c4da590b462fa004b619fd15504 | 442 | py | Python | cs/lambda_cs/07_computer_architecture/notes/674/branchtable.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | cs/lambda_cs/07_computer_architecture/notes/674/branchtable.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | 8 | 2020-03-24T17:47:23.000Z | 2022-03-12T00:33:21.000Z | cs/lambda_cs/07_computer_architecture/notes/674/branchtable.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | def func1(a):
print("func1", a)
def func2(a):
print("func2", a)
def func3(a):
print("func3", a)
def func4(a):
print("func4", a)
def call_func(n, a):
"""
if n == 1:
func1()
elif n == 2:
func2()
elif n == 3:
func3()
elif n == 4:
func4()
"""
branch_table = {
1: func1,
2: func2,
3: func3,
4: ... | 11.333333 | 21 | 0.547511 |
901008388d44334d54c7db207791fa3f36ee3e46 | 547 | py | Python | checks/domain_variations_test.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 19 | 2018-04-20T11:03:41.000Z | 2022-01-12T20:58:56.000Z | checks/domain_variations_test.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 160 | 2018-04-05T16:12:59.000Z | 2022-03-01T13:01:27.000Z | checks/domain_variations_test.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 8 | 2018-11-05T13:07:57.000Z | 2021-06-11T11:46:43.000Z | import unittest
from pprint import pprint
from checks import domain_variations
from checks.config import Config
class TestDomainVariations(unittest.TestCase):
def test_simple(self):
url = 'http://example.org/'
config = Config(urls=[url])
checker = domain_variations.Checker(config=config,... | 26.047619 | 95 | 0.691042 |
39723300a55832f8f3ad7e56db80a324c7a45681 | 6,115 | py | Python | Image Processing/Versuch D/main.py | vincentscode/Praktikum-Hochschule-Trier | c2802364644c889e021726a7e6babaacd8978f47 | [
"MIT"
] | null | null | null | Image Processing/Versuch D/main.py | vincentscode/Praktikum-Hochschule-Trier | c2802364644c889e021726a7e6babaacd8978f47 | [
"MIT"
] | null | null | null | Image Processing/Versuch D/main.py | vincentscode/Praktikum-Hochschule-Trier | c2802364644c889e021726a7e6babaacd8978f47 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import time
from matplotlib import pyplot as plt
from operator import itemgetter
import statistics
# split dict at gaps with a min size
def split_dict_at_gaps(input, min_gap_size, key):
input = sorted(input, key=itemgetter(key))
groups = []
for i in range(len(input)):
if groups:
x... | 22.317518 | 81 | 0.686672 |
76fdd368a43b26c9b32a37c0a0e377f50a495ac6 | 114 | py | Python | tag_0/p_1_1_hallo_welt.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | tag_0/p_1_1_hallo_welt.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | tag_0/p_1_1_hallo_welt.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | """
1 Einstieg (Tag 0)
1.1 Gib den Text "Hallo Welt" aus.
"""
if __name__ == '__main__':
print('Hallo Welt')
| 14.25 | 34 | 0.605263 |
6a6b4a28021e52fad4152b2a46c5205072085952 | 5,486 | py | Python | Packs/HealthCheck/Scripts/HealthCheckServerConfiguration/HealthCheckServerConfiguration.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/HealthCheck/Scripts/HealthCheckServerConfiguration/HealthCheckServerConfiguration.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/HealthCheck/Scripts/HealthCheckServerConfiguration/HealthCheckServerConfiguration.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
DR = "False"
AE = True
res = []
new_json = []
# Add actionable items
DESCRIPTION = [
"The conf key: \"{}\" should be used only for debugging purposes",
"The conf key: \"{}\" should be used only for a good reason",
... | 43.19685 | 122 | 0.637805 |
6aa87dfbfb8a07ea6465b021984ce7600f3e2152 | 106,847 | py | Python | Packs/CortexXDR/Integrations/CortexXDRIR/CortexXDRIR_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CortexXDR/Integrations/CortexXDRIR/CortexXDRIR_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CortexXDR/Integrations/CortexXDRIR/CortexXDRIR_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import copy
import json
import os
import zipfile
import pytest
from freezegun import freeze_time
import demistomock as demisto
from CommonServerPython import Common
XDR_URL = 'https://api.xdrurl.com'
''' HELPER FUNCTIONS '''
def load_test_data(json_path):
with open(json_path) as f:
return json.load(f)... | 35.544578 | 130 | 0.651399 |
6ae133839260551567197bdf50292261abae2d91 | 3,265 | py | Python | projects/controllers/templates.py | Matheus158257/projects | 26a6148046533476e625a872a2950c383aa975a8 | [
"Apache-2.0"
] | null | null | null | projects/controllers/templates.py | Matheus158257/projects | 26a6148046533476e625a872a2950c383aa975a8 | [
"Apache-2.0"
] | null | null | null | projects/controllers/templates.py | Matheus158257/projects | 26a6148046533476e625a872a2950c383aa975a8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Templates controller."""
import re
from datetime import datetime
from sqlalchemy.exc import InvalidRequestError, ProgrammingError
from werkzeug.exceptions import BadRequest, NotFound
from ..database import db_session
from ..models import Template, Operator
from .utils import raise_if_experi... | 26.330645 | 108 | 0.673201 |
7c80a3e37dba1972a8b74a4aa470e8d4c3ce04b4 | 1,071 | py | Python | grid2.py | kantel/drawbot | db5db08c75a235de4274198c2bb0c0553b14adfe | [
"MIT"
] | null | null | null | grid2.py | kantel/drawbot | db5db08c75a235de4274198c2bb0c0553b14adfe | [
"MIT"
] | null | null | null | grid2.py | kantel/drawbot | db5db08c75a235de4274198c2bb0c0553b14adfe | [
"MIT"
] | null | null | null | from random import choice
riley1 = [(4/255, 21/255, 31/255), (1/255, 155/255, 183/255),
(226/255, 107/255, 67/255), (60/255, 76/255, 97/255),
(144/255, 166/255, 215/255), (240/255, 192/255, 68/255)]
marginh = 18
marginw = 10
gridsize_x = 25
gridsize_y = 21
WIDTH = 640
HEIGHT = 480
second... | 26.775 | 70 | 0.589169 |
6b116e1a2a8d2d1853ce0ffb0e3c38f966554a37 | 354 | py | Python | book/translation/jpn/book/website/scripts/clean.py | AndreaSanchezTapia/the-turing-way | fe3e1a8ad36f9086edb4f36ec8e398f253fd8e0f | [
"CC-BY-4.0"
] | 1 | 2021-11-09T20:43:06.000Z | 2021-11-09T20:43:06.000Z | book/translation/jpn/book/website/scripts/clean.py | AndreaSanchezTapia/the-turing-way | fe3e1a8ad36f9086edb4f36ec8e398f253fd8e0f | [
"CC-BY-4.0"
] | null | null | null | book/translation/jpn/book/website/scripts/clean.py | AndreaSanchezTapia/the-turing-way | fe3e1a8ad36f9086edb4f36ec8e398f253fd8e0f | [
"CC-BY-4.0"
] | 2 | 2021-12-21T17:35:45.000Z | 2021-12-21T20:43:01.000Z | """A helper script to "clean up" all of your generated markdown and HTML files."""
import shutil as sh
from pathlib import Path
path_root = Path(__file__).parent.parent
path = [path_root.joinpath('_site'),
path_root.joinpath('_build')]
for path in path:
print(f'Removing {path}...')
sh.rmtree(path, ig... | 25.285714 | 82 | 0.700565 |
6b2827fbf4af07a63f15baab1e3b2519f1309e8f | 12,144 | py | Python | packages/watchmen-inquiry-kernel/src/watchmen_inquiry_kernel/schema/subject_schema.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-inquiry-kernel/src/watchmen_inquiry_kernel/schema/subject_schema.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-inquiry-kernel/src/watchmen_inquiry_kernel/schema/subject_schema.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import Any, Dict, List, Optional
from watchmen_auth import PrincipalService
from watchmen_data_kernel.meta import TopicService
from watchmen_data_kernel.topic_schema import TopicSchema
from watchmen_data_kernel.utils import MightAVariable, parse_function_in_variable, parse_variable
from watchmen_inquiry_ke... | 43.06383 | 120 | 0.798995 |
6b4a1253de6c2af61ece8efebfe25530d70b2bc8 | 1,075 | py | Python | Hackerrank_problems/Apple and Orange/solution1.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 165 | 2020-10-03T08:01:11.000Z | 2022-03-31T02:42:08.000Z | Hackerrank_problems/Apple and Orange/solution1.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 383 | 2020-10-03T07:39:11.000Z | 2021-11-20T07:06:35.000Z | Hackerrank_problems/Apple and Orange/solution1.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 380 | 2020-10-03T08:05:04.000Z | 2022-03-19T06:56:59.000Z | import sys
def countApplesAndOranges(s, t, a, b, m, n, apples, oranges):
q,w=0,0
for i in range(m):
x=apples[i]+a #The distance of the apple tree is added to get the exact position of each apple in the number line
if x>=s and x<=t: #checking if the apple... | 25.595238 | 143 | 0.531163 |
860d91c6f66e8d32b7690ca8b452f37a85a52969 | 369 | py | Python | src/server/app/models/Presentation.py | MatthiasRiener/DigiPen | 9b4aff4a1c431e06d73733dc3dd3f3f3d4631704 | [
"MIT"
] | null | null | null | src/server/app/models/Presentation.py | MatthiasRiener/DigiPen | 9b4aff4a1c431e06d73733dc3dd3f3f3d4631704 | [
"MIT"
] | null | null | null | src/server/app/models/Presentation.py | MatthiasRiener/DigiPen | 9b4aff4a1c431e06d73733dc3dd3f3f3d4631704 | [
"MIT"
] | null | null | null | from ..db.settings import db
import json
import uuid
class Presentation(db.Document):
p_id = db.StringField(primary_key=True, required=True)
name = db.StringField(required=True)
creator= db.StringField()
created = db.IntField()
users = db.ListField(default=[])
dimension = db.StringField(requir... | 30.75 | 59 | 0.720867 |
864e2d96a9c0ffcb673addbc45fe03258deb36ec | 532 | py | Python | src/onegov/form/models/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/form/models/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/form/models/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.form.models.definition import FormDefinition
from onegov.form.models.submission import FormSubmission
from onegov.form.models.submission import PendingFormSubmission
from onegov.form.models.submission import CompleteFormSubmission
from onegov.form.models.submission import FormFile
from onegov.form.models.re... | 33.25 | 73 | 0.815789 |
86e968953743e2c8cbad9256dc72dc894230f951 | 4,104 | py | Python | kythe/proto/generate_protobufs.py | wcalandro/kythe | 64969a853711c228b4e3cfc3ce91b84b5bb853d7 | [
"Apache-2.0"
] | 1,168 | 2015-01-27T10:19:25.000Z | 2018-10-30T15:07:11.000Z | kythe/proto/generate_protobufs.py | wcalandro/kythe | 64969a853711c228b4e3cfc3ce91b84b5bb853d7 | [
"Apache-2.0"
] | 2,811 | 2015-01-29T16:19:04.000Z | 2018-11-01T19:48:06.000Z | kythe/proto/generate_protobufs.py | wcalandro/kythe | 64969a853711c228b4e3cfc3ce91b84b5bb853d7 | [
"Apache-2.0"
] | 165 | 2015-01-27T19:06:27.000Z | 2018-10-30T17:31:10.000Z | #!/usr/bin/env python3
#
# Copyright 2016 The Kythe Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | 38.716981 | 83 | 0.643275 |
077259f714c39374cbb57059cb7c30aab2893fa3 | 1,250 | py | Python | Algorithms/Graph_theory/breadth_first_search_shortest_reach.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Graph_theory/breadth_first_search_shortest_reach.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Graph_theory/breadth_first_search_shortest_reach.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from queue import Queue
from collections import defaultdict
class Graph:
def __init__(self, nodes):
self.nodes = nodes
self.edges = defaultdict(lambda: [])
def connect(self, x, y):
self.edges[x].append(y)
self.edges[y].append(x)
def find_all_distanc... | 27.173913 | 73 | 0.544 |
0775b1dfb2672fd7d21e30bd59875064a124b8a5 | 2,016 | py | Python | .vscode/extensions/ms-python.python-2021.6.944021595/pythonFiles/lib/jedilsp/pygls/lsp/types/client.py | malbaker/dom_dotfiles | c452a9c8f86669f4f6289ddcd24e12690819991b | [
"MIT"
] | null | null | null | .vscode/extensions/ms-python.python-2021.6.944021595/pythonFiles/lib/jedilsp/pygls/lsp/types/client.py | malbaker/dom_dotfiles | c452a9c8f86669f4f6289ddcd24e12690819991b | [
"MIT"
] | null | null | null | .vscode/extensions/ms-python.python-2021.6.944021595/pythonFiles/lib/jedilsp/pygls/lsp/types/client.py | malbaker/dom_dotfiles | c452a9c8f86669f4f6289ddcd24e12690819991b | [
"MIT"
] | null | null | null | ############################################################################
# Original work Copyright 2017 Palantir Technologies, Inc. #
# Original work licensed under the MIT License. #
# See ThirdPartyNotices.txt in the project root for license information. #
# All modifi... | 41.142857 | 79 | 0.545635 |
9c26a55e230cfc2080ac2049b9a8a40a49fb936e | 791 | py | Python | example/intro/app_0.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 8 | 2022-02-24T14:59:24.000Z | 2022-03-31T04:37:55.000Z | example/intro/app_0.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 3 | 2022-02-27T17:08:52.000Z | 2022-03-18T13:11:01.000Z | example/intro/app_0.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 2 | 2022-02-24T15:03:07.000Z | 2022-03-15T03:12:00.000Z | # app_0.py
import logging
from typing import List, Tuple
from my_config import InputMessage, OutputMessage, queue_config
from volley import Engine
logging.basicConfig(level=logging.INFO)
# the first node - reads from kafka and writes to redis
app_0 = Engine(
app_name="app_0",
input_queue="my-kafka-input", ... | 24.71875 | 78 | 0.721871 |
9c511a1acebe33835b72f8b887003cafdb550b5d | 12,312 | py | Python | torch/utils/data/datapipes/iter/grouping.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 5 | 2018-04-24T13:41:12.000Z | 2019-07-09T07:32:09.000Z | torch/utils/data/datapipes/iter/grouping.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 8 | 2020-05-17T10:23:03.000Z | 2022-02-28T12:47:56.000Z | torch/utils/data/datapipes/iter/grouping.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 7 | 2020-08-31T22:49:59.000Z | 2020-09-15T14:29:07.000Z | import random
from collections import defaultdict
from torch.utils.data import IterDataPipe, functional_datapipe, DataChunk
from torch.utils.data.datapipes.utils.common import deprecation_warning_torchdata
from typing import Any, Callable, DefaultDict, Iterator, List, Optional, Sized, TypeVar
T_co = TypeVar('T_co', ... | 39.588424 | 124 | 0.638726 |
b98341ec4314d1da9c213bff5de8b2d3e1eec4b3 | 3,357 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/netvisor/test_pn_snmp_community.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/netvisor/test_pn_snmp_community.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/netvisor/test_pn_snmp_community.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | # Copyright: (c) 2018, Pluribus Networks
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_coll... | 44.76 | 143 | 0.672029 |
0ecda929ddc50aaac993f33ca0d4d0502257e5a0 | 184,194 | py | Python | Contents/Code/__init__.py | typekitrel/abctestard | 1df43561327694ba155f513ad152aab51c56ef42 | [
"MIT"
] | null | null | null | Contents/Code/__init__.py | typekitrel/abctestard | 1df43561327694ba155f513ad152aab51c56ef42 | [
"MIT"
] | null | null | null | Contents/Code/__init__.py | typekitrel/abctestard | 1df43561327694ba155f513ad152aab51c56ef42 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import string
import random # Zufallswerte für rating_key
import urllib # urllib.quote(),
import urllib2 # urllib2.Request
import ssl # HTTPS-Handshake
import os, subprocess # u.a. Behandlung von Pfadnamen
import sys # Plattformerkennung
import shutil # Dateioperationen
import re... | 45.603862 | 185 | 0.664566 |
16891fa4456acf2ca880d86fcab14dc1c8637cff | 2,776 | py | Python | 10.3389/fevo.2021.762173/scripts/print_image_capure_dates.py | jqsunac/doi | c5912a40c7bfda8270e5d51fbdd82a9f0650bd23 | [
"MIT"
] | null | null | null | 10.3389/fevo.2021.762173/scripts/print_image_capure_dates.py | jqsunac/doi | c5912a40c7bfda8270e5d51fbdd82a9f0650bd23 | [
"MIT"
] | null | null | null | 10.3389/fevo.2021.762173/scripts/print_image_capure_dates.py | jqsunac/doi | c5912a40c7bfda8270e5d51fbdd82a9f0650bd23 | [
"MIT"
] | null | null | null | import os
import sys
import glob
from PIL import Image
from PIL import ExifTags
from PIL.ExifTags import TAGS
# pwd
# # ~/projects/dragonfly/data/dataset_T
# python ../../scripts/print_image_capure_dates.py cropped_image
# python ../../scripts/print_image_capure_dates.py raw
def get_gps(fpath):
im = Image.ope... | 27.215686 | 79 | 0.524135 |
bcf8317bf9007e87b13997e07f91f2af58001119 | 1,760 | py | Python | Proxverter-main/setup.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Proxverter-main/setup.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Proxverter-main/setup.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 setuptools
with open("README-pypi.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="proxverter",
version="0.5.3",
author="hash3liZer",
author_email="admin@shellvoide.com",
description="Cross platform system wide proxy server & TLS Interception libra... | 40 | 96 | 0.628409 |
fc4c8c98d78840847db5c0b1abeaa4e4a2cb0658 | 1,246 | py | Python | Algorithms/Constructive_Algorithms/Flipping_The_Matrix.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | Algorithms/Constructive_Algorithms/Flipping_The_Matrix.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | Algorithms/Constructive_Algorithms/Flipping_The_Matrix.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | # flipping a matrix
# https://www.hackerrank.com/challenges/flipping-the-matrix/problem?h_r=internal-search
# pattern
'''
row
col
flip a matrix
Row => 0r
Col => 1c
matrix => 2n x 2n
where original matrix is n x n
Task : max sum of nxn matrix
replaced terms of size of n = 4 => 4x4 matrix
m[0][0] => m[0][-1],m[-1... | 15.974359 | 87 | 0.478331 |
5d7d40156aa7976d426f0abcfe9267e462a6ff81 | 2,232 | py | Python | day15/coffe_machine.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day15/coffe_machine.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day15/coffe_machine.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | from coffe_machine_menu import MENU, resources
def print_report():
print(f"Water: {resources['water']}ml")
print(f"Milk: {resources['milk']}ml")
print(f"Coffe: {resources['coffee']}g")
print(f"Money: ${'{:.2f}'.format(fond)}")
def check_receipt(receipt):
receipt_to_make = MENU[receipt]
for i... | 28.987013 | 110 | 0.623208 |
073aa99cab67d3879ed0836ce832a1cf6f16a356 | 1,080 | py | Python | examples/display_analog2.py | RMGrau/PhyPiDAQ | e7ea08a0d5de9772a1a5e32ccd0ab1bfddf9ff54 | [
"BSD-2-Clause"
] | 7 | 2018-11-30T13:38:27.000Z | 2021-03-10T15:37:56.000Z | examples/display_analog2.py | RMGrau/PhyPiDAQ | e7ea08a0d5de9772a1a5e32ccd0ab1bfddf9ff54 | [
"BSD-2-Clause"
] | 5 | 2020-11-11T09:19:00.000Z | 2022-02-06T09:04:55.000Z | examples/display_analog2.py | RMGrau/PhyPiDAQ | e7ea08a0d5de9772a1a5e32ccd0ab1bfddf9ff54 | [
"BSD-2-Clause"
] | 16 | 2019-04-16T10:15:45.000Z | 2021-12-15T14:59:31.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''display_analog2.py
illustrates the general usage of package phypidaq
prints and displays data read from 2 analog channels
'''
import time, numpy as np
# import module controlling readout device
from phypidaq.ADS1115Config import *
# import display
from phypi... | 25.714286 | 69 | 0.682407 |
db40e06bb254e15c8e340852eeaba06e40d3a57a | 1,926 | py | Python | experiment/grabcut/cut.py | corganhejijun/FaceFill | 6914f3ee680b41161817fe5eafc09b82e59d9113 | [
"MIT"
] | null | null | null | experiment/grabcut/cut.py | corganhejijun/FaceFill | 6914f3ee680b41161817fe5eafc09b82e59d9113 | [
"MIT"
] | null | null | null | experiment/grabcut/cut.py | corganhejijun/FaceFill | 6914f3ee680b41161817fe5eafc09b82e59d9113 | [
"MIT"
] | null | null | null | import numpy as np
import cv2
import os
import dlib
folderName = os.path.join(os.path.dirname(__file__), 'ncre')
ext = '.jpg'
fileList = os.listdir(folderName)
shape_model = os.path.join(os.path.dirname(__file__), '../../models/shape_predictor_68_face_landmarks.dat')
shapePredict = dlib.shape_predictor(shape_model)
det... | 35.018182 | 107 | 0.624091 |
db7042c283164d616775e62baa3b4f7488a643c6 | 519 | py | Python | day22/scoreboard.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day22/scoreboard.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day22/scoreboard.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | from turtle import Turtle
class Scoreboard(Turtle):
def __init__(self) -> None:
super().__init__()
self.l_score = 0
self.r_score = 0
self.color("white")
self.penup()
self.hideturtle()
self.goto(0, 200)
self.write(f"{self.l_score} : {self.r_score}"... | 24.714286 | 100 | 0.570328 |
dbab0c75b6d244590736a7b114c60aa310183f76 | 4,608 | py | Python | plugins/tff_backend/api/users.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | null | null | null | plugins/tff_backend/api/users.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 178 | 2017-08-02T12:58:06.000Z | 2017-12-20T15:01:12.000Z | plugins/tff_backend/api/users.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... | 42.666667 | 120 | 0.763238 |
91777d01c6b4b0a8378d4bba428e40b516902ac0 | 5,089 | py | Python | lap1.py | SirReaDy/Merkle-tree-scheme | f58a2b5472269433441a5600e195e27aa5e6b42f | [
"MIT"
] | null | null | null | lap1.py | SirReaDy/Merkle-tree-scheme | f58a2b5472269433441a5600e195e27aa5e6b42f | [
"MIT"
] | null | null | null | lap1.py | SirReaDy/Merkle-tree-scheme | f58a2b5472269433441a5600e195e27aa5e6b42f | [
"MIT"
] | null | null | null |
from bitstring import BitArray
import hashlib
from os import urandom
#https://pypi.org/project/pylamport/
#https://github.com/InnovativeInventor/pylamport
#https://en.wikipedia.org/wiki/Lamport_signature
class LamportSignature:
"""Lamport signature class.
Attributes:
private_key (li... | 30.842424 | 108 | 0.525054 |
37f7fb820f277b7db0bd7c0b378deb832a167394 | 30,482 | py | Python | Packs/RubrikPolaris/Integrations/RubrikPolaris/RubrikPolaris.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/RubrikPolaris/Integrations/RubrikPolaris/RubrikPolaris.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/RubrikPolaris/Integrations/RubrikPolaris/RubrikPolaris.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
import json
import urllib3
import traceback
from typing import Tuple, List, Dict
from datetime import date, datetime
import dateparser
import re
# Disable insecure warnings
urllib3.disable_warnings()
''' CONSTANTS '''
DATE_TI... | 39.129653 | 126 | 0.549177 |
729eaea61d3b92ed1588fc3c8a1099c954dcb4e9 | 384 | py | Python | server/bumf/core/utils/mixins.py | bumfiness/bumf | 71c404c0a8f804b8f0e127df3de6d8916db4c660 | [
"Apache-2.0"
] | 6 | 2017-01-07T17:59:46.000Z | 2017-02-10T13:19:46.000Z | server/bumf/core/utils/mixins.py | rixx/bumf | 71c404c0a8f804b8f0e127df3de6d8916db4c660 | [
"Apache-2.0"
] | null | null | null | server/bumf/core/utils/mixins.py | rixx/bumf | 71c404c0a8f804b8f0e127df3de6d8916db4c660 | [
"Apache-2.0"
] | null | null | null | from django.db import models
class CalculateTotal:
@property
def total(self):
incoming = self.incoming_transactions\
.aggregate(total=models.Sum('amount'))\
.get('total') or 0
outgoing = self.outgoing_transactions.\
aggregate(total=models.Sum('amount'))\
... | 25.6 | 51 | 0.601563 |
be49393d1ae84f9a913a4dcfab1d08461fc5dd8f | 101 | py | Python | insomniac/extra_features/report.py | shifenis/Insomniac | 7c9d572b83c29049bc3075073be5549fe821a739 | [
"MIT"
] | 533 | 2020-06-01T10:40:11.000Z | 2022-03-29T17:05:50.000Z | insomniac/extra_features/report.py | shifenis/Insomniac | 7c9d572b83c29049bc3075073be5549fe821a739 | [
"MIT"
] | 399 | 2020-06-01T22:01:55.000Z | 2022-03-29T20:39:29.000Z | insomniac/extra_features/report.py | shifenis/Insomniac | 7c9d572b83c29049bc3075073be5549fe821a739 | [
"MIT"
] | 166 | 2020-06-01T21:51:52.000Z | 2022-03-12T14:14:44.000Z | from insomniac import activation_controller
exec(activation_controller.get_extra_feature('report'))
| 25.25 | 55 | 0.871287 |
be6078a871c6613e443d09ccf7a3a2fa27f6122c | 18,689 | py | Python | frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/pos.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/pos.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/pos.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 json
import frappe
from erpnext.accounts.party import get_party_account_currency
from erpnext.controllers.accounts_controller import get_taxes_... | 32.616056 | 138 | 0.73562 |
be60f78373650227b6572798ae0d89d45f9a875d | 9,282 | py | Python | plotting/modules/styles/lines.py | metxchris/MMM-Explorer | 251b4d7af56241882611bc47e94ec2923e4be8da | [
"MIT"
] | null | null | null | plotting/modules/styles/lines.py | metxchris/MMM-Explorer | 251b4d7af56241882611bc47e94ec2923e4be8da | [
"MIT"
] | null | null | null | plotting/modules/styles/lines.py | metxchris/MMM-Explorer | 251b4d7af56241882611bc47e94ec2923e4be8da | [
"MIT"
] | null | null | null | # Standard Packages
from cycler import cycler
# 3rd Party Packages
from matplotlib.pyplot import rcParams
# Local Packages
import plotting.modules.plotstyles
def init(style):
Lines = plotting.modules.plotstyles.StyleType.Lines
if style is Lines.MMM:
prop_cycle = cycler(
color=[
... | 32.117647 | 77 | 0.34917 |
be629551319d588378e6fd3157aba2e54a26580b | 4,187 | py | Python | site/public/courses/CS-2.2/Challenges/Solutions/challenge_1/src/graph.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | 1 | 2021-08-24T20:22:19.000Z | 2021-08-24T20:22:19.000Z | site/public/courses/CS-2.2/Challenges/Solutions/challenge_1/src/graph.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | site/public/courses/CS-2.2/Challenges/Solutions/challenge_1/src/graph.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | from src.vertex import Vertex
class Graph:
""" Graph Class
A class demonstrating the essential facts and functionalities of graphs.
"""
# Static variables
DEFAULT_EDGE_WEIGHT = 0
def __init__(self, is_directed):
"""Initialize a graph object with an empty dictionary."""
... | 35.184874 | 95 | 0.576308 |
433116e25205349ad133e296b301c5ad6c872a2a | 92 | py | Python | languages/python/exercises/concept/strings/loglines.py | imanc/v3 | dac09fd6e9b917dc7b5ac5ab9bfadb842049aee7 | [
"MIT"
] | 1 | 2020-02-15T08:03:01.000Z | 2020-02-15T08:03:01.000Z | languages/python/exercises/concept/strings/loglines.py | imanc/v3 | dac09fd6e9b917dc7b5ac5ab9bfadb842049aee7 | [
"MIT"
] | null | null | null | languages/python/exercises/concept/strings/loglines.py | imanc/v3 | dac09fd6e9b917dc7b5ac5ab9bfadb842049aee7 | [
"MIT"
] | null | null | null | def change_log_level():
pass
def extract_message():
pass
def reformat():
pass
| 10.222222 | 23 | 0.652174 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.