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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
69b01b18e06b1b48638f0dc5625af0f10564a77f | 646 | py | Python | 2020-10~12/2020-12-13-python/scatter3d.py | zhoukekestar/drafts | e4bbe71a941b30e709d661822ba29a2fd08e6d8e | [
"MIT"
] | 1 | 2018-04-15T14:58:24.000Z | 2018-04-15T14:58:24.000Z | 2020-10~12/2020-12-13-python/scatter3d.py | zhoukekestar/drafts | e4bbe71a941b30e709d661822ba29a2fd08e6d8e | [
"MIT"
] | null | null | null | 2020-10~12/2020-12-13-python/scatter3d.py | zhoukekestar/drafts | e4bbe71a941b30e709d661822ba29a2fd08e6d8e | [
"MIT"
] | 3 | 2020-03-24T09:20:19.000Z | 2020-11-19T02:21:37.000Z | import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
pointsA = np.random.normal(loc=[40, 60, 40], scale=15, size=[200, 3])
ax.scatter(pointsA.T[0], pointsA.T[1], pointsA.T[2], marker='o', label="A")
pointsB = np.random.normal(loc=[80, 100, 80], scale=12, s... | 28.086957 | 75 | 0.660991 |
fae3755b6088dd5738ba505be944d136b67a45df | 9,873 | py | Python | paper_evaluation/IV.F_sensitivity_geographic_location/dataLoader.py | rafaspadilha/timestampVerificationTIFS | bad325e676b0b6087e54f2e280c3600c3b0b767f | [
"MIT"
] | 5 | 2022-03-11T18:08:32.000Z | 2022-03-31T13:47:49.000Z | paper_evaluation/IV.F_sensitivity_geographic_location/dataLoader.py | rafaspadilha/timestampVerificationTIFS | bad325e676b0b6087e54f2e280c3600c3b0b767f | [
"MIT"
] | null | null | null | paper_evaluation/IV.F_sensitivity_geographic_location/dataLoader.py | rafaspadilha/timestampVerificationTIFS | bad325e676b0b6087e54f2e280c3600c3b0b767f | [
"MIT"
] | null | null | null | #####################################################
# Content-Aware Detection of Timestamp Manipulation #
# IEEE Trans. on Information Forensics and Security #
# R. Padilha, T. Salem, S. Workman, #
# F. A. Andalo, A. Rocha, N. Jacobs #
##################################################... | 36.839552 | 97 | 0.492353 |
579b5f9863fab1da1228fe2aaa3eb580567f182b | 6,103 | py | Python | src/parser.py | strellic/PulseLang | 72730ec4c2967f004e9bf19dcd7bbef097824973 | [
"MIT"
] | 1 | 2020-09-24T05:57:25.000Z | 2020-09-24T05:57:25.000Z | src/parser.py | strellic/PulseLang | 72730ec4c2967f004e9bf19dcd7bbef097824973 | [
"MIT"
] | null | null | null | src/parser.py | strellic/PulseLang | 72730ec4c2967f004e9bf19dcd7bbef097824973 | [
"MIT"
] | null | null | null | # Pulse parser
from sly import Parser
from error import error
from lexer import PulseLexer
from ast import *
class PulseParser(Parser):
tokens = PulseLexer.tokens
precedence = (
('left', 'AND', 'NOT'),
('nonassoc', 'LT', 'LE', 'GT', 'GE', 'EQ', 'NE'),
('left', 'PLUS', 'MINUS'),
... | 26.419913 | 89 | 0.615435 |
57b5618d3d337e7d4f86e2aa4a75b133b57091ed | 734 | py | Python | fehler.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 2 | 2019-12-10T10:25:11.000Z | 2021-01-26T13:59:40.000Z | fehler.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | null | null | null | fehler.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 1 | 2020-12-06T21:24:58.000Z | 2020-12-06T21:24:58.000Z | import sympy
import numpy as np
def error(f, err_vars=None):
from sympy import Symbol, latex
s = 0
latex_names = dict()
if err_vars == None:
err_vars = f.free_symbols
for v in err_vars:
err = Symbol('latex_std_' + v.name)
s += f.diff(v)**2 * err**2
latex_names[err... | 22.9375 | 90 | 0.641689 |
57e8b2a96397f4f989c6c29f18d0a38043a250f0 | 993 | py | Python | marsyas-vamp/marsyas/scripts/merge_mf_csv_filenames.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/merge_mf_csv_filenames.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/merge_mf_csv_filenames.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import sys
import os.path
import csv
def main():
mf_filename = sys.argv[1]
csv_filename = sys.argv[2]
out_mf_filename = os.path.join(
os.path.dirname(csv_filename),
os.path.basename(mf_filename))
mf_lines = open(mf_filename).readlines()
filenames_label... | 25.461538 | 67 | 0.584089 |
17f68ffbc7eb1775466239dd298b5c569f6d64d8 | 3,997 | py | Python | src/main/main/settings.py | Nouvellie/django-tflite | 1d08fdc8a2ec58886d7d2b8d40e7b3598613caca | [
"MIT"
] | 2 | 2021-08-23T21:56:07.000Z | 2022-01-20T13:52:19.000Z | src/main/main/settings.py | Nouvellie/django-tflite | 1d08fdc8a2ec58886d7d2b8d40e7b3598613caca | [
"MIT"
] | null | null | null | src/main/main/settings.py | Nouvellie/django-tflite | 1d08fdc8a2ec58886d7d2b8d40e7b3598613caca | [
"MIT"
] | null | null | null | import environ
import os
import random
from datetime import timedelta
from pathlib import Path
from requirements.version import __version__
# Environ preload.
URIPATH = Path(os.path.dirname(__file__)).joinpath(".env")
env = environ.Env(DEBUG=(bool, False))
environ.Env.read_env(env_file=str(URIPATH))
BASE_DIR = Path(... | 24.67284 | 91 | 0.681261 |
aa27d6159de8333ccb32c6a0ec71d10d34550d5e | 4,165 | py | Python | frappe-bench/apps/erpnext/erpnext/regional/united_arab_emirates/setup.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/regional/united_arab_emirates/setup.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/regional/united_arab_emirates/setup.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, os, json
from frappe.custom.doctype.custom_field.custom_field import create_custom_fields
from erpnext.setup.setup_wizard.operations.tax... | 40.048077 | 83 | 0.751501 |
107aae3b6c8ae64592af4d2c5e14f077e5979dcd | 4,094 | py | Python | files/meas/Experiment_03/csv_to_influx.py | mimeiners/ans | 382e000e687d5ec0c80a84223087e60ed656a1dd | [
"MIT"
] | null | null | null | files/meas/Experiment_03/csv_to_influx.py | mimeiners/ans | 382e000e687d5ec0c80a84223087e60ed656a1dd | [
"MIT"
] | null | null | null | files/meas/Experiment_03/csv_to_influx.py | mimeiners/ans | 382e000e687d5ec0c80a84223087e60ed656a1dd | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Created on Fri July 09 12:00:00 2021
@author: © Vadim Grebnev, Tim Hilker, Delphino Klinker
Write CSV data into InfluxDB via pandas dataframe.
"""
import pandas as pd
from influxdb import DataFrameClient
#%% Connection data
DBHOST = 'elite.fk4.hs-bremen.de'
DBPORT = 8086
DBUSER = 'an... | 33.834711 | 79 | 0.506839 |
5e2e5505447d364cb8138564d76db430d48152a7 | 7,508 | py | Python | SBTK_League_Helper/src/interfacing/abstract.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | SBTK_League_Helper/src/interfacing/abstract.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | SBTK_League_Helper/src/interfacing/abstract.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | from abc import ABCMeta, abstractmethod
from collections import UserDict
from datetime import datetime, timezone
from functools import partial, lru_cache
from os import path
from urllib.parse import quote, unquote
from src import application_encoding, application_timeformat
from . import SUPPORTED_SERVERS
from .excep... | 32.643478 | 101 | 0.588173 |
eac6b6d03d7fd03241e9ce29a264ee45ea9a45b4 | 7,529 | py | Python | radiomics/convert_dataset.py | RimeT/p3_radio | 3d522a4356c62255cd93c6d74eb388a2e474dd00 | [
"Apache-2.0"
] | null | null | null | radiomics/convert_dataset.py | RimeT/p3_radio | 3d522a4356c62255cd93c6d74eb388a2e474dd00 | [
"Apache-2.0"
] | null | null | null | radiomics/convert_dataset.py | RimeT/p3_radio | 3d522a4356c62255cd93c6d74eb388a2e474dd00 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2
import os
import argparse
import pandas as pd
import cv2
import json
import numpy as np
import SimpleITK as sitk
import pydicom as dicom
import signal
import multiprocessing
from scholar.schema import schema
from scholar.schema import radiomics as projects
from scholar.radiomics.data import new... | 37.08867 | 130 | 0.590517 |
874f8bd2449f46ea69c47db5cbf90e6d44f8d2d2 | 2,999 | py | Python | algorithm/sorting_algorithms_in_python/timesort.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | algorithm/sorting_algorithms_in_python/timesort.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | algorithm/sorting_algorithms_in_python/timesort.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | from merge_sort import merge
from random import randint
from sorting_timer import run_sorting_algorithm, ARRAY_LENGTH
def insertion_sort(array, left=0, right=None):
if right is None:
right = len(array) - 1
# Loop from the element indicated by
# `left` unitil the element indicated by `ri... | 34.079545 | 67 | 0.575859 |
0d9f7829fa001d7941678a1bb956f906862efbdb | 2,475 | py | Python | test/test_npu/test_network_ops/test_full.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_network_ops/test_full.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_network_ops/test_full.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 44.196429 | 85 | 0.665455 |
0de9870b31c24e8af463c9a0b81beeb200d9dd3f | 1,770 | py | Python | src/onegov/town6/views/auth.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/town6/views/auth.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/town6/views/auth.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | """ The authentication views. """
from onegov.core.security import Public, Personal
from onegov.org.views.auth import (
handle_login, handle_registration, do_logout,
handle_password_reset_request, handle_password_reset
)
from onegov.town6 import TownApp
from onegov.town6.layout import DefaultLayout
from onego... | 34.705882 | 79 | 0.754802 |
21e86a58a9cfff93929e7511540c2587bd70f49a | 12,729 | py | Python | ExtractXrayCobb.py | bernspe/XrayLabel | 33eb522b0e97f758f2cfa2118b8efeb64c144235 | [
"MIT"
] | null | null | null | ExtractXrayCobb.py | bernspe/XrayLabel | 33eb522b0e97f758f2cfa2118b8efeb64c144235 | [
"MIT"
] | null | null | null | ExtractXrayCobb.py | bernspe/XrayLabel | 33eb522b0e97f758f2cfa2118b8efeb64c144235 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import json
import os
import sys
import scipy.interpolate as ip
from scipy.signal import argrelextrema
from skimage.draw import line
import pandas as pd
import pickle
#get config data
config_dict = json.load(open('scol_xray_exp1.json'))
resizedxraydir=config_dict['resizedxraydir']
xraydf=... | 38.110778 | 203 | 0.525572 |
8001deb748e339f2ebb7eabccaa7dadb8e4ff810 | 14,467 | py | Python | packages/watchmen-rest-doll/src/watchmen_rest_doll/console/dashboard_router.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest-doll/src/watchmen_rest_doll/console/dashboard_router.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest-doll/src/watchmen_rest_doll/console/dashboard_router.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from logging import getLogger
from typing import Callable, Dict, List, Optional
from fastapi import APIRouter, Depends
from pydantic import BaseModel
from starlette.responses import Response
from watchmen_auth import PrincipalService
from watchmen_meta.common import ask_meta_storage, ask_snowflake_generator
from watc... | 41.933333 | 120 | 0.804106 |
d53074b4604512ce9010147434ad8d214a729465 | 17,135 | py | Python | mmm_controller.py | metxchris/MMM-Explorer | 251b4d7af56241882611bc47e94ec2923e4be8da | [
"MIT"
] | null | null | null | mmm_controller.py | metxchris/MMM-Explorer | 251b4d7af56241882611bc47e94ec2923e4be8da | [
"MIT"
] | null | null | null | mmm_controller.py | metxchris/MMM-Explorer | 251b4d7af56241882611bc47e94ec2923e4be8da | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""Handles the entire flow of data both to and from MMM
The controller is meant to be ran directly to execute one of three different
MMM runs. The different run types the controller supports are:
* Basic Run: MMM is ran once using data obtained from TRANSP. Various profile
plot PDFs are created... | 42.51861 | 117 | 0.696761 |
d57f106947d3c298a388e0c75095f7bdf5397934 | 2,291 | py | Python | Import/datasource.py | simonbredemeier/ds100bot | 1318b32b818891f4bc6d24f12fcf0ceae898f8bd | [
"Apache-2.0"
] | 15 | 2019-12-20T08:24:31.000Z | 2022-03-18T09:24:25.000Z | Import/datasource.py | simonbredemeier/ds100bot | 1318b32b818891f4bc6d24f12fcf0ceae898f8bd | [
"Apache-2.0"
] | 124 | 2020-04-20T04:36:49.000Z | 2022-01-29T11:08:09.000Z | Import/datasource.py | simonbredemeier/ds100bot | 1318b32b818891f4bc6d24f12fcf0ceae898f8bd | [
"Apache-2.0"
] | 12 | 2020-07-08T22:19:39.000Z | 2022-03-19T09:13:11.000Z | """Abstracts a data source configuration"""
import csv
import Persistence.log as log
from .error import DataError, JsonError
from .row import Row
log_ = log.getLogger(__name__, fmt='{name}:{levelname} {message}')
class DataSource:
_mandatory_fields = (
"file",
"long",
"short",
"sou... | 32.728571 | 85 | 0.543431 |
d632d1ea0c58d2b4db96fd61ed5689fe59e57952 | 511 | py | Python | Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 75/75.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 101 | 2021-12-20T11:57:11.000Z | 2022-03-23T09:49:13.000Z | Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 75/75.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 4 | 2022-01-12T11:55:56.000Z | 2022-02-12T04:53:33.000Z | Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 75/75.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 38 | 2022-01-12T11:56:16.000Z | 2022-03-23T10:07:52.000Z | #Plot the data in the file provided through the URL http://www.pythonhow.com/data/sampledata.txt
import pandas
import pylab as plt
data = pandas.read_csv("http://www.pythonhow.com/data/sampledata.txt")
data.plot(x='x', y='y', kind='scatter')
plt.show()
"""
from bokeh.plotting import figure
from bokeh.io import outpu... | 23.227273 | 96 | 0.727984 |
4eef4b4e03eef9030917092ba5005bb198b8816c | 2,738 | py | Python | frappe-bench/apps/erpnext/erpnext/buying/doctype/supplier_scorecard_criteria/test_supplier_scorecard_criteria.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | frappe-bench/apps/erpnext/erpnext/buying/doctype/supplier_scorecard_criteria/test_supplier_scorecard_criteria.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/buying/doctype/supplier_scorecard_criteria/test_supplier_scorecard_criteria.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestSupplierScorecardCriteria(unittest.TestCase):
def test_variables_exist(self):
delete_test_scorecards()
for d in test_good_... | 36.506667 | 135 | 0.731191 |
dced88c5fbba66b68c30184113a19d87a38969bd | 2,302 | py | Python | Practice-2019-05-11/scripts/ss_classifyer.py | serge-sotnyk/nlp-practice | e38400590a3fcf140a73d6871a778b3c2115a2fe | [
"MIT"
] | 3 | 2019-11-25T09:56:48.000Z | 2021-01-18T13:18:17.000Z | Practice-2019-05-11/scripts/ss_classifyer.py | serge-sotnyk/nlp-practice | e38400590a3fcf140a73d6871a778b3c2115a2fe | [
"MIT"
] | null | null | null | Practice-2019-05-11/scripts/ss_classifyer.py | serge-sotnyk/nlp-practice | e38400590a3fcf140a73d6871a778b3c2115a2fe | [
"MIT"
] | 2 | 2020-05-17T17:22:14.000Z | 2020-09-23T08:31:46.000Z | from sklearn.metrics import classification_report
from scripts.baseline_logisticregression import readInData
from typing import NamedTuple, List
#from scripts.bert_utils import calc_entailment_prob
from sklearn.ensemble import RandomForestClassifier
from sklearn.linear_model import LogisticRegression
from bpemb impor... | 29.139241 | 116 | 0.672893 |
b4ae4e57c9a264e3a3d06e1b742c49d93114e107 | 19,227 | py | Python | src/onegov/core/csv.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/csv.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/csv.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | """ Offers tools to deal with csv (and xls, xlsx) files. """
import codecs
import openpyxl
import re
import sys
import tempfile
import xlrd
from collections import namedtuple, OrderedDict
from csv import DictWriter, Sniffer, QUOTE_ALL
from csv import Error as CsvError
from csv import reader as csv_reader
from csv imp... | 30.326498 | 79 | 0.623758 |
b4e4707526f9fae59ca1f5c111b05bca34bb1e95 | 73 | py | Python | packages/watchmen-meta/src/watchmen_meta/auth/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-meta/src/watchmen_meta/auth/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-meta/src/watchmen_meta/auth/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from .auth_helper import build_find_user_by_name, build_find_user_by_pat
| 36.5 | 72 | 0.90411 |
2ecf9cb187b70dc9ada1b47f66b830606b603579 | 22 | py | Python | pizza.py | gray-adeyi/pizza | 659db6e85492903374416295cc3ca3a78584eccb | [
"MIT"
] | null | null | null | pizza.py | gray-adeyi/pizza | 659db6e85492903374416295cc3ca3a78584eccb | [
"MIT"
] | null | null | null | pizza.py | gray-adeyi/pizza | 659db6e85492903374416295cc3ca3a78584eccb | [
"MIT"
] | 1 | 2022-03-17T00:54:27.000Z | 2022-03-17T00:54:27.000Z | from pizza import cli
| 11 | 21 | 0.818182 |
25b288c903b1659cb37c5a618f10b4de6ce230be | 4,916 | py | Python | webchat/utils.py | zhangyafeii/Flask | 9c9a5ea282f77aabcda838796dad2411af9b519f | [
"MIT"
] | null | null | null | webchat/utils.py | zhangyafeii/Flask | 9c9a5ea282f77aabcda838796dad2411af9b519f | [
"MIT"
] | null | null | null | webchat/utils.py | zhangyafeii/Flask | 9c9a5ea282f77aabcda838796dad2411af9b519f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@Datetime: 2019/1/5
@Author: Zhang Yafei
"""
from bs4 import BeautifulSoup
from lxml import etree
text = '<error><ret>0</ret><message></message><skey>@crypt_42d677ed_87d20caf1a6fb23a830b4e08334f6ad2</skey><wxsid>tmqszMsQ+9rm9o5X</wxsid><wxuin>2229427136</wxuin><pass_ticket>IqqqHuHFQCWvPEx... | 22.865116 | 295 | 0.55594 |
9fb8ce22c04a134a6f468f21bdf501efa27b9e91 | 146 | py | Python | 3.Python/dedesaepulloh.py | AyushSarode/Hacktoberfest2020-Newbie | f7194dabcefb7e808eaedc852c630cbd65367517 | [
"MIT"
] | 11 | 2020-10-02T06:37:32.000Z | 2020-10-28T09:09:33.000Z | 3.Python/dedesaepulloh.py | AyushSarode/Hacktoberfest2020-Newbie | f7194dabcefb7e808eaedc852c630cbd65367517 | [
"MIT"
] | 7 | 2020-10-08T09:03:22.000Z | 2020-11-03T23:58:13.000Z | 3.Python/dedesaepulloh.py | AyushSarode/Hacktoberfest2020-Newbie | f7194dabcefb7e808eaedc852c630cbd65367517 | [
"MIT"
] | 58 | 2020-09-29T15:35:39.000Z | 2021-10-05T17:35:15.000Z | name, age = "Dede Saepulloh", 22
username = "dedesaepulloh"
print ('Hello!')
print("Name: {}\nAge: {}\nUsername: {}".format(name, age, username))
| 29.2 | 68 | 0.657534 |
1a30cedd51c7910003261ce113a8040019783092 | 1,827 | py | Python | hisim/loadtypes.py | sdickler/HiSim | 09a11d99f220f7cadb3cb7b09a6fce8f147243c8 | [
"MIT"
] | 12 | 2021-10-05T11:38:24.000Z | 2022-03-25T09:56:08.000Z | hisim/loadtypes.py | sdickler/HiSim | 09a11d99f220f7cadb3cb7b09a6fce8f147243c8 | [
"MIT"
] | 6 | 2021-10-06T13:27:55.000Z | 2022-03-10T12:55:15.000Z | hisim/loadtypes.py | sdickler/HiSim | 09a11d99f220f7cadb3cb7b09a6fce8f147243c8 | [
"MIT"
] | 4 | 2022-02-21T19:00:50.000Z | 2022-03-22T11:01:38.000Z | """
Guidelines for enum classes:
1. Write members names extensively, with no abbreviation, i.e., 'Watt' instead of 'W'.
2. Attributes should follow the International System of Units (SI) [https://en.wikipedia.org/wiki/International_System_of_Units], i.e., for power the attribute is 'W'.
3. Do not use multi... | 19.231579 | 171 | 0.605911 |
1a4f10237bde905b19abeb24233f314178eb40ad | 13,841 | py | Python | reports/views.py | Daniel-Hoerauf/cs3240-f16-team11 | 0377bcb8ede9599c04daf7683b065abb2a47f893 | [
"MIT"
] | null | null | null | reports/views.py | Daniel-Hoerauf/cs3240-f16-team11 | 0377bcb8ede9599c04daf7683b065abb2a47f893 | [
"MIT"
] | null | null | null | reports/views.py | Daniel-Hoerauf/cs3240-f16-team11 | 0377bcb8ede9599c04daf7683b065abb2a47f893 | [
"MIT"
] | null | null | null | from django.shortcuts import render, get_object_or_404, render_to_response
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from .models import Report, UploadedFile, Folder
from .forms import ReportForm, FolderForm
from django.template import RequestContext
from web.models ... | 39.321023 | 97 | 0.61195 |
46d6441d1c17b8be198ce934bc7b9ea0c134dbcd | 2,289 | py | Python | tools/legacy/darkstar-vol-extractor/extract_file.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 2 | 2020-03-18T18:23:27.000Z | 2020-08-02T15:59:16.000Z | tools/legacy/darkstar-vol-extractor/extract_file.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 5 | 2019-07-07T16:47:47.000Z | 2020-08-10T16:20:00.000Z | tools/legacy/darkstar-vol-extractor/extract_file.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 1 | 2020-03-18T18:23:30.000Z | 2020-03-18T18:23:30.000Z | import os
import json
import subprocess
import binascii
def write_files(import_filename, raw_data, dest_dir, file_info):
for index, info in enumerate(file_info):
offset = info.start_offset
end_offset = info.end_offset
filename = info.filename
if (info.compression_type == "none"):
... | 38.15 | 125 | 0.629533 |
204f46feae11dc691efdd385879187f72a64f1cb | 2,606 | py | Python | Packs/FeedIntel471/Integrations/Intel471Actors/test_data/raw_data.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/FeedIntel471/Integrations/Intel471Actors/test_data/raw_data.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/FeedIntel471/Integrations/Intel471Actors/test_data/raw_data.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | RAW_RESPONSE = {
"lastUpdated": 1609661791534,
"handles": [
"testname"
],
"links": {
"forums": [
{
"name": "testforum",
"actorHandle": "testname",
"uid": "4671aeaf49c792689533b00664a5c3ef"
}
],
"forum... | 51.098039 | 118 | 0.564467 |
b3e10641b024b717a90bdaa20848bed29a477ab2 | 20,371 | py | Python | rasa/nlu/extractors/crf_entity_extractor.py | russosanti/rasa | 21fb0cc8e92cf270e4228438cb386f1d6f364563 | [
"Apache-2.0"
] | 2 | 2021-10-31T01:06:08.000Z | 2021-11-08T09:43:23.000Z | rasa/nlu/extractors/crf_entity_extractor.py | alfredfrancis/rasa | d8d226408f20cc2563c3aefbccef3e364a447666 | [
"Apache-2.0"
] | 56 | 2020-06-09T00:16:14.000Z | 2020-11-16T00:25:20.000Z | rasa/nlu/extractors/crf_entity_extractor.py | alfredfrancis/rasa | d8d226408f20cc2563c3aefbccef3e364a447666 | [
"Apache-2.0"
] | null | null | null | import logging
import os
import typing
import numpy as np
from typing import Any, Dict, List, Optional, Text, Tuple, Union, NamedTuple, Type
import rasa.nlu.utils.bilou_utils as bilou_utils
import rasa.utils.common as common_utils
from rasa.nlu.tokenizers.spacy_tokenizer import POS_TAG_KEY
from rasa.nlu.config import ... | 36.770758 | 87 | 0.573168 |
377a768e14732f097137189a6395921e262b8f9e | 4,779 | py | Python | model/topoml_util/Tokenizer.py | Empythy/geometry-learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 21 | 2018-10-09T08:15:29.000Z | 2022-03-16T08:23:08.000Z | model/topoml_util/Tokenizer.py | reinvantveer/Topology-Learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 31 | 2017-09-20T13:30:37.000Z | 2018-03-01T13:24:58.000Z | model/topoml_util/Tokenizer.py | reinvantveer/Topology-Learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 7 | 2018-11-29T11:39:02.000Z | 2022-01-12T07:10:26.000Z | from keras.preprocessing.text import Tokenizer
import numpy as np
class Tokenize(Tokenizer):
"""Text tokenization wrapper around Keras text tokenization methods
"""
def __init__(self, texts):
super().__init__(num_words=None,
filters='\t\n',
lower=... | 43.844037 | 112 | 0.652856 |
80750e464f246204ec454376623104cb02afd64a | 3,186 | py | Python | bigbench/benchmark_tasks/object_counting/generate_task.py | dimmollo/BIG-bench | f0dffeb4f16ef5489686a81e2d63362d251cda3e | [
"Apache-2.0"
] | 1 | 2021-10-07T20:52:41.000Z | 2021-10-07T20:52:41.000Z | bigbench/benchmark_tasks/object_counting/generate_task.py | dimmollo/BIG-bench | f0dffeb4f16ef5489686a81e2d63362d251cda3e | [
"Apache-2.0"
] | null | null | null | bigbench/benchmark_tasks/object_counting/generate_task.py | dimmollo/BIG-bench | f0dffeb4f16ef5489686a81e2d63362d251cda3e | [
"Apache-2.0"
] | 1 | 2021-09-24T17:27:41.000Z | 2021-09-24T17:27:41.000Z | """Script to generate task.json for object counting task.
"""
import json
import random
from typing import List, Tuple
import inflect # using inflect==5.3.0
DATA = {
"animals": [
"cat", "rabbit", "donkey", "dog", "mouse", "cow", "snake", "fish",
"bear", "snail", "chicken", "pig", "duck", "goat", ... | 28.19469 | 80 | 0.591023 |
80988c574d7fa359d317dba973bfadae113a676e | 885 | py | Python | measure/StopWatch.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | measure/StopWatch.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | measure/StopWatch.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | import time
import datetime
class StopWatch:
"""Stop Watch to measure the elapsed time."""
def __init__(self):
self.start_time = None
self.start_counter = None
self.stop_time = None
self.stop_counter = None
def start(self):
self.start_time = self._now()
... | 23.289474 | 69 | 0.612429 |
80baeb6a19ee888c850828def10e937432c5c76e | 58 | py | Python | venv/Lib/site-packages/pynance/tst/unit/tech/__init__.py | LeonardoHMS/imobi | 6b2b97a05df67ea7d493f7b601382f65c6629cc2 | [
"MIT"
] | 35 | 2015-03-12T04:16:14.000Z | 2020-12-17T18:10:15.000Z | venv/Lib/site-packages/pynance/tst/unit/tech/__init__.py | LeonardoHMS/imobi | 6b2b97a05df67ea7d493f7b601382f65c6629cc2 | [
"MIT"
] | 31 | 2015-03-16T21:31:04.000Z | 2021-01-26T00:12:34.000Z | venv/Lib/site-packages/pynance/tst/unit/tech/__init__.py | LeonardoHMS/imobi | 6b2b97a05df67ea7d493f7b601382f65c6629cc2 | [
"MIT"
] | 18 | 2015-09-30T10:40:26.000Z | 2021-01-25T21:20:44.000Z | # make subdirectory a module so that nose will find tests
| 29 | 57 | 0.793103 |
03c4506cee235aecba60f7708d3eb2ab9d224abb | 3,672 | py | Python | ada-boost/AdaBoost.py | Felihong/ml-practices | 5193d14e01884ea2d808f621e758c2f645d1980c | [
"Apache-2.0"
] | null | null | null | ada-boost/AdaBoost.py | Felihong/ml-practices | 5193d14e01884ea2d808f621e758c2f645d1980c | [
"Apache-2.0"
] | null | null | null | ada-boost/AdaBoost.py | Felihong/ml-practices | 5193d14e01884ea2d808f621e758c2f645d1980c | [
"Apache-2.0"
] | null | null | null | import numpy as np
''' wir packen 3 Klassifizieren Algorithmen in unsere Klassenpool '''
import ClassiferPool.FischerDiskriminante as fischer
import ClassiferPool.Perzeptron as perzeptron
import ClassiferPool.KNN as knn
def initial_weight_data(data):
return np.ones((len(data), 1))
def initial_weight_class(MaxIn... | 30.347107 | 100 | 0.668573 |
45b70cb476eb7ce75e5e28f019c0947ad832b1e6 | 79 | py | Python | search/test/test.py | fbennets/HCLC-GDPR-Bot | a26306e6593d8356a7a58dce32090ca21f30ac29 | [
"MIT"
] | 1 | 2021-06-04T15:57:11.000Z | 2021-06-04T15:57:11.000Z | search/test/test.py | fbennets/HCLC-GDPR-Bot | a26306e6593d8356a7a58dce32090ca21f30ac29 | [
"MIT"
] | 175 | 2020-06-10T23:33:08.000Z | 2021-12-26T10:35:51.000Z | search/test/test.py | fbennets/HCLC-GDPR-Bot | a26306e6593d8356a7a58dce32090ca21f30ac29 | [
"MIT"
] | 2 | 2020-06-12T15:11:20.000Z | 2021-06-13T10:37:35.000Z | from datenanfragen import search_company
print(search_company("n62 gbhm", 10)) | 39.5 | 41 | 0.822785 |
ff453f7ac6ba5a6db03ec413056c085be71303b8 | 1,072 | py | Python | day10/calculator.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day10/calculator.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day10/calculator.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | from calculator_art import logo
print(logo)
#Calculator
def add(n1, n2):
return n1 + n2
def subtract(n1, n2):
return n1 - n2
def multiply(n1, n2):
return n1 * n2
def divide(n1, n2):
return n1 / n2
operations = {
"+": add,
"-": subtract,
"*": multiply,
"/": divide,
}
def calculat... | 22.808511 | 146 | 0.591418 |
2ba76999a89fd133cc9fe56e38eba3d93edc857d | 8,853 | py | Python | backend/cctalk/coin_messenger.py | bytebang/ppvm | 07a0650c618b9dd6abc7563070a80c132034f532 | [
"MIT"
] | null | null | null | backend/cctalk/coin_messenger.py | bytebang/ppvm | 07a0650c618b9dd6abc7563070a80c132034f532 | [
"MIT"
] | null | null | null | backend/cctalk/coin_messenger.py | bytebang/ppvm | 07a0650c618b9dd6abc7563070a80c132034f532 | [
"MIT"
] | null | null | null | """ Provides the CoinMessenger class definition.
Module content
--------------
"""
# The python-cctalk package allows one to send ccTalk messages and decode replies from a coin validator.
license_text = "(C) 2011 David Schryer GNU GPLv3 or later."
__copyright__ = license_text
__autodoc__ = ['CoinMessenger']
__all__ ... | 37.35443 | 109 | 0.536541 |
2bdcd905987e24482b318caa4702c2e166bf7a86 | 4,549 | py | Python | andro-it.py | oznotes/Andro-IT | 127f6425b3f5766a5c6775b647bdd0f484dd7921 | [
"Unlicense"
] | null | null | null | andro-it.py | oznotes/Andro-IT | 127f6425b3f5766a5c6775b647bdd0f484dd7921 | [
"Unlicense"
] | null | null | null | andro-it.py | oznotes/Andro-IT | 127f6425b3f5766a5c6775b647bdd0f484dd7921 | [
"Unlicense"
] | null | null | null | import os
import re
import sys
from adb_android import *
def clear():
os.system('cls')
def is_hex(s):
try:
int(s, 16)
return True
except ValueError:
return False
def extract(s, first, last):
try:
start = s.index(first) + len(first)
end = s.index(last, start... | 26.91716 | 82 | 0.51286 |
a67541cd27a6e0ea88db7c5f2e802bcd449abfbe | 740 | py | Python | exercises/pt/test_03_10_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/pt/test_03_10_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/pt/test_03_10_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert Span.has_extension("to_html"), "Você registrou a extensão na partição?"
ext = Span.get_extension("to_html")
assert ext[1] is not None, "Você definiu o método corretamente?"
assert "method=to_html" in __solution__, "Você atribuiu to_html como sendo o método?"
assert (
'span... | 43.529412 | 89 | 0.687838 |
a689ecab6e0f53d0ca9e7411429c0d3dd3e6c39c | 243 | py | Python | python/python_backup/wisp_old/radioactive/args_test1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/wisp_old/radioactive/args_test1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/wisp_old/radioactive/args_test1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-V","--version", help="displays version",
action="store_true")
args = parser.parse_args()
if args.version:
print("version 0.0.8-beta Jimut (TM)")
| 27 | 62 | 0.666667 |
f33762e7dae7e4ac70fd269d36ddb272615dadde | 1,271 | py | Python | API_examples/record_wav_usb.py | nilsfed/SmarterWecker | 82a64172206fb1065bb0aaac0a769952af136c1a | [
"MIT"
] | null | null | null | API_examples/record_wav_usb.py | nilsfed/SmarterWecker | 82a64172206fb1065bb0aaac0a769952af136c1a | [
"MIT"
] | null | null | null | API_examples/record_wav_usb.py | nilsfed/SmarterWecker | 82a64172206fb1065bb0aaac0a769952af136c1a | [
"MIT"
] | null | null | null | import pyaudio
import wave
form_1 = pyaudio.paInt16 # 16-bit resolution
chans = 1 # 1 channel
samp_rate = 16000 # 44.1kHz sampling rate for deepspeech: 16k
chunk = 4096 # 2^12 samples for buffer
record_secs = 3 # seconds to record
dev_index = 2 # device index found by p.get_device_info_by_index(ii)
wav_output... | 32.589744 | 73 | 0.720692 |
f36d8c17e4a3b2669d6d5c9290dfa97a37d46077 | 1,086 | py | Python | src/onegov/onboarding/layout.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/onboarding/layout.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/onboarding/layout.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from cached_property import cached_property
from onegov.core.layout import ChameleonLayout
from onegov.core.static import StaticFile
class Layout(ChameleonLayout):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.request.include('common')
@cached_property
def f... | 24.681818 | 73 | 0.701657 |
3449276fd2c0574e76039283dfc1ffdc153721a4 | 30 | py | Python | torba/torba/workbench/__init__.py | mittalkartik2000/lbry-sdk | a07b17ec0c9c5d0a88bc730caf6ab955e0971b38 | [
"MIT"
] | 4,076 | 2018-06-01T05:54:24.000Z | 2022-03-07T21:05:52.000Z | torba/torba/workbench/__init__.py | mittalkartik2000/lbry-sdk | a07b17ec0c9c5d0a88bc730caf6ab955e0971b38 | [
"MIT"
] | 80 | 2018-06-14T01:02:03.000Z | 2019-06-19T10:45:39.000Z | torba/torba/workbench/__init__.py | braveheart12/lbry-sdk | dc709b468f9dce60d206161785def5c7ace2b763 | [
"MIT"
] | 20 | 2018-06-27T21:52:22.000Z | 2022-03-08T11:25:23.000Z | from .application import main
| 15 | 29 | 0.833333 |
1b59b676b847f2d31ee2aa2b965f253f58d61d7b | 1,135 | py | Python | Datastructures/grahN.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | Datastructures/grahN.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | Datastructures/grahN.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | class Graph:
def __init__(self, routes):
self.start_end_edges = {}
for start, end in routes:
self.start_end_edges.setdefault(start, []).append(end)
@property
def getEdges(self):
return self.start_end_edges
def get_start_end_paths(self, start=None, end=None, path... | 25.222222 | 77 | 0.539207 |
1ba19249e38de2c7fe37b266e8a8b2e1edf9bdf9 | 1,283 | py | Python | sketches/rpg02/player.py | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/rpg02/player.py | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/rpg02/player.py | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | from settings import *
class Player():
def __init__(self):
self.pos = PVector(width/2, height/2)
self.w = self.h = self.d = 32
self.r = self.d/2 # Radius
self.max_speed = 3
self.speed = PVector(0, 0)
self.img = loadImage("knt1_fr1.gif")
self.debug = Tru... | 29.837209 | 76 | 0.521434 |
049fbd77df5d9b9bda12428fa620872314830740 | 1,384 | py | Python | books/PythonCleanCode/ch5_decorator/decorator_parameterized_2.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch5_decorator/decorator_parameterized_2.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch5_decorator/decorator_parameterized_2.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """Clean Code in Python - Chapter 5: Decorators
Parameterized decorators using functions
"""
from functools import wraps
from decorator_function_1 import ControlledException
from log import logger
RETRIES_LIMIT = 3
class WithRetry:
def __init__(self, retries_limit=RETRIES_LIMIT, allowed_exceptio... | 26.113208 | 84 | 0.659682 |
04dac5fda3afca1b01c3fbf0bc507a5fe684147e | 953 | py | Python | backend/app/db/init_db.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2021-11-04T17:06:07.000Z | 2021-11-04T17:06:07.000Z | backend/app/db/init_db.py | JamesNeumann/learning-by-annotations | c2b5e4b653eeb1c973aa5a7dad35ac8be18cb1ad | [
"MIT"
] | 21 | 2021-11-01T10:13:56.000Z | 2021-12-02T10:02:13.000Z | backend/app/db/init_db.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2021-12-16T18:20:55.000Z | 2021-12-16T18:20:55.000Z | import app.schemas.user
from app.core.config import settings
from app.crud.crud_user import crud_user
# noinspection PyUnresolvedReferences
from app.db import base # Import needed SQL Alchemy models
from app.db.base_class import Base
from app.db.session import engine
from sqlalchemy.orm import Session
de... | 31.766667 | 83 | 0.700944 |
b6bbdb4d48f221ace341478395c8ee46a24864e1 | 3,473 | py | Python | Pwn2Win/2021/crypto/cladorhizidae/cladorhizidae.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | Pwn2Win/2021/crypto/cladorhizidae/cladorhizidae.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | Pwn2Win/2021/crypto/cladorhizidae/cladorhizidae.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | rate_size = 2
capacity_size = 14
block_size = 4
state_size = rate_size + capacity_size
blank_rounds = 6
# This file contains functions of BoppreH's A2S implementation found at at https://github.com/boppreh/AES
s_box = (
0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B, 0x6F, 0xC5, 0x30, 0x01, 0x67, 0x2B, 0xFE, 0xD7, 0xAB, 0x76... | 31.288288 | 105 | 0.570688 |
6d0957c502143569be76fdae62b5a95c73f47eac | 2,846 | py | Python | frappe-bench/apps/erpnext/erpnext/education/doctype/student_applicant/student_applicant.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/education/doctype/student_applicant/student_applicant.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/education/doctype/student_applicant/student_applicant.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-777777yyy
# Copyright (c) 2015, Frappe Technologies and contributors
# For license information, please see license.txt
from __future__ import print_function, unicode_literals
import frappe
from frappe import _
from frappe.model.document import Document
from frappe.utils import getdate
class Stu... | 40.084507 | 131 | 0.776528 |
6d5b24afbb10a77c0ed1a46f95874777934edefc | 575 | py | Python | testlogin/TestLoginS.py | weibk/webauto | f494f8043d05739935d1fc22b941bbc9a7ba75b7 | [
"MIT"
] | null | null | null | testlogin/TestLoginS.py | weibk/webauto | f494f8043d05739935d1fc22b941bbc9a7ba75b7 | [
"MIT"
] | null | null | null | testlogin/TestLoginS.py | weibk/webauto | f494f8043d05739935d1fc22b941bbc9a7ba75b7 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# encoding='utf-8'
# author:weibk
# time:2021/10/28 19:32
from selenium import webdriver
from unittest import TestCase
from ddt import ddt, data
from Data import TestData
from PageOperation import PageOp
import time
@ddt
class TestLoginS(TestCase):
@data(*TestData.data_sucess)
def test_succ... | 25 | 58 | 0.695652 |
fcfe547720aede274bee6bb1e78d96d6ffacd7b4 | 3,795 | py | Python | code/snake/DeepLearning/DeepNetworkAgentConvolution.py | BogyMitutoyoCTL/AI-Preparation | ef535741816b02e5e63d426a3232a688c9abd726 | [
"MIT"
] | 1 | 2020-03-30T09:25:53.000Z | 2020-03-30T09:25:53.000Z | code/snake/DeepLearning/DeepNetworkAgentConvolution.py | BogyMitutoyoCTL/AI-Preparation | ef535741816b02e5e63d426a3232a688c9abd726 | [
"MIT"
] | 2 | 2020-02-05T14:00:23.000Z | 2020-03-30T19:57:19.000Z | code/snake/DeepLearning/DeepNetworkAgentConvolution.py | BogyMitutoyoCTL/AI-Preparation | ef535741816b02e5e63d426a3232a688c9abd726 | [
"MIT"
] | null | null | null | import gym
import tensorflow
from rl.agents import DQNAgent
from rl.callbacks import ModelIntervalCheckpoint, FileLogger
from rl.memory import SequentialMemory
from rl.policy import LinearAnnealedPolicy, EpsGreedyQPolicy
from tensorflow.keras import Input, Model
from tensorflow.keras.layers import Conv2D
from tensorflo... | 38.72449 | 118 | 0.701449 |
1e4bc4c0d6a9cfa7ee7d5dc31b097c1d430a5582 | 664 | py | Python | web/user/userActivate.py | liukai0322/docklet | 9e4d1f4fc2e523423b0e94406242a29b20643788 | [
"BSD-3-Clause"
] | 1 | 2016-05-31T06:52:53.000Z | 2016-05-31T06:52:53.000Z | web/user/userActivate.py | liukai0322/docklet | 9e4d1f4fc2e523423b0e94406242a29b20643788 | [
"BSD-3-Clause"
] | null | null | null | web/user/userActivate.py | liukai0322/docklet | 9e4d1f4fc2e523423b0e94406242a29b20643788 | [
"BSD-3-Clause"
] | null | null | null | from flask import render_template, redirect, request
from dockletreq.dockletrequest import dockletRequest
from view.view import normalView
class userActivateView(normalView):
template_path = 'user/activate.html'
@classmethod
def get(self):
userinfo = dockletRequest.post('/user/selfQuery/')
... | 31.619048 | 76 | 0.685241 |
94a9f1ae6de696ae2e8f5b470a7766ecef7c81fc | 4,342 | py | Python | WebAppExample/WebApp/Main/libLogin.py | wallamejorge/PepqaWebApp | 20896a1224d1a2cea3a137950c4f0306f0269db7 | [
"Apache-2.0"
] | null | null | null | WebAppExample/WebApp/Main/libLogin.py | wallamejorge/PepqaWebApp | 20896a1224d1a2cea3a137950c4f0306f0269db7 | [
"Apache-2.0"
] | null | null | null | WebAppExample/WebApp/Main/libLogin.py | wallamejorge/PepqaWebApp | 20896a1224d1a2cea3a137950c4f0306f0269db7 | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
#----------------------------------------------------------------------------- #
#--- Title : Login Python Functions
#--- Project : WebApp Server running in Django
#--- Author : Jorge Luis Mayorga Taborda
#--- Python : Runngin en Django 1.6 y Python 2.0
#--- Comments:
#---
#---
#--... | 36.183333 | 85 | 0.2614 |
94ff63b70da402a2399197f6bc34dc87a9faed4f | 2,556 | py | Python | myspiders/spider_hr/hzbank_spider.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | 2 | 2021-11-27T06:40:47.000Z | 2022-01-06T03:12:46.000Z | myspiders/spider_hr/hzbank_spider.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | null | null | null | myspiders/spider_hr/hzbank_spider.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | null | null | null | from myspiders.ruia import JsonField, Item, Spider, Bs4HtmlField, Bs4AttrField, Bs4TextField
import json
from config import Target, Job
from urllib.parse import quote, urljoin
import re
from bs4 import BeautifulSoup
'''
batchNo: "20191206154854445561"
endTime: "20201231000000"
id: 456734
jobDesc: "1、负责分行公鸡贷面签、云抵贷看房、集... | 30.428571 | 173 | 0.703443 |
7830713d774cc9f6c51f331162d871058d89c02d | 94 | py | Python | django_project/apps/ueditor/apps.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 24 | 2017-07-30T14:57:01.000Z | 2021-05-24T06:09:14.000Z | apps/ueditor/apps.py | blackholll/loonblog | 63d1f06d04047f220f550de914e542f535bb61a3 | [
"MIT"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | apps/ueditor/apps.py | blackholll/loonblog | 63d1f06d04047f220f550de914e542f535bb61a3 | [
"MIT"
] | 16 | 2017-08-07T15:46:51.000Z | 2022-01-06T06:46:24.000Z | from django.apps import AppConfig
class UeditorConfig(AppConfig):
name = 'apps.ueditor'
| 15.666667 | 33 | 0.755319 |
78acfd9d04cb83598c6aff1b9fb17db5fd613c62 | 2,204 | py | Python | chkclient_test.py | lihuiba/SoftSAN | 1b8ab2cae92b7aac34211909b27d4ebe595275d7 | [
"Apache-2.0"
] | 1 | 2015-08-02T09:53:18.000Z | 2015-08-02T09:53:18.000Z | chkclient_test.py | lihuiba/SoftSAN | 1b8ab2cae92b7aac34211909b27d4ebe595275d7 | [
"Apache-2.0"
] | null | null | null | chkclient_test.py | lihuiba/SoftSAN | 1b8ab2cae92b7aac34211909b27d4ebe595275d7 | [
"Apache-2.0"
] | 2 | 2018-03-21T04:59:50.000Z | 2019-12-03T15:54:17.000Z | import Client
import rpc, logging
import messages_pb2 as msg
import mds, ChunkServer
import gevent.socket
import guid as Guid
import block.dm as dm
from mds import Object
import libiscsi
import scandev
import config,util
def configuration():
global PARAM
helpmsg = '''group directories before files.
augment with ... | 27.898734 | 80 | 0.698276 |
1527a64319ab6c8af29614ebf1d6d79c9e8f2228 | 1,868 | py | Python | loesungsvorschlaege/ml_2_klassifikation_knn_svm/praxis/nearest_centroid/nearest_centroid.py | severinhaller/einf-machinelearning | 4dfc8f1da0d81c5aa800d1459f81b72d1bf6dd9b | [
"MIT"
] | null | null | null | loesungsvorschlaege/ml_2_klassifikation_knn_svm/praxis/nearest_centroid/nearest_centroid.py | severinhaller/einf-machinelearning | 4dfc8f1da0d81c5aa800d1459f81b72d1bf6dd9b | [
"MIT"
] | null | null | null | loesungsvorschlaege/ml_2_klassifikation_knn_svm/praxis/nearest_centroid/nearest_centroid.py | severinhaller/einf-machinelearning | 4dfc8f1da0d81c5aa800d1459f81b72d1bf6dd9b | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import pandas as pd
import sklearn.metrics as met
import sklearn.model_selection as modsel
import sklearn.neighbors as neigh
column_names = ["sepal-length", "sepal-width", "petal-length", "petal-width", "class"]
# Lade die Daten aus der CSV-Datei iris.csv in ein Data Frame.
# Verwende d... | 38.916667 | 94 | 0.779443 |
158026791df7180c56e0a6e54d1e98f03d62ca0a | 3,218 | py | Python | scrape.py | Legal-Networks/gesetze-im-internet | e87b5bc8a5c5e61118efbc60ccc03fd188218d14 | [
"BSD-3-Clause"
] | 7 | 2021-01-09T10:55:12.000Z | 2022-01-29T11:46:02.000Z | scrape.py | Legal-Networks/gesetze-im-internet | e87b5bc8a5c5e61118efbc60ccc03fd188218d14 | [
"BSD-3-Clause"
] | null | null | null | scrape.py | Legal-Networks/gesetze-im-internet | e87b5bc8a5c5e61118efbc60ccc03fd188218d14 | [
"BSD-3-Clause"
] | null | null | null | import argparse
import os
import shutil
from multiprocessing.pool import Pool
from zipfile import ZipFile, BadZipFile
import requests
from bs4 import BeautifulSoup
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.util.retry import Retry
def requests_retry_session(
retries=5, backoff_facto... | 28.477876 | 88 | 0.656308 |
01e553dfc3206d5756ab80d288fced8641f4b003 | 256 | py | Python | exercises/de/solution_01_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/de/solution_01_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/de/solution_01_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
# Lade das Modell "de_core_news_sm"
nlp = spacy.load("de_core_news_sm")
text = "Apple wurde 1976 von Steve Wozniak, Steve Jobs und Ron Wayne gegründet."
# Verarbeite den Text
doc = nlp(text)
# Drucke den Text des Dokuments
print(doc.text)
| 19.692308 | 80 | 0.75 |
da73ac128f126a2e116fb4bde5215972a259d41e | 5,803 | py | Python | official/cv/centerface/test.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/centerface/test.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/centerface/test.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2020-21 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... | 37.928105 | 115 | 0.594865 |
e5fb401d7ee7593d5ebb7820ca3c4d19ab4dc7fe | 795 | py | Python | LIT/2021/crypto/Scottish_Flag/scottish_flag.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | LIT/2021/crypto/Scottish_Flag/scottish_flag.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | LIT/2021/crypto/Scottish_Flag/scottish_flag.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | import random
import binascii
import math
import sympy
def d(x0,x1,y0,y1):
return (x0-y0)**2 + (x1-y1)**2
class PRNG:
def __init__(self,seed0,seed1):
self.seed0 = seed0;
self.seed1 = seed1;
self.L = 1;
# Returns a random number between [0,x)
def rand(self,x0,x... | 21.486486 | 58 | 0.6 |
c1983218726024d0052f28cb6d8168af372893c4 | 450 | py | Python | Algorithms/Implementation/jumping_on_the_clouds.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Implementation/jumping_on_the_clouds.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Implementation/jumping_on_the_clouds.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
n = int(input())
c = list(map(int, input().strip().split()))
jump = 0
i = 0
len_c = len(c)
while i < len_c:
if i == len_c - 3:
jump += c[i + 2] + 1
break
elif i == len_c - 2:
jump += c[i + 1] + 1
break
elif c[i + 2] == 0:
jump += 1
i +... | 17.307692 | 43 | 0.395556 |
c1a41208dbee20bfe8ce4414c978c2988eb7cd4c | 1,905 | py | Python | ucs-school-umc-licenses/ucs-test/97_bildungslogin_umc/02_unittest_python_api.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | ucs-school-umc-licenses/ucs-test/97_bildungslogin_umc/02_unittest_python_api.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | ucs-school-umc-licenses/ucs-test/97_bildungslogin_umc/02_unittest_python_api.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | import pytest
from univention.management.console.modules.licenses import Instance
@pytest.mark.parametrize("pickup_number,school,expected_pickup_number", [
("123-123-123-123", "demo", "123-123-123-123"),
(" 123-123-123-123", "demo", "123-123-123-123"),
("123-123-123-123 ", "demo", "123-123-123-123"),
])
d... | 43.295455 | 89 | 0.705512 |
a9feccb777c6d09c172823d081463185d4166094 | 1,057 | py | Python | src/visitpy/visit_flow/flow/run_generator.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/visitpy/visit_flow/flow/run_generator.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/visitpy/visit_flow/flow/run_generator.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # Copyright (c) Lawrence Livermore National Security, LLC and other VisIt
# Project developers. See the top-level LICENSE file for dates and other
# details. No copyright assignment is required to contribute to VisIt.
import sys
import os
import subprocess
from os.path import join as pjoin
def sexe(cmd):
prin... | 27.102564 | 73 | 0.634816 |
e73513b48905d3fc334e60fbd101dfe0eb1c3beb | 362 | py | Python | codeit/algorithm/fib_tab.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | codeit/algorithm/fib_tab.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | codeit/algorithm/fib_tab.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """피보나치 수열 Tabulation"""
def fib_tab(n):
table = [0, 1, 1]
for i in range(3, n + 1):
table.append(table[i - 2] + table[i - 1])
return table[n]
if __name__ == '__main__':
assert fib_tab(10) == 55, 'fib(10) error'
assert fib_tab(50) == 12586269025, 'fib(50) error'
assert fib_tab(100) =... | 24.133333 | 66 | 0.593923 |
41b940e2eccdd380da9af33ff76ff4f900d36188 | 1,387 | py | Python | SBTK_League_Helper/src/security/obfuscation.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | SBTK_League_Helper/src/security/obfuscation.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | SBTK_League_Helper/src/security/obfuscation.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | from copy import copy
from math import log, ceil
from .exceptions import PasswordLengthError, PasswordCharacterError
minumum_accepted_lenght = 10
def transform(dict, pwd):
k, b = password2int(pwd)
dict = copy (dict)
for key in dict:
str = dict[key]
l = len(str)
mod = 16**l... | 22.370968 | 127 | 0.527758 |
d4197c11b8a510ec1096512095573448b0a1a847 | 1,856 | py | Python | research/cv/stgcn/infer/sdk/stgcn_metric.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/stgcn/infer/sdk/stgcn_metric.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/stgcn/infer/sdk/stgcn_metric.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 35.018868 | 109 | 0.621767 |
5cefaee2ea53cd9344787e386b4dcf4e92694047 | 6,384 | py | Python | skripte/python/edit_tools/hyphenate_neueintraege.py | hyphenation/languages-german | 4330a0b1254e88615cb4c83e4b3dc2f0810c76d9 | [
"MIT"
] | null | null | null | skripte/python/edit_tools/hyphenate_neueintraege.py | hyphenation/languages-german | 4330a0b1254e88615cb4c83e4b3dc2f0810c76d9 | [
"MIT"
] | null | null | null | skripte/python/edit_tools/hyphenate_neueintraege.py | hyphenation/languages-german | 4330a0b1254e88615cb4c83e4b3dc2f0810c76d9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf8 -*-
# :Copyright: © 2014 Günter Milde.
# Released without warranty under the terms of the
# GNU General Public License (v. 2 or later)
# :Id: $Id: $
# hyphenate_neueintraege.py: kategorisierte Trennung mit patgen-patterns.
# ============================... | 33.25 | 80 | 0.632049 |
2b0cd7ecf6e3c80c097c832ebcf01ca0046a414c | 472 | py | Python | sam_app/sam_app/view_layer/view_hello_world.py | csjy309450/SAM-Backend | a23569ea372f718ca4a167e21e8046336db00561 | [
"MIT"
] | null | null | null | sam_app/sam_app/view_layer/view_hello_world.py | csjy309450/SAM-Backend | a23569ea372f718ca4a167e21e8046336db00561 | [
"MIT"
] | null | null | null | sam_app/sam_app/view_layer/view_hello_world.py | csjy309450/SAM-Backend | a23569ea372f718ca4a167e21e8046336db00561 | [
"MIT"
] | null | null | null | from pyramid.response import Response
from pyramid.view import view_config
from sam_core.view_base import ViewBase
from sam_core.res_obj import ResBase
class ResHello(ResBase):
def __init__(self, errorCode):
super(ResHello, self).__init__(errorCode)
self.hello = 'Hello World'
class ViewHelloWorl... | 26.222222 | 53 | 0.735169 |
2b68da1e074dfcc1bd22fbf4d427fd6476278354 | 642 | py | Python | Packs/CommonScripts/Scripts/StopTimeToAssignOnOwnerChange/StopTimeToAssignOnOwnerChange.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/StopTimeToAssignOnOwnerChange/StopTimeToAssignOnOwnerChange.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/StopTimeToAssignOnOwnerChange/StopTimeToAssignOnOwnerChange.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
# ##### Help #####
# This is an example script. The script is used to stop the Time to Assignment SLA field,
# once an owner was set to an incident. If you want to use this script, you should go to
# the Owner field, and set this script as the script to run upon change of field value.
if ... | 58.363636 | 106 | 0.705607 |
996a3f67aee27aea85e857b6925fa985ebfe2137 | 426 | py | Python | python_gui_tkinter/KALU/GARBAGE1/2.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python_gui_tkinter/KALU/GARBAGE1/2.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python_gui_tkinter/KALU/GARBAGE1/2.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | from tkinter import *
master = Tk()
var = []
row_no = 0
for i in range(25):
var.append(IntVar())
for i in range(25):
Checkbutton(master, text="male", variable=var[i]).grid(row=row_no, sticky=W)
row_no = row_no + 1
def show():
#row_no = 0
i=0
for i in range(25):
print(var[i].get())
#row_no = row_no + 1
Butt... | 22.421053 | 97 | 0.657277 |
514d4bca9955b922bf5ec38c1d81088f42ebfe6b | 3,932 | py | Python | scripts/figures/figure7/host_run_figure.py | CcTtry/PipeSwitch | c6d632ee20b6dbbaea9a6fb95b9ea0ed4bbbf67e | [
"Apache-2.0"
] | null | null | null | scripts/figures/figure7/host_run_figure.py | CcTtry/PipeSwitch | c6d632ee20b6dbbaea9a6fb95b9ea0ed4bbbf67e | [
"Apache-2.0"
] | null | null | null | scripts/figures/figure7/host_run_figure.py | CcTtry/PipeSwitch | c6d632ee20b6dbbaea9a6fb95b9ea0ed4bbbf67e | [
"Apache-2.0"
] | null | null | null | import os
import subprocess
import matplotlib.pyplot as plt
import numpy as np
OUTPUT_FLAG = 'OpenSourceOutputFlag'
systems = [
'pipeswitch',
'per_layer',
'grouped',
'per_layer_no_pipeline'
]
models = [
'resnet152',
'inception_v3',
'bert_base',
]
def collect_data():... | 29.343284 | 138 | 0.546033 |
51a9ebf02d952ccde0b39a512e937d6cd86c6e60 | 702 | py | Python | python_first_step/class/specialMethode.py | cartellefo/projet | 23c67e847b415fb47f71e830b89a227fffed109b | [
"MIT"
] | null | null | null | python_first_step/class/specialMethode.py | cartellefo/projet | 23c67e847b415fb47f71e830b89a227fffed109b | [
"MIT"
] | null | null | null | python_first_step/class/specialMethode.py | cartellefo/projet | 23c67e847b415fb47f71e830b89a227fffed109b | [
"MIT"
] | null | null | null |
class whitesheet:
def __init__(self):
self.surface = ""
def write(self, message_a_ecrire):
if self.surface != "":
self.surface += "\n"
self.surface += message_a_ecrire
def read(self):
print(self.surface)
def cancel(self):
self.surface = ""
#if _... | 15.26087 | 45 | 0.589744 |
51eebe98894a5272e5c44eaface66c640bfe1d7e | 489 | py | Python | tests/server/handlers/test_base.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 156 | 2021-11-19T18:50:14.000Z | 2022-03-31T19:48:59.000Z | tests/server/handlers/test_base.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 30 | 2021-12-27T19:30:56.000Z | 2022-03-30T17:49:00.000Z | tests/server/handlers/test_base.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 14 | 2022-01-17T23:24:34.000Z | 2022-03-29T09:27:47.000Z | import pytest
import server.handlers.base as base
def test_list_resource_get():
pass
def test_list_resource_post():
pass
def test_list_resource__create():
pass
def test_list_resource__all():
pass
def test_crud_resource__retrieve_by_id():
pass
def test_crud_resource_get():
pass
def test... | 12.538462 | 41 | 0.738241 |
51f06efe73e646ebd64fb4c482adc83d12fe406a | 5,476 | py | Python | test/test_npu/test_embedding_renorm.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_embedding_renorm.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_embedding_renorm.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 46.803419 | 103 | 0.700511 |
56a9b4a69444a4c0aa389d50fed8344341bd87f5 | 4,212 | py | Python | ryu/app/otherApp/TOPSIS.py | yuesir137/SDN-CLB | 58b12a9412cffdf2945440528b1885c8899edd08 | [
"Apache-2.0"
] | null | null | null | ryu/app/otherApp/TOPSIS.py | yuesir137/SDN-CLB | 58b12a9412cffdf2945440528b1885c8899edd08 | [
"Apache-2.0"
] | null | null | null | ryu/app/otherApp/TOPSIS.py | yuesir137/SDN-CLB | 58b12a9412cffdf2945440528b1885c8899edd08 | [
"Apache-2.0"
] | null | null | null | """
author:Yuegb
date:2021,06,06
"""
import sys
import time
import pandas as pd
import numpy as np
import os
np.set_printoptions(suppress=True)
HOP = {'1': {'1': 1, '2': 2, '3': 3, '4': 4}, '2': {'1': 1, '2': 2, '3': 3, '4': 4},
'3': {'1': 1, '2': 2, '3': 3, '4': 4}, '4': {'1': 1, '2': 2, '3': 3, '4': 4},
... | 31.432836 | 123 | 0.509022 |
85a5d99c63955825d3b16b251408902ea466a5c7 | 528 | py | Python | pacman-arch/test/pacman/tests/dummy001.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/dummy001.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/dummy001.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Dummy test case (modify for own use)"
p1 = pmpkg("dummy")
p1.files = ["etc/dummy.conf*",
"lib/libdummy.so.0",
"lib/libdummy.so -> ./libdummy.so.0",
"usr/",
"bin/dummy"]
p1.backup = ["etc/dummy.conf*"]
p1.install['post_install'] = "echo toto";
p1.url="... | 24 | 57 | 0.579545 |
f1115ad13f3bf3b58b8000a64365c5e8af8f38b9 | 2,130 | py | Python | apps/mainloop_and_utils/dropbox_synchronizer.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 2 | 2017-11-30T21:12:11.000Z | 2017-12-01T07:52:43.000Z | apps/mainloop_and_utils/dropbox_synchronizer.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 14 | 2017-11-14T18:12:53.000Z | 2018-06-03T16:07:57.000Z | apps/mainloop_and_utils/dropbox_synchronizer.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 3 | 2018-02-05T10:40:03.000Z | 2018-02-09T09:29:19.000Z | import dropbox
import os
def download_files():
folders = input("Files and/or folders do download (seperate by ';'): ")
dbx = start_session()
for foldername in folders.split(';'):
if '.' not in foldername:
recursive = ""
while recursive != "Y" and recursive != "N":
... | 38.035714 | 82 | 0.615962 |
74fb4d48a8b74898d7c6e5be5cb0332046f22c7f | 2,830 | py | Python | untis_sds_converter.py | Nico0302/SMG-UntisOfficeConverters | b43fd6b2baa58d42f9343c3a40963b7eec689ed5 | [
"MIT"
] | null | null | null | untis_sds_converter.py | Nico0302/SMG-UntisOfficeConverters | b43fd6b2baa58d42f9343c3a40963b7eec689ed5 | [
"MIT"
] | null | null | null | untis_sds_converter.py | Nico0302/SMG-UntisOfficeConverters | b43fd6b2baa58d42f9343c3a40963b7eec689ed5 | [
"MIT"
] | null | null | null | """ Generieren von School-Data-Sync CSV-Tabellen. """
import untis, sds, os, errno
SCHOOLNAME = 'Sebastian-Münster-Gymnasium'
LESSON_FILENAME = './untis/GPU002.TXT'
STUDENT_FILENAME = './untis/GPU010.TXT'
ENROLLMENT_FILENAME = './untis/GPU015.TXT'
TEACHER_FILENAME = './untis/GPU004.TXT'
DIF_DELIMITER = ','
DIF_ENCODI... | 38.767123 | 110 | 0.763251 |
741591c3e9448f92222ebf38818be8cc9d1abe86 | 325 | py | Python | PYTHON/Regex_and_Parsing/detect_html_tags_and_attr_values.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Regex_and_Parsing/detect_html_tags_and_attr_values.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Regex_and_Parsing/detect_html_tags_and_attr_values.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from html.parser import HTMLParser
class MyHTMLParser(HTMLParser):
def handle_starttag(self, tag, attrs):
print(tag)
for ele in attrs:
print('->', ele[0], '>', ele[1])
MyParser = MyHTMLParser()
MyParser.feed(''.join([input().strip() for _ in range(int(input())... | 21.666667 | 70 | 0.621538 |
7762c2f1ca9ea7f4315cfcc68d06bbda66833d74 | 562 | py | Python | solution/implementation/1212/main.py | gkgg123/baekjoon | 4ff8a1238a5809e4958258b5f2eeab7b22105ce9 | [
"MIT"
] | 2,236 | 2019-08-05T00:36:59.000Z | 2022-03-31T16:03:53.000Z | solution/implementation/1212/main.py | juy4556/baekjoon | bc0b0a0ebaa45a5bbd32751f84c458a9cfdd9f92 | [
"MIT"
] | 225 | 2020-12-17T10:20:45.000Z | 2022-01-05T17:44:16.000Z | solution/implementation/1212/main.py | juy4556/baekjoon | bc0b0a0ebaa45a5bbd32751f84c458a9cfdd9f92 | [
"MIT"
] | 602 | 2019-08-05T00:46:25.000Z | 2022-03-31T13:38:23.000Z | # Authored by : tony9402
# Co-authored by : -
# Link : http://boj.kr/7d0d2bcb568d4c3d86770e520838ef65
import sys
def input():
return sys.stdin.readline().rstrip()
def change(num, first = False):
ret = ''
while num:
ret += chr(num % 2 + 48)
num //= 2
while len(ret) < 3:
ret += '... | 20.071429 | 55 | 0.539146 |
77b017f00eb92a836659132a3ca76f652bf5d427 | 10,994 | py | Python | code/02_study_population/CCU013_12_paper_cohort_dp_skinny_patient_23_01_2020.py | BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping | 83afef23f96c7b31fef64c6f735737d1afa3082d | [
"Apache-2.0"
] | null | null | null | code/02_study_population/CCU013_12_paper_cohort_dp_skinny_patient_23_01_2020.py | BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping | 83afef23f96c7b31fef64c6f735737d1afa3082d | [
"Apache-2.0"
] | null | null | null | code/02_study_population/CCU013_12_paper_cohort_dp_skinny_patient_23_01_2020.py | BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping | 83afef23f96c7b31fef64c6f735737d1afa3082d | [
"Apache-2.0"
] | null | null | null | # Databricks notebook source
# MAGIC %md # 3_dp_skinny_patient_01_01_2020: make a single version of the truth for each patient
# COMMAND ----------
# MAGIC %md
# MAGIC **Description** Populates the table `dars_nic_391419_j3w9t_collab.ccu013_dp_skinny_patient_23_01_2020` with the following for **each patient alive** o... | 45.057377 | 251 | 0.718756 |
7affd58476eec97983232d75724dc705580e96cb | 3,776 | py | Python | torch/ao/quantization/fx/backend_config/utils.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 4 | 2020-02-03T23:48:24.000Z | 2022-01-06T14:39:06.000Z | torch/ao/quantization/fx/backend_config/utils.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 14 | 2021-10-14T06:58:50.000Z | 2021-12-17T11:51:07.000Z | torch/ao/quantization/fx/backend_config/utils.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 2 | 2019-07-23T14:37:31.000Z | 2019-07-23T14:47:13.000Z | import torch
import torch.nn as nn
from .quantize_handler import get_quantize_handler_cls
from .fuse_handler import get_fuse_handler_cls
from typing import Dict, Any, List, Callable, Union
from ..quantization_types import Pattern, QuantizerCls
def get_pattern_to_quantize_handlers(
backend_config_dict: Dict[str... | 44.952381 | 94 | 0.714778 |
248b2e11faa5fb82d3399fd12b82d99a91f1aa57 | 6,387 | py | Python | verto/tests/RemoveTitleTest.py | uccser/verto | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 4 | 2017-04-10T06:09:54.000Z | 2019-05-04T02:07:40.000Z | verto/tests/RemoveTitleTest.py | uccser/verto | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 268 | 2017-04-03T20:40:46.000Z | 2022-02-04T20:10:08.000Z | verto/tests/RemoveTitleTest.py | uccser/kordac | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 1 | 2019-01-07T15:46:31.000Z | 2019-01-07T15:46:31.000Z | import markdown
from unittest.mock import Mock
from verto.VertoExtension import VertoExtension
from verto.processors.RemoveTitlePreprocessor import RemoveTitlePreprocessor
from verto.tests.ProcessorTest import ProcessorTest
class RemoveTitleTest(ProcessorTest):
'''Tests to check the 'remove-title' preprocesser wo... | 46.620438 | 131 | 0.729294 |
7001e1543591669442ffbc0ea5ca2ff618ba5c88 | 410 | py | Python | play/wuerfeln.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | play/wuerfeln.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | play/wuerfeln.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | import random
def muenzwurf():
return random.randint(0,1)
def wuerfeln3():
binaer = 1
for i in range(3):
binaer += 2 ** i * muenzwurf()
if binaer > 6:
return wuerfeln3()
return binaer
def fair(testfkt):
d = {}
for i in range(10000):
w = str(testfkt())
if w in d:
d[w] += 1
else... | 15.185185 | 34 | 0.570732 |
7018e5bdfdf68b3efabcfa7f2917106884abeed2 | 322 | py | Python | src/python/py-accepted/263A.py | cbarnson/UVa | 0dd73fae656613e28b5aaf5880c5dad529316270 | [
"Unlicense",
"MIT"
] | 2 | 2019-09-07T17:00:26.000Z | 2020-08-05T02:08:35.000Z | src/python/py-accepted/263A.py | cbarnson/UVa | 0dd73fae656613e28b5aaf5880c5dad529316270 | [
"Unlicense",
"MIT"
] | null | null | null | src/python/py-accepted/263A.py | cbarnson/UVa | 0dd73fae656613e28b5aaf5880c5dad529316270 | [
"Unlicense",
"MIT"
] | null | null | null | #! python
# Problem # : 263A
# Created on : 2019-01-14 22:13:53
def Main():
arr = [input().split(' ') for l in range(0, 5)]
for i in range(len(arr)):
for j in range(len(arr[i])):
if arr[i][j] == str(1):
print(abs(2-i) + abs(2-j))
if __name__ == '__main__':
Main(... | 18.941176 | 51 | 0.484472 |
562b10cd20896328863d8842509e2397c05146fe | 1,223 | py | Python | ebenezer/atencion/migrations/0017_auto_20181012_0441.py | davrv93/ebenezer-backend | d3db4dafd9a8c35bea9f32afe2be1dd451f64298 | [
"Apache-2.0"
] | null | null | null | ebenezer/atencion/migrations/0017_auto_20181012_0441.py | davrv93/ebenezer-backend | d3db4dafd9a8c35bea9f32afe2be1dd451f64298 | [
"Apache-2.0"
] | 3 | 2020-02-11T23:15:00.000Z | 2021-06-10T20:52:17.000Z | ebenezer/atencion/migrations/0017_auto_20181012_0441.py | davrv93/ebenezer-backend | d3db4dafd9a8c35bea9f32afe2be1dd451f64298 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.1.2 on 2018-10-12 04:41
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
dependencies = [
('atencion', '0016_auto_20181012_0436'),
]
operations = [
migrations.CreateModel(
name='RelatedFactor',
fi... | 34.942857 | 157 | 0.584628 |
3b201f1fed1317e840e8694fd6a9bb2c18c51e44 | 527 | py | Python | cpp_project/basic-skills/zmq-demo/hello_world_client.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | 1 | 2018-12-30T14:07:42.000Z | 2018-12-30T14:07:42.000Z | cpp_project/basic-skills/zmq-demo/hello_world_client.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | null | null | null | cpp_project/basic-skills/zmq-demo/hello_world_client.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | null | null | null | import zmq
context = zmq.Context()
print "Connecting to hello world server..."
#socket = context.socket(zmq.REQ)
#socket = context.socket(zmq.DEALER)
socket = context.socket(zmq.SUB)
socket.connect ("tcp://localhost:5555")
socket.setsockopt(zmq.SUBSCRIBE, "World")
while True:
message = socket.recv()
print "Receiv... | 27.736842 | 53 | 0.685009 |
3b6efa4ecef40baa45eef1793689aa259759c395 | 5,063 | py | Python | model/model.py | mWollenhaupt/Mask_R-CNN_3D-Buildings | 220f20b41a7290a01c0bb47672453e646254f8fc | [
"MIT"
] | 2 | 2021-05-20T22:49:28.000Z | 2021-06-16T06:35:07.000Z | model/model.py | mWollenhaupt/Mask_R-CNN_3D-Buildings | 220f20b41a7290a01c0bb47672453e646254f8fc | [
"MIT"
] | null | null | null | model/model.py | mWollenhaupt/Mask_R-CNN_3D-Buildings | 220f20b41a7290a01c0bb47672453e646254f8fc | [
"MIT"
] | null | null | null | from matterport.config import Config
from matterport import utils
from preprocessing import conversion
import matterport.model as modellib
from preprocessing import normalization
import os
import numpy as np
from utils import resources
from utils.logger import ProgressLogger
class Model:
def __init__(self, mode)... | 38.648855 | 117 | 0.628876 |
8ee056b38af731bf402ddbcd8a96d5303d0c5e12 | 18,222 | py | Python | wz/template_engine/simpleodt.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/template_engine/simpleodt.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/template_engine/simpleodt.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
simpleodt.py - last updated 2021-04-11
1) OdtReader
=============
Read the text content of odt files ignoring all formatting/style information.
2) OdtFields
===============
(a) Fetch the names of the "fields" from a LibreOfffice Writer file.
(b) Fill the "fields" in... | 35.729412 | 129 | 0.575348 |
d9959ee9321199732fa025bcfd09c43a096423a3 | 472 | py | Python | source/pkgsrc/devel/py-curses/files/setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/devel/py-curses/files/setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/devel/py-curses/files/setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | # $NetBSD: setup.py,v 1.1 2002/01/28 09:32:55 drochner Exp $
import distutils
from distutils.core import setup, Extension
ncursesprefix = '@NCURSESPREFIX@'
ncincl = ncursesprefix + '/include'
nclib = ncursesprefix + '/lib'
setup(
ext_modules = [
Extension(
'_curses',
['Modules/_cursesmodule.c'],
define_m... | 20.521739 | 60 | 0.690678 |
234795a6ae3ba9c593333baef6aeeb6f12075677 | 703 | py | Python | RDS/circle3_central_services/research_manager/src/api/User/Research/Researchname.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 10 | 2020-06-24T08:22:24.000Z | 2022-01-13T16:17:36.000Z | RDS/circle3_central_services/research_manager/src/api/User/Research/Researchname.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 78 | 2020-01-23T14:32:06.000Z | 2022-03-07T14:11:16.000Z | RDS/circle3_central_services/research_manager/src/api/User/Research/Researchname.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 1 | 2020-06-24T08:33:48.000Z | 2020-06-24T08:33:48.000Z | import Singleton
from flask import jsonify, request, abort
def index(user_id, research_id):
return jsonify({"researchname": Singleton.ProjectService.getProject(
user_id, int(research_id)).researchname}
)
def put(user_id, research_id):
try:
req = request.json
except:
return ab... | 25.107143 | 76 | 0.694168 |
cc492c3ae3b57c06f980a4031516486dbc4e092b | 118 | py | Python | Licence 2/I33/TP 1/ex_1.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 8 | 2020-11-26T20:45:12.000Z | 2021-11-29T15:46:22.000Z | Licence 2/I33/TP 1/ex_1.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | null | null | null | Licence 2/I33/TP 1/ex_1.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 6 | 2020-10-23T15:29:24.000Z | 2021-05-05T19:10:45.000Z | def somme_pair(L):
somme = 0
for i in L:
if i % 2 == 0: somme += i
return somme
print(somme_pair([3,2,5,7,4,1])) | 16.857143 | 32 | 0.59322 |
9dbfd6c5609d0b81daeb8c4f0b06aa9f2fecba95 | 2,423 | py | Python | scripts/component_graph/server/net/static_handler.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | 3 | 2020-08-02T04:46:18.000Z | 2020-08-07T10:10:53.000Z | scripts/component_graph/server/net/static_handler.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | scripts/component_graph/server/net/static_handler.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | 1 | 2020-08-07T10:11:49.000Z | 2020-08-07T10:11:49.000Z | #!/usr/bin/env python3
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Static handler servers static pages from the disk.
The Static handler is a trivial static file retriever for an allow list of
stati... | 33.652778 | 91 | 0.601321 |
ae6f5a593f77fb037a2266f2643b7bdbb58f6e56 | 7,839 | py | Python | library/core/actions.py | ptphp/PtServer | d590360f853a64e989ba52591548b8a67390f27c | [
"BSD-3-Clause"
] | 1 | 2017-08-09T23:15:15.000Z | 2017-08-09T23:15:15.000Z | library/core/actions.py | ptphp/PtServer | d590360f853a64e989ba52591548b8a67390f27c | [
"BSD-3-Clause"
] | null | null | null | library/core/actions.py | ptphp/PtServer | d590360f853a64e989ba52591548b8a67390f27c | [
"BSD-3-Clause"
] | null | null | null | import os,webbrowser
from PySide.QtCore import *
from PySide.QtGui import *
from .utils import loadUi,debug
bin_path = "usr/bin"
class BaseAction(QObject):
def set_actions(self):
self.actionHosts.triggered.connect(self._on_act_hosts_triggered)
self.actionPutty.triggered.connect(self._on_act_putty_t... | 40.61658 | 127 | 0.688353 |
ee3817fad21380096d88f9db8d7c01c2eb117aaa | 1,740 | py | Python | Licence 1/I11/TP7/geometrie_3d.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 8 | 2020-11-26T20:45:12.000Z | 2021-11-29T15:46:22.000Z | Licence 1/I11/TP7/geometrie_3d.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | null | null | null | Licence 1/I11/TP7/geometrie_3d.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 6 | 2020-10-23T15:29:24.000Z | 2021-05-05T19:10:45.000Z | """
Module geometrie_2d
créé par Axel Coezard
le 10 / 12 / 19
"""
from math import *
from vecteur import *
from pocketgl import *
from geometrie_2d import *
def mat_rotation_3dx(theta):
col1 = (1, 0, 0)
col2 = (0, cos(theta), sin(theta))
col3 = (0, -sin(theta), cos(theta))
return [col1, co... | 23.835616 | 54 | 0.625287 |
c9d5ed1935190197a87ec8190ca3b2b634482ce5 | 273 | py | Python | Packs/D2/Scripts/D2Remove/D2Remove.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/D2/Scripts/D2Remove/D2Remove.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/D2/Scripts/D2Remove/D2Remove.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 *
result = demisto.executeCommand('d2_remove', demisto.args())
if isError(result[0]):
demisto.results(result)
else:
demisto.results('D2 agent removed successfully')
| 24.818182 | 60 | 0.78022 |
0911f4a58b3865e6671d54dc889771d883c5fff5 | 421 | py | Python | book/_build/jupyter_execute/docs/000_intro.py | tom-tubeless/wwg-digitales-miteinander | d9391046a7ed12b91b538b937993161c67d77d68 | [
"CC0-1.0"
] | null | null | null | book/_build/jupyter_execute/docs/000_intro.py | tom-tubeless/wwg-digitales-miteinander | d9391046a7ed12b91b538b937993161c67d77d68 | [
"CC0-1.0"
] | null | null | null | book/_build/jupyter_execute/docs/000_intro.py | tom-tubeless/wwg-digitales-miteinander | d9391046a7ed12b91b538b937993161c67d77d68 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # Konzept für digitales Miteinander
#
# Dieses Konzept beinhaltet mehr als ein übliches Medienkonzept.
# Es ist vielmehr ein [Whitepaper](https://en.wikipedia.org/wiki/White_paper), dass eine Übersicht über die Intentionen, Leistungen, Standards und technischen Stand des [Städt... | 35.083333 | 230 | 0.745843 |
0167bb9658467957395eb686065cce5ed299ab04 | 671 | py | Python | source/pkgsrc/devel/pythontidy/patches/patch-pythontidy.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/devel/pythontidy/patches/patch-pythontidy.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/devel/pythontidy/patches/patch-pythontidy.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-pythontidy.py,v 1.1 2011/08/31 11:43:17 apb Exp $
Replace hardcoded references to /usr/bin/python
with references to the pkgsrc python interpreter.
This patch changes /usr/bin/python to %PYTHONBIN%,
and the SUBST_STAGES.pythonbin rules in the Makefile
changes %PYTHONBIN% to the value of ${PYTHONBIN}.
-... | 33.55 | 64 | 0.688525 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.