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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
df59fc008c1286ab3cfdd9b4c75f67e9b733223e | 9,076 | py | Python | data-pipeline/src/data_pipeline/datasets/gnomad_sv_v2.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 38 | 2018-02-24T02:33:52.000Z | 2020-03-03T23:17:04.000Z | data-pipeline/src/data_pipeline/datasets/gnomad_sv_v2.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 385 | 2018-02-21T16:53:13.000Z | 2020-03-04T00:52:40.000Z | data-pipeline/src/data_pipeline/datasets/gnomad_sv_v2.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 13 | 2020-05-01T13:03:54.000Z | 2022-02-28T13:12:57.000Z | import itertools
import hail as hl
def x_position(chrom, position):
contig_number = (
hl.case().when(chrom == "X", 23).when(chrom == "Y", 24).when(chrom[0] == "M", 25).default(hl.int(chrom))
)
return hl.int64(contig_number) * 1_000_000_000 + position
TOP_LEVEL_INFO_FIELDS = [
"ALGORITHMS",
... | 32.647482 | 112 | 0.546276 |
635cb98a4feb9f9e2dd3328ee7095013d3b123b7 | 1,917 | py | Python | ryu/app/otherApp/my_load_balancer.py | yuesir137/SDN-CLB | 58b12a9412cffdf2945440528b1885c8899edd08 | [
"Apache-2.0"
] | null | null | null | ryu/app/otherApp/my_load_balancer.py | yuesir137/SDN-CLB | 58b12a9412cffdf2945440528b1885c8899edd08 | [
"Apache-2.0"
] | null | null | null | ryu/app/otherApp/my_load_balancer.py | yuesir137/SDN-CLB | 58b12a9412cffdf2945440528b1885c8899edd08 | [
"Apache-2.0"
] | null | null | null | """
author:Yuegb
date:2021,05,06
"""
import time
from pymongo import MongoClient
client = MongoClient('127.0.0.1', 27017)
# client = MongoClient('mongodb://18.219.185.25:27017/')
db = client.elastiCon # db name: elastiCon
controllers = db.controllers # Document name: controllers - To keep track of controller data
f... | 30.919355 | 93 | 0.593636 |
8966128fd09d6455d4f4792070f124953e341dd5 | 3,001 | py | Python | hardware/chip/haas1000/_haas1000_alios_lds.py | Gabrielle-OyO/AliOS-Things | a923550ef98bcba49070b64b90b09d010239c25a | [
"Apache-2.0"
] | 4,538 | 2017-10-20T05:19:03.000Z | 2022-03-30T02:29:30.000Z | hardware/chip/haas1000/_haas1000_alios_lds.py | Gabrielle-OyO/AliOS-Things | a923550ef98bcba49070b64b90b09d010239c25a | [
"Apache-2.0"
] | 1,088 | 2017-10-21T07:57:22.000Z | 2022-03-31T08:15:49.000Z | hardware/chip/haas1000/_haas1000_alios_lds.py | willianchanlovegithub/AliOS-Things | 637c0802cab667b872d3b97a121e18c66f256eab | [
"Apache-2.0"
] | 1,860 | 2017-10-20T05:22:35.000Z | 2022-03-27T10:54:14.000Z | #!/usr/bin/env python
import os, sys, re, codecs, shutil, platform
# read params from file if exists
params = sys.argv[1:]
if os.path.isfile(sys.argv[1]):
with codecs.open(sys.argv[1], 'r', 'UTF-8') as fh:
params = fh.read().split("\n")
# appdend user-defined args
if len(sys.argv) > 2:
para... | 33.719101 | 198 | 0.553149 |
9854e9c4ad9910be2ddca4eb648324f5acbf6bf2 | 314 | py | Python | development/conf.py | ecs-org/ecs-docs | 0d685db17731a35c90852d7f75fbdf3791bd696c | [
"Apache-2.0"
] | 1 | 2020-01-04T05:51:39.000Z | 2020-01-04T05:51:39.000Z | development/conf.py | ecs-org/ecs-docs | 0d685db17731a35c90852d7f75fbdf3791bd696c | [
"Apache-2.0"
] | null | null | null | development/conf.py | ecs-org/ecs-docs | 0d685db17731a35c90852d7f75fbdf3791bd696c | [
"Apache-2.0"
] | 1 | 2021-11-23T15:41:01.000Z | 2021-11-23T15:41:01.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
sys.path.append(os.path.join(os.getcwd(),".."))
from include.baseconf import *
project = 'ecs-development'
language = 'en'
latex_documents = [
(master_doc, '{}.tex'.format(project), 'ECS Development Documentation',
author, 'howto'),
]
| 20.933333 | 75 | 0.665605 |
63e0e85939f97bdcea0b416a62948ee740b6d716 | 6,078 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/ch08_binary_trees/solutions/ex13_print_tree_V1.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch08_binary_trees/solutions/ex13_print_tree_V1.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch08_binary_trees/solutions/ex13_print_tree_V1.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
from ch08_binary_trees.util import TreeUtils
from ch08_binary_trees.intro.intro_binary_tree_node import BinaryTreeNode
from ch08_binary_trees.solutions.ex03_tree_height import get_height
from ch08_binary_trees.solutions.ex07_rotati... | 24.215139 | 79 | 0.656795 |
6190493bbb26089cb905875e629499044f0264b5 | 1,837 | py | Python | shortcut-creator.py | derskeal/lsc | 6c8e1122c3ba64b64014ed97e71b72b8be0130bb | [
"MIT"
] | null | null | null | shortcut-creator.py | derskeal/lsc | 6c8e1122c3ba64b64014ed97e71b72b8be0130bb | [
"MIT"
] | null | null | null | shortcut-creator.py | derskeal/lsc | 6c8e1122c3ba64b64014ed97e71b72b8be0130bb | [
"MIT"
] | null | null | null | #!/usr/bin/ python
import sys
import os
from tkinter import Tk
from tkinter import filedialog
shebang = str("#!/usr/bin/env xdg-open")
declarer = str("[Desktop Entry]")
AppType = str("Type=Application")
Terminal = str("Terminal=false")
ShortcutName = str("Name=") #Name of Shortcut
Exec = str("Exec=") #path to ex... | 24.493333 | 107 | 0.695155 |
9cbfe8f39f526dcea1a2687510f9357fed8f1e0a | 304 | py | Python | exercises/pt/solution_01_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/pt/solution_01_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/pt/solution_01_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
# Carregue o modelo pequeno do idioma inglês "en_core_web_sm"
nlp = spacy.load("en_core_web_sm")
text = "It’s official: Apple is the first U.S. public company to reach a $1 trillion market value"
# Processe o texto
doc = nlp(text)
# Imprima o atributo texto do documento
print(doc.text)
| 23.384615 | 98 | 0.75 |
14156ed7a02b6deafde3eac75a6309a65aa3186a | 6,203 | py | Python | python_experiments/paper_figures/vldbj/draw_varying_delta.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 8 | 2020-04-14T23:17:00.000Z | 2021-06-21T12:34:04.000Z | python_experiments/paper_figures/vldbj/draw_varying_delta.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | null | null | null | python_experiments/paper_figures/vldbj/draw_varying_delta.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 1 | 2021-01-17T16:26:50.000Z | 2021-01-17T16:26:50.000Z | import matplotlib.pyplot as plt
from data_analysis.vldbj_data_parsing.varying_delta_statistics import *
from paper_figures.vldbj.draw_indexing_time_size import TICK_SIZE, LEGEND_SIZE, LABEL_SIZE, reads_d_tag, reads_rq_tag
import json
import itertools
from paper_figures.vldbj.draw_varying_c import us_to_ms_factor, larg... | 41.07947 | 118 | 0.638884 |
dcd3e9fe85c25d5f4b9917a2f23f22b5538eb3ea | 1,016 | py | Python | jumeaux/notification_handlers/__init__.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 11 | 2017-10-02T01:29:12.000Z | 2022-03-31T08:37:22.000Z | jumeaux/notification_handlers/__init__.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 79 | 2017-07-16T14:47:17.000Z | 2022-03-31T08:49:14.000Z | jumeaux/notification_handlers/__init__.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 2 | 2019-01-28T06:11:58.000Z | 2021-01-25T07:21:21.000Z | # -*- coding: utf-8 -*-
import sys
from jumeaux.logger import Logger
from jumeaux.models import Notifier
from jumeaux.domain.config.vo import NotifierType
from jumeaux.notification_handlers.base import NotificationHandler
from jumeaux.notification_handlers.slack import SlackNotificationHandler
from jumeaux.notificati... | 36.285714 | 81 | 0.724409 |
dcecff8de90c06f098208c87e5ecb31dd069b89a | 419 | py | Python | ___Python/RomanS/untitled/p07_file_io/m02_count_files.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/RomanS/untitled/p07_file_io/m02_count_files.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/RomanS/untitled/p07_file_io/m02_count_files.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
# Zähle die Anzahl Ordner in einem Ordner (incl. aller Unterordner)
def count_dirs(path):
subdirs = []
subdirs = [subdir for subdir in path.iterdir() if subdir.is_dir()]
count = 0
for subdir in subdirs:
count += count_dirs(subdir)
return count + 1
# co... | 26.1875 | 71 | 0.658711 |
6cf5fd33227fc35b9effb4684dc424119a16483c | 1,985 | py | Python | src/onegov/org/views/homepage.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/views/homepage.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/views/homepage.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | """ The onegov organisation homepage. """
from morepath import redirect
from onegov.core.security import Public
from onegov.core.widgets import inject_variables
from onegov.directory import DirectoryCollection
from onegov.event import OccurrenceCollection
from onegov.form import FormCollection
from onegov.org import O... | 32.540984 | 76 | 0.730479 |
2c6885a93af481e43680d7ad4e4c382ce72c57c5 | 415 | py | Python | Curso-Em-Video-Python/2Exercicios/072_Numero_por_Extenso.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/072_Numero_por_Extenso.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/072_Numero_por_Extenso.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | numero = ('Zero', 'Um', 'Dois', 'Tres', 'Quatro', 'Cinco', 'Seis', 'Sete', 'Oito', 'Nove', 'Dez', 'Onze', 'Doze', 'Treze', 'Quartoze', 'Quinze', 'Dezesseis', 'Dezessete', 'Dezoito', 'Dezenove', 'Vinte')
while True:
usu = int(input('Digite um numero entre 0 e 20: '))
resp = len(numero)
if 0 <= usu <= 20:
... | 46.111111 | 202 | 0.575904 |
e2cbb12fb960e3985413826ba6fdcb80a922ea56 | 562 | py | Python | measure/system/CpuSystemMeter.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | measure/system/CpuSystemMeter.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | measure/system/CpuSystemMeter.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | import os
import sys
import psutil
sys.path.append(os.path.dirname(__file__))
from measure.system.AbstractSystemMeter import AbstractSystemMeter
class CpuSystemMeter(AbstractSystemMeter):
def __init__(self):
AbstractSystemMeter.__init__(self, "CPU")
self.process = None
def _start(self):
... | 21.615385 | 70 | 0.704626 |
391c2a7fa9918f3f2caeac8a29875e7db1309eb7 | 381 | py | Python | tools/pythonpkg/tests/fast/pandas/test_append_df.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 2,816 | 2018-06-26T18:52:52.000Z | 2021-04-06T10:39:15.000Z | tools/pythonpkg/tests/fast/pandas/test_append_df.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 1,310 | 2021-04-06T16:04:52.000Z | 2022-03-31T13:52:53.000Z | tools/pythonpkg/tests/fast/pandas/test_append_df.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 270 | 2021-04-09T06:18:28.000Z | 2022-03-31T11:55:37.000Z | import duckdb
import pandas as pd
class TestAppendDF(object):
def test_df_to_table_append(self, duckdb_cursor):
conn = duckdb.connect()
conn.execute("Create table integers (i integer)")
df_in = pd.DataFrame({'numbers': [1,2,3,4,5],})
conn.append('integers',df_in)
assert con... | 34.636364 | 79 | 0.656168 |
1a3e8340ff7474ce62e72664f31460dcf7e45715 | 901 | py | Python | publ/maintenance.py | PlaidWeb/Publ | 67efc5e32bf25dbac72a83d1167de038b79db5a7 | [
"MIT"
] | 27 | 2018-11-30T21:32:26.000Z | 2022-03-20T19:46:25.000Z | publ/maintenance.py | PlaidWeb/Publ | 67efc5e32bf25dbac72a83d1167de038b79db5a7 | [
"MIT"
] | 249 | 2018-09-30T07:04:37.000Z | 2022-03-29T04:31:00.000Z | publ/maintenance.py | fluffy-critter/Publ | 868c5a17c605707dde4d1a95d79405301bd12f05 | [
"MIT"
] | 4 | 2019-03-01T06:46:13.000Z | 2019-06-30T17:45:46.000Z | """ Periodic maintenance tasks """
import time
import typing
class Maintenance:
""" Container for periodic maintenance tasks """
def __init__(self, app):
self.app = app
self.tasks: typing.Dict[typing.Callable[[], None],
typing.Dict[str, float]] = {}
def r... | 32.178571 | 77 | 0.551609 |
1abed3d358b69cc3293a7a3bd0187f6c28989ce8 | 772 | pyde | Python | sketches/rosette2/rosette2.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/rosette2/rosette2.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/rosette2/rosette2.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | n = 6
d = 71
def setup():
size(420, 420)
this.surface.setTitle("Maurer Rose")
noFill()
noLoop()
def draw():
global n, d
background(235, 215, 182)
translate(width/2, height/2)
stroke(255, 0, 0)
strokeWeight(4)
with beginClosedShape():
i = 0
while (i < d*TWO_... | 20.864865 | 40 | 0.453368 |
20575d33f8da7c36005177ac4f04f78a4720c3ff | 3,725 | py | Python | Packs/Cherwell/Scripts/CherwellGetIncident/CherwellGetIncident.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Cherwell/Scripts/CherwellGetIncident/CherwellGetIncident.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Cherwell/Scripts/CherwellGetIncident/CherwellGetIncident.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 *
args = demisto.args()
# ####################################################################################
# ############################## CONFIGURATION PART ##################################
# ####################... | 38.010204 | 120 | 0.628725 |
37328720a8c11d0b8aa0ce385aabe63bccf69fde | 3,072 | py | Python | docker/api/api/endpoints/edit_districts.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | 2 | 2021-03-23T20:32:38.000Z | 2021-04-21T11:20:12.000Z | docker/api/api/endpoints/edit_districts.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | 4 | 2021-04-19T11:00:55.000Z | 2021-04-20T08:21:48.000Z | docker/api/api/endpoints/edit_districts.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Corona-Info-App
#
# © 2020 Tobias Höpp
# Include dependencies
from flask import request, jsonify
# Include modules
from main import api, db, jwt
from flask_jwt_extended import jwt_required
from models.districts import districts, regions
from models.cron import cron
#import utils
from utils... | 31.030303 | 100 | 0.53776 |
37bb93f2108d56dc71e12ebec4ee11aee44c9e59 | 4,017 | py | Python | tests/systemtest.py | stg93/blaulichtsms_einsatzmonitor | db595f535ece0f944ec70a9eac70af7b667f63ef | [
"MIT"
] | 18 | 2017-07-24T18:08:04.000Z | 2021-05-06T06:50:22.000Z | tests/systemtest.py | stg93/blaulichtsms_einsatzmonitor | db595f535ece0f944ec70a9eac70af7b667f63ef | [
"MIT"
] | 19 | 2018-09-25T20:42:17.000Z | 2021-11-23T21:26:18.000Z | tests/systemtest.py | stg93/blaulichtsms_einsatzmonitor | db595f535ece0f944ec70a9eac70af7b667f63ef | [
"MIT"
] | 11 | 2018-05-05T04:49:41.000Z | 2022-02-18T17:33:13.000Z | import configparser
from multiprocessing import Process
from blaulichtsmscontroller import BlaulichtSmsController
from chromiumbrowsercontroller import ChromiumBrowserController
from main import get_logging_config, set_up_logging, get_cec_controller
from tests import dashboardapimock
from tests.alarmmonitortest import... | 42.284211 | 114 | 0.718198 |
8085242a4b28ece642f6c3c557fc95df25d1c5f8 | 1,259 | py | Python | DEFCON/2021/Quals/crypto/back-to-qoo/service.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | DEFCON/2021/Quals/crypto/back-to-qoo/service.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | DEFCON/2021/Quals/crypto/back-to-qoo/service.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
This is a public file
"""
from players import zardus, hacker, adamd
from game import Game, WIN, LOSE, GAME_DESCRIPTION
from backend import setup_game, setup_chat, stop
PLAYS = 128
THRESHOLD = 0.85
def game(hacker, zardus):
game_network = setup_game(hacker, zardus, PLAYS)
print(GA... | 23.754717 | 70 | 0.619539 |
03cb7266792775e80074070cb3152a9f486e6663 | 114 | py | Python | retro/cores/gba/src/platform/python/tests/mgba/test_core.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 2,706 | 2018-04-05T18:28:50.000Z | 2022-03-29T16:56:59.000Z | retro/cores/gba/src/platform/python/tests/mgba/test_core.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 242 | 2018-04-05T22:30:42.000Z | 2022-03-19T01:55:11.000Z | retro/cores/gba/src/platform/python/tests/mgba/test_core.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 464 | 2018-04-05T19:10:34.000Z | 2022-03-28T13:33:32.000Z | import pytest
def test_core_import():
try:
import mgba.core
except:
raise AssertionError
| 14.25 | 28 | 0.640351 |
45ddfcdaf1618a9c077b21aee458c90335a505ee | 98 | py | Python | src/ska_sdp_config/entity/__init__.py | ska-telescope/sdp-config | c4377c4fb0cfbad805b58163c1559fd7a574029e | [
"BSD-3-Clause"
] | 2 | 2019-07-15T09:49:34.000Z | 2019-10-14T16:04:17.000Z | src/ska_sdp_config/entity/__init__.py | ska-telescope/sdp-config | c4377c4fb0cfbad805b58163c1559fd7a574029e | [
"BSD-3-Clause"
] | 17 | 2019-07-15T14:51:50.000Z | 2021-06-02T00:29:43.000Z | src/config_db/ska_sdp_config/entity/__init__.py | ska-telescope/sdp-configuration-prototype | 8c6cbda04a83b0e16987019406ed6ec7e1058a31 | [
"BSD-3-Clause"
] | 1 | 2019-10-10T08:16:48.000Z | 2019-10-10T08:16:48.000Z | """Configuration entities."""
from .pb import ProcessingBlock
from .deployment import Deployment
| 19.6 | 34 | 0.795918 |
ff341d596698a175b29bbc8ee5e30191a84b3226 | 591 | py | Python | view/docView.py | Limatationz/pandemiesimulator | 91d21fda2f9c77d616a9e9401271fc044b421007 | [
"MIT"
] | null | null | null | view/docView.py | Limatationz/pandemiesimulator | 91d21fda2f9c77d616a9e9401271fc044b421007 | [
"MIT"
] | null | null | null | view/docView.py | Limatationz/pandemiesimulator | 91d21fda2f9c77d616a9e9401271fc044b421007 | [
"MIT"
] | null | null | null | """
Element of the view.
Contains the DocView class.
"""
import os
from PyQt5.QtCore import QUrl
from PyQt5.QtWidgets import QMainWindow
class DocView(QMainWindow):
"""A DocView which shows the documentation inside a WebEngine."""
def __init__(self):
"""Inits the DocView."""
super(D... | 25.695652 | 100 | 0.685279 |
ff4850b3105c246fb5d06e3eb305152d238fa717 | 723 | py | Python | src/python/BI/Matplotlib.py | coulsonzero/webProject | 46ba2456620496f376ed954a6469381b8142e0f6 | [
"MIT"
] | null | null | null | src/python/BI/Matplotlib.py | coulsonzero/webProject | 46ba2456620496f376ed954a6469381b8142e0f6 | [
"MIT"
] | null | null | null | src/python/BI/Matplotlib.py | coulsonzero/webProject | 46ba2456620496f376ed954a6469381b8142e0f6 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import pandas as pd
import os
s = pd.Series([18, 42, 9, 32, 81, 64, 3])
# df = pd.read_csv("prople.csv")
s.plot(kind='bar')
plt.savefig('plot.png')
"""
df[df['month']==6]['deaths].plot()
df[df['month']==6]['cases', 'deaths].plot()
(df[df['month']==6]['cases','deaths]).sum().plot(kind... | 19.540541 | 98 | 0.62379 |
470f63da46512b64630a0af78ea378fe4af07339 | 920 | py | Python | src/spark/goodbyes/goodbye_plugins.py | simonhodder/spark | 1062e3092996f82f7bc2c852d6444c2be2a1e296 | [
"MIT"
] | null | null | null | src/spark/goodbyes/goodbye_plugins.py | simonhodder/spark | 1062e3092996f82f7bc2c852d6444c2be2a1e296 | [
"MIT"
] | null | null | null | src/spark/goodbyes/goodbye_plugins.py | simonhodder/spark | 1062e3092996f82f7bc2c852d6444c2be2a1e296 | [
"MIT"
] | null | null | null |
from spark.model import User
from spark.model import Address
from spark.plugin import GoodbyePlugin
DISCRETES = {}
def register(model):
def inner(cls):
print(cls)
print(model)
DISCRETES[model] = cls
return cls
return inner
class GoodbyeModel(GoodbyePlugin):
def __init... | 18.039216 | 51 | 0.618478 |
5bcec7db74ed7d7a6fb425833ab0929b0925e35c | 3,799 | py | Python | plugins/shortener/shortener.py | fernanluis/fernanluis.github.io | eb063d40f2893fb9dd5b22662f343827aa6b157a | [
"MIT"
] | 1 | 2021-02-15T12:19:44.000Z | 2021-02-15T12:19:44.000Z | plugins/shortener/shortener.py | fernanluis/fernanluis.github.io | eb063d40f2893fb9dd5b22662f343827aa6b157a | [
"MIT"
] | null | null | null | plugins/shortener/shortener.py | fernanluis/fernanluis.github.io | eb063d40f2893fb9dd5b22662f343827aa6b157a | [
"MIT"
] | null | null | null | # acortador de enlace crea una página de HTML con una etiqueta META refresh
# el refresh es la explicitar una URL
import os # biblioteca del sistma operativo
import json # librería json, nativa de la biblioteca estándar de python
from pathlib import Path # para trabar con rutas de directorio
from pelican import signal... | 56.701493 | 186 | 0.745459 |
34106983e51e83cb84c5f107c2c30e357292b80e | 92 | py | Python | 2014/10/hh-ratios-ages/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2014/10/hh-ratios-ages/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2014/10/hh-ratios-ages/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 7 | 2015-04-04T04:45:54.000Z | 2021-02-18T11:12:48.000Z | #!/usr/bin/env python
COPY_GOOGLE_DOC_KEY = '1HaLMpYIQA6KCbvgc66OiaeF8KLP01oa659gLOT3Vbv4'
| 23 | 68 | 0.847826 |
1b4f58872803135f4655a5f01abdc4f0c543c6be | 92 | py | Python | 2014/04/min-wage-median/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2014/04/min-wage-median/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2014/04/min-wage-median/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 7 | 2015-04-04T04:45:54.000Z | 2021-02-18T11:12:48.000Z | #!/usr/bin/env python
COPY_GOOGLE_DOC_KEY = '0Ala-N4Y4VPXIdEFPRENPODJOalpTa2trOEQ5RzB0TkE'
| 23 | 68 | 0.836957 |
1b64791168d5e91513702288154f6ab08dbbaf47 | 4,557 | py | Python | public/Crawl.py | victorycjw/Zilch-Film-Workshop | 833a6192b1f5941dd9c9c393f01bcbbc8908a24b | [
"Apache-2.0"
] | null | null | null | public/Crawl.py | victorycjw/Zilch-Film-Workshop | 833a6192b1f5941dd9c9c393f01bcbbc8908a24b | [
"Apache-2.0"
] | null | null | null | public/Crawl.py | victorycjw/Zilch-Film-Workshop | 833a6192b1f5941dd9c9c393f01bcbbc8908a24b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# coding: UTF-8
# -*- coding:utf-8 -*-
import re
import threading
import os
from urllib2 import Request,urlopen,URLError,HTTPError
from lxml import etree
class myThread (threading.Thread): #继承父类threading.Thread
def __init__(self, url, newdir,CrawledURLs):
threading.Thread.__init__(self)
... | 34.78626 | 84 | 0.487601 |
846a919253f75be2cf96419edfd2cbf418dc2d7f | 19 | py | Python | __init__.py | vukvojta/wolf | 0831b706203f654c72a1c6cbb97d00988b07ccae | [
"MIT"
] | 1 | 2019-04-26T08:40:01.000Z | 2019-04-26T08:40:01.000Z | __init__.py | vukvojta/wolf | 0831b706203f654c72a1c6cbb97d00988b07ccae | [
"MIT"
] | null | null | null | __init__.py | vukvojta/wolf | 0831b706203f654c72a1c6cbb97d00988b07ccae | [
"MIT"
] | null | null | null | from wolf import *
| 9.5 | 18 | 0.736842 |
049df1c23ded3eb56afe6df1d118819c5527b267 | 5,123 | py | Python | engine/__init__.py | HyechurnJang/rdhcp | 6e9e983527a501b3f0d1bfcb796b62868b5b6292 | [
"Apache-2.0"
] | null | null | null | engine/__init__.py | HyechurnJang/rdhcp | 6e9e983527a501b3f0d1bfcb796b62868b5b6292 | [
"Apache-2.0"
] | null | null | null | engine/__init__.py | HyechurnJang/rdhcp | 6e9e983527a501b3f0d1bfcb796b62868b5b6292 | [
"Apache-2.0"
] | 1 | 2020-10-07T00:24:45.000Z | 2020-10-07T00:24:45.000Z |
import os
import re
from pygics import rest, Lock
from .core import controller
from .model import Interface, NameSpace, Host
lock = Lock()
@rest('GET', '/find')
def find_host(request, namespace, ip):
try: return controller.findHost(namespace, ip)
except Exception as e: return {'error' : str(e)}
... | 32.424051 | 101 | 0.595549 |
b6d281881fe8f90e8b4906ba9bff011e9dc77f3a | 8,589 | py | Python | helper/cleaner/checking_masks.py | fishial/Object-Detection-Model | 4792f65ea785156a8e240d9cdbbc0c9d013ea0bb | [
"CC0-1.0"
] | 1 | 2022-01-03T14:00:17.000Z | 2022-01-03T14:00:17.000Z | helper/cleaner/checking_masks.py | fishial/Object-Detection-Model | 4792f65ea785156a8e240d9cdbbc0c9d013ea0bb | [
"CC0-1.0"
] | null | null | null | helper/cleaner/checking_masks.py | fishial/Object-Detection-Model | 4792f65ea785156a8e240d9cdbbc0c9d013ea0bb | [
"CC0-1.0"
] | 1 | 2021-12-21T09:50:53.000Z | 2021-12-21T09:50:53.000Z | #!/usr/bin/env python3
"""COCO Dataset Viewer.
View images with bboxes from the COCO dataset.
"""
import sys
sys.path.insert(1, '/Users/admin/Desktop/Codahead/Object-Detection-Model')
import argparse
import os
import json
import logging
import urllib.request as ur
import numpy as np
import cv2
from os import listdir
... | 35.057143 | 147 | 0.584469 |
b621bea307a96fb6fede1a79477008e6fe6d8908 | 1,331 | py | Python | gestionProcesamientoDatos/migrations/0003_metodospostprocesamiento_metodospreprocesamiento.py | AnuTor/UniNeuroLab | 5825f440d4663650f038083f3da05229cc5ada4f | [
"Apache-2.0"
] | 1 | 2021-01-09T01:20:45.000Z | 2021-01-09T01:20:45.000Z | gestionProcesamientoDatos/migrations/0003_metodospostprocesamiento_metodospreprocesamiento.py | AnuTor/UniNeuroLab | 5825f440d4663650f038083f3da05229cc5ada4f | [
"Apache-2.0"
] | 1 | 2021-01-09T00:53:55.000Z | 2021-01-09T00:53:55.000Z | gestionProcesamientoDatos/migrations/0003_metodospostprocesamiento_metodospreprocesamiento.py | AnuTor/UniNeuroLab | 5825f440d4663650f038083f3da05229cc5ada4f | [
"Apache-2.0"
] | 1 | 2021-01-07T23:57:28.000Z | 2021-01-07T23:57:28.000Z | # Generated by Django 2.2.17 on 2021-01-21 21:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('gestionProcesamientoDatos', '0002_auto_20210121_2120'),
]
operations = [
migrations.CreateModel(
name='metodosPostprocesamiento... | 41.59375 | 114 | 0.62284 |
b6a747c2f2f7334b860c2fd579e53d6bc23edb01 | 18,098 | py | Python | tuta/prepare.py | PseudoLabs-Demo/TUTA_table_understanding | d0f3fe2f15c56a5ea9f593b210296f170fc74558 | [
"MIT"
] | 36 | 2021-06-15T01:04:27.000Z | 2022-03-19T16:36:54.000Z | tuta/prepare.py | PseudoLabs-Demo/TUTA_table_understanding | d0f3fe2f15c56a5ea9f593b210296f170fc74558 | [
"MIT"
] | 6 | 2021-09-03T11:29:36.000Z | 2021-12-15T11:33:57.000Z | tuta/prepare.py | PseudoLabs-Demo/TUTA_table_understanding | d0f3fe2f15c56a5ea9f593b210296f170fc74558 | [
"MIT"
] | 8 | 2021-11-03T04:32:36.000Z | 2022-02-02T13:43:47.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
""" Data pre-processing.
Build a dataset pre-processing object according to the source types.
Distributed building and saving with multiple workers.
"""
import os
import pickle
import argparse
import reader as rdr
import tokenizer as tknr
from multiproc... | 47.751979 | 156 | 0.618521 |
fcd0ff5215715d615a041b7eb7d1f44099afce39 | 1,683 | py | Python | src/visitpy/pyavt/examples/py_expr.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/visitpy/pyavt/examples/py_expr.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/visitpy/pyavt/examples/py_expr.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # Example VisIt Python Expression
#
# Example embedded python expression that creates a scalar wave
# pattern on a rectilinear mesh.
#
# This expression works on the rect2d.silo & rect3d.silo datasets.
#
# Usage:
# Load in the Expressions window or run with provided driver:
# visit -o path/to/rect2d.silo -nowin -cli... | 35.0625 | 69 | 0.621509 |
94d0e6238a8ce41cca4ee336c14227d0b66e4d8b | 3,005 | py | Python | 3rdparty/webkit/Source/WebCore/PAL/AVFoundationSupport.py | mchiasson/PhaserNative | f867454602c395484bf730a7c43b9c586c102ac2 | [
"MIT"
] | null | null | null | 3rdparty/webkit/Source/WebCore/PAL/AVFoundationSupport.py | mchiasson/PhaserNative | f867454602c395484bf730a7c43b9c586c102ac2 | [
"MIT"
] | null | null | null | 3rdparty/webkit/Source/WebCore/PAL/AVFoundationSupport.py | mchiasson/PhaserNative | f867454602c395484bf730a7c43b9c586c102ac2 | [
"MIT"
] | 1 | 2019-01-25T13:55:25.000Z | 2019-01-25T13:55:25.000Z | #!/usr/bin/env python
# Copyright (C) 2015 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this li... | 46.230769 | 85 | 0.760732 |
94eaeac1d8719fc11bfcf52ac791e9e59dfc0c5b | 701 | py | Python | leetcode/209-Minimum-Size-Subarray-Sum/MinSizeSubarrSum_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/209-Minimum-Size-Subarray-Sum/MinSizeSubarrSum_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/209-Minimum-Size-Subarray-Sum/MinSizeSubarrSum_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution(object):
def minSubArrayLen(self, s, nums):
"""
:type s: int
:type nums: List[int]
:rtype: int
"""
i, j = 0, 0
tmp, res = 0, len(nums)
if sum(nums) < s:
return 0
while j < len(nums):
if tmp < s:
... | 25.035714 | 38 | 0.312411 |
a217317582dd0631af6c5634546aab40ce82769d | 17,481 | py | Python | Contrib-Microsoft/Olympus_rack_manager/python-ocs/ocscli/ocsshell.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 5 | 2019-11-11T07:57:26.000Z | 2022-03-28T08:26:53.000Z | Contrib-Microsoft/Olympus_rack_manager/python-ocs/ocscli/ocsshell.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 3 | 2019-09-05T21:47:07.000Z | 2019-09-17T18:10:45.000Z | Contrib-Microsoft/Olympus_rack_manager/python-ocs/ocscli/ocsshell.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 11 | 2019-07-20T00:16:32.000Z | 2022-01-11T14:17:48.000Z | # Copyright (C) Microsoft Corporation. All rights reserved.
# 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 2
# of the License, or (at your option) any later version.
# -*- codi... | 34.276471 | 160 | 0.473142 |
bf93c968f9475dbc1397c699e2091f1f4a0bae68 | 577 | py | Python | haas_lib_bundles/python/docs/examples/classifying_rubbish/esp32/code/irdistance.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/docs/examples/classifying_rubbish/esp32/code/irdistance.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/docs/examples/classifying_rubbish/esp32/code/irdistance.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- encoding: utf-8 -*-
'''
@File : irdistance.py
@Description: 红外传感器
@Author : 风裁
@version : 1.0
'''
from driver import GPIO
class IRDISTANCE(object):
def __init__(self, gpioObj):
self.gpioObj = None
if not isinstance(gpioObj, GPIO):
r... | 22.192308 | 62 | 0.594454 |
bfa63ef874d34724c4c3086e4faf2324251a8ee3 | 296 | py | Python | Licence 1/I11/TP4/ex4.2.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 8 | 2020-11-26T20:45:12.000Z | 2021-11-29T15:46:22.000Z | Licence 1/I11/TP4/ex4.2.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | null | null | null | Licence 1/I11/TP4/ex4.2.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 6 | 2020-10-23T15:29:24.000Z | 2021-05-05T19:10:45.000Z | liste = ["axel", "coezard", "transporation", "space", "elon", "musk"]
inf5 = []
sup10 = []
for word in liste:
if len(word) < 5: inf5 += [word]
elif len(word) > 10: sup10 += [word]
print("Mots:", liste)
print("Mots de taille inf. à 5:", inf5)
print("Mots de taille sup. à 10:", sup10)
| 22.769231 | 69 | 0.584459 |
bfb908810a327717a10c312e0e39ab663da3f60f | 230 | py | Python | docs/examples/5-CloudAPI/periodapi.py | scuervo91/dcapy | 46c9277e607baff437e5707167476d5f7e2cf80c | [
"MIT"
] | 4 | 2021-05-21T13:26:10.000Z | 2021-11-15T17:17:01.000Z | docs/examples/5-CloudAPI/periodapi.py | scuervo91/dcapy | 46c9277e607baff437e5707167476d5f7e2cf80c | [
"MIT"
] | null | null | null | docs/examples/5-CloudAPI/periodapi.py | scuervo91/dcapy | 46c9277e607baff437e5707167476d5f7e2cf80c | [
"MIT"
] | null | null | null | from dcapy.auth import Credential
from dcapy.schedule import Period
cred = Credential()
cred.login('uuser','password')
p = Period()
p.get_db('820f6684-1e30-4d55-bff6-ae4363b9d000',cred)
print(p)
print(p.generate_forecast())
| 15.333333 | 53 | 0.752174 |
1591b65081658fcf2b3fadee83310809d2988a25 | 3,904 | py | Python | src/main/python/atorlib/blebluepybase.py | BikeAtor/WoMoAtor | 700cc8b970dcfdd5af2f471df1a223d2a38cb1bf | [
"Apache-2.0"
] | null | null | null | src/main/python/atorlib/blebluepybase.py | BikeAtor/WoMoAtor | 700cc8b970dcfdd5af2f471df1a223d2a38cb1bf | [
"Apache-2.0"
] | null | null | null | src/main/python/atorlib/blebluepybase.py | BikeAtor/WoMoAtor | 700cc8b970dcfdd5af2f471df1a223d2a38cb1bf | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import sys
sys.path.append('..')
from abc import abstractmethod
import time
import atorlib
import bluepy.btle
import threading
import logging
# read data from notification
class BleBluepyBase(atorlib.BleBase):
peripheral = None
sleepBetweenRequests = 0.2
def __init__(self,
... | 35.171171 | 114 | 0.523822 |
de0746b7fe2bc70d9db04306377975d046b6a672 | 3,477 | py | Python | memorpy/Address.py | Lynext/VordLraxx | fb63c2e3e1608d947981832349d32fffe222f3db | [
"MIT"
] | null | null | null | memorpy/Address.py | Lynext/VordLraxx | fb63c2e3e1608d947981832349d32fffe222f3db | [
"MIT"
] | 1 | 2020-12-27T21:12:40.000Z | 2022-03-17T00:08:47.000Z | memorpy/Address.py | Lynext/VordLraxx | fb63c2e3e1608d947981832349d32fffe222f3db | [
"MIT"
] | null | null | null | # Author: Nicolas VERDIER
# This file is part of memorpy.
#
# memorpy 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 the License, or
# (at your option) any later version.
#
# memorpy is di... | 31.324324 | 135 | 0.635893 |
2b0413f2adde295ab93686a190f82a244e9319a6 | 6,244 | py | Python | src/onegov/agency/security.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/agency/security.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/agency/security.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from morepath.authentication import NO_IDENTITY
from onegov.agency import AgencyApp
from onegov.agency.models import AgencyMembershipMoveWithinAgency
from onegov.agency.models import AgencyMembershipMoveWithinPerson
from onegov.agency.models import AgencyMove
from onegov.agency.models.ticket import AgencyMutationTicket... | 35.477273 | 79 | 0.722293 |
a41be0c3fea7fddc2e4d253087905ef2c9812014 | 1,038 | py | Python | apps/erianet/erianet_test.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 2 | 2017-11-30T21:12:11.000Z | 2017-12-01T07:52:43.000Z | apps/erianet/erianet_test.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 14 | 2017-11-14T18:12:53.000Z | 2018-06-03T16:07:57.000Z | apps/erianet/erianet_test.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 3 | 2018-02-05T10:40:03.000Z | 2018-02-09T09:29:19.000Z | from robolib.networks.erianet import Erianet
from robolib.networks.configurations import VGG19ish
from robolib.datamanager.siamese_data_loader import load_one_image
from robolib.networks.predict_result import PredictResult
import robolib.datamanager.datadir as datadir
import os
#Test
intermediate = True
input_set = ... | 27.315789 | 93 | 0.733141 |
746ed3f2475e78f725657bbb288edb1d9c0d1d8a | 489 | py | Python | SHELL/2021/crypto/PowerRSA/script.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | SHELL/2021/crypto/PowerRSA/script.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | SHELL/2021/crypto/PowerRSA/script.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | from Crypto.Util.number import getPrime,isPrime,bytes_to_long
from Crypto.PublicKey.RSA import construct
from secret import flag
def getNextPrime(number):
while not isPrime(number):
number+=1
return number
p = getPrime(2048)
q = getNextPrime(p+1)
n = p*q
e = 65537
encrypted_flag = pow(bytes_to_long(f... | 27.166667 | 84 | 0.721881 |
3b56653ffd63d9da9fceae0b43dc6105b1e54133 | 1,891 | py | Python | node_modules/ethereumjs-vm/utils/diffTestOutput.py | DonaldPeat/ether-campaign | ce3430d468a235d952080313c5bae14f3a895497 | [
"MIT"
] | 834 | 2021-01-19T05:04:15.000Z | 2022-03-31T19:34:38.000Z | node_modules/ethereumjs-vm/utils/diffTestOutput.py | DonaldPeat/ether-campaign | ce3430d468a235d952080313c5bae14f3a895497 | [
"MIT"
] | 925 | 2016-01-05T22:30:04.000Z | 2021-01-18T10:16:12.000Z | node_modules/ethereumjs-vm/utils/diffTestOutput.py | DonaldPeat/ether-campaign | ce3430d468a235d952080313c5bae14f3a895497 | [
"MIT"
] | 333 | 2015-12-15T03:23:56.000Z | 2021-01-18T14:08:23.000Z | import sys, re
'''
given the name (or path) of a file, returns a 'summary' object containing which tests pass/fail
'''
def getTestSummary(f):
summary = {
'success': set(),
'fail': set()
}
curTestName = ''
fp = open(f)
for i, line in enumerate(fp):
if line.startswith("# file"):
if curTestNa... | 25.90411 | 95 | 0.638815 |
3b82900d459e43668b9da2893ffa56d7db62b514 | 4,706 | py | Python | doc/for_dev/scikit-image/future/cmorph.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 88 | 2019-01-08T16:39:08.000Z | 2022-02-06T14:19:23.000Z | doc/for_dev/scikit-image/future/cmorph.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 13 | 2019-06-20T15:53:10.000Z | 2021-02-09T11:03:29.000Z | doc/for_dev/scikit-image/future/cmorph.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 boost, Optional, Array
A = Array[np.uint8, "2d", "memview"]
A1d = Array[np.intp, "1d", "memview"]
@boost(wraparound=False, boundscheck=False, cdivision=True, nonecheck=False)
def _dilate(
image: A,
selem: A,
out: Optional[A] = None,
shift_x: np.int8 = 0,
... | 27.520468 | 79 | 0.567998 |
ebca9ab02996e31fd94bb79f9f90f65433069dda | 1,775 | py | Python | x2paddle/optimizer/pytorch_code_optimizer/parameter_tree.py | usertianqin/X2Paddle | b554a8094ca3e255ef4bd2e80337222a35625133 | [
"Apache-2.0"
] | 559 | 2019-01-14T06:01:55.000Z | 2022-03-31T02:52:43.000Z | x2paddle/optimizer/pytorch_code_optimizer/parameter_tree.py | usertianqin/X2Paddle | b554a8094ca3e255ef4bd2e80337222a35625133 | [
"Apache-2.0"
] | 353 | 2019-05-07T13:20:03.000Z | 2022-03-31T05:30:12.000Z | x2paddle/optimizer/pytorch_code_optimizer/parameter_tree.py | usertianqin/X2Paddle | b554a8094ca3e255ef4bd2e80337222a35625133 | [
"Apache-2.0"
] | 241 | 2018-12-25T02:13:51.000Z | 2022-03-27T23:21:43.000Z | # -*- coding:UTF-8 -*-
# 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
#
# ... | 31.696429 | 74 | 0.610141 |
cceaa327a0732af73de93610e1dfb0776a233b71 | 5,725 | py | Python | game.py | RAJVARDHAN123/Kbc-Game | 774f955dc57998fbdea2422eb6b166a141b20e6f | [
"MIT"
] | 1 | 2019-01-23T08:12:20.000Z | 2019-01-23T08:12:20.000Z | game.py | RAJVARDHAN123/Kbc-Game | 774f955dc57998fbdea2422eb6b166a141b20e6f | [
"MIT"
] | null | null | null | game.py | RAJVARDHAN123/Kbc-Game | 774f955dc57998fbdea2422eb6b166a141b20e6f | [
"MIT"
] | 6 | 2020-05-22T17:37:18.000Z | 2022-03-27T10:16:35.000Z | import json
import os
import time
from threading import Timer
ans_key = ['','D','C','B','C','A','D','D','A','A','B']
options = ['A','B','C','D']
money = [0,3000,5000,10000,20000,80000,120000,500000,1200000,5000000]
life_line_list = ['50-50','phone a friend','audience poll']
def user_choice():
player_choice = inp... | 43.371212 | 205 | 0.52262 |
d65e55d5edbceb893af1aef9d839e4e386ef0a63 | 1,628 | py | Python | dev/src/Misc.py | betaros/traffic_sign | 6f5ef4afb7093c929cc2e94c7f72daebbd149b7e | [
"MIT"
] | null | null | null | dev/src/Misc.py | betaros/traffic_sign | 6f5ef4afb7093c929cc2e94c7f72daebbd149b7e | [
"MIT"
] | null | null | null | dev/src/Misc.py | betaros/traffic_sign | 6f5ef4afb7093c929cc2e94c7f72daebbd149b7e | [
"MIT"
] | null | null | null | """
Authors: Jan Füsting
Last edited: 17.09.2018
"""
import logging
import numpy as np
import os
class Misc:
"""
This class contains functions which are used independent of it's context
"""
def __init__(self):
"""
Initialising
"""
logging.basicConfig(format='%... | 24.666667 | 109 | 0.558968 |
d662646380bb70fc205ac3ea800bd9e6c2c42f03 | 25,120 | py | Python | tuta/dynamic_data.py | PseudoLabs-Demo/TUTA_table_understanding | d0f3fe2f15c56a5ea9f593b210296f170fc74558 | [
"MIT"
] | 36 | 2021-06-15T01:04:27.000Z | 2022-03-19T16:36:54.000Z | tuta/dynamic_data.py | PseudoLabs-Demo/TUTA_table_understanding | d0f3fe2f15c56a5ea9f593b210296f170fc74558 | [
"MIT"
] | 6 | 2021-09-03T11:29:36.000Z | 2021-12-15T11:33:57.000Z | tuta/dynamic_data.py | PseudoLabs-Demo/TUTA_table_understanding | d0f3fe2f15c56a5ea9f593b210296f170fc74558 | [
"MIT"
] | 8 | 2021-11-03T04:32:36.000Z | 2022-02-02T13:43:47.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Data loader for semi-processed table inputs, do MLM & CLC & TCR dynamically.
"""
import torch
import random
import pickle
from utils import UNZIPS
from tokenizer import PAD_ID
class DynamicDataLoader(object):
def __init__(self, args, proc_id, proc... | 49.35167 | 150 | 0.56676 |
d673008a7a089b230d763abb3d9740ebcace18b6 | 439 | py | Python | leetcode/1046-Last-Stone-Weight/heapify_me.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/1046-Last-Stone-Weight/heapify_me.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/1046-Last-Stone-Weight/heapify_me.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution:
def lastStoneWeight(self, stones: List[int]) -> int:
import heapq
for i in range(len(stones)):
stones[i] = - stones[i]
heapq.heapify(stones)
while len(stones) > 1:
y = heapq.heappop(stones)
x = heapq.heappop(stones)
dif... | 29.266667 | 56 | 0.519362 |
d6f3cebdd6a1e8399d872566432a7e2a85129cc5 | 531 | py | Python | PMIa/2014/KHASANOVA_I_F/task_5_30.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2014/KHASANOVA_I_F/task_5_30.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2014/KHASANOVA_I_F/task_5_30.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 5. Вариант 30.
# Напишите программу, которая бы при запуске случайным образом отображала
# имя одного из трех племянников Скруджа МакДака.
# Khasanova I. F.
# 31.03.2016
import random
print("Программа случайным образом отображает имя одного из трех племянников Скруджа МакДака.")
name = random.randint(1,3)
... | 21.24 | 95 | 0.698682 |
d6fa3567f0970cf8cfcae4ce368669c019dac9ac | 8,944 | py | Python | command/generate_flights.py | Janrupf/airport-db-seeding | 768a9373f02ede5bf613d09270d2fbe84de37a97 | [
"MIT"
] | null | null | null | command/generate_flights.py | Janrupf/airport-db-seeding | 768a9373f02ede5bf613d09270d2fbe84de37a97 | [
"MIT"
] | null | null | null | command/generate_flights.py | Janrupf/airport-db-seeding | 768a9373f02ede5bf613d09270d2fbe84de37a97 | [
"MIT"
] | null | null | null | import string
from pathlib import Path
from types import SimpleNamespace
from data.time_gen import TimeGen
from data.date_gen import DateGen
from data.prefixdb import PrefixDB
import random
GET_ALL_SLOTS_STATEMENT = """SELECT * FROM Slot"""
GET_ALL_PASSENGERS_IDS_STATEMENT = """SELECT ID FROM Passenger"""
GET_AIRLINE_... | 34.137405 | 168 | 0.687053 |
ba65c3b458c5779173d6e92ca3c844fae549c847 | 328 | py | Python | backend/api/migrations/0003_remove_parking_priority.py | giacomooo/CASFEE_Project2 | 420ff488d6b9deefe6623a45ecfed299f97a4639 | [
"MIT"
] | null | null | null | backend/api/migrations/0003_remove_parking_priority.py | giacomooo/CASFEE_Project2 | 420ff488d6b9deefe6623a45ecfed299f97a4639 | [
"MIT"
] | null | null | null | backend/api/migrations/0003_remove_parking_priority.py | giacomooo/CASFEE_Project2 | 420ff488d6b9deefe6623a45ecfed299f97a4639 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.4 on 2021-09-04 15:13
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('api', '0002_alter_parking_table'),
]
operations = [
migrations.RemoveField(
model_name='parking',
name='priority',
)... | 18.222222 | 47 | 0.591463 |
300634785b4d04898cedb7741b1f01ddad4cec45 | 1,395 | py | Python | U_Benchmarking.py | Klark007/Selbstfahrendes-Auto-im-Modell | d7fe81392de2b29b7dbc7c9d929fa0031b89900b | [
"MIT"
] | null | null | null | U_Benchmarking.py | Klark007/Selbstfahrendes-Auto-im-Modell | d7fe81392de2b29b7dbc7c9d929fa0031b89900b | [
"MIT"
] | null | null | null | U_Benchmarking.py | Klark007/Selbstfahrendes-Auto-im-Modell | d7fe81392de2b29b7dbc7c9d929fa0031b89900b | [
"MIT"
] | null | null | null | import U_Generate_Image as generate
import main
from random import randint as rand
from os import remove, listdir, walk, path
from time import time
def rand_xy_coordinates(size):
return [rand(0, round(200/size/2)-2), rand(0, round(266/size/2)-2)]
def loop_over_values():
sums = [0, 0, 0, 0, 0]
if not(pa... | 22.142857 | 77 | 0.61147 |
9d9c4efed30a342ef739948bd06c138068712dad | 5,319 | py | Python | wz/core/run_extern.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/core/run_extern.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/core/run_extern.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
core/run_extern.py
Last updated: 2021-04-28
=+LICENCE=============================
Copyright 2021 Michael Towers
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... | 33.037267 | 75 | 0.560068 |
ee6f6b3b0c604fe5f56e91b23f55bb11c3de9f8f | 9,529 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/detector/plotFlows.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/detector/plotFlows.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/detector/plotFlows.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2007-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.ec... | 47.40796 | 119 | 0.6242 |
09267bd21547f33858de5bbc81b26780acfce6cb | 1,431 | py | Python | bolt/utils/timehash.py | ph7vc/CL4M-B0T | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 9 | 2019-02-17T06:33:14.000Z | 2021-10-05T02:19:00.000Z | bolt/utils/timehash.py | ns-phennessy/Bolt | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 28 | 2019-02-10T07:48:05.000Z | 2021-12-20T00:15:37.000Z | bolt/utils/timehash.py | ph7vc/CL4M-B0T | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 4 | 2015-03-13T03:58:55.000Z | 2015-05-27T08:29:46.000Z | import time
from datetime import datetime
class Timehash():
def __init__(self, timestamp):
self.timestamp = int(timestamp)
@classmethod
def now(cls):
return cls(time.time())
@classmethod
def from_hash(cls, hash):
timestamp = cls.decode(hash)
return cls... | 26.018182 | 94 | 0.594689 |
eeee96cd20d63fe131da0c2c12e52750b3ed42d0 | 12,012 | py | Python | ngexport2spatialite/ngexport2spatialite.py | hoppfrosch/de.hoppfrosch.python.Naturgucker | 7c1cc8500cbd1b98c161d2085bed1769d6fb0a3b | [
"MIT"
] | 1 | 2019-04-27T20:19:08.000Z | 2019-04-27T20:19:08.000Z | ngexport2spatialite/ngexport2spatialite.py | hoppfrosch/de.hoppfrosch.python.Naturgucker | 7c1cc8500cbd1b98c161d2085bed1769d6fb0a3b | [
"MIT"
] | 5 | 2017-02-07T07:17:32.000Z | 2017-02-07T13:04:21.000Z | ngexport2spatialite/ngexport2spatialite.py | hoppfrosch/de.hoppfrosch.python.Naturgucker | 7c1cc8500cbd1b98c161d2085bed1769d6fb0a3b | [
"MIT"
] | null | null | null | import pyspatialite.dbapi2 as db
import logging
from logging.config import dictConfig
import pandas as pd
import os
import semver
import datetime
version = semver.format_version(0, 1, 0, 'pre.6', 'build.1')
def get_or_create(session, model, **kwargs):
'''
Creates an object or returns the object if exists
credit... | 34.918605 | 164 | 0.547453 |
eef63aeaf2390ed69fd8d03f5ccc40f629bf8c16 | 38 | py | Python | modules/cerfaReader/__init__.py | cloud441/Procerfa | 7472aeecc4eb3003e2e0f09bb0ae71f1b33e9ccf | [
"MIT"
] | null | null | null | modules/cerfaReader/__init__.py | cloud441/Procerfa | 7472aeecc4eb3003e2e0f09bb0ae71f1b33e9ccf | [
"MIT"
] | null | null | null | modules/cerfaReader/__init__.py | cloud441/Procerfa | 7472aeecc4eb3003e2e0f09bb0ae71f1b33e9ccf | [
"MIT"
] | null | null | null | from .cerfa_reader import CerfaReader
| 19 | 37 | 0.868421 |
016ffaf3e34bbb00ce0a68485aa06cc6a775ca2f | 1,163 | py | Python | python/pointer/property_decorator.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/pointer/property_decorator.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/pointer/property_decorator.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | class Person():
def __init__(self, firstname, lastname):
self.first = firstname
self.last = lastname
@property
def fullname(self):
return self.first + ' ' + self.last
@fullname.setter
def fullname(self, name):
firstname, lastname = name.split()
self.first = ... | 26.431818 | 87 | 0.632846 |
11425e6b0e2fb4871ca8ca5f2b3e557df8ee3f21 | 809 | py | Python | backend/apps/ineedstudent/tables.py | match4healthcare/match4healthcare | acf69e3b781d715f0a947c2a9df6646e94f1ca6b | [
"MIT"
] | 2 | 2020-03-28T13:56:39.000Z | 2020-03-29T10:16:12.000Z | backend/apps/ineedstudent/tables.py | match4healthcare/match4healthcare | acf69e3b781d715f0a947c2a9df6646e94f1ca6b | [
"MIT"
] | 76 | 2020-03-27T21:53:04.000Z | 2020-03-30T20:27:43.000Z | backend/apps/ineedstudent/tables.py | match4healthcare/match4healthcare | acf69e3b781d715f0a947c2a9df6646e94f1ca6b | [
"MIT"
] | null | null | null | from django.utils.html import format_html
from django.utils.translation import gettext_lazy as _
import django_tables2 as tables
class ContactedTable(tables.Table):
registration_date = tables.Column(verbose_name=_("E-Mail versendet am"))
is_activated = tables.Column(empty_values=(), verbose_name=_("Helfer*in ... | 40.45 | 103 | 0.70581 |
3a3fd229ed89c0ce57691cf81cf733c4ea7bb1e2 | 3,086 | py | Python | python/odml/interlex_load.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | python/odml/interlex_load.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | python/odml/interlex_load.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | """odmlInterLex
odmlInterLex fetches all registered terms from scicrunch interlex
for a given search term
Usage: odmlilex SEARCHTYPE SEARCHTERM
Arguments:
SEARCHTYPE SciCrunch search type. Currently the following search options are supported:
1 ... Interlex term search (default)
... | 26.376068 | 130 | 0.638691 |
3a5bce8bb80ad62d663921ef17504046235d88fc | 719 | py | Python | src/aijack/collaborative/core/api.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 1 | 2022-03-17T21:17:44.000Z | 2022-03-17T21:17:44.000Z | src/aijack/collaborative/core/api.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | null | null | null | src/aijack/collaborative/core/api.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 1 | 2022-03-17T21:17:46.000Z | 2022-03-17T21:17:46.000Z | from abc import abstractmethod
class BaseFLKnowledgeDistillationAPI:
def __init__(
self,
server,
clients,
public_dataloader,
local_dataloaders,
validation_dataloader,
criterion,
num_communication,
device,
):
self.server = server
... | 23.966667 | 58 | 0.641168 |
28c649faf7eadde7acde37a14fd321aa528fda9c | 1,101 | py | Python | tag_2/p_8_domino.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | tag_2/p_8_domino.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | tag_2/p_8_domino.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | """
8 Domino (Tag 2)
Schreiben Sie eine Funktion, welche Dominosteine bis zu einer gewissen Grenze N erzeugt.
Die Dominosteine können z.B. so aussehen: (1|1), (1|2), (1|3), (2|2), (2|3), (3|3), ...
Es dürfen dabei keine Duplikate auftreten. Ist beispielsweise (1|2) schon erzeugt, darf (2|1) nicht
erzeugt werden, da ... | 28.230769 | 99 | 0.654859 |
6e3a45e1b8c4d314d9eded200e51efc54265a24f | 14,505 | py | Python | rev/lonk/dist/flag.py | b01lers/circle-city-ctf-2021 | 5d6c341f8d9647487dc69df84a4bea5e61d7ca43 | [
"MIT"
] | 9 | 2021-06-13T19:33:53.000Z | 2021-10-04T13:17:26.000Z | CircleCityCon/2021/rev/Lonk/flag-674073a02c07184baaa6973219490ef3.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-06-13T23:20:05.000Z | 2021-06-13T23:20:05.000Z | CircleCityCon/2021/rev/Lonk/flag-674073a02c07184baaa6973219490ef3.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-06-14T02:09:46.000Z | 2021-06-14T02:09:46.000Z | from lib import *
覺(非(67))
覺(要(非(34), 非(33)))
覺(要(放(非(105), 非(58)), 非(20)))
覺(屁(非(3), 非(41)))
覺(然(非(811), 非(234)))
覺(睡(非(3), 非(5), 非(191)))
覺(
放(
然(
屁(
屁(
屁(
屁(
屁(
屁(
... | 36.536524 | 270 | 0.079214 |
6c321f2e3daa2140a08f61b394363653b3875940 | 264 | py | Python | CreateTableSQL.py | mayur200/hacktoberfest2021 | 5f141fe6dc90916d65bef17a66f0db05649c41ef | [
"MIT"
] | null | null | null | CreateTableSQL.py | mayur200/hacktoberfest2021 | 5f141fe6dc90916d65bef17a66f0db05649c41ef | [
"MIT"
] | null | null | null | CreateTableSQL.py | mayur200/hacktoberfest2021 | 5f141fe6dc90916d65bef17a66f0db05649c41ef | [
"MIT"
] | null | null | null | import mysql.connector
mydb = mysql.connector.connect(
host="localhost",
user="yourusername",
password="yourpassword",
database="mydatabase"
)
mycursor = mydb.cursor()
mycursor.execute("CREATE TABLE customers (name VARCHAR(255), address VARCHAR(255))")
| 20.307692 | 84 | 0.742424 |
b080c0232b21a7da436ae751f91f07ef46f136ba | 192 | py | Python | 04_SQL/commerce/auctions/admin.py | DaviNakamuraCardoso/Harvard-CS50-Web-Programming | afec745eede41f7b294c3ee6ebaff9ac042e5e4c | [
"MIT"
] | null | null | null | 04_SQL/commerce/auctions/admin.py | DaviNakamuraCardoso/Harvard-CS50-Web-Programming | afec745eede41f7b294c3ee6ebaff9ac042e5e4c | [
"MIT"
] | null | null | null | 04_SQL/commerce/auctions/admin.py | DaviNakamuraCardoso/Harvard-CS50-Web-Programming | afec745eede41f7b294c3ee6ebaff9ac042e5e4c | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import User, Listing, Bid, Comment
admin.site.register(User)
admin.site.register(Listing)
admin.site.register(Bid)
admin.site.register(Comment)
| 21.333333 | 47 | 0.802083 |
af0d80a9ac90b966b5550179419a21eda792fc95 | 1,882 | py | Python | lib/python/qmk/cli/json2c.py | fzf/qmk_toolbox | 10d6b425bd24b45002555022baf16fb11254118b | [
"MIT"
] | null | null | null | lib/python/qmk/cli/json2c.py | fzf/qmk_toolbox | 10d6b425bd24b45002555022baf16fb11254118b | [
"MIT"
] | null | null | null | lib/python/qmk/cli/json2c.py | fzf/qmk_toolbox | 10d6b425bd24b45002555022baf16fb11254118b | [
"MIT"
] | null | null | null | """Generate a keymap.c from a configurator export.
"""
import json
from milc import cli
import qmk.keymap
import qmk.path
@cli.argument('-o', '--output', arg_only=True, type=qmk.path.normpath, help='File to write to')
@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output e... | 34.851852 | 171 | 0.666312 |
af8a502a6f18dca087a267a0db59795c1c0c2c69 | 436 | py | Python | leetcode/264-Ugly-Number-II/UglyNumII_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/264-Ugly-Number-II/UglyNumII_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/264-Ugly-Number-II/UglyNumII_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution(object):
def nthUglyNumber(self, n):
"""
:type n: int
:rtype: int
"""
i2, i3, i5, res = 0, 0, 0, [1]
for i in range(n - 1):
m2, m3, m5 = res[i2] * 2, res[i3] * 3, res[i5] * 5
mn = min(m2, m3, m5)
if m2 == mn: i2 += 1
... | 27.25 | 62 | 0.37844 |
bb9c731587417362dfb7104cf542350beef68dd6 | 1,614 | py | Python | 400-pandemic/main.py | hello-arun/Python-Tutorial | aec3978f414e48d762a5fbc5cce581163c1f5f1e | [
"MIT"
] | null | null | null | 400-pandemic/main.py | hello-arun/Python-Tutorial | aec3978f414e48d762a5fbc5cce581163c1f5f1e | [
"MIT"
] | null | null | null | 400-pandemic/main.py | hello-arun/Python-Tutorial | aec3978f414e48d762a5fbc5cce581163c1f5f1e | [
"MIT"
] | null | null | null | def infect_neighbors(home_no):
# will infact the neareast neighbors and return
# the infected neighbors
neighbors = [None, None]
# if target neighbors are not infected then infact
if (homes[home_no-1] == 0): # 0 means neighbors is not infected
neighbors[0] = home_no-1
homes[home_no-1... | 33.625 | 68 | 0.682776 |
bbc5901a14b61f176ff402aed564d24c245c8ccd | 701 | py | Python | hihope_neptune-oh_hid/00_src/v0.1/third_party/LVM2/daemons/lvmdbusd/state.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | 1 | 2022-02-15T08:51:55.000Z | 2022-02-15T08:51:55.000Z | hihope_neptune-oh_hid/00_src/v0.3/third_party/LVM2/daemons/lvmdbusd/state.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | null | null | null | hihope_neptune-oh_hid/00_src/v0.3/third_party/LVM2/daemons/lvmdbusd/state.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2015-2016 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions
# of the GNU General Public License v.2.
#
# You should have received a copy of the GNU General Public License
# a... | 25.035714 | 71 | 0.726106 |
057b6f9b913c7dcd19b5b5694d6fb77cc223e5d0 | 5,699 | py | Python | Fortgeschrittenenpraktikum/Protokolle/V49_gepulste_NMR/Python/auswertung.py | smjhnits/Praktikum | 92c9df3ee7dfa2417f464036d18ac33b70765fdd | [
"MIT"
] | 2 | 2019-03-07T08:55:36.000Z | 2019-04-22T18:13:03.000Z | Fortgeschrittenenpraktikum/Protokolle/V49_gepulste_NMR/Python/auswertung.py | smjhnits/Praktikum | 92c9df3ee7dfa2417f464036d18ac33b70765fdd | [
"MIT"
] | null | null | null | Fortgeschrittenenpraktikum/Protokolle/V49_gepulste_NMR/Python/auswertung.py | smjhnits/Praktikum | 92c9df3ee7dfa2417f464036d18ac33b70765fdd | [
"MIT"
] | 2 | 2017-10-27T13:26:43.000Z | 2018-01-13T09:12:24.000Z | import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
from uncertainties import ufloat
import scipy.constants as sc
import csv
import pint
from pint import UnitRegistry
u = UnitRegistry()
Q_ = u.Quantity
# Justagewerte
t90 = Q_(5.6, 'microsecond').to('second')
t180 = Q_(10.3, ',micro... | 27.531401 | 101 | 0.604667 |
f9dcbbf2a47b4a15b7de5a5f483406503fb9ef60 | 843 | py | Python | perf/mean.py | Software-Knife-and-Tool/mux | 19166e2efde01dd5dcab60f06fc5d9ec2740ac5a | [
"MIT"
] | null | null | null | perf/mean.py | Software-Knife-and-Tool/mux | 19166e2efde01dd5dcab60f06fc5d9ec2740ac5a | [
"MIT"
] | 105 | 2021-07-11T15:54:40.000Z | 2021-08-07T04:38:06.000Z | perf/mean.py | Software-Knife-and-Tool/xian | bd5c77a222bfa9c18379510e63930627cb2f028a | [
"MIT"
] | null | null | null | #! /usr/bin/python
import sys
def main():
totals = [0.0 for i in range(14)]
length = 0.0
infile = open(sys.argv[1], 'r')
for line in infile.readlines():
times = line.rstrip().split()
totals = [a + float(b) for a, b in zip(totals, times)]
length += 1
labels = [
"ti... | 27.193548 | 122 | 0.53618 |
ddb71eef567e5100bcd9120942f848e5f9372c66 | 2,171 | py | Python | Kapitel_6/_E3_Singleton_Meta.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | 1 | 2020-12-24T15:42:54.000Z | 2020-12-24T15:42:54.000Z | Kapitel_6/_E3_Singleton_Meta.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | null | null | null | Kapitel_6/_E3_Singleton_Meta.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | null | null | null | """
Eine Klasse, welche die 'SingletonMeta' Klasse als Metaklasse verwendet,
kann nur eine einzige Instanz erzeugen. Die Metaklasse ist so designed worden,
dass sie die mehrere Instanzen von verschiedenen Klassen halten kann, aber niemals
mehr als eine Instanz pro Klasse.
"""
# --- Metaklasse --- #
class SingletonMeta... | 35.590164 | 97 | 0.704284 |
34a076b4b6f2fd5a5acba36410a847594adc5722 | 653 | py | Python | tests/onegov/ballot/collections/test_lists.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/ballot/collections/test_lists.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/ballot/collections/test_lists.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from datetime import date
from onegov.ballot import List
from onegov.ballot import ListCollection
from onegov.ballot import ProporzElection
def test_lists(session):
election = ProporzElection(
title="Election",
domain='federation',
date=date(2015, 6, 14)
)
election.lists.append(
... | 23.321429 | 54 | 0.632466 |
551cb16235208f696a7771208af1515b3f724faf | 865 | py | Python | Packs/ThreatMiner/Integrations/ThreatMiner/Threatminer_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/ThreatMiner/Integrations/ThreatMiner/Threatminer_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/ThreatMiner/Integrations/ThreatMiner/Threatminer_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from ThreatMiner import get_dbot_score_report
from CommonServerPython import DBotScoreReliability
DBOT_SCORES = {
'Reliability': 'C - Fairly reliable',
'Vendor': 'ThreatMiner',
'Indicator': 'CA978112CA1BBDCAFAC231B39A23DC4DA786EFF8147C4E72B9807785AFEE48BB',
'Score': 0,
... | 29.827586 | 113 | 0.672832 |
32cf09e002eb66f9be69c74c6aa8b76682581c70 | 1,266 | py | Python | dataset/IMDB/data_process.py | baowj-678/TC | 4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6 | [
"MIT"
] | null | null | null | dataset/IMDB/data_process.py | baowj-678/TC | 4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6 | [
"MIT"
] | null | null | null | dataset/IMDB/data_process.py | baowj-678/TC | 4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6 | [
"MIT"
] | null | null | null | import os
import csv
def combine_file(src_dir, tgt_path):
""" 将源目录下所有文件合并成一个文件\n
:src_dir :源目录\n
:tgt_path :生成文件的存放位置\n
"""
data = []
for root, dirs, files in os.walk(src_dir):
"""
:root: 当前目录
:dirs: 当前目录下所有子目录
:files: 当前目录下所有文件
"""
for f in file... | 29.44186 | 69 | 0.590837 |
1fe642db3bdc53a4d10590b74d29d052f6d01625 | 1,745 | py | Python | challenge17/exp-challenge17.py | dobin/yookiterm-challenges-files | 81daab38d83bdc083bd9a66e90eea1397c5e30ed | [
"MIT"
] | 17 | 2017-05-03T22:00:30.000Z | 2021-12-07T10:15:41.000Z | challenge/17/src/exp-challenge17.py | roo7vijos1/exploit-courses | a13c95726d330081ca4db77aa8391dcd4c6fcb00 | [
"MIT"
] | 2 | 2017-06-16T02:09:05.000Z | 2018-03-01T08:58:24.000Z | challenge/17/src/exp-challenge17.py | roo7vijos1/exploit-courses | a13c95726d330081ca4db77aa8391dcd4c6fcb00 | [
"MIT"
] | 11 | 2017-05-04T13:04:21.000Z | 2020-12-15T23:00:02.000Z | #!/usr/bin/python
import struct
from pwn import *
e = ELF("./challenge17")
tube = connect("localhost", 5002)
offset = 152
def doBof(payload):
print tube.recvuntil("> ")
tube.send("1");
print tube.recv()
tube.send(str(len(payload)));
print tube.recv()
tube.send(paylo... | 17.45 | 44 | 0.630946 |
2f42ca70a6975202392048bc11e291d552466eb2 | 870 | py | Python | etl/io_config/database.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 6 | 2018-06-27T00:09:55.000Z | 2019-03-07T14:06:53.000Z | etl/io_config/database.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2021-03-31T18:37:46.000Z | 2021-06-01T21:49:41.000Z | etl/io_config/database.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2020-01-24T16:40:49.000Z | 2021-09-30T02:28:55.000Z | import asyncio, asyncpg
import psycopg2
from etl.core.environment import Environment
import traceback
class Database:
def __init__(self, db_user=None, db_pass=None, db_host=None, db_port=None, db_name=None):
flags = Environment()
self.db_user = db_user or flags.db_user
self.db_pass = db_pass or flags.db... | 30 | 91 | 0.710345 |
c08a57a457c6387ea46db0b8cedb62e9534fe128 | 1,699 | py | Python | setup.py | Ceystyle/easyp2p | 99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc | [
"MIT"
] | 4 | 2019-07-18T10:58:28.000Z | 2021-11-18T16:57:45.000Z | setup.py | Ceystyle/easyp2p | 99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc | [
"MIT"
] | 1 | 2019-07-05T09:21:47.000Z | 2019-07-05T09:21:47.000Z | setup.py | Ceystyle/easyp2p | 99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc | [
"MIT"
] | 2 | 2019-07-05T08:56:34.000Z | 2020-06-09T10:03:42.000Z | # Copyright (c) 2018-2020 Niko Sandschneider
# pylint: disable=missing-function-docstring, missing-module-docstring
import codecs
import os
import re
import setuptools
here = os.path.abspath(os.path.dirname(__file__))
def read(*parts):
with codecs.open(os.path.join(here, *parts), 'r') as file:
return ... | 31.462963 | 74 | 0.653325 |
c0aeb0f0fc9d41f85e500d619c237390fa09b731 | 2,073 | py | Python | research/cv/FaceRecognition/infer/mxbase/facerecognition/changeTxtPath.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/FaceRecognition/infer/mxbase/facerecognition/changeTxtPath.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/FaceRecognition/infer/mxbase/facerecognition/changeTxtPath.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # coding = utf-8
"""
# Copyright 2021 Huawei Technologies Co., Ltd
#
# 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... | 30.940299 | 97 | 0.638205 |
c0ec8dc7a3609ab66442d9672a65f8d3c59c534d | 41,012 | py | Python | resources/lib/TagesschauXL.py | rotdrop/Kodi-Addon-ARDundZDF | ceb7ab2b580eb68b7e3cd52318a7058f69518988 | [
"MIT"
] | null | null | null | resources/lib/TagesschauXL.py | rotdrop/Kodi-Addon-ARDundZDF | ceb7ab2b580eb68b7e3cd52318a7058f69518988 | [
"MIT"
] | null | null | null | resources/lib/TagesschauXL.py | rotdrop/Kodi-Addon-ARDundZDF | ceb7ab2b580eb68b7e3cd52318a7058f69518988 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
################################################################################
# TagesschauXL.py - Teil von Kodi-Addon-ARDundZDF
# Modul für für die Inhalte von tagesschau.de
################################################################################
# Stand: 07.10.2020
#
# Anpass... | 44.969298 | 130 | 0.663123 |
8d040f3ca17d677d13b99e0727c32a70428f5b8e | 502 | py | Python | workshop_petstagram/workshop_petstagram/main/migrations/0004_alter_petphoto_photo.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/0004_alter_petphoto_photo.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | null | null | null | workshop_petstagram/workshop_petstagram/main/migrations/0004_alter_petphoto_photo.py | trenev/softuni-python-web-basics | 0fcf6b7f3389d06685d40615c376dc4027e772f2 | [
"MIT"
] | null | null | null | # Generated by Django 4.0.2 on 2022-02-09 15:42
from django.db import migrations, models
import workshop_petstagram.main.validators
class Migration(migrations.Migration):
dependencies = [
('main', '0003_petphoto'),
]
operations = [
migrations.AlterField(
model_name='petphoto... | 25.1 | 135 | 0.663347 |
c8b46ce37dcd306b186995f35974d4659307b3a5 | 1,346 | py | Python | 0000 hihoOnce/171 Email Merge/main.py | SLAPaper/hihoCoder | 3f64d678c5dd46db36345736eb56880fb2d2c5fe | [
"MIT"
] | null | null | null | 0000 hihoOnce/171 Email Merge/main.py | SLAPaper/hihoCoder | 3f64d678c5dd46db36345736eb56880fb2d2c5fe | [
"MIT"
] | null | null | null | 0000 hihoOnce/171 Email Merge/main.py | SLAPaper/hihoCoder | 3f64d678c5dd46db36345736eb56880fb2d2c5fe | [
"MIT"
] | null | null | null | from __future__ import print_function
from collections import defaultdict, deque
# load data
N = int(raw_input())
email_users = defaultdict(lambda: [])
user_emails = {}
user_id = {}
for i in range(N):
line = raw_input()
user, n_email, emails = line.split(None, 2)
n_email = int(n_email)
emails = emails... | 27.469388 | 66 | 0.628529 |
cdbf8c0dddc95da48379a4df9d8aa0612833d9ac | 1,783 | py | Python | spider/master_traindata.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | null | null | null | spider/master_traindata.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | 2 | 2021-03-31T18:54:16.000Z | 2021-12-13T19:49:08.000Z | spider/master_traindata.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*
# 获得爬取推文所需信息
import json
from Config_new import get_noau_config
_, db, r = get_noau_config() # 数据库配置
def get_location(Location): # 获取地点集合
Locations = Location.split(',')
Locations = [i.strip() for i in Locations]
return list(set(Locations))
def get_year(Year): # 获取起始年份
if le... | 33.018519 | 166 | 0.587213 |
a818c314a1ce3cbf3ea00867b881d491f17f242d | 1,012 | py | Python | Fastir_Collector/dump/vbr.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | Fastir_Collector/dump/vbr.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | Fastir_Collector/dump/vbr.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 2 | 2021-04-19T08:28:54.000Z | 2022-01-19T13:23:29.000Z |
import hexdump
import os
from distorm3 import Decode, Decode16Bits
class Vbr(object):
def __init__(self, image, offset, dest):
self.offset = offset
self.path_image = image
self.dest = dest
self.vbr = None
def extract_vbr(self):
with open(self.path_image, "rb") as f :
... | 34.896552 | 98 | 0.597826 |
57094300c9d685016c4f50457781b27099ef5362 | 158 | py | Python | tensorflow/basic-rl/tutorial3/openai_gym_3.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:16:23.000Z | 2019-05-10T09:16:23.000Z | tensorflow/basic-rl/tutorial3/openai_gym_3.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | null | null | null | tensorflow/basic-rl/tutorial3/openai_gym_3.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-10-14T07:30:18.000Z | 2019-10-14T07:30:18.000Z | import gym
env = gym.make('CartPole-v0')
print env.action_space
print env.observation_space
print env.observation_space.high
print env.observation_space.low
| 19.75 | 32 | 0.829114 |
572e6565a33e802f470be9e4ce31e96099022777 | 988 | py | Python | python/gdal_cookbook/cookbook_geometry/create_multi_polygon.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/gdal_cookbook/cookbook_geometry/create_multi_polygon.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/gdal_cookbook/cookbook_geometry/create_multi_polygon.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | from osgeo import ogr
multipolygon = ogr.Geometry(ogr.wkbMultiPolygon)
# Create ring #1
ring1 = ogr.Geometry(ogr.wkbLinearRing)
ring1.AddPoint(1204067.0548148106, 634617.5980860253)
ring1.AddPoint(1204067.0548148106, 620742.1035724243)
ring1.AddPoint(1215167.4504256917, 620742.1035724243)
ring1.AddPoint(1215167.45042... | 31.870968 | 53 | 0.822874 |
1929632b94cfd9f43d71f0fe705e04fd4b6df1ee | 917 | py | Python | src/python/py-accepted/572.py | cbarnson/UVa | 0dd73fae656613e28b5aaf5880c5dad529316270 | [
"Unlicense",
"MIT"
] | 2 | 2019-09-07T17:00:26.000Z | 2020-08-05T02:08:35.000Z | src/python/py-accepted/572.py | cbarnson/UVa | 0dd73fae656613e28b5aaf5880c5dad529316270 | [
"Unlicense",
"MIT"
] | null | null | null | src/python/py-accepted/572.py | cbarnson/UVa | 0dd73fae656613e28b5aaf5880c5dad529316270 | [
"Unlicense",
"MIT"
] | null | null | null | # Problem No. : 572
# Created on : 2018-05-24 22:10:02
import sys
import functools
m = 0
n = 0
di = [-1, -1, -1, 0, 0, 1, 1, 1]
dj = [-1, 0, 1, -1, 1, -1, 0, 1]
g = []
def ff(i, j):
global g
if (i < 0 or j < 0 or i >= m or j >= n):
return 0
if (g[i][j] != '@'):
return 0
ans = 1
... | 17.634615 | 44 | 0.379498 |
195eed9597518c8862216602d07bc2facf0d6fc9 | 600 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/ch02_math/solutions/ex11_friends.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch02_math/solutions/ex11_friends.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch02_math/solutions/ex11_friends.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
from ch02_math.intro.intro import find_proper_divisors
def calc_friends(max_exclusive):
friends = {}
for i in range(2, max_exclusive):
divisors1 = find_proper_divisors(i)
sum_div1 = sum(divisors1)
... | 20 | 54 | 0.666667 |
a900dc0475f6388ae55e4fa77f9e856ab0d08baa | 262 | py | Python | Packs/CommonScripts/Scripts/PadZeros/PadZeros.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/PadZeros/PadZeros.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/PadZeros/PadZeros.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from typing import Dict
def main():
args: Dict = demisto.args()
s: str = str(args.get('value'))
length: int = int(args.get('length', 0))
demisto.results(s.zfill(length))
if __name__ == 'builtins':
main()
| 14.555556 | 44 | 0.629771 |
8b63922281b00c201e04d1b342a5ade11b0943ef | 4,904 | py | Python | travelplanner/Journey.py | UCL/mphy0021-2019-travel-planner-sukrire | 5f8b3479b858c46a01b68ee866560dd28d5be47a | [
"MIT"
] | null | null | null | travelplanner/Journey.py | UCL/mphy0021-2019-travel-planner-sukrire | 5f8b3479b858c46a01b68ee866560dd28d5be47a | [
"MIT"
] | null | null | null | travelplanner/Journey.py | UCL/mphy0021-2019-travel-planner-sukrire | 5f8b3479b858c46a01b68ee866560dd28d5be47a | [
"MIT"
] | null | null | null | import numpy as np
import math
import matplotlib.pyplot as plt
from travelplanner.Passenger import Passenger
from travelplanner.Route import Route
class Journey:
def __init__(self, route, passenger, passno=0, speed=10):
self.route = Route(route, speed)
self.passenger = Passenger(passenger, passno... | 42.275862 | 79 | 0.564641 |
d0bad8cc1e6dd2cff1642543fc575f54c720cebf | 1,910 | py | Python | tests/test_tagesvektor.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | tests/test_tagesvektor.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | tests/test_tagesvektor.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | from datetime import datetime, timezone
from decimal import Decimal
import pytest # type:ignore[import]
from bo4e.com.tagesvektor import Tagesvektor, TagesvektorSchema
from bo4e.com.zeitreihenwertkompakt import Zeitreihenwertkompakt
from tests.serialization_helper import assert_serialization_roundtrip # type:ignore... | 31.833333 | 95 | 0.663874 |
ef87d3468562768541830469a6ac227852c952e1 | 12,022 | py | Python | Python X/Functions 1.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | Python X/Functions 1.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | Python X/Functions 1.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | {
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"this is outside the function\n"
]
}
],
"source": [
"# a collectiion of instructions or collection of code\n",
"#he... | 19.08254 | 293 | 0.471053 |
efa96a6c7d2550e61697535384d8c463872e7013 | 3,910 | py | Python | server/objects/rides.py | khaledelemam/routescc-matching-app | 81cb0665e08f6608176060f5d768c673fed15398 | [
"MIT"
] | null | null | null | server/objects/rides.py | khaledelemam/routescc-matching-app | 81cb0665e08f6608176060f5d768c673fed15398 | [
"MIT"
] | null | null | null | server/objects/rides.py | khaledelemam/routescc-matching-app | 81cb0665e08f6608176060f5d768c673fed15398 | [
"MIT"
] | null | null | null | from __future__ import annotations
import csv
import re
from datetime import datetime
from server.data.address_store import AddressStore
from server.maps_api import get_coordinates, google_api_key
class Ride:
"""
A class that represents a ride object and it's associated attributes.
"""
def __init__... | 32.31405 | 99 | 0.648849 |
3245305fbeabd868f7ba4ea8498ea6ff59c4ee88 | 548 | py | Python | WiSe-2122/Wiederholung/Gruppe-A/for-Schleifen.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | 1 | 2022-03-23T09:40:39.000Z | 2022-03-23T09:40:39.000Z | WiSe-2122/Wiederholung/Gruppe-A/for-Schleifen.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | WiSe-2122/Wiederholung/Gruppe-A/for-Schleifen.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null |
namen = [["Moritz", "Müller", "Kiel", "24", "ledig"],
["Alina", "Musterfrau", "Hamburg", "21"],
["Niklas", "Hansen", "Lübeck", "26", "Fußballspieler"],
["Synthia", "Jensen", "Schleswig", "20"]]
for element in range(len(namen)):
print("Der Vorname lautet: \t", namen[element][0], "\nDer... | 39.142857 | 102 | 0.578467 |
f5c7eeda6c6dc7fceac2b2c798da4ac172031509 | 23,258 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/tls/tls_csvSignalGroups.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/tls/tls_csvSignalGroups.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/tls/tls_csvSignalGroups.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2009-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.ec... | 46.146825 | 120 | 0.572964 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.