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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
19b708b1df2c4245299c34ea34492ca9905ef025 | 78 | py | Python | MiniProjects/Python-Challenges/Reverse_String.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | MiniProjects/Python-Challenges/Reverse_String.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | MiniProjects/Python-Challenges/Reverse_String.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | g = input("Enter A String : ")
print("The Reverse Of" , g , "is" , g[::-1])
| 26 | 45 | 0.512821 |
dfbabd8c8931058c76e68ecf75e5ced31a68099b | 1,321 | py | Python | 0CTF/2021/Quals/pwn/uc_masteeer/syscall.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | 0CTF/2021/Quals/pwn/uc_masteeer/syscall.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | 0CTF/2021/Quals/pwn/uc_masteeer/syscall.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from unicorn import *
from unicorn.x86_const import *
import os.path
import sys
def hook_syscall(uc, user_data):
arg_regs = [UC_X86_REG_RDI, UC_X86_REG_RSI, UC_X86_REG_RDX, UC_X86_REG_R10, UC_X86_REG_R8, UC_X86_REG_R9]
rax = uc.reg_read(UC_X86_REG_RAX)
if rax... | 22.389831 | 109 | 0.60106 |
5f12530a505b8d48179c4677004c880e8082fbc5 | 9,574 | py | Python | pathfinding.py | jkopka/routefinder | 7594278a9662051ddc764de2b9178ba43b789fef | [
"MIT"
] | null | null | null | pathfinding.py | jkopka/routefinder | 7594278a9662051ddc764de2b9178ba43b789fef | [
"MIT"
] | null | null | null | pathfinding.py | jkopka/routefinder | 7594278a9662051ddc764de2b9178ba43b789fef | [
"MIT"
] | null | null | null | import pygame, random
import operator
from collections import OrderedDict
from pygame import Color
from pygame.locals import *
from priorityqueue import PriorityQueue
from navi import Navi
from map_engine import Tilemap
import configparser
# Konfiguration
config = configparser.ConfigParser()
config.read('config.ini')
... | 44.119816 | 107 | 0.549405 |
5f1a1c7dfd30790cc528fdee40a255919c62dabc | 21,576 | py | Python | Python/solver.py | guillaumetousignant/euler3D | 7bdfaae7f6b774232b6fc9f83d40a67ccee9a8ae | [
"MIT"
] | 1 | 2019-02-11T00:45:37.000Z | 2019-02-11T00:45:37.000Z | Python/solver.py | guillaumetousignant/euler3D | 7bdfaae7f6b774232b6fc9f83d40a67ccee9a8ae | [
"MIT"
] | null | null | null | Python/solver.py | guillaumetousignant/euler3D | 7bdfaae7f6b774232b6fc9f83d40a67ccee9a8ae | [
"MIT"
] | null | null | null | import tkinter
from tkinter import *
from tkinter import ttk
from tkinter import messagebox
from tkinter import filedialog
class Solver():
def __init__(self, master):
self.master = master
# SECTION 2.1: CONVERGENCE CRITERIA
title_section_2_1 = ttk.LabelFrame(master, text="2.1 Conv... | 48.160714 | 212 | 0.630886 |
3e3c723196760107149581a162ae6f19eb0d743a | 2,454 | py | Python | research/cv/ESRGAN/src/dataset/traindataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/ESRGAN/src/dataset/traindataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/ESRGAN/src/dataset/traindataset.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.565217 | 109 | 0.651589 |
5f5e97e17086e50b11b0bf8d4ab2287d37fe6a11 | 1,109 | py | Python | Packs/CommonScripts/Scripts/IsInternalHostName/IsInternalHostName.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/IsInternalHostName/IsInternalHostName.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/IsInternalHostName/IsInternalHostName.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 re
def main():
args = demisto.args()
internalregex = args.get('internalRegex')
domainName = args.get('domainName')
hostName = argToList(args.get('hostName'))
human_readable = []
context_entry = []
for element in hostNam... | 29.184211 | 90 | 0.591524 |
844337e16b168615afd34aadf1886c9cd6811b54 | 446 | py | Python | Gundlagen IT-Hardware/Aufgabe2.py | thieleju/studium | f23db7c7d2c30a2f0095cfdd25a4944c39d80d82 | [
"MIT"
] | 2 | 2021-11-16T22:53:25.000Z | 2021-11-17T12:30:49.000Z | Gundlagen IT-Hardware/Aufgabe2.py | thieleju/studium | f23db7c7d2c30a2f0095cfdd25a4944c39d80d82 | [
"MIT"
] | 1 | 2022-02-23T18:56:51.000Z | 2022-02-23T19:09:20.000Z | Gundlagen IT-Hardware/Aufgabe2.py | thieleju/studium | f23db7c7d2c30a2f0095cfdd25a4944c39d80d82 | [
"MIT"
] | 1 | 2022-01-24T16:54:10.000Z | 2022-01-24T16:54:10.000Z |
import explorerhat as hat
def touchHandler(channel, event):
if channel > 4:
return
if event == "press":
hat.light[channel - 1].on()
if event == "release":
hat.light[channel - 1].off()
# hat.touch.pressed(touchHandler)
# hat.touch.released(touchHandler)
while True:
if hat.to... | 19.391304 | 65 | 0.621076 |
4b59a6d9e46918b58227ecf360cc105db0ca1a40 | 371 | py | Python | hostsystem/beaglebone/htu_get.py | DockerComposeFiles/ARM | b0faddb525ad134ff8c589c370d8e61ab030c216 | [
"MIT"
] | null | null | null | hostsystem/beaglebone/htu_get.py | DockerComposeFiles/ARM | b0faddb525ad134ff8c589c370d8e61ab030c216 | [
"MIT"
] | null | null | null | hostsystem/beaglebone/htu_get.py | DockerComposeFiles/ARM | b0faddb525ad134ff8c589c370d8e61ab030c216 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import time
import board
from adafruit_htu21d import HTU21D
# Erstellt ein Sensor Objekt, um den I2C standard bus zu kommunizieren.
i2c = board.I2C() # Nutzt board.SCL und board.SDA
sensor = HTU21D(i2c)
while True:
print("\nTemperature: %0.1f C" % sensor.temperature)
print("Humidity: %0.1f... | 24.733333 | 71 | 0.719677 |
0a02697345deee7073d2467354a7b47cee0b6f8f | 690 | py | Python | DataStructure/U7/Lecture/Tiefensuche.py | qiaw99/Data-Structure | 3b1cdce96d4f35329ccfec29c03de57378ef0552 | [
"MIT"
] | 1 | 2019-10-29T08:21:41.000Z | 2019-10-29T08:21:41.000Z | DataStructure/U7/Lecture/Tiefensuche.py | qiaw99/Data-Structure | 3b1cdce96d4f35329ccfec29c03de57378ef0552 | [
"MIT"
] | null | null | null | DataStructure/U7/Lecture/Tiefensuche.py | qiaw99/Data-Structure | 3b1cdce96d4f35329ccfec29c03de57378ef0552 | [
"MIT"
] | null | null | null | besucht = {}
f = {} # Vorgängerzeiger
TNummer = {}
def initialisiere():
global num,besucht,d
num = 0
for u in V: # alle Knoten
besucht[u] = False
f[u] = None
def T(u): # rekursive Prozedur für die Tiefensuche
global num
num += 1
TNummer[u] = num
besucht[u] = True
for v ... | 18.157895 | 66 | 0.495652 |
6a80268e79454a992e57d48413268ba6ff1216fb | 103,249 | py | Python | test/test_vmap.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 5 | 2018-04-24T13:41:12.000Z | 2019-07-09T07:32:09.000Z | test/test_vmap.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 14 | 2021-10-14T06:58:50.000Z | 2021-12-17T11:51:07.000Z | test/test_vmap.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 7 | 2020-08-31T22:49:59.000Z | 2020-09-15T14:29:07.000Z | # Owner(s): ["module: vmap"]
from torch.testing._internal.common_utils import TestCase, run_tests
import torch
import torch.nn.functional as F
from torch import Tensor, vmap
import functools
import itertools
import warnings
from torch.testing._internal.common_device_type import instantiate_device_type_tests, \
ski... | 41.184284 | 115 | 0.57617 |
6a97793a0cfc1c2dfd940b730a31d631afceaaf6 | 547 | py | Python | Lab3/Task[10-12].py | ValeriyMartsyshyn/HelloPython | badcf85bc54e889eed0286b420e5cabe68da8572 | [
"MIT"
] | null | null | null | Lab3/Task[10-12].py | ValeriyMartsyshyn/HelloPython | badcf85bc54e889eed0286b420e5cabe68da8572 | [
"MIT"
] | null | null | null | Lab3/Task[10-12].py | ValeriyMartsyshyn/HelloPython | badcf85bc54e889eed0286b420e5cabe68da8572 | [
"MIT"
] | null | null | null | #Task 10
dct={'c': 2,
'r': 3,
't': 5,
'x': 21,
'y': 3,
'o': 54}
lst_values=[i for i in dct.values()]
max_value=max(lst_values)
lst_keys=[i for i in dct.keys()]
for i in lst_keys:
if dct[i]==max_value:
print('answer is: ' + i)
#Task 11
lst = list(input("Enter large int:"))
lens = le... | 16.575758 | 37 | 0.54479 |
7cd6c7cd36a5ffaba621e8425a72eb051e02ffaa | 10,618 | py | Python | bindings/python/ensmallen/datasets/wikipedia_automatic_graph_retrieval.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | null | null | null | bindings/python/ensmallen/datasets/wikipedia_automatic_graph_retrieval.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | null | null | null | bindings/python/ensmallen/datasets/wikipedia_automatic_graph_retrieval.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | null | null | null | """Module providing class for automatically retrieving graphs."""
import os
import shutil
from typing import Dict, List, Optional
from dict_hash import sha256
from ensmallen import Graph, edge_list_utils
from .automatic_graph_retrieval import AutomaticallyRetrievedGraph
from environments_utils import is_windows
cla... | 41.155039 | 86 | 0.612545 |
868bd9d8ef30e33106aa36229f9145bc08d16356 | 1,039 | py | Python | tesis.py | gasa1296/Tesis | c8dd9c86c447a1bf31fd5a95336e6c3ed8be2e5f | [
"MIT"
] | 1 | 2019-05-16T18:02:58.000Z | 2019-05-16T18:02:58.000Z | tesis.py | gasa1296/Tesis | c8dd9c86c447a1bf31fd5a95336e6c3ed8be2e5f | [
"MIT"
] | null | null | null | tesis.py | gasa1296/Tesis | c8dd9c86c447a1bf31fd5a95336e6c3ed8be2e5f | [
"MIT"
] | null | null | null | #notas al fondo
import mysql.connector
import cv2
import numpy as np
def new_video_writer():
cap = cv2.VideoCapture("../1.avi")
cap1 = cv2.VideoCapture("../2.avi")
if cap.isOpened() and cap1.isOpened():
while True:
ret, frame = cap.read()
ret1, frame1 = cap1.read()
if ret and ret1:
image = cv2.... | 21.645833 | 69 | 0.662175 |
b93e56761c2219efd4c97e7704d5e03d51e6fc7e | 6,740 | py | Python | 2018/quals/crypto-better-zip/src/enclfsr.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | 2018/quals/crypto-better-zip/src/enclfsr.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | 2018/quals/crypto-better-zip/src/enclfsr.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | #!/usr/bin/python
# Copyright 2018 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 agre... | 23.003413 | 76 | 0.610386 |
e0231a80d864bde6a542a67e7ecab31b0e119ac9 | 1,156 | py | Python | tests/test_fremdkosten.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | tests/test_fremdkosten.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | tests/test_fremdkosten.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | import pytest # type:ignore[import]
from bo4e.bo.fremdkosten import Fremdkosten, FremdkostenSchema
from bo4e.com.fremdkostenblock import Fremdkostenblock
from tests.serialization_helper import assert_serialization_roundtrip # type:ignore[import]
from tests.test_betrag import example_betrag # type:ignore[import]
fro... | 35.030303 | 92 | 0.66955 |
e03c275cb2d39ac390c1d6dcfad5c082ccedaa7c | 2,589 | py | Python | plugins/tff_backend/to/audit.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | null | null | null | plugins/tff_backend/to/audit.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 178 | 2017-08-02T12:58:06.000Z | 2017-12-20T15:01:12.000Z | plugins/tff_backend/to/audit.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 2 | 2018-01-10T10:43:12.000Z | 2018-03-18T10:42:23.000Z | # -*- coding: utf-8 -*-
# Copyright 2017 GIG Technology NV
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 40.453125 | 119 | 0.777907 |
bc41c2d8ffedd00afb9f47588221a3daff19dc60 | 254 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v6_19/comment_feed_communication.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | frappe-bench/apps/erpnext/erpnext/patches/v6_19/comment_feed_communication.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v6_19/comment_feed_communication.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | from __future__ import unicode_literals
import frappe
from frappe.patches.v6_19.comment_feed_communication import update_timeline_doc_for
def execute():
for doctype in ("Customer", "Supplier", "Employee", "Project"):
update_timeline_doc_for(doctype)
| 31.75 | 83 | 0.818898 |
bc610647fdd38aee3581e8ce49fb31578f816a83 | 326 | py | Python | ___Python/Jonas/Python/p10_wetter/m01_yahoo_api.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Jonas/Python/p10_wetter/m01_yahoo_api.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Jonas/Python/p10_wetter/m01_yahoo_api.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | # Wetterdaten über die Yahoo API
from weather import Weather, Unit
weather = Weather(unit=Unit.CELSIUS)
location = weather.lookup_by_location('loehne')
forecasts = location.forecast
for forecast in forecasts:
print(forecast.text)
print(forecast.date)
print(forecast.high)
print(forecast.... | 21.733333 | 48 | 0.723926 |
bc87cad0b183a1a8b1d28905ac56d2a09cee6f41 | 324 | py | Python | rasp/_et/leet.py | alffore/lokroids-python | ac3bbc328140e53ab181034d2e3d5d5d17dc9203 | [
"MIT"
] | null | null | null | rasp/_et/leet.py | alffore/lokroids-python | ac3bbc328140e53ab181034d2e3d5d5d17dc9203 | [
"MIT"
] | null | null | null | rasp/_et/leet.py | alffore/lokroids-python | ac3bbc328140e53ab181034d2e3d5d5d17dc9203 | [
"MIT"
] | null | null | null | import tweepy
consumer_key =''
consumer_secret = ''
access_token = ''
access_token_secret =''
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)
public_tweets = api.home_timeline()
for tweet in public_tweets:
print(tweet.t... | 18 | 57 | 0.777778 |
bca3cf8594349b7169e702dc638c77307ecad18e | 22,650 | py | Python | examples/text_summarization/pointer_summarizer/data.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/text_summarization/pointer_summarizer/data.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/text_summarization/pointer_summarizer/data.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # This file is adapted from https://github.com/abisee/pointer-generator/blob/master/data.py
import glob
import struct
import csv
import queue
import time
import re
import json
import io
from threading import Thread
import numpy as np
import random
from random import shuffle
random.seed(123)
import config
import da... | 42.735849 | 171 | 0.584812 |
bcd6b98d34af57af93291ca17d3b97a70938100f | 30,665 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/hwc_vpc_port.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/hwc_vpc_port.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/hwc_vpc_port.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2019 Huawei
# GNU General Public License v3.0+ (see COPYING or
# https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
#################################################################... | 26.412575 | 82 | 0.57714 |
bcf105d2e6e464bdb336ebe346696b35c61b929f | 5,557 | py | Python | code/bake.py | lcordier/pfse | 27db9329d12bc804fa322446c14c59fe8f814264 | [
"MIT"
] | null | null | null | code/bake.py | lcordier/pfse | 27db9329d12bc804fa322446c14c59fe8f814264 | [
"MIT"
] | null | null | null | code/bake.py | lcordier/pfse | 27db9329d12bc804fa322446c14c59fe8f814264 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
""" Bake a recipe into a symmetric key.
"""
import base64
import hashlib
import io
import textwrap
import requests
ARMOR_TYPES = {
'message': ('-----BEGIN PFSE MESSAGE-----', '-----END PFSE MESSAGE-----'),
'recipe': ('-----BEGIN PFSE RECIPE-----', '-----END PFSE RECIPE-----')
}
ARMOR_L... | 26.461905 | 94 | 0.591866 |
d5faf6f1b0fe2911d37e375c0929d552e1d0f487 | 7,497 | py | Python | python/oneflow/test/graph/test_alexnet_graph.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | python/oneflow/test/graph/test_alexnet_graph.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | python/oneflow/test/graph/test_alexnet_graph.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... | 31.2375 | 87 | 0.636655 |
fc4b1c8b117390d425faf7ba5a5645f32c046497 | 1,311 | py | Python | research/cv/pointnet2/src/callbacks.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | research/cv/pointnet2/src/callbacks.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | research/cv/pointnet2/src/callbacks.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... | 37.457143 | 78 | 0.682685 |
5de6ef49c40e315aad1c89ad94f9da7fb7e61526 | 2,331 | py | Python | CyBRICS/2021/crypto/Signer/signer.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | CyBRICS/2021/crypto/Signer/signer.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | CyBRICS/2021/crypto/Signer/signer.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | from multiprocessing import Process
import os
import random
import socket
from ecdsa import ecdsa as ec
from datetime import datetime
RNG = random.Random()
import hashlib
g = ec.generator_192
N = g.order()
secret = RNG.randrange(1, N)
PUBKEY = ec.Public_key(g, g * secret)
PRIVKEY = ec.Private_key(PUBKEY,... | 31.08 | 86 | 0.507079 |
5d74f6cae5cad3fa4df503b4cc925def66209d14 | 150 | py | Python | model/models.py | sadlll/ablog | d04b532751c297fe9cd25563d08f48e8aaee7f48 | [
"Apache-2.0"
] | 292 | 2015-05-13T07:33:24.000Z | 2022-03-08T07:25:48.000Z | model/models.py | sadlll/ablog | d04b532751c297fe9cd25563d08f48e8aaee7f48 | [
"Apache-2.0"
] | 4 | 2015-07-27T02:56:45.000Z | 2021-07-18T04:47:26.000Z | model/models.py | sadlll/ablog | d04b532751c297fe9cd25563d08f48e8aaee7f48 | [
"Apache-2.0"
] | 58 | 2015-05-13T08:16:35.000Z | 2021-03-05T08:47:16.000Z | # coding:utf-8
from model import db
from model.test import Test
from model.user import User
db.connect()
db.create_tables([Test, User], safe=True)
| 16.666667 | 41 | 0.753333 |
53dbc9eeb91345b39f3beefb018d9ea6722345b9 | 3,267 | py | Python | tests/test_configuration_common.py | suliuzh/transformers | f34372a9ff99f6bc8619ac83dc07f7afe6b92141 | [
"Apache-2.0"
] | 309 | 2020-02-07T23:09:27.000Z | 2022-03-31T08:01:53.000Z | tests/test_configuration_common.py | suliuzh/transformers | f34372a9ff99f6bc8619ac83dc07f7afe6b92141 | [
"Apache-2.0"
] | 93 | 2020-02-22T05:56:28.000Z | 2022-03-27T08:43:38.000Z | tests/test_configuration_common.py | suliuzh/transformers | f34372a9ff99f6bc8619ac83dc07f7afe6b92141 | [
"Apache-2.0"
] | 148 | 2020-02-14T22:16:11.000Z | 2022-03-22T17:08:04.000Z | # coding=utf-8
# Copyright 2019 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 39.841463 | 80 | 0.72513 |
54d13d535d868b158dd800a4148bbfbbf991a165 | 573 | py | Python | source-code/Pseudocode/Cholesky-Zerlegung/cholesky_zerlegung.py | RalfGuder/LaTeX-examples | a1bf9fe422969be1ca4674394ebd2170c07f7693 | [
"MIT"
] | 1,231 | 2015-01-07T04:04:25.000Z | 2022-03-31T17:43:29.000Z | source-code/Pseudocode/Cholesky-Zerlegung/cholesky_zerlegung.py | DoubleL61/LaTeX-examples | cd0d97f85fadb59b7c6e9062b37a8bf7d725ba0c | [
"MIT"
] | 5 | 2015-05-10T13:10:47.000Z | 2021-05-02T21:28:49.000Z | source-code/Pseudocode/Cholesky-Zerlegung/cholesky_zerlegung.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 -*-
def get_l(A):
n = len(A)
L = [[0 for i in range(n)] for j in range(n)]
print(L)
print("")
for k in range(n):
L[k][k] = (A[k][k] - sum([L[k][i]**2 for i in range(k)]))**0.5
for i in range(k+1, n):
L[i][k] = ((A[i][k] - sum([... | 24.913043 | 75 | 0.385689 |
4afde9f5711d0aeb1db326e2ad3d7c99af1c65e3 | 39,463 | py | Python | Sooty/Sooty.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | Sooty/Sooty.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | Sooty/Sooty.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 2 | 2021-04-19T08:28:54.000Z | 2022-01-19T13:23:29.000Z | """
Title: Sooty
Desc: The SOC Analysts all-in-one CLI tool to automate and speed up workflow.
Author: Connor Jackson
Version: 1.3.2
GitHub URL: https://github.com/TheresAFewConors/Sooty
"""
import base64
import hashlib
import html.parser
import re
import json
import time
import o... | 36.915809 | 194 | 0.52586 |
db5881a6c582b245090ddf3e382747b73b1d27bd | 2,416 | py | Python | research/hpc/molecular_dynamics/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/hpc/molecular_dynamics/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/hpc/molecular_dynamics/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 33.09589 | 117 | 0.695778 |
dbcad3b02c94ce1a040df0b0beb729f16cf0c6fe | 872 | py | Python | tests/test_tutorial/test_websockets/test_tutorial003.py | jomue/fastapi | bee35f5ae1fc58e7ab125427ad4287210e99d8b3 | [
"MIT"
] | 53,007 | 2018-12-08T10:05:29.000Z | 2022-03-31T23:30:02.000Z | tests/test_tutorial/test_websockets/test_tutorial003.py | jomue/fastapi | bee35f5ae1fc58e7ab125427ad4287210e99d8b3 | [
"MIT"
] | 4,155 | 2019-01-05T05:07:49.000Z | 2022-03-31T21:25:38.000Z | tests/test_tutorial/test_websockets/test_tutorial003.py | jomue/fastapi | bee35f5ae1fc58e7ab125427ad4287210e99d8b3 | [
"MIT"
] | 4,092 | 2018-12-09T16:21:00.000Z | 2022-03-31T07:59:45.000Z | from fastapi.testclient import TestClient
from docs_src.websockets.tutorial003 import app, html
client = TestClient(app)
def test_get():
response = client.get("/")
assert response.text == html
def test_websocket_handle_disconnection():
with client.websocket_connect("/ws/1234") as connection, client.we... | 31.142857 | 86 | 0.678899 |
37ffba6649b2f0adb88a01644717b70a6e880f67 | 1,774 | py | Python | tokenizer/c/c_tokenizer.py | Submitty/Lichen | a45457ed5e46ef12216bdf6c7051209bc00c4dff | [
"BSD-3-Clause"
] | 5 | 2019-03-04T12:59:53.000Z | 2022-03-25T03:07:00.000Z | tokenizer/c/c_tokenizer.py | Submitty/Lichen | a45457ed5e46ef12216bdf6c7051209bc00c4dff | [
"BSD-3-Clause"
] | 12 | 2018-06-05T16:35:31.000Z | 2022-02-14T21:43:40.000Z | tokenizer/c/c_tokenizer.py | Submitty/Lichen | a45457ed5e46ef12216bdf6c7051209bc00c4dff | [
"BSD-3-Clause"
] | 2 | 2018-06-05T18:00:09.000Z | 2019-03-04T12:59:57.000Z | import clang.cindex
import json
import shutil
import tempfile
import os
import argparse
def parse_args():
parser = argparse.ArgumentParser(description='C Tokenizer')
parser.add_argument('input_file')
parser.add_argument('--ignore_comments', action='store_true')
return parser.parse_args()
def main():... | 29.566667 | 87 | 0.663472 |
72c549c9d020d83c42c101de1c81c7121823864f | 3,534 | py | Python | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/gto_qgis.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/gto_qgis.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/gto_qgis.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 1 | 2019-06-12T11:07:37.000Z | 2019-06-12T11:07:37.000Z | # -*- coding: utf-8 -*-
from PyQt5.QtCore import QSaveFile, QIODevice, QStandardPaths, QFile
from PyQt5.QtWidgets import QMenu
import os.path
from .gto_debug import *
from .mActionGTOgui import run as mActionGTOunlockUI
class gtoQgis(QObject):
def __init__(self, gtomain, parent=None):
super(gtoQgis, se... | 42.578313 | 250 | 0.586022 |
72cbec6acf1c3b217d0b0865f16a83f6a552ea6b | 383 | py | Python | pacman-arch/test/pacman/tests/depconflict100.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/depconflict100.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/depconflict100.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "a package conflicts with itself"
sp1 = pmpkg("pkg1")
sp1.conflicts = ["pkg1"]
self.addpkg2db("sync", sp1);
sp2 = pmpkg("pkg2", "1.0-2")
self.addpkg2db("sync", sp2)
self.args = "-S %s" % " ".join([p.name for p in (sp1, sp2)])
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
self.ad... | 23.9375 | 60 | 0.67624 |
be58520e60202e790794dc182213e8cf45759d6d | 748 | py | Python | chapter01/elasticsearch_study.py | thiagola92/learning-databases-with-python | cf23c34d7fd1ecd36dd3e7b30dc5916eb23eaf1e | [
"MIT"
] | null | null | null | chapter01/elasticsearch_study.py | thiagola92/learning-databases-with-python | cf23c34d7fd1ecd36dd3e7b30dc5916eb23eaf1e | [
"MIT"
] | null | null | null | chapter01/elasticsearch_study.py | thiagola92/learning-databases-with-python | cf23c34d7fd1ecd36dd3e7b30dc5916eb23eaf1e | [
"MIT"
] | null | null | null | # pip install elasticsearch
from elasticsearch import Elasticsearch
# Connect to database
client = Elasticsearch("http://username:password@127.0.0.1:9200")
# Create index
client.indices.create(index="index_name")
# Insert information
client.create(
index="index_name",
id=1,
document={
"sku": 1342... | 26.714286 | 166 | 0.703209 |
a3a7932adcc2ec3aad0875de6ba2413039e5cd76 | 15,584 | py | Python | wz/template_engine/template_sub.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/template_engine/template_sub.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/template_engine/template_sub.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
template_engine/template_sub.py
Last updated: 2021-04-28
Manage the substitution of "special" fields in an odt template.
=+LICENCE=============================
Copyright 2021 Michael Towers
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file ... | 38.289926 | 78 | 0.591889 |
4a92fba93c6469857e90740d4a59fe1ee0208a16 | 166 | py | Python | Python/Itertools/iterables_and_iterators.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | Python/Itertools/iterables_and_iterators.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | Python/Itertools/iterables_and_iterators.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | from itertools import combinations
_ = input()
n = input().strip().split()
k = int(input())
t = list(combinations(n,k))
print(len([s for s in t if 'a' in s])/len(t)) | 23.714286 | 45 | 0.644578 |
60da435d383d2d3275f3c6890c8451db75ba49b8 | 3,277 | py | Python | python/sbtab_objtables2sbtab.py | derHahn/SBtab | da998eacc49f7f29d8168be366eb0c211c3adb5f | [
"MIT"
] | 4 | 2015-02-20T09:20:10.000Z | 2018-02-05T10:54:10.000Z | python/sbtab_objtables2sbtab.py | tlubitz/SBtab | da998eacc49f7f29d8168be366eb0c211c3adb5f | [
"MIT"
] | 80 | 2018-04-13T13:46:24.000Z | 2022-02-16T16:01:46.000Z | python/sbtab_objtables2sbtab.py | tlubitz/SBtab | da998eacc49f7f29d8168be366eb0c211c3adb5f | [
"MIT"
] | 6 | 2018-06-06T19:55:32.000Z | 2021-09-30T15:16:40.000Z | #!/usr/bin/env python
"""
SBtab to ObjTables converter commandline wrapper
===================================
See specification for further information.
"""
try:
from . import SBtab
from . import misc
except:
import SBtab
import misc
import copy
import libsbml
import argparse
class SBtabError(Except... | 30.342593 | 99 | 0.654867 |
71cd85e93427c6b69e545f407fb0abd9a48a38d9 | 650 | py | Python | ais3-pre-exam-2022-writeup/Crypto/Really Strange orAcle/chall/server.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | ais3-pre-exam-2022-writeup/Crypto/Really Strange orAcle/chall/server.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | ais3-pre-exam-2022-writeup/Crypto/Really Strange orAcle/chall/server.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | from Crypto.Util.number import getStrongPrime, getRandomRange, isPrime, bytes_to_long
from pathlib import Path
import json
import os
flag = os.environb[b"FLAG"]
keyfile = Path("./key.json")
if keyfile.is_file():
key = json.loads(keyfile.read_text())
n = key["n"]
e = key["e"]
else:
p = getStrongPrime(1... | 21.666667 | 85 | 0.598462 |
e084ab668c877f836505bffd9eaba1909ecb0d62 | 2,198 | py | Python | Co-Simulation/Sumo/api_server_for_carla_veins_data.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | null | null | null | Co-Simulation/Sumo/api_server_for_carla_veins_data.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | null | null | null | Co-Simulation/Sumo/api_server_for_carla_veins_data.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | null | null | null | # coding: utf-8
import json
from typing import Optional
from fastapi import FastAPI
# ---- Class -----
class DataHandler:
def __init__(self):
self.time = 0
self.sendable_messages = {}
self.recieved_messages = {}
def get_sendable_messages(self, veh_id):
if str(veh_id) not in se... | 28.545455 | 65 | 0.665605 |
e0b2faf6c55b574ac0c82625050dec380ca64138 | 6,146 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/sumolib/scenario/runsdb.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | sumolib/scenario/runsdb.py | KhalidHALBA-GR-NIST/UCEFSUMOV2V | 4eb7ac761303a171718a10e4131184746bded9fd | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | sumolib/scenario/runsdb.py | KhalidHALBA-GR-NIST/UCEFSUMOV2V | 4eb7ac761303a171718a10e4131184746bded9fd | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2012-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.... | 35.94152 | 119 | 0.576798 |
1c9ecb3ad2feacad4096b76e7697c57a08bd2510 | 15,938 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/storage/netapp/netapp_e_ldap.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/storage/netapp/netapp_e_ldap.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/storage/netapp/netapp_e_ldap.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# (c) 2018, NetApp, Inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | 40.762148 | 120 | 0.597817 |
1c3e4e762da2a3ebd8df6777b090dcb9b9a5eb3e | 251 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-004/pg-4.4-grade-calculator.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-004/pg-4.4-grade-calculator.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-004/pg-4.4-grade-calculator.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | marks = input("Plase Enter your Marks: ")
marks = int(marks)
if marks >= 80:
grade = "A+"
elif marks >= 70:
grade = "A"
elif marks >= 60:
grade = "A-"
elif marks >= 50:
grade = "B"
else:
grade = "F"
print("Your Grade is", grade)
| 15.6875 | 41 | 0.553785 |
1c54d372b76569d2a9455df8a64608b5659481da | 6,942 | py | Python | lale/lib/sklearn/rfe.py | vishalbelsare/lale | 654ca29ec0234b478d26724a25df28b28f5c0bc0 | [
"Apache-2.0"
] | 265 | 2019-08-06T14:45:43.000Z | 2022-03-30T23:57:48.000Z | lale/lib/sklearn/rfe.py | vishalbelsare/lale | 654ca29ec0234b478d26724a25df28b28f5c0bc0 | [
"Apache-2.0"
] | 467 | 2019-08-08T02:01:21.000Z | 2022-03-25T16:12:00.000Z | lale/lib/sklearn/rfe.py | vishalbelsare/lale | 654ca29ec0234b478d26724a25df28b28f5c0bc0 | [
"Apache-2.0"
] | 81 | 2019-08-07T19:59:31.000Z | 2022-03-31T09:11:58.000Z | # Copyright 2019 IBM Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 37.322581 | 273 | 0.502161 |
90c96b6480aacbd25f21a77ee2784781e3f269ff | 1,326 | py | Python | SniperDos-master/SniperDos.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | SniperDos-master/SniperDos.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | SniperDos-master/SniperDos.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | import sys
import os
import time
import socket
import random
#Code Time
from datetime import datetime
now = datetime.now()
hour = now.hour
minute = now.minute
day = now.day
month = now.month
year = now.year
##############
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
bytes = random._urandom(1490)
###########... | 23.678571 | 65 | 0.574661 |
90d9bee8dfa23c6a660ee9fd7393178acc28b73a | 3,710 | py | Python | helper/dummy_data.py | wbpascal/statuswebsite | 7a81e530a9176c53abeab0582cb710113101b716 | [
"MIT"
] | 1 | 2021-04-18T20:21:03.000Z | 2021-04-18T20:21:03.000Z | helper/dummy_data.py | wbpascal/statuswebsite | 7a81e530a9176c53abeab0582cb710113101b716 | [
"MIT"
] | null | null | null | helper/dummy_data.py | wbpascal/statuswebsite | 7a81e530a9176c53abeab0582cb710113101b716 | [
"MIT"
] | 1 | 2021-04-18T20:21:08.000Z | 2021-04-18T20:21:08.000Z | import base64
import json
import pymysql.cursors
import requests
from requests.auth import HTTPBasicAuth
import subprocess
icinga_api_secret = "icinga-api"
icinga_api_secret_pass_key = "password"
icinga_api_service = "icinga-api"
icinga_user = "root"
mariadb_secret = "mariadb"
mariadb_secret_pass_key = "mariadb-root-... | 39.052632 | 119 | 0.70593 |
297ec0222c1cb7ac24198db7a10895fbf771e654 | 155 | py | Python | wagtailadditionalicons/apps.py | rivz-a/wagtailcustumsicons | 8f62e03df4f37a6c8fce7b85ffc62d9e495cad39 | [
"BSD-3-Clause"
] | null | null | null | wagtailadditionalicons/apps.py | rivz-a/wagtailcustumsicons | 8f62e03df4f37a6c8fce7b85ffc62d9e495cad39 | [
"BSD-3-Clause"
] | null | null | null | wagtailadditionalicons/apps.py | rivz-a/wagtailcustumsicons | 8f62e03df4f37a6c8fce7b85ffc62d9e495cad39 | [
"BSD-3-Clause"
] | null | null | null | from django.apps import AppConfig
class WagtailadditionalIconsConfig(AppConfig):
name = 'wagtailadditionalicons'
def ready(self):
pass
| 15.5 | 46 | 0.729032 |
31d16ee0ea8af5c019d5b95d0380c51a40c94ac2 | 1,157 | py | Python | 7_DeepLearning-GANs/02_DCGAN/CIFAR10/Cifar_Data.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | 7_DeepLearning-GANs/02_DCGAN/CIFAR10/Cifar_Data.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | 7_DeepLearning-GANs/02_DCGAN/CIFAR10/Cifar_Data.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | from tensorflow.keras.datasets import cifar10
from tensorflow.keras.utils import to_categorical
class CIFAR10:
x_train, y_train, x_test, y_test = None, None, None, None
train_size, test_size = 0, 0
def __init__(self):
(self.x_train, self.y_train), (self.x_test, self.y_test) = cifar10.load_... | 37.322581 | 87 | 0.630078 |
b413e20048b7e470e0de37146bacd4904d67319b | 918 | py | Python | rfvision/models/detectors3d/category_ppf/cfg.py | mvig-robotflow/rfvision | cc662f213dfe5a3e8864a6b5685a668a4436e397 | [
"Apache-2.0"
] | 6 | 2021-09-25T03:53:06.000Z | 2022-02-19T03:25:11.000Z | rfvision/models/detectors3d/category_ppf/cfg.py | mvig-robotflow/rfvision | cc662f213dfe5a3e8864a6b5685a668a4436e397 | [
"Apache-2.0"
] | 1 | 2021-07-21T13:14:54.000Z | 2021-07-21T13:14:54.000Z | rfvision/models/detectors3d/category_ppf/cfg.py | mvig-robotflow/rfvision | cc662f213dfe5a3e8864a6b5685a668a4436e397 | [
"Apache-2.0"
] | 2 | 2021-07-16T03:25:04.000Z | 2021-11-22T06:04:01.000Z | checkpoint_config = dict(interval=100)
log_config = dict(
interval=20,
hooks=[
dict(type='TextLoggerHook'),
dict(type='TensorboardLoggerHook')
])
dist_params = dict(backend='nccl')
log_level = 'INFO'
work_dir = None
load_from = None
resume_from = None
workflow = [('train', 1)]
lr = 1e-3
op... | 24.810811 | 69 | 0.667756 |
c3088048596e5d7a66311be8777cb68f6f8ba97f | 88 | py | Python | tests/etl/test_data_transformations_pipeline.py | emptymalei/haferml | ba193ce1c022c89fb4e88924b7bb7a05b676929a | [
"MIT"
] | 11 | 2021-04-17T18:51:45.000Z | 2021-06-25T19:42:25.000Z | tests/etl/test_data_transformations_pipeline.py | emptymalei/haferml | ba193ce1c022c89fb4e88924b7bb7a05b676929a | [
"MIT"
] | 3 | 2021-04-29T19:24:15.000Z | 2021-05-21T04:30:54.000Z | tests/etl/test_data_transformations_pipeline.py | emptymalei/haferml | ba193ce1c022c89fb4e88924b7bb7a05b676929a | [
"MIT"
] | 2 | 2021-06-10T00:55:43.000Z | 2021-12-30T07:37:07.000Z | from nose import tools as _tools
from haferml.etl.transform.pipeline import Transformer
| 29.333333 | 54 | 0.852273 |
c377eb10edd49a49bfbde9696170986b8cee52f4 | 1,055 | py | Python | showcase4/com/aaron/requestexample.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | showcase4/com/aaron/requestexample.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | 2 | 2021-03-25T22:00:07.000Z | 2022-01-20T15:51:48.000Z | showcase4/com/aaron/requestexample.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | # -*- codiing:utf-8 -*-
"""
request example
pip install requests
requests 模块号称 HTTP for Human
"""
__author__="aaron.qiu"
import requests
from pprint import pprint
def custom_op():
r = requests.get("http://httpbin.org/get")
r = requests.post('http://httpbin.org/post', data={'key': 'value'})
r = requests.pu... | 23.444444 | 71 | 0.64455 |
5ee64fdb54ee8d2abced8f9bba16087c8d2382bc | 13,510 | py | Python | etl/transforms/pipelines/epic2op_transform.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 6 | 2018-06-27T00:09:55.000Z | 2019-03-07T14:06:53.000Z | etl/transforms/pipelines/epic2op_transform.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2021-03-31T18:37:46.000Z | 2021-06-01T21:49:41.000Z | etl/transforms/pipelines/epic2op_transform.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2020-01-24T16:40:49.000Z | 2021-09-30T02:28:55.000Z | import etl.transforms.primitives.df.derive as derive
import etl.transforms.primitives.df.filter_rows as filter_rows
import etl.transforms.primitives.df.format_data as format_data
import etl.transforms.primitives.df.restructure as restructure
import etl.transforms.primitives.df.translate as translate
from etl.mappings.f... | 40.692771 | 114 | 0.603405 |
828768142531ace1c905311bccad948284a129f2 | 599 | py | Python | INBa/2014/MorenkoAA/MorenkoAA_6_14.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2014/MorenkoAA/MorenkoAA_6_14.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2014/MorenkoAA/MorenkoAA_6_14.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 6, Вариант 12
# Создайте игру, в которой компьютер загадывает имя одного из трех официальных талисманов зимних Олимпийских игр 2014 года в Сочи, а игрок должен его угадать.
# Моренко А.А.
# 3.04.2016
import random
tals = random.randrange(3)
tal = ("Леопард","Белый мишка","Зайка")
print ('Отгадайте... | 39.933333 | 159 | 0.721202 |
7dec7324ae6372e9f48eaa5ed8465009bc1d5827 | 3,469 | py | Python | python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-python-containers_set.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-python-containers_set.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-python-containers_set.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
CS231n Convolutional Neural Networks for Visual Recognition
http://cs231n.github.io/
Python Numpy Tutorial
http://cs231n.github.io/python-numpy-tutorial/
 ̄
python_numpy_tutorial-python-containers_set.py
2019-07-03 (Wed)
"""
# Python Numpy Tutorial > Python > Containe... | 22.97351 | 81 | 0.657538 |
c48b7d548cfafe39c1cb8395eba23d83d38cf788 | 230 | py | Python | ___Python/KarPoo/po1_kennenlernen/p09_isbn/m01_genauigkeit.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/KarPoo/po1_kennenlernen/p09_isbn/m01_genauigkeit.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/KarPoo/po1_kennenlernen/p09_isbn/m01_genauigkeit.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | import fractions
import math
potenz = 2 ** 4096
print(potenz)
a = fractions.Fraction(3, 4)
b = fractions.Fraction(1, 8)
c = a + b + 1
print(c)
c = a ** 1024
print(c)
print(float(c))
c = math.sin(c)
print(c) | 12.105263 | 29 | 0.586957 |
48435a3cd9a3f77254f022e1af7897f13e068906 | 2,050 | py | Python | conanfile.py | jackdaimond/MichaQtUtilisLib | a5920048dfebb3a60d8a670f811ec40234a36b51 | [
"MIT"
] | null | null | null | conanfile.py | jackdaimond/MichaQtUtilisLib | a5920048dfebb3a60d8a670f811ec40234a36b51 | [
"MIT"
] | null | null | null | conanfile.py | jackdaimond/MichaQtUtilisLib | a5920048dfebb3a60d8a670f811ec40234a36b51 | [
"MIT"
] | null | null | null | from conans import ConanFile, CMake, tools
class MichaQtUtilisLibConan(ConanFile):
name = "MichaQtUtilisLib"
version = "0.2"
license = "MIT - https://github.com/jackdaimond/MichaQtUtilisLib/blob/master/LICENSE"
author = "Michael Kloske"
url = "https://github.com/jackdaimond/MichaQtUtilisLib.git"
... | 37.272727 | 89 | 0.601463 |
9652a9da804dd7cc49a82be4aa8ce4d7db8b9575 | 2,436 | py | Python | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_05_Kontrollstrukturen/02_kapitel_05_repetitionsfragen.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_05_Kontrollstrukturen/02_kapitel_05_repetitionsfragen.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_05_Kontrollstrukturen/02_kapitel_05_repetitionsfragen.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
###
# File: 02_kapitel_05_repetitionsfragen.py
# Project: Kapitel_05_Kontrollstrukturen
# Created Date: Saturday 23.02.2019, 14:48
# Author: Apop85
# -----
# Last Modified: Saturday 23.02.2019, 22:19
# -----
# Copyright (c) 2019 Apop85
# This software is published under the... | 42 | 146 | 0.67775 |
fb6690d71ff33215f200a992f0a136414fedff86 | 3,664 | py | Python | python_first_step/class/package.py | cartellefo/projet | 23c67e847b415fb47f71e830b89a227fffed109b | [
"MIT"
] | null | null | null | python_first_step/class/package.py | cartellefo/projet | 23c67e847b415fb47f71e830b89a227fffed109b | [
"MIT"
] | null | null | null | python_first_step/class/package.py | cartellefo/projet | 23c67e847b415fb47f71e830b89a227fffed109b | [
"MIT"
] | null | null | null | class EmployeeRe:
'base class for all employees'
empCount = 0
def __init__(self, name,salary,age):
self.name = name
self.salary = salary
self.age = age
EmployeeRe.empCount+= 1
def displaycount(self):
print("Total EmployeeRe %d" % EmployeeRe.empCount)... | 23.487179 | 77 | 0.623362 |
8375d85e03dc7ea408bab3c0d89193e86910b356 | 812 | py | Python | Packs/CommonScripts/Scripts/BetweenHours/BetweenHours_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/BetweenHours/BetweenHours_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/BetweenHours/BetweenHours_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import pytest
from BetweenHours import is_between_hours
TEST_INPUTS = [
('12:00:00', '02:00:00', '21:00:00', True, 'sanity 1'),
('12:00:00', '11:10:00', '12:50:00', True, 'sanity 3'),
('12:00:00', '12:00:00', '12:00:00', True, 'exact same date'),
('12:00:00', '12:00:00', '22:00:00', True, 'same as beg... | 40.6 | 97 | 0.641626 |
f7e437fcef62ebcd8dad748be8f11fa28ed80615 | 2,042 | py | Python | src/rds_postgres_instance/sql_with_rds.py | viclule/api_models_deployment_framework | 7595cf0b4f3e277925b968014102d7561547bcd4 | [
"MIT"
] | null | null | null | src/rds_postgres_instance/sql_with_rds.py | viclule/api_models_deployment_framework | 7595cf0b4f3e277925b968014102d7561547bcd4 | [
"MIT"
] | null | null | null | src/rds_postgres_instance/sql_with_rds.py | viclule/api_models_deployment_framework | 7595cf0b4f3e277925b968014102d7561547bcd4 | [
"MIT"
] | null | null | null | from configparser import ConfigParser
import psycopg2
import os
DB_CONFIG_FILE = os.path.join((os.path.dirname(__file__)), 'database.ini')
def config(filename=DB_CONFIG_FILE, section='postgresql'):
# create a parser and read the configuration
parser = ConfigParser()
parser.read(filename)
# get the s... | 23.744186 | 74 | 0.589618 |
7903af900a11fbfd57e6ba7f79d4ea4d8ce692e5 | 470 | py | Python | nettests/monitor.py | Laighno/evt | 90b94e831aebb62c6ad19ce59c9089e9f51cfd77 | [
"MIT"
] | 1,411 | 2018-04-23T03:57:30.000Z | 2022-02-13T10:34:22.000Z | nettests/monitor.py | Zhang-Zexi/evt | e90fe4dbab4b9512d120c79f33ecc62791e088bd | [
"Apache-2.0"
] | 27 | 2018-06-11T10:34:42.000Z | 2019-07-27T08:50:02.000Z | nettests/monitor.py | Zhang-Zexi/evt | e90fe4dbab4b9512d120c79f33ecc62791e088bd | [
"Apache-2.0"
] | 364 | 2018-06-09T12:11:53.000Z | 2020-12-15T03:26:48.000Z | import docker
if __name__ == '__main__':
client = docker.from_env()
i = -1
name = 'evtd_'
while(True):
try:
i += 1
container = client.containers.get('{}{}'.format(name,i))
print(container.logs(tail=1))
# container.stop()
# container.re... | 26.111111 | 68 | 0.485106 |
5837819130f5fe069d9d5a9ef2913f370986d328 | 1,298 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/ch04_strings/solutions/ex10_anagram.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch04_strings/solutions/ex10_anagram.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch04_strings/solutions/ex10_anagram.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
def is_anagram(str1, str2):
char_counts1 = calc_char_frequencies(str1)
char_counts2 = calc_char_frequencies(str2)
return char_counts1 == char_counts2
def calc_char_frequencies(input):
char_counts = {}
for cu... | 23.6 | 79 | 0.691063 |
3f872205ec3713ae320764879c1e0f9a412b20a5 | 4,255 | py | Python | immunepdf.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | immunepdf.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | immunepdf.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #!/usr/bin/python
import json
import os
import sys
import zlib
from datetime import datetime
import base45
import cbor2
import cv2
import qrcode
from cose.messages import CoseMessage
from PIL import Image
from pyzbar import pyzbar
from reportlab.lib import pagesizes, units
from reportlab.lib.colors import HexColor
fr... | 25.327381 | 86 | 0.525029 |
3fe4494242b45d8c4bbbf1a32b72fb3d39f3fd18 | 1,782 | py | Python | REWORK/src/py/get.py | JueK3y/Instagram-automated-commenting | 7ecc4119d8e9ff0dfba620488018fbd9fce61606 | [
"RSA-MD"
] | 9 | 2021-06-22T14:01:24.000Z | 2022-03-11T08:59:38.000Z | REWORK/src/py/get.py | JueK3y/Instagram-automated-commenting | 7ecc4119d8e9ff0dfba620488018fbd9fce61606 | [
"RSA-MD"
] | 6 | 2021-01-15T09:12:11.000Z | 2021-05-25T08:12:10.000Z | REWORK/src/py/get.py | JueK3y/Instagram-automated-commenting | 7ecc4119d8e9ff0dfba620488018fbd9fce61606 | [
"RSA-MD"
] | 1 | 2021-12-27T18:58:53.000Z | 2021-12-27T18:58:53.000Z | # ┌─────────────────────────────────────────────────────────────────────────┐
# │ Instagram Automated Commenting 2.0 │
# ├─────────────────────────────────────────────────────────────────────────┤
# │ DO NOT indicate used program sections as your own. │
# │ DO N... | 42.428571 | 116 | 0.478676 |
b202c2b356154a9521a9a0b9b6803aab2aac84af | 14,297 | py | Python | main.py | plishing/Agena2 | 56f2f48a3bda4ff3d011d70e630cf6793995a239 | [
"Beerware"
] | 2 | 2016-03-17T09:39:34.000Z | 2016-03-17T11:26:19.000Z | main.py | plishing/Agena2 | 56f2f48a3bda4ff3d011d70e630cf6793995a239 | [
"Beerware"
] | null | null | null | main.py | plishing/Agena2 | 56f2f48a3bda4ff3d011d70e630cf6793995a239 | [
"Beerware"
] | null | null | null | #!/usr/bin/python
#Main sequence file
#import gpst
import functions as sensors
from time import *
import telem as telem
from config import *
import subprocess
import os
import serial
import datetime
import re
initTime = int(time()) #Define start time of script. Used to time things like TX, imaging etc and uptime
camS... | 35.127764 | 189 | 0.50598 |
4da8ca4fe1cb8cf1605128e651cbb20ff01b11a6 | 1,227 | py | Python | backend/app/schemas/base_task.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2021-11-04T17:06:07.000Z | 2021-11-04T17:06:07.000Z | backend/app/schemas/base_task.py | JamesNeumann/learning-by-annotations | c2b5e4b653eeb1c973aa5a7dad35ac8be18cb1ad | [
"MIT"
] | 21 | 2021-11-01T10:13:56.000Z | 2021-12-02T10:02:13.000Z | backend/app/schemas/base_task.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2021-12-16T18:20:55.000Z | 2021-12-16T18:20:55.000Z | from typing import Optional, List
from pydantic import BaseModel
from app.schemas.task import Task
class BaseTaskBase(BaseModel):
name: Optional[str] = None
short_name: Optional[str] = None
enabled: Optional[bool] = False
class BaseTaskCreate(BaseTaskBase):
name: str
slide_id: s... | 22.722222 | 48 | 0.676447 |
421cddeb4c34b2946174fc276f54a5a1a88b17cb | 262 | py | Python | top/clearlight/base/bilibili/fish_c/module/TemperatureConversion.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | 1 | 2020-01-16T09:23:43.000Z | 2020-01-16T09:23:43.000Z | top/clearlight/base/bilibili/fish_c/module/TemperatureConversion.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | null | null | null | top/clearlight/base/bilibili/fish_c/module/TemperatureConversion.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | null | null | null | def c2f(cel):
fah = cel * 1.8 + 32
return fah
def f2c(fah):
cel = (fah - 32) / 1.8
return cel
def test():
print("22摄氏度 = %.2f华氏度" % c2f(22))
print("0华氏度 = %.2f摄氏度" % f2c(0))
if __name__ == '__main__':
test()
# print(__name__)
| 12.47619 | 38 | 0.519084 |
35eac356d3b88068131699aae28014b980caabb8 | 1,104 | py | Python | chord_rec/harmalysis/__init__.py | TianxueHu/ChordSymbolRec | d64a5be4f4914e6f682cb6d4079d7ba8a6fc2eac | [
"Unlicense",
"MIT"
] | null | null | null | chord_rec/harmalysis/__init__.py | TianxueHu/ChordSymbolRec | d64a5be4f4914e6f682cb6d4079d7ba8a6fc2eac | [
"Unlicense",
"MIT"
] | null | null | null | chord_rec/harmalysis/__init__.py | TianxueHu/ChordSymbolRec | d64a5be4f4914e6f682cb6d4079d7ba8a6fc2eac | [
"Unlicense",
"MIT"
] | null | null | null | '''
harmalysis - a language for harmonic analysis and roman numerals
Copyright (C) 2020 Nestor Napoles Lopez
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of t... | 39.428571 | 74 | 0.726449 |
c4495415b2b5f508fde36101022015100895102e | 9,662 | py | Python | Packs/AWS-ACM/Integrations/AWS-ACM/AWS-ACM.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/AWS-ACM/Integrations/AWS-ACM/AWS-ACM.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/AWS-ACM/Integrations/AWS-ACM/AWS-ACM.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 CommonServerUserPython import *
'''IMPORTS'''
import re
import json
from datetime import datetime, date
import urllib3.util
# Disable insecure warnings
urllib3.disable_warnings()
def parse_tag_field(tags_str):
tags = []
regex = re.compile(r... | 35.134545 | 118 | 0.645312 |
67196224ca1666d4a9489ab9baf64c9165299bc4 | 2,725 | py | Python | tests/onegov/core/test_custom_json.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/core/test_custom_json.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/core/test_custom_json.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import pytest
from datetime import datetime
from decimal import Decimal
from onegov.core.custom import json
class Point(object):
def __init__(self, x, y):
self.x = x
self.y = y
def __eq__(self, other):
return self.x == other.x and self.y == other.y
def test_custom_json():
dt ... | 23.695652 | 74 | 0.577248 |
67cb460d65e5acf05a03f67e5ba1dd73a3460cd1 | 158 | py | Python | TimeBomb/test.py | jztech101/Loggy | 1883a09ebbb6c8120cae648aebeb2771e7f39d9b | [
"MIT"
] | null | null | null | TimeBomb/test.py | jztech101/Loggy | 1883a09ebbb6c8120cae648aebeb2771e7f39d9b | [
"MIT"
] | 6 | 2018-02-09T18:39:37.000Z | 2018-08-31T18:40:02.000Z | TimeBomb/test.py | jztech101/Loggy | 1883a09ebbb6c8120cae648aebeb2771e7f39d9b | [
"MIT"
] | null | null | null |
from supybot.test import *
class TimeBombTestCase(PluginTestCase):
plugins = ('TimeBomb',)
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
| 14.363636 | 56 | 0.734177 |
e1e23e164e34ac841b10b7417e7322750f023fd0 | 3,788 | py | Python | Pythonjunior2020/Woche1/Aufgabe_1_7_2_Zusatz.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | Pythonjunior2020/Woche1/Aufgabe_1_7_2_Zusatz.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | Pythonjunior2020/Woche1/Aufgabe_1_7_2_Zusatz.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | # 1.7.2 Woche 1, Block 7, Aufgabe 2
# Imports
import time
from turtle import *
shape("turtle")
bgcolor("black")
pencolor("white")
fillcolor("white")
#Grundlinien
penup()
goto(0, 200)
pendown()
goto(0, -200)
penup()
goto(-200, 0)
pendown()
goto(200, 0)
#erster Quadrant
penup()
goto(0, 200)
pendown()
goto(10, 0)
penu... | 11.076023 | 35 | 0.622492 |
fbfdf87314838c1f528625b39b48ef20dd19b69c | 485 | py | Python | tarefas-poo/lista-04/jogo_da_velha/model/jogador_humano.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-04/jogo_da_velha/model/jogador_humano.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-04/jogo_da_velha/model/jogador_humano.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | # --------------------------
# UFSC - CTC - INE - INE5663
# Exercício do Jogo da Velha
# --------------------------
# Classe que representa um jogador humano
#
from model.jogador_abstrato import JogadorAbstrato
class JogadorHumano(JogadorAbstrato):
def __init__(self, nome):
'''Toda pessoa posui um nome.
... | 23.095238 | 50 | 0.546392 |
36293473840518e5c4808227380c7a4753232d80 | 1,802 | py | Python | python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-scipy_distance_between_points.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-scipy_distance_between_points.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-scipy_distance_between_points.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
CS231n Convolutional Neural Networks for Visual Recognition
http://cs231n.github.io/
Python Numpy Tutorial
http://cs231n.github.io/python-numpy-tutorial/
Numpy Reference
https://docs.scipy.org/doc/numpy/reference/
SciPy
https://docs.scipy.org/doc/scipy/reference/ind... | 30.033333 | 92 | 0.700333 |
364f474f7d1707092ce7c035a04662407c099ca5 | 6,724 | py | Python | pyhokchew/models/FoochowRomanized.py | MindongLab/PyHokchew | 7d742ab5547d2da8c214bd1ebd80f9b6f963965d | [
"MIT"
] | 3 | 2018-04-05T12:04:08.000Z | 2020-04-30T14:00:58.000Z | python/pyhokchew/models/FoochowRomanized.py | MindongLab/libhokchew | 7e5b2e11377ec57bf9a5bb8bb66be6d99237640c | [
"MIT"
] | 6 | 2020-04-25T05:20:04.000Z | 2021-08-30T09:08:50.000Z | python/pyhokchew/models/FoochowRomanized.py | MindongLab/libhokchew | 7e5b2e11377ec57bf9a5bb8bb66be6d99237640c | [
"MIT"
] | 1 | 2018-04-05T11:52:07.000Z | 2018-04-05T11:52:07.000Z | from ..utils import normalise
# All possible initials of Foochow Romanized
# 所有可能的福州話羅馬字聲母
FR_INITIALS = ['l', 'b', 'g', 'k', 'd',
'p', 't', 'c', 'n', 's',
'' , 'm','ng','ch', 'h']
# All possible finals of Foochow Romanized
# 所有可能的福州話羅馬字韻母
FR_FINALS = {
'ung': ['ŭng', 'ūng', 'óng'... | 40.506024 | 115 | 0.469512 |
181212ae5337e783f199b842086a975f09a5f606 | 1,012 | py | Python | BITs/2014/VOROSHIN_S_I/task_9_7.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/VOROSHIN_S_I/task_9_7.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/VOROSHIN_S_I/task_9_7.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача №9, Вариант 7
#Создайте игру, в которой компьютер выбирает какое-либо слово, а игрок должен его отгадать.
#Компьютер сообщает игроку, сколько букв в слове, и дает пять попыток узнать, есть ли какая-либо
#буква в слове, причем программа может отвечать только "Да" и "Нет". Вслед за тем игрок должен
#попробо... | 28.914286 | 97 | 0.689723 |
18334b58e7a47e60066150532dc46a16200f12c7 | 1,247 | py | Python | Arrays and Strings/MaximumSumSubarray.py | dileeppandey/hello-interview | 78f6cf4e2da4106fd07f4bd86247026396075c69 | [
"MIT"
] | null | null | null | Arrays and Strings/MaximumSumSubarray.py | dileeppandey/hello-interview | 78f6cf4e2da4106fd07f4bd86247026396075c69 | [
"MIT"
] | null | null | null | Arrays and Strings/MaximumSumSubarray.py | dileeppandey/hello-interview | 78f6cf4e2da4106fd07f4bd86247026396075c69 | [
"MIT"
] | 1 | 2020-02-12T16:57:46.000Z | 2020-02-12T16:57:46.000Z | """
Kadane's Algorithm for Maximum Array Subsequence
https://practice.geeksforgeeks.org/problems/kadanes-algorithm/0
"""
from sys import maxsize
def max_subarray(scores):
"""
# Given an array containing both negative and positive integers.
# Find the contiguous sub-array with maximum sum.
# Input: [2,... | 27.711111 | 85 | 0.603047 |
1842d8a5024b255eedb602a5c8121bc4224f421e | 906 | py | Python | codeit/algorithm/trapping_rain.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | codeit/algorithm/trapping_rain.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | codeit/algorithm/trapping_rain.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """
강남역에 엄청난 폭우가 쏟아진다고 가정합시다. 정말 재난 영화에서나 나올 법한 양의 비가 내려서,
고층 건물이 비에 잠길 정도입니다.
그렇게 되었을 때, 건물과 건물 사이에 얼마큼의 빗물이 담길 수 있는지 알고 싶은데요.
그것을 계산해 주는 함수 trapping_rain을 작성해 보려고 합니다.
함수 trapping_rain은 건물 높이 정보를 보관하는 리스트 buildings를 파라미터로 받고,
담기는 빗물의 총량을 리턴해 줍니다.
예를 들어서 파라미터 buildings로 [3, 0, 0, 2, 0, 4]가 들어왔다고 합시다.
그러면 0번 인덱스에 높이... | 27.454545 | 58 | 0.619205 |
a19f5dc738db694c89c21b37ac8f43ea63c7f899 | 6,838 | py | Python | oneflow/python/ops/math_binary_elementwise_ops.py | caishenghang/oneflow | db239cc9f98e551823bf6ce2d4395bd5c339b1c5 | [
"Apache-2.0"
] | 2 | 2021-09-10T00:19:49.000Z | 2021-11-16T11:27:20.000Z | oneflow/python/ops/math_binary_elementwise_ops.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | null | null | null | oneflow/python/ops/math_binary_elementwise_ops.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"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... | 27.461847 | 104 | 0.620942 |
a1f0cb78037aba85b1e3b984074a5c4e4bbb27b4 | 10,468 | py | Python | clang-tools-extra/clangd/quality/CompletionModelCodegen.py | hanzhan1/llvm | efe40bb5c797b102088e3cd2579a0f57ccf93310 | [
"Apache-2.0"
] | null | null | null | clang-tools-extra/clangd/quality/CompletionModelCodegen.py | hanzhan1/llvm | efe40bb5c797b102088e3cd2579a0f57ccf93310 | [
"Apache-2.0"
] | null | null | null | clang-tools-extra/clangd/quality/CompletionModelCodegen.py | hanzhan1/llvm | efe40bb5c797b102088e3cd2579a0f57ccf93310 | [
"Apache-2.0"
] | null | null | null | """Code generator for Code Completion Model Inference.
Tool runs on the Decision Forest model defined in {model} directory.
It generates two files: {output_dir}/{filename}.h and {output_dir}/{filename}.cpp
The generated files defines the Example class named {cpp_class} having all the features as class members.
The gen... | 33.126582 | 109 | 0.632117 |
1a2ba565746a3a329105c909c928d727bc267de9 | 736 | py | Python | setup.py | Pandinosaurus/3d-forge | d631e14a9351911c3e5612c73c1608d97ed547d2 | [
"BSD-3-Clause"
] | 31 | 2015-07-13T15:36:50.000Z | 2022-02-07T21:37:51.000Z | setup.py | Pandinosaurus/3d-forge | d631e14a9351911c3e5612c73c1608d97ed547d2 | [
"BSD-3-Clause"
] | 109 | 2015-04-24T10:03:24.000Z | 2019-04-12T13:34:01.000Z | setup.py | Pandinosaurus/3d-forge | d631e14a9351911c3e5612c73c1608d97ed547d2 | [
"BSD-3-Clause"
] | 16 | 2015-10-03T06:03:22.000Z | 2022-03-31T08:24:37.000Z | # -*- coding: utf-8 -*-
from setuptools import setup
requires = [
'autopep8==1.2.4',
'flake8==3.0.4',
'ipython==4.0.0',
'nose==1.3.7',
'mako==1.1.0',
'awscli==1.7.31',
'boto==2.38',
'psycopg2-binary==2.8.3',
'sqlalchemy==1.3.8',
'geoalche... | 21.647059 | 40 | 0.474185 |
a7f4bc8d624eecfd19768329bd5b89b913b0844d | 252 | py | Python | sakf/utils/md5_encryption.py | spdir/sakf | 9a07c5f90765201a42d524dc6d4554f4ccd3c750 | [
"Apache-2.0"
] | null | null | null | sakf/utils/md5_encryption.py | spdir/sakf | 9a07c5f90765201a42d524dc6d4554f4ccd3c750 | [
"Apache-2.0"
] | null | null | null | sakf/utils/md5_encryption.py | spdir/sakf | 9a07c5f90765201a42d524dc6d4554f4ccd3c750 | [
"Apache-2.0"
] | null | null | null | #-*- coding: utf-8 -*-
import hashlib
def md5_string(string):
"""
对字符串进行MD5加密
:param string: 要进行加密的字符串
:return: 加密后是十六进制字符串
"""
obj = hashlib.md5()
obj.update(string.encode('utf-8'))
encry_string = obj.hexdigest()
return encry_string | 19.384615 | 36 | 0.674603 |
c570806c3d872f69302c27879ca35ce78e0996a2 | 415 | py | Python | books/PythonAutomate/file_organize/os_walk.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonAutomate/file_organize/os_walk.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonAutomate/file_organize/os_walk.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import os
from pathlib import Path
sample = Path.home() / 'Documents' / 'Python Scripts'
print(sample)
for curfolder, subfolders, filenames in os.walk(sample):
print("The current folder is " + curfolder)
for subfolder in subfolders:
print(f" subfolder of {curfolder} : {subfolder}")
fo... | 25.9375 | 59 | 0.655422 |
498b4e52978fe014f4b534b42e6a5e72473e7c08 | 931 | py | Python | EuclideanDistance.py | FrieAT/MD_CompressedWavelet | 82bd10edd611485cd5f0b81da744e07a3b7c98eb | [
"MIT"
] | 2 | 2020-03-28T11:50:45.000Z | 2020-12-08T13:36:26.000Z | EuclideanDistance.py | FrieAT/MD_CompressedWavelet | 82bd10edd611485cd5f0b81da744e07a3b7c98eb | [
"MIT"
] | 2 | 2020-04-20T11:12:59.000Z | 2020-05-11T05:37:36.000Z | EuclideanDistance.py | FrieAT/MD_CompressedWavelet | 82bd10edd611485cd5f0b81da744e07a3b7c98eb | [
"MIT"
] | null | null | null |
from IProcess import IProcess, EDataType
import math
class EuclideanDistance(IProcess):
def __init__(self):
IProcess.__init__(self)
def getType(self):
return EDataType.EuclidDistance
# Assuming imageData is the leaved-one-out element.
# and self.features contains all other elements.
def do(self, imageData... | 26.6 | 122 | 0.709989 |
b8dffd922ac867b76325e2a2b96ff37dce157a63 | 1,895 | py | Python | exercises/de/test_04_04.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/de/test_04_04.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/de/test_04_04.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert (
"for doc in nlp.pipe(TEXTS)" in __solution__
), "Verwendest du nlp.pipe, um die Texte zu verarbeiten?"
assert (
"TRAINING_DATA.append" in __solution__
), "Verwendest du die Methode append, um das Beispiel zu TRAINING_DATA hinzuzufügen?"
assert (
len(TRAIN... | 43.068182 | 152 | 0.618997 |
b8ef46346e2fef59a1aaf21a3444c76ed65f2863 | 2,407 | py | Python | sCRAPing/uib/studprogparser.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2017-12-12T13:58:08.000Z | 2017-12-12T13:58:08.000Z | sCRAPing/uib/studprogparser.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | null | null | null | sCRAPing/uib/studprogparser.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2019-11-03T10:16:35.000Z | 2019-11-03T10:16:35.000Z | from html.parser import HTMLParser
import re
PATTERN_uib_study_data = r'([A-Za-z]+\d+)|(\w+-\w+)'
class StudProgParser(HTMLParser):
liststarted = False
divseen = False
h3aseen = False
result = {}
def handle_starttag(self, tag, attrs):
self.divseen = tag == 'div' or self.divseen
s... | 36.469697 | 115 | 0.540922 |
6255deca032df188d7f08789d75b1b1b4ec2b7fb | 627 | py | Python | INBa/2015/KODZOKOV_M_M/task_7_9.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/KODZOKOV_M_M/task_7_9.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/KODZOKOV_M_M/task_7_9.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Разработайте систему начисления очков для задачи 6, в соответствии с которой игрок получал бы
#большее количество баллов за меньшее количество попыток.
# Кодзоков М.М., 26.05.2016
import random
pigs=("Ниф-ниф","Наф-наф","Нуф-нуф")
choice=random.choice(pigs)
pg=input("Угадайте одного из трех поросят: ")
points=1000
w... | 31.35 | 95 | 0.732057 |
658df239101cd0bb6eca11014adb54ea4d521263 | 247 | py | Python | backend/app/db/base_class.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2022-02-20T12:45:04.000Z | 2022-02-20T12:45:04.000Z | backend/app/db/base_class.py | JamesNeumann/learning-by-annotations | c2b5e4b653eeb1c973aa5a7dad35ac8be18cb1ad | [
"MIT"
] | 21 | 2021-11-01T10:13:56.000Z | 2021-12-02T10:02:13.000Z | backend/app/db/base_class.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2021-12-16T18:20:55.000Z | 2021-12-16T18:20:55.000Z | from typing import Any
from sqlalchemy.orm import as_declarative, declared_attr
@as_declarative()
class Base:
id: Any
__name__: str
@declared_attr
def __tablename__(cls) -> str:
return cls.__name__.lower()
| 17.642857 | 57 | 0.668016 |
a2910cabf3543a28fc509f4869e217e4b3a5b41c | 3,230 | py | Python | Packs/ExpanseV2/Scripts/ExpanseEnrichAttribution/ExpanseEnrichAttribution.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/ExpanseV2/Scripts/ExpanseEnrichAttribution/ExpanseEnrichAttribution.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/ExpanseV2/Scripts/ExpanseEnrichAttribution/ExpanseEnrichAttribution.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 * # noqa # pylint: disable=unused-wildcard-import
from CommonServerUserPython import * # noqa
from typing import Dict, Any, List, Optional
import traceback
''' COMMAND FUNCTION '''
def enrich(current_list: List[Dict[str, Any]], enrich_list: List[Dict[s... | 30.761905 | 98 | 0.599071 |
a2d01b8afd6b9a3ecf14d13b5ea0256419971235 | 9,826 | py | Python | old/rmp.py | YoshimitsuMatsutaIe/hoge_flow_test | 22e2e2ce043a3107bd06449f6f9958641293e414 | [
"MIT"
] | null | null | null | old/rmp.py | YoshimitsuMatsutaIe/hoge_flow_test | 22e2e2ce043a3107bd06449f6f9958641293e414 | [
"MIT"
] | null | null | null | old/rmp.py | YoshimitsuMatsutaIe/hoge_flow_test | 22e2e2ce043a3107bd06449f6f9958641293e414 | [
"MIT"
] | null | null | null | """RMPいろいろ"""
import numpy as np
import math
from math import pi, cos, sin, tan
import rmp_fromGDS_attract_xi_M
## マニピュレータの論文[R1]のやつ
def soft_normal(v, alpha):
"""ソフト正規化関数"""
v_norm = np.linalg.norm(v)
softmax = v_norm + 1 / alpha * np.log(1 + np.exp(-2 * alpha * v_norm))
return v / softmax
def me... | 30.421053 | 193 | 0.539487 |
a2ede6c31afc2172533a25411c6878986fad0e61 | 561 | py | Python | exercises/fr/solution_03_10_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/fr/solution_03_10_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/fr/solution_03_10_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | from spacy.lang.fr import French
from spacy.tokens import Doc
nlp = French()
# Définis la fonction getter
def get_has_number(doc):
# Retourne si un token quelconque du doc renvoie True pour token.like_num
return any(token.like_num for token in doc)
# Déclare l'extension de propriété de Doc "has_number"
# av... | 29.526316 | 77 | 0.768271 |
0c2a244a89be96dd2731472e7b2665325460c11f | 1,824 | py | Python | stocks.py | ucsb-cs48-w19/4pm-stock-trading | c40f44a70b0bf72e5b1033f7e47c50ebd0e52a82 | [
"MIT"
] | 3 | 2019-04-06T15:37:11.000Z | 2021-12-27T08:58:31.000Z | stocks.py | webclinic017/4pm-stock-trading | c40f44a70b0bf72e5b1033f7e47c50ebd0e52a82 | [
"MIT"
] | 22 | 2019-01-16T02:54:16.000Z | 2019-02-27T23:12:14.000Z | stocks.py | webclinic017/4pm-stock-trading | c40f44a70b0bf72e5b1033f7e47c50ebd0e52a82 | [
"MIT"
] | 7 | 2019-01-11T00:45:50.000Z | 2021-11-20T20:26:07.000Z | from flask import Flask, render_template, request
from iexfinance.stocks import Stock
from urllib.request import urlopen
import json
import re
#class Stock: ... | 40.533333 | 204 | 0.294956 |
3baa223f80d204157ad7bafa0f12a05006f1fd36 | 1,172 | py | Python | build/unification/copy_dot_packages.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | build/unification/copy_dot_packages.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | build/unification/copy_dot_packages.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2.7
# 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.
import argparse
import os
import sys
# Copies a .packages file from one location to another, updating relative paths
# in the file i... | 32.555556 | 79 | 0.656997 |
0b86017ecc57a8246a6342ddc80b6c3d4b80714f | 727 | py | Python | courses/process.py | koocieyu/interactive-tutorials | 873851b37f0a13b6218ba1e656d51169010981fe | [
"Apache-2.0"
] | 3 | 2020-06-21T14:50:18.000Z | 2020-07-12T20:56:19.000Z | courses/process.py | koocieyu/interactive-tutorials | 873851b37f0a13b6218ba1e656d51169010981fe | [
"Apache-2.0"
] | 1 | 2022-03-30T16:45:37.000Z | 2022-03-30T16:45:37.000Z | courses/process.py | koocieyu/interactive-tutorials | 873851b37f0a13b6218ba1e656d51169010981fe | [
"Apache-2.0"
] | 1 | 2019-06-29T18:56:29.000Z | 2019-06-29T18:56:29.000Z | import csv
import glob
import json
import re
data = {}
for f in glob.glob("*.csv"):
d = csv.DictReader(open(f))
for l in d:
t = f[:-4]
l = {x[0].lower().replace(" ", "_"): x[1] for x in l.items()}
l["retail_price"] = float(l["retail_price"])
link = re.findall(r'<a href=\"(.*?... | 22.030303 | 75 | 0.526823 |
cc2882dc8ac09b5da7af6f2c8127ac0f016c4659 | 773 | pyde | Python | sketches/neonbaby2/neonbaby2.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/neonbaby2/neonbaby2.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/neonbaby2/neonbaby2.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | from random import randint
def setup():
size(600, 600)
this.surface.setTitle("Neonbaby 2")
strokeWeight(2)
background(51)
def draw():
a = 50
x = randint(10, width - 110)
y = randint(10, height - 110)
l1 = randint(50,100)
l2 = randint(50,100)
stroke(150, 100, 255)
mycolor = ... | 24.935484 | 41 | 0.553687 |
f08bc83f70b7bd69570e5e29e1f7bea323a82955 | 3,580 | py | Python | ie/current_event_ie.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | null | null | null | ie/current_event_ie.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | 2 | 2021-03-31T18:54:16.000Z | 2021-12-13T19:49:08.000Z | ie/current_event_ie.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | null | null | null | from pycorenlp import StanfordCoreNLP
nlp = StanfordCoreNLP('http://localhost:9000')
from datetime import datetime,timedelta
from collections import defaultdict,Counter
from pprint import pprint
from tqdm import tqdm
import re
import pymongo
from pymongo import InsertOne, DeleteMany, ReplaceOne, UpdateOne
from pymong... | 26.917293 | 114 | 0.668994 |
f0b6a6fa4f34e4d6b799f1bebfd5c12a4fb5ec31 | 4,555 | py | Python | history/Others/Python/files/packAppForAllProject.py | hengg/i-know-nothing-about-js | 2dc1af3303a8565dd5599f8803d4454121bfdbec | [
"MIT"
] | 2 | 2020-08-07T15:31:19.000Z | 2021-02-05T16:40:36.000Z | history/Others/Python/files/packAppForAllProject.py | hengg/js-walker | 2dc1af3303a8565dd5599f8803d4454121bfdbec | [
"MIT"
] | 8 | 2020-04-07T00:56:00.000Z | 2020-09-15T02:21:42.000Z | history/Others/Python/files/packAppForAllProject.py | hengg/i-know-nothing-about-js | 2dc1af3303a8565dd5599f8803d4454121bfdbec | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding:utf-8 -*-
__author__ = 'wangliang'
import os
from biplist import *
from os import listdir
from os.path import isdir
projectDic={'大唐热网':['bd','http://121.18.227.250:2001'],
'渠东热网':['hq','http://61.136.109.149:2001'],
'太原热力':['tyyd','http://59.49.96.156:2001'],
... | 33.740741 | 93 | 0.624369 |
acd181069cb8348ce7987c738f9367e19f695a48 | 328 | py | Python | elements/python/5/1/byte_parity.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 11 | 2019-02-08T06:54:34.000Z | 2021-08-07T18:57:39.000Z | elements/python/5/1/byte_parity.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 1 | 2019-05-21T08:14:10.000Z | 2019-05-21T08:14:10.000Z | elements/python/5/1/byte_parity.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | null | null | null | def parity(x):
p = 0
while x:
p ^= x&1
x >>= 1
return p
def main():
print 'uint8_t byte_parity[256] = {'
for byte in range(256):
print '{parity},'.format(parity=parity(byte)),
if (byte + 1) % 16 == 0:
print
print '};'
if __name__ == '__main__':
... | 16.4 | 54 | 0.472561 |
c5eed06be4a413d68fde2f5b82020b1ddcba877e | 1,337 | py | Python | rbac/common/addresser/family_address.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | 75 | 2018-04-06T09:13:34.000Z | 2020-05-18T18:59:47.000Z | rbac/common/addresser/family_address.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | 989 | 2018-04-18T21:01:56.000Z | 2019-10-23T15:37:09.000Z | rbac/common/addresser/family_address.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | 72 | 2018-04-13T18:29:12.000Z | 2020-05-29T06:00:33.000Z | # Copyright 2019 Contributors to Hyperledger Sawtooth
#
# 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 ... | 31.833333 | 81 | 0.667165 |
8b3f817a31892a1670c1569d3506545ce411a5ab | 598 | py | Python | zencad/examples/3.Animation/color.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | zencad/examples/3.Animation/color.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | zencad/examples/3.Animation/color.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
ZenCad API example: Color object animation.
last update: 13.10.2019
"""
from zencad import *
import random
#s = icosahedron(10)
s = dodecahedron(10)
#s = icosahedron(10).fillet(2)
controller = disp(s)
transparent = 0.05
clr = Color(0.5, 0.5, 0.5, transparent)
def animate(wdg):
globa... | 17.588235 | 73 | 0.635452 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.