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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
04f1ea1085d2ca6364263842fb3b88a6b8b52d21 | 510 | py | Python | src/test/tests/unit/default_methods.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/unit/default_methods.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/unit/default_methods.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: default_methods.py
#
# Tests: Tests default method interface of the visit module
#
# Cyrus Harrison, Mon Jul 20 11:32:42 PDT 2020
# -----------------------------------------------------------------... | 23.181818 | 78 | 0.490196 |
8e09f9ae0cc053787cef16a25465a97d8efa83f2 | 1,794 | py | Python | DataProcess/utils/myunwrap.py | zhangupkai/RFID_Script | 9e05fad86e71dc6bd5dd12650d369f13d5a835c8 | [
"MIT"
] | null | null | null | DataProcess/utils/myunwrap.py | zhangupkai/RFID_Script | 9e05fad86e71dc6bd5dd12650d369f13d5a835c8 | [
"MIT"
] | null | null | null | DataProcess/utils/myunwrap.py | zhangupkai/RFID_Script | 9e05fad86e71dc6bd5dd12650d369f13d5a835c8 | [
"MIT"
] | null | null | null | # UNWRAP(P)通过将大于pi的绝对跳跃改变为2 * pi补码来展开弧度相位P.
import math
import copy
def unwrap(raw_vector, cutoff=math.pi):
if raw_vector is None or len(raw_vector) <= 0:
print("warring: The vector is empty!")
return None
vector = list(copy.deepcopy(raw_vector))
# 初始化变量
m = len(vector)
dp = []
... | 28.935484 | 59 | 0.528428 |
edea2e43ee7fb065467b7b63898bc0fba8c3071f | 946 | py | Python | Backend/model.py | ganges10/FinAdBackend | a54f0a3e091971e950655b5f581c5934824bcaf4 | [
"MIT"
] | null | null | null | Backend/model.py | ganges10/FinAdBackend | a54f0a3e091971e950655b5f581c5934824bcaf4 | [
"MIT"
] | null | null | null | Backend/model.py | ganges10/FinAdBackend | a54f0a3e091971e950655b5f581c5934824bcaf4 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from datetime import datetime
from sklearn.ensemble import ExtraTreesRegressor
from sklearn.neighbors import KNeighborsRegressor
from sklearn.ensemble import StackingRegressor
from sklearn.preprocessing import StandardScaler
from sklearn.pipeline import make_pipeline
from sklearn.... | 31.533333 | 112 | 0.77907 |
612cef753fc3258dfadc68f8b614b2d7ede80286 | 2,366 | py | Python | test/test_npu/test_im2col_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_im2col_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_im2col_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... | 43.814815 | 88 | 0.650042 |
b62e52553787a2257693c5399a1368fe43b88e7d | 2,493 | py | Python | ImageHandler.py | siej88/FuzzyACO | 989a58049c8417cd023cfc312fb99d2649333ca7 | [
"MIT"
] | null | null | null | ImageHandler.py | siej88/FuzzyACO | 989a58049c8417cd023cfc312fb99d2649333ca7 | [
"MIT"
] | null | null | null | ImageHandler.py | siej88/FuzzyACO | 989a58049c8417cd023cfc312fb99d2649333ca7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
UNIVERSIDAD DE CONCEPCION
Departamento de Ingenieria Informatica y
Ciencias de la Computacion
Memoria de Titulo Ingenieria Civil Informatica
DETECCION DE BORDES EN IMAGENES DGGE USANDO UN
SISTEMA HIBRIDO ACO CON LOGICA DIFUSA
Autor: Sebastian Ignacio Espinoza Jimenez
Patrocinant... | 37.772727 | 85 | 0.610911 |
b6853621259cc63f6a27401fa0edf73a5e044c3d | 2,157 | py | Python | flask_anticsrf.py | skylerberg/Flask-AntiCsrf | 4cf4e7c0085bcc4b2cf64821f64d2eac9fc2081a | [
"Apache-2.0"
] | null | null | null | flask_anticsrf.py | skylerberg/Flask-AntiCsrf | 4cf4e7c0085bcc4b2cf64821f64d2eac9fc2081a | [
"Apache-2.0"
] | null | null | null | flask_anticsrf.py | skylerberg/Flask-AntiCsrf | 4cf4e7c0085bcc4b2cf64821f64d2eac9fc2081a | [
"Apache-2.0"
] | null | null | null | from urllib.parse import urlparse
from flask import request, abort
__version_info__ = ('0', '0', '2')
__version__ = '.'.join(__version_info__)
__author__ = 'Skyler Berg'
__license__ = 'APACHE 2.0'
__copyright__ = '(c) 2018 by Skyler Berg'
__all__ = ['AntiCsrf']
SAFE_METHODS = set(['GET', 'HEAD', 'OPTIONS', 'TRACE']... | 30.814286 | 96 | 0.647659 |
94c1c4aa70a09a9471acf2dcc4cd8eeb2ae472c8 | 700 | py | Python | Lab3/Task[4-6].py | ValeriyMartsyshyn/HelloPython | badcf85bc54e889eed0286b420e5cabe68da8572 | [
"MIT"
] | null | null | null | Lab3/Task[4-6].py | ValeriyMartsyshyn/HelloPython | badcf85bc54e889eed0286b420e5cabe68da8572 | [
"MIT"
] | null | null | null | Lab3/Task[4-6].py | ValeriyMartsyshyn/HelloPython | badcf85bc54e889eed0286b420e5cabe68da8572 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
""" Task 4
Calculate N! (factorial)"""
n = int(input("Enter any natural number: "))
f = n*(n-1)
i = 2
while i<n:
f = f*(n-i)
i+=1
print(f)
""" Task 5
Check if the number is prime"""
n = int(input("Enter an integer > 1: "))
for i in range(2, n):
if n % i... | 13.461538 | 55 | 0.552857 |
bf9b304bf7e12b909d27bcb0bc161d42fee065c5 | 226 | py | Python | python/celery/implement/ecommerce_worker.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/celery/implement/ecommerce_worker.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/celery/implement/ecommerce_worker.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | # ecommerce_worker.py
from ecommerce_tasks import EmailTask
from backie.worker import Worker
if __name__ == '__main__':
email_task = EmailTask()
# run workers
worker = Worker(task=email_task)
worker.start()
| 18.833333 | 37 | 0.725664 |
bfb163fce07cac5c4adad8ea99b14e4d479822ea | 28 | py | Python | backups/hydrogen/python-playground/plotplaygr.py | roskenet/Playground | 3cce70eeb38646b0f2ffbd071c3aaec7b8f5b9cb | [
"MIT"
] | null | null | null | backups/hydrogen/python-playground/plotplaygr.py | roskenet/Playground | 3cce70eeb38646b0f2ffbd071c3aaec7b8f5b9cb | [
"MIT"
] | null | null | null | backups/hydrogen/python-playground/plotplaygr.py | roskenet/Playground | 3cce70eeb38646b0f2ffbd071c3aaec7b8f5b9cb | [
"MIT"
] | 1 | 2020-10-02T04:57:25.000Z | 2020-10-02T04:57:25.000Z | s = f"Hallo Welt"
print(s)
| 7 | 17 | 0.607143 |
782416c6d6e11cc386a68b337464cc8a0c3404d4 | 1,381 | py | Python | config.py | covid-19-impact-lab/presentations | 2c9ccb6975b27b7987b2ddc6379996d57bee320d | [
"MIT"
] | null | null | null | config.py | covid-19-impact-lab/presentations | 2c9ccb6975b27b7987b2ddc6379996d57bee320d | [
"MIT"
] | 16 | 2020-07-20T05:37:36.000Z | 2021-01-27T07:36:16.000Z | config.py | covid-19-impact-lab/presentations | 2c9ccb6975b27b7987b2ddc6379996d57bee320d | [
"MIT"
] | null | null | null | from pathlib import Path
import pypandoc
SRC = Path(__file__).parent
OUT = SRC.joinpath("out")
TMP = SRC.joinpath("_tmp")
def plain_pandoc(depends_on, produces):
if produces.suffix == ".html":
pypandoc.convert(
str(depends_on),
"html",
outputfile=str(produces),
... | 24.660714 | 57 | 0.479363 |
01bb3f0509aa842b2729fadffb4b225b0172ebdb | 3,344 | py | Python | CI-Python/qa327_test/backend/test_backend.py | michael-fourie/Mags_Co | b9c8ae1730fabde3da95ed0f271ff061505a06c2 | [
"MIT"
] | 3 | 2020-11-06T21:54:57.000Z | 2020-12-10T22:06:24.000Z | CI-Python/qa327_test/backend/test_backend.py | michael-fourie/Mags_Co | b9c8ae1730fabde3da95ed0f271ff061505a06c2 | [
"MIT"
] | 3 | 2020-11-30T01:04:41.000Z | 2020-12-13T19:29:45.000Z | CI-Python/qa327_test/backend/test_backend.py | michael-fourie/Mags_Co | b9c8ae1730fabde3da95ed0f271ff061505a06c2 | [
"MIT"
] | 3 | 2020-11-23T19:25:41.000Z | 2022-02-04T15:18:19.000Z | import pytest
from seleniumbase import BaseCase
from qa327.models import db, User, Ticket
from qa327_test.conftest import base_url
from qa327.backend import login_user
from unittest.mock import patch
from werkzeug.security import generate_password_hash, check_password_hash
test_user = User(
email='test_frontend@t... | 41.8 | 114 | 0.667464 |
17810eaf47d129861528e836f2ecc13b415f3e80 | 435 | py | Python | my-cs/projects/kormen/selection_sort.py | zaqwes8811/cs-courses | aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2 | [
"Apache-2.0"
] | null | null | null | my-cs/projects/kormen/selection_sort.py | zaqwes8811/cs-courses | aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2 | [
"Apache-2.0"
] | null | null | null | my-cs/projects/kormen/selection_sort.py | zaqwes8811/cs-courses | aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
A = [6, 5, 4, 3, 2, 1]
n = len(A)
print A
for j in range(0, n - 1):
k = j
minElement = A[j]
# Ищем минимальный и его позицию
for i in range(j + 1, n):
print j, range(j + 1, n)
if minElement > A[i]:
minElement = A[i]
k = i
# Route
wh... | 21.75 | 36 | 0.464368 |
bdfd969df7c63fdd88e828ccc1474a5f96f0f47b | 528 | py | Python | frappe-bench/apps/erpnext/erpnext/accounts/doctype/pos_settings/pos_settings.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/doctype/pos_settings/pos_settings.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/doctype/pos_settings/pos_settings.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class POSSettings(Document):
def validate(self):
self.set_link_for_pos()
... | 33 | 68 | 0.744318 |
977e200a26c4b6519b779e01ffd654d4680451dd | 1,115 | py | Python | VULNSCANNING-master/testvuln.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | VULNSCANNING-master/testvuln.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | VULNSCANNING-master/testvuln.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #Hi Ster?
#ULER GUA MASIH PITIK MASA MAU RECODE :V
#WEBSITE BANYAK BELAJAR ULER
#gteam@programmer.net
from urllib2 import Request, urlopen, URLError, HTTPError
def Space(j):
i = 0
while i<=j:
print " ",
i+=1
def Search():
f = open("vuln.txt","r");
link = ... | 30.972222 | 65 | 0.443946 |
c17aab9d6b97ef3127d9a4cb4d6b4a2004be7832 | 9,291 | py | Python | Python/Sonstige_Uebungen/Deep Learning/recognizeShapesOwnData/analyzeRuns.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Sonstige_Uebungen/Deep Learning/recognizeShapesOwnData/analyzeRuns.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Sonstige_Uebungen/Deep Learning/recognizeShapesOwnData/analyzeRuns.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | import os
# _______ _______ ___________________________ _ _______ _______
# ( ____ \( ____ \\__ __/\__ __/\__ __/( ( /|( ____ \( ____ \
# | ( \/| ( \/ ) ( ) ( ) ( | \ ( || ( \/| ( \/
# | (_____ | (__ | | | | | | | \ | || | | (_____
# (_____ ... | 58.803797 | 599 | 0.531913 |
e792a25bcce753555f21a7253b349da098a6751e | 1,281 | py | Python | scripts/component_graph/server/graph/component_graph.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | 3 | 2020-08-02T04:46:18.000Z | 2020-08-07T10:10:53.000Z | scripts/component_graph/server/graph/component_graph.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | scripts/component_graph/server/graph/component_graph.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | 1 | 2020-08-07T10:11:49.000Z | 2020-08-07T10:11:49.000Z | #!/usr/bin/env python3
# Copyright 2019 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.
"""ComponentGraph is a graph that holds component relationships.
Typical example usage:
graph = ComponentGraph()
graph.add_node(nod... | 29.790698 | 74 | 0.632319 |
413fa259d42b3db0172efd9f4b16d49479198aa8 | 6,152 | py | Python | python_code_file/LSTM.py | Karllzy/DaJiDuPin | 12fc752caa23f510fbc895d0be2f702b5afde0ea | [
"MIT"
] | null | null | null | python_code_file/LSTM.py | Karllzy/DaJiDuPin | 12fc752caa23f510fbc895d0be2f702b5afde0ea | [
"MIT"
] | null | null | null | python_code_file/LSTM.py | Karllzy/DaJiDuPin | 12fc752caa23f510fbc895d0be2f702b5afde0ea | [
"MIT"
] | null | null | null | from xlrd import open_workbook
from numpy import array, concatenate, sqrt, arange
from pandas import DataFrame, concat
from sklearn.preprocessing import MinMaxScaler
from sklearn.metrics import mean_squared_error
from keras import Sequential
from keras.layers import LSTM, Dense, Dropout, Activation, Input
from keras.op... | 34.368715 | 122 | 0.653121 |
41bef7e5044d8b5cb8ea333b30387dee69abb423 | 284 | py | Python | loss.py | gluttony2016/RNN | 8991f020abdb5b28d9f73062dbfcd88d30d760a8 | [
"MIT"
] | null | null | null | loss.py | gluttony2016/RNN | 8991f020abdb5b28d9f73062dbfcd88d30d760a8 | [
"MIT"
] | null | null | null | loss.py | gluttony2016/RNN | 8991f020abdb5b28d9f73062dbfcd88d30d760a8 | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
def cross_entropy_sequence_loss(logits, labels):
cross_entropy = tf.losses.sparse_softmax_cross_entropy(logits=logits, labels=labels, reduction=tf.losses.Reduction.NONE)
loss = tf.reduce_mean(cross_entropy, axis=1)
return loss
| 31.555556 | 124 | 0.792254 |
41c4e227dcd31a7851e67177337efdc61e7d7644 | 1,180 | py | Python | Project Euler Questions 31 - 40/Project Euler Question 38.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | 1 | 2020-02-11T02:03:02.000Z | 2020-02-11T02:03:02.000Z | Project Euler Questions 31 - 40/Project Euler Question 38.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | null | null | null | Project Euler Questions 31 - 40/Project Euler Question 38.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | null | null | null | #Project Euler Question 38
#Pandigital multiples
def num_check(x):
if "0" in str(x):
return False
for digit in range(1, 10):
if str(x).count(str(digit)) > 1:
return False
else:
return True
def uniqued(x):
if "0" in str(check):
return False
for digit in r... | 22.692308 | 55 | 0.527119 |
68d8f277526f8c85298609b971512a0ed7dffb6f | 717 | py | Python | 数据结构/NowCode/Merge.py | Blankwhiter/LearningNotes | 83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0 | [
"MIT"
] | null | null | null | 数据结构/NowCode/Merge.py | Blankwhiter/LearningNotes | 83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0 | [
"MIT"
] | 3 | 2020-08-14T07:50:27.000Z | 2020-08-14T08:51:06.000Z | 数据结构/NowCode/Merge.py | Blankwhiter/LearningNotes | 83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0 | [
"MIT"
] | 2 | 2021-03-14T05:58:45.000Z | 2021-08-29T17:25:52.000Z | class Solution(object):
def getIndex(self, line):
lineLen = len(line)
left = 0
right = lineLen - 1
while left <= right:
mid = (left + right) // 2
if line[mid] < 0 and ((mid != 0 and line[mid -1] >= 0) or (mid == 0)):
return lineLen - mid
... | 26.555556 | 87 | 0.461646 |
2e632554a1e78593c55e2e0146f788ce26c87eb6 | 4,230 | py | Python | python_code_file/false_lstm.py | Karllzy/DaJiDuPin | 12fc752caa23f510fbc895d0be2f702b5afde0ea | [
"MIT"
] | null | null | null | python_code_file/false_lstm.py | Karllzy/DaJiDuPin | 12fc752caa23f510fbc895d0be2f702b5afde0ea | [
"MIT"
] | null | null | null | python_code_file/false_lstm.py | Karllzy/DaJiDuPin | 12fc752caa23f510fbc895d0be2f702b5afde0ea | [
"MIT"
] | null | null | null | from xlrd import open_workbook
from numpy import array, concatenate, sqrt, arange, random
from pandas import DataFrame, concat
from sklearn.preprocessing import MinMaxScaler
from sklearn.metrics import mean_squared_error
from keras import Sequential, Model
from keras.layers import LSTM, Dense, Dropout, Activation, Inpu... | 30.875912 | 112 | 0.620095 |
99672c924f90a1767807ff38f7f64ed558cec7be | 113 | py | Python | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/84caminhos_modulos_e_pacotes/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/84caminhos_modulos_e_pacotes/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/84caminhos_modulos_e_pacotes/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | from pacote_1.modulo1 import variavel1
from pacote_2.modulo2 import variavel2
print(variavel1)
print(variavel2)
| 18.833333 | 38 | 0.849558 |
5162da50f8b13eb67ceeca89dace5b3afd9127c2 | 1,832 | py | Python | settings.py | jkopka/Essensplan | a7abb2f1c4892f89aa19b002dd334cdd619fb43a | [
"MIT"
] | null | null | null | settings.py | jkopka/Essensplan | a7abb2f1c4892f89aa19b002dd334cdd619fb43a | [
"MIT"
] | null | null | null | settings.py | jkopka/Essensplan | a7abb2f1c4892f89aa19b002dd334cdd619fb43a | [
"MIT"
] | null | null | null | import os
# *****************************
# Environment specific settings
# *****************************
APP_NAME = 'Essensplan'
# DO NOT use "DEBUG = True" in production environments
DEBUG = True
# DO NOT use Unsecure Secrets in production environments
# Generate a safe one with:
# python -c "import os; print... | 31.586207 | 93 | 0.743996 |
517e807f5b238e3b0c31c0666372ebb07ae10522 | 265 | py | Python | bot/__main__.py | thecoderkitty/fluffington-bot | f518e7b66487aaf9e6c507ced43e15760d604be2 | [
"MIT"
] | null | null | null | bot/__main__.py | thecoderkitty/fluffington-bot | f518e7b66487aaf9e6c507ced43e15760d604be2 | [
"MIT"
] | null | null | null | bot/__main__.py | thecoderkitty/fluffington-bot | f518e7b66487aaf9e6c507ced43e15760d604be2 | [
"MIT"
] | null | null | null | from bot.bot import Bot
from bot.log import setup_sentry
import bot.constants as constants
from bot.utils.extensions import walk_extensions
setup_sentry()
bot = Bot.create()
for ext in walk_extensions():
bot.load_extension(ext)
bot.run(constants.Bot.token)
| 18.928571 | 48 | 0.788679 |
51cf3a04c7a44582fc044e89539b395fca9fd894 | 5,785 | py | Python | DataProcess/auto_rotation/phase_orientation_time_tag_pair.py | zhangupkai/RFID_Script | 9e05fad86e71dc6bd5dd12650d369f13d5a835c8 | [
"MIT"
] | null | null | null | DataProcess/auto_rotation/phase_orientation_time_tag_pair.py | zhangupkai/RFID_Script | 9e05fad86e71dc6bd5dd12650d369f13d5a835c8 | [
"MIT"
] | null | null | null | DataProcess/auto_rotation/phase_orientation_time_tag_pair.py | zhangupkai/RFID_Script | 9e05fad86e71dc6bd5dd12650d369f13d5a835c8 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import math
from scipy.interpolate import interpolate
from filters import hampel
from cal_rotation_cycle_time_main import cal_rotation_cycle_time
from scipy.signal import find_peaks
"""
转动标签对,相位差随时间(角度)的变化
Group1.1 跳频
Group1.2 单个频率
"""
# tag1 = '... | 31.612022 | 124 | 0.588764 |
cfa59b7e03a621229d3a7654d9a1137ae714d261 | 2,256 | py | Python | 20-fs-ias-lec/groups/Demo B/src/longFi/src/receiveEther.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-fs-ias-lec/groups/Demo B/src/longFi/src/receiveEther.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-fs-ias-lec/groups/Demo B/src/longFi/src/receiveEther.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | """
receiveEther.py
Faris Ahmetasevic, Marco Banholzer, Nderim Shatri
This code receives raw ethernet packets, which were sent to a network using the scapy library.
"""
from scapy.all import conf
import struct
"""
This function returns the converted information of the packets.
:param data: the bytes data which get... | 27.512195 | 128 | 0.699911 |
7a92957a17424f721e621a59fbda2c23b7833b14 | 181 | py | Python | CS305/assignment7/rdt/verify.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 22 | 2018-08-07T06:55:10.000Z | 2021-06-12T02:12:19.000Z | CS305/assignment7/rdt/verify.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 28 | 2020-03-04T23:47:22.000Z | 2022-02-26T18:50:00.000Z | CS305/assignment7/rdt/verify.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 4 | 2019-11-09T15:41:26.000Z | 2021-10-10T08:56:57.000Z | from rdt import datagram
test = datagram()
test.dtype = 0
test.seq = 1
test.seq_ack = 2
test.payload = b'wdnmd'
print(test)
print("=============")
gg = test()
print(datagram(gg))
| 13.923077 | 24 | 0.635359 |
7aa73b6fe414194e2ccdb2c9d077a3af4e202f8b | 2,151 | py | Python | skills/gasoline/action-gasoline.py | gidocarper/rhasspy-skills-test | eaf57287a67a0e43a299053cf0b107d61afd9b13 | [
"Unlicense"
] | 4 | 2021-01-08T21:08:50.000Z | 2021-12-08T15:30:50.000Z | skills/gasoline/action-gasoline.py | gidocarper/rhasspy-skills-test | eaf57287a67a0e43a299053cf0b107d61afd9b13 | [
"Unlicense"
] | null | null | null | skills/gasoline/action-gasoline.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 gasoline import Gasoline
app = HermesApp("GasolineApp")
def read_configuration_file():
try:
cp = configparser.ConfigParser()
with io.open(os.path.dirname(__fi... | 32.590909 | 91 | 0.672245 |
891b3be8285f3386612a5fc97738547fe244f622 | 4,923 | py | Python | backend/turbosettings/settings.py | giliam/turbo-songwriter | 3d100b08dc19c60d7a1324120e06bd9f971eea5a | [
"MIT"
] | null | null | null | backend/turbosettings/settings.py | giliam/turbo-songwriter | 3d100b08dc19c60d7a1324120e06bd9f971eea5a | [
"MIT"
] | 12 | 2017-09-25T20:13:29.000Z | 2020-02-12T00:12:41.000Z | backend/turbosettings/settings.py | giliam/turbo-songwriter | 3d100b08dc19c60d7a1324120e06bd9f971eea5a | [
"MIT"
] | null | null | null | # coding:utf-8
"""
Django settings for turbo project.
Generated by 'django-admin startproject' using Django 1.11.1.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"... | 26.755435 | 91 | 0.701605 |
8f59f37547e2fad91b502acdd3864379896b2945 | 535 | py | Python | pacman-arch/test/pacman/tests/sync1100.py | Maxython/pacman-for-termux | 3b208eb9274cbfc7a27fca673ea8a58f09ebad47 | [
"MIT"
] | 23 | 2021-05-21T19:11:06.000Z | 2022-03-31T18:14:20.000Z | source/pacman-6.0.1/test/pacman/tests/sync1100.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 11 | 2021-05-21T12:08:44.000Z | 2021-12-21T08:30:08.000Z | source/pacman-6.0.1/test/pacman/tests/sync1100.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Get info on package from a sync db"
sp = pmpkg("dummy")
sp.files = ["bin/dummy",
"usr/man/man1/dummy.1"]
sp.desc = "test description"
sp.groups = ["foo"]
sp.url = "http://www.archlinux.org"
sp.license = "GPL2"
sp.arch = "i686"
sp.packager = "Arch Linux"
sp.md5sum = "00000000000000000000... | 25.47619 | 56 | 0.676636 |
856b04c5e6129b006a5cc3068e4a7bfdc75f6338 | 3,152 | py | Python | pvs_suban/models.py | hackit90/django-invoices | 770d5cffe7831539b885c517b0a435cc764e0a8c | [
"MIT"
] | null | null | null | pvs_suban/models.py | hackit90/django-invoices | 770d5cffe7831539b885c517b0a435cc764e0a8c | [
"MIT"
] | null | null | null | pvs_suban/models.py | hackit90/django-invoices | 770d5cffe7831539b885c517b0a435cc764e0a8c | [
"MIT"
] | null | null | null | from django.db import models
from django.db.models import Sum, ForeignKey
from django.db.models import F
from django.core.validators import EmailValidator
# Create your models here.
class Contact(models.Model):
TYPE_SELECTpriv = (
('private', 'Private'),
('company', 'Company'),
)
# Ich weiss, d... | 41.473684 | 118 | 0.690038 |
741823f78624eaea0ad9e096224c532974649085 | 9,421 | py | Python | test/test_wal.py | st3fan/sphinx-automation-experiment | c92c8400770c6c604e2451e4f1e71957fc4c5ef8 | [
"Apache-2.0"
] | 451 | 2015-06-15T13:33:13.000Z | 2018-05-15T15:10:50.000Z | test/test_wal.py | st3fan/sphinx-automation-experiment | c92c8400770c6c604e2451e4f1e71957fc4c5ef8 | [
"Apache-2.0"
] | 95 | 2015-08-12T07:45:37.000Z | 2018-05-10T07:13:59.000Z | test/test_wal.py | st3fan/sphinx-automation-experiment | c92c8400770c6c604e2451e4f1e71957fc4c5ef8 | [
"Apache-2.0"
] | 38 | 2015-06-17T13:35:26.000Z | 2018-03-28T21:26:57.000Z | """
pghoard - test wal utility functions
Copyright (c) 2015 Ohmu Ltd
See LICENSE for details
"""
import codecs
import struct
from io import BytesIO
from tempfile import TemporaryFile
import pytest
from pghoard import wal
# PG 9.5; LSN 11/9C000000; timeline_id 47 (0x2f)
WAL_HEADER_95 = codecs.decode(b"87d006002f0000... | 28.206587 | 107 | 0.606093 |
7ad05d3cf6c5dbbfe8bf4b48c413302ea06b9fe1 | 2,401 | py | Python | OSINT-SPY-master/modules/malware.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | OSINT-SPY-master/modules/malware.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | OSINT-SPY-master/modules/malware.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | from .config import *
from .utils import format_dict
import os
import time
import requests
class VirusTotal:
def __init__(self):
self.params = {'apikey': virus_total_api_key}
self.scan_url = 'https://www.virustotal.com/vtapi/v2/file/scan'
self.report_url = 'https://www.virusto... | 40.016667 | 107 | 0.540192 |
3b242cffcfdf562e2b8f8f65a086ada53a68081b | 25,926 | py | Python | Dealer.py | simi48/Ef-If_Jassen | 6076839492bff591cf9b457e949999e9167903e6 | [
"Apache-2.0"
] | 4 | 2019-03-17T19:55:43.000Z | 2019-04-30T15:22:36.000Z | Dealer.py | simi48/Ef-If_Jassen | 6076839492bff591cf9b457e949999e9167903e6 | [
"Apache-2.0"
] | null | null | null | Dealer.py | simi48/Ef-If_Jassen | 6076839492bff591cf9b457e949999e9167903e6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Project: Deep Jass
File: Dealer.py
Purpose: Assortment of functions required to train the Recurrent Neural Network to play against other Networks (Simulate a game)
Created on: 24.04.2019 11:02:27
Author: Simon Thür; Marc Matter
Copyright © 2019 Marc Mat... | 43.354515 | 386 | 0.534444 |
8ea8a91c7f7c1b0cb4ca830cc76bfbf7b5d30823 | 1,511 | py | Python | Simple Wave Analysis/matplot_data1.py | washingtonxr/OpenAlgorithm | e1898e36dead0c79b23e054587d92f378c5e8b10 | [
"Apache-2.0"
] | null | null | null | Simple Wave Analysis/matplot_data1.py | washingtonxr/OpenAlgorithm | e1898e36dead0c79b23e054587d92f378c5e8b10 | [
"Apache-2.0"
] | null | null | null | Simple Wave Analysis/matplot_data1.py | washingtonxr/OpenAlgorithm | e1898e36dead0c79b23e054587d92f378c5e8b10 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
Datadir_path = "./data/"
Datafile_path = Datadir_path + "Pedometer_test1[Jul.15th,2019]/" + "Processed_data/"
File_name = "Pedometer_testingdata_acc_JLS001[Jul.15th,2019].txt"
def LoadData(file):
data = list()
data_axis = [list(), list(), list(), list()]
... | 29.057692 | 96 | 0.594308 |
d9595b34cc61f876eefa364c5825f57c53c51e73 | 2,171 | py | Python | SoSe-21/Uebung-6/A2-Dungeons_and_Dragons_2.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | 1 | 2022-03-23T09:40:39.000Z | 2022-03-23T09:40:39.000Z | SoSe-21/Uebung-6/A2-Dungeons_and_Dragons_2.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | SoSe-21/Uebung-6/A2-Dungeons_and_Dragons_2.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | # Funktionsdefinition
def trenner():
print("-----------------------------------")
def texteingabe(frage, antwort1, antwort2):
gueltige_eingabe = False
while not gueltige_eingabe:
ergebnis = input(frage)
if ergebnis.upper() == antwort1.upper() or ergebnis.upper() == antwort2.upper():
... | 44.306122 | 153 | 0.688623 |
30ec8c7fb29ede6847737d7ed02904d5b7c1322d | 452 | py | Python | pyntcloud/utils/numba.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 1,142 | 2016-10-10T08:55:30.000Z | 2022-03-30T04:46:16.000Z | pyntcloud/utils/numba.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 195 | 2016-10-10T08:30:37.000Z | 2022-02-17T12:51:17.000Z | pyntcloud/utils/numba.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 215 | 2017-02-28T00:50:29.000Z | 2022-03-22T17:01:31.000Z | from numba import jit
@jit
def groupby_count(xyz, indices, out):
for i in range(xyz.shape[0]):
out[indices[i]] += 1
return out
@jit
def groupby_sum(xyz, indices, N, out):
for i in range(xyz.shape[0]):
out[indices[i]] += xyz[i][N]
return out
@jit
def groupby_max(xyz, indices, N, out... | 18.833333 | 39 | 0.577434 |
ccea48827abba3f8528cfac40c37658cee303eb7 | 3,422 | py | Python | tests/web.adblockplus.org/tests/test_CookiesSettings.py | adblockplus/web.adblockplus.org | c2c570ce4f4296afc3577afe233c6b23b128f206 | [
"MIT"
] | 9 | 2016-01-29T18:05:29.000Z | 2021-10-06T04:21:55.000Z | tests/web.adblockplus.org/tests/test_CookiesSettings.py | adblockplus/web.adblockplus.org | c2c570ce4f4296afc3577afe233c6b23b128f206 | [
"MIT"
] | 9 | 2015-04-06T19:03:32.000Z | 2019-05-28T13:34:55.000Z | tests/web.adblockplus.org/tests/test_CookiesSettings.py | adblockplus/web.adblockplus.org | c2c570ce4f4296afc3577afe233c6b23b128f206 | [
"MIT"
] | 18 | 2015-04-06T17:42:31.000Z | 2021-10-06T04:26:29.000Z | import pytest
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from pages.landingPage import LandingPage
from chunks.topMenu import TopMenu
from chunks.cookiesPrompt import CookiesPrompt
import utils.global_functions as gf
@pytest.fixture(scope="function")
def driver():
opti... | 33.223301 | 77 | 0.816774 |
246b89363b5308fc0eb6ab2aeba680be04a90949 | 5,378 | py | Python | extractTool/extractTool/getGeoPackageInfo.py | corneliazy/Geosoftware2 | 8604c79c58a61b84c602f16b5f1e74e30dfcbd0e | [
"MIT"
] | null | null | null | extractTool/extractTool/getGeoPackageInfo.py | corneliazy/Geosoftware2 | 8604c79c58a61b84c602f16b5f1e74e30dfcbd0e | [
"MIT"
] | 47 | 2018-11-13T13:55:01.000Z | 2019-09-16T13:38:11.000Z | extractTool/extractTool/getGeoPackageInfo.py | corneliazy/Geosoftware2 | 8604c79c58a61b84c602f16b5f1e74e30dfcbd0e | [
"MIT"
] | 4 | 2018-11-27T12:36:51.000Z | 2020-10-14T18:07:04.000Z | import click, json, sqlite3, csv, pygeoj, extractTool as de
from osgeo import gdal, ogr, osr
import pandas as pd
import numpy as np
import xarray as xr
import os
import sqlite3
from pyproj import Proj, transform
from scipy.spatial import ConvexHull
#Boolean variable that shows if the crs of the bbox is in wgs84
wgs_84... | 38.414286 | 109 | 0.469319 |
034f5fa764ec302d24cdb97821577a235d228ab1 | 4,000 | py | Python | Python/plotly/plot_express.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/plotly/plot_express.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/plotly/plot_express.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | import plotly.express as px
import numpy as np
from itertools import count
df = px.data.iris()
# for trendline needs statsmodels module in addition to plotly
fig1 = px.scatter(df, x="sepal_width", y="sepal_length", color="species",
marginal_x="box", marginal_y="violin", trendline="ols")
df = df.so... | 33.333333 | 97 | 0.5825 |
302ccd01a81616677ad64098866eb70ecd6851f1 | 9,694 | py | Python | official/cv/ADNet/src/trainers/adnet_train_sl.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/ADNet/src/trainers/adnet_train_sl.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/ADNet/src/trainers/adnet_train_sl.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... | 45.088372 | 115 | 0.677842 |
002de8f689b5930a57dd6164c1b5ec5b14055968 | 386 | py | Python | 1207-unique-number-of-occurrences/1207-unique-number-of-occurrences.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | 1207-unique-number-of-occurrences/1207-unique-number-of-occurrences.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | 1207-unique-number-of-occurrences/1207-unique-number-of-occurrences.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def uniqueOccurrences(self, arr: List[int]) -> bool:
freq=dict()
for num in arr:
if num not in freq:
freq[num]=0
freq[num]+=1
occurences = [v for _, v in freq.items()]
if len(occurences)==len(set(occurences)):
... | 27.571429 | 56 | 0.474093 |
cc95956cba18c7f39cf1dcecd58d5e85119ad74c | 56,738 | py | Python | Fastir_Collector/registry/reg.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | Fastir_Collector/registry/reg.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | Fastir_Collector/registry/reg.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 2 | 2021-04-19T08:28:54.000Z | 2022-01-19T13:23:29.000Z | from __future__ import unicode_literals
import codecs
from utils.utils import convert_windate, dosdate, get_csv_writer, get_json_writer, write_list_to_json, write_dict_json,\
write_list_to_csv, process_hashes, close_json_writer, record_sha256_logs
import registry_obj
from win32com.shell import shell
import struct
i... | 53.576959 | 121 | 0.584406 |
aedc3b6eae1f5cdb6eeed12e1a4ac752ba202fc1 | 38,900 | py | Python | Packs/TrendMicroDeepSecurity/Integrations/TrendMicroDeepSecurity/TrendMicroDeepSecurity_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/TrendMicroDeepSecurity/Integrations/TrendMicroDeepSecurity/TrendMicroDeepSecurity_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/TrendMicroDeepSecurity/Integrations/TrendMicroDeepSecurity/TrendMicroDeepSecurity_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import json
from typing import Any, Dict, List, Union
from TrendMicroDeepSecurity import Client, convert_args
BASE_URL = "https://test.api.deepsecurity.trendmicro.com"
def load_mock_response(filename: str) -> Union[List[Any], Dict[str, Any]]:
return json.loads(open(f"test_data/{filename}.json").read())
def te... | 38.706468 | 120 | 0.711877 |
060e7b39cf9aaf6bd6eac73a1d8ad344c13dbe29 | 7,158 | py | Python | python/en/_pandas/Pandas for Everyone/p4e-3_intro2plotting-matplotlib.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_pandas/Pandas for Everyone/p4e-3_intro2plotting-matplotlib.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_pandas/Pandas for Everyone/p4e-3_intro2plotting-matplotlib.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
p4e-3_intro2plotting-matplotlib.py
pandas_for_everyone
3. Introduction to Plotting
3.1. Introduction
3.2. Matplotlib
3.3. Statistical Graphics Using matplotlib
3.3.1. Univariate
3.3.1.1. Histograms
3.3.2. Bivariate
3.3.2.1. Scatterplot
3... | 27.960938 | 86 | 0.543588 |
ae29dac4f33281ebab1ea31658ed627d6ef6e8ee | 1,655 | py | Python | Lab_01/list_pytest.py | SadequrRahman/advance-SoC | 35da93adfcdb1b4ec740cb44ffc54d9c8cc7adc4 | [
"BSD-4-Clause-UC"
] | null | null | null | Lab_01/list_pytest.py | SadequrRahman/advance-SoC | 35da93adfcdb1b4ec740cb44ffc54d9c8cc7adc4 | [
"BSD-4-Clause-UC"
] | null | null | null | Lab_01/list_pytest.py | SadequrRahman/advance-SoC | 35da93adfcdb1b4ec740cb44ffc54d9c8cc7adc4 | [
"BSD-4-Clause-UC"
] | null | null | null | # Author: Mohammad Arafath Uz Zaman
# File Name: list_pytest.py
#
# Description: Testing of List processing: test_Insert, test_Remove, test_Find,
# test_Sort this python function implement testing of list operations
#
import pytest
from List import *
List = [10, 2, 13, 4, 5]
L... | 30.090909 | 87 | 0.45861 |
4e86156768a32715c6de2ba4302f6c1012d4472b | 726 | py | Python | 数据结构/NowCode/33_GetNext.py | Blankwhiter/LearningNotes | 83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0 | [
"MIT"
] | null | null | null | 数据结构/NowCode/33_GetNext.py | Blankwhiter/LearningNotes | 83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0 | [
"MIT"
] | 3 | 2020-08-14T07:50:27.000Z | 2020-08-14T08:51:06.000Z | 数据结构/NowCode/33_GetNext.py | Blankwhiter/LearningNotes | 83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0 | [
"MIT"
] | 2 | 2021-03-14T05:58:45.000Z | 2021-08-29T17:25:52.000Z | # 二叉树的下一个节点
class TreeLinkNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
self.next = None
class Solution:
def GetNext(self, pNode):
# 寻找右子树,如果存在就一直找右子树的最左边就是下一个节点
if pNode.right:
tmpNode = pNode.right
while tmp... | 27.923077 | 55 | 0.528926 |
14d88b31ebc1ede8f1d4b6e589c1b7196fb889cf | 4,245 | py | Python | UAS/UAS 11 & 12/Menu.py | Archedar/UAS | 3237d9304026340acc93c8f36b358578dc0ae66f | [
"BSD-Source-Code"
] | null | null | null | UAS/UAS 11 & 12/Menu.py | Archedar/UAS | 3237d9304026340acc93c8f36b358578dc0ae66f | [
"BSD-Source-Code"
] | null | null | null | UAS/UAS 11 & 12/Menu.py | Archedar/UAS | 3237d9304026340acc93c8f36b358578dc0ae66f | [
"BSD-Source-Code"
] | null | null | null | #Menu
from Class import Barang
def menu1(barang):
print('')
for i in range(len(barang)):
umpan = barang[i]
print(f'{i + 1}. {umpan.nama}, Stok Tersedia: {umpan.kuantitas}')
def menu2(barang, histori):
print('')
nama = input('Nama Barang: ')
while True:
try:
harga = int(input(f'Harga {nama}... | 26.36646 | 95 | 0.638398 |
fec1c15dac6dbf3a6d3d111a7a71c94e6d012501 | 36 | py | Python | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/58_sets_conjuntos/Exercicios.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/58_sets_conjuntos/Exercicios.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/58_sets_conjuntos/Exercicios.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | abc = 5
if abc == 5:
print('ok') | 12 | 15 | 0.472222 |
3a4337c34141dc6d09b50d5187a4f73cd9964f11 | 375 | py | Python | Lab2.py | JSliman948/IA241 | 57e8441ed0a8236e08308c6ed18b7555d76fd739 | [
"MIT"
] | null | null | null | Lab2.py | JSliman948/IA241 | 57e8441ed0a8236e08308c6ed18b7555d76fd739 | [
"MIT"
] | null | null | null | Lab2.py | JSliman948/IA241 | 57e8441ed0a8236e08308c6ed18b7555d76fd739 | [
"MIT"
] | null | null | null | '''
lab2
'''
#3.1
my_name = "Tom"
print(my_name.upper())
#3.2
my_id = 123
print(my_id)
#3.3
my_id=you_id=123
print(my_id)
print(you_id)
#3.4
my_id_str = "123"
print(my_id_str)
#3.5
#print(my_name+my_id)
#3.6
print(my_name+my_id_str)
#3.7
print(my_name*3)
#3.8
print("Hello, World. This is my first python string." .split... | 13.392857 | 66 | 0.677333 |
28de71182396b77152436a68f23c842c50ccdb87 | 660 | py | Python | lambdas/sdd-api-db/sdd-api-db-categories/lambda_function.py | cfleschhut/virushack | 2fe7ded0be8672b066edef7fed52573794db2ba5 | [
"Apache-2.0"
] | null | null | null | lambdas/sdd-api-db/sdd-api-db-categories/lambda_function.py | cfleschhut/virushack | 2fe7ded0be8672b066edef7fed52573794db2ba5 | [
"Apache-2.0"
] | null | null | null | lambdas/sdd-api-db/sdd-api-db-categories/lambda_function.py | cfleschhut/virushack | 2fe7ded0be8672b066edef7fed52573794db2ba5 | [
"Apache-2.0"
] | null | null | null | import json
import pandas as pd
import pymysql
config = json.load(open("credentials-aws-db.json", "r"))
# Connect to the database.
connection = pymysql.connect(
host=config["host"],
user=config["user"],
password=config["password"],
db=config["database"],
charset='utf8',
cursor... | 22 | 73 | 0.640909 |
a364f32587254d5771284482e33e6a12b9e06c20 | 99 | py | Python | gemtown/modelers/apps.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | gemtown/modelers/apps.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | 5 | 2020-09-04T20:13:39.000Z | 2022-02-17T22:03:33.000Z | gemtown/modelers/apps.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class ModelersConfig(AppConfig):
name = 'gemtown.modelers'
| 16.5 | 33 | 0.767677 |
6e954e10b04e41c901908fb57a712964f0f3960c | 3,983 | py | Python | tests/test_zaehler.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | tests/test_zaehler.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | tests/test_zaehler.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | from datetime import datetime
from decimal import Decimal
import pytest # type:ignore[import]
from bo4e.bo.zaehler import Zaehler, ZaehlerSchema
from bo4e.com.externereferenz import ExterneReferenz
from bo4e.com.zaehlwerk import Zaehlwerk
from bo4e.enum.botyp import BoTyp
from bo4e.enum.energierichtung import Energi... | 42.827957 | 110 | 0.622395 |
c25bf0230aa877dae95af820571b499bd3691806 | 4,953 | py | Python | drupal_sqli_add_admin/drupal7_71_admin_sqli.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | drupal_sqli_add_admin/drupal7_71_admin_sqli.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | drupal_sqli_add_admin/drupal7_71_admin_sqli.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 2 | 2021-04-19T08:28:54.000Z | 2022-01-19T13:23:29.000Z | #!/usr/bin/python2
#-*- coding:utf-8 -*-
import hashlib
import time
import sys
import random
import urllib2
try:
from datetime import datetime
except ImportError:
print("\033[31m[!] Error Datetime Not Found !")
try:
import requests
except ImportError:
print("\033[31m[!] Error Requests Not Found !")
# f... | 31.75 | 345 | 0.600848 |
66e58bae7a136f2920718eba4b2e1611d1d27905 | 761 | py | Python | production/pygsl-0.9.5/gsl_dist/gsl_site_example.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | production/pygsl-0.9.5/gsl_dist/gsl_site_example.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pygsl/gsl_dist/gsl_site_example.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | # Some systems do not provide gsl-config. So here the locations can be entered
# by hand.
import os
# The path to the directory where gsl is installed. Currently setup.py assumes
# that the include files are located in "prefix/include".
prefix = os.path.join("C:\\", "Programs", "GSL", "gsl-1.3")
cflags = "-g -I" + o... | 34.590909 | 78 | 0.678055 |
66463b68b86cd1bb5fe312dd2318051a4856958c | 241 | py | Python | ParsingAndScraping/Netflix/netflix_main.py | KazuruK/FilmGetter | fd84bcaddf17d4b89ad6e5d27095535346c5f4a9 | [
"BSD-3-Clause"
] | 1 | 2021-06-23T13:06:11.000Z | 2021-06-23T13:06:11.000Z | ParsingAndScraping/Netflix/netflix_main.py | KazuruK/FilmGetter | fd84bcaddf17d4b89ad6e5d27095535346c5f4a9 | [
"BSD-3-Clause"
] | 1 | 2021-06-23T21:21:52.000Z | 2021-06-23T21:21:52.000Z | ParsingAndScraping/Netflix/netflix_main.py | KazuruK/FilmGetter | fd84bcaddf17d4b89ad6e5d27095535346c5f4a9 | [
"BSD-3-Clause"
] | 1 | 2021-06-28T19:14:19.000Z | 2021-06-28T19:14:19.000Z | from ParsingAndScraping.Netflix.parcer import netflix_parcer
def main():
user_request = input("Введите название фильма ")
print(netflix_parcer(user_request))
netflix_parcer(user_request)
if __name__ == '__main__':
main()
| 20.083333 | 60 | 0.742739 |
66466a17c8289ea3143c9135c30c5ef84ca955f9 | 431 | py | Python | spider/master_user.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | null | null | null | spider/master_user.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | 2 | 2021-03-31T18:54:16.000Z | 2021-12-13T19:49:08.000Z | spider/master_user.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | null | null | null | import re
import json
import fire
from tqdm import tqdm
from datetime import datetime,timedelta
from Config import get_config
_,db,r = get_config()
def get_task():
for type_id in tqdm(range(10)[1:]):
for user in tqdm(db.train_user.find_one({'_id':type_id})['list']):
message = {'type_id':type_id,'q':'from:'+user... | 23.944444 | 74 | 0.698376 |
bbab30d1cf26c0d752f9034098c1c0971b893380 | 272 | py | Python | exercises/en/exc_01_03_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/en/exc_01_03_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/en/exc_01_03_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | # Import the English language class and create the nlp object
from ____ import ____
nlp = ____
# Process the text
doc = ____("I like tree kangaroos and narwhals.")
# Select the first token
first_token = doc[____]
# Print the first token's text
print(first_token.____)
| 19.428571 | 61 | 0.753676 |
bbbbc039d877fac37617a990bd59ac777d64f2a3 | 605 | py | Python | INBa/2015/Primov_G_S/task_7_19.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Primov_G_S/task_7_19.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Primov_G_S/task_7_19.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 7. Вариант 19
#Разработайте систему начисления очков для задачи 6, в соответствии с которой игрок получал бы большее количество баллов за меньшее количество попыток.
#Primov G. S.
#31.03.2016
print('Угадайте шахматную фигуру, которую загадал компьютер')
import random
a = random.choice(['пешка', 'слон', 'конь',... | 30.25 | 151 | 0.680992 |
bbe46d302e59b8408f94a8d97b4f0b901e38d710 | 538 | py | Python | 108-convert-sorted-array-to-binary-search-tree/108-convert-sorted-array-to-binary-search-tree.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | 108-convert-sorted-array-to-binary-search-tree/108-convert-sorted-array-to-binary-search-tree.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | 108-convert-sorted-array-to-binary-search-tree/108-convert-sorted-array-to-binary-search-tree.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def sortedArrayToBST(self, nums: List[int]) -> Optional[TreeNode]:
def recursiveBST(low, high):
... | 38.428571 | 91 | 0.585502 |
a581c61726ed87fcdca36f6205cfa99b3ce83db6 | 2,994 | py | Python | TweetBot-master/tweetbot.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | TweetBot-master/tweetbot.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | TweetBot-master/tweetbot.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
import time
from random import *
os.system("chmod +x greet")
os.system("bash greet")
while True:
print("\nEnter Your username/Phone :")
user=input().strip()
print("\nEnter Your Password :")
pas=input().strip()
print("\nEnter Tweet List File Path")
path=input().strip()
print("\nEnter Additional Things t... | 30.55102 | 153 | 0.663327 |
3c07a5e707123602999cf1e706bbeda18de6fb34 | 3,797 | py | Python | src/nfz_module/network/RESTCommunicator.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | src/nfz_module/network/RESTCommunicator.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | src/nfz_module/network/RESTCommunicator.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | import requests
import json
from time import time
from datetime import datetime
from network.NetworkCommunicator import NetworkCommunicator
from writer.AccidentHotspotsFileWriter import AccidentHotspotsFileWriter
__author__ = 'Konstantin Bychkov, Hans-Werner Roitzsch'
__date__ = "2015-12-29"
class RESTCommunicator(N... | 37.22549 | 157 | 0.750856 |
3c8913bb207034a9c4d05693cf1c0a1352b53dab | 1,562 | py | Python | jumeaux/addons/res2res/type.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 11 | 2017-10-02T01:29:12.000Z | 2022-03-31T08:37:22.000Z | jumeaux/addons/res2res/type.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 79 | 2017-07-16T14:47:17.000Z | 2022-03-31T08:49:14.000Z | jumeaux/addons/res2res/type.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 2 | 2019-01-28T06:11:58.000Z | 2021-01-25T07:21:21.000Z | # -*- coding:utf-8 -*-
from owlmixin import OwlMixin, TOption, TList
from jumeaux.addons.res2res import Res2ResExecutor
from jumeaux.utils import when_optional_filter
from jumeaux.logger import Logger
from jumeaux.models import Res2ResAddOnPayload, Response, Request
logger: Logger = Logger(__name__)
LOG_PREFIX = "[re... | 29.471698 | 101 | 0.647887 |
b1f6ec4fcf48682a6f7c2027d9feaba22209ee5d | 727 | py | Python | selfservice/serializers.py | KSIUJ/erc-backend | a78a6ee85c2865c8d25c15f40dc72fe32ba4bfd3 | [
"MIT"
] | null | null | null | selfservice/serializers.py | KSIUJ/erc-backend | a78a6ee85c2865c8d25c15f40dc72fe32ba4bfd3 | [
"MIT"
] | 5 | 2020-10-10T00:21:37.000Z | 2021-09-22T18:01:46.000Z | selfservice/serializers.py | KSIUJ/erc-backend | a78a6ee85c2865c8d25c15f40dc72fe32ba4bfd3 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from registry.models import Client, Member
from selfservice.models import SelfServiceToken
class SelfServiceTokenSerializer(serializers.ModelSerializer):
class Meta:
model = SelfServiceToken
fields = '__all__'
read_only_fields = ['token']
class Sel... | 29.08 | 108 | 0.748281 |
2f03c6c8ddea04dfd1c24f20775e696e39dddf2d | 2,115 | py | Python | 0x41414141/2021/crypto/Delegate-wallet/wallet.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | 0x41414141/2021/crypto/Delegate-wallet/wallet.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | 0x41414141/2021/crypto/Delegate-wallet/wallet.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | import os
import socketserver
import string
import threading
from time import *
import time
import binascii
import random
flag = open("flag.txt", "rb").read().strip()
class prng_lcg:
def __init__(self):
self.n = pow(2, 607) -1
self.c = random.randint(2, self.n)
self.m = r... | 24.882353 | 67 | 0.556028 |
f998282bbcaf081711cae7b445313bb233a2c7cd | 92 | py | Python | 2014/09/cyberstalking/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2014/09/cyberstalking/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2014/09/cyberstalking/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 = '1NiqqOsQnizg4ujTucSJVVrfSY9MCMQfbmYRe4XXaUqo'
| 23 | 68 | 0.847826 |
f9afb0c280606c0b981a5e87ffdeb06ac849851e | 1,131 | py | Python | dbc_generator/signal.py | WURacing/dbc_generator | aae3c8ddb20bf22f6ac3667b8e05aa2b66b74b68 | [
"Apache-2.0"
] | 1 | 2021-01-14T23:24:13.000Z | 2021-01-14T23:24:13.000Z | dbc_generator/signal.py | WURacing/dbc_generator | aae3c8ddb20bf22f6ac3667b8e05aa2b66b74b68 | [
"Apache-2.0"
] | null | null | null | dbc_generator/signal.py | WURacing/dbc_generator | aae3c8ddb20bf22f6ac3667b8e05aa2b66b74b68 | [
"Apache-2.0"
] | 1 | 2019-10-19T19:25:09.000Z | 2019-10-19T19:25:09.000Z | from dataclasses import dataclass
@dataclass
class Signal:
name: str
pos_start: int
pos_end: int
scale: float
offset: float
min: int
max: int
units: str
sender: str = "Vector__XXX"
@classmethod
def from_dict(cls, data: dict):
return cls(**data)
@classmethod
... | 23.5625 | 114 | 0.531388 |
9b8910e4102356ee4f598707b39a862dc79cf1de | 1,581 | py | Python | scripts/component_graph/surveyor/__main__.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | scripts/component_graph/surveyor/__main__.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | scripts/component_graph/surveyor/__main__.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2019 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.
"""Tool to dump the v1 component graph in CSV form.
This tool produces a dump of the component graph in CSV form. Aside from the
compo... | 32.265306 | 80 | 0.729285 |
9ba302351c90be6a6d83ef711633d39e8dd51df4 | 5,193 | py | Python | nbt.py | Turidus/Minecraft-MapMaker | 16e4015d03d67f04cfd247c11c9e3e2a5429b79f | [
"MIT"
] | 1 | 2018-10-24T16:02:08.000Z | 2018-10-24T16:02:08.000Z | nbt.py | Turidus/Minecraft-MapMaker | 16e4015d03d67f04cfd247c11c9e3e2a5429b79f | [
"MIT"
] | 2 | 2018-07-16T19:04:00.000Z | 2018-07-29T11:43:53.000Z | nbt.py | Turidus/Minecraft-MapMaker | 16e4015d03d67f04cfd247c11c9e3e2a5429b79f | [
"MIT"
] | null | null | null | """
Extremly barebone implementation of Minecrafts NBT format.
The only function it can fullfill is support the generation of schematic files and map.dat files.
WARNING: This implemention violates the reference by treating the TAGs as UNsigned and can not deal with negativ numbers
or positiv numbers greater t... | 26.768041 | 142 | 0.63316 |
1fddef3e65ec9c0c56c37fe3e300f5e46afbbfa8 | 17,980 | py | Python | GUI/Engine.py | DrBumm/Minibyte-Engine | 833bf00ff86603419476c8755f551c0f6b4ac86b | [
"Unlicense"
] | 4 | 2019-08-16T20:48:33.000Z | 2021-05-23T20:10:08.000Z | GUI/Engine.py | DrBumm/Minibyte-Engine | 833bf00ff86603419476c8755f551c0f6b4ac86b | [
"Unlicense"
] | 16 | 2019-08-21T19:06:15.000Z | 2020-06-02T11:31:32.000Z | GUI/Engine.py | DrBumm/Minibyte-Engine | 833bf00ff86603419476c8755f551c0f6b4ac86b | [
"Unlicense"
] | null | null | null | import tkinter as tk # Tkinter
import save_load_map # Save and Load system
from compiler import *
# width and height of the window
width = 800
height = 700
class Window:
def __init__(self, load_map=False, map_name=""):
# Sets vars for the programm
self.blst = []
self.map_... | 47.315789 | 121 | 0.521135 |
85e97c9fca3625e744370d5e71b8c8a83f907b54 | 7,542 | py | Python | Hackathons_19_20/Accenture hackathon/Accenture mlp bk.py | aviggithub/Hackathons_20 | a1bbc63cff3bd71982017749a0cc162d684e452b | [
"Apache-2.0"
] | null | null | null | Hackathons_19_20/Accenture hackathon/Accenture mlp bk.py | aviggithub/Hackathons_20 | a1bbc63cff3bd71982017749a0cc162d684e452b | [
"Apache-2.0"
] | null | null | null | Hackathons_19_20/Accenture hackathon/Accenture mlp bk.py | aviggithub/Hackathons_20 | a1bbc63cff3bd71982017749a0cc162d684e452b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Feb 19 13:42:49 2019
@author: avi
"""
import pandas as pd
import numpy as np
import sklearn
import matplotlib.pyplot as plt #visualize data
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
import seaborn as sns
... | 29.810277 | 200 | 0.691992 |
c0788369287d42d5bc8cf12f8d1ad5083d42a8a6 | 892 | py | Python | Python/M01_ProgrammingBasics/L03_ConditionalStatementsAdvanced/Exercises/Solutions/P04_FishingBoat.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L03_ConditionalStatementsAdvanced/Exercises/Solutions/P04_FishingBoat.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L03_ConditionalStatementsAdvanced/Exercises/Solutions/P04_FishingBoat.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | 1 | 2022-02-23T13:03:14.000Z | 2022-02-23T13:03:14.000Z | budget = int(input())
season = input()
people = int(input())
rent = 0
if season == "Spring":
if people <= 6:
rent = 3000 * 0.9
elif 7 <= people <= 11:
rent = 3000 * 0.85
elif people >= 12:
rent = 3000 * 0.75
elif season == "Summer" or season == "Autumn":
if people <= 6:
... | 23.473684 | 66 | 0.515695 |
c87d82ffb2f16cff162473e720eb3483bd7b7e21 | 1,196 | py | Python | tools/sanitizer/lib/sanitize.py | torsten-rathmann/rdmo-catalog | 8cc58d6c5a94369ed06ed1e1cb96694eba76f519 | [
"CC0-1.0"
] | 10 | 2017-03-17T13:13:44.000Z | 2022-02-09T17:12:03.000Z | tools/sanitizer/lib/sanitize.py | torsten-rathmann/rdmo-catalog | 8cc58d6c5a94369ed06ed1e1cb96694eba76f519 | [
"CC0-1.0"
] | 74 | 2017-12-14T18:42:43.000Z | 2022-03-08T16:22:52.000Z | tools/sanitizer/lib/sanitize.py | torsten-rathmann/rdmo-catalog | 8cc58d6c5a94369ed06ed1e1cb96694eba76f519 | [
"CC0-1.0"
] | 36 | 2017-12-19T17:00:24.000Z | 2022-03-04T13:06:52.000Z | import hashlib
from lib.util import rxsearch
class Sanitize():
def __init__(self, content, filename, conf):
self.content = content
self.filename = filename
self.rdmo_uris = conf.rdmo_uris
self.old_uri_prefix = conf.conf['args'].old_uri_prefix
self.new_uri_prefix = conf.con... | 27.813953 | 73 | 0.582776 |
a82f2af1c0c98f84b4c0d6dec0da9fcaa0c945a8 | 414 | py | Python | INBa/2015/Rozhko_K_A/task_1_20.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Rozhko_K_A/task_1_20.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Rozhko_K_A/task_1_20.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 1. Вариант 20.
# Напишите программу, которая будет сообщать род деятельности и псевдоним под которым скрывается Евгений Петрович Катаев. После вывода информации программа должна дожидаться пока пользователь нажмет Enter для выхода.
# Рожко Ксения
# 23.05.2016
print("Евгений Петрович Петров (настоящая фам... | 34.5 | 216 | 0.797101 |
b5ae46d74ce281e170072f3c9eb5841d0c02e4a8 | 757 | py | Python | 343/tuwulisu_343_dp.py | Leetcode-Secret-Society/warehouse | 40d7969683b1296f361e799cda37f15ceec52af8 | [
"MIT"
] | null | null | null | 343/tuwulisu_343_dp.py | Leetcode-Secret-Society/warehouse | 40d7969683b1296f361e799cda37f15ceec52af8 | [
"MIT"
] | null | null | null | 343/tuwulisu_343_dp.py | Leetcode-Secret-Society/warehouse | 40d7969683b1296f361e799cda37f15ceec52af8 | [
"MIT"
] | null | null | null | class Solution:
def __init__(self):
key_list = [i for i in range(1,11)]
value_list = [1,2,3,4,6,9,12,18,27,36]
self.dict_ = dict(zip(key_list, value_list))
def get_ans(self, n: int) -> int:
if n in self.dict_:
return self.dict_[n]
else:
max_va... | 28.037037 | 75 | 0.490092 |
570da2f57886ecbb61b786b1039fec3336328b8c | 3,502 | py | Python | examples/miniportal/portal_run.py | Jumpscale/web | 8e8ec2ce01f3105c7647ee8a0c90af09311cbbeb | [
"Apache-2.0"
] | 1 | 2015-10-26T10:38:32.000Z | 2015-10-26T10:38:32.000Z | examples/miniportal/portal_run.py | Jumpscale/web | 8e8ec2ce01f3105c7647ee8a0c90af09311cbbeb | [
"Apache-2.0"
] | null | null | null | examples/miniportal/portal_run.py | Jumpscale/web | 8e8ec2ce01f3105c7647ee8a0c90af09311cbbeb | [
"Apache-2.0"
] | null | null | null | import os
from flask_debugtoolbar import DebugToolbarExtension
from flask.ext.admin import Admin
from wtforms import form, fields
from flask.ext.admin.model.fields import InlineFormField
from flask.ext.admin.form.fields import DateTimeField
from flask.ext.admin.contrib.pymongo import ModelView
import pymongo
from porta... | 36.103093 | 141 | 0.643918 |
5fd551774ebaede40ab7aee761d940a760aaf7f3 | 148 | py | Python | Python/Sets/set_mutations.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | Python/Sets/set_mutations.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | Python/Sets/set_mutations.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | _, A = input(), set(input().split())
for _ in range(int(input())):
getattr(A, input().split()[0])(set(input().split()))
print(sum(map(int,A))) | 24.666667 | 56 | 0.581081 |
27b247295887fc1f6a179e12ab44b37d93bc7a3e | 454 | py | Python | Lehrjahr_2/Modul_122/python/cpuinfo.py | severinkaderli/gibb | 5b4952cedacb3885ab4a0eb9fd6c1cab5674e3ee | [
"MIT"
] | 5 | 2015-05-19T14:26:53.000Z | 2016-06-24T17:03:03.000Z | Lehrjahr_2/Modul_122/python/cpuinfo.py | severinkaderli/gibb | 5b4952cedacb3885ab4a0eb9fd6c1cab5674e3ee | [
"MIT"
] | null | null | null | Lehrjahr_2/Modul_122/python/cpuinfo.py | severinkaderli/gibb | 5b4952cedacb3885ab4a0eb9fd6c1cab5674e3ee | [
"MIT"
] | 6 | 2015-05-26T06:25:05.000Z | 2020-04-30T07:25:30.000Z | #!/usr/bin/python3.4
#
#SCRIPT: cpuinfo.py
#AUTHOR: Severin Kaderli
#PURPOSE: Show cpu info
#USAGE: ./cpuinfo.py
#Open file
cpuinfo = open('/proc/cpuinfo', 'r')
#Show file information
print(cpuinfo)
#Loop through file and print each line
for line in cpuinfo:
print(line, end='')
#Read file
print(cpuinfo.read())
#P... | 17.461538 | 38 | 0.729075 |
8b5ca62b48c434914e6466865460417bcb7cb3b1 | 530 | py | Python | PMIa/2014/KHASANOVA_I_F/task_2_30.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2014/KHASANOVA_I_F/task_2_30.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2014/KHASANOVA_I_F/task_2_30.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 2. Вариант 30.
# Напишите программу, которая будет выводить на экран наиболее понравившееся вам высказывание, автором которого является Али ибн Абу Талиб. Не забудьте о том, что автор должен быть упомянут на отдельной строке.
# Khasanova I. F.
# 17.03.2016
print("Пусть дурной и хороший человек не будут для т... | 44.166667 | 210 | 0.769811 |
7bde8cb46f32f1fed69737949ff913bcf07ac8ac | 289 | py | Python | src/text_generator/run_text_generation.py | krangelie/bias-in-german-nlg | 9fbaf50fde7d41d64692ae90c41beae61bc78d44 | [
"MIT"
] | 14 | 2021-08-24T12:36:37.000Z | 2022-03-18T12:14:36.000Z | src/text_generator/run_text_generation.py | krangelie/bias-in-german-nlg | 9fbaf50fde7d41d64692ae90c41beae61bc78d44 | [
"MIT"
] | null | null | null | src/text_generator/run_text_generation.py | krangelie/bias-in-german-nlg | 9fbaf50fde7d41d64692ae90c41beae61bc78d44 | [
"MIT"
] | 1 | 2021-10-21T20:22:55.000Z | 2021-10-21T20:22:55.000Z | from src.text_generator.regard_text_generator import generate_gpt2_texts
from src.text_generator.regard_text_generator_gpt3 import generate_gpt3_texts
def run_txt_generation(cfg):
if cfg.gpt.name == "gpt3":
generate_gpt3_texts(cfg)
else:
generate_gpt2_texts(cfg)
| 28.9 | 77 | 0.785467 |
efc7f539af4c53210ac3a1f9af5bc640554b1e8b | 1,487 | py | Python | DataStructures/LinkedLists/delete_node.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | DataStructures/LinkedLists/delete_node.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | DataStructures/LinkedLists/delete_node.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
class Node(object):
def __init__(self, data=None, next_node=None):
self.data = data
self.next = next_node
def InsertNth(head, data, position):
if head is None:
head = Node(data=data)
elif position == 0:
tmp = head
head = Node(data=... | 20.369863 | 62 | 0.507061 |
325bcb00a6056f659e1b81f84c1e2a6e9bfa6cb9 | 1,753 | py | Python | Intro-Python-II/src/room.py | tobias-fyi/01_intro_python | c56645291b8bce94d8511c3277fefba1fe8add89 | [
"MIT"
] | null | null | null | Intro-Python-II/src/room.py | tobias-fyi/01_intro_python | c56645291b8bce94d8511c3277fefba1fe8add89 | [
"MIT"
] | 8 | 2020-03-24T17:47:23.000Z | 2022-03-12T00:33:21.000Z | cs/lambda_cs/01_intro_python/Intro-Python-II/src/room.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | """
BeWilder - text adventure game :: Room definition
A class to hold room information - name and description attributes.
"""
from __future__ import annotations
import textwrap
from adv_utils import justify_center, table_maker
from item import Item
class Room:
def __init__(
self,
name: str,
... | 28.737705 | 85 | 0.592698 |
f5e9648deee1f330d7551cceb1840d6a3da2d005 | 2,033 | py | Python | api/media/generator.py | singhprincejeet/in_poster | 1b0e18631ebede94e679eb0aba6c8e7630a02aba | [
"MIT"
] | null | null | null | api/media/generator.py | singhprincejeet/in_poster | 1b0e18631ebede94e679eb0aba6c8e7630a02aba | [
"MIT"
] | 4 | 2021-04-30T21:09:19.000Z | 2022-03-12T00:19:12.000Z | api/media/generator.py | singhprincejeet/in_poster | 1b0e18631ebede94e679eb0aba6c8e7630a02aba | [
"MIT"
] | null | null | null | from PIL import Image, ImageDraw
from time import time
class Generator:
DEFAULT_BACKGROUND_SIZE = 600
def __init__(self, body_text, footer_text, image):
self.body_text = body_text
self.footer_text = footer_text
self.background_image = self.create_background_image(image)
def generate(se... | 28.236111 | 109 | 0.656173 |
720c1fe77fe6a8fac717dd55b2838ff9459045e8 | 314 | py | Python | pacman-arch/test/pacman/tests/remove044.py | Maxython/pacman-for-termux | 3b208eb9274cbfc7a27fca673ea8a58f09ebad47 | [
"MIT"
] | 23 | 2021-05-21T19:11:06.000Z | 2022-03-31T18:14:20.000Z | source/pacman-6.0.1/test/pacman/tests/remove044.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 11 | 2021-05-21T12:08:44.000Z | 2021-12-21T08:30:08.000Z | source/pacman-6.0.1/test/pacman/tests/remove044.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "-Rs test"
lp1 = pmpkg("pkg1")
lp1.depends = ["pkg2=1.1-1"]
self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2", "1.0-1")
lp2.reason = 1
self.addpkg2db("local", lp2)
self.args = "-Rs %s" % lp1.name
self.addrule("PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=pkg1")
self.addrule("PKG_EXIST=pkg2")
| 18.470588 | 32 | 0.665605 |
a0ea348005d5e07b60f1d91feeb0724560b64c99 | 576 | py | Python | tests/test_replacements.py | Theta-Dev/Spotify-Gender-Ex | 4e5360f115cb3302397b8e1ad1b11ad96b887ad2 | [
"MIT"
] | 1 | 2022-02-05T16:40:13.000Z | 2022-02-05T16:40:13.000Z | tests/test_replacements.py | Theta-Dev/Spotify-Gender-Ex | 4e5360f115cb3302397b8e1ad1b11ad96b887ad2 | [
"MIT"
] | 31 | 2021-06-17T11:59:33.000Z | 2022-03-19T07:05:18.000Z | tests/test_replacements.py | Theta-Dev/Spotify-Gender-Ex | 4e5360f115cb3302397b8e1ad1b11ad96b887ad2 | [
"MIT"
] | null | null | null | import unittest
from importlib_resources import files
from spotify_gender_ex.replacement_table import ReplacementTable
from spotify_gender_ex.lang_file import is_suspicious
class ReplacementTest(unittest.TestCase):
def test_replacement_table(self):
rt_builtin = ReplacementTable.from_file(files('spotify_g... | 38.4 | 121 | 0.743056 |
9d1f53fd712c1e09702399d70a4e4dde4a2c6dff | 5,269 | py | Python | io.py | EstelleRobert/ztfflat | ccaa5786021a0f5bbbd97b1991c8b2e349f19411 | [
"Apache-2.0"
] | null | null | null | io.py | EstelleRobert/ztfflat | ccaa5786021a0f5bbbd97b1991c8b2e349f19411 | [
"Apache-2.0"
] | null | null | null | io.py | EstelleRobert/ztfflat | ccaa5786021a0f5bbbd97b1991c8b2e349f19411 | [
"Apache-2.0"
] | null | null | null |
import os
import numpy as np
import pandas
from glob import glob
#__all__ = ["get_starflat_files"]
STARFLAT_PATH = "/sps/ztf/data/storage/starflat/"
DATAFILE_PATH = os.path.join(STARFLAT_PATH, "datafiles")
DIRPATH_CONCAT = os.path.join(os.getenv('ZTFDATA'), 'storage/starflat/concat_df')
DIRPATH_STARFLAT_FILES = '/s... | 28.63587 | 138 | 0.624597 |
19de09b0593f55e9b50ef7835c7c92b0c8360702 | 6,285 | py | Python | imgtl/db.py | reviforks/imgtl | b2141f9f0d7f2d318661f6ff6ab9594cff5b80f3 | [
"MIT"
] | null | null | null | imgtl/db.py | reviforks/imgtl | b2141f9f0d7f2d318661f6ff6ab9594cff5b80f3 | [
"MIT"
] | null | null | null | imgtl/db.py | reviforks/imgtl | b2141f9f0d7f2d318661f6ff6ab9594cff5b80f3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson
from datetime import datetime
from urllib import urlencode
from flask.ext.sqlalchemy import SQLAlchemy
import sqlalchemy.types as types
from sqlalchemy.ext.mutable import MutableDict
from sqlalchemy.sql import functions as sqlfuncs
from sqlalchemy.orm ... | 35.308989 | 121 | 0.686078 |
a08531e20266b078c210af4d283ab498374e5fbc | 1,180 | py | Python | Project Euler Questions 21 - 30/Project Euler Question 22.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | 1 | 2020-02-11T02:03:02.000Z | 2020-02-11T02:03:02.000Z | Project Euler Questions 21 - 30/Project Euler Question 22.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | null | null | null | Project Euler Questions 21 - 30/Project Euler Question 22.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | null | null | null | #Project Euler Question 22
#Using names.txt (right click and 'Save Link/Target As...'), a 46K text file containing over five-thousand first names, begin by sorting it into alphabetical order.
#Then working out the alphabetical value for each name, multiply this value by its alphabetical position in the list to obtain... | 34.705882 | 165 | 0.730508 |
cd8466f9ebd7aba9e63fb8118a4f7f620ea456f0 | 2,660 | py | Python | etl/test/test_data_extraction/test_Scraper.py | Betadinho/einander-helfen | 272f11397d80ab5267f39a7b36734495f1c00b0c | [
"MIT"
] | 7 | 2020-04-23T20:16:11.000Z | 2022-01-04T14:57:16.000Z | etl/test/test_data_extraction/test_Scraper.py | Betadinho/einander-helfen | 272f11397d80ab5267f39a7b36734495f1c00b0c | [
"MIT"
] | 361 | 2020-04-23T17:20:14.000Z | 2022-03-02T11:29:45.000Z | etl/test/test_data_extraction/test_Scraper.py | Betadinho/einander-helfen | 272f11397d80ab5267f39a7b36734495f1c00b0c | [
"MIT"
] | 1 | 2021-11-29T06:02:52.000Z | 2021-11-29T06:02:52.000Z | import os
import unittest
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
os.environ['ROOT_DIR'] = ROOT_DIR
from data_extraction.scraper import Scraper
class TestScraper(unittest.TestCase):
"""Tests the Scraper class."""
def setUp(self):
self.scraper = Scraper('test')
def test_clean_stri... | 40.923077 | 120 | 0.627444 |
e4d589119a822c9f99e617eb3f02f7aa9eb3e232 | 8,140 | py | Python | Tests/test_rssfeed.py | dereklm12880/rssticker | d90e8c00811d67bd9fb8104bbb6ec98aae5221f4 | [
"MIT"
] | 2 | 2020-02-26T01:54:26.000Z | 2020-04-27T20:09:14.000Z | Tests/test_rssfeed.py | dereklm12880/rssticker | d90e8c00811d67bd9fb8104bbb6ec98aae5221f4 | [
"MIT"
] | 17 | 2020-02-29T02:43:44.000Z | 2020-04-27T20:38:44.000Z | Tests/test_rssfeed.py | dereklm12880/rssticker | d90e8c00811d67bd9fb8104bbb6ec98aae5221f4 | [
"MIT"
] | 8 | 2020-02-26T21:37:36.000Z | 2020-06-23T00:01:27.000Z | # https://ongspxm.github.io/blog/2016/11/assertraises-testing-for-errors-in-unittest/
import unittest
from mock import patch
from RSS.model.rssfeed import RssModel
import feedparser
class TestRssModel(unittest.TestCase):
"""Test class for RSS.model.rssfeed.RssModel."""
_return_value_null = {}
def setUp... | 45.988701 | 142 | 0.581695 |
e4d96cf9e8870a2c8ea568c4ce3896c260579184 | 223 | py | Python | Online-Judges/DimikOJ/Python/38-hirok-kingdom.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | 3 | 2021-06-15T01:19:23.000Z | 2022-03-16T18:23:53.000Z | Online-Judges/DimikOJ/Python/38-hirok-kingdom.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | Online-Judges/DimikOJ/Python/38-hirok-kingdom.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | t = int(input())
for _ in range(t):
n, m = input().split()
n = int(n)
for i in range(1, n+1):
print(((m+" ") * i).strip())
for j in range(n-1, 0, -1):
print(((m+" ") * j).strip())
print() | 24.777778 | 36 | 0.430493 |
5f4855fe38039849e94712b5b11e8f7f5075f56a | 2,741 | py | Python | Advanced/Threading/producer_consumer_problem/pro_consu_t2.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | Advanced/Threading/producer_consumer_problem/pro_consu_t2.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | Advanced/Threading/producer_consumer_problem/pro_consu_t2.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | ####################################
# Author: "BALAVIGNESH" #
# Maintainer: "BALAVIGNESH" #
# License: "CC0 1.0 Universal" #
# Date: "25/04/2021" #
####################################
from threading import Thread, Condition
import random, time
"""
When there was nothing in t... | 35.597403 | 144 | 0.626049 |
f2396d0f721f5abe0bdfe24178fa7440952211fe | 2,289 | py | Python | app.py | nkxavis2907/aws-bank-backend | dc6b754b25d6ffe6f445cfac0f6c9bc745455c69 | [
"MIT"
] | 1 | 2021-09-13T21:05:44.000Z | 2021-09-13T21:05:44.000Z | app.py | nkxavis2907/aws-bank-backend | dc6b754b25d6ffe6f445cfac0f6c9bc745455c69 | [
"MIT"
] | null | null | null | app.py | nkxavis2907/aws-bank-backend | dc6b754b25d6ffe6f445cfac0f6c9bc745455c69 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, make_response, url_for, request, redirect, json
from flask_cors import CORS, cross_origin
from flask_migrate import Migrate
from flask_sqlalchemy import SQLAlchemy
from datetime import datetime
app = Flask(__name__)
CORS(app, support_credentials=True)
app.config['CORS_HEADERS'... | 28.259259 | 92 | 0.70948 |
f254b55bd90343f268f31391f96ada93c3daec87 | 1,398 | py | Python | test_service.py | cmput401-fall2018/web-app-ci-cd-with-travis-ci-IanWark | 41bc3394701a53a3b07dba8bddb72762ebb5c6a7 | [
"MIT"
] | null | null | null | test_service.py | cmput401-fall2018/web-app-ci-cd-with-travis-ci-IanWark | 41bc3394701a53a3b07dba8bddb72762ebb5c6a7 | [
"MIT"
] | null | null | null | test_service.py | cmput401-fall2018/web-app-ci-cd-with-travis-ci-IanWark | 41bc3394701a53a3b07dba8bddb72762ebb5c6a7 | [
"MIT"
] | null | null | null | import os
from unittest.mock import Mock
from service import Service
test_inputs = [0, 0.1, -0.1, 1, -1, 2, -2, 10, -10, 1000, -1000]
divide_outputs = [0, 100, -100, 10, -10, 5, -5, 1, -1, 0.01, -0.01]
def service_w_mocked_random():
serv = Service()
serv.bad_random = Mock('bad_random')
serv.bad_random.return_valu... | 23.3 | 67 | 0.699571 |
29cd4fc0e1b588b89742ba85397844df3836314c | 449 | py | Python | ___Python/Jonas/Python/p01_kennenlernen/meinebibliothek.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Jonas/Python/p01_kennenlernen/meinebibliothek.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Jonas/Python/p01_kennenlernen/meinebibliothek.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | from datetime import date
# Funktion alter mit einem Parameter Geburtsdatum
def alter(geburtsdatum):
heute = date.today()
jahre = heute.year - geburtsdatum.year
if (geburtsdatum.month, geburtsdatum.day) >= (heute.month, heute.day): # hatte die Person diese Jahr noch nicht Geburtstag?
jahre -... | 32.071429 | 128 | 0.688196 |
8a2fcfaff2320abd60ea08cfffee2ebee1a7d94c | 8,385 | py | Python | official/recommend/naml/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | official/recommend/naml/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/recommend/naml/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.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... | 49.323529 | 120 | 0.671556 |
8aca005017713fc041c92fc661895c259b3fe7b1 | 7,392 | py | Python | notebooks_and_scripts/graph_miner/repositories/linqs_graph_repository.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | null | null | null | notebooks_and_scripts/graph_miner/repositories/linqs_graph_repository.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | null | null | null | notebooks_and_scripts/graph_miner/repositories/linqs_graph_repository.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | null | null | null | """Sub-module handling the retrieval and building of graphs from LINQSGraphRepository."""
from typing import List, Dict
import os
import compress_json
from .graph_repository import GraphRepository
class LINQSGraphRepository(GraphRepository):
def __init__(self):
"""Create new String Graph Repository objec... | 29.217391 | 89 | 0.518263 |
76fedce3314d5171924d611cb7f76db6cd563a0e | 92 | py | Python | 2014/07/prison-older-population/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2014/07/prison-older-population/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2014/07/prison-older-population/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 = '1almM_Xx7TyiLEPMyYAxzWX4NcvoPKDeg9okiHu0B6nM'
| 23 | 68 | 0.847826 |
0a0392337f3e15df9cb0d9afd6bb890474db5128 | 2,429 | py | Python | Chapter5_DNN/Chapter5_2_BostonRegression/bostonKerasDnn2.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter5_DNN/Chapter5_2_BostonRegression/bostonKerasDnn2.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter5_DNN/Chapter5_2_BostonRegression/bostonKerasDnn2.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | import numpy as np
import tensorflow as tf
from tensorflow.keras.datasets import boston_housing
from tensorflow.keras.initializers import Constant
from tensorflow.keras.initializers import RandomUniform
from tensorflow.keras.layers import Activation
from tensorflow.keras.layers import Dense
from tensorflow.keras.models... | 31.545455 | 111 | 0.7007 |
6a77965ded0f8b724301ab253e5e0cfc443958b2 | 1,544 | py | Python | redirect.py | juergenpabel/livecenter_sportschau_de | d4c08b14e71ff12fee712d83faa27ce566ed9d8b | [
"Apache-2.0"
] | null | null | null | redirect.py | juergenpabel/livecenter_sportschau_de | d4c08b14e71ff12fee712d83faa27ce566ed9d8b | [
"Apache-2.0"
] | null | null | null | redirect.py | juergenpabel/livecenter_sportschau_de | d4c08b14e71ff12fee712d83faa27ce566ed9d8b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
import re
import lxml.html
from lxml.cssselect import CSSSelector
def do_redirect(url, html, filter_date, filter_comp, filter_team):
current_comp = None
current_round = None
current_game = None
location = None
gameplan = lxml.html.fromstring( html ).find_class( "module-gameplan" )
for elemen... | 37.658537 | 101 | 0.684585 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.