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
d3c650939f7a18ea742d73d2bc8cc02f25b54eb6
267
py
Python
src/base64demo.py
hacker-school/Kryptografie
de033d435ca5bbb908968596dfa8d12c26317167
[ "CC0-1.0" ]
null
null
null
src/base64demo.py
hacker-school/Kryptografie
de033d435ca5bbb908968596dfa8d12c26317167
[ "CC0-1.0" ]
null
null
null
src/base64demo.py
hacker-school/Kryptografie
de033d435ca5bbb908968596dfa8d12c26317167
[ "CC0-1.0" ]
null
null
null
#!/usr/local/bin/python3 """ Demoprogramm: Base64 Ver- und Entschluesselung HackerSchool 2020 """ from base64 import standard_b64encode, standard_b64decode enc = standard_b64encode("Dies ist eine Base64 Demo.") dec = standard_b64decode(enc) print(enc) print(dec)
17.8
57
0.779026
3124462c580dee8189657e560f516052896facbc
293
py
Python
src/assets/experiences/sortierroboter/welcome.py
TU-Blueberry/bluestberry
fbde8dbcd730fe5c4e69ba15a1208a5c0903aa7d
[ "MIT" ]
1
2022-03-28T17:23:03.000Z
2022-03-28T17:23:03.000Z
src/assets/experiences/sortierroboter/welcome.py
TU-Blueberry/bluestberry
fbde8dbcd730fe5c4e69ba15a1208a5c0903aa7d
[ "MIT" ]
null
null
null
src/assets/experiences/sortierroboter/welcome.py
TU-Blueberry/bluestberry
fbde8dbcd730fe5c4e69ba15a1208a5c0903aa7d
[ "MIT" ]
null
null
null
# Über das Fragezeichen-Symbol in der Aktionsleiste (linker Rand der Website) # können Sie eine kurze Informations-Tour zu dieser Lernplattform starten. # Dieser Code ist mittels des linken Buttons im unteren Bereich des Editors ausführbar. print("Herzlich willkommen bei Project Blueberry")
48.833333
87
0.8157
317ff00e424ecce372306af5c250cf0d3d203348
1,206
py
Python
Packs/Feedsslabusech/Integrations/Feedsslabusech/Feedsslabusech.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/Feedsslabusech/Integrations/Feedsslabusech/Feedsslabusech.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/Feedsslabusech/Integrations/Feedsslabusech/Feedsslabusech.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
from CommonServerPython import * def main(): feed_url_to_config = { 'https://sslbl.abuse.ch/blacklist/sslipblacklist.csv': { 'fieldnames': ['firstseenbysource', 'value', 'port'], 'indicator_type': FeedIndicatorType.IP, 'mapping': { 'firstseenbysource': '...
31.736842
75
0.578773
d2fc1afb368ed534a0bee04b8fb4250877c78105
1,362
py
Python
solutions/im2recipe/src/config.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
1
2021-04-06T06:13:20.000Z
2021-04-06T06:13:20.000Z
solutions/im2recipe/src/config.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
null
null
null
solutions/im2recipe/src/config.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
null
null
null
import os from milvus import * # MILVUS_HOST = '192.168.1.85' # MILVUS_PORT = 19560 MILVUS_HOST = os.getenv("MILVUS_HOST", "127.0.0.1") MILVUS_PORT = os.getenv("MILVUS_PORT", 19530) # BERT_HOST = os.getenv("BERT_HOST", "127.0.0.1") # BERT_PORT = os.getenv("BERT_PORT", 5555) MYSQL_HOST = os.geten...
22.7
87
0.697504
826f00336beab50375b9670b82cd31044fc162e5
1,838
py
Python
Fortgeschrittenenpraktikum/Protokolle/V27_Zeeman-Effekt/Tabellen/Tabellen.py
smjhnits/Praktikum
92c9df3ee7dfa2417f464036d18ac33b70765fdd
[ "MIT" ]
2
2019-03-07T08:55:36.000Z
2019-04-22T18:13:03.000Z
Fortgeschrittenenpraktikum/Protokolle/V27_Zeeman-Effekt/Tabellen/Tabellen.py
smjhnits/Praktikum
92c9df3ee7dfa2417f464036d18ac33b70765fdd
[ "MIT" ]
null
null
null
Fortgeschrittenenpraktikum/Protokolle/V27_Zeeman-Effekt/Tabellen/Tabellen.py
smjhnits/Praktikum
92c9df3ee7dfa2417f464036d18ac33b70765fdd
[ "MIT" ]
2
2017-10-27T13:26:43.000Z
2018-01-13T09:12:24.000Z
import collections import numpy as np import uncertainties import pint from uncertainties import ufloat from uncertainties import ufloat_fromstr from pint import UnitRegistry import string #import latex from uncertainties.unumpy import (nominal_values as noms, std_devs as stds) import uncertainties.unumpy as unp import...
36.76
278
0.584331
f227c135a4e9b76b6cf65d579c38ea85b52484a6
1,368
py
Python
Backend/tests/test_apns.py
olivaresf/AWattPrice
db50930a016a4263638af64704d3233cc27e142b
[ "BSD-3-Clause" ]
8
2020-10-22T14:47:54.000Z
2022-01-23T20:17:51.000Z
v1_backend/tests/test_apns.py
sp4c38/AwattarApp
b914e8042e5cdcb84485d6d45133a00244662bda
[ "BSD-3-Clause" ]
75
2020-11-16T16:13:28.000Z
2022-03-27T09:45:56.000Z
v1_backend/tests/test_apns.py
sp4c38/AwattarApp
b914e8042e5cdcb84485d6d45133a00244662bda
[ "BSD-3-Clause" ]
4
2020-11-10T21:21:08.000Z
2021-10-20T12:35:33.000Z
# -*- coding: utf-8 -*- import pytest from awattprice.apns import validate_token __author__ = "Frank Becker" __copyright__ = "Frank Becker" __license__ = "mit" def test_validate_token(): data = bytes('{"apnsDeviceToken": "ALovelyApnsToken", "regionIdentifier": 0, "vatSelection": 1, ' '"notific...
36.972973
102
0.59576
486032a0f552aeee05a68d32a7c0e2e506a77fee
445
py
Python
___Python/Michael/p02_listen/p02_datenstrukturen/m03_anwendung_woerterbuecher.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Michael/p02_listen/p02_datenstrukturen/m03_anwendung_woerterbuecher.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Michael/p02_listen/p02_datenstrukturen/m03_anwendung_woerterbuecher.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
satz = "Fischers Fritze fischt frische Fische" # 1) Häufigkeit des Buchstabens e # for-Schleife und Zähler anzahl zaehler = 0 for zeichen in satz: if zeichen == "e": zaehler += 1 print(zaehler) # 2) Häufigkeitsverteilung der Buchstaben im satz d = {} for zeichen in satz: if zeichen in d: ...
19.347826
50
0.622472
d2318d45de34855e4a9ff591dcecb08179cd5f28
4,419
py
Python
oneflow/python/eager/blob_register.py
xxg1413/oneflow
f2e3c85a25b8aecfb6c0c0af1737833b1a77e135
[ "Apache-2.0" ]
2
2021-09-10T00:19:49.000Z
2021-11-16T11:27:20.000Z
oneflow/python/eager/blob_register.py
duijiudanggecl/oneflow
d2096ae14cf847509394a3b717021e2bd1d72f62
[ "Apache-2.0" ]
null
null
null
oneflow/python/eager/blob_register.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...
35.352
87
0.708079
fbd069e75ca50649c8adb49681e795ddb7bf269d
3,684
py
Python
module/segmentation_package/interpreter_segm.py
fishial/Object-Detection-Model
4792f65ea785156a8e240d9cdbbc0c9d013ea0bb
[ "CC0-1.0" ]
1
2022-01-03T14:00:17.000Z
2022-01-03T14:00:17.000Z
module/segmentation_package/interpreter_segm.py
fishial/Object-Detection-Model
4792f65ea785156a8e240d9cdbbc0c9d013ea0bb
[ "CC0-1.0" ]
null
null
null
module/segmentation_package/interpreter_segm.py
fishial/Object-Detection-Model
4792f65ea785156a8e240d9cdbbc0c9d013ea0bb
[ "CC0-1.0" ]
1
2021-12-21T09:50:53.000Z
2021-12-21T09:50:53.000Z
import numpy as np import cv2 import time import logging from detectron2.engine import DefaultPredictor from detectron2 import model_zoo from detectron2.config import get_cfg class SegmentationInference: def __init__(self, model_path, device='cpu', config_path="COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yam...
40.483516
118
0.604235
83b65aaae53e29aeacea9ee525cd5dcf929d85e3
2,939
py
Python
src/classifier/lstm/lstm_classifier.py
krangelie/bias-in-german-nlg
9fbaf50fde7d41d64692ae90c41beae61bc78d44
[ "MIT" ]
14
2021-08-24T12:36:37.000Z
2022-03-18T12:14:36.000Z
src/classifier/lstm/lstm_classifier.py
krangelie/bias-in-german-nlg
9fbaf50fde7d41d64692ae90c41beae61bc78d44
[ "MIT" ]
null
null
null
src/classifier/lstm/lstm_classifier.py
krangelie/bias-in-german-nlg
9fbaf50fde7d41d64692ae90c41beae61bc78d44
[ "MIT" ]
1
2021-10-21T20:22:55.000Z
2021-10-21T20:22:55.000Z
import torch import torch.nn as nn from torch import tanh import pytorch_lightning as pl from torch.nn import functional as F from pytorch_lightning.metrics.functional import accuracy, f1 from src.classifier.torch_helpers.regard_classifier import RegardClassifier class RegardLSTM(RegardClassifier): def __init__(...
30.936842
82
0.49949
f77d43b3143a9564a5f16f728e5ac5c97b3d3c74
934
py
Python
frappe-bench/apps/erpnext/erpnext/hotels/report/hotel_room_occupancy/hotel_room_occupancy.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/hotels/report/hotel_room_occupancy/hotel_room_occupancy.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/hotels/report/hotel_room_occupancy/hotel_room_occupancy.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import add_days, date_diff from erpnext.hotels.doctype.hotel_room_reservation.hotel_room_reservation impor...
28.30303
97
0.767666
49e4a7555039f739d89c43991cdd260fa3495f3f
1,858
py
Python
cut_my_file_into_pieces.py
gumaga/-audiotechnik_gruppe_3_finale_abgabe-
b31b5d7db064b09a2f6f97e08b54eff0cd12d091
[ "Unlicense" ]
1
2021-03-12T20:02:23.000Z
2021-03-12T20:02:23.000Z
cut_my_file_into_pieces.py
gumaga/-audiotechnik_gruppe_3_finale_abgabe-
b31b5d7db064b09a2f6f97e08b54eff0cd12d091
[ "Unlicense" ]
null
null
null
cut_my_file_into_pieces.py
gumaga/-audiotechnik_gruppe_3_finale_abgabe-
b31b5d7db064b09a2f6f97e08b54eff0cd12d091
[ "Unlicense" ]
null
null
null
""" Script for cutting wav.-files into 3 second long pieces. Each piece is saved as its own wav.-file. Original files which are to be cut must be stored inside a specific structure of folders. It uses a main folder named 'Dataset_new' with the three subfolders 'Speech', 'Noise' and 'Music'. The cut pieces are stored i...
42.227273
123
0.71098
4d8e2bc7540d970ceabf73ed1a61626643147006
5,039
py
Python
tests/run.py
jecki/DHParser
c6c1bd7db2de85b5997a3640242f4f444532304e
[ "Apache-2.0" ]
2
2020-12-25T19:37:42.000Z
2021-03-26T04:59:12.000Z
tests/run.py
jecki/DHParser
c6c1bd7db2de85b5997a3640242f4f444532304e
[ "Apache-2.0" ]
6
2018-08-07T22:48:52.000Z
2021-10-07T18:38:20.000Z
tests/run.py
jecki/DHParser
c6c1bd7db2de85b5997a3640242f4f444532304e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 """Runs the dhparser test-suite with several installed interpreters""" import concurrent.futures import doctest import os import subprocess import sys import time import threading scriptdir = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(scriptdir, '../')) from DHPa...
34.278912
97
0.579679
c021ecc2d5c0b2c821f71b783191924fa333601c
725
py
Python
0.py
Programmer-RD-AI/IOU
bbab44aa84c0c06341b445bdd9123a52327d91c3
[ "Apache-2.0" ]
null
null
null
0.py
Programmer-RD-AI/IOU
bbab44aa84c0c06341b445bdd9123a52327d91c3
[ "Apache-2.0" ]
null
null
null
0.py
Programmer-RD-AI/IOU
bbab44aa84c0c06341b445bdd9123a52327d91c3
[ "Apache-2.0" ]
null
null
null
def create_iou(self, preds: torch.tensor, targets: torch.tensor) -> float: ious = [] for pred_box, true_box in zip(preds, targets): xA = max(true_box[0], pred_box[0]) yA = max(true_box[1], pred_box[1]) xB = min(true_box[2], pred_box[2]) yB = min(true_box[3...
48.333333
88
0.529655
97e1ebe90fb97b29cce7e51e84a9afd967b75105
578
py
Python
site/public/courses/CS-2.2/Challenges/Solutions/challenge_1/challenge_1.py
KitsuneNoctus/makeschool
5eec1a18146abf70bb78b4ee3d301f6a43c9ede4
[ "MIT" ]
1
2021-08-24T20:22:19.000Z
2021-08-24T20:22:19.000Z
site/public/courses/CS-2.2/Challenges/Solutions/challenge_1/challenge_1.py
KitsuneNoctus/makeschool
5eec1a18146abf70bb78b4ee3d301f6a43c9ede4
[ "MIT" ]
null
null
null
site/public/courses/CS-2.2/Challenges/Solutions/challenge_1/challenge_1.py
KitsuneNoctus/makeschool
5eec1a18146abf70bb78b4ee3d301f6a43c9ede4
[ "MIT" ]
null
null
null
import sys from src.graph_file_reader import read_from_file def main(): # Create the graph filename = sys.argv[1] g = read_from_file(filename) # Print number of vertices, edges print(f"# vertices: {len(g.get_vertices())}") print(f"# edges: {len(g.get_edges())} \n") # Print ver...
22.230769
51
0.598616
3f37dca5c7e2799e3d5733d39421aea6a4bed097
2,409
py
Python
WindowsShellExtensions/Utils/httpclient.py
PeerWasp/PeerWasp
92ec5b3d0eee66599d7c2a350a986205bf9a0be6
[ "MIT" ]
34
2015-04-20T02:45:26.000Z
2020-05-25T10:50:50.000Z
WindowsShellExtensions/Utils/httpclient.py
Hive2Hive/PeerBox
92ec5b3d0eee66599d7c2a350a986205bf9a0be6
[ "MIT" ]
85
2015-01-04T19:58:54.000Z
2015-03-24T18:57:38.000Z
WindowsShellExtensions/Utils/httpclient.py
PeerWasp/PeerWasp
92ec5b3d0eee66599d7c2a350a986205bf9a0be6
[ "MIT" ]
15
2015-07-01T11:11:53.000Z
2022-03-03T14:25:28.000Z
import sys import requests, json # This script can be used to test context menu requests. It simply generates json # messages and sends the request to the server. # Base url -- change port if necessary api_port = 30000 api_url = 'http://localhost:%d' % api_port cmd_url = '' data = '' def request(): global api_...
23.38835
81
0.548775
7a0679a5ad02ebd2c16877f506f8a88668eb19e1
1,329
py
Python
Squal Matrix.py
aertoria/MiscCode
a2e94d0fe0890e6620972f84adcb7976ca9f1408
[ "Apache-2.0" ]
null
null
null
Squal Matrix.py
aertoria/MiscCode
a2e94d0fe0890e6620972f84adcb7976ca9f1408
[ "Apache-2.0" ]
null
null
null
Squal Matrix.py
aertoria/MiscCode
a2e94d0fe0890e6620972f84adcb7976ca9f1408
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python ''' Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area. For example, given the following matrix: 1 0 1 0 0 1 0 1 1 1 1 1 1 1 1 1 0 0 1 0 Return 4. Credits: Special thanks to @Freezen for adding this problem and creating all test cases. '...
17.72
113
0.650113
3644c9deb17fc89447f273906e5f5c957468d389
711
py
Python
pacman-arch/test/pacman/tests/sync023.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/sync023.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/sync023.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-09-26T08:44:40.000Z
2021-09-26T08:44:40.000Z
self.description = "Install a group from a sync db using --needed (testing repo)" lp1 = pmpkg("pkg1", "1.1-1") lp2 = pmpkg("pkg2") lp3 = pmpkg("pkg3") sp1 = pmpkg("pkg1") sp2 = pmpkg("pkg2") sp3 = pmpkg("pkg3") newp1 = pmpkg("pkg1", "1.1-1") for p in lp1, lp2, lp3, sp1, sp2, sp3, newp1: setattr(p, "groups", ["grp"]...
22.935484
81
0.659634
a11fd426bacfd3b4c1796b519b6f760a939526e6
206
py
Python
Source/10_XML_RPC/client.py
rbiotblbk/WBS_T9_2022
533156db88ff2fe676564b0e5d6e84e888ab0916
[ "MIT" ]
1
2022-02-28T09:49:35.000Z
2022-02-28T09:49:35.000Z
Source/10_XML_RPC/client.py
rbiotblbk/WBS_T9_2022
533156db88ff2fe676564b0e5d6e84e888ab0916
[ "MIT" ]
null
null
null
Source/10_XML_RPC/client.py
rbiotblbk/WBS_T9_2022
533156db88ff2fe676564b0e5d6e84e888ab0916
[ "MIT" ]
null
null
null
from xmlrpc.client import ServerProxy # Create the Client with the IP and Port of the Server cli = ServerProxy("http://127.0.0.1:40000") # Call the Remote Function/Procedure print(cli.addieren(50,5))
18.727273
54
0.742718
a1e550850e80550a82955cfa109638e51da9dee4
2,995
py
Python
tests/rbac/common/assertions/common.py
akgunkel/sawtooth-next-directory
a88833033ab30e9091479a38947f04c5e396ca46
[ "Apache-2.0" ]
1
2019-04-14T20:16:59.000Z
2019-04-14T20:16:59.000Z
tests/rbac/common/assertions/common.py
akgunkel/sawtooth-next-directory
a88833033ab30e9091479a38947f04c5e396ca46
[ "Apache-2.0" ]
1
2019-07-08T22:32:43.000Z
2019-07-08T22:32:43.000Z
tests/rbac/common/assertions/common.py
akgunkel/sawtooth-next-directory
a88833033ab30e9091479a38947f04c5e396ca46
[ "Apache-2.0" ]
1
2018-12-07T10:55:08.000Z
2018-12-07T10:55:08.000Z
# Copyright 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 or ag...
36.975309
80
0.650083
9a834a9184f1281e476dcbc4789d44610f20e7bb
474
py
Python
books/PythonCleanCode/ch7_generator/_generate_data.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonCleanCode/ch7_generator/_generate_data.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonCleanCode/ch7_generator/_generate_data.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
"""Helper to generate test data.""" import os from tempfile import gettempdir PURCHASE_FILE = os.path.join(gettempdir(), "purchages.csv") def create_purchases_file(filename, entries=1_000_000): if os.path.exists(PURCHASE_FILE): return with open(filename, "w+") as f: for i in rang...
23.7
60
0.635021
b121c4230394eaf6cd852c442d3ec2695939fa5e
1,701
py
Python
cvToken-main/cv.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
cvToken-main/cv.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
cvToken-main/cv.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 requests as req, re, argparse print(""" _________ _ ___ _________ ______ / ___/ __ \/ |/ / | / / __/ _ \/_ __/ / /__/ /_/ / /| |/ / _// , _/ / / \___/\____/_/|_/ |___/___/_/|_| /_/ Coded By: Latip176 """) parser = argparse.ArgumentParser(description='Tools conver...
41.487805
512
0.654321
b1593cd4ef7d82df230d986bae2932549dcb741a
5,461
py
Python
DatenbankEditWaffeneigenschaft.py
JoergRue/Sephrasto
a4fa3c2c1b095b674a9e71416ca448e3be3de225
[ "MIT" ]
null
null
null
DatenbankEditWaffeneigenschaft.py
JoergRue/Sephrasto
a4fa3c2c1b095b674a9e71416ca448e3be3de225
[ "MIT" ]
null
null
null
DatenbankEditWaffeneigenschaft.py
JoergRue/Sephrasto
a4fa3c2c1b095b674a9e71416ca448e3be3de225
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'DatenbankEditWaffeneigenschaft.ui' # # Created by: PyQt5 UI code generator 5.12.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_waffeneigenschaftDialog(object): def setupU...
54.61
361
0.738693
b17048eb5e552e44543519666b1d98b2c85e3857
326
py
Python
python/en/archive/books/jump2python/j2p-05_6_2-import_modules-random_pop.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/books/jump2python/j2p-05_6_2-import_modules-random_pop.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/books/jump2python/j2p-05_6_2-import_modules-random_pop.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ''' j2p-05_6-import_modules-random_pop.py ''' # random_pop.py import random def random_pop( data ): number = random.randint( 0, len(data)-1 ) return data.pop( number ) if __name__ == "__main__": data = [1,2,3,4,5] while data: print( random_pop(data) ) #5 #4 #2 ...
17.157895
46
0.58589
4991e207849b7e92f36a70f571eaed08e07b120c
2,278
py
Python
books/PythonCleanCode/ch2_pythonic_code/iterables.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonCleanCode/ch2_pythonic_code/iterables.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonCleanCode/ch2_pythonic_code/iterables.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
"""Clean Code in Python - Chapter 2: Pythonic Code > Iterable Objects """ from datetime import date, timedelta class DateRangeIterable: """An iterable that contains its own iterator object.""" def __init__(self, start_date, end_date): self.start_date = start_date self.end_date = end_date ...
27.780488
71
0.632572
02ba7a42787fa28c19b26127bb062712dd3d0add
461
py
Python
challenges/largestNumber/python3/largestNumber.py
jimmynguyen/codefights
f4924fcffdb4ff14930618bb1a781e4e02e9aa09
[ "MIT" ]
5
2020-05-21T03:02:34.000Z
2021-09-06T04:24:26.000Z
challenges/largestNumber/python3/largestNumber.py
jimmynguyen/codefights
f4924fcffdb4ff14930618bb1a781e4e02e9aa09
[ "MIT" ]
6
2019-04-24T03:39:26.000Z
2019-05-03T02:10:59.000Z
challenges/largestNumber/python3/largestNumber.py
jimmynguyen/codefights
f4924fcffdb4ff14930618bb1a781e4e02e9aa09
[ "MIT" ]
1
2021-09-06T04:24:27.000Z
2021-09-06T04:24:27.000Z
def largestNumber(n): return int('9'*n) if __name__ == '__main__': input0 = [2, 1, 7, 4, 3] expectedOutput = [99, 9, 9999999, 9999, 999] assert len(input0) == len(expectedOutput), '# input0 = {}, # expectedOutput = {}'.format(len(input0), len(expectedOutput)) for i, expected in enumerate(expectedOutput): actual...
46.1
123
0.681128
b2a7082295e60f35de898e2676ef81ee09ab76a8
55,135
py
Python
tests/onegov/org/test_views_resources.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/org/test_views_resources.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/org/test_views_resources.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import json import textwrap from datetime import datetime, date import pytest import transaction from freezegun import freeze_time from libres.db.models import Reservation from libres.modules.errors import AffectedReservationError from onegov.form import FormSubmission from onegov.reservation import ResourceCollectio...
30.784478
79
0.657985
a264d94469d4951d3d5b1974159c1cf33d1dbeef
380
py
Python
PINp/2014/KOROTKOVA_D_S/task_2_39.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PINp/2014/KOROTKOVA_D_S/task_2_39.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PINp/2014/KOROTKOVA_D_S/task_2_39.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 2 Вариант 39 # Текст задачи Напишите программу, которая будет выводить на экран наиболее понравившееся вам высказывание, автором которого является Гомер. Не забудьте о том, что автор должен быть упомянут на отдельной строке. # Короткова Д.С. # 05.03.2016 print("Женщину украшает молчание.") print("\t\t\t\t\t\...
38
211
0.760526
ce409655c4a36b11a1ab0899bf71b83a63d63578
243
py
Python
scripts/HelloPython/HelloWorld.py
ProfJust/Ruhr-TurtleBot-Competition-RTC-
5c2425bee331b4d5033757a9425676932d111775
[ "Unlicense", "MIT" ]
null
null
null
scripts/HelloPython/HelloWorld.py
ProfJust/Ruhr-TurtleBot-Competition-RTC-
5c2425bee331b4d5033757a9425676932d111775
[ "Unlicense", "MIT" ]
null
null
null
scripts/HelloPython/HelloWorld.py
ProfJust/Ruhr-TurtleBot-Competition-RTC-
5c2425bee331b4d5033757a9425676932d111775
[ "Unlicense", "MIT" ]
null
null
null
# HelloWorld.py # ----------------------------------- # 6.11.2020 by OJ # ----------------------------------- def main(): print("Hello Python World") myFirstString = "Hallo liebe Studenten" print(myFirstString) main()
20.25
44
0.432099
ce94eb07b711817c12c8ffeb70aa44bfe254617f
1,638
py
Python
tiny_imagenet_data_covert.py
BIGBALLON/Model_Experiment
d96712a01997a2f51cad29d611e60d2567ce1021
[ "MIT" ]
2
2018-11-25T14:05:33.000Z
2019-07-12T03:45:24.000Z
tiny_imagenet_data_covert.py
BIGBALLON/Model_Experiment
d96712a01997a2f51cad29d611e60d2567ce1021
[ "MIT" ]
null
null
null
tiny_imagenet_data_covert.py
BIGBALLON/Model_Experiment
d96712a01997a2f51cad29d611e60d2567ce1021
[ "MIT" ]
null
null
null
#!/usr/bin/env python import numpy as np from PIL import Image import six.moves.cPickle as pickle wnids = list(map(lambda x: x.strip(), open('wnids.txt').readlines())) data = {} data['train'] = {} # data['train']['data'] = np.ndarray(shape=(100000, 3, 64, 64), dtype=np.uint8) data['train']['data'] = np.ndarray(shape=...
44.27027
120
0.60989
0cf18ba655f67c3eafac126a1235d6b8c9a526c7
17,349
py
Python
Packs/SumoLogic_Cloud_SIEM/Integrations/SumoLogicCloudSIEM/SumoLogicCloudSIEM_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/SumoLogic_Cloud_SIEM/Integrations/SumoLogicCloudSIEM/SumoLogicCloudSIEM_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/SumoLogic_Cloud_SIEM/Integrations/SumoLogicCloudSIEM/SumoLogicCloudSIEM_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
"""Integration for Sumo Logic Cloud SIEM - Unit Tests file More information about Unit Tests in Cortex XSOAR: https://xsoar.pan.dev/docs/integrations/unit-testing """ from CommonServerPython import * from CommonServerUserPython import * import json import io from datetime import datetime from datetime import timezo...
35.119433
127
0.700386
651ec21cf050b2d5f3d23f8cc22af5330053555e
995
py
Python
skeleton.py
MedPhyDO/app-skeleton
1161736ccf356c704c6c13b17fa11aca64b17dac
[ "MIT" ]
1
2021-02-25T13:45:24.000Z
2021-02-25T13:45:24.000Z
skeleton.py
MedPhyDO/app-skeleton
1161736ccf356c704c6c13b17fa11aca64b17dac
[ "MIT" ]
null
null
null
skeleton.py
MedPhyDO/app-skeleton
1161736ccf356c704c6c13b17fa11aca64b17dac
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Das Hauptmodul Startet den Webserver """ import sys import argparse from version import __version__ from app import run # ----------------------------------------------------------------------------- if __name__ == '__main__': # Initialisieren des parsers und setzen des Hilfetex...
22.111111
98
0.560804
6853c4745d69e3c5afae4d430b771242d1bf58a7
229
py
Python
src/python/py-accepted/96A.py
cbarnson/UVa
0dd73fae656613e28b5aaf5880c5dad529316270
[ "Unlicense", "MIT" ]
2
2019-09-07T17:00:26.000Z
2020-08-05T02:08:35.000Z
src/python/py-accepted/96A.py
cbarnson/UVa
0dd73fae656613e28b5aaf5880c5dad529316270
[ "Unlicense", "MIT" ]
null
null
null
src/python/py-accepted/96A.py
cbarnson/UVa
0dd73fae656613e28b5aaf5880c5dad529316270
[ "Unlicense", "MIT" ]
null
null
null
#! python # Problem # : 96A # Created on : 2019-01-14 21:37:58 def Main(): s = input() if ('1' * 7 in s or '0' * 7 in s): print('YES') else: print('NO') if __name__ == '__main__': Main()
13.470588
38
0.467249
f0e4c5f77f319f0f1d548187ce52b20c1471605e
7,661
py
Python
skil/experiments.py
pcrete/skil-python
672a1aa9e8af020c960ab9ee280cbb6b194afc3f
[ "Apache-2.0" ]
23
2018-09-19T13:34:27.000Z
2022-02-14T09:49:35.000Z
skil/experiments.py
pcrete/skil-python
672a1aa9e8af020c960ab9ee280cbb6b194afc3f
[ "Apache-2.0" ]
33
2018-10-18T07:58:05.000Z
2019-05-16T08:24:12.000Z
skil/experiments.py
pcrete/skil-python
672a1aa9e8af020c960ab9ee280cbb6b194afc3f
[ "Apache-2.0" ]
11
2018-10-21T18:58:57.000Z
2022-02-14T09:49:36.000Z
import skil_client from skil_client.rest import ApiException as api_exception import uuid import json import yaml import keras import os import sys import shutil from .base import Skil from .workspaces import get_workspace_by_id, WorkSpace from .utils.io import serialize_config, deserialize_config class Experiment: ...
37.553922
98
0.626158
0b0526d888f53f02d22d1ef0d914d3d82a50ca6a
494
py
Python
pacman-arch/test/pacman/tests/sync139.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/sync139.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/sync139.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-09-26T08:44:40.000Z
2021-09-26T08:44:40.000Z
self.description = "Sysupgrade of packages in fnmatch'd IgnoreGroup" sp1 = pmpkg("pkg1", "1.0-2") sp1.groups = ["grp"] sp2 = pmpkg("pkg2", "1.0-2") sp2.groups = ["grp2"] for p in sp1, sp2: self.addpkg2db("sync", p) lp1 = pmpkg("pkg1", "1.0-1") lp2 = pmpkg("pkg2", "1.0-1") for p in lp1, lp2: self.addpkg2db("local"...
20.583333
68
0.647773
505990dca05451965cb913caa9c22dc4ab269267
6,263
py
Python
web/controllers/finance/Finance.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
1
2020-03-24T04:26:34.000Z
2020-03-24T04:26:34.000Z
web/controllers/finance/Finance.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
null
null
null
web/controllers/finance/Finance.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from flask import Blueprint,request,redirect,jsonify from common.libs.Helper import ops_render from common.models.member.Member import Member from common.models.food.Food import Food from common.models.pay.PayOrder import PayOrder from common.models.pay.PayOrderItem import PayOrderItem from appl...
35.788571
128
0.631966
76338596cba69598da9b5d643591d47eb48d305d
291
py
Python
backend/apps/ineedstudent/migrations/0003_merge_20200330_0124.py
n-hackert/match4healthcare
761248c27b49e568c545c643a72eac9a040649d7
[ "MIT" ]
2
2020-03-28T13:56:39.000Z
2020-03-29T10:16:12.000Z
backend/apps/ineedstudent/migrations/0003_merge_20200330_0124.py
n-hackert/match4healthcare
761248c27b49e568c545c643a72eac9a040649d7
[ "MIT" ]
76
2020-03-27T21:53:04.000Z
2020-03-30T20:27:43.000Z
backend/apps/ineedstudent/migrations/0003_merge_20200330_0124.py
n-hackert/match4healthcare
761248c27b49e568c545c643a72eac9a040649d7
[ "MIT" ]
null
null
null
# Generated by Django 3.0.4 on 2020-03-30 01:24 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('ineedstudent', '0002_hospital_max_mails_per_day'), ('ineedstudent', '0002_auto_20200330_0101'), ] operations = [ ]
19.4
60
0.670103
767814271f4831dd52268db45225c0c0028af508
190
py
Python
SoSe-21/Uebung-4/moinwelt.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
1
2022-03-23T09:40:39.000Z
2022-03-23T09:40:39.000Z
SoSe-21/Uebung-4/moinwelt.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
null
null
null
SoSe-21/Uebung-4/moinwelt.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
null
null
null
a = "Hallo" b = "Moin" c = "Welt" d = "!" i = 20 j = 7 if (i % 2 == 0 and i > 5): a = b if (i > j): c = "Erde" if (j > 9 or i > 18): d = "." ausgabe = a print(ausgabe, c, d)
10
26
0.394737
8c25a16b09dd1c9efe41d32aa897905cc1b0eed8
211
py
Python
year_3/databases_sem1/lab3/api/admin.py
honchardev/KPI
f8425681857c02a67127ffb05c0af0563a8473e1
[ "MIT" ]
null
null
null
year_3/databases_sem1/lab3/api/admin.py
honchardev/KPI
f8425681857c02a67127ffb05c0af0563a8473e1
[ "MIT" ]
21
2020-03-24T16:26:04.000Z
2022-02-18T15:56:16.000Z
year_3/databases_sem1/lab3/api/admin.py
honchardev/KPI
f8425681857c02a67127ffb05c0af0563a8473e1
[ "MIT" ]
null
null
null
from django.contrib import admin from api.models import Employee, Payment, Payroll, Project admin.site.register(Payroll) admin.site.register(Employee) admin.site.register(Project) admin.site.register(Payment)
23.444444
58
0.819905
4fc92e38be20308f171cbc5b6c925df17c55278b
2,189
py
Python
v504/python/raumladung.py
chrbeckm/anfaenger-praktikum
51764ff23901de1bc3d16dc935acfdc66bb2b2b7
[ "MIT" ]
2
2019-12-10T10:25:11.000Z
2021-01-26T13:59:40.000Z
v504/python/raumladung.py
chrbeckm/anfaenger-praktikum
51764ff23901de1bc3d16dc935acfdc66bb2b2b7
[ "MIT" ]
null
null
null
v504/python/raumladung.py
chrbeckm/anfaenger-praktikum
51764ff23901de1bc3d16dc935acfdc66bb2b2b7
[ "MIT" ]
1
2020-12-06T21:24:58.000Z
2020-12-06T21:24:58.000Z
import numpy as np import matplotlib.pyplot as plt from uncertainties import ufloat from scipy import optimize import scipy.constants as const import uncertainties.unumpy as unp me = const.electron_mass de = const.epsilon_0 le = const.elementary_charge kbolt = const.Boltzmann a = 0.03 v25, a25 = np.genfromtxt('python...
24.875
104
0.689813
8c6f42cd4dd6fe33a9ee194b44377fa465a59801
624
py
Python
find_diff_in_two_files.py
ligang945/pyMisc
3107c80f7f53ffc797b289ec73d1ef4db80f0b63
[ "MIT" ]
null
null
null
find_diff_in_two_files.py
ligang945/pyMisc
3107c80f7f53ffc797b289ec73d1ef4db80f0b63
[ "MIT" ]
null
null
null
find_diff_in_two_files.py
ligang945/pyMisc
3107c80f7f53ffc797b289ec73d1ef4db80f0b63
[ "MIT" ]
null
null
null
file_a = 'a.txt' file_b = 'b.txt' da = dict() db = dict() with open(file_a, 'r') as fa: for line in fa: da.setdefault(line, False) print('%s parse finish...' % file_a) with open(file_b, 'r') as fb: for line in fb: db.setdefault(line, False) print('%s parse finish...' % file_b) for key in da...
19.5
39
0.5625
a8f7d917f9cb9cdffbef54f54d755d2584eb180e
1,450
py
Python
handler/Book.py
wchming1987/Tumbler
e309771779c8eb44e685adbb691a428d29009e05
[ "Apache-2.0" ]
null
null
null
handler/Book.py
wchming1987/Tumbler
e309771779c8eb44e685adbb691a428d29009e05
[ "Apache-2.0" ]
null
null
null
handler/Book.py
wchming1987/Tumbler
e309771779c8eb44e685adbb691a428d29009e05
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding=utf-8 -*- import json from bson import json_util from tornado_swagger import swagger from handler.GenericApiHandler import GenericApiHandler class BooksHandler(GenericApiHandler): @swagger.operation(nickname='list') def get(self): """ @rtype: L{Book} ...
26.363636
89
0.556552
0f08934a8774bd1ea5f12a03cf4bbce419e0fb8e
1,241
py
Python
elements/python/10/11/tree.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
11
2019-02-08T06:54:34.000Z
2021-08-07T18:57:39.000Z
elements/python/10/11/tree.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
1
2019-05-21T08:14:10.000Z
2019-05-21T08:14:10.000Z
elements/python/10/11/tree.py
mmcloughlin/problems
6095842ffe007a12ec8c2093850515aa4e046616
[ "MIT" ]
null
null
null
class Node(object): left = None content = None right = None parent = None def __init__(self, content): self.content = content def __str__(self): return '({left} {content} {right})'.format( left=self.left, content=self.content, rig...
26.978261
62
0.45689
0f44aa2af976b6857fe5ef8abd8e36e2025966d0
1,601
py
Python
test/test_board.py
ekut-es/autojail
bc16e40e6df55c0a28a3059715851ffa59b14ba8
[ "MIT" ]
6
2020-08-12T08:16:15.000Z
2022-03-05T02:25:53.000Z
test/test_board.py
ekut-es/autojail
bc16e40e6df55c0a28a3059715851ffa59b14ba8
[ "MIT" ]
1
2021-03-30T10:34:51.000Z
2021-06-09T11:24:00.000Z
test/test_board.py
ekut-es/autojail
bc16e40e6df55c0a28a3059715851ffa59b14ba8
[ "MIT" ]
1
2021-11-21T09:30:58.000Z
2021-11-21T09:30:58.000Z
import os.path import yaml from autojail.model import Board test_data_folder = os.path.join(os.path.dirname(__file__), "test_data") def test_board(): test_data = { "name": "test_name", "board": "test_board", "pagesize": 0x1000, "cpuinfo": [], "memory_regions": { ...
28.087719
79
0.633979
7e48225737f236950a5566ee0794026d9d7ab5b0
2,514
py
Python
solutions/ctirg/webserver/src/main.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
1
2021-04-06T06:13:20.000Z
2021-04-06T06:13:20.000Z
solutions/ctirg/webserver/src/main.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
null
null
null
solutions/ctirg/webserver/src/main.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
null
null
null
import os import traceback import logging from service.search import do_search from service.count import do_count from service.delete import do_delete_table from indexer.index import milvus_client from indexer.tools import connect_mysql from common.config import OUT_PATH import time from fastapi import FastAPI from fas...
28.896552
113
0.673827
7eac7accef71443d254817bf23f50c7edf837288
361
py
Python
pynanz/__init__.py
salemileandro/pynanz
5e22f4c4a0914714d1df668d3d0be54c90a8ff6d
[ "MIT" ]
null
null
null
pynanz/__init__.py
salemileandro/pynanz
5e22f4c4a0914714d1df668d3d0be54c90a8ff6d
[ "MIT" ]
null
null
null
pynanz/__init__.py
salemileandro/pynanz
5e22f4c4a0914714d1df668d3d0be54c90a8ff6d
[ "MIT" ]
null
null
null
from .Market import * from .MeanVariance import * from .indicators import * #from .Portfolio import * from .config import Config from .cli import main from .data_retriever.Downloader import Downloader from .download import download _VERSION = 0 _MAJOR_RELEASE = 0 _MINOR_RELEASE = 0 __version__ = "%d.%d.%d" % (_V...
18.05
69
0.761773
bc26868e0181e0f3869a1b3256d97cc803d2806e
224
py
Python
Packs/CommonScripts/Scripts/DT/DT.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/CommonScripts/Scripts/DT/DT.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/CommonScripts/Scripts/DT/DT.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 args = demisto.args() value = args["value"] dt = args["dt"] res = demisto.dt(value, dt) return_results(encode_string_results(res))
22.4
46
0.732143
6997589a72bb4f17e39b9608a02b21b2cd16a896
407
py
Python
IVTp/2014/Shcherbakov_R_A/task_01_22.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
IVTp/2014/Shcherbakov_R_A/task_01_22.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
IVTp/2014/Shcherbakov_R_A/task_01_22.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 1. Вариант 22. # Напишите программу, которая будет сообщать род деятельности и псевдоним под # которым скрывается Михаил Ефимович Фрилянд. После вывода информации # программа должна дожидаться пока пользователь нажмет Enter для выхода. # Щербаков Р.А. # 22.05.2016 input("Михаил Ефримович Фрилянд, более извес...
40.7
130
0.800983
69c71f984551f089439c9fc6191572a817225a8d
2,013
py
Python
scripts/db_management.py
Pandinosaurus/3d-forge
d631e14a9351911c3e5612c73c1608d97ed547d2
[ "BSD-3-Clause" ]
31
2015-07-13T15:36:50.000Z
2022-02-07T21:37:51.000Z
scripts/db_management.py
Pandinosaurus/3d-forge
d631e14a9351911c3e5612c73c1608d97ed547d2
[ "BSD-3-Clause" ]
109
2015-04-24T10:03:24.000Z
2019-04-12T13:34:01.000Z
scripts/db_management.py
Pandinosaurus/3d-forge
d631e14a9351911c3e5612c73c1608d97ed547d2
[ "BSD-3-Clause" ]
16
2015-10-03T06:03:22.000Z
2022-03-31T08:24:37.000Z
# -*- coding: utf-8 -*- import sys import getopt from textwrap import dedent from forge.db import DB from forge.lib.helpers import error def usage(): print(dedent('''\ Usage: venv/bin/python scripts/db_management.py [-c database.cfg|--config=database.cfg] <command>') Commands: ...
27.958333
85
0.554893
69dda630b5d4bb48ac5e7ce4b8da9a251890d6fd
16,174
py
Python
disenn/trainer.py
AmanDaVinci/DiSENN
ca84a8d646ad8e5e3675ffd19165c20933b81ef7
[ "MIT" ]
1
2020-08-28T05:06:36.000Z
2020-08-28T05:06:36.000Z
disenn/trainer.py
AmanDaVinci/DiSENN
ca84a8d646ad8e5e3675ffd19165c20933b81ef7
[ "MIT" ]
null
null
null
disenn/trainer.py
AmanDaVinci/DiSENN
ca84a8d646ad8e5e3675ffd19165c20933b81ef7
[ "MIT" ]
null
null
null
import os import sys import logging from pathlib import Path import matplotlib.pyplot as plt import torch import numpy as np import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from torch.utils.data import DataLoader from torchvision.utils import make_grid from torch.utils.tensorboard imp...
43.951087
138
0.620007
385d6f3d0001b901bd20463bbd07dd0dad293975
425
py
Python
Online-Judges/DimikOJ/Python/15-counting-char.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
3
2021-06-15T01:19:23.000Z
2022-03-16T18:23:53.000Z
Online-Judges/DimikOJ/Python/15-counting-char.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
Online-Judges/DimikOJ/Python/15-counting-char.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
t = int(input()) for i in range(t): text = input() text_sorted_list = sorted(text) text_set = set(text_sorted_list) text_set_list= sorted(list(text_set)) for j in text_set_list: count = 0 if j >= "a" and "z": for k in text_sorted_list: if j == k: ...
25
44
0.484706
387e0b8fa46d08a48368520babeccbdd8a3de269
3,731
py
Python
crm/urls.py
baniasbaabe/happy-qr
bf44ac19306ea6405cc7c9a100e6f83afca125b4
[ "MIT" ]
1
2021-01-23T21:42:10.000Z
2021-01-23T21:42:10.000Z
crm/urls.py
baniasbaabe/happy-qr
bf44ac19306ea6405cc7c9a100e6f83afca125b4
[ "MIT" ]
null
null
null
crm/urls.py
baniasbaabe/happy-qr
bf44ac19306ea6405cc7c9a100e6f83afca125b4
[ "MIT" ]
null
null
null
from django.urls import path, include from django.contrib.auth import views as auth_views from . import views urlpatterns = [ # Startseite-URL------------------------------------------------------------- path('', views.dashboard, name='crm_dashboard'), # Kunden-URLs-----------------------------------------...
81.108696
188
0.690968
3886296628797d2629bdc39e42aa88c0211e55fc
5,090
py
Python
Vid-Bok-main/main.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
Vid-Bok-main/main.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
Vid-Bok-main/main.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-05T18:07:48.000Z
2022-02-24T21:25:07.000Z
# Mau Ngapain boss? # Gw Bingung Buatnya tentunya yg rikod harus bingung juga import sys, os, io, re, time, hashlib try: import progressbar except: os.system("easy_install progressbar2") try: import requests, bs4 except ModuleNotFoundError: os.system("python3 -m pip install -r requirements.txt") exec( open( "....
15.059172
124
0.490177
2a261d8a26c4c34cf1eff9911a846523eb27264a
158
py
Python
backend/main.py
Marcuse7/openschufa
6a44ddca9eda0d2fde7103d4ae76d7e1ac3ee40e
[ "MIT" ]
46
2018-05-16T05:52:29.000Z
2021-12-10T14:52:52.000Z
backend/main.py
algorithmwatch/2018-openschufa
6a44ddca9eda0d2fde7103d4ae76d7e1ac3ee40e
[ "MIT" ]
45
2018-05-10T05:56:44.000Z
2020-09-04T18:41:48.000Z
backend/main.py
algorithmwatch/2018-openschufa
6a44ddca9eda0d2fde7103d4ae76d7e1ac3ee40e
[ "MIT" ]
8
2018-05-16T05:38:46.000Z
2020-06-29T09:00:14.000Z
import pytest from app import create_app app = create_app() @app.cli.command() def test(): """Runs the tests.""" pytest.main(['-s', 'tests.py'])
12.153846
35
0.620253
aa4c982280a2f2184fd74fea15aa2ebc2361cd5a
529
py
Python
nz_django/day1/path_converter_demo/articles/views.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
null
null
null
nz_django/day1/path_converter_demo/articles/views.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
27
2020-02-12T07:55:58.000Z
2022-03-12T00:19:09.000Z
nz_django/day1/path_converter_demo/articles/views.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
2
2020-02-18T01:54:55.000Z
2020-02-21T11:36:28.000Z
from django.http import HttpResponse from django.shortcuts import reverse # Create your views here. def article(request): return HttpResponse('文章首页') def article_list(request,categories): print('categories:%s'%categories) print(reverse('list',kwargs={'categories':categories})) text = '您填写的分类是:%s' % ca...
31.117647
61
0.73535
2deceb8ec16dce503398e053a0ff218e253ddf39
4,526
py
Python
official/nlp/cpm/data_process/make_finetune_mindrecord.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/nlp/cpm/data_process/make_finetune_mindrecord.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/nlp/cpm/data_process/make_finetune_mindrecord.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
36.796748
98
0.602961
934ff0aacb55b715544aa8c8a5aecb40175f4d91
310
py
Python
diversos/dois.py
lcarlin/guppe
a0ee7b85e8687e8fb8243fbb509119a94bc6460f
[ "Apache-2.0" ]
1
2021-12-18T15:29:24.000Z
2021-12-18T15:29:24.000Z
diversos/dois.py
lcarlin/guppe
a0ee7b85e8687e8fb8243fbb509119a94bc6460f
[ "Apache-2.0" ]
null
null
null
diversos/dois.py
lcarlin/guppe
a0ee7b85e8687e8fb8243fbb509119a94bc6460f
[ "Apache-2.0" ]
3
2021-08-23T22:45:20.000Z
2022-02-17T13:17:09.000Z
# -*- coding: utf-8 -*- minha_var = "olá mundo cruél" print (minha_var) X = 5 Y = 5 Z = 5 if X > Y : print ( "O X é Maior Dãrrrr :-> " + str(X)) elif X == Y : print ( "nossa, são iguais :-> " + str(X )) else: print ("O X é menir Y :-> " + str(Y )) x = 1 while x < 10 : print (x) x += 1
16.315789
47
0.477419
faab01fdfbe15b002c95fa9293a964cd1210ae22
579
py
Python
tests/test_immutable.py
suned/pfun
46c460646487abfef897bd9627891f6cf7870774
[ "MIT" ]
126
2019-09-16T15:28:20.000Z
2022-03-20T10:57:53.000Z
tests/test_immutable.py
suned/pfun
46c460646487abfef897bd9627891f6cf7870774
[ "MIT" ]
54
2019-09-30T08:44:01.000Z
2022-03-20T11:10:00.000Z
tests/test_immutable.py
suned/pfun
46c460646487abfef897bd9627891f6cf7870774
[ "MIT" ]
11
2020-01-02T08:32:46.000Z
2022-03-20T11:10:24.000Z
from dataclasses import FrozenInstanceError from typing import Any import pytest from hypothesis import given from pfun import Immutable from pfun.hypothesis_strategies import anything class C(Immutable): a: Any class D(C): a2: Any @given(anything()) def test_is_immutable(a): c = C(a) with pytes...
17.545455
47
0.696028
faf98569910d17039e32a0872f99baa118557849
1,987
py
Python
s-mbf-master/src/Asubs.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
50
2019-03-07T16:33:01.000Z
2022-01-05T11:13:47.000Z
s-mbf-master/src/Asubs.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
3
2019-03-11T08:26:38.000Z
2019-08-08T17:39:42.000Z
s-mbf-master/src/Asubs.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
38
2019-03-28T16:03:38.000Z
2021-04-01T10:40:26.000Z
#!usr/bin/python3.7 #Author: KANG-NEWBIE #Contact: t.me/kang_nuubi #github: github.com/kang-newbie ''' recode? oke, but don't deleted name author ''' try: import requests, sys, os, time, json, hashlib class alike(): def get(self,id,pas,uid): try: global res API_SECRET = '62f8ce9f74b12f84c...
38.960784
560
0.649723
57b59c26d17ce8bbd1f1f08e4976cda6cf58a613
332
py
Python
doc/examples/import_local_module/mod0.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
88
2019-01-08T16:39:08.000Z
2022-02-06T14:19:23.000Z
doc/examples/import_local_module/mod0.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
13
2019-06-20T15:53:10.000Z
2021-02-09T11:03:29.000Z
doc/examples/import_local_module/mod0.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
1
2019-11-05T03:03:14.000Z
2019-11-05T03:03:14.000Z
import numpy as np from transonic import jit, boost from mod1 import func_import @boost class MyClass2: def __init__(self): self.attr0 = self.attr1 = 1 @jit() def myfunc(self, arg): return self.attr1 + self.attr0 + np.abs(arg) + func_import() def check(self): assert self.myf...
18.444444
68
0.635542
aa045604222247675908fff27d0e36aa9e4f24dd
489
py
Python
bds_setup/models.py
littlegwzh/BDS
6233ea429d173f855c3f9d19fea284f53778e828
[ "MIT" ]
null
null
null
bds_setup/models.py
littlegwzh/BDS
6233ea429d173f855c3f9d19fea284f53778e828
[ "MIT" ]
null
null
null
bds_setup/models.py
littlegwzh/BDS
6233ea429d173f855c3f9d19fea284f53778e828
[ "MIT" ]
null
null
null
from django.db import models # Create your models here. class Station(models.Model): floor = models.IntegerField('楼层') area = models.CharField('区域', max_length=5) line = models.CharField('产线', max_length=5) station = models.CharField('工位', max_length=8) order = models.IntegerField('工位顺序') def...
27.166667
50
0.650307
106f031ca292c53b35804bd07eb83bbc564bec6d
5,875
py
Python
app/public/routes.py
uosorio/heroku_face
7d6465e71dba17a15d8edaef520adb2fcd09d91e
[ "Apache-2.0" ]
null
null
null
app/public/routes.py
uosorio/heroku_face
7d6465e71dba17a15d8edaef520adb2fcd09d91e
[ "Apache-2.0" ]
null
null
null
app/public/routes.py
uosorio/heroku_face
7d6465e71dba17a15d8edaef520adb2fcd09d91e
[ "Apache-2.0" ]
null
null
null
""" AUTOR: Juanjo FECHA DE CREACIÓN: 24/05/2019 """ import logging from flask import abort, render_template, redirect, url_for, request, current_app from flask_login import current_user from app.models import Post, Comment from . import public_bp from .forms import CommentForm import os import face_recognition i...
32.821229
158
0.667745
10b2333864b807e4772831c111eb441f6ce1ca69
1,546
py
Python
Roulett.py
FarazMannan/Roulette
490c3aecbfc495d04060e1662d698cbdcd88a330
[ "MIT" ]
null
null
null
Roulett.py
FarazMannan/Roulette
490c3aecbfc495d04060e1662d698cbdcd88a330
[ "MIT" ]
null
null
null
Roulett.py
FarazMannan/Roulette
490c3aecbfc495d04060e1662d698cbdcd88a330
[ "MIT" ]
null
null
null
# random number gen. import random # intro to the game print("") # adding and subrtacting system # bank bank = 500 # asking the player to enter one of 3 color choices (input) keep_gambling = True while keep_gambling == True: color_selected = input("What color would you like to pick? ") color_selected = ...
23.424242
86
0.640362
52ad0cc47ff37f006239fec83466209de07db14a
3,866
py
Python
Veranstaltungen/migrations/0001_initial.py
wmles/scholarium.at
d2356b3e475df772382e035ddcb839fc7dae4305
[ "MIT" ]
1
2017-07-24T10:19:36.000Z
2017-07-24T10:19:36.000Z
Veranstaltungen/migrations/0001_initial.py
wmles/scholarium.at
d2356b3e475df772382e035ddcb839fc7dae4305
[ "MIT" ]
9
2017-07-26T14:16:08.000Z
2022-03-11T23:14:40.000Z
Veranstaltungen/migrations/0001_initial.py
wmles/scholarium.at
d2356b3e475df772382e035ddcb839fc7dae4305
[ "MIT" ]
1
2017-03-07T12:38:23.000Z
2017-03-07T12:38:23.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9.11 on 2017-04-26 20:59 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Crea...
44.436782
144
0.569064
5e33fe9e56d8a3873af96ddb56cad2855199816f
4,927
py
Python
research/cv/GENet_Res50/src/GEBlock.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/GENet_Res50/src/GEBlock.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/GENet_Res50/src/GEBlock.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
36.768657
99
0.51918
eae881e3e4d685538aa02c0aad62338015d8316f
117
py
Python
SoSe-21/Code-Vorlesungen/VL-4/while-schleife.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
1
2022-03-23T09:40:39.000Z
2022-03-23T09:40:39.000Z
SoSe-21/Code-Vorlesungen/VL-4/while-schleife.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
null
null
null
SoSe-21/Code-Vorlesungen/VL-4/while-schleife.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
null
null
null
# while - Schleife schleife = True # while Bedingung: while schleife: print("Hello") schleife = False
8.357143
20
0.641026
dc6c4b2af2ceb09975bb26f0a401cec58436664b
10,441
py
Python
luechenbresse/feed.py
turkishmaid/luechenbresse
2527b19eb2f961cef5ddb62e816b471e5d04847d
[ "MIT" ]
null
null
null
luechenbresse/feed.py
turkishmaid/luechenbresse
2527b19eb2f961cef5ddb62e816b471e5d04847d
[ "MIT" ]
4
2020-05-12T07:26:52.000Z
2020-05-23T12:21:49.000Z
luechenbresse/feed.py
turkishmaid/luechenbresse
2527b19eb2f961cef5ddb62e816b471e5d04847d
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 """ Cares for downloading the feed and the references articles. Created: 09.05.20 """ import json from time import time, mktime, sleep, perf_counter from datetime import datetime, timedelta import random import sqlite3 from pathlib import Path import importlib import logging im...
32.628125
138
0.572455
0db27af5feeeeae45b90b6995ec169df1439e2c9
4,316
py
Python
tests/google/code_jam/2019/wf/board_meeting.py
Loks-/competitions
3bb231ba9dd62447048832f45b09141454a51926
[ "MIT" ]
4
2018-06-05T14:15:52.000Z
2022-02-08T05:14:23.000Z
tests/google/code_jam/2019/wf/board_meeting.py
Loks-/competitions
3bb231ba9dd62447048832f45b09141454a51926
[ "MIT" ]
null
null
null
tests/google/code_jam/2019/wf/board_meeting.py
Loks-/competitions
3bb231ba9dd62447048832f45b09141454a51926
[ "MIT" ]
1
2018-10-21T11:01:35.000Z
2018-10-21T11:01:35.000Z
# Usage: `python testing_tool.py test_number`, where the argument test_number # is either 0 (first test set) or 1 (second test set). # This can also be run as `python3 testing_tool.py test_number`. from __future__ import print_function import collections import sys # Use raw_input in Python2. try: input = raw_inpu...
24.111732
81
0.650602
21a5b9a01c4e00f0e2c5367533eb431b6ea2850b
1,373
py
Python
Budd.py
ponyatov/ST
4aab2004608fe5f85366870c8387451f05451adc
[ "MIT" ]
null
null
null
Budd.py
ponyatov/ST
4aab2004608fe5f85366870c8387451f05451adc
[ "MIT" ]
null
null
null
Budd.py
ponyatov/ST
4aab2004608fe5f85366870c8387451f05451adc
[ "MIT" ]
null
null
null
## @file ## @brief Smalltalk-like guest OS ## @defgroup Budd ## @brief Smalltalk-like guest OS ## @{ import config import os, sys ## core object class Object: def __init__(self, V): self.value = V ## @name dump ## `pytest` callback def test(self): return self.dump(test=True) ## `print` ...
21.453125
61
0.611071
df27cb4ed1e3a74ecb79145f87c38775fc8b069e
601
py
Python
LibMS/libapp/migrations/0003_auto_20210511_2353.py
StephenWayen/LibMS
df6078a8171f77b75f2ad3ac91e9747ef753d2a6
[ "MIT" ]
2
2021-05-31T13:11:50.000Z
2021-06-05T04:37:51.000Z
LibMS/libapp/migrations/0003_auto_20210511_2353.py
StephenWayen/LibMS
df6078a8171f77b75f2ad3ac91e9747ef753d2a6
[ "MIT" ]
null
null
null
LibMS/libapp/migrations/0003_auto_20210511_2353.py
StephenWayen/LibMS
df6078a8171f77b75f2ad3ac91e9747ef753d2a6
[ "MIT" ]
null
null
null
# Generated by Django 3.2 on 2021-05-11 23:53 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('libapp', '0002_auto_20210511_2217'), ] operations = [ migrations.RemoveField( model_name='cip', name='rest', )...
22.259259
71
0.549085
d5327b003c8d050f8de39185904964c6d9b1244d
683
py
Python
Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_07_Sequenzen_Mengen_und_Generatoren/11_chapter_07_repetition_task_04_dance_partner.py
Apop85/Scripts
e71e1c18539e67543e3509c424c7f2d6528da654
[ "MIT" ]
null
null
null
Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_07_Sequenzen_Mengen_und_Generatoren/11_chapter_07_repetition_task_04_dance_partner.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_07_Sequenzen_Mengen_und_Generatoren/11_chapter_07_repetition_task_04_dance_partner.py
Apop85/Scripts
1d8dad316c55e1f1343526eac9e4b3d0909e4873
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding:utf-8 -*- ### # File: 11_chapter_07_repetition_task_04_dance_partner.py # Project: Kapitel_07_Sequenzen_Mengen_und_Generatoren # Created Date: Thursday 07.03.2019, 11:29 # Author: Apop85 # ----- # Last Modified: Thursday 07.03.2019, 11:40 # ----- # Copyright (c) 2019 Apop85 # This so...
27.32
76
0.704246
d5968311d759abeeca2a1082c368da09f7c81df8
442
py
Python
exercises/es/test_03_16_02.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/es/test_03_16_02.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/es/test_03_16_02.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
def test(): assert ( 'with nlp.disable_pipes("tagger", "parser")' in __solution__ or 'with nlp.disable_pipes("parser", "tagger")' in __solution__ ), "¿Estás usando nlp.disable_pipes con los componentes correctos?" __msg__.good( "¡Perfecto! Ahora que has practicado los consejos y tru...
40.181818
93
0.680995
4eec957db65331a2895ac4afa793a7458121d2e0
428
py
Python
moviemon/classes/players.py
42bbichero/MovieMon
4fee28e0449429ffcd3e0a284365a7f3e7c64e3d
[ "MIT" ]
null
null
null
moviemon/classes/players.py
42bbichero/MovieMon
4fee28e0449429ffcd3e0a284365a7f3e7c64e3d
[ "MIT" ]
null
null
null
moviemon/classes/players.py
42bbichero/MovieMon
4fee28e0449429ffcd3e0a284365a7f3e7c64e3d
[ "MIT" ]
1
2019-01-12T10:42:25.000Z
2019-01-12T10:42:25.000Z
class Players: def __init__(self, strength=0, movieballs=0): self.strength = strength self.movieballs = movieballs def get_strength(self): return self.strength def get_movieballs(self): return self.movieballs def strength_up(self): self.strength += 1 def movieballs_up(self): ...
18.608696
47
0.675234
9cc174c82c0fb33927582e85fba5b9a46b406429
493
py
Python
1_Datentypen/07_Ubungsaufgaben/01_Ein_automatisierter_Trick/task.py
DavidStahl97/Python-Grundkurs
6796d19116d2f838b193b106d00bc2e74a8cdcb4
[ "MIT" ]
null
null
null
1_Datentypen/07_Ubungsaufgaben/01_Ein_automatisierter_Trick/task.py
DavidStahl97/Python-Grundkurs
6796d19116d2f838b193b106d00bc2e74a8cdcb4
[ "MIT" ]
null
null
null
1_Datentypen/07_Ubungsaufgaben/01_Ein_automatisierter_Trick/task.py
DavidStahl97/Python-Grundkurs
6796d19116d2f838b193b106d00bc2e74a8cdcb4
[ "MIT" ]
null
null
null
# 1a) number = 6 # TODO: Schreibe die Berechnung in folgende Zeile result = None result = (number * 2 + 10) / 2 print(result) #################################################### # 1b) # TODO: Gebe das Ergebnis der Berechnung in der folgenden Zeile als Ganzzahl aus: print(int(result)) #############################...
23.47619
93
0.539554
1432935931cdd851fa941990e3dcefd7acbb664f
1,279
py
Python
tests/views/test_oauth2_token.py
DanielGrams/gsevp
e94034f7b64de76f38754b56455e83092378261f
[ "MIT" ]
1
2021-06-01T14:49:18.000Z
2021-06-01T14:49:18.000Z
tests/views/test_oauth2_token.py
DanielGrams/gsevp
e94034f7b64de76f38754b56455e83092378261f
[ "MIT" ]
286
2020-12-04T14:13:00.000Z
2022-03-09T19:05:16.000Z
tests/views/test_oauth2_token.py
DanielGrams/gsevpt
a92f71694388e227e65ed1b24446246ee688d00e
[ "MIT" ]
null
null
null
import pytest def test_list(client, seeder, utils): user_id, admin_unit_id = seeder.setup_api_access() utils.login() url = utils.get_url("oauth2_tokens") utils.get_ok(url) @pytest.mark.parametrize("db_error", [True, False]) def test_revoke(client, seeder, utils, app, mocker, db_error): user_id,...
25.58
87
0.690383
14b304795740fc9111f6b1e47e9df3339e4b1af9
145
py
Python
hardware/chip/rtl872xd/hal/hal_test/gpio/ucube.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
4,538
2017-10-20T05:19:03.000Z
2022-03-30T02:29:30.000Z
hardware/chip/rtl872xd/hal/hal_test/gpio/ucube.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
1,088
2017-10-21T07:57:22.000Z
2022-03-31T08:15:49.000Z
hardware/chip/rtl872xd/hal/hal_test/gpio/ucube.py
willianchanlovegithub/AliOS-Things
637c0802cab667b872d3b97a121e18c66f256eab
[ "Apache-2.0" ]
1,860
2017-10-20T05:22:35.000Z
2022-03-27T10:54:14.000Z
src = Split(''' gpio_test.c ''') component = aos_component('gpio_test', src) component.add_cflags('-Wall') component.add_cflags('-Werror')
16.111111
43
0.689655
1adb1b4a42b94f9792a3f98ca1ef6147509ffec1
1,087
py
Python
src/onegov/agency/upgrade.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/agency/upgrade.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/agency/upgrade.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
""" Contains upgrade tasks that are executed when the application is being upgraded on the server. See :class:`onegov.core.upgrade.upgrade_task`. """ from onegov.core.upgrade import upgrade_task from onegov.core.utils import linkify from onegov.org.models import Organisation from onegov.people import Agency @upgrade...
35.064516
74
0.711132
2116396aaecb94d6f8ad7345e1a7d8493fe0a5c9
3,289
py
Python
models/syntaxsql/syntaxsql.py
inyukwo1/qgm_decoder
70e60afec140ec3e2ee04f980a384e1cf28d761c
[ "MIT" ]
null
null
null
models/syntaxsql/syntaxsql.py
inyukwo1/qgm_decoder
70e60afec140ec3e2ee04f980a384e1cf28d761c
[ "MIT" ]
null
null
null
models/syntaxsql/syntaxsql.py
inyukwo1/qgm_decoder
70e60afec140ec3e2ee04f980a384e1cf28d761c
[ "MIT" ]
null
null
null
import torch.nn as nn from models.syntaxsql.modules.agg_predictor import AggPredictor from models.syntaxsql.modules.col_predictor import ColPredictor from models.syntaxsql.modules.desasc_limit_predictor import DesAscLimitPredictor from models.syntaxsql.modules.having_predictor import HavingPredictor from models.syntaxs...
38.694118
122
0.681058
dcdac5e27c64b68b70f4128a885579b132b9564e
1,393
py
Python
src/labtest/models.py
oguzhanakan0/covidlab-server
68ea4e6cd3b1244117ae43275335896b911a9b2a
[ "MIT" ]
null
null
null
src/labtest/models.py
oguzhanakan0/covidlab-server
68ea4e6cd3b1244117ae43275335896b911a9b2a
[ "MIT" ]
1
2022-03-25T05:33:19.000Z
2022-03-25T05:33:19.000Z
src/labtest/models.py
oguzhanakan0/covidlab-server
68ea4e6cd3b1244117ae43275335896b911a9b2a
[ "MIT" ]
null
null
null
from unittest import result from django.db import models from src.enums import AuthSource, Relationship from user.models import User import uuid class Location(models.Model): id = models.UUIDField(default=uuid.uuid4, primary_key=True) name = models.CharField(max_length=40) address = models.CharField(max_l...
35.717949
63
0.725054
d33edad5563e56b57d0821c8f93879b74eeedfb7
8,804
py
Python
software/supervisor/Input_handler.py
ghsecuritylab/project-powerline
6c0ec13bbfc11c3790c506f644db4fe45021440a
[ "MIT" ]
null
null
null
software/supervisor/Input_handler.py
ghsecuritylab/project-powerline
6c0ec13bbfc11c3790c506f644db4fe45021440a
[ "MIT" ]
null
null
null
software/supervisor/Input_handler.py
ghsecuritylab/project-powerline
6c0ec13bbfc11c3790c506f644db4fe45021440a
[ "MIT" ]
1
2020-03-08T01:50:58.000Z
2020-03-08T01:50:58.000Z
# TODO: wird alle 30 minuten vom Main angekickt # imports from database import session, Strings, strings, String1, string1, String2, string2, String3, string3, Panels, panels import time # import quick2wire.i2c as i2c import serial_interface import threading class InputHandler(threading.Thread): def __init__(sel...
42.326923
171
0.613358
1a6269e8d79b18956d01dcf162664766680bfc75
3,412
py
Python
source/pkgsrc/audio/mixxx/patches/patch-build_features.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/audio/mixxx/patches/patch-build_features.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/audio/mixxx/patches/patch-build_features.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-build_features.py,v 1.1 2019/07/08 16:46:32 nia Exp $ - Use pkg-config on BSD too where possible. - Fix the name of the hidapi library. --- build/features.py.orig 2019-04-22 07:50:04.000000000 +0000 +++ build/features.py @@ -83,9 +83,9 @@ class HID(Feature): if not self.enabled(build): ...
46.739726
99
0.609906
1a8f30392cc2e75e7d9ea2b00a9a947c5b9b6c64
674
py
Python
exercises/en/test_01_04.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
2
2020-07-07T01:46:37.000Z
2021-04-20T03:19:43.000Z
exercises/en/test_01_04.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/en/test_01_04.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
def test(): assert ( "if token.like_num" in __solution__ ), "Are you checking the token's like_num attribute?" assert ( 'next_token.text == "%"' in __solution__ ), "Are you checking whether the next token's text is a percent sign?" assert ( next_token.text == "%" ), "Are ...
35.473684
74
0.623145
1ad0cc85a416fd3fea6b3dd6c5e03a5260720441
244
py
Python
cubeFibonacci.py
nirobio/puzzles
fda8c84d8eefd93b40594636fb9b7f0fde02b014
[ "MIT" ]
null
null
null
cubeFibonacci.py
nirobio/puzzles
fda8c84d8eefd93b40594636fb9b7f0fde02b014
[ "MIT" ]
null
null
null
cubeFibonacci.py
nirobio/puzzles
fda8c84d8eefd93b40594636fb9b7f0fde02b014
[ "MIT" ]
null
null
null
def cube(x): return x**3 def fibonacci(n): fib = [0, 1] for i in range(2, n): fib.append(fib[i - 1] + fib[i - 2]) return(fib[0:n]) if __name__ == '__main__': n = int(input()) print(list(map(cube, fibonacci(n))))
17.428571
43
0.532787
20487710b17384dbbbb03bc79c63db5c59fa135a
366
py
Python
Problems/Dynamic Programming/Medium/RoseInShop/test_rose_in_shop.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
1
2021-08-16T14:52:05.000Z
2021-08-16T14:52:05.000Z
Problems/Dynamic Programming/Medium/RoseInShop/test_rose_in_shop.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
Problems/Dynamic Programming/Medium/RoseInShop/test_rose_in_shop.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
from unittest import TestCase from rose_in_shop import rose_smell_increase class Test(TestCase): def test_rose_smell_increase(self): self.assertEqual(rose_smell_increase([1, 2, 5, 3, 4]), 4) self.assertEqual(rose_smell_increase([1, 2, 3, 1, 2, 3, 4, 5]), 5) self.assertEqual(rose_smell_incre...
45.75
87
0.672131
b3d69bdcbeab8becda99dda64a9c7649cdb25feb
267
py
Python
Curso-Em-Video-Python/2Exercicios/008_Conversor_de_Medidas.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso-Em-Video-Python/2Exercicios/008_Conversor_de_Medidas.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso-Em-Video-Python/2Exercicios/008_Conversor_de_Medidas.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
m = float(input('Uma distancia em metros: ')) km = m/1000 hm = m/100 dam = m/10 dm = m*10 cm = m*100 mm = m*1000 print('A medida de {} corresponde :'.format(m)) print(' Km= {}\n hm= {}\n dam= {}\n dm= {:.0f}\n cm= {:.0f}\n mm= {:.0f}'.format(km, hm, dam, dm, cm, mm))
29.666667
106
0.554307
03d3306bf2cea4bd4d16f09b88854dc4538fbf00
593
py
Python
src/python/removeFile.py
coulsonzero/webProject
46ba2456620496f376ed954a6469381b8142e0f6
[ "MIT" ]
null
null
null
src/python/removeFile.py
coulsonzero/webProject
46ba2456620496f376ed954a6469381b8142e0f6
[ "MIT" ]
null
null
null
src/python/removeFile.py
coulsonzero/webProject
46ba2456620496f376ed954a6469381b8142e0f6
[ "MIT" ]
null
null
null
import os def removeFile(f, fp): if f.startswith("._"): # print(fp) os.remove(fp) print("Remove files successfully !") def getAllFileName(path): if not os.path.isdir(path): print("note found 404") for filename in os.listdir(path): filepath = os.path.join(path, f...
25.782609
96
0.623946
20bb3a3db55d69a3c666e9dbc706e8670851f052
1,628
py
Python
scripts/fuzzing/test/host_mock.py
opensource-assist/fuschia
66646c55b3d0b36aae90a4b6706b87f1a6261935
[ "BSD-3-Clause" ]
3
2020-08-02T04:46:18.000Z
2020-08-07T10:10:53.000Z
scripts/fuzzing/test/host_mock.py
opensource-assist/fuschia
66646c55b3d0b36aae90a4b6706b87f1a6261935
[ "BSD-3-Clause" ]
null
null
null
scripts/fuzzing/test/host_mock.py
opensource-assist/fuschia
66646c55b3d0b36aae90a4b6706b87f1a6261935
[ "BSD-3-Clause" ]
1
2020-08-07T10:11:49.000Z
2020-08-07T10:11:49.000Z
#!/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 os import test_env from lib.host import Host from process_mock import MockProcess class MockHost(Host): def __init__(...
36.177778
83
0.616093
20d41f7b286647af116cfc497317f6c1f73aac2e
4,492
py
Python
test/test_npu/test_network_ops/test_ger.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-12-02T03:07:35.000Z
2021-12-02T03:07:35.000Z
test/test_npu/test_network_ops/test_ger.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-11-12T07:23:03.000Z
2021-11-12T08:28:13.000Z
test/test_npu/test_network_ops/test_ger.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.61165
96
0.609528
2fd559b932bf7283905e4ee6d2abdf2e0380ecda
1,393
py
Python
OxoCard/bme280.py
ckuehnel/MicroPython
c57d0df744fe5301e755bd139b6cc56d69c442fd
[ "MIT" ]
1
2021-03-22T18:38:43.000Z
2021-03-22T18:38:43.000Z
OxoCard/bme280.py
ckuehnel/MicroPython
c57d0df744fe5301e755bd139b6cc56d69c442fd
[ "MIT" ]
null
null
null
OxoCard/bme280.py
ckuehnel/MicroPython
c57d0df744fe5301e755bd139b6cc56d69c442fd
[ "MIT" ]
1
2021-02-06T10:07:36.000Z
2021-02-06T10:07:36.000Z
''' File: bme280.py needs: bme280_float.py OxoCard Thermometer reads BME280 sensor and display measured temperature on matrix display 2021-03-27 Claus Kühnel info@ckuehnel.ch ''' from oxocard import * from machine import Pin, I2C, ADC i2c = I2C(scl = Pin(22), sda = Pin(21)) from bme280_float import * from utime imp...
27.86
95
0.673367
4489c9747fb619e4c286c54535a26bfe98719dde
7,474
py
Python
deprecated/benchmark/ps/distribute_ctr/tensorflow/ctr_dnn_local.py
hutuxian/FleetX
843c7aa33f5a14680becf058a3aaf0327eefafd4
[ "Apache-2.0" ]
170
2020-08-12T12:07:01.000Z
2022-03-07T02:38:26.000Z
deprecated/benchmark/ps/distribute_ctr/tensorflow/ctr_dnn_local.py
hutuxian/FleetX
843c7aa33f5a14680becf058a3aaf0327eefafd4
[ "Apache-2.0" ]
195
2020-08-13T03:22:15.000Z
2022-03-30T07:40:25.000Z
deprecated/benchmark/ps/distribute_ctr/tensorflow/ctr_dnn_local.py
hutuxian/FleetX
843c7aa33f5a14680becf058a3aaf0327eefafd4
[ "Apache-2.0" ]
67
2020-08-14T02:07:46.000Z
2022-03-28T10:05:33.000Z
#!/usr/bin/env python # coding=utf-8 # from __future__ import absolute_import # from __future__ import division # from __future__ import print_function import time import sys import os import glob import json from datetime import date, timedelta import tensorflow as tf #################### CMD Arguments ###########...
42.954023
165
0.622826
a6153251aca58394a9b088508421400a64945ec1
314
py
Python
PYTHON/Itertools/iterables_and_iterators.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
PYTHON/Itertools/iterables_and_iterators.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
PYTHON/Itertools/iterables_and_iterators.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from itertools import permutations if __name__ == '__main__': N = int(input()) list_N = input().split() K = int(input()) c1, c2 = 0, 0 for c in permutations(list_N, K): c1 += 1 if 'a' in c: c2 += 1 res = '%.4f' % (c2 / c1) print(res)
20.933333
37
0.506369
5b64209f367bcb2b688f2bbff6ed9200092c4375
1,292
py
Python
Boot2Root/hackthebox/Calamity/files/scr.py
Kan1shka9/CTFs
33ab33e094ea8b52714d5dad020c25730e91c0b0
[ "MIT" ]
21
2016-02-06T14:30:01.000Z
2020-09-11T05:39:17.000Z
Boot2Root/hackthebox/Calamity/files/scr.py
Kan1shka9/CTFs
33ab33e094ea8b52714d5dad020c25730e91c0b0
[ "MIT" ]
null
null
null
Boot2Root/hackthebox/Calamity/files/scr.py
Kan1shka9/CTFs
33ab33e094ea8b52714d5dad020c25730e91c0b0
[ "MIT" ]
7
2017-02-02T16:27:02.000Z
2021-04-30T17:14:53.000Z
#!/usr/bin/python import os import time from datetime import datetime while True: time.sleep(2) x=os.popen("netstat -pantu").read() os.system("chmod 333 /tmp"); for line in x.split('\n'): name="fafafafa" pid="fafafafa" try: ...
34.918919
184
0.418731
f38de4416bb21fda0ea416622efc329b0dfb58e5
256
py
Python
Python/M01_ProgrammingBasics/L06_NestedLoops/Exercises/Solutions/P01_NumberPyramid.py
todorkrastev/softuni-software-engineering
cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84
[ "MIT" ]
null
null
null
Python/M01_ProgrammingBasics/L06_NestedLoops/Exercises/Solutions/P01_NumberPyramid.py
todorkrastev/softuni-software-engineering
cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84
[ "MIT" ]
null
null
null
Python/M01_ProgrammingBasics/L06_NestedLoops/Exercises/Solutions/P01_NumberPyramid.py
todorkrastev/softuni-software-engineering
cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84
[ "MIT" ]
1
2022-02-23T13:03:14.000Z
2022-02-23T13:03:14.000Z
n = int(input()) new = 0 proof = False for x in range(1, n + 1): for y in range(1, x + 1): if new >= n: proof = True break new += 1 print(str(new) + " ", end="") if proof: break print()
16
37
0.414063
f3c425484e385dd1d3d40867e3f6a6a757ecf7b0
1,332
py
Python
common/models/member/Member.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
2
2019-06-10T08:57:47.000Z
2021-06-12T16:22:15.000Z
common/models/member/Member.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
null
null
null
common/models/member/Member.py
yao6891/FlaskOrdering
cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 from sqlalchemy import Column, DateTime, Integer, String from sqlalchemy.schema import FetchedValue from application import db, app class Member(db.Model): __tablename__ = 'member' id = db.Column(db.Integer, primary_key=True) nickname = db.Column(db.String(100), nullable=False, server_def...
40.363636
91
0.692943
34023497540af97ea871b6c46f580bc9e495d71e
815
py
Python
nordapi/OpenVpnUdp.py
joshRooz/NordApi
c0d34ed81a0014da5fb96a3409d1ccc0addcc01e
[ "MIT" ]
null
null
null
nordapi/OpenVpnUdp.py
joshRooz/NordApi
c0d34ed81a0014da5fb96a3409d1ccc0addcc01e
[ "MIT" ]
null
null
null
nordapi/OpenVpnUdp.py
joshRooz/NordApi
c0d34ed81a0014da5fb96a3409d1ccc0addcc01e
[ "MIT" ]
null
null
null
from NordApi import NordApi class OpenVpnUdp(NordApi): def get_file(self, country, fname=None): assert type(country) == str NordApi.get_country_id(self, country) NordApi.set_limit(self, 1) json = NordApi.get_recommended(self) self.servername = json[0]['hostname'] ...
25.46875
54
0.577914
3454e10c32960a95825ecc3838d341baf78bab0a
443
py
Python
Python/M01_ProgrammingBasics/L02_ConditionalStatements/Exercises/Solutions/P07_WorldSwimmingRecord.py
todorkrastev/softuni-software-engineering
cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84
[ "MIT" ]
null
null
null
Python/M01_ProgrammingBasics/L02_ConditionalStatements/Exercises/Solutions/P07_WorldSwimmingRecord.py
todorkrastev/softuni-software-engineering
cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84
[ "MIT" ]
null
null
null
Python/M01_ProgrammingBasics/L02_ConditionalStatements/Exercises/Solutions/P07_WorldSwimmingRecord.py
todorkrastev/softuni-software-engineering
cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84
[ "MIT" ]
1
2022-02-23T13:03:14.000Z
2022-02-23T13:03:14.000Z
import math record = float(input()) distance = float(input()) speed = float(input()) normal = speed * distance slow_down_time = distance / 15 slow_rounded = math.floor(slow_down_time) slow = slow_rounded * 12.5 real_time = normal + slow needed = real_time - record if real_time < record: print(f'Yes, he succeeded...
26.058824
81
0.713318
caa37c8e34c35f0a1317fcc032dd0b50a7c7fa67
479
py
Python
exercises/pt/test_01_09.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/pt/test_01_09.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/pt/test_01_09.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
def test(): assert "in doc.ents" in __solution__, "Você está iterando nas entidades?" assert iphone_x.text == "iPhone X", "Verifique se iphone_x aponta para o intervalo de tokens correto." __msg__.good( "Perfeito! É claro que você não precisa fazer tudo isso manualmente. No " "próximo exerc...
47.9
106
0.703549
1b815b609e5444bef14e1dfe8a89c70a1ec34c9a
1,161
py
Python
2-resources/_External-learning-resources/02-pyth/python-patterns-master/tests/creational/test_lazy.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
2-resources/_External-learning-resources/02-pyth/python-patterns-master/tests/creational/test_lazy.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
2-resources/_External-learning-resources/02-pyth/python-patterns-master/tests/creational/test_lazy.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
1
2021-11-05T07:48:26.000Z
2021-11-05T07:48:26.000Z
import unittest from patterns.creational.lazy_evaluation import Person class TestDynamicExpanding(unittest.TestCase): def setUp(self): self.John = Person("John", "Coder") def test_innate_properties(self): self.assertDictEqual( {"name": "John", "occupation": "Coder", "call_count2"...
29.769231
70
0.599483
8e15ee2c6a016b181ef9130bc1296b237e846b73
709
py
Python
PYTHON/Collections/defaultdict_tutorial.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
PYTHON/Collections/defaultdict_tutorial.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
PYTHON/Collections/defaultdict_tutorial.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys from collections import defaultdict if __name__ == '__main__': I = input().split() n, m = int(I[0]), int(I[1]) d = defaultdict(list) for _ in range(n): d[n].append(input()) for _ in range(m): d[m].append(input()) if n == 1 and m == 1: ...
22.870968
44
0.393512
8e2f067832b071d99a61e6435e7db19ea6fe5cca
705
py
Python
data/preprocess.py
quanghona/SOLO_tf2
4aab0fc9115d210f08e694ec59b5f093ade8ce91
[ "MIT" ]
8
2021-03-07T10:25:21.000Z
2022-02-20T23:57:24.000Z
data/preprocess.py
quanghona/SOLO_tf2
4aab0fc9115d210f08e694ec59b5f093ade8ce91
[ "MIT" ]
null
null
null
data/preprocess.py
quanghona/SOLO_tf2
4aab0fc9115d210f08e694ec59b5f093ade8ce91
[ "MIT" ]
null
null
null
import tensorflow as tf def preprocess(img_path, annotations, grid_number, num_class): img_raw = tf.io.read_file(img_path) img_tensor = tf.image.decode_image(img_raw) img_shape = img_tensor.shape # TODO: preprocessing stuff cat = tf.zeros((grid_number, grid_number, num_class), dtype=tf.float32) ...
32.045455
92
0.665248