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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e63dfe542e5c4610e79f71145f4fb97c0cda02f7 | 373 | py | Python | SoSe-21/Uebung-4/A1-While-Zaehler.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | 1 | 2022-03-23T09:40:39.000Z | 2022-03-23T09:40:39.000Z | SoSe-21/Uebung-4/A1-While-Zaehler.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | SoSe-21/Uebung-4/A1-While-Zaehler.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | # Aufgabe 1 - Übung 4
#
# Eingabe
a = int(input("Erste Zahl: "))
b = int(input("zweite Zahl: "))
# Verarbeitung
schleifenZaehler = 0
while a >= b:
a=a-b
print (a)
schleifenZaehler = schleifenZaehler + 1
print("Der Schleifen-Zähler steht jetzt bei:", schleifenZaehler)
print()
# Ausgabe
print("Die Sc... | 23.3125 | 68 | 0.672922 |
0585c7dea3495977292fdfe4733c0990471b11af | 2,045 | py | Python | tests/test_get_tweets.py | UBC-MDS/pytweet | dd97089e79ae35a773d0651cc305fc650b1cd590 | [
"MIT"
] | 2 | 2021-03-13T02:18:16.000Z | 2022-01-14T11:55:32.000Z | tests/test_get_tweets.py | UBC-MDS/pytweet | dd97089e79ae35a773d0651cc305fc650b1cd590 | [
"MIT"
] | 18 | 2021-02-25T04:36:22.000Z | 2021-03-26T07:28:37.000Z | tests/test_get_tweets.py | UBC-MDS/pytweet | dd97089e79ae35a773d0651cc305fc650b1cd590 | [
"MIT"
] | 8 | 2021-02-27T04:33:50.000Z | 2021-06-23T21:48:40.000Z | # authors: Huanhuan Li, Yuanzhe(Marco) Ma, Jared Splinter, Yuan Xiong
# date: Feb-Mar 2021
import pandas as pd
from tweepy import TweepError
from pytweet.pytweet import get_tweets
from pytest import raises
def test_get_tweets():
"""
Test existing functionalities of get_tweets(), which include
returning a... | 29.637681 | 84 | 0.681663 |
05901b5e263064f6ff55553a8b7506bfed83ec34 | 4,500 | py | Python | coco2yolov5-converter/tests/test_sbb2yolo.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | coco2yolov5-converter/tests/test_sbb2yolo.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | coco2yolov5-converter/tests/test_sbb2yolo.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | import json
import random
import shutil
from pathlib import Path
import pytest
import yaml
from src.sbb2yolo import create_parser, SBB2Yolo
def create_dummy_dataset(tmp_dir, name):
dataset_path = tmp_dir / Path(name)
if dataset_path.exists():
shutil.rmtree(dataset_path)
dataset_path.mkdir()
... | 38.461538 | 127 | 0.632222 |
75755313ed3787d9b82c72757960e6c6f372773b | 1,142 | py | Python | python/postgresql/write_blob.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/postgresql/write_blob.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/postgresql/write_blob.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import psycopg2
from config import config
def write_blob(part_id, path_to_file, file_extension):
""" insert a BLOB into a table """
conn = None
try:
# read data from a picture
drawing = open(path_to_file, 'rb').read()
# read database configuration
params =... | 31.722222 | 87 | 0.612084 |
f9cc74cdae5965c8c1688b401f5939c01b26464a | 3,360 | py | Python | _search/server/jekyll.py | NicoKiaru/imagej.github.io | e334937e361f1aa0ad45cf46ba5c8fadfc32be28 | [
"CC-BY-3.0"
] | 16 | 2020-08-03T20:08:00.000Z | 2022-03-02T15:50:47.000Z | _search/server/jekyll.py | NicoKiaru/imagej.github.io | e334937e361f1aa0ad45cf46ba5c8fadfc32be28 | [
"CC-BY-3.0"
] | 196 | 2015-09-14T19:15:07.000Z | 2022-03-31T02:22:39.000Z | _search/server/jekyll.py | NicoKiaru/imagej.github.io | e334937e361f1aa0ad45cf46ba5c8fadfc32be28 | [
"CC-BY-3.0"
] | 60 | 2020-06-04T14:18:37.000Z | 2022-03-30T23:10:55.000Z | #!/bin/env python
import logging, os, traceback
import yaml
from parseutil import first_sentence
logger = logging.getLogger(__name__)
def is_jekyll_site(siteroot):
config = os.path.join(siteroot, '_config.yml')
docroot = os.path.join(siteroot, '_pages')
return os.path.isfile(config) and os.path.isdir(d... | 29.217391 | 85 | 0.588393 |
34fcce8ad4dda672014a410ede9ccdaa5f3551ef | 1,306 | py | Python | main.py | TimonMi/SevDeskCalendarSync | 0d49e2babb5438f16a646b47f06172d80efb8c05 | [
"MIT"
] | null | null | null | main.py | TimonMi/SevDeskCalendarSync | 0d49e2babb5438f16a646b47f06172d80efb8c05 | [
"MIT"
] | null | null | null | main.py | TimonMi/SevDeskCalendarSync | 0d49e2babb5438f16a646b47f06172d80efb8c05 | [
"MIT"
] | null | null | null | import configparser
import requests
import caldav
from caldav.elements import dav, cdav
import urllib.parse
config = configparser.ConfigParser()
config.read(['config.dist.ini', 'config.ini'])
print("SevDesk API-Token: " + config.get("sevdesk", "apikey"))
print("Zeige alle Rechnungen an:")
params = {
'token': conf... | 35.297297 | 106 | 0.683002 |
9b6f53a46cf62aecbb13887ba122009e80ca849f | 860 | py | Python | Packs/DeveloperTools/Scripts/VerifyObjectFieldsList/VerifyObjectFieldsList_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/DeveloperTools/Scripts/VerifyObjectFieldsList/VerifyObjectFieldsList_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/DeveloperTools/Scripts/VerifyObjectFieldsList/VerifyObjectFieldsList_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from VerifyObjectFieldsList import check_fields
import pytest
CONTEXT1 = {'FirstField': {'SecondField': {'ThirdField': 1}}}
CONTEXT2 = {'FirstField': [{'SecondField': [{'ThirdField': 1, 'FourthField': 3}, {'ThirdField': 2, 'FourthField': 4}]}]}
@pytest.mark.parametrize('fields_to_search,context,expected_result', [
... | 50.588235 | 120 | 0.72907 |
32d7a9f1545fc1fdb91f6efdd25eebc8331922d3 | 1,791 | py | Python | Kaggle-Competitions/Home Insurance/scripts/helper.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:16:23.000Z | 2019-05-10T09:16:23.000Z | Kaggle-Competitions/Home Insurance/scripts/helper.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | null | null | null | Kaggle-Competitions/Home Insurance/scripts/helper.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-10-14T07:30:18.000Z | 2019-10-14T07:30:18.000Z | from sklearn.cross_validation import StratifiedShuffleSplit
from sklearn.preprocessing import LabelEncoder
from sklearn.grid_search import RandomizedSearchCV
from collections import defaultdict
import pandas as pd
def encode_labels(train, test):
"""
Encodes the categorical features into numerical featu... | 24.875 | 88 | 0.702401 |
32d8c25cf14f8108915906588aedd3353e37cefc | 1,700 | py | Python | python/data_sutram/scraper/parallel_url.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/data_sutram/scraper/parallel_url.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/data_sutram/scraper/parallel_url.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import os
import requests
from time import time as timer
from multiprocessing.pool import ThreadPool
def fetch_url(entry):
path, uri = entry
try:
if not os.path.exists(path):
r = requests.get(uri, stream=True)
if r.status_code == 200:
with open(path, 'wb') as f:
... | 38.636364 | 130 | 0.653529 |
1f2592048289cad67eae4e1c69a810219007e4af | 1,856 | py | Python | me.py | matt-biss/forensics-evidence | 3484498eb2ca17e72cbfdad0178a837e92ec96b9 | [
"MIT"
] | null | null | null | me.py | matt-biss/forensics-evidence | 3484498eb2ca17e72cbfdad0178a837e92ec96b9 | [
"MIT"
] | null | null | null | me.py | matt-biss/forensics-evidence | 3484498eb2ca17e72cbfdad0178a837e92ec96b9 | [
"MIT"
] | null | null | null | import os
import glob
pe_dir = 'pe/'
me_dir = 'me/'
# pe-Ordner erstellen, wenn noch nicht vorhanden
if not os.path.exists(me_dir):
os.mkdir(me_dir)
# Ordner leeren
files = os.listdir(me_dir)
for file in files:
os.remove(os.path.join(me_dir, file))
files = os.listdir(pe_dir)
# jetzt mal ganz generisch alle ... | 36.392157 | 108 | 0.648707 |
2f08048885ce93446350739feac9ab72c008c39b | 773 | py | Python | ___Python/Thomas/pycurs_180625/p04_oop/m03_oop_uhr.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Thomas/pycurs_180625/p04_oop/m03_oop_uhr.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Thomas/pycurs_180625/p04_oop/m03_oop_uhr.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | class Uhr(object):
def __init__(self, stunde, minute, sekunde):
self.stunde = stunde
self.minute = minute
self.sekunde = sekunde
def naechste_sekunde(self):
self.sekunde += 1
if self.sekunde > 59:
self.sekunde = 0
self.minute +=1
... | 27.607143 | 75 | 0.479948 |
2f8cded56c24e5f015b7d308f0b0c317f567ce21 | 1,164 | py | Python | jordamach/mwd.py | lacriment/Jordamach | a17e22a48e4b3cb66c3f20a6c706b37dcbb56633 | [
"MIT"
] | null | null | null | jordamach/mwd.py | lacriment/Jordamach | a17e22a48e4b3cb66c3f20a6c706b37dcbb56633 | [
"MIT"
] | null | null | null | jordamach/mwd.py | lacriment/Jordamach | a17e22a48e4b3cb66c3f20a6c706b37dcbb56633 | [
"MIT"
] | null | null | null | import numpy as np
from math import log, sqrt
from linear_regression import Regrezio
class MWD:
""" MWD approximation tests which for of functional structure is better for the regression model. """
def __init__(self, x, y):
self.r_lin = Regrezio(model='lin')
self.r_lin.fit(x, y)
self.r... | 31.459459 | 105 | 0.579897 |
9e45f955d913ce7d36595358298eaa0c1c041725 | 266 | py | Python | multimeter/stromstaerke.py | tropi-frutti/facharbeit-fhg | e162014a9d12e60c616d78c14166c75414acda7b | [
"MIT"
] | null | null | null | multimeter/stromstaerke.py | tropi-frutti/facharbeit-fhg | e162014a9d12e60c616d78c14166c75414acda7b | [
"MIT"
] | null | null | null | multimeter/stromstaerke.py | tropi-frutti/facharbeit-fhg | e162014a9d12e60c616d78c14166c75414acda7b | [
"MIT"
] | null | null | null | import read_arduino
import globvar
def stromstaerke():
read_arduino.read()
Measure0=float(globvar.measure0)
stromstaerkeSpan= Measure0*4.86/1023 #umwandeln von 8 bit in spannungswert
stromstaerke= stromstaerkeSpan/10 #ohm
return stromstaerke
| 22.166667 | 77 | 0.763158 |
cdf4a01027e8af7e271c4d6a693cbdcf9375dc80 | 3,665 | py | Python | ds/practice/daily_practice/20-08/assets/code/warehouse_robot.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | ds/practice/daily_practice/20-08/assets/code/warehouse_robot.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | 8 | 2020-03-24T17:47:23.000Z | 2022-03-12T00:33:21.000Z | ds/practice/daily_practice/20-08/assets/code/warehouse_robot.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | # You're part of a warehousing team running simulations on
# robots performing the pick-and-pack task. Another team has
# completed the simulations and provided a log of the robot routes.
# Your task is to validate if the routes are valid.
# Heres' how a route looks like:
# [
# [1, 0, 0, 0, 0],
# [1, 0, 0, 0, 0],... | 23.343949 | 95 | 0.492224 |
a81f4a0a85d1a169cbd085559b139d21a6f5537e | 249 | py | Python | PYTHON/Regex_and_Parsing/validating_and_parsing_email_addresses.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Regex_and_Parsing/validating_and_parsing_email_addresses.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Regex_and_Parsing/validating_and_parsing_email_addresses.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import re
import email.utils
for _ in range(int(input())):
n = input()
e = email.utils.parseaddr(n)
if re.match('^[a-zA-Z][a-zA-Z0-9-_\.]+@[a-zA-Z]+\.[a-zA-Z]{1,3}$', e[1]) is None:
continue
print(n)
| 20.75 | 85 | 0.554217 |
a972d2a2a18bb6ed54bf843b3495f7151e366455 | 741 | py | Python | source/pkgsrc/graphics/py-strich/patches/patch-pystrich_qrcode_isodata.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/graphics/py-strich/patches/patch-pystrich_qrcode_isodata.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/graphics/py-strich/patches/patch-pystrich_qrcode_isodata.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-pystrich_qrcode_isodata.py,v 1.1 2017/10/23 13:38:41 joerg Exp $
--- pystrich/qrcode/isodata.py.orig 2015-07-19 21:44:27.000000000 +0000
+++ pystrich/qrcode/isodata.py
@@ -1,6 +1,7 @@
"""ISO/IEC 18004:2006 tables and functions implementation"""
import os.path
+import sys
MAX_DATA_BITS = [
12... | 29.64 | 79 | 0.578947 |
5719825fb223d7511efb6b70705864e86d0d9371 | 72 | py | Python | code/1/laurel.py | pwang13/AutomatedSE_Coursework | b416672d9756fcc60367143b989d29b0c905cfc3 | [
"Unlicense"
] | null | null | null | code/1/laurel.py | pwang13/AutomatedSE_Coursework | b416672d9756fcc60367143b989d29b0c905cfc3 | [
"Unlicense"
] | null | null | null | code/1/laurel.py | pwang13/AutomatedSE_Coursework | b416672d9756fcc60367143b989d29b0c905cfc3 | [
"Unlicense"
] | null | null | null | import utest
@utest.ok
def ok_laurel () :
print('Laurel Timko');
| 9 | 26 | 0.638889 |
93b2bf5ebdba71d3bdbd612d9ac1b70c37958159 | 1,178 | py | Python | schedule.py | sambabypapapa/CralwerSet | a76e0660c42ce7aac20b8d07ccc454b6636a8a2a | [
"Apache-2.0"
] | 5 | 2020-08-17T08:37:16.000Z | 2021-06-07T05:02:05.000Z | schedule.py | sambabypapapa/CralwerSet | a76e0660c42ce7aac20b8d07ccc454b6636a8a2a | [
"Apache-2.0"
] | null | null | null | schedule.py | sambabypapapa/CralwerSet | a76e0660c42ce7aac20b8d07ccc454b6636a8a2a | [
"Apache-2.0"
] | 1 | 2021-06-07T05:02:10.000Z | 2021-06-07T05:02:10.000Z | import CralwerSet.connect_mysql as connect_mysql
import requests
class schedule():
def __init__(self, sql, fun):
self.conn = None
self.cur = None
self.result = None
self.classes = self.connect_sql(sql, fun)
def connect_sql(self, sql, fun):
self.conn = fun
self.... | 30.205128 | 153 | 0.55348 |
93e6f96f149e381274b215694f1158c88b492569 | 357 | py | Python | Curso_Python/Secao2-Python-Basico-Logica-Programacao/21_operadores_relacionais/21_operadores_relacionais.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao2-Python-Basico-Logica-Programacao/21_operadores_relacionais/21_operadores_relacionais.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao2-Python-Basico-Logica-Programacao/21_operadores_relacionais/21_operadores_relacionais.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | """
Operadores Relacionais - aula 20
== igualdade
> maior que
>= maior que ou igual a
< menor que
<= menor que ou igual a
!= diferente
"""
nome = str(input('Qual o seu nome: '))
idade = int(input('Idade: '))
if idade >= 18 and idade <= 32:
print(f'{nome} tem idade pra pegar emprestimo.')
else:
print(f'{nome} pa... | 22.3125 | 57 | 0.655462 |
2772ba0dcf9d81757f848d598655b0a149b77282 | 648 | py | Python | api/etl/ods_load.py | Latent-Lxx/dazhou-dw | 902b4b625cda4c9e4eb205017b8955b81f37a0b5 | [
"MIT"
] | null | null | null | api/etl/ods_load.py | Latent-Lxx/dazhou-dw | 902b4b625cda4c9e4eb205017b8955b81f37a0b5 | [
"MIT"
] | null | null | null | api/etl/ods_load.py | Latent-Lxx/dazhou-dw | 902b4b625cda4c9e4eb205017b8955b81f37a0b5 | [
"MIT"
] | 1 | 2022-02-11T04:44:37.000Z | 2022-02-11T04:44:37.000Z | # !/usr/bin/python3
# -*- coding: utf-8 -*-
# @Time : 2021/7/30 下午3:31
# @Author : Latent
# @Email : latentsky@gmail.com
# @File : ods_load.py
# @Software: PyCharm
# @class :用于ods数据加载到dwd中
from db.mysql_db import MYSQL
class Ods_Load(object):
def __init__(self):
pass
# 插入sql
@classmethod
def... | 24.923077 | 99 | 0.660494 |
2785573895c2705a06ab754aafb555592abece24 | 1,608 | py | Python | elements/python/10/9/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 11 | 2019-02-08T06:54:34.000Z | 2021-08-07T18:57:39.000Z | elements/python/10/9/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 1 | 2019-05-21T08:14:10.000Z | 2019-05-21T08:14:10.000Z | elements/python/10/9/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | null | null | null | class Node(object):
def __init__(self, v, p=None, l=None, r=None):
self.value = v
self.parent = p
self.left = l
if l is not None:
l.parent = self
self.right = r
if r is not None:
r.parent = self
def leaf(self):
return self.left is ... | 24.363636 | 80 | 0.468284 |
8bd0b0d992789dce151e81cbf02e27246219fb9c | 13,649 | py | Python | 20-hs-redez-sem/groups/02-unionDir/filesystem-redez-server/net/client_old.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-hs-redez-sem/groups/02-unionDir/filesystem-redez-server/net/client_old.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-hs-redez-sem/groups/02-unionDir/filesystem-redez-server/net/client_old.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | import json
from net import controller
import os
from utils import color, hash_, create
import math
import _thread
import re
import shutil
from datetime import datetime
from pathlib import Path
BUFFER_SIZE = 8 * 1024
class Client:
def __init__(self, conn, addr, clients_path, config_path, filesystem_path, hash=Non... | 36.108466 | 144 | 0.515496 |
47b8f6f2535c2dd24b0831ddacae365d9b01b3e1 | 7,488 | py | Python | research/cv/simple_baselines/src/pose_resnet.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/simple_baselines/src/pose_resnet.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/simple_baselines/src/pose_resnet.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 33.578475 | 108 | 0.598558 |
9a2e04bcfa11833a675318a6b7fd9059c6f04ded | 101 | py | Python | scripts/hello_world_sparsh789.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/hello_world_sparsh789.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/hello_world_sparsh789.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | 1 | 2019-10-24T06:45:21.000Z | 2019-10-24T06:45:21.000Z | #LANGUAGE: Python
#AUTHOR: Sparsh Garg
#GITHUB: https://github.com/sparsh789
print "Hello, World!"
| 16.833333 | 38 | 0.732673 |
d0d78393a389496a30731a0bdb5c230131d90d0d | 427 | py | Python | Mathe I/SiebDesEratosthenes.py | thieleju/studium | f23db7c7d2c30a2f0095cfdd25a4944c39d80d82 | [
"MIT"
] | 2 | 2021-11-16T22:53:25.000Z | 2021-11-17T12:30:49.000Z | Mathe I/SiebDesEratosthenes.py | thieleju/studium | f23db7c7d2c30a2f0095cfdd25a4944c39d80d82 | [
"MIT"
] | 1 | 2022-02-23T18:56:51.000Z | 2022-02-23T19:09:20.000Z | Mathe I/SiebDesEratosthenes.py | thieleju/studium | f23db7c7d2c30a2f0095cfdd25a4944c39d80d82 | [
"MIT"
] | 1 | 2022-01-24T16:54:10.000Z | 2022-01-24T16:54:10.000Z | import math as m
def eratosthenesSieb(n):
primzahlen = []
zahlen = list(range(2, n))
aktuell = 2
while aktuell < m.sqrt(n):
for i in range(aktuell, n, aktuell):
if i in zahlen:
zahlen.remove(i)
primzahlen.append(aktuell)
aktuell = zahlen[0]
re... | 18.565217 | 44 | 0.57377 |
d0f6ad6a4a3c642c8a550c678358c4b82c0c653c | 3,798 | py | Python | reporter.py | jxtrbtk/bindex | 8feee8ff9db371d9e691e10ea70467446c0412b1 | [
"MIT"
] | 1 | 2022-03-09T20:44:33.000Z | 2022-03-09T20:44:33.000Z | reporter.py | jxtrbtk/bindex | 8feee8ff9db371d9e691e10ea70467446c0412b1 | [
"MIT"
] | null | null | null | reporter.py | jxtrbtk/bindex | 8feee8ff9db371d9e691e10ea70467446c0412b1 | [
"MIT"
] | null | null | null | import os
import sys
import requests
import datetime
import time
import random
import lib
import lib.wallet
FOLDER = "secret"
def get_root_folder():
folders = []
folders.append(os.path.abspath(os.path.join(os.sep, FOLDER)))
folders.append(os.path.join(FOLDER))
for folder in folders:
check_f... | 29.44186 | 121 | 0.612691 |
efb3d743cc5ecf26c1dbffd7fa9e8d62d02bf27b | 1,432 | py | Python | src/test/tests/simulation/material.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/simulation/material.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/simulation/material.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: material.py
#
# Tests: libsim - connecting to simulation and retrieving data from it.
# material - 2D structured/unstructured material.
# materials
#
# Programmer: Brad ... | 24.271186 | 78 | 0.588687 |
efed6ed2f850b941101b96840f7051abeb1671b3 | 8,797 | py | Python | research/cv/DBPN/train_dbpngan.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/DBPN/train_dbpngan.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/DBPN/train_dbpngan.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... | 39.80543 | 111 | 0.685234 |
ef2a2f8dd2b3956e177a98a5f5d215f81c90c4ed | 501 | py | Python | rating/abstract_rater.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 19 | 2018-04-20T11:03:41.000Z | 2022-01-12T20:58:56.000Z | rating/abstract_rater.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 160 | 2018-04-05T16:12:59.000Z | 2022-03-01T13:01:27.000Z | rating/abstract_rater.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 8 | 2018-11-05T13:07:57.000Z | 2021-06-11T11:46:43.000Z | class AbstractRater(object):
# String 'boolean' or 'number'
rating_type = None
# The default value to return if no rating given
default_value = None
max_score = 1
# Name of the checks this rater depends on
depends_on_checks = []
def __init__(self, check_results):
self.ch... | 21.782609 | 52 | 0.652695 |
ef3dfb55f72d4118504d5075454500d11524f59e | 2,086 | py | Python | tests/controller/test_online_controller.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 3 | 2021-01-17T23:32:07.000Z | 2022-01-30T14:49:16.000Z | tests/controller/test_online_controller.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 2 | 2021-01-17T13:37:56.000Z | 2021-04-14T12:28:49.000Z | tests/controller/test_online_controller.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 2 | 2021-04-02T14:53:38.000Z | 2021-04-20T11:10:17.000Z | import unittest
from asyncio import Future
from datetime import datetime, timezone
from unittest.mock import patch, MagicMock, Mock, call, ANY
from chillow.controller import OnlineController
from chillow.model.action import Action
from chillow.model.cell import Cell
from chillow.model.direction import Direction
from c... | 35.355932 | 114 | 0.71093 |
32a401ab33cac0f72c7afec308ce5c759fd7ece1 | 1,089 | py | Python | shinrl/_calc/distributions.py | omron-sinicx/ShinRL | 09f4ae274a33d1fc1d9d542f816aef40014af6b5 | [
"MIT"
] | 34 | 2021-12-09T07:12:57.000Z | 2022-03-11T08:17:20.000Z | shinrl/_calc/distributions.py | omron-sinicx/ShinRL | 09f4ae274a33d1fc1d9d542f816aef40014af6b5 | [
"MIT"
] | null | null | null | shinrl/_calc/distributions.py | omron-sinicx/ShinRL | 09f4ae274a33d1fc1d9d542f816aef40014af6b5 | [
"MIT"
] | 4 | 2021-12-11T07:48:01.000Z | 2022-03-01T23:50:33.000Z | """ Distrax distributions. """
from typing import Tuple
import chex
import jax
import jax.numpy as jnp
from distrax import Distribution, Normal
from distrax._src.distributions.distribution import PRNGKey
Numeric = chex.Numeric
Array = chex.Array
PRNGKey = chex.PRNGKey
class SquashedNormal(Distribution):
def _... | 29.432432 | 93 | 0.667585 |
3eba81e86a8d854ecde01c0db00fd12d36d30462 | 2,864 | py | Python | bindings/python/ensmallen/datasets/get_graph_okapi_tfidf_weighted_textual_embedding.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | null | null | null | bindings/python/ensmallen/datasets/get_graph_okapi_tfidf_weighted_textual_embedding.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | null | null | null | bindings/python/ensmallen/datasets/get_graph_okapi_tfidf_weighted_textual_embedding.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | null | null | null | """Submodule for a pre-parametrized graph TFIDF weighted textual embedding."""
from typing import Optional, Dict, List
import numpy as np
import os
from .automatic_graph_retrieval import AutomaticallyRetrievedGraph
from .get_okapi_tfidf_weighted_textual_embedding import get_okapi_tfidf_weighted_textual_embedding
def ... | 35.8 | 98 | 0.677374 |
de1dbbd8a7cc0cae85d1beea6428f54be8fbb2fb | 1,529 | py | Python | skimind/kernel/pdfManag/page_spliter.py | NathBangwa/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | 1 | 2020-11-13T18:30:47.000Z | 2020-11-13T18:30:47.000Z | skimind/kernel/pdfManag/page_spliter.py | nathanbangwa243/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | 5 | 2020-11-13T18:16:48.000Z | 2021-09-08T01:04:59.000Z | skimind/kernel/pdfManag/page_spliter.py | nathanbangwa243/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | null | null | null | # importing the required modules
import PyPDF2
# global config
from . import skiconfig
# config
from . import config
# system tools
import os
SPLIT_PAGES = [1, 2]
def PDFsplit(pdf, splits=None):
# clean temp folder
for filename in os.listdir(config.TEMPS_PDF_FOLDER):
os.remove(filename)
if not splits... | 20.662162 | 70 | 0.699804 |
dec8aacb0bc4400824697e28395f7da4af098058 | 3,215 | py | Python | research/cv/eppmvsnet/src/utils.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/eppmvsnet/src/utils.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/eppmvsnet/src/utils.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... | 27.478632 | 93 | 0.597823 |
dee7e84d123c21ad7d347246566bad2dffc4e987 | 5,486 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/traci/_gui.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/traci/_gui.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/traci/_gui.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | # -*- coding: utf-8 -*-
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2011-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.... | 38.907801 | 107 | 0.663872 |
26d6ba328530eb9d1e27c827a8fa4dad0f2c82ec | 532 | py | Python | exercises/es/test_03_10_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/es/test_03_10_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/es/test_03_10_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert Doc.has_extension("has_number"), "¿Registraste la extensión en el doc?"
ext = Doc.get_extension("has_number")
assert ext[2] is not None, "¿Añadiste el getter correctamente?"
assert (
"getter=get_has_number" in __solution__
), "¿Asignaste get_has_number como el getter?"
... | 44.333333 | 93 | 0.712406 |
6efdf6b7f5f6807868b4b04c62b030eefc88423a | 1,333 | py | Python | Rath-DDoS-master/rath.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Rath-DDoS-master/rath.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Rath-DDoS-master/rath.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #Copy this code doesn't make you programmer bro!
import sys
import os
import time
import socket
import random
#Code
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 = ran... | 26.137255 | 77 | 0.617404 |
3e1055ca65b881c6bea7caa08da35764e697ad24 | 1,039 | py | Python | Programming Languages/Python/Theory/100_Python_Challenges/Section_8_Classes/97. person class.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 101 | 2021-12-20T11:57:11.000Z | 2022-03-23T09:49:13.000Z | Programming Languages/Python/Theory/100_Python_Challenges/Section_8_Classes/97. person class.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 4 | 2022-01-12T11:55:56.000Z | 2022-02-12T04:53:33.000Z | Programming Languages/Python/Theory/100_Python_Challenges/Section_8_Classes/97. person class.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 38 | 2022-01-12T11:56:16.000Z | 2022-03-23T10:07:52.000Z | '''
Create a method in the Person class which returns how another person's age compares.
Given the objects p1, p2 and p3, which will be initialized with the attributes name and age, return a sentence in the following format: {other_person} is {older than / younger than / the same age as} me.
Examples :
p1 = Person("... | 22.586957 | 203 | 0.636189 |
3e8bc4c581f7fed615438e99ed5a59ffb7299eca | 1,302 | py | Python | tests/test_steuerbetrag.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | tests/test_steuerbetrag.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | tests/test_steuerbetrag.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | from decimal import Decimal
import pytest # type:ignore[import]
from bo4e.com.steuerbetrag import Steuerbetrag, SteuerbetragSchema
from bo4e.enum.steuerkennzeichen import Steuerkennzeichen
from bo4e.enum.waehrungscode import Waehrungscode
from tests.serialization_helper import assert_serialization_roundtrip # type:... | 33.384615 | 106 | 0.709677 |
e44f31c202414cd8aa4569fdb81ae23e136a40c0 | 361 | py | Python | Gundlagen IT-Hardware/GPIO_Script.py | thieleju/studium | f23db7c7d2c30a2f0095cfdd25a4944c39d80d82 | [
"MIT"
] | 2 | 2021-11-16T22:53:25.000Z | 2021-11-17T12:30:49.000Z | Gundlagen IT-Hardware/GPIO_Script.py | thieleju/studium | f23db7c7d2c30a2f0095cfdd25a4944c39d80d82 | [
"MIT"
] | 1 | 2022-02-23T18:56:51.000Z | 2022-02-23T19:09:20.000Z | Gundlagen IT-Hardware/GPIO_Script.py | thieleju/studium | f23db7c7d2c30a2f0095cfdd25a4944c39d80d82 | [
"MIT"
] | 1 | 2022-01-24T16:54:10.000Z | 2022-01-24T16:54:10.000Z | import RPi.GPIO as GPIO
import time
# set mode to boardnumbers or GPIO number
# GPIO number
GPIO.setmode(GPIO.BCM)
pin = input("Choose output bin to blink\n")
iterations = input("How many times?\n")
GPIO.setup(pin, GPIO.OUT)
for i in range(iterations):
GPIO.output(pin, GPIO.HIGH)
time.sleep(0.5)
GPIO.o... | 19 | 43 | 0.698061 |
e48ab15c9cb8265e1a74b10bcf2ce2ebade13015 | 96 | py | Python | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE/python_event.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE/python_event.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE/python_event.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | var = 5
for j in range(12):
#for i in range(12):
var = var*2
var = var-3
print(var)
| 13.714286 | 24 | 0.541667 |
5fbac4cb36993b8b13d4a88d441370cfd40f6b98 | 562 | py | Python | DataProcess/main.py | ZhangQiHang-98/RFID_Scirpt | 0f74087add4cf16e2d201ad4f31cc1abd287db7e | [
"MIT"
] | 3 | 2021-12-24T04:52:03.000Z | 2021-12-27T02:14:49.000Z | DataProcess/main.py | ZhangQiHang-98/RFID_Scirpt | 0f74087add4cf16e2d201ad4f31cc1abd287db7e | [
"MIT"
] | null | null | null | DataProcess/main.py | ZhangQiHang-98/RFID_Scirpt | 0f74087add4cf16e2d201ad4f31cc1abd287db7e | [
"MIT"
] | null | null | null | # This is a sample Python script.
# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
from filters import *
from math import pi
# if __na... | 28.1 | 98 | 0.649466 |
29c3c54e34d4290fcd61a3768190f91b4bee5fc8 | 5,135 | py | Python | v206/python/temp.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 2 | 2019-12-10T10:25:11.000Z | 2021-01-26T13:59:40.000Z | v206/python/temp.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | null | null | null | v206/python/temp.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 1 | 2020-12-06T21:24:58.000Z | 2020-12-06T21:24:58.000Z | import numpy as np
import scipy.optimize
import uncertainties as unc
import uncertainties.unumpy as unp
from scipy import optimize
import matplotlib.pyplot as plt
from uncertainties import ufloat
from scipy.constants import codata
t, T1, pb, T2, pa, Leistung = np.genfromtxt("python/messwerte.txt", unpack=True)
def f(... | 30.748503 | 115 | 0.628822 |
29fadff00f0eec892ff49531745644738ad9e58e | 563 | py | Python | tarefas-poo/lista-01/calculos/view/paineis/painel_par.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-01/calculos/view/paineis/painel_par.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-01/calculos/view/paineis/painel_par.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | # --------------------------
# UFSC - CTC - INE - INE5603
# Exercício calculos
# --------------------------
# Classe responsável por descobrir se um número inteiro é par.
from view.paineis.painel_abstrato import PainelAbstrato
from model.calculos import par
class PainelPar(PainelAbstrato):
def __init__(self):
... | 25.590909 | 62 | 0.563055 |
d9cbb0709ee5702aee3e93832bc74983f1d5bb6f | 3,343 | py | Python | src/onegov/gazette/views/principal.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/gazette/views/principal.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/gazette/views/principal.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from datetime import timedelta
from morepath import redirect
from onegov.core.security import Personal
from onegov.core.security import Public
from onegov.gazette import _
from onegov.gazette import GazetteApp
from onegov.gazette.collections import GazetteNoticeCollection
from onegov.gazette.collections import IssueCol... | 25.914729 | 78 | 0.666766 |
d9e24037b50445073c36c8542475d51b596cea7a | 31,342 | py | Python | Backend/migrations/alembic/versions/bbaf5488b4fe_update_mv_cases_per_county_and_day.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 15 | 2020-04-24T20:18:11.000Z | 2022-01-31T21:05:05.000Z | Backend/migrations/alembic/versions/bbaf5488b4fe_update_mv_cases_per_county_and_day.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 2 | 2021-05-19T07:15:09.000Z | 2022-03-07T08:29:34.000Z | Backend/migrations/alembic/versions/bbaf5488b4fe_update_mv_cases_per_county_and_day.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 4 | 2020-04-27T16:20:13.000Z | 2021-02-23T10:39:42.000Z | """update mv cases_per_county_and_day
Revision ID: bbaf5488b4fe
Revises: 59ad7ea918b6
Create Date: 2021-03-17 19:33:32.197080
"""
from alembic import op
# revision identifiers, used by Alembic.
revision = 'bbaf5488b4fe'
down_revision = '59ad7ea918b6'
branch_labels = None
depends_on = None
def upgrade():
op.get... | 67.839827 | 139 | 0.315232 |
8a8ca929dc3079aea2a316b80f965a80d483fea3 | 952 | py | Python | EncodeToFileList.py | FrieAT/MD_CompressedWavelet | 82bd10edd611485cd5f0b81da744e07a3b7c98eb | [
"MIT"
] | 2 | 2020-03-28T11:50:45.000Z | 2020-12-08T13:36:26.000Z | EncodeToFileList.py | FrieAT/MD_CompressedWavelet | 82bd10edd611485cd5f0b81da744e07a3b7c98eb | [
"MIT"
] | 2 | 2020-04-20T11:12:59.000Z | 2020-05-11T05:37:36.000Z | EncodeToFileList.py | FrieAT/MD_CompressedWavelet | 82bd10edd611485cd5f0b81da744e07a3b7c98eb | [
"MIT"
] | null | null | null |
from IProcess import IProcess, EDataType
from ScanAssets import ScanAssets
import os.path
class EncodeToFileList(IProcess):
def __init__(self, inFormat, path):
ScanAssets.checkDirPermission(None, path)
if os.path.isdir(path):
raise Exception("Please specify a file path for the encoding list.")
IProcess.... | 20.695652 | 71 | 0.726891 |
0a736a7de9d422d52f59f2923f00f8adf2995bad | 35,999 | bzl | Python | kythe/rust/cargo/crates.bzl | wcalandro/kythe | 64969a853711c228b4e3cfc3ce91b84b5bb853d7 | [
"Apache-2.0"
] | 703 | 2018-11-05T22:51:58.000Z | 2022-03-31T21:54:22.000Z | kythe/rust/cargo/crates.bzl | wcalandro/kythe | 64969a853711c228b4e3cfc3ce91b84b5bb853d7 | [
"Apache-2.0"
] | 720 | 2018-11-05T21:29:49.000Z | 2022-03-29T19:43:50.000Z | kythe/rust/cargo/crates.bzl | wcalandro/kythe | 64969a853711c228b4e3cfc3ce91b84b5bb853d7 | [
"Apache-2.0"
] | 99 | 2018-11-06T22:20:08.000Z | 2022-03-16T12:50:35.000Z | """
@generated
cargo-raze generated Bazel file.
DO NOT EDIT! Replaced on runs of cargo-raze
"""
load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository") # buildifier: disable=load
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # buildifier: disable=load
load("@bazel_tools//too... | 39.429354 | 103 | 0.638212 |
864120ea7a3ce5f8b2af7ca8c62029a67e94f046 | 3,655 | py | Python | ci/check/run_clang_tidy.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | ci/check/run_clang_tidy.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | ci/check/run_clang_tidy.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "L... | 36.55 | 356 | 0.670315 |
86576e54a5155e89593de42dba879642063165f8 | 1,484 | py | Python | SQL_python/DataBasePython/connection1.py | cartellefo/projet | 23c67e847b415fb47f71e830b89a227fffed109b | [
"MIT"
] | null | null | null | SQL_python/DataBasePython/connection1.py | cartellefo/projet | 23c67e847b415fb47f71e830b89a227fffed109b | [
"MIT"
] | null | null | null | SQL_python/DataBasePython/connection1.py | cartellefo/projet | 23c67e847b415fb47f71e830b89a227fffed109b | [
"MIT"
] | null | null | null |
import psycopg2
#from config import config
def connect():
""" Connect to the PostgreSQL database server """
conn = None
try:
# read connection parameters
#params = config()
# connect to the PostgreSQL server
print('Connecting to the PostgreSQL database...')
conn ... | 20.901408 | 103 | 0.623315 |
8658a90132b74ed22a080ae022a077b055827df0 | 10,355 | py | Python | Packs/AzureDataExplorer/Integrations/AzureDataExplorer/AzureDataExplorer_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/AzureDataExplorer/Integrations/AzureDataExplorer/AzureDataExplorer_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/AzureDataExplorer/Integrations/AzureDataExplorer/AzureDataExplorer_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import json
import pytest
'''MOCK PARAMETERS '''
CLUSTER_URL = "https://help.kusto.windows.net"
APPLICATION_ID = "xxx-xxx-xxx"
QUERY_URL_SUFFIX = "/v1/rest/query"
MANAGEMENT_URL_SUFFIX = "/v1/rest/mgmt"
CLIENT_ACTIVITY_PREFIX = "XSOAR-DataExplorerIntegation"
CLIENT_ACTIVITY_ID = "XSOAR-DataExplorer1;xxxx-xxxxx-xxxxx-... | 39.372624 | 109 | 0.695509 |
d4b123805d939da4ef5f1e4ce222ef4c3a927e85 | 213 | py | Python | 0-notes/job-search/Cracking the Coding Interview/C09SystemDesignScalability/questions/9.4-question.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/Cracking the Coding Interview/C09SystemDesignScalability/questions/9.4-question.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/Cracking the Coding Interview/C09SystemDesignScalability/questions/9.4-question.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | # Duplicate URLs:
# You have 10 billion URLs.
# How do you detect the duplicate documents?
# In this case, assume "duplicates" means that the URLs are identical.
# time complexity: O()
# space complexity: O() | 26.625 | 70 | 0.71831 |
d4e34dfd99d3a4fd8d892021d5bbb3a1b252c96c | 4,414 | py | Python | CharakterFreieFertigkeitenPicker.py | klnrdknt/Sephrasto | 591224fe01825a169c21ebc6136533f282ce9a0b | [
"MIT"
] | 15 | 2017-11-09T12:49:52.000Z | 2022-03-06T12:18:48.000Z | CharakterFreieFertigkeitenPicker.py | klnrdknt/Sephrasto | 591224fe01825a169c21ebc6136533f282ce9a0b | [
"MIT"
] | 40 | 2018-02-01T21:32:01.000Z | 2022-03-22T11:35:28.000Z | CharakterFreieFertigkeitenPicker.py | klnrdknt/Sephrasto | 591224fe01825a169c21ebc6136533f282ce9a0b | [
"MIT"
] | 13 | 2018-03-12T17:50:42.000Z | 2022-03-06T12:21:41.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'CharakterFreieFertigkeitenPicker.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from ... | 49.595506 | 134 | 0.736973 |
0781843d5ea384d36e60378193d0db522d82fcff | 2,730 | py | Python | ClassicKT/model.py | junchenfeng/diagnosis_tracing | 4e26e2ad0c7abc547f22774b6c9c299999a152c3 | [
"MIT"
] | null | null | null | ClassicKT/model.py | junchenfeng/diagnosis_tracing | 4e26e2ad0c7abc547f22774b6c9c299999a152c3 | [
"MIT"
] | null | null | null | ClassicKT/model.py | junchenfeng/diagnosis_tracing | 4e26e2ad0c7abc547f22774b6c9c299999a152c3 | [
"MIT"
] | 1 | 2020-09-08T13:42:16.000Z | 2020-09-08T13:42:16.000Z | # -*- coding: utf-8 -*-
from torch import nn
from torch.nn import functional as F
from torch.nn.utils.rnn import pad_packed_sequence,pack_padded_sequence
from torch import ne,where,eq,cat,no_grad
class Model(nn.Module):
def __init__(self,num_items,hidden_size):
super(Model,self)._... | 35.454545 | 93 | 0.552381 |
ed56b45ce9ff90bdb8e80221d81212bc1f580a54 | 10,535 | py | Python | Packs/DuoAdminApi/Integrations/DuoAdminApi/DuoAdminApi.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/DuoAdminApi/Integrations/DuoAdminApi/DuoAdminApi.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/DuoAdminApi/Integrations/DuoAdminApi/DuoAdminApi.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 calendar
import duo_client
# Setup
HOST = demisto.getParam('hostname')
INTEGRATION_KEY = demisto.getParam('integration_key')
SECRET_KEY = demisto.getParam('secret_key')
USE_SSL = not demisto.params().... | 28.550136 | 123 | 0.621452 |
ed89c40908a5ed4c8acc835aafc57fa19a2cb667 | 13,728 | py | Python | spangle/_internal/router.py | tkamenoko/spangle | 068479660a03239aa69c935d7ca0418c491d92da | [
"MIT"
] | 2 | 2019-11-17T06:38:56.000Z | 2019-12-01T15:32:03.000Z | spangle/_internal/router.py | tkamenoko/spangle | 068479660a03239aa69c935d7ca0418c491d92da | [
"MIT"
] | null | null | null | spangle/_internal/router.py | tkamenoko/spangle | 068479660a03239aa69c935d7ca0418c491d92da | [
"MIT"
] | null | null | null | from __future__ import annotations
import re
from http import HTTPStatus
from typing import Any, NamedTuple, Optional
from parse import Parser, compile
from ..handler_protocols import AnyRequestHandlerProtocol, RequestHandlerProtocol
from ..models import Request, Response
from ..types import Converters, RoutingStrat... | 33.482927 | 88 | 0.60912 |
13ebfc686225811c0252fdee37e4c3def595ffb3 | 269 | py | Python | Python/examples/file.py | bunny8469/Hello-World | 722b5961cbcd9b2c2eec2cb6aa700eaa451e008b | [
"MIT"
] | 133 | 2021-01-15T16:29:40.000Z | 2022-03-21T16:35:42.000Z | Python/examples/file.py | bunny8469/Hello-World | 722b5961cbcd9b2c2eec2cb6aa700eaa451e008b | [
"MIT"
] | 117 | 2021-01-17T08:54:22.000Z | 2022-01-17T16:38:11.000Z | Python/examples/file.py | bunny8469/Hello-World | 722b5961cbcd9b2c2eec2cb6aa700eaa451e008b | [
"MIT"
] | 146 | 2021-01-15T12:57:19.000Z | 2022-03-15T20:10:23.000Z | with open("my_file.txt", 'a') as file: # if file not made, make it and then open:
file.read() # read the file
for i in file.readline():
print(i) # read line by line
file.write("Hello, World!") # write some text in file
# with close file automaticly
| 29.888889 | 81 | 0.64684 |
b980b2ea36fea8247ca8f02683d04427fd4d5911 | 633 | py | Python | 931-minimum-falling-path-sum/931-minimum-falling-path-sum.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | 931-minimum-falling-path-sum/931-minimum-falling-path-sum.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | 931-minimum-falling-path-sum/931-minimum-falling-path-sum.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def minFallingPathSum(self, matrix: List[List[int]]) -> int:
num_row = len(matrix)
prev_dp=[]
prev_dp+=[x for x in matrix[0]] # first row
cur_dp=[matrix[0][0]]*num_row # to handle the case of 1x1 matrix
for row in matrix[1:]:
cur_dp[0]=ro... | 48.692308 | 86 | 0.562401 |
e05fc73bff86065d7c6693791f62fad48180a6cf | 255 | py | Python | ex1/dispatcher.py | renzon/oo-inpe | 1b33939974f998badbeebd7bfe182070e77ef98f | [
"MIT"
] | null | null | null | ex1/dispatcher.py | renzon/oo-inpe | 1b33939974f998badbeebd7bfe182070e77ef98f | [
"MIT"
] | null | null | null | ex1/dispatcher.py | renzon/oo-inpe | 1b33939974f998badbeebd7bfe182070e77ef98f | [
"MIT"
] | null | null | null | class Despachador():
def __init__(self):
self._listeners = []
def adicionar(self, *listeners):
self._listeners.extend(listeners)
def despachar(self, evento):
for lis in self._listeners:
lis.tratar(evento)
| 23.181818 | 41 | 0.619608 |
e065d0dad007515943ce73265f4a778a602c92ec | 282 | py | Python | exercises/en/exc_02_02_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/en/exc_02_02_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/en/exc_02_02_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | import spacy
nlp = spacy.blank("en")
doc = nlp("David Bowie is a PERSON")
# Look up the hash for the string label "PERSON"
person_hash = ____.____.____[____]
print(person_hash)
# Look up the person_hash to get the string
person_string = ____.____.____[____]
print(person_string)
| 21.692308 | 48 | 0.748227 |
16e32bf90bce2f05f5f59a3e674c6c77fc127bbd | 5,754 | py | Python | examples/sentiment_analysis/textcnn/deploy/python/predict.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/sentiment_analysis/textcnn/deploy/python/predict.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/sentiment_analysis/textcnn/deploy/python/predict.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle 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 appli... | 39.958333 | 115 | 0.645638 |
4c046051afdcf4e4d627fe598ca0061438469511 | 1,330 | py | Python | Implementierung/ResearchEnvironment/authentification/views.py | Sashks/PSE | ae2d8133a85563c33583f15b9ba76a3a2bf0c762 | [
"MIT"
] | null | null | null | Implementierung/ResearchEnvironment/authentification/views.py | Sashks/PSE | ae2d8133a85563c33583f15b9ba76a3a2bf0c762 | [
"MIT"
] | null | null | null | Implementierung/ResearchEnvironment/authentification/views.py | Sashks/PSE | ae2d8133a85563c33583f15b9ba76a3a2bf0c762 | [
"MIT"
] | null | null | null | #from django.shortcuts import render, HttpResponse
#from django import forms
from django.shortcuts import render , redirect
from django.contrib.auth import authenticate, login
from django.views.generic import View
from .forms import UserForm
#from django.views import generic
from django.template import RequestContext
... | 30.930233 | 91 | 0.656391 |
9109fa46311ab95c803ae4b474f013d4d2493cb6 | 1,597 | py | Python | scripts/old2newcsv.py | AryaVashisht/covid_19 | 0c734615a1190a5b2fff4697f47731ef2b8b6918 | [
"CC-BY-4.0"
] | 485 | 2020-03-10T20:10:44.000Z | 2022-03-27T16:11:30.000Z | scripts/old2newcsv.py | AryaVashisht/covid_19 | 0c734615a1190a5b2fff4697f47731ef2b8b6918 | [
"CC-BY-4.0"
] | 682 | 2020-03-17T09:55:12.000Z | 2022-03-28T15:16:24.000Z | scripts/old2newcsv.py | AryaVashisht/covid_19 | 0c734615a1190a5b2fff4697f47731ef2b8b6918 | [
"CC-BY-4.0"
] | 224 | 2020-03-09T11:42:13.000Z | 2022-03-22T13:16:33.000Z | #!/usr/bin/env python3
# This script convert CSV files from the old to the new structure
import csv
import sys
import traceback
assert len(sys.argv) == 2, "Call script with CSV file as parameter"
try:
filename = sys.argv[1]
rows = []
with open(filename, 'r') as f:
dr = csv.DictReader(f)
... | 29.036364 | 76 | 0.5335 |
91249027e806c317e9779bc39288e5e00a0e6fb3 | 997 | py | Python | source/pkgsrc/lang/python36/patches/patch-Lib_ctypes_util.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/lang/python36/patches/patch-Lib_ctypes_util.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/lang/python36/patches/patch-Lib_ctypes_util.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-Lib_ctypes_util.py,v 1.2 2019/03/02 13:23:36 adam Exp $
Fallback to clang.
Look for shared libraries in PkgSrc prefix.
Note: /usr/local will get replaced by SUBST.
--- Lib/ctypes/util.py.orig 2018-12-23 21:37:14.000000000 +0000
+++ Lib/ctypes/util.py
@@ -93,6 +93,8 @@ elif os.name == "posix":
... | 35.607143 | 70 | 0.543631 |
5db172188c8687a050360455473a99bc2ed966a6 | 7,791 | py | Python | Packs/VirusTotal/Integrations/VirusTotalV3/VirusTotalV3_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/VirusTotal/Integrations/VirusTotalV3/VirusTotalV3_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/VirusTotal/Integrations/VirusTotalV3/VirusTotalV3_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import json
from typing import Dict
import pytest
from VirusTotalV3 import (ScoreCalculator, encode_to_base64,
encode_url_to_base64, epoch_to_timestamp,
get_working_id, raise_if_hash_not_valid,
raise_if_ip_not_valid, create_relationships, ge... | 38.37931 | 118 | 0.653575 |
5de2142137b3e12e6b12c9ae33b8de3b655702f7 | 3,084 | py | Python | Packs/FeedIntel471/Integrations/Intel471MalwareIndicator/Intel471MalwareIndicator_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/FeedIntel471/Integrations/Intel471MalwareIndicator/Intel471MalwareIndicator_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/FeedIntel471/Integrations/Intel471MalwareIndicator/Intel471MalwareIndicator_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import pytest
import Intel471MalwareIndicator as feed
BUILD_PARAM_DICT_DATA = [
(
{'credentials': {'identifier': 'username', 'password': 'apikey'}, 'insecure': True,
'search_indicator_type': 'ipv4', 'confidence': 'high', 'auto_detect_type': False, 'proxy': True}, # input
{'confidence': 'h... | 31.793814 | 116 | 0.618677 |
5d65e45143ef3559572347671940326a1af0ea85 | 130 | py | Python | dash/apps.py | bdioui/DashboardFeder | 455737c828f1c04651af495f60d6637131b911f5 | [
"MIT"
] | null | null | null | dash/apps.py | bdioui/DashboardFeder | 455737c828f1c04651af495f60d6637131b911f5 | [
"MIT"
] | null | null | null | dash/apps.py | bdioui/DashboardFeder | 455737c828f1c04651af495f60d6637131b911f5 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class DashConfig(AppConfig):
name = 'dash'
def ready(self):
import dash.signals
| 14.444444 | 33 | 0.692308 |
5373fabc3aaf66ddb6a0a1886fe5e45b87db63bf | 1,296 | py | Python | insomniac/action_runners/core.py | shifenis/Insomniac | 7c9d572b83c29049bc3075073be5549fe821a739 | [
"MIT"
] | 533 | 2020-06-01T10:40:11.000Z | 2022-03-29T17:05:50.000Z | insomniac/action_runners/core.py | shifenis/Insomniac | 7c9d572b83c29049bc3075073be5549fe821a739 | [
"MIT"
] | 399 | 2020-06-01T22:01:55.000Z | 2022-03-29T20:39:29.000Z | insomniac/action_runners/core.py | shifenis/Insomniac | 7c9d572b83c29049bc3075073be5549fe821a739 | [
"MIT"
] | 166 | 2020-06-01T21:51:52.000Z | 2022-03-12T14:14:44.000Z | from abc import ABC
from enum import unique, Enum
@unique
class ActionState(Enum):
PRE_RUN = 0
RUNNING = 1
DONE = 2
SOURCE_LIMIT_REACHED = 3
SESSION_LIMIT_REACHED = 4
class ActionStatus(object):
def __init__(self, state):
self.state = state
self.limit_state = None
def se... | 21.966102 | 111 | 0.68287 |
53fb1e0614d30c12af1b1b83fc83ce282c34638c | 14,850 | py | Python | zmk/trainModel/training.py | MFALHI/MLW | 192cc991df61bd8991a51702a53df6a09448d4f7 | [
"Apache-2.0"
] | 1 | 2020-04-14T15:23:35.000Z | 2020-04-14T15:23:35.000Z | zmk/trainModel/training.py | vadgama/MLW | 5ca2926aadc33d9a8a55cbf07faa472fa03e9f73 | [
"Apache-2.0"
] | null | null | null | zmk/trainModel/training.py | vadgama/MLW | 5ca2926aadc33d9a8a55cbf07faa472fa03e9f73 | [
"Apache-2.0"
] | 1 | 2020-02-29T12:18:09.000Z | 2020-02-29T12:18:09.000Z | from django.shortcuts import render
from django.http import HttpResponse
from django.conf import settings
from rest_framework import permissions
from rest_framework.views import APIView
from rest_framework.response import Response
from django.views.decorators.csrf import csrf_exempt
# from rest_framework.decorators im... | 33.221477 | 150 | 0.752189 |
0709ab26e5763d5814ef5e73e1710ed7d5638020 | 2,426 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/doc_fragments/ce.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | 17 | 2017-06-07T23:15:01.000Z | 2021-08-30T14:32:36.000Z | ansible/ansible/plugins/doc_fragments/ce.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 9 | 2017-06-25T03:31:52.000Z | 2021-05-17T23:43:12.000Z | ansible/ansible/plugins/doc_fragments/ce.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 3 | 2018-05-26T21:31:22.000Z | 2019-09-28T17:00:45.000Z | # -*- coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# Standard files documentation fragment
DOCUMENTATION = r'''
options:
provider:
description:
- A dict object containing connection details.
su... | 39.770492 | 92 | 0.639736 |
0715392871924ab5bc388757e6fdf094db7f1b99 | 161 | py | Python | rawio/align/__init__.py | hdkai/Raw-IO | f0fa928d7ef59a363c6f4c876d642af6dede6ae4 | [
"Apache-2.0"
] | null | null | null | rawio/align/__init__.py | hdkai/Raw-IO | f0fa928d7ef59a363c6f4c876d642af6dede6ae4 | [
"Apache-2.0"
] | null | null | null | rawio/align/__init__.py | hdkai/Raw-IO | f0fa928d7ef59a363c6f4c876d642af6dede6ae4 | [
"Apache-2.0"
] | null | null | null | #
# RawIO
# Copyright (c) 2021 Yusuf Olokoba.
#
from .exposures import align_exposures
from .level import align_level
from .vertical import align_verticals | 20.125 | 38 | 0.770186 |
07591c2bce285bcdb943afc072f4636508fee4ad | 1,694 | py | Python | python/oneflow/compatible/single_client/framework/blob.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 3,285 | 2020-07-31T05:51:22.000Z | 2022-03-31T15:20:16.000Z | python/oneflow/compatible/single_client/framework/blob.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 2,417 | 2020-07-31T06:28:58.000Z | 2022-03-31T23:04:14.000Z | python/oneflow/compatible/single_client/framework/blob.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 520 | 2020-07-31T05:52:42.000Z | 2022-03-29T02:38:11.000Z | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 24.911765 | 72 | 0.664109 |
91e884aab4baa73271317836452b8927a1db63c9 | 1,669 | py | Python | official/cv/unet/src/unet_medical/unet_model.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/unet/src/unet_medical/unet_model.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/unet/src/unet_medical/unet_model.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... | 34.770833 | 85 | 0.609347 |
5301371c57e2cb295c4920978382120016307ac4 | 2,162 | py | Python | Utils/py/ball_detector/experiments/mix.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/ball_detector/experiments/mix.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/ball_detector/experiments/mix.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import naoth
import cv2
import os
import random
import sys
import numpy as np
random.seed()
ballPath = "./selection"
negativePath = "./noball"
outputPath = "./ball"
if __name__ == "__main__":
numPics = 1
if len(sys.argv) > 1:
numPics = int(sys.argv[1])
ballImgList = [x for x in os.l... | 32.757576 | 124 | 0.618409 |
53366e75de96cf20f78c77a551245839abfc0de3 | 496 | py | Python | PMIa/2015/ANDROS_D_A/task_2_2.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2015/ANDROS_D_A/task_2_2.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2015/ANDROS_D_A/task_2_2.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 2. Вариант 2.
# Напишите программу, которая будет выводить на экран наиболее понравившееся вам высказывание, автором которого является Эсхин. Не забудьте о том, что автор должен быть упомянут на отдельной строке.
# Andros D.A.
# 18.03.2016
print("Речи благородного человека, даже если они составлены коряво и... | 55.111111 | 198 | 0.709677 |
728b86a5e18f1b26ee97c4a4119749847b736533 | 942 | py | Python | tools/unvol/conanfile.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 2 | 2020-03-18T18:23:27.000Z | 2020-08-02T15:59:16.000Z | tools/unvol/conanfile.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 5 | 2019-07-07T16:47:47.000Z | 2020-08-10T16:20:00.000Z | tools/unvol/conanfile.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 1 | 2020-03-18T18:23:30.000Z | 2020-03-18T18:23:30.000Z | from conans import ConanFile, CMake, tools
import glob
import os.path
class LocalConanFile(ConanFile):
name = "unvol"
version = "0.5.1"
url = "https://github.com/open-siege/open-siege"
license = "MIT"
author = "Matthew Rindel (matthew@thesiegehub.com)"
build_requires = "cmake/3.22.0"
setti... | 28.545455 | 98 | 0.632696 |
f42f72ebb67a90d96a992392f58e5ccb0ea36aaf | 512 | py | Python | workshop_petstagram/workshop_petstagram/main/migrations/0008_alter_profile_date_of_birth.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | 1 | 2022-03-03T10:16:14.000Z | 2022-03-03T10:16:14.000Z | workshop_petstagram/workshop_petstagram/main/migrations/0008_alter_profile_date_of_birth.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | null | null | null | workshop_petstagram/workshop_petstagram/main/migrations/0008_alter_profile_date_of_birth.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | null | null | null | # Generated by Django 4.0.2 on 2022-02-11 22:13
from django.db import migrations, models
import workshop_petstagram.main.validators
class Migration(migrations.Migration):
dependencies = [
('main', '0007_alter_profile_gender'),
]
operations = [
migrations.AlterField(
model_na... | 25.6 | 126 | 0.667969 |
beb5c89bf198b96510b38ccf5c8b5d033541ec78 | 5,972 | py | Python | frappe-bench/apps/erpnext/erpnext/stock/report/stock_ledger/stock_ledger.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/stock/report/stock_ledger/stock_ledger.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/stock/report/stock_ledger/stock_ledger.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
def execute(filters=None):
columns = get_columns()
item_conditions = get_item_conditions(filters)
item_details = ... | 39.03268 | 122 | 0.721199 |
22910f0900084bf53f7c58bc12f613fba391cab1 | 275 | py | Python | basics/runner_up_score.py | karinakozarova/Learning-Python | 217dfc8ca6931a238445daf0b84e188c02916c52 | [
"MIT"
] | 1 | 2019-04-07T23:14:29.000Z | 2019-04-07T23:14:29.000Z | basics/runner_up_score.py | karinakozarova/Learning-Python | 217dfc8ca6931a238445daf0b84e188c02916c52 | [
"MIT"
] | null | null | null | basics/runner_up_score.py | karinakozarova/Learning-Python | 217dfc8ca6931a238445daf0b84e188c02916c52 | [
"MIT"
] | null | null | null | def remove_values_from_list(the_list, val):
return [value for value in the_list if value != val]
if __name__ == '__main__':
n = int(input())
arr = map(int, input().split())
s = set(arr)
arr = list(s)
arr.sort()
print(arr[len(arr)- 2] )
| 19.642857 | 55 | 0.578182 |
4a5ff5958a879c8a761ea8ed09a9f1d8677f9ea8 | 1,969 | py | Python | storage.py | OrangeB0lt/interview_project_intelX | 66833f8d4c1049d33fb7a4bdeba62ec27e5b16f8 | [
"MIT"
] | null | null | null | storage.py | OrangeB0lt/interview_project_intelX | 66833f8d4c1049d33fb7a4bdeba62ec27e5b16f8 | [
"MIT"
] | null | null | null | storage.py | OrangeB0lt/interview_project_intelX | 66833f8d4c1049d33fb7a4bdeba62ec27e5b16f8 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
'''
Storage engine
'''
import sqlalchemy
import projects_class
class Storage:
"""
Storage class handles storing and pulling from PostgreSQL
"""
__engine = None
__session = None
__ssfactory = None
def __init__(self):
"""
Creates the engine and binds it to... | 27.347222 | 131 | 0.61097 |
6049ebb9f2413316b7872bebe4ea715aee424315 | 21,389 | py | Python | chord_rec/harmalysis/parsers/roman.py | TianxueHu/ChordSymbolRec | d64a5be4f4914e6f682cb6d4079d7ba8a6fc2eac | [
"Unlicense",
"MIT"
] | null | null | null | chord_rec/harmalysis/parsers/roman.py | TianxueHu/ChordSymbolRec | d64a5be4f4914e6f682cb6d4079d7ba8a6fc2eac | [
"Unlicense",
"MIT"
] | null | null | null | chord_rec/harmalysis/parsers/roman.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... | 53.074442 | 242 | 0.735939 |
605e82d4869e4b63fcb85a3c6db4a2ea986fd2cd | 1,975 | py | Python | 2-resources/_External-learning-resources/02-pyth/python-ds-master/data_structures/doubly_linked_list/doubly_linked_list.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_External-learning-resources/02-pyth/python-ds-master/data_structures/doubly_linked_list/doubly_linked_list.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_External-learning-resources/02-pyth/python-ds-master/data_structures/doubly_linked_list/doubly_linked_list.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 1 | 2021-11-05T07:48:26.000Z | 2021-11-05T07:48:26.000Z | class Node:
def __init__(self, data = None, next = None, previous = None):
self.data = data
self.next = next
self.previous = previous
class Lista:
def __init__(self):
self.first = self.last = Node()
def empty(self):
return self.first.data == self.last.data
... | 25.986842 | 124 | 0.547342 |
60f3b567b27b92c2f0b041c098d0d8720741abce | 1,775 | py | Python | resources/mechanics_lib/Hinge.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | 7 | 2016-01-20T02:33:00.000Z | 2021-02-04T04:06:57.000Z | resources/mechanics_lib/Hinge.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | null | null | null | resources/mechanics_lib/Hinge.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | 3 | 2016-10-05T07:20:30.000Z | 2017-11-20T10:36:50.000Z | ###Hexaflexagon Arm
from api.component import Component
from api.edge import Flex
class Hinge(Component):
def defComponents(self):
self.addSubcomponent("bot", "Tetrahedron")
self.addSubcomponent("top", "Tetrahedron")
def defInterfaces(self):
self.newInterface("topedge")
sel... | 34.803922 | 77 | 0.59831 |
8800ccc3c0ea068ab2bb8a31fb189576d1dd4935 | 1,003 | py | Python | python/flask/restful_api/database_setup.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/flask/restful_api/database_setup.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/flask/restful_api/database_setup.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import sys
# for creating the mapper code
from sqlalchemy import Column, ForeignKey, Integer, String
# for configuration and class code
from sqlalchemy.ext.declarative import declarative_base
# for creating foreign key relationship between the tables
from sqlalchemy.orm import relationship
# for configuration
from s... | 26.394737 | 60 | 0.706879 |
1cd26a7642c91d0a93e2b01b8a2bc507425218d3 | 8,493 | py | Python | applications/experimental/pipelines/ui/webapp_question_answering.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | applications/experimental/pipelines/ui/webapp_question_answering.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | applications/experimental/pipelines/ui/webapp_question_answering.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
# Copyright 2021 deepset GmbH. 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.o... | 36.926087 | 144 | 0.591193 |
e818a1286083663c9ea624bc7b092be92deb1ee0 | 379 | py | Python | exercises/de/test_01_03_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/de/test_01_03_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/de/test_01_03_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert (
doc.text == "Ich mag niedliche Katzen und Faultiere."
), "Bist du dir sicher, dass du den Text korrekt verarbeitet hast?"
assert erster_token == doc[0], "Bist du dir sicher, dass du den ersten Token ausgewählt hast?"
assert "print(erster_token.text)" in __solution__, "Drucks... | 47.375 | 98 | 0.686016 |
1c23f72fd34bbd64a32cf2dfbf3549fe3b24d910 | 1,478 | py | Python | cogs/benutzerinfo.py | DestinyofYeet/antonstechbot | b01372431a3a2b51fb83180cf8caa1a168e294ad | [
"MIT"
] | 1 | 2021-04-21T09:01:26.000Z | 2021-04-21T09:01:26.000Z | cogs/benutzerinfo.py | DestinyofYeet/antonstechbot | b01372431a3a2b51fb83180cf8caa1a168e294ad | [
"MIT"
] | null | null | null | cogs/benutzerinfo.py | DestinyofYeet/antonstechbot | b01372431a3a2b51fb83180cf8caa1a168e294ad | [
"MIT"
] | null | null | null | from discord.ext import commands
import discord
class Benutzerinfo(commands.Cog):
def __init__(self, client):
self.client = client
@commands.command(name="benutzerinfo")
async def benutzerinfo_command(self, ctx, member: discord.Member):
embed = discord.Embed(title='Benutzerinfo für {}'.fo... | 39.945946 | 90 | 0.579838 |
1c8de38f694bdc65e76fc0eaec5bb3b3a3b3f39f | 79,095 | py | Python | research/hpc/ocean_model/src/GOMO.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/hpc/ocean_model/src/GOMO.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/hpc/ocean_model/src/GOMO.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... | 49.682789 | 120 | 0.499399 |
98eb381a46ffc788d3b3e45f98e3a19882c94efe | 4,751 | py | Python | custom_components/stadtreinigung_hamburg/sensor.py | topic2k/sensor.stadtreinigung_hamburg | 32420374c5c3d46224d80abfa19c75e89835e9a3 | [
"MIT"
] | 17 | 2019-08-02T20:29:39.000Z | 2021-12-31T18:48:23.000Z | custom_components/stadtreinigung_hamburg/sensor.py | topic2k/sensor.stadtreinigung_hamburg | 32420374c5c3d46224d80abfa19c75e89835e9a3 | [
"MIT"
] | 10 | 2019-08-20T18:27:10.000Z | 2022-01-10T09:04:51.000Z | custom_components/stadtreinigung_hamburg/sensor.py | topic2k/sensor.stadtreinigung_hamburg | 32420374c5c3d46224d80abfa19c75e89835e9a3 | [
"MIT"
] | 7 | 2019-09-04T12:39:41.000Z | 2022-01-09T18:47:59.000Z | import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
import homeassistant.helpers.config_validation as cv
from homeassistant.util import Throttle, slugify
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_NAME, DEVICE_CLASS_TIMESTAMP
from homeassis... | 28.793939 | 86 | 0.662808 |
dc042e5fad2f33323baa98e7282d598259baef5b | 721 | py | Python | pacman-arch/test/pacman/tests/dependency-cycle-fixed-by-upgrade.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/dependency-cycle-fixed-by-upgrade.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/dependency-cycle-fixed-by-upgrade.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Circular dependency fixed by removed dependency"
lp1 = pmpkg("pkg1", "1-1")
lp1.depends = ["pkg2"]
lp2 = pmpkg("pkg2", "1-1")
lp2.depends = ["pkg3"]
lp3 = pmpkg("pkg3", "1-1")
lp3.depends = ["pkg1"]
for p in lp1, lp2, lp3:
self.addpkg2db("local", p);
sp1 = pmpkg("pkg1", "1-2")
sp1.depends = ["... | 21.848485 | 68 | 0.649098 |
90595ce6e7d4d3a618b89d0e1627ecad6564d804 | 7,939 | py | Python | rbac/server/api/roles.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | null | null | null | rbac/server/api/roles.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | 1 | 2019-07-08T22:32:43.000Z | 2019-07-08T22:32:43.000Z | rbac/server/api/roles.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | null | null | null | # 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.503968 | 84 | 0.692782 |
90643ea0e2f13d838a2a042b64f0cf221e2edd63 | 268 | py | Python | Language Proficiency/Python/Itertools/Maximize It!/product_maximize.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | 1 | 2021-02-22T17:37:45.000Z | 2021-02-22T17:37:45.000Z | Language Proficiency/Python/Itertools/Maximize It!/product_maximize.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Language Proficiency/Python/Itertools/Maximize It!/product_maximize.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from itertools import product
if __name__ == "__main__":
K, M = map(int, input().split())
N = [list(map(int, input().split()))[1:] for _ in range(K)]
res = map(lambda x: sum(i*i for i in x) % M, product(*N))
print(max(res))
| 20.615385 | 63 | 0.585821 |
90fca80ec8664bae8cb01af944cc98d9e43d5460 | 8,180 | py | Python | research/cv/ibnnet/modelarts/start.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/ibnnet/modelarts/start.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/ibnnet/modelarts/start.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... | 42.38342 | 114 | 0.663936 |
81b76bd51f55013cb45f2b923c3e518bfb218d53 | 2,761 | py | Python | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/utils/registry.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | 883 | 2020-11-12T11:46:46.000Z | 2022-03-31T18:27:10.000Z | paddlevideo/utils/registry.py | arkofgalaxy/PaddleVideo | 64251233c83b7eb681061b454da198a9082309a6 | [
"Apache-2.0"
] | 233 | 2020-12-09T06:04:59.000Z | 2022-03-28T08:16:51.000Z | paddlevideo/utils/registry.py | arkofgalaxy/PaddleVideo | 64251233c83b7eb681061b454da198a9082309a6 | [
"Apache-2.0"
] | 225 | 2020-11-13T06:21:55.000Z | 2022-03-31T05:36:11.000Z | # Copyright (c) 2020 PaddlePaddle 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 applic... | 28.463918 | 100 | 0.585657 |
81bdc5bf248193c14390d3851280223c7c11820f | 7,137 | py | Python | internal/api.py | cixel/sl-shadow-priest | 3159c79fb305a226aeddfa6b884734ddfc108ccd | [
"MIT"
] | null | null | null | internal/api.py | cixel/sl-shadow-priest | 3159c79fb305a226aeddfa6b884734ddfc108ccd | [
"MIT"
] | null | null | null | internal/api.py | cixel/sl-shadow-priest | 3159c79fb305a226aeddfa6b884734ddfc108ccd | [
"MIT"
] | null | null | null | """submits sims to raidbots and waits for the result"""
import json
import time
import requests
import yaml
import tqdm
with open("config.yml", "r") as ymlfile:
config = yaml.load(ymlfile, Loader=yaml.FullLoader)
num_of_retries = int(config["raidbots"]["numOfRetries"])
retry_interval = int(config["raidbots"]["ret... | 32.889401 | 94 | 0.556536 |
c4c933c6c58e986da4463c08adab90fe988eacc2 | 5,377 | py | Python | yhh_dr_tiezi.py | sambabypapapa/CralwerSet | a76e0660c42ce7aac20b8d07ccc454b6636a8a2a | [
"Apache-2.0"
] | 5 | 2020-08-17T08:37:16.000Z | 2021-06-07T05:02:05.000Z | yhh_dr_tiezi.py | sambabypapapa/CralwerSet | a76e0660c42ce7aac20b8d07ccc454b6636a8a2a | [
"Apache-2.0"
] | null | null | null | yhh_dr_tiezi.py | sambabypapapa/CralwerSet | a76e0660c42ce7aac20b8d07ccc454b6636a8a2a | [
"Apache-2.0"
] | 1 | 2021-06-07T05:02:10.000Z | 2021-06-07T05:02:10.000Z | import CralwerSet.connect_mysql as connect_mysql
import time
import hashlib
from urllib import parse
import requests
import re
import json
import traceback
HEADERS = {
"Connection": "keep-alive",
"User-Agent": "Mozilla/5.0 (Linux; Android 5.1.1; xiaomi mix Build/LMY47I; wv) AppleWebKit/537.36 (KHTML, like Geck... | 34.248408 | 267 | 0.565185 |
482894b083ff2e4e641094021989c5456aa2e05c | 793 | py | Python | aoc2020/day_09/part_2.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | aoc2020/day_09/part_2.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | aoc2020/day_09/part_2.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | from aoc2020 import *
from .part_1 import Solution as Part1
class Solution(SolutionABC):
expected = 62
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self._p1 = Part1(*args, **kwargs)
def solve(self) -> any:
target = self._p1.solve()
message = lis... | 29.37037 | 71 | 0.523329 |
484f8129e3c563babfa61ff52fec0b66cb5c5449 | 1,917 | py | Python | DiceCTF/2021/crypto/garbled/block_cipher.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | DiceCTF/2021/crypto/garbled/block_cipher.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | DiceCTF/2021/crypto/garbled/block_cipher.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | SBoxes = [[15, 1, 7, 0, 9, 6, 2, 14, 11, 8, 5, 3, 12, 13, 4, 10], [3, 7, 8, 9, 11, 0, 15, 13, 4, 1, 10, 2, 14, 6, 12, 5], [4, 12, 9, 8, 5, 13, 11, 7, 6, 3, 10, 14, 15, 1, 2, 0], [2, 4, 10, 5, 7, 13, 1, 15, 0, 11, 3, 12, 14, 9, 8, 6], [3, 8, 0, 2, 13, 14, 5, 11, 9, 1, 7, 12, 4, 6, 10, 15], [14, 12, 7, 0, 11, 4, 13, 15, ... | 33.051724 | 349 | 0.486176 |
962ea6c43b056af2afbacf0af6471b9b315994ff | 1,288 | py | Python | 数据结构/NowCode/15_LinkListClone.py | Blankwhiter/LearningNotes | 83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0 | [
"MIT"
] | null | null | null | 数据结构/NowCode/15_LinkListClone.py | Blankwhiter/LearningNotes | 83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0 | [
"MIT"
] | 3 | 2020-08-14T07:50:27.000Z | 2020-08-14T08:51:06.000Z | 数据结构/NowCode/15_LinkListClone.py | Blankwhiter/LearningNotes | 83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0 | [
"MIT"
] | 2 | 2021-03-14T05:58:45.000Z | 2021-08-29T17:25:52.000Z | # 复杂链表的复制
# 输入一个复杂链表(每个节点中有节点值,以及两个指针,一个指向下一个节点,另一个特殊指针random指向一个随机节点),
# 请对此链表进行深拷贝,并返回拷贝后的头结点。(注意,输出结果中请不要返回参数中的节点引用,否则判题程序会直接返回空)
# 链表结构
class RandomListNode:
def __init__(self, x):
self.label = x
self.next = None
self.random = None
class Solution:
# 返回合并后列表
def Clone(self, pHe... | 25.254902 | 61 | 0.553571 |
739bec122bb744d888001536e3835f85e5bf44f5 | 2,903 | py | Python | 2019/finals/misc-stuffed-finals/bomb_creation/buff.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | 2019/finals/misc-stuffed-finals/bomb_creation/buff.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | 2019/finals/misc-stuffed-finals/bomb_creation/buff.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 26.87963 | 80 | 0.658629 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.