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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3a9dde4f0c7af7d1de1a3153f867d643e842f0f1 | 1,539 | py | Python | 684/tuwulisu_684_topological_search.py | Leetcode-Secret-Society/warehouse | 40d7969683b1296f361e799cda37f15ceec52af8 | [
"MIT"
] | null | null | null | 684/tuwulisu_684_topological_search.py | Leetcode-Secret-Society/warehouse | 40d7969683b1296f361e799cda37f15ceec52af8 | [
"MIT"
] | null | null | null | 684/tuwulisu_684_topological_search.py | Leetcode-Secret-Society/warehouse | 40d7969683b1296f361e799cda37f15ceec52af8 | [
"MIT"
] | null | null | null | class Node:
def __init__(self, n):
self.n = n
self.connected_nodes = []
def add_adj_node(self, adj_node):
self.connected_nodes.append(adj_node)
class Solution:
def findRedundantConnection(self, edges: List[List[int]]) -> List[int]:
node_dict = dict()
node_set = set()
... | 35.790698 | 75 | 0.54256 |
3aab5a8d2220f7601d474a4b6ab986883b1be4bb | 2,408 | py | Python | code/selfish_proxy/strategy/executor.py | simonmulser/master-thesis | 5ca2ddda377a0eede5a3c50866e0f90292c5448f | [
"CC-BY-4.0"
] | null | null | null | code/selfish_proxy/strategy/executor.py | simonmulser/master-thesis | 5ca2ddda377a0eede5a3c50866e0f90292c5448f | [
"CC-BY-4.0"
] | null | null | null | code/selfish_proxy/strategy/executor.py | simonmulser/master-thesis | 5ca2ddda377a0eede5a3c50866e0f90292c5448f | [
"CC-BY-4.0"
] | 1 | 2019-06-05T09:10:30.000Z | 2019-06-05T09:10:30.000Z | from strategy import ActionException
from strategy import Action
import logging
class Executor:
def __init__(self, networking):
self.networking = networking
def execute(self, action, private_tip, public_tip):
blocks_to_transfer = []
if action is Action.match:
if public_t... | 39.47541 | 109 | 0.653654 |
c92ca60a30c1a572fbd8a023c30accb11023b8b5 | 12,220 | py | Python | etc/old/es/es.py | timm/py | 28be3bb63433895e2bcab27ad82cb0b0cc994f37 | [
"Unlicense"
] | 1 | 2021-03-31T03:41:06.000Z | 2021-03-31T03:41:06.000Z | etc/old/es/es.py | timm/py | 28be3bb63433895e2bcab27ad82cb0b0cc994f37 | [
"Unlicense"
] | null | null | null | etc/old/es/es.py | timm/py | 28be3bb63433895e2bcab27ad82cb0b0cc994f37 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
# vim: filetype=python ts=2 sw=2 sts=2 et :
"""
es.py /əˈspī/ verb LITERARY see something that is hidden, or obscure.
Optimizer, written as a data miner.
Break the data up into regions of 'bad' and 'better'. 'Interesting'
things occur at very different frequencies in 'bad' and 'better'.
Find... | 33.850416 | 84 | 0.524959 |
c985183363c71d412aef0d077e88598f8307a341 | 1,673 | py | Python | 20-hs-redez-sem/groups/05-decentGames/src/DGABoard.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/DGABoard.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/DGABoard.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | class DGABoard:
pos_to_num = {
# --------------------
'00': 0, '10': 1, '20': 2, '30': 3, '40': 4, '50': 5, '60': 6, '70': 7, '80': 8,
# --------------------
'90': 9, '92': 10, '94': 11, '96': 12, '98': 13, '910': 14, '912': 15, '914': 16, '916': 17,
# --------------------
... | 38.022727 | 102 | 0.329946 |
a35d135b1b2a0e6a1ea379bb8aebcd5a5467cbce | 435 | py | Python | IVTa/2014/ALEKSEEV_I_S/task_1_50.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTa/2014/ALEKSEEV_I_S/task_1_50.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTa/2014/ALEKSEEV_I_S/task_1_50.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 1. Вариант 50.
# Напишите программу, которая будет сообщать род деятельности и псевдоним
#под которым скрывается Герхард Герхардс. После вывода информации программа
#должна дожидаться пока пользователь нажмет Enter для выхода.
# Alekseev I.S.
# 14.05.2016
print("Герхард Герхардс - нидерландский учёный-гума... | 36.25 | 125 | 0.795402 |
a3a24593a24aa8b591c24a3152545d17e2c8c5d2 | 695 | py | Python | Project Euler Qusetions 41 - 50/Project Euler Question 43.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | 1 | 2020-02-11T02:03:02.000Z | 2020-02-11T02:03:02.000Z | Project Euler Qusetions 41 - 50/Project Euler Question 43.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | null | null | null | Project Euler Qusetions 41 - 50/Project Euler Question 43.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | null | null | null | #Project Euler Question 43
#Sub-string divisibility
import itertools
def pan_check():
pan_range = [str(var) for var in range(0, 10)]
pan_list = [int("".join(var)) for var in itertools.permutations(pan_range)]
divide_check = [2, 3, 5, 7, 11, 13, 17]
pan_results = []
for perm in pan_list:
... | 28.958333 | 79 | 0.565468 |
6e51d72059f00222baf80856254fbd7509f5c561 | 478 | py | Python | python/odml/util_funcs.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | python/odml/util_funcs.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | python/odml/util_funcs.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | """
Script file to test minor scriptlets
"""
import sys
import odml
def filter_func():
"""
odml validation warnings filter function tests
"""
doc = odml.Document()
sec = odml.Section(parent=doc)
prop = odml.Property(parent=sec)
val = odml.validation.Validation(prop)
_ = [curr for cu... | 17.703704 | 63 | 0.644351 |
287287be9008d5d05a379c924dfa261c89012a79 | 267 | py | Python | angstrom/2018/crypto/gmx/aes.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | angstrom/2018/crypto/gmx/aes.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | angstrom/2018/crypto/gmx/aes.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | from Crypto import Random
from Crypto.Cipher import AES
def encrypt(k, m):
iv = Random.new().read(16)
cipher = AES.new(k, AES.MODE_CFB, iv)
return iv + cipher.encrypt(m)
def decrypt(k, c):
cipher = AES.new(k, AES.MODE_CFB, c[:16])
return cipher.decrypt(c[16:]) | 24.272727 | 42 | 0.692884 |
95865099c95f0db2413e302a1eafe43686e432b8 | 6,824 | py | Python | zenodo_release.py | YouQam/o2r-project.github.io | 645ad72aa02c9771b41cccad9db3e881dfddcb5e | [
"CC-BY-4.0"
] | 6 | 2016-05-01T00:13:48.000Z | 2021-05-14T00:07:38.000Z | zenodo_release.py | YouQam/o2r-project.github.io | 645ad72aa02c9771b41cccad9db3e881dfddcb5e | [
"CC-BY-4.0"
] | 19 | 2016-07-21T15:25:56.000Z | 2022-03-22T14:15:47.000Z | zenodo_release.py | YouQam/o2r-project.github.io | 645ad72aa02c9771b41cccad9db3e881dfddcb5e | [
"CC-BY-4.0"
] | 12 | 2016-07-21T14:58:45.000Z | 2021-06-30T13:14:43.000Z | #!/bin/env python3
import requests
import json
import sys
import logging
import os
import pprint
from datetime import datetime
import time
import coloredlogs
import copy
level = token = os.getenv('LOGLEVEL', logging.INFO)
logging.basicConfig(level=level)
coloredlogs.install(level='DEBUG')
# configuration
#deposition_... | 45.798658 | 143 | 0.702374 |
959ce8aec63edf312ab7f62f103bd08765850c2d | 10,471 | py | Python | ui/configDialog.py | greenorca/ECMan | 744cb2ec97d52a68d45cf40a967ac60b92dafbb4 | [
"MIT"
] | null | null | null | ui/configDialog.py | greenorca/ECMan | 744cb2ec97d52a68d45cf40a967ac60b92dafbb4 | [
"MIT"
] | 9 | 2019-05-11T19:53:01.000Z | 2020-11-10T07:24:14.000Z | ui/configDialog.py | greenorca/ECMan | 744cb2ec97d52a68d45cf40a967ac60b92dafbb4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'configDialog.ui'
##
## Created by: Qt User Interface Compiler version 5.14.1
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
#############... | 47.166667 | 168 | 0.725814 |
6c00eb0f9b12520e47f82d7a3f73b740737e7874 | 2,979 | py | Python | test.py | jondye/tree-lights | 99e8d637ce1942663d6ec712c58d340723d5baec | [
"MIT"
] | null | null | null | test.py | jondye/tree-lights | 99e8d637ce1942663d6ec712c58d340723d5baec | [
"MIT"
] | null | null | null | test.py | jondye/tree-lights | 99e8d637ce1942663d6ec712c58d340723d5baec | [
"MIT"
] | null | null | null | from blinkstick import blinkstick
from time import sleep
from itertools import cycle
# F R O N T B A C K
#
# . . . .
# . . . ... | 46.546875 | 100 | 0.193018 |
6c343eb977a339e24d8c0724423a9bb7b6cabbad | 2,827 | py | Python | sqlscantarget.py | sadcode-org/sql-finder | 2539b3121c0d5743e4dba61ca3733cbece44be04 | [
"MIT"
] | 1 | 2020-07-30T22:52:00.000Z | 2020-07-30T22:52:00.000Z | sqlscantarget.py | sadcode-org/sql-finder | 2539b3121c0d5743e4dba61ca3733cbece44be04 | [
"MIT"
] | null | null | null | sqlscantarget.py | sadcode-org/sql-finder | 2539b3121c0d5743e4dba61ca3733cbece44be04 | [
"MIT"
] | 2 | 2020-07-04T07:36:17.000Z | 2021-05-02T12:27:36.000Z |
# !/usr/bin/python
# coding=utf-8
import requests, glob, time, random
from urlparse import urlparse
import os, sys
from multiprocessing import Pool
import codecs
r = '\033[31m'
g = '\033[32m'
y = '\033[33m'
b = '\033[34m'
m = '\033[35m'
c = '\033[36m'
w = '\033[37m'
rr = '\033[39m'
def cls():
linux = 'clear'
... | 28.555556 | 119 | 0.452423 |
6c6fac8386296745da6d425e773a0599ecc1b144 | 619 | py | Python | api/views/book.py | aidun/seite50 | 761a8e76f9e4473f70a8705dce169d61bf660267 | [
"Apache-2.0"
] | null | null | null | api/views/book.py | aidun/seite50 | 761a8e76f9e4473f70a8705dce169d61bf660267 | [
"Apache-2.0"
] | 2 | 2018-05-11T18:26:18.000Z | 2018-05-12T18:49:38.000Z | api/views/book.py | aidun/seite50 | 761a8e76f9e4473f70a8705dce169d61bf660267 | [
"Apache-2.0"
] | 1 | 2018-10-10T19:52:17.000Z | 2018-10-10T19:52:17.000Z | from django.shortcuts import render
from rest_framework import generics
from api.serializers.book import BookSerializer
from api.models.book import Book
class CreateBookView(generics.ListCreateAPIView):
"""
Einfache view zum Anlegen von Büchern
"""
queryset = Book.objects.all()
serializer_class =... | 24.76 | 61 | 0.74475 |
66aecbfca7f9f827848548250e8e2146b147cd9f | 6,096 | py | Python | pycsw/tests/unittests/test_wsgi.py | Geosoft2/Geosoftware-II-AALLH | bdb61d9a1111b9082ec2b9f309998c5f2166975e | [
"MIT"
] | 118 | 2015-01-07T00:24:09.000Z | 2022-03-19T15:35:43.000Z | pycsw/tests/unittests/test_wsgi.py | Geosoft2/Geosoftware-II-AALLH | bdb61d9a1111b9082ec2b9f309998c5f2166975e | [
"MIT"
] | 319 | 2015-01-06T23:51:46.000Z | 2022-03-20T11:22:57.000Z | pycsw/tests/unittests/test_wsgi.py | Geosoft2/Geosoftware-II-AALLH | bdb61d9a1111b9082ec2b9f309998c5f2166975e | [
"MIT"
] | 113 | 2015-01-07T00:42:23.000Z | 2022-02-19T18:05:08.000Z | # =================================================================
#
# Authors: Ricardo Garcia Silva <ricardo.garcia.silva@gmail.com>
#
# Copyright (c) 2017 Ricardo Garcia Silva
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the... | 39.584416 | 79 | 0.673064 |
dd6d9c53b62c4e01f140e006a5d725a608d76052 | 300 | py | Python | exercises/ja/exc_01_09.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/ja/exc_01_09.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/ja/exc_01_09.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
nlp = spacy.load("ja_core_news_sm")
text = "静岡県にある三保の松原は世界遺産の一部です。"
# テキストを処理
doc = ____
# 固有表現をイテレート
for ____ in ____.____:
# 固有表現の文字列とラベルをプリント
print(____.____, ____.____)
# 三保の松原のスパンを取得
mihonomatsubara = ____
# スパンの文字列をプリント
print("Missing entity:", mihonomatsubara.text)
| 15 | 46 | 0.74 |
dd76289691cfd36a3988d008a545c4f6db64403a | 946 | py | Python | python/src/GPIOSample.py | StephanKoo/LED-AlarmClock | 6936c201aa08037b130eafed7a5a71b73f8e1ac0 | [
"Apache-2.0"
] | null | null | null | python/src/GPIOSample.py | StephanKoo/LED-AlarmClock | 6936c201aa08037b130eafed7a5a71b73f8e1ac0 | [
"Apache-2.0"
] | null | null | null | python/src/GPIOSample.py | StephanKoo/LED-AlarmClock | 6936c201aa08037b130eafed7a5a71b73f8e1ac0 | [
"Apache-2.0"
] | 1 | 2021-08-13T20:38:50.000Z | 2021-08-13T20:38:50.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# External module imports
import RPi.GPIO as GPIO
import time
from datetime import datetime
# Pin Definitons:
touchSwitch = 17 # Broadcom pin 17 (P1 pin 11)
# Pin Setup:
GPIO.setmode(GPIO.BCM) # Broadcom pin-numbering scheme
GPIO.setup(touchSwitch, GPIO.OUT) # Button pin... | 28.666667 | 72 | 0.628964 |
06ba9fdb78de9ce3d13482a5831f25a9dd4b0270 | 2,873 | py | Python | oneflow/python/onnx/optimizer/optimizer_base.py | wanghongsheng01/framework_enflame | debf613e05e3f5ea8084c3e79b60d0dd9e349526 | [
"Apache-2.0"
] | 2 | 2021-09-10T00:19:49.000Z | 2021-11-16T11:27:20.000Z | oneflow/python/onnx/optimizer/optimizer_base.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | 1 | 2021-06-16T08:37:50.000Z | 2021-06-16T08:37:50.000Z | oneflow/python/onnx/optimizer/optimizer_base.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | 1 | 2021-11-10T07:57:01.000Z | 2021-11-10T07:57:01.000Z | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 29.927083 | 87 | 0.637313 |
662253a177f056a34ac91ca9434719d71cee04bc | 6,102 | py | Python | research/cv/3dcnn/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/3dcnn/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/3dcnn/eval.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... | 38.866242 | 120 | 0.625369 |
c6f6b8f20c1e7826423eef1d5d369de6c577b0fc | 279 | py | Python | twitoff/__init__.py | JohnMorrisonn/Twitoff | bd14957017aea8278a603f83b43bb69457d57a43 | [
"MIT"
] | null | null | null | twitoff/__init__.py | JohnMorrisonn/Twitoff | bd14957017aea8278a603f83b43bb69457d57a43 | [
"MIT"
] | 4 | 2021-03-19T03:45:47.000Z | 2022-03-11T23:59:53.000Z | twitoff/__init__.py | JohnMorrisonn/Twitoff | bd14957017aea8278a603f83b43bb69457d57a43 | [
"MIT"
] | null | null | null | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from decouple import config
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = config('DATABASE_URL')
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
db = SQLAlchemy(app)
from twitoff import routes | 27.9 | 62 | 0.817204 |
5913ca5617123ba84a461ee1e818710cf66acbee | 3,441 | py | Python | documentation/markdown_ext/munge_ext_ext.py | comradekingu/osmeditor4android | a43a7ad0a5081aabfaf8aaac6282172951f1c6a5 | [
"Apache-2.0"
] | null | null | null | documentation/markdown_ext/munge_ext_ext.py | comradekingu/osmeditor4android | a43a7ad0a5081aabfaf8aaac6282172951f1c6a5 | [
"Apache-2.0"
] | null | null | null | documentation/markdown_ext/munge_ext_ext.py | comradekingu/osmeditor4android | a43a7ad0a5081aabfaf8aaac6282172951f1c6a5 | [
"Apache-2.0"
] | null | null | null | """
#
Rewrite links to markdown files to html based on code nicked from mkdocs
2015 Simon Poole
The original code was licensed on the following terms:
Copyright 2014, Tom Christie. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the ... | 36.606383 | 755 | 0.714327 |
599947c9e7d365759ea61b079269dc54243f0925 | 7,483 | py | Python | Packs/RiskSense/Scripts/RiskSenseGetRansomewareCVEScript/RiskSenseGetRansomewareCVEScript.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/RiskSense/Scripts/RiskSenseGetRansomewareCVEScript/RiskSenseGetRansomewareCVEScript.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/RiskSense/Scripts/RiskSenseGetRansomewareCVEScript/RiskSenseGetRansomewareCVEScript.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from CommonServerPython import *
from collections import defaultdict
from datetime import date
def header_transform(key: str) -> str:
"""
Function returns header key in human readable
:param key: header key
:return: translated headers
"""
header_dict = {
'Cve': 'CVE ID',
'CVSS... | 37.984772 | 111 | 0.622745 |
ab74c3a236e34cbeb052aa58003fe68d9d27e846 | 1,139 | py | Python | year_3/comppi_0/tgbot/models.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | year_3/comppi_0/tgbot/models.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | 21 | 2020-03-24T16:26:04.000Z | 2022-02-18T15:56:16.000Z | year_3/comppi_0/tgbot/models.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | class TGBot(object):
def __init__(self, token, admin):
self.token = token
self.admin = admin
self.chat = None # type of TGChat
class TGChat(object):
def __init__(self, chatinst):
self.chatinst = chatinst
self.chat_posts = {} # post_id: telegram.Post
self.chat_... | 32.542857 | 73 | 0.667252 |
e627ebb2f55adbe8daa423abc763aaffc73b5ac9 | 1,014 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/ch05_datastructures/solutions/ex02_stack.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch05_datastructures/solutions/ex02_stack.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch05_datastructures/solutions/ex02_stack.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
class Stack:
def __init__(self):
self._values = []
def push(self, elem):
self._values.append(elem)
def pop(self):
if self.is_empty():
raise StackIsEmptyException()
return s... | 18.777778 | 50 | 0.58284 |
fb07c6e0bf034b80f0009f2a0396239caa659a57 | 2,563 | py | Python | apps/modules/common/infra/recipes/modules.py | bleonard252-forks/pangolin-mobile | 392df6c8a66d39f31d0e2512caf3d31ae40c758f | [
"Apache-2.0"
] | null | null | null | apps/modules/common/infra/recipes/modules.py | bleonard252-forks/pangolin-mobile | 392df6c8a66d39f31d0e2512caf3d31ae40c758f | [
"Apache-2.0"
] | null | null | null | apps/modules/common/infra/recipes/modules.py | bleonard252-forks/pangolin-mobile | 392df6c8a66d39f31d0e2512caf3d31ae40c758f | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Recipe for building and running pre-submit checks for the modules repo."""
from recipe_engine.recipe_api import Property
DEPS = [
'infra/goma',
... | 38.833333 | 78 | 0.671089 |
32f350a8a3c898070add5cfaca2610ea7820c5e4 | 404 | py | Python | python/refactoring/cyclomatic_example.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/refactoring/cyclomatic_example.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/refactoring/cyclomatic_example.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import sys
def main():
if len(sys.argv) > 1: # 1
filepath = sys.argv[1]
else:
print("Provide a file path")
exit(1)
if filepath: # 2
with open(filepath) as fp: # 3
for line in fp.readlines(): # 4
if line != "\n": # 5
... | 21.263158 | 45 | 0.440594 |
952b6220545816b526ec448a4261f82d4da7acb1 | 5,041 | py | Python | skills/musicplayer/action-musicplayer.py | gidocarper/rhasspy-skills-test | eaf57287a67a0e43a299053cf0b107d61afd9b13 | [
"Unlicense"
] | 4 | 2021-01-08T21:08:50.000Z | 2021-12-08T15:30:50.000Z | skills/musicplayer/action-musicplayer.py | gidocarper/rhasspy-skills-test | eaf57287a67a0e43a299053cf0b107d61afd9b13 | [
"Unlicense"
] | null | null | null | skills/musicplayer/action-musicplayer.py | gidocarper/rhasspy-skills-test | eaf57287a67a0e43a299053cf0b107d61afd9b13 | [
"Unlicense"
] | null | null | null | import json, os
import io, configparser
from rhasspyhermes.nlu import NluIntent
from rhasspyhermes_app import EndSession, HermesApp
from musicplayer import MuuzikPlayer
app = HermesApp("MusicApp")
def read_configuration_file():
try:
cp = configparser.ConfigParser()
print(os.getcwd() + "/" + os.p... | 35.5 | 110 | 0.716524 |
23dcbacc385c56a60ea4b7d93b16a24bb919284a | 1,664 | py | Python | src/dspl.py | DrBumm/Minibyte-Engine | 833bf00ff86603419476c8755f551c0f6b4ac86b | [
"Unlicense"
] | 4 | 2019-08-16T20:48:33.000Z | 2021-05-23T20:10:08.000Z | src/dspl.py | DrBumm/Minibyte-Engine | 833bf00ff86603419476c8755f551c0f6b4ac86b | [
"Unlicense"
] | 16 | 2019-08-21T19:06:15.000Z | 2020-06-02T11:31:32.000Z | src/dspl.py | DrBumm/Minibyte-Engine | 833bf00ff86603419476c8755f551c0f6b4ac86b | [
"Unlicense"
] | null | null | null | # Display level
def init(lvl, lvl_new=[]):
if ' ' in lvl[0] or ' ' in lvl[len(lvl) - 1]:
print(
"Stell bitte sicher das dein Level überall an der seite\nränder (X) hat damit der Spieler nicht out off "
"bounce gelangt\nund dort schaden(Glitches/Bugs) veruscachen kann!")
... | 29.714286 | 118 | 0.445313 |
7b98fa297c88b43dfe35720c596aa06b1e29be38 | 2,304 | py | Python | src/unminder/cli.py | pawamoy/unminder | ef996ab81b15c04625cc162720e0e61d7ed3e25e | [
"0BSD"
] | null | null | null | src/unminder/cli.py | pawamoy/unminder | ef996ab81b15c04625cc162720e0e61d7ed3e25e | [
"0BSD"
] | null | null | null | src/unminder/cli.py | pawamoy/unminder | ef996ab81b15c04625cc162720e0e61d7ed3e25e | [
"0BSD"
] | null | null | null | # Why does this file exist, and why not put this in `__main__`?
#
# You might be tempted to import things from `__main__` later,
# but that will cause problems: the code will get executed twice:
#
# - When you run `python -m unminder` python will execute
# `__main__.py` as a script. That means there won't be any
# ... | 28.8 | 82 | 0.652344 |
9e1e5b13d7da2ed3d0112b732486627c11a0b2db | 5,235 | py | Python | PSA/Config.py | SECURED-FP7/secured-psa-nsm | 20c8f790ebc2d2aa8c33bda1e047f8f29275a0be | [
"Apache-2.0"
] | null | null | null | PSA/Config.py | SECURED-FP7/secured-psa-nsm | 20c8f790ebc2d2aa8c33bda1e047f8f29275a0be | [
"Apache-2.0"
] | null | null | null | PSA/Config.py | SECURED-FP7/secured-psa-nsm | 20c8f790ebc2d2aa8c33bda1e047f8f29275a0be | [
"Apache-2.0"
] | null | null | null | # -*- Mode:Python;indent-tabs-mode:nil; -*-
#
# Config.py
#
# PSA configuration file parsing
#
# Author: anon,
# jju / VTT Technical Research Centre of Finland Ltd., 2016
#
import ConfigParser
import os
#import copy
import logging
def resolve_psa_home():
try:
home = os.environ[ 'PSA_HOME' ]
... | 31.160714 | 87 | 0.606877 |
e3093ebd5b3088945173f624b5dcb827714bdeb1 | 474 | py | Python | Hero/2021/crypto/ExtractMyBlocks/challenge.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | Hero/2021/crypto/ExtractMyBlocks/challenge.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | Hero/2021/crypto/ExtractMyBlocks/challenge.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | #!/usr/bin/env python3
from os import getenv
from Crypto.Cipher import AES
BLOCK_SIZE = 16
FLAG = getenv("FLAG")
KEY = getenv("KEY")
padding = lambda msg: msg + "0" * (BLOCK_SIZE - len(msg) % BLOCK_SIZE)
encrypt = lambda plain: AES.new(KEY, AES.MODE_ECB).encrypt(plain).hex()
print("[SUPPORT] Password Reset")
accoun... | 19.75 | 71 | 0.696203 |
4753f41f5a9ff1193e5bc4b6457c03c07c2edec6 | 226 | py | Python | build.py | suned/pfun | 46c460646487abfef897bd9627891f6cf7870774 | [
"MIT"
] | 126 | 2019-09-16T15:28:20.000Z | 2022-03-20T10:57:53.000Z | build.py | suned/pfun | 46c460646487abfef897bd9627891f6cf7870774 | [
"MIT"
] | 54 | 2019-09-30T08:44:01.000Z | 2022-03-20T11:10:00.000Z | build.py | suned/pfun | 46c460646487abfef897bd9627891f6cf7870774 | [
"MIT"
] | 11 | 2020-01-02T08:32:46.000Z | 2022-03-20T11:10:24.000Z | from setuptools.extension import Extension
def build(setup_kwargs):
extensions = [Extension("pfun.effect", ['src/pfun/effect.c'])]
setup_kwargs.update(
{
"ext_modules": extensions
}
)
| 20.545455 | 66 | 0.619469 |
47d1a24f2d39282a8911a6cafd8de02715c0d204 | 157 | py | Python | debug.py | IfengAutomation/AutomationTestServer | b16ad0fae9cd7198a93cf2f3cd68d46fdae2dbdd | [
"Apache-2.0"
] | null | null | null | debug.py | IfengAutomation/AutomationTestServer | b16ad0fae9cd7198a93cf2f3cd68d46fdae2dbdd | [
"Apache-2.0"
] | null | null | null | debug.py | IfengAutomation/AutomationTestServer | b16ad0fae9cd7198a93cf2f3cd68d46fdae2dbdd | [
"Apache-2.0"
] | null | null | null | import testserver
if __name__ == '__main__':
app = testserver.get_from_cfg('config.py')
app.run('0.0.0.0', 8080, use_reloader=False, threaded=True)
| 26.166667 | 63 | 0.700637 |
47f1244ad606bada41c942b71116b50ed8f0f1be | 529 | py | Python | Resize Images/rezise.py | DangoMelon0701/SUMPA | c039f6debf6a0876059eefd70ad661c5f35d4715 | [
"MIT"
] | null | null | null | Resize Images/rezise.py | DangoMelon0701/SUMPA | c039f6debf6a0876059eefd70ad661c5f35d4715 | [
"MIT"
] | null | null | null | Resize Images/rezise.py | DangoMelon0701/SUMPA | c039f6debf6a0876059eefd70ad661c5f35d4715 | [
"MIT"
] | null | null | null | import os
from PIL import Image
basewidth =3000
img_list = [ imfile for imfile in os.listdir(os.getcwd()) if imfile.endswith('.JPG')]
img_dir = os.path.join(os.getcwd(),'resized')
if not os.path.exists(img_dir):
os.mkdir(img_dir)
for image_file in img_list:
img = Image.open(image_file)
wpercent = (basew... | 31.117647 | 85 | 0.6862 |
47fd5205b176ae299d81ace942c4b4e465596b1f | 1,640 | py | Python | preprocess_netflix.py | mishra-rajeev/Movie_recommendation_system | 1f899c97bc18c5e5542f13ca3e05ba90d795d997 | [
"MIT"
] | null | null | null | preprocess_netflix.py | mishra-rajeev/Movie_recommendation_system | 1f899c97bc18c5e5542f13ca3e05ba90d795d997 | [
"MIT"
] | null | null | null | preprocess_netflix.py | mishra-rajeev/Movie_recommendation_system | 1f899c97bc18c5e5542f13ca3e05ba90d795d997 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
data = pd.read_csv('netflix_titles.csv')
# keeping the columns that are useful in recommndation system
data = data.loc[:,['title','director','cast','country','listed_in']]
# replacing null values in the all columns with string 'unknown'
data['director'] = data['directo... | 34.166667 | 100 | 0.703659 |
08f869400c4478da86df99f9f161592fde6ea03a | 488 | py | Python | py-basics/src/lectures/lists/exercise1.py | AndrasTarlos/s4f | bfe2d631a9a2715953d8ac5ddc8ef97d3cefb426 | [
"CC0-1.0"
] | null | null | null | py-basics/src/lectures/lists/exercise1.py | AndrasTarlos/s4f | bfe2d631a9a2715953d8ac5ddc8ef97d3cefb426 | [
"CC0-1.0"
] | null | null | null | py-basics/src/lectures/lists/exercise1.py | AndrasTarlos/s4f | bfe2d631a9a2715953d8ac5ddc8ef97d3cefb426 | [
"CC0-1.0"
] | 4 | 2021-12-13T15:52:00.000Z | 2022-03-28T13:54:53.000Z | """
List Exercise 1
Implementieren Sie die Funktion list_from_range(), um damit eine Liste mit allen Elementen von 'min' bis
und mit 'max' zu erstellen. Verwenden Sie List.append() und benutzen Sie die nachfolgenden Tests zur Kontrolle.
"""
def list_from_range(min, max):
my_list = []
for element in range(min... | 25.684211 | 111 | 0.67623 |
3ec30f9c21c42cb7a1484f6991ad970e021e6a90 | 844 | py | Python | Packs/CommonScripts/Scripts/Cut/Cut.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/Cut/Cut.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/Cut/Cut.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 cut(value, fields, delim):
if delim == "''":
delim = ""
data = value.split(delim)
fields = [int(_) for _ in fields.split(",")]
max_index = max(fields)
if len(data) < max_index:
raise E... | 25.575758 | 106 | 0.603081 |
3ef1e98a6b6682fc0f02c16a5ae07bd2b9c074d2 | 3,440 | py | Python | tools/buergerentscheidPoller.py | FloEdelmann/vaterstetten-in-zahlen | 4c76170d5123eaa091a8d01a51d746659bed7203 | [
"MIT"
] | 10 | 2021-01-28T21:43:22.000Z | 2022-01-15T16:50:34.000Z | tools/buergerentscheidPoller.py | FloEdelmann/vaterstetten-in-zahlen | 4c76170d5123eaa091a8d01a51d746659bed7203 | [
"MIT"
] | 7 | 2021-06-10T07:19:21.000Z | 2022-03-22T15:11:17.000Z | tools/buergerentscheidPoller.py | FloEdelmann/vaterstetten-in-zahlen | 4c76170d5123eaa091a8d01a51d746659bed7203 | [
"MIT"
] | 5 | 2021-01-29T14:14:45.000Z | 2022-01-09T15:37:36.000Z | #!/usr/bin/env python
import csv
import io
import json
import os
from pathlib import Path
import requests
import sys
import traceback
from urllib.parse import urlparse
def read_file(path: str) -> str:
file = Path(path)
if not file.is_file():
return None
with open(path, 'r') as reader:
return reader.rea... | 30.442478 | 195 | 0.677035 |
41279aea2ea28b96918978445bc30677a54573e7 | 580 | py | Python | INBa/2015/Cherniy_F_Y/task_5_28.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Cherniy_F_Y/task_5_28.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Cherniy_F_Y/task_5_28.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 5. Вариант 28.
# Напишите программу, которая бы при запуске случайным образом
# отображала имя одного из четырех основателей группы The Beatles.
# Cherniy F. Y.
# 27.03.2016
import random
print ("Программа случчайным образом отображает имя одного из четырех основателей группы The Beatles.")
x = int (random... | 23.2 | 103 | 0.682759 |
f5aafdfc203bf044e81d2ace487be9b580c0f1f6 | 1,196 | py | Python | gemtown/modelers/urls.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | gemtown/modelers/urls.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | 5 | 2020-09-04T20:13:39.000Z | 2022-02-17T22:03:33.000Z | gemtown/modelers/urls.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
app_name = "modelers"
urlpatterns = [
path("all/", view=views.ListAllModelers.as_view(), name="all_modelers"),
path("<str:num_of_modeler>/new/", view=views.ListNewModelers.as_view(), name="new_modelers"),
path("<str:num_of_modeler>/popular/", view=views.List... | 70.352941 | 114 | 0.713211 |
f5f4941008186cc65da5188521757ddee5118bd0 | 2,938 | py | Python | v204/python/funktion.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 2 | 2019-12-10T10:25:11.000Z | 2021-01-26T13:59:40.000Z | v204/python/funktion.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | null | null | null | v204/python/funktion.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 1 | 2020-12-06T21:24:58.000Z | 2020-12-06T21:24:58.000Z | # übergeben werden
# t1 und t2
o = 0
max = t1[o]
min1 = []
mint1 = []
max1 = []
maxt1 = []
while o < len(t1)-1:
o += 1
if t1[o] >= max:
print(o, t1[o], max)
while t1[o] >= max and o < len(t1)-1:
max = t1[o]
o += 1
print(o, t1[o], max)
print(o, max)
ma... | 24.081967 | 128 | 0.556841 |
defe2598ce53a06e54d4e37bed66cc3343fa78c9 | 1,190 | py | Python | spider/master_summit.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | null | null | null | spider/master_summit.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | 2 | 2021-03-31T18:54:16.000Z | 2021-12-13T19:49:08.000Z | spider/master_summit.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*
# 获得爬取推文所需信息
import json
from Config_summit import get_noau_config
from datetime import datetime, timedelta
_, db, r = get_noau_config() # 数据库配置
def get_query_str(event): # 获取Twitter查询信息
trigger = 'meet OR meeting OR summit OR met OR meets OR talk OR talks OR trip'
partner = event['ev... | 35 | 105 | 0.580672 |
dfbffeea8382cf904408a28e40e6bc32ec78f1b9 | 29 | pyde | Python | sketches/buchhaim/buchhaim01/buchhaim01.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/buchhaim/buchhaim01/buchhaim01.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/buchhaim/buchhaim01/buchhaim01.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | from sprite import Hero, Wall | 29 | 29 | 0.827586 |
a0a0fff6151f80d57ef43e38bfef6b0c9444da73 | 960 | py | Python | tikz/csv-bivariate-normal-distribution/create.py | RalfGuder/LaTeX-examples | a1bf9fe422969be1ca4674394ebd2170c07f7693 | [
"MIT"
] | 1,231 | 2015-01-07T04:04:25.000Z | 2022-03-31T17:43:29.000Z | tikz/csv-bivariate-normal-distribution/create.py | DoubleL61/LaTeX-examples | cd0d97f85fadb59b7c6e9062b37a8bf7d725ba0c | [
"MIT"
] | 5 | 2015-05-10T13:10:47.000Z | 2021-05-02T21:28:49.000Z | tikz/csv-bivariate-normal-distribution/create.py | DoubleL61/LaTeX-examples | cd0d97f85fadb59b7c6e9062b37a8bf7d725ba0c | [
"MIT"
] | 400 | 2015-01-05T06:22:18.000Z | 2022-03-19T04:07:59.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Create samples for bivariate distribution"""
from numpy.random import multivariate_normal, seed
def create_data(n):
means = [0.0, 0.0]
cov = [[1.0, 0.7], [0.7, 4.0]]
seed(0)
samples = multivariate_normal(means, cov, n)
with open("data.csv", "w") a... | 27.428571 | 74 | 0.576042 |
f83847804b78a9425470ad955ab580ed6a305aab | 561 | py | Python | SleekSecurity/layers/plugins/fingerprint/waf/isaserver.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | SleekSecurity/layers/plugins/fingerprint/waf/isaserver.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | SleekSecurity/layers/plugins/fingerprint/waf/isaserver.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# @name: Wascan - Web Application Scanner
# @repo: https://github.com/m4ll0k/Wascan
# @author: Momo Outaadi (M4ll0k)
# @license: See the file 'LICENSE.txt
from re import search,I
def isaserver(headers,content):
_ = False
_ |= search(r'The server denied the spe... | 35.0625 | 134 | 0.709447 |
3e125d5083d30d9cd3a46f24e9d8960e0b69b06b | 5,489 | py | Python | jobs/__init__.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 19 | 2018-04-20T11:03:41.000Z | 2022-01-12T20:58:56.000Z | jobs/__init__.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 160 | 2018-04-05T16:12:59.000Z | 2022-03-01T13:01:27.000Z | jobs/__init__.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 8 | 2018-11-05T13:07:57.000Z | 2021-06-11T11:46:43.000Z | """
The jobs module allows to create jobs for the queue and take jobs off the queue
"""
from datetime import datetime
import logging
import os
import random
import shutil
from git import Repo
import tenacity
import yaml
from google.api_core.exceptions import Aborted
from google.cloud import datastore
import config
... | 30.325967 | 92 | 0.571324 |
900e80d4770fed236530812d742aaedf3dc80dcb | 500 | py | Python | 2021/02/graphics-js/covid-real-cases-20210127/combine.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2021/02/graphics-js/covid-real-cases-20210127/combine.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2021/02/graphics-js/covid-real-cases-20210127/combine.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 7 | 2015-04-04T04:45:54.000Z | 2021-02-18T11:12:48.000Z | import pandas as pd
filename = 'DailyCIR.csv'
df = pd.read_csv(filename)
pop = pd.read_csv('fyi.StatePopulation.csv')
df = pd.merge(df, pop, on='State', how='left')
df['50prctile'] = df['50prctile'] * df['Population']
df['2.5prctile'] = df['2.5prctile'] * df['Population']
df['97.5prctile'] = df['97.5prctile'] * df[... | 31.25 | 120 | 0.658 |
5fc4dd28d6f340f16ca88cc13bc50b3eb7052f82 | 903 | py | Python | source/pkgsrc/devel/py-hg-git/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/py-hg-git/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/devel/py-hg-git/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-setup.py,v 1.1 2021/09/27 02:00:44 mef Exp $
py36 flags:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 1085: ordinal not in range(128)
--- setup.py.orig 2021-01-11 23:58:48.000000000 +0900
+++ setup.py 2021-09-27 10:51:25.778622523 +0900
@@ -2,6 +2,8 @@ from __future__ import abs... | 34.730769 | 126 | 0.6866 |
0811a9ed94f5afd92d6d6ec55ffe389c29621e7a | 985 | py | Python | Projects/simple/colors.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | Projects/simple/colors.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | Projects/simple/colors.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | # Creating the different color text
class Colors:
Red = '\033[91m'
Green = '\033[92m'
Yellow = '\033[93m'
Blue = '\033[94m'
Cyan = '\033[96m'
Bold = '\033[1m'
Underline = '\033[4m'
End = '\033[0m'
print("Color Cyan ====> ",Colors.Cyan + 'Balavignesh' + Colors.Cyan + Colors.End + '\n'... | 46.904762 | 118 | 0.605076 |
4b5b21146917f06090769b8ddfa4a1a58e9cbffc | 373 | py | Python | Online-Judges/DimikOJ/Python/49-is-prime.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | 3 | 2021-06-15T01:19:23.000Z | 2022-03-16T18:23:53.000Z | Online-Judges/DimikOJ/Python/49-is-prime.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | Online-Judges/DimikOJ/Python/49-is-prime.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | def is_prime(n):
if n == 2:
return True
if n % 2 == 0:
return False
reng = int((n ** 0.5)+ 1)
for i in range(3, reng, 2):
if n % i == 0:
return False
return True
for i in range(int(input())):
n = int(input())
if is_prime(n):
print(n, "is a ... | 17.761905 | 34 | 0.455764 |
8a42d5ff6c7724b2b63033ca68d3ce3f8fe30317 | 2,994 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/storage/netapp/test_netapp_e_global.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/storage/netapp/test_netapp_e_global.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/storage/netapp/test_netapp_e_global.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | # (c) 2018, NetApp Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from ansible_collections.community.general.plugins.modules.storage.netapp.netapp_e_global import GlobalSettings
from ansible_collections.community.general.tests.unit.modules.utils import AnsibleFailJso... | 38.883117 | 123 | 0.643621 |
8a7255a44708d79e2c6b0695642ec648d732fe45 | 216 | py | Python | python/python_package/main.py | daoxuewu/cheat_sheet | 4a164f7eccb85ca39b9a9ad58fe5d495862ecf44 | [
"MIT"
] | null | null | null | python/python_package/main.py | daoxuewu/cheat_sheet | 4a164f7eccb85ca39b9a9ad58fe5d495862ecf44 | [
"MIT"
] | null | null | null | python/python_package/main.py | daoxuewu/cheat_sheet | 4a164f7eccb85ca39b9a9ad58fe5d495862ecf44 | [
"MIT"
] | null | null | null | # 參考來源 : https://www.youtube.com/watch?v=GGp-7VHgsKk
import geometry.point
result = geometry.point.distance(3,4)
print("距離", result)
import geometry.line as line
result = line.slope(1,1,3,3)
print("斜率", result) | 30.857143 | 53 | 0.717593 |
6b0bc5d49865d14ff9abbc4e089aebf2e307ad36 | 1,980 | py | Python | Packs/CommonScripts/Scripts/IsInternalDomainName/IsInternalDomainName_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/IsInternalDomainName/IsInternalDomainName_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/IsInternalDomainName/IsInternalDomainName_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from IsInternalDomainName import check_sub_domains_in_domain
import pytest
@pytest.mark.parametrize('domain_name, domain_to_check, expected_output', [
# domain valid
(["paloaltonetworks.com", "paloaltonetworkss.coms"],
["paloaltonetworks.com", "apps.paloaltonetworks.com", "a.paloaltonetworkss.coms"],
... | 45 | 94 | 0.689394 |
86547d2159583bd56d9b6cb2c2d32d1b23e82180 | 5,358 | py | Python | Chapter5_DNN/Chapter5_5_NeuralNetworkGUI/end/drawer/src/drawing_gui.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter5_DNN/Chapter5_5_NeuralNetworkGUI/end/drawer/src/drawing_gui.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter5_DNN/Chapter5_5_NeuralNetworkGUI/end/drawer/src/drawing_gui.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | import os
import sys
from PyQt5 import QtCore
from PyQt5 import QtGui
from PyQt5 import QtWidgets
from PyQt5 import uic
from .dnn import build_model
from .dnn import nn_predict
from .preprocessing import get_image
FILE_PATH = os.path.abspath(__file__)
PROJECT_DIR = os.path.dirname(os.path.dirname(FILE_PATH))
IMAGE_... | 31.333333 | 110 | 0.639978 |
86c32505f36d05cbb49a88a5cd74f289680cf8cb | 3,319 | py | Python | src/onegov/feriennet/cli.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/cli.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/cli.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import click
import sys
from onegov.core.cli import command_group
from onegov.activity.models import Period
cli = command_group()
@cli.command(name='delete-period', context_settings={'singular': True})
@click.argument('title')
def delete_period(title):
""" Deletes all the data associated with a period, includi... | 29.633929 | 79 | 0.570051 |
be18b415ffa484055ec8cde5cb79722ae2f9411d | 425 | py | Python | backend/api/btb/templates/reset.py | prototypefund/project-c | a87a49d7c1317b1e3ec03ddd0ce146ad0391b5d2 | [
"MIT"
] | 4 | 2020-04-30T16:11:24.000Z | 2020-06-02T10:08:07.000Z | backend/api/btb/templates/reset.py | prototypefund/project-c | a87a49d7c1317b1e3ec03ddd0ce146ad0391b5d2 | [
"MIT"
] | 291 | 2020-04-20T13:11:13.000Z | 2022-02-10T21:54:46.000Z | backend/api/btb/templates/reset.py | prototypefund/project-c | a87a49d7c1317b1e3ec03ddd0ce146ad0391b5d2 | [
"MIT"
] | 2 | 2020-04-19T14:56:01.000Z | 2020-04-19T18:09:34.000Z | from .template import Template
from os import environ
from .load import load_file
from .render import render
def reset_template(code):
frontend = (
environ["FRONTEND_URL"]
if "FRONTEND_URL" in environ
else "http://localhost:5000"
)
subject = "JOWOMO: Setze Dein Passwort zurücksetz... | 23.611111 | 64 | 0.675294 |
9c6445641386c49dec9de740ea9fbc300a9deb25 | 9,119 | py | Python | DatenbankEditRuestung.py | klnrdknt/Sephrasto | 591224fe01825a169c21ebc6136533f282ce9a0b | [
"MIT"
] | 15 | 2017-11-09T12:49:52.000Z | 2022-03-06T12:18:48.000Z | DatenbankEditRuestung.py | klnrdknt/Sephrasto | 591224fe01825a169c21ebc6136533f282ce9a0b | [
"MIT"
] | 40 | 2018-02-01T21:32:01.000Z | 2022-03-22T11:35:28.000Z | DatenbankEditRuestung.py | klnrdknt/Sephrasto | 591224fe01825a169c21ebc6136533f282ce9a0b | [
"MIT"
] | 13 | 2018-03-12T17:50:42.000Z | 2022-03-06T12:21:41.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'DatenbankEditRuestung.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 impor... | 53.327485 | 330 | 0.699528 |
13823704688a7310d3dc36d61ac9bae7abcb971b | 453 | py | Python | Packs/CommonScripts/Scripts/IsNotInCidrRanges/IsNotInCidrRanges.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/IsNotInCidrRanges/IsNotInCidrRanges.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/IsNotInCidrRanges/IsNotInCidrRanges.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import *
from netaddr import IPAddress, IPNetwork
def main():
ip_address = demisto.args()['left']
cidr_range_list = argToList(demisto.args()['right'])
for cidr in cidr_range_list:
if IPAddress(ip_address) in IPNetwork(cidr):
demis... | 21.571429 | 56 | 0.677704 |
b9b94af2206baa05b0e4fc782f54822af457dda7 | 3,783 | py | Python | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOede.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 3 | 2019-06-18T15:28:09.000Z | 2019-07-11T07:31:45.000Z | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOede.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 2 | 2019-07-11T14:03:25.000Z | 2021-02-08T16:14:04.000Z | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTOede.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 1 | 2019-06-12T11:07:37.000Z | 2019-06-12T11:07:37.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
from qgis.core import QgsProject, QgsSnappingConfig, QgsVectorLayer
def run(id, gtotool, config, debug):
try:
#common tool objects
iface = gtotool.iface
info = gtotool.info
gtomain = gtotool.gtomain
#tool data
activelayer = ... | 40.677419 | 101 | 0.611684 |
6a30ea0af6dc87cbf39ceb8acb369a4924c0ba60 | 313 | py | Python | INBa/2015/Serdechnaya_A_M/task_2_25.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Serdechnaya_A_M/task_2_25.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Serdechnaya_A_M/task_2_25.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Напишите программу, которая будет выводить на экран наиболее понравившееся вам высказывание, автором которого является Гиппократ.
#Не забудьте о том, что автор должен быть упомянут на отдельной строке.
print("Душа человека развивается до самой смерти.\n\t\t\t\tГиппократ")
input("Нажмите ENTER для продолжения") | 78.25 | 131 | 0.814696 |
0ec92690a0231024ab0c2185a35fced2a062dee5 | 857 | py | Python | ebenezer/atencion/migrations/0014_interventiontype.py | davrv93/ebenezer-backend | d3db4dafd9a8c35bea9f32afe2be1dd451f64298 | [
"Apache-2.0"
] | null | null | null | ebenezer/atencion/migrations/0014_interventiontype.py | davrv93/ebenezer-backend | d3db4dafd9a8c35bea9f32afe2be1dd451f64298 | [
"Apache-2.0"
] | 3 | 2020-02-11T23:15:00.000Z | 2021-06-10T20:52:17.000Z | ebenezer/atencion/migrations/0014_interventiontype.py | davrv93/ebenezer-backend | d3db4dafd9a8c35bea9f32afe2be1dd451f64298 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.1.2 on 2018-10-05 17:47
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
dependencies = [
('atencion', '0013_level_code'),
]
operations = [
migrations.CreateModel(
name='InterventionType',
fields=... | 29.551724 | 112 | 0.556593 |
0ecab01cc6b7d67f7d290b7e3a106e2c056e4deb | 3,853 | py | Python | Packs/ZeroTrustAnalyticsPlatform/Integrations/ZeroTrustAnalyticsPlatform/test_data/api_data.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/ZeroTrustAnalyticsPlatform/Integrations/ZeroTrustAnalyticsPlatform/test_data/api_data.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/ZeroTrustAnalyticsPlatform/Integrations/ZeroTrustAnalyticsPlatform/test_data/api_data.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | def alert_data():
return [
{
"datetime_created": "2021-05-11T20:11:31Z",
"datetime_closed": None,
"datetime_firstevent": "2021-05-11T20:11:30Z",
"datetime_events_added": "2021-05-11T20:11:31Z",
"datetime_org_assigned": "2021-05-11T20:11:31Z",
... | 24.541401 | 87 | 0.408253 |
165aa7c9c3b25c072c00ffbe60ea86a35efc6870 | 7,554 | py | Python | bigbench/benchmark_tasks/abstraction_and_reasoning_corpus/task.py | lintangsutawika/BIG-bench | 230057960f8682b0051b2a1c4c3c6e0830f72769 | [
"Apache-2.0"
] | 460 | 2021-01-26T21:23:37.000Z | 2022-03-31T15:55:10.000Z | bigbench/benchmark_tasks/abstraction_and_reasoning_corpus/task.py | lintangsutawika/BIG-bench | 230057960f8682b0051b2a1c4c3c6e0830f72769 | [
"Apache-2.0"
] | 475 | 2021-01-27T01:29:01.000Z | 2022-03-30T20:23:56.000Z | bigbench/benchmark_tasks/abstraction_and_reasoning_corpus/task.py | lintangsutawika/BIG-bench | 230057960f8682b0051b2a1c4c3c6e0830f72769 | [
"Apache-2.0"
] | 305 | 2021-01-26T23:28:11.000Z | 2022-03-31T14:51:26.000Z | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, so... | 37.39604 | 93 | 0.584459 |
167099b96e5f196a5e56fb104d42c48a7a818219 | 1,221 | py | Python | pwn/linkedlist/solve.py | vidner/codepwnda-ctf | 7e086044b753fe555b44395b79827d2f5b89da1d | [
"Unlicense"
] | 6 | 2021-02-18T15:07:55.000Z | 2022-02-04T01:38:10.000Z | pwn/linkedlist/solve.py | vidner/codepwnda-ctf | 7e086044b753fe555b44395b79827d2f5b89da1d | [
"Unlicense"
] | null | null | null | pwn/linkedlist/solve.py | vidner/codepwnda-ctf | 7e086044b753fe555b44395b79827d2f5b89da1d | [
"Unlicense"
] | null | null | null | from pwn import *
BUFF_SIZE = 64
bss = 0x0804C048
elf = ELF('./chall')
p = process('./chall')
def create():
p.sendlineafter('> ', '1')
def read(idx):
p.sendlineafter('> ', '2')
p.sendlineafter('index: ', idx)
p.recvuntil('content: ')
return p.recvline()
def write(idx, payload):
p.sendlineafter('> ', '3')
p.... | 20.35 | 46 | 0.690418 |
bcfc2c95e035fc37073ba710e125b25b668dd44e | 1,940 | py | Python | Src/oracles.py | hazemalsaied/IdenSys | 9b6220ff7e65f7059240b742c81952132a765007 | [
"MIT"
] | 2 | 2017-09-28T13:54:57.000Z | 2018-06-28T05:03:06.000Z | Src/oracles.py | hazemalsaied/IdenSys | 9b6220ff7e65f7059240b742c81952132a765007 | [
"MIT"
] | null | null | null | Src/oracles.py | hazemalsaied/IdenSys | 9b6220ff7e65f7059240b742c81952132a765007 | [
"MIT"
] | null | null | null | import datetime
import logging
from sklearn.feature_extraction import DictVectorizer
from sklearn.multiclass import OutputCodeClassifier
from sklearn.svm import LinearSVC
from features import Extractor
from transitions import Shift
from transitions import Transition, Reduce, BlackMerge, MergeAsMWT
def train(corpus)... | 28.955224 | 108 | 0.712371 |
4c580921c86db659cbf1d0e08fab3cee506f9c00 | 1,027 | pyde | Python | sketches/franke2/franke2.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/franke2/franke2.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/franke2/franke2.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | add_library('handy')
from random import randint
magenta = color(247, 114, 205)
orange = color(252, 188, 117)
darkgrey = color(84, 72, 74)
def setup():
global h
size(400, 600)
this.surface.setTitle("2. Re-Mixing Herbert W. Franke")
h = HandyRenderer(this)
rectMode(CENTER)
h.setRoughness(0.6)... | 26.333333 | 59 | 0.57741 |
d5baa926e98c387e1207dd934692c400b990084f | 3,387 | py | Python | test/test_npu/test_network_ops/test_threshold_grad_v2_d.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_threshold_grad_v2_d.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_threshold_grad_v2_d.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... | 40.807229 | 88 | 0.651609 |
d5d78533ca65950bfe751272f98a2b9873bab3fd | 5,641 | py | Python | Packs/PANWComprehensiveInvestigation/Scripts/PanwIndicatorCreateQueries/PanwIndicatorCreateQueries.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/PANWComprehensiveInvestigation/Scripts/PanwIndicatorCreateQueries/PanwIndicatorCreateQueries.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/PANWComprehensiveInvestigation/Scripts/PanwIndicatorCreateQueries/PanwIndicatorCreateQueries.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | """
The script accepts indicators and creates relevant queries in Panw products
"""
from CommonServerPython import *
def generate_ip_queries(ips: list):
ips = [ip for ip in ips if is_ip_valid(ip)]
if not ips:
return {}
queries = {}
# Cortex traps IP
ip_fields = ["endPointHeader.agentIp='{... | 34.820988 | 102 | 0.622762 |
fc4094225da087301e833c5af062d1b130f8b08e | 2,308 | py | Python | Library/jose/utils.py | TrojanCrypto/Dashboard | 3af795980c7aa90505afae684297e43366cb6ee5 | [
"MIT"
] | null | null | null | Library/jose/utils.py | TrojanCrypto/Dashboard | 3af795980c7aa90505afae684297e43366cb6ee5 | [
"MIT"
] | null | null | null | Library/jose/utils.py | TrojanCrypto/Dashboard | 3af795980c7aa90505afae684297e43366cb6ee5 | [
"MIT"
] | null | null | null |
import base64
import hmac
def calculate_at_hash(access_token, hash_alg):
"""Helper method for calculating an access token
hash, as described in http://openid.net/specs/openid-connect-core-1_0.html#CodeIDToken
Its value is the base64url encoding of the left-most half of the hash of the octets
of the ... | 26.837209 | 90 | 0.661179 |
5dc506c51ba1932bb1f7ab1801110acd4d0046ec | 234 | py | Python | exercises/fr/solution_03_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/fr/solution_03_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/fr/solution_03_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
# Charge le modèle fr_core_news_sm
nlp = spacy.load("fr_core_news_sm")
# Affiche les noms des composants du pipeline
print(nlp.pipe_names)
# Affiche tous les tuples de (name, component) du pipeline
print(nlp.pipeline)
| 21.272727 | 58 | 0.782051 |
5de6fbbedffee3c92405f5eda3c8ebd06f181b04 | 3,539 | py | Python | socket_bot/cli.py | AndrVLDZ/Start_DAW | 1825038a832ecd32496e4930d9c829a192fda752 | [
"Apache-2.0"
] | null | null | null | socket_bot/cli.py | AndrVLDZ/Start_DAW | 1825038a832ecd32496e4930d9c829a192fda752 | [
"Apache-2.0"
] | 1 | 2020-07-31T16:37:23.000Z | 2020-07-31T16:37:23.000Z | socket_bot/cli.py | AndrVLDZ/Start_DAW | 1825038a832ecd32496e4930d9c829a192fda752 | [
"Apache-2.0"
] | null | null | null | from typing import *
from dataclasses import dataclass, astuple
from socket_bot.server import Server
from socket_bot.client import Client
from socket_bot.colors import CmdColors
from socket_bot.connection import SocketConnection
def print_logo(logo=''):
LOGO_DAFAULT = """\033[93m
/\ /\\
/ \... | 28.540323 | 114 | 0.539135 |
f8e845b88cd0762dae8a33ea114860a9ea9a4668 | 11,665 | py | Python | research/cv/PSPNet/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/PSPNet/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/PSPNet/eval.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.786713 | 119 | 0.619288 |
0726162c874a01a9fe902fe001386684ce642a30 | 5,553 | py | Python | 7-assets/past-student-repos/LambdaSchool-master/m7/71a1/hashtable/test_hashtable.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/LambdaSchool-master/m7/71a1/hashtable/test_hashtable.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/LambdaSchool-master/m7/71a1/hashtable/test_hashtable.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | import unittest
from hashtable import HashTable
class TestHashTable(unittest.TestCase):
def test_hash_table_insertion_and_retrieval(self):
ht = HashTable(8)
ht.put("key-0", "val-0")
ht.put("key-1", "val-1")
ht.put("key-2", "val-2")
ht.put("key-3", "val-3")
ht.put... | 34.924528 | 58 | 0.547092 |
075be67a1662cae37e908c90bed461fd02758d47 | 6,507 | py | Python | benchmarks/matbench_v0.1_Ax_SAASBO_CrabNet_v1.2.7/utils/matbench.py | sparks-baird/matbench | 4424609454286e32fff2bcc724379b2a316c5a76 | [
"MIT"
] | 15 | 2021-11-01T09:02:19.000Z | 2022-03-19T10:59:41.000Z | benchmarks/matbench_v0.1_Ax_SAASBO_CrabNet_v1.2.7/utils/matbench.py | sparks-baird/matbench | 4424609454286e32fff2bcc724379b2a316c5a76 | [
"MIT"
] | 62 | 2021-09-20T14:09:59.000Z | 2022-03-30T19:03:22.000Z | benchmarks/matbench_v0.1_Ax_SAASBO_CrabNet_v1.2.7/utils/matbench.py | sparks-baird/matbench | 4424609454286e32fff2bcc724379b2a316c5a76 | [
"MIT"
] | 3 | 2021-11-26T10:13:48.000Z | 2022-01-08T06:56:03.000Z | import gc
from os.path import join
from pathlib import Path
from time import time
import cloudpickle as pickle
import crabnet
import numpy as np
import pandas as pd
import torch
from ax import Data
from ax.core import Experiment, Objective, OptimizationConfig
from ax.modelbridge.registry import Models
from ax.runners.... | 32.212871 | 104 | 0.693407 |
ab547c7774b305a3be670e884acb24f314fe1bae | 590 | py | Python | src/SHD/gm_compose.py | mheob/SHD.GraphicsMagick | fbf84f1feb7e5ca76a3e99238653d8f15c6b504a | [
"MIT"
] | 1 | 2021-01-30T15:50:13.000Z | 2021-01-30T15:50:13.000Z | src/SHD/gm_compose.py | mheob/SHD.GraphicsMagick | fbf84f1feb7e5ca76a3e99238653d8f15c6b504a | [
"MIT"
] | null | null | null | src/SHD/gm_compose.py | mheob/SHD.GraphicsMagick | fbf84f1feb7e5ca76a3e99238653d8f15c6b504a | [
"MIT"
] | null | null | null | from os import listdir, mkdir, path
from pgmagick import Image, GravityType, CompositeOperator
test_dir = path.join(path.curdir, "testdata")
layer = Image(path.join(test_dir, "New_256x256.png"))
output_dir = path.join(test_dir, input("Bitte den Speicherort angeben (Ordner reicht): "))
if not path.isdir(output_dir):... | 32.777778 | 93 | 0.725424 |
db7707c843ef3dc90ce48020323a8f393cd318c9 | 1,696 | py | Python | Data-Structures/Linked_List/Doubly_Linked_List/Doubly_Linked_List.py | hussamEL-Hwary/DS-Algo-Handbook | 86a97d586a4ca8b17168c0a9f5a9f43f856eba58 | [
"MIT"
] | 18 | 2016-11-01T04:00:36.000Z | 2021-09-13T14:26:35.000Z | Data-Structures/Linked_List/Doubly_Linked_List/Doubly_Linked_List.py | JEERU/DS-Algo-Handbook | 86a97d586a4ca8b17168c0a9f5a9f43f856eba58 | [
"MIT"
] | 60 | 2016-10-11T14:50:47.000Z | 2016-10-31T11:05:01.000Z | Data-Structures/Linked_List/Doubly_Linked_List/Doubly_Linked_List.py | JEERU/DS-Algo-Handbook | 86a97d586a4ca8b17168c0a9f5a9f43f856eba58 | [
"MIT"
] | 87 | 2016-09-08T05:04:50.000Z | 2016-10-30T19:19:53.000Z | class Node(object):
def __init__(self, data, prev, next):
self.data = data
self.prev = prev
self.next = next
class DoubleList(object):
head = None
tail = None
def append(self, data):
new_node = Node(data, None, None)
if self.head is None:
sel... | 26.092308 | 104 | 0.565448 |
dbabddac4a64971dbb643947c40ce1319fddb122 | 1,675 | py | Python | NeuralNet/Oli/trainNN.py | alex-ta/Fontinator | 7ca9effe3b61ded032176557520127e1d4b7a5ef | [
"Apache-2.0"
] | 6 | 2017-04-12T14:05:19.000Z | 2021-01-29T11:23:50.000Z | NeuralNet/Oli/trainNN.py | alex-ta/Fontinator | 7ca9effe3b61ded032176557520127e1d4b7a5ef | [
"Apache-2.0"
] | null | null | null | NeuralNet/Oli/trainNN.py | alex-ta/Fontinator | 7ca9effe3b61ded032176557520127e1d4b7a5ef | [
"Apache-2.0"
] | null | null | null | from keras.layers import Dense, Activation, Dropout
from keras.models import Sequential
from keras.utils import plot_model
from NeuralNet.Oli.libs.ProcessingPipeline import ProcessingPipeline
from NeuralNet.Oli.libs.Preprocessor import *
# __________Configuration__________#
# Path to folder which contains subfolders ... | 40.853659 | 110 | 0.795224 |
916d3678ae8dfac15a82cd6f9cb059a1f5dbeaa9 | 1,802 | py | Python | MAIN/STM32F405_C/NORMAL/history/V30/SubController.py | ozturkahmetcevdet/VSenst | 07c068fefcbd66ae4d8ec0480b4da10d6b5c7410 | [
"MIT"
] | null | null | null | MAIN/STM32F405_C/NORMAL/history/V30/SubController.py | ozturkahmetcevdet/VSenst | 07c068fefcbd66ae4d8ec0480b4da10d6b5c7410 | [
"MIT"
] | null | null | null | MAIN/STM32F405_C/NORMAL/history/V30/SubController.py | ozturkahmetcevdet/VSenst | 07c068fefcbd66ae4d8ec0480b4da10d6b5c7410 | [
"MIT"
] | null | null | null | import gc
from micropython import const
from pyb import UART, Pin
import machine
import json
import time
SUB_COM_SPEED = const(2000000)
SUB_COM_PORT = const(3)
class SUBCommand:
class Page:
Entry = const(1)
Main = const(2)
Bye = const(3)
Alarm = const(4)
class ... | 23.710526 | 85 | 0.503885 |
91e14e9b5e5a3813ff6112e0bc27406708d4d859 | 825 | py | Python | scripts/fabsp/raccoon.py | swoiow/dsc | 5860e6bfaa70b700e025533c406a6bc52d4ab74b | [
"MIT"
] | null | null | null | scripts/fabsp/raccoon.py | swoiow/dsc | 5860e6bfaa70b700e025533c406a6bc52d4ab74b | [
"MIT"
] | null | null | null | scripts/fabsp/raccoon.py | swoiow/dsc | 5860e6bfaa70b700e025533c406a6bc52d4ab74b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
debug: racoon -d -F -v -f /etc/racoon/racoon.conf
"""
from fabric.api import sudo
def install():
"""
yum install y https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/i/ipsec-tools-0.8.2-5.el7.x86_64.rpm
"""
for line in setup.__doc__.split("\n"):
... | 24.264706 | 110 | 0.630303 |
535a0a1df07c2aaafbcfab7d6f54119e41c9b1d2 | 5,084 | py | Python | dialogs/symptoms_selection_dialog.py | Maxwingber/corobot | a959e0deba734d3900d7b8a826b3fb56964db4c6 | [
"MIT"
] | null | null | null | dialogs/symptoms_selection_dialog.py | Maxwingber/corobot | a959e0deba734d3900d7b8a826b3fb56964db4c6 | [
"MIT"
] | null | null | null | dialogs/symptoms_selection_dialog.py | Maxwingber/corobot | a959e0deba734d3900d7b8a826b3fb56964db4c6 | [
"MIT"
] | 2 | 2020-03-22T11:38:54.000Z | 2020-03-24T11:11:56.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from typing import List
from botbuilder.dialogs import (
WaterfallDialog,
WaterfallStepContext,
DialogTurnResult,
ComponentDialog,
FindChoicesOptions, DateTimePrompt)
from botbuilder.dialogs.prompts impor... | 40.349206 | 155 | 0.652439 |
72ce2f8912d4cf115fbf4a6ce5487863aed21660 | 1,390 | py | Python | decorator.py | Themishau/Algorithmen | f31627f823eb86f8673e72c4998c9029e74097fb | [
"MIT"
] | null | null | null | decorator.py | Themishau/Algorithmen | f31627f823eb86f8673e72c4998c9029e74097fb | [
"MIT"
] | null | null | null | decorator.py | Themishau/Algorithmen | f31627f823eb86f8673e72c4998c9029e74097fb | [
"MIT"
] | null | null | null | ### decorator ###
def function(func):
def wrapper(*args, **kwargs):
print('dec wrapper start')
value = func(*args, **kwargs)
print('dec wrapper end')
return value
return wrapper
@function
def print_function(a, b="print_function"):
print(a)
print(b)
# with return value
@... | 24.385965 | 81 | 0.654676 |
72fca78e44c9ea641284c22c51c74b6f388f6190 | 1,396 | py | Python | official/cv/nima/src/callback.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/nima/src/callback.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/nima/src/callback.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... | 43.625 | 78 | 0.681948 |
22b63ddb260d413d8a786f9a2eacd07ffa3f16ea | 113,368 | py | Python | Packs/GoogleChronicleBackstory/Integrations/GoogleChronicleBackstory/GoogleChronicleBackstory.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | null | null | null | Packs/GoogleChronicleBackstory/Integrations/GoogleChronicleBackstory/GoogleChronicleBackstory.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 60 | 2022-02-24T14:54:47.000Z | 2022-03-31T10:38:41.000Z | Packs/GoogleChronicleBackstory/Integrations/GoogleChronicleBackstory/GoogleChronicleBackstory.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | null | null | null | from CommonServerPython import *
''' IMPORTS '''
from collections import defaultdict
from typing import Any, Dict, Tuple, List
import httplib2
import urllib.parse
from oauth2client import service_account
from copy import deepcopy
import dateparser
from hashlib import sha256
# A request will be tried 3 times if it fai... | 40.459672 | 125 | 0.661686 |
22e9b176728e47f9201602e95b42c170bff20b2a | 1,215 | py | Python | chapter100/elasticsearch_04.py | thiagola92/learning-databases-with-python | cf23c34d7fd1ecd36dd3e7b30dc5916eb23eaf1e | [
"MIT"
] | null | null | null | chapter100/elasticsearch_04.py | thiagola92/learning-databases-with-python | cf23c34d7fd1ecd36dd3e7b30dc5916eb23eaf1e | [
"MIT"
] | null | null | null | chapter100/elasticsearch_04.py | thiagola92/learning-databases-with-python | cf23c34d7fd1ecd36dd3e7b30dc5916eb23eaf1e | [
"MIT"
] | null | null | null | from datetime import datetime
from threading import Thread, Lock
from elasticsearch import helpers, Elasticsearch
start = datetime.now()
client = Elasticsearch("http://username:password@127.0.0.1:9200", timeout=60)
client.indices.create("index_name")
threads_count = 0
lock = Lock()
package = []
_id = 0
def send(p... | 20.948276 | 77 | 0.6 |
4a2f5339fdecd15d358cbd4cf711f99de507e865 | 11,557 | py | Python | research/cv/tsn/src/transforms.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/tsn/src/transforms.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/tsn/src/transforms.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.56 | 116 | 0.583456 |
4a3016727ff3fbec16d61f8eac64f7226206dd31 | 155 | py | Python | 7-assets/past-student-repos/data_struct_and_algo-master/fib_series.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 4 | 2021-08-31T00:56:40.000Z | 2021-11-29T03:08:55.000Z | 7-assets/past-student-repos/data_struct_and_algo-master/fib_series.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 3 | 2022-02-14T18:48:11.000Z | 2022-03-30T05:26:26.000Z | 7-assets/past-student-repos/data_struct_and_algo-master/fib_series.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 1 | 2021-08-31T00:54:51.000Z | 2021-08-31T00:54:51.000Z | def fib_series(count):
a=0
b=1
c=1
for i in range(count):
a=b
b=c
c=a+b
print(a)
fib_series(10)
| 11.071429 | 26 | 0.419355 |
43d8fa8343298329c7a2fb92a14809faca5da60a | 1,106 | py | Python | matcher.py | vlpolyansky/spotArt | b1a6df25b62cd61d9056d710f4a2cb9185f45f3c | [
"MIT"
] | null | null | null | matcher.py | vlpolyansky/spotArt | b1a6df25b62cd61d9056d710f4a2cb9185f45f3c | [
"MIT"
] | null | null | null | matcher.py | vlpolyansky/spotArt | b1a6df25b62cd61d9056d710f4a2cb9185f45f3c | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import os
from matplotlib import pyplot as plt
sift = cv2.xfeatures2d.SIFT_create()
def match(img1, img2):
kp1, des1 = sift.detectAndCompute(img1, None)
kp2, des2 = sift.detectAndCompute(img2, None)
return match(img1, img2, kp1, des1, kp2, des2)
def match(img1, img2, kp1, ... | 25.72093 | 72 | 0.654611 |
6055cfd6ca9c4309c100fa4f3fc5ff87f9130d69 | 3,944 | py | Python | python/oneflow/test/tensor/test_consistent_tensor.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | python/oneflow/test/tensor/test_consistent_tensor.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | python/oneflow/test/tensor/test_consistent_tensor.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 32.595041 | 80 | 0.652383 |
e0c74ee505086e1593182c0c613180cdc91a96e7 | 429 | py | Python | LeetCode_problems/Monotonic Array/solution_1.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 165 | 2020-10-03T08:01:11.000Z | 2022-03-31T02:42:08.000Z | LeetCode_problems/Monotonic Array/solution_1.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 383 | 2020-10-03T07:39:11.000Z | 2021-11-20T07:06:35.000Z | LeetCode_problems/Monotonic Array/solution_1.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 380 | 2020-10-03T08:05:04.000Z | 2022-03-19T06:56:59.000Z | class Solution:
def isMonotonic(self, A: List[int]) -> bool:
#an array is monotonic if it is either increasing or decreasing, so we check if the array is equal to
#its sorted version in either descending order or ascending order. If yes return True
#else return False.
if A==sorted(A... | 42.9 | 110 | 0.629371 |
98d529081067915344adcb5bd259d5c8fd929ee3 | 3,105 | py | Python | awsrun/aws/aws_ssm.py | eec289q-f21/stdsw | 93604a1b947e39496e6559982eea6d41c77d0204 | [
"MIT"
] | null | null | null | awsrun/aws/aws_ssm.py | eec289q-f21/stdsw | 93604a1b947e39496e6559982eea6d41c77d0204 | [
"MIT"
] | null | null | null | awsrun/aws/aws_ssm.py | eec289q-f21/stdsw | 93604a1b947e39496e6559982eea6d41c77d0204 | [
"MIT"
] | 1 | 2021-10-07T23:10:33.000Z | 2021-10-07T23:10:33.000Z | import logging
from boto3_type_annotations.ssm import Client
from botocore.exceptions import ClientError
from aws import AWSBackend
class SSMHandler:
def __init__(self, timeout=60,region='us-west-1'):
self._ssm_client: Client = AWSBackend().get_client('ssm',region=region)
self._timeout = timeout
... | 34.88764 | 117 | 0.595813 |
4066c87bacf96123322d6d04565c0905a7a9ad43 | 194 | py | Python | Backend/services/token_service.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 15 | 2020-04-24T20:18:11.000Z | 2022-01-31T21:05:05.000Z | Backend/services/token_service.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 2 | 2021-05-19T07:15:09.000Z | 2022-03-07T08:29:34.000Z | Backend/services/token_service.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 4 | 2020-04-27T16:20:13.000Z | 2021-02-23T10:39:42.000Z | import random
import string
def get_token(length):
letters_and_digits = string.ascii_letters + string.digits
return ''.join((random.choice(letters_and_digits) for i in range(length)))
| 24.25 | 78 | 0.762887 |
90e7cdf8eec212d31b3b15fbe0efd11097b86a1d | 450 | py | Python | setup.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 88 | 2019-01-08T16:39:08.000Z | 2022-02-06T14:19:23.000Z | setup.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 13 | 2019-06-20T15:53:10.000Z | 2021-02-09T11:03:29.000Z | setup.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 1 | 2019-11-05T03:03:14.000Z | 2019-11-05T03:03:14.000Z | from setuptools import setup, find_packages
from runpy import run_path as run_path
from pathlib import Path
here = Path(__file__).parent.absolute()
d = run_path(str(here / "transonic/_version.py"))
__version__ = d["__version__"]
__about__ = d["__about__"]
print(__about__)
setup(
version=__version__,
package... | 25 | 72 | 0.735556 |
2986ff506b442a61e339b4272ebeb3cbe3dce3fd | 1,259 | py | Python | ___Python/Thomas/pycurs_180625/p05_random/m01_wuerfeln.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Thomas/pycurs_180625/p05_random/m01_wuerfeln.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Thomas/pycurs_180625/p05_random/m01_wuerfeln.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | import random
r = random.Random()
def wuerfeln():
return r.randint(1, 6) # Augenzahl zwischen 1 und 6
def muenzwurf():
return r.randint(0, 1)
def wuerfeln_lz():
return r.randint(1, 49)
d = {}
for i in range(10000):
augenzahl = wuerfeln()
if augenzahl in d:
d[augenzahl] ... | 18.791045 | 101 | 0.567117 |
d3d01faece2129f9ec231ea697df65b98159383c | 4,034 | py | Python | src/onegov/pay/models/payment_provider.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/pay/models/payment_provider.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/pay/models/payment_provider.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.orm import Base
from onegov.core.orm.mixins import ContentMixin
from onegov.core.orm.mixins import TimestampMixin
from onegov.core.orm.types import UUID
from onegov.pay.models.payment import Payment
from sqlalchemy import Boolean
from sqlalchemy import Column
from sqlalchemy import column
from sqlalche... | 28.814286 | 77 | 0.654437 |
5eef8af73d203f9f3136a1271d4db7e58f0f35b0 | 636 | py | Python | tests/flasktests.py | MarkusWET/secure_password_website | 257d0e7d463dea4777d5d92f7f56499f2a4b5044 | [
"MIT"
] | null | null | null | tests/flasktests.py | MarkusWET/secure_password_website | 257d0e7d463dea4777d5d92f7f56499f2a4b5044 | [
"MIT"
] | null | null | null | tests/flasktests.py | MarkusWET/secure_password_website | 257d0e7d463dea4777d5d92f7f56499f2a4b5044 | [
"MIT"
] | null | null | null | import urllib.request
import urllib.error
from flask import Flask
from flask_testing import LiveServerTestCase
# Testing with LiveServer
class MyTest(LiveServerTestCase):
def create_app(self):
app = Flask(__name__)
app.config['TESTING'] = True
return app
def test_app_start(self):
... | 28.909091 | 68 | 0.658805 |
6f029fc0a7166854e0c4ab889f4d799d9e1c92cd | 3,563 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/ftd/test_ftd_file_upload.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/ftd/test_ftd_file_upload.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/ftd/test_ftd_file_upload.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
import pytest
from ansible.module_utils import basic
from ansible_collections.community.general.tests.unit.modules.utils import set_module_args, exit_json, fail_json, AnsibleFailJson, AnsibleExitJson
from ansible_collections.community.general.plugins.modules.network.ftd import f... | 43.987654 | 146 | 0.711479 |
d2dd800ae51242732c041c815ba15cf201c6467d | 7,303 | py | Python | multimedia/photomosaic/photomosaic-cli.py | gbesancon/projects | 7a9da629dddcf21fbe5c043d86b00036f80cbe14 | [
"MIT"
] | null | null | null | multimedia/photomosaic/photomosaic-cli.py | gbesancon/projects | 7a9da629dddcf21fbe5c043d86b00036f80cbe14 | [
"MIT"
] | 1 | 2022-03-02T10:43:58.000Z | 2022-03-02T10:43:58.000Z | multimedia/photomosaic/photomosaic-cli.py | gbesancon/projects | 7a9da629dddcf21fbe5c043d86b00036f80cbe14 | [
"MIT"
] | null | null | null | import argparse
import matplotlib.pyplot
import numpy as np
import os
import photomosaic
import skimage.io
import sys
import tempfile
from tqdm import tqdm
import warnings
PNG_EXTENSION = '.png'
class PhotoMosaicCLI:
"""
https://github.com/danielballan/photomosaic
http://danielballan.github.io/photomosaic... | 43.730539 | 162 | 0.668492 |
8150449711902e91f7b3a288df127a4cf6eef810 | 402 | py | Python | Online-Judges/DimikOJ/Python/18-vowels-consonants.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | 3 | 2021-06-15T01:19:23.000Z | 2022-03-16T18:23:53.000Z | Online-Judges/DimikOJ/Python/18-vowels-consonants.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | Online-Judges/DimikOJ/Python/18-vowels-consonants.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | for _ in range(int(input())):
full_sentence = input()
#full_sentence = full_sentence.lower()
all_vowels = "aeiouAEIOU"
all_con = "bcdfghjklmnpqrstvwxyzBCDFGHIJKLMNPQRSTVWXYZ"
vowels = ""
consonants = ""
for i in full_sentence:
if i in all_vowels:
vowels += i
elif ... | 28.714286 | 59 | 0.609453 |
815f7fe90d4c2603563f8633376db8909463bdb8 | 3,804 | py | Python | src/aijack/defense/ckks/encoder.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 24 | 2021-11-17T02:16:47.000Z | 2022-03-27T01:04:08.000Z | src/aijack/defense/ckks/encoder.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 9 | 2021-12-03T06:09:27.000Z | 2022-03-29T06:33:53.000Z | src/aijack/defense/ckks/encoder.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 5 | 2022-01-12T09:58:04.000Z | 2022-03-17T09:29:04.000Z | import numpy as np
from numpy.polynomial import Polynomial
from .plaintext import CKKSPlaintext
from .utils import coordinate_wise_random_rounding
class CKKSEncoder:
"""Basic CKKS encoder to encode complex vectors into polynomials.
This class is mainly based on https://blog.openmined.org/ckks-explained-part-... | 31.438017 | 112 | 0.587539 |
6fae15dd33a83792939b9cca9a76fc8aee02ca98 | 7,857 | py | Python | oneflow/python/framework/check_point.py | wanghongsheng01/framework_enflame | debf613e05e3f5ea8084c3e79b60d0dd9e349526 | [
"Apache-2.0"
] | 2 | 2021-09-10T00:19:49.000Z | 2021-11-16T11:27:20.000Z | oneflow/python/framework/check_point.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | 1 | 2021-06-16T08:37:50.000Z | 2021-06-16T08:37:50.000Z | oneflow/python/framework/check_point.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | 1 | 2021-11-10T07:57:01.000Z | 2021-11-10T07:57:01.000Z | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 32.20082 | 126 | 0.681049 |
6fb965f5488b5116867c7eabebeb01b1f5161659 | 33,287 | py | Python | Packs/Digital_Defense_FrontlineVM/Integrations/Digital_Defense_FrontlineVM/Digital_Defense_FrontlineVM.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Digital_Defense_FrontlineVM/Integrations/Digital_Defense_FrontlineVM/Digital_Defense_FrontlineVM.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Digital_Defense_FrontlineVM/Integrations/Digital_Defense_FrontlineVM/Digital_Defense_FrontlineVM.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import *
import json
import math
import re
import requests
import signal
import socket
import struct
from datetime import datetime, timedelta, timezone
from typing import List, Dict, Any
# disable insecure warnings
requests.packages.urllib3.disable_warnings()
# Pa... | 41.04439 | 130 | 0.653919 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.