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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2390ef5df0cb34d9eafc2c0bf8825a6d6eec0f6d | 830 | py | Python | Curso-Em-Video-Python/2Exercicios/090_Dicionarios_em_python.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/090_Dicionarios_em_python.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/090_Dicionarios_em_python.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | '''aluno = {}
aluno['nome'] = str(input('Qual o Seu nome: '))
aluno['media'] = float(input('Qual a sua media: '))
print(f'Nome igual a {aluno["nome"]}\nMedia igual a {aluno["media"]:.2f}')
if aluno['media'] >= 7:
aluno['situação'] = 'Aprovado'
elif aluno['media'] >= 5:
aluno['situação'] = 'Recuperação'
else:
... | 31.923077 | 74 | 0.606024 |
23e2c98d818201e03b84322e38f16c54dbdaadcd | 77 | py | Python | frds/mktstructure/measures/__init__.py | mgao6767/wrds | 7dca2651a181bf38c61ebde675c9f64d6c96f608 | [
"MIT"
] | 1 | 2022-03-06T20:36:06.000Z | 2022-03-06T20:36:06.000Z | mktstructure/measures/__init__.py | mgao6767/mktstructure | 5432c1bed163f838209d34b74c09629bea620ba8 | [
"MIT"
] | null | null | null | mktstructure/measures/__init__.py | mgao6767/mktstructure | 5432c1bed163f838209d34b74c09629bea620ba8 | [
"MIT"
] | null | null | null | from . import bidask_spread, effective_spread, realized_spread, price_impact
| 38.5 | 76 | 0.857143 |
7b04f7dbaed61083ff6d54bcf3da06ec8ee761a0 | 2,447 | py | Python | frappe-bench/apps/erpnext/erpnext/hr/doctype/attendance/attendance.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/hr/doctype/attendance/attendance.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/hr/doctype/attendance/attendance.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import getdate, nowdate
from frappe import _
from frappe.model.document import Document
from erpnext.hr.utils import se... | 42.929825 | 112 | 0.745811 |
f52bef980643a3f12870982db03c8cfc7c4dd735 | 17,122 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/personGenerator.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/personGenerator.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/personGenerator.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) 2019-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... | 36.980562 | 120 | 0.627789 |
27521c110b4f51cd7da65eb97e90105650721162 | 2,162 | py | Python | Labyrint/Agent.py | flikkes/intelligente_agenten | 340ca9b9d98b4525b330292f16444e106dec9d66 | [
"MIT"
] | null | null | null | Labyrint/Agent.py | flikkes/intelligente_agenten | 340ca9b9d98b4525b330292f16444e106dec9d66 | [
"MIT"
] | null | null | null | Labyrint/Agent.py | flikkes/intelligente_agenten | 340ca9b9d98b4525b330292f16444e106dec9d66 | [
"MIT"
] | null | null | null | import sys
import os
import Labyrinth
import time
import threading
class Agent:
num = 0
x = 0
y = 0
labyrinth = None
callback = None
def __init__(self, x, y, labyrinth, callback):
self.num = time.time()*1000
self.x = x
self.y = y
self.labyrinth = labyrinth
... | 36.644068 | 96 | 0.548104 |
7be2f875af66c9790f73435416bff026e32c3f3c | 303 | py | Python | apps/node/urls.py | dongdawang/ssrmgmt | a41e595aec503dcb191a20ea8d58233bbb8f2db0 | [
"MIT"
] | null | null | null | apps/node/urls.py | dongdawang/ssrmgmt | a41e595aec503dcb191a20ea8d58233bbb8f2db0 | [
"MIT"
] | null | null | null | apps/node/urls.py | dongdawang/ssrmgmt | a41e595aec503dcb191a20ea8d58233bbb8f2db0 | [
"MIT"
] | null | null | null | from django.urls import path
from .views import NodeShow, NodeDetail, SelectNode
urlpatterns = [
path('node/', NodeShow.as_view(), name='node-show'),
path('node/detail/<int:n_id>', NodeDetail.as_view(), name='node-detail'),
path('node/select/', SelectNode.as_view(), name='node-select')
]
| 30.3 | 77 | 0.693069 |
d0a9991f582f877227f11e1d50797f5538502385 | 475 | py | Python | python_gui_tkinter/KALU/GARBAGE1/label_ckbtn.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python_gui_tkinter/KALU/GARBAGE1/label_ckbtn.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python_gui_tkinter/KALU/GARBAGE1/label_ckbtn.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | from tkinter import StringVar, Tk, Label, Checkbutton, IntVar
def update_label():
if var.get() == 1:
label_text.set("On")
else:
label_text.set("Off")
window = Tk()
label_text = StringVar()
label = Label(window, textvariable=label_text)
label_text.set("Off")
var = IntVar()
check= Checkbutton(... | 20.652174 | 63 | 0.661053 |
4bd1b6d6ad291b158a9e69e43080bfd9c590138f | 1,783 | py | Python | Packs/SecurityAdvisor/Integrations/SecurityAdvisor/SecurityAdvisor_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/SecurityAdvisor/Integrations/SecurityAdvisor/SecurityAdvisor_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/SecurityAdvisor/Integrations/SecurityAdvisor/SecurityAdvisor_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import SecurityAdvisor
URL_SUFFIX = 'apis/coachuser/'
BASE_URL = 'https://www.securityadvisor.io/'
CONTEXT_JSON = {
"SecurityAdvisor.CoachUser": {
"coaching_date": "2019-10-04T21:04:19.480425",
"coaching_status": "Pending",
"coaching_score": "",
"user": "track@securityadvisor.io",
... | 28.301587 | 71 | 0.646663 |
3262c629c9db9996ec60c94816cfd5f054067129 | 327 | py | Python | Python/Buch_ATBS/Teil_1/Kapitel_06_Stringbearbeitung/05_formatierte_ausgabe.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_ATBS/Teil_1/Kapitel_06_Stringbearbeitung/05_formatierte_ausgabe.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_ATBS/Teil_1/Kapitel_06_Stringbearbeitung/05_formatierte_ausgabe.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # Formatierte Stringausgabe
dic={'Käse' : 5, 'Brot' : 3, 'Wein' : 2,
'Eier' : 6, 'Nuss' : 12, 'Tee' : 14,
'Müsli' : 1}
print(('Inventar'.center(16, '#')).center(60))
for namen, anzahl in dic.items():
print((namen.ljust(13, '.') + str(anzahl).rjust(3, '.')).center(60))
print(('#'.center(16, '#')).cente... | 25.153846 | 72 | 0.544343 |
08c64f18d800b619fe88c261ff1b7058fbf4c831 | 559 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v10_0/update_project_in_sle.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | frappe-bench/apps/erpnext/erpnext/patches/v10_0/update_project_in_sle.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v10_0/update_project_in_sle.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2017, Frappe and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
for doctype in ['Sales Invoice', 'Delivery Note', 'Stock Entry']:
frappe.db.sql(""" update
`tabStock Ledger Entry` sle, `tab{0}` parent_do... | 34.9375 | 96 | 0.726297 |
deb1abcba5f4582ee96b47f47260cbe71cb776c6 | 612 | py | Python | exercises/pt/exc_01_11.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/exc_01_11.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/exc_01_11.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | import spacy
# Importe o comparador - Matcher
from spacy.____ import ____
nlp = spacy.load("pt_core_news_sm")
doc = nlp("Vazou a data de lançamento do novo iPhone X após a Apple revelar a existência de compras antecipadas.")
# Inicialize o comparador com o vocabulário compartilhado
matcher = ____(____.____)
# Crie... | 29.142857 | 114 | 0.761438 |
dfec20ca9c917a1ee5872d3c585895d029e2542b | 5,674 | py | Python | src/onegov/wtfs/layouts/municipality.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/wtfs/layouts/municipality.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/wtfs/layouts/municipality.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from cached_property import cached_property
from onegov.core.elements import Confirm
from onegov.core.elements import Intercooler
from onegov.core.elements import Link
from onegov.wtfs import _
from onegov.wtfs.layouts.default import DefaultLayout
from onegov.wtfs.security import AddModel
from onegov.wtfs.security impo... | 28.089109 | 70 | 0.529609 |
13fcd9b4a315b5625ee69751466c191671fb353d | 605 | py | Python | rev/VerytriVialreVersing/solve.py | NoXLaw/RaRCTF2021-Challenges-Public | 1a1b094359b88f8ebbc83a6b26d27ffb2602458f | [
"MIT"
] | null | null | null | rev/VerytriVialreVersing/solve.py | NoXLaw/RaRCTF2021-Challenges-Public | 1a1b094359b88f8ebbc83a6b26d27ffb2602458f | [
"MIT"
] | null | null | null | rev/VerytriVialreVersing/solve.py | NoXLaw/RaRCTF2021-Challenges-Public | 1a1b094359b88f8ebbc83a6b26d27ffb2602458f | [
"MIT"
] | null | null | null | from z3 import *
s = Solver()
target = [0x98, 0x69, 0x98, 0x67, 0x9e, 0x64, 0x9f, 0x77, 0xad, 0x65, 0x76, 0x76, 0xb2, 0x69, 0x9e, 0x73, 0xa9, 0x57, 0xb4, 0x23, 0x9e, 0x77, 0xb3, 0x92, 0xa9, 0x58, 0xae, 0x2d, 0x59, 0x65, 0xa8, 0x15, 0x59, 0x21, 0xad, 0x66, 0xa5]
flag = [BitVec("flag_%s" % i, 8) for i in range(0, len(ta... | 30.25 | 231 | 0.6 |
26b910af26c7162d598f18a9ec4af981ac091dd6 | 658 | py | Python | setup.py | showhue/adzuki | 23dff5b01905ba3622b4846708c6fd9d2fdd7385 | [
"BSD-3-Clause"
] | null | null | null | setup.py | showhue/adzuki | 23dff5b01905ba3622b4846708c6fd9d2fdd7385 | [
"BSD-3-Clause"
] | 5 | 2019-03-19T22:21:28.000Z | 2020-09-16T03:08:56.000Z | setup.py | showhue/adzuki | 23dff5b01905ba3622b4846708c6fd9d2fdd7385 | [
"BSD-3-Clause"
] | null | null | null | import setuptools
with open('README.md', 'r') as fh:
long_description = fh.read()
setuptools.setup(
name='adzuki',
version='0.2.2',
author='SHOWHUE, Ire Sun, Kunda Lee',
author_email='ire7715+adzuki@hotmail.com',
description='ORM for GCP datastore',
long_description=long_description,
long_description_... | 25.307692 | 48 | 0.679331 |
f8488f2e49fd716621094ed670ee0db63e0a997b | 685 | py | Python | source/pkgsrc/devel/py-typed-ast/patches/patch-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-typed-ast/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/devel/py-typed-ast/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-setup.py,v 1.1 2018/05/22 06:41:30 adam Exp $
Point to a parent directory, to distinguish includes from
the ones currenly installed with Python.
--- setup.py.orig 2017-07-18 21:23:52.000000000 +0000
+++ setup.py
@@ -9,7 +9,7 @@ except ImportError:
_ast27 = Extension(
'_ast27',
- include_dirs... | 26.346154 | 60 | 0.608759 |
6efd5a880b39ccb9718f04c53428f9814c686c35 | 6,643 | py | Python | 2018/quals/crypto-better-zip/src/solver.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | 2018/quals/crypto-better-zip/src/solver.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | 2018/quals/crypto-better-zip/src/solver.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | #!/usr/bin/python
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 25.648649 | 84 | 0.618245 |
9041503c6f60fe4bd6e64ead24995d93616168aa | 8,556 | py | Python | apps/users/models.py | dongdawang/ssrmgmt | a41e595aec503dcb191a20ea8d58233bbb8f2db0 | [
"MIT"
] | null | null | null | apps/users/models.py | dongdawang/ssrmgmt | a41e595aec503dcb191a20ea8d58233bbb8f2db0 | [
"MIT"
] | null | null | null | apps/users/models.py | dongdawang/ssrmgmt | a41e595aec503dcb191a20ea8d58233bbb8f2db0 | [
"MIT"
] | null | null | null | import base64
from datetime import datetime, timedelta
from django.db import models
from django.contrib.auth.models import AbstractUser
from django.utils.translation import gettext_lazy as _
from django.utils import timezone
from django.core.validators import MaxValueValidator, MinValueValidator
import markdown
from ... | 35.65 | 105 | 0.629383 |
5fa2be19b01e97f3d2449e4fb2a57f9cc732b0fe | 2,230 | py | Python | pupil_invisible_monitor/src/pupil_invisible_monitor/ui.py | JuBepy/Gaze_Mouse | 4ddea30b4f53deb744dac3f370e7f48baa3b99c2 | [
"MIT"
] | null | null | null | pupil_invisible_monitor/src/pupil_invisible_monitor/ui.py | JuBepy/Gaze_Mouse | 4ddea30b4f53deb744dac3f370e7f48baa3b99c2 | [
"MIT"
] | null | null | null | pupil_invisible_monitor/src/pupil_invisible_monitor/ui.py | JuBepy/Gaze_Mouse | 4ddea30b4f53deb744dac3f370e7f48baa3b99c2 | [
"MIT"
] | null | null | null | import logging
from pyglui import ui
import glfw.GLFW as glfw
from .models import Host_Controller
logger = logging.getLogger(__name__)
THUMB_SETTINGS = dict(label_font="opensans", label_offset_size=0)
class HostViewController:
def __init__(self, gui_parent, controller: Host_Controller):
... | 32.794118 | 73 | 0.61435 |
398fb01aa80f3c157990a73fd51f91d9cea8a894 | 1,188 | py | Python | bot/utils.py | kopytjuk/uni-unterkunft | c81664e0070f97f45baa6eaff6a71039a267fd37 | [
"MIT"
] | null | null | null | bot/utils.py | kopytjuk/uni-unterkunft | c81664e0070f97f45baa6eaff6a71039a267fd37 | [
"MIT"
] | null | null | null | bot/utils.py | kopytjuk/uni-unterkunft | c81664e0070f97f45baa6eaff6a71039a267fd37 | [
"MIT"
] | null | null | null | from math import radians, cos, sin, asin, sqrt
from functools import wraps
import telegram
from jinja2 import Environment, FileSystemLoader
# load Jinja
file_loader = FileSystemLoader("bot/templates/")
jinja_env = Environment(loader=file_loader)
def send_action(action: telegram.ChatAction):
"""Sends `action` whi... | 31.263158 | 97 | 0.675084 |
4b4a98b1da98c6e973fbf428b88c03223b8988a8 | 1,545 | py | Python | site/public/courses/BEW-1.1/Lessons/03-Intro-to-Flask/demo/compliments.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | 1 | 2021-08-24T20:22:19.000Z | 2021-08-24T20:22:19.000Z | site/public/courses/BEW-1.1/Lessons/03-Intro-to-Flask/demo/compliments.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | site/public/courses/BEW-1.1/Lessons/03-Intro-to-Flask/demo/compliments.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | from flask import Flask, request
from random import choice, sample
app = Flask(__name__)
compliments = [
'awesome', 'terrific', 'fantastic', 'neato', 'fantabulous', 'wowza',
'oh-so-not-meh', 'brilliant', 'ducky', 'coolio', 'incredible',
'wonderful', 'smashing', 'lovely', 'tenacious', 'Pythonic']
... | 30.294118 | 73 | 0.553398 |
d9bc5d770e7449aeae18fbf04df34af1c0a26cbd | 511 | py | Python | SleekSecurity/layers/plugins/fingerprint/os/linux.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | SleekSecurity/layers/plugins/fingerprint/os/linux.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | SleekSecurity/layers/plugins/fingerprint/os/linux.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# @name: Wascan - Web Application Scanner
# @repo: https://github.com/m4ll0k/Wascan
# @author: Momo Outaadi (M4ll0k)
# @license: See the file 'LICENSE.txt
from re import search,I
def linux(headers):
os = ["linux","ubuntu","gentoo","debian","dotdeb","centos","re... | 30.058824 | 84 | 0.639922 |
d9e60018505377d00cb43890dbef1bbdbcdcfca9 | 4,348 | py | Python | oneflow/python/test/ops/test_object_segm_poly_flip.py | caishenghang/oneflow | db239cc9f98e551823bf6ce2d4395bd5c339b1c5 | [
"Apache-2.0"
] | 2 | 2021-09-10T00:19:49.000Z | 2021-11-16T11:27:20.000Z | oneflow/python/test/ops/test_object_segm_poly_flip.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | null | null | null | oneflow/python/test/ops/test_object_segm_poly_flip.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | 1 | 2021-11-10T07:57:01.000Z | 2021-11-10T07:57:01.000Z | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 32.939394 | 86 | 0.680313 |
d9ffa4ed62396578882ab6ed8db60402863b18c3 | 2,311 | py | Python | tests/rbac/common/role/propose_admin_helper_tests.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 75 | 2018-04-06T09:13:34.000Z | 2020-05-18T18:59:47.000Z | tests/rbac/common/role/propose_admin_helper_tests.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 989 | 2018-04-18T21:01:56.000Z | 2019-10-23T15:37:09.000Z | tests/rbac/common/role/propose_admin_helper_tests.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 72 | 2018-04-13T18:29:12.000Z | 2020-05-29T06:00:33.000Z | # Copyright 2019 Contributors to Hyperledger Sawtooth
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 32.549296 | 79 | 0.710082 |
6ab8886e1732e2c8335d09626a3d391ae699e716 | 200 | py | Python | exercises/de/solution_01_02_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/de/solution_01_02_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/de/solution_01_02_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | # Importiere spaCy
import spacy
# Erstelle ein englisches nlp-Objekt
nlp = spacy.blank("en")
# Verarbeite einen Text
doc = nlp("This is a sentence.")
# Drucke den Text des Dokuments
print(doc.text) | 18.181818 | 36 | 0.74 |
be20b268542bd9fb5b925f915610a8d808658171 | 529 | py | Python | actions.py | matthewmercuri/mdbacktestv2 | 2525113458cdf71e7d99ac208ad35aea92169b99 | [
"MIT"
] | null | null | null | actions.py | matthewmercuri/mdbacktestv2 | 2525113458cdf71e7d99ac208ad35aea92169b99 | [
"MIT"
] | null | null | null | actions.py | matthewmercuri/mdbacktestv2 | 2525113458cdf71e7d99ac208ad35aea92169b99 | [
"MIT"
] | null | null | null | class Actions:
'''Have to figure out a way where everytime a method
in this class is called, it goes out and gets the
current df and portfolo
'''
def _test(self):
print(self.todays_df())
def _check_valid_buy(self, symbol, quantity):
pass
def _check_valid_sell(self, symbol,... | 24.045455 | 59 | 0.642722 |
ed633771a0dcf96096590223c8408989d8dc4e56 | 174 | py | Python | utest/start-all.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | utest/start-all.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | utest/start-all.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import sys
os.system(sys.executable + " widgets_test.py")
os.system(sys.executable + " api.py")
os.system(sys.executable + " examples.py")
| 19.333333 | 46 | 0.718391 |
71fb05950ffb76adfddb70032efa0658312ff59b | 259 | py | Python | foundation/www/index.py | prafful1234/foundation | 6fcb027e76eae8d307c3dd70436a9657ff681f01 | [
"MIT"
] | 59 | 2017-03-15T08:14:52.000Z | 2021-11-17T14:21:58.000Z | foundation/www/index.py | prafful1234/foundation | 6fcb027e76eae8d307c3dd70436a9657ff681f01 | [
"MIT"
] | 147 | 2017-01-25T10:44:47.000Z | 2020-11-05T04:24:22.000Z | foundation/www/index.py | prafful1234/foundation | 6fcb027e76eae8d307c3dd70436a9657ff681f01 | [
"MIT"
] | 134 | 2017-03-14T14:04:21.000Z | 2022-03-18T08:19:47.000Z | # See license.txt
from __future__ import unicode_literals
import frappe
def get_context(context):
out = {
"events": frappe.get_all("Portal Event", fields=["event_title", "event_date", "details", "route"], filters=[["published", "=", 1]])
}
return out
| 23.545455 | 133 | 0.694981 |
9c1dc541272c6bfb6340f18018f434bdd18e18d3 | 2,744 | py | Python | src/server/app/endpoints/chatting/controllers.py | MatthiasRiener/DigiPen | 9b4aff4a1c431e06d73733dc3dd3f3f3d4631704 | [
"MIT"
] | null | null | null | src/server/app/endpoints/chatting/controllers.py | MatthiasRiener/DigiPen | 9b4aff4a1c431e06d73733dc3dd3f3f3d4631704 | [
"MIT"
] | null | null | null | src/server/app/endpoints/chatting/controllers.py | MatthiasRiener/DigiPen | 9b4aff4a1c431e06d73733dc3dd3f3f3d4631704 | [
"MIT"
] | null | null | null | from re import U
from flask import Flask, Blueprint, render_template, abort, g, request
from flask_socketio import emit, join_room, leave_room, send
from ...db.settings import db, oidc, socketio, mongoclient
from ...repository.PresentationRepositoryNew import broadCastMessage, broadCastMessageExceptOwn
from flask_jwt_e... | 35.179487 | 178 | 0.754738 |
9c4cd1bf0908682aeaddf96f929c88caca627328 | 4,868 | py | Python | StockDataTest_v3/model_H,bs1,ts1,tf100/stock_3.py | TrunkingW/Deep_Learning | 85add772a2c613f8034985872eb3e44683d47bee | [
"MIT"
] | null | null | null | StockDataTest_v3/model_H,bs1,ts1,tf100/stock_3.py | TrunkingW/Deep_Learning | 85add772a2c613f8034985872eb3e44683d47bee | [
"MIT"
] | null | null | null | StockDataTest_v3/model_H,bs1,ts1,tf100/stock_3.py | TrunkingW/Deep_Learning | 85add772a2c613f8034985872eb3e44683d47bee | [
"MIT"
] | null | null | null |
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
rnn_unit=10
input_size=7
output_size=1
lr=0.0006
f=open('test.csv')
df=pd.read_csv(f)
data=df.iloc[:,2:10].values
def get_train_data(batch_size=60,time_step=20,train_begin=0,train_end=3627):
batch_inde... | 36.059259 | 159 | 0.673583 |
92c65123a6c522968afa5a515527ab9b438ba792 | 1,706 | py | Python | python/odml/nix_demo.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | python/odml/nix_demo.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | python/odml/nix_demo.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | import matplotlib.pyplot as plt
import pandas as pd
from pathlib import Path
import nixio as nix
fnbase = Path.joinpath(Path.home(), 'Chaos', 'work')
fnraw = str(Path.joinpath(fnbase,
'_Lab_Zimmer/calcium_imaging/results/N2/urx/shift210421/20120705Pflp178GCaMP5kshift210421W7URXx2.log'))
... | 28.915254 | 129 | 0.743259 |
13e7327b4d99b3fd39e85a80b65855147801e4af | 173 | py | Python | kettle_etl/test.py | Latent-Lxx/dazhou-dw | 902b4b625cda4c9e4eb205017b8955b81f37a0b5 | [
"MIT"
] | null | null | null | kettle_etl/test.py | Latent-Lxx/dazhou-dw | 902b4b625cda4c9e4eb205017b8955b81f37a0b5 | [
"MIT"
] | null | null | null | kettle_etl/test.py | Latent-Lxx/dazhou-dw | 902b4b625cda4c9e4eb205017b8955b81f37a0b5 | [
"MIT"
] | 1 | 2022-02-11T04:44:37.000Z | 2022-02-11T04:44:37.000Z | # !/usr/bin/python3
# -*- coding: utf-8 -*-
# @Time : 2021/8/16 下午5:15
# @Author : Latent
# @Email : latentsky@gmail.com
# @File : test.py
# @Software: PyCharm
# @class :
| 15.727273 | 30 | 0.595376 |
b9e161d322f05c7b5100d4c6312496ca0dd549af | 615 | py | Python | PINp/2014/Cheraneva A.S/task_6_24.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/Cheraneva A.S/task_6_24.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/Cheraneva A.S/task_6_24.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 6. Вариант 24.
#Создайте игру, в которой компьютер загадывает название одной из четырех основных мастей лошадей, а игрок должен ее угадать.
#Cheraneva A.S.
#25.03.2016
import random
m=('Вороная', 'Гнедая', 'Серая', 'Рыжая')
a=random.randint(0,2)
rand=m[a]
print('Как вы думаете, название какой из четырех осн... | 24.6 | 124 | 0.715447 |
dbfd89ef256e806d456f2672b2c638dc1dff7eaa | 1,402 | py | Python | test.py | ikeikeikeike/scrapy-2ch-summary-spider | 7142693f25025a09390377649a727cfd33d15af3 | [
"MIT"
] | 2 | 2015-01-12T08:23:35.000Z | 2017-07-28T15:02:26.000Z | test.py | ikeikeikeike/scrapy-2ch-summary-spider | 7142693f25025a09390377649a727cfd33d15af3 | [
"MIT"
] | null | null | null | test.py | ikeikeikeike/scrapy-2ch-summary-spider | 7142693f25025a09390377649a727cfd33d15af3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from scrapy.spider import BaseSpider
from scrapy.http.request import Request
from scrapy.utils.response import open_in_browser
class TestSpider(BaseSpider):
""" Testing Spider
"""
name = 'test'
allowed_domains = [
'miru-navi.com',
# 'map-fuzoku.com'
]
... | 21.90625 | 72 | 0.554922 |
16475993a8a522232fa5f5db3024d410f9c3de75 | 2,964 | py | Python | scripts/calendar_view_gui/utils/imgLib.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 17 | 2021-01-18T07:27:01.000Z | 2022-03-10T12:26:21.000Z | scripts/calendar_view_gui/utils/imgLib.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 4 | 2021-04-29T11:20:44.000Z | 2021-12-06T10:19:17.000Z | scripts/calendar_view_gui/utils/imgLib.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 47 | 2021-01-21T08:25:22.000Z | 2022-03-21T14:28:42.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# This file is part of CbM (https://github.com/ec-jrc/cbm).
# Author : Guido Lemoine
# Credits : GTCAP Team
# Copyright : 2021 European Commission, Joint Research Centre
# License : 3-Clause BSD
# Version : 1.0 - 2020-04-05
"""Simple image processing routines fo... | 33.681818 | 88 | 0.635628 |
16796e3a975cd0bc7dcc860b0f5e52c8a4ea9d9c | 1,795 | py | Python | extraction/links_in_context/extract_linkcontext.py | dbmdz/webarchiv-dh-bestandsausbau | 98c271a09cdb026d1d58133f49dcb3e1c9fcf9b6 | [
"MIT"
] | null | null | null | extraction/links_in_context/extract_linkcontext.py | dbmdz/webarchiv-dh-bestandsausbau | 98c271a09cdb026d1d58133f49dcb3e1c9fcf9b6 | [
"MIT"
] | null | null | null | extraction/links_in_context/extract_linkcontext.py | dbmdz/webarchiv-dh-bestandsausbau | 98c271a09cdb026d1d58133f49dcb3e1c9fcf9b6 | [
"MIT"
] | null | null | null | import re
from typing import List
from bs4 import BeautifulSoup
from pyspark.sql.functions import udf
from pyspark.sql.types import ArrayType, StringType, FloatType
def normalize_whitespace(text: str) -> str:
text = text.strip()
text = re.sub(r"\s+", " ", text)
return text
def extract_links_in_context(... | 28.951613 | 69 | 0.627855 |
169e294f0dad2ad26c5671f9be0e739e673b63c8 | 9,575 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/rabbitmq_queue.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/rabbitmq_queue.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/rabbitmq_queue.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2015, Manuel Sousa <manuel.sousa@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_vers... | 37.256809 | 136 | 0.60658 |
4c6e35772bca6b8de77b665c9d373974f2dec0a4 | 9,075 | py | Python | helper/segmentation/offline_augmentation.py | fishial/Object-Detection-Model | 4792f65ea785156a8e240d9cdbbc0c9d013ea0bb | [
"CC0-1.0"
] | 1 | 2022-01-03T14:00:17.000Z | 2022-01-03T14:00:17.000Z | helper/segmentation/offline_augmentation.py | fishial/Object-Detection-Model | 4792f65ea785156a8e240d9cdbbc0c9d013ea0bb | [
"CC0-1.0"
] | null | null | null | helper/segmentation/offline_augmentation.py | fishial/Object-Detection-Model | 4792f65ea785156a8e240d9cdbbc0c9d013ea0bb | [
"CC0-1.0"
] | 1 | 2021-12-21T09:50:53.000Z | 2021-12-21T09:50:53.000Z | import sys
#Change path specificly to your directories
sys.path.insert(1, '/home/codahead/Fishial/FishialReaserch')
import os
import cv2
import json
import copy
import warnings
import imgaug as ia
import imgaug.augmenters as iaa
from shutil import copyfile
from imgaug.augmentables.polys import Polygon
from tqdm impor... | 45.833333 | 119 | 0.556915 |
d5fe7e57f5e807d278e8fa87e8f07a9c3c185106 | 684 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-006/ph-6.24-break-continue.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-006/ph-6.24-break-continue.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-006/ph-6.24-break-continue.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | terminate_program = False
while not terminate_program:
number1 = input("Please enter a number: ")
number1 = int(number1)
number2 = input("Please enter another number: ")
number2 = int(number2)
while True:
operation = input("Please enter add/sub or quit to exit: ")
if operation == "q... | 31.090909 | 67 | 0.559942 |
914abb8f64ae36bbb92d74a3ed34e1337f556564 | 2,576 | py | Python | begin-python/cp2/chapter2.py | Jocs/reading-notes | 26b8331877a2de034b8860bc3e3967893112d52d | [
"MIT"
] | 3 | 2021-08-04T07:59:48.000Z | 2022-03-26T23:58:17.000Z | begin-python/cp2/chapter2.py | Jocs/reading-notes | 26b8331877a2de034b8860bc3e3967893112d52d | [
"MIT"
] | null | null | null | begin-python/cp2/chapter2.py | Jocs/reading-notes | 26b8331877a2de034b8860bc3e3967893112d52d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf8 -*-
# ##第二章:列表和元组
# ###2.1 序列的操作
fourth = raw_input('Year: ')[3]
print fourth
# 分片
number = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
partial = number[2:-2]
print partial
print number[-3:]
# 复制序列
anotherNumber = number[:]
print anotherNumber
# 步长
print number[::2]
# 序列相加
number2 = [1, ... | 16.512821 | 65 | 0.617236 |
e68e200b3481c35e3c4c48c061b28b73040697f4 | 1,580 | py | Python | ANN/e01/e01.py | joao-frohlich/BCC | 9ed74eb6d921d1280f48680677a2140c5383368d | [
"Apache-2.0"
] | 10 | 2020-12-08T20:18:15.000Z | 2021-06-07T20:00:07.000Z | ANN/e01/e01.py | joao-frohlich/BCC | 9ed74eb6d921d1280f48680677a2140c5383368d | [
"Apache-2.0"
] | 2 | 2021-06-28T03:42:13.000Z | 2021-06-28T16:53:13.000Z | ANN/e01/e01.py | joao-frohlich/BCC | 9ed74eb6d921d1280f48680677a2140c5383368d | [
"Apache-2.0"
] | 2 | 2021-01-14T19:59:20.000Z | 2021-06-15T11:53:21.000Z | #########################
# Vinicius Gasparini #
# Análise Numérica #
# Exercicio 01 #
#########################
def f(x):
return x ** 5 - 4 * x - 3
def verificacao_bolzano(a, b):
print("*** Verificação Bolzano ***")
fa = f(a)
fb = f(b)
print("f(a)= %.4f\nf(b)= %.4f" % (fa, fb))... | 22.253521 | 78 | 0.437342 |
e6987fccce65bb6bf364810e196af09800ac5c5c | 402 | py | Python | Topics/Sorting/Insertion-Sort/insertion-sort.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | 3 | 2021-06-15T01:19:23.000Z | 2022-03-16T18:23:53.000Z | Topics/Sorting/Insertion-Sort/insertion-sort.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | Topics/Sorting/Insertion-Sort/insertion-sort.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | def insertion_sort(a: list) -> list:
a, n = a.copy(), len(a)
for i in range(1, n):
for j in range(i, 0, -1):
if a[j-1] <= a[j]:
break
a[j-1], a[j] = a[j], a[j-1]
return a
if __name__ == "__main__":
from random import randint
nums = [randint(1, 50) fo... | 23.647059 | 46 | 0.502488 |
5db44633b825bf93c9fa9958fcc315608dc78996 | 5,441 | py | Python | research/hpc/pinns/src/Schrodinger/net.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/hpc/pinns/src/Schrodinger/net.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/hpc/pinns/src/Schrodinger/net.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... | 32.580838 | 108 | 0.596949 |
538dc29dcc71f698df4061690facdf881bb91c72 | 5,844 | py | Python | mod/units/update_handler.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | 1 | 2015-06-28T15:26:52.000Z | 2015-06-28T15:26:52.000Z | mod/units/update_handler.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | null | null | null | mod/units/update_handler.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | 6 | 2015-03-20T16:36:22.000Z | 2021-08-28T07:58:18.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2014-12-11 21:49:24
# @Author : yml_bright@163.com
import tornado.web
from sqlalchemy.orm.exc import NoResultFound
from ..models.course import Course
from ..models.user import User
from ..models.gpa import Overview as GPAO, Detail as GPAD
from ..mod... | 47.901639 | 93 | 0.422656 |
54ca9e80fb49364d221f881daff8c15fbf96c587 | 1,703 | py | Python | Database.py | lichtwellenreiter/shotstand | 5413662b76d5a810b36ca5ae8b84f41fc6645cc8 | [
"MIT"
] | null | null | null | Database.py | lichtwellenreiter/shotstand | 5413662b76d5a810b36ca5ae8b84f41fc6645cc8 | [
"MIT"
] | null | null | null | Database.py | lichtwellenreiter/shotstand | 5413662b76d5a810b36ca5ae8b84f41fc6645cc8 | [
"MIT"
] | null | null | null | import sqlite3
class Database:
def __init__(self, dbname):
self.conn = sqlite3.connect(dbname)
self.conn.execute("CREATE TABLE IF NOT EXISTS shotmeter (" \
"id INTEGER PRIMARY KEY, " \
"groupname TEXT not null , " \
"sh... | 31.537037 | 112 | 0.547857 |
54f757a167eda4dbab0542fc88c420749882a126 | 1,730 | py | Python | src/blockchain/merkle_tree.py | TimHabeck/blockchain-lab | 3cd050ee43f26cf0a1f70869100f0b40a6abae07 | [
"RSA-MD"
] | null | null | null | src/blockchain/merkle_tree.py | TimHabeck/blockchain-lab | 3cd050ee43f26cf0a1f70869100f0b40a6abae07 | [
"RSA-MD"
] | null | null | null | src/blockchain/merkle_tree.py | TimHabeck/blockchain-lab | 3cd050ee43f26cf0a1f70869100f0b40a6abae07 | [
"RSA-MD"
] | null | null | null | import hashlib
import logging
from typing import List
class Tree_Node:
def __init__(self, left, right, value: str) -> None:
self.left: Tree_Node = left
self.right: Tree_Node = right
self.value = value
@staticmethod
def hash(val: str) -> str:
return hashlib.sha256(val.encod... | 32.037037 | 98 | 0.622543 |
0714b36405a398266b808b94ce602286652e23d9 | 2,087 | py | Python | archive/muconvert.py | fourpoints/mumath | f1c36c4a5b3c32a3e7f8e7a922eafea8b7a14fd4 | [
"MIT"
] | null | null | null | archive/muconvert.py | fourpoints/mumath | f1c36c4a5b3c32a3e7f8e7a922eafea8b7a14fd4 | [
"MIT"
] | null | null | null | archive/muconvert.py | fourpoints/mumath | f1c36c4a5b3c32a3e7f8e7a922eafea8b7a14fd4 | [
"MIT"
] | null | null | null | #!/usr/bin/python -i
"""
Change the input/output_file_path to select other files
"""
from mumath.treebuilder import treebuilder
import xml.etree.ElementTree as et
input_file_path = "mumath/sample.mu"
output_file_path= "mumath/sample.html"
def mumath(**options):
### LOAD EXTENSIONS
extensions = options.get("extens... | 20.460784 | 57 | 0.641591 |
4ad86ff106a5b20030f4c1493db9a52d1b48aad9 | 223 | py | Python | oop/class_testing.py | karinakozarova/Learning-Python | 217dfc8ca6931a238445daf0b84e188c02916c52 | [
"MIT"
] | 1 | 2019-04-07T23:14:29.000Z | 2019-04-07T23:14:29.000Z | oop/class_testing.py | karinakozarova/Learning-Python | 217dfc8ca6931a238445daf0b84e188c02916c52 | [
"MIT"
] | null | null | null | oop/class_testing.py | karinakozarova/Learning-Python | 217dfc8ca6931a238445daf0b84e188c02916c52 | [
"MIT"
] | null | null | null | class Car:
def __init__(self,color,model):
self.color = color
self.model = model
def print(self):
return self.color + " " + self.model
car1 = Car("green","Toyota")
print(car1.print()) | 18.583333 | 44 | 0.578475 |
ab302693c3279ea347f27f6fb202308aab25a2d3 | 7,565 | py | Python | AI_Engine_Development/Feature_Tutorials/12-axis-traffic-generator/sw/pysrc/run_traffic_gen.py | jlamperez/Vitis-Tutorials | 9a5b611caabb5656bbb2879116e032227b164bfd | [
"Apache-2.0"
] | 567 | 2019-10-01T16:31:26.000Z | 2022-03-31T18:43:30.000Z | AI_Engine_Development/Feature_Tutorials/12-axis-traffic-generator/sw/pysrc/run_traffic_gen.py | jlamperez/Vitis-Tutorials | 9a5b611caabb5656bbb2879116e032227b164bfd | [
"Apache-2.0"
] | 142 | 2019-11-25T14:42:16.000Z | 2022-03-31T15:06:56.000Z | AI_Engine_Development/Feature_Tutorials/12-axis-traffic-generator/sw/pysrc/run_traffic_gen.py | jlamperez/Vitis-Tutorials | 9a5b611caabb5656bbb2879116e032227b164bfd | [
"Apache-2.0"
] | 387 | 2019-10-10T09:14:00.000Z | 2022-03-31T02:51:02.000Z | #
#© Copyright 2021 Xilinx, Inc.
#
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#Unless required by applicable law or agreed to in writing, s... | 32.191489 | 125 | 0.598414 |
dbabd978df29e9e193fa4b56bc9f21649f73fe4e | 464 | py | Python | leetcode/011-Container-With-Most-Water/ContainerWMW_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-12-29T03:26:39.000Z | 2016-12-29T03:26:39.000Z | leetcode/011-Container-With-Most-Water/ContainerWMW_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/011-Container-With-Most-Water/ContainerWMW_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | # @ cchen
# based on the lecture of 'Two Pointers' in Advanced Programming Class
class Solution:
# @param {integer[]} height
# @return {integer}
def maxArea(self, height):
i, j = 0, len(height) - 1
res = 0
while i < j:
if height[i] < height[j]:
i += 1
... | 24.421053 | 70 | 0.465517 |
dbdafdf0fa98af2e958d720b4530afcc3062cfb7 | 5,400 | py | Python | pymongo/member.py | dxmahata/TwitterSentimentAnalysis | b228747dfa74266853d4f8e6d4bc4eb29c080dd3 | [
"MIT"
] | 12 | 2017-12-15T06:50:16.000Z | 2020-02-02T12:22:09.000Z | pymongo/member.py | dxmahata/TwitterSentimentAnalysis | b228747dfa74266853d4f8e6d4bc4eb29c080dd3 | [
"MIT"
] | 1 | 2016-05-09T16:13:48.000Z | 2016-05-09T16:13:48.000Z | pymongo/member.py | dxmahata/TwitterSentimentAnalysis | b228747dfa74266853d4f8e6d4bc4eb29c080dd3 | [
"MIT"
] | 4 | 2018-01-16T01:26:22.000Z | 2019-04-30T13:42:38.000Z | # Copyright 2013-2014 MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you
# may not use this file except in compliance with the License. You
# may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 35.761589 | 77 | 0.640926 |
918c6dab7ba4e8985d09aa9ca3eb99114ce0c752 | 11,007 | py | Python | PowerEyes/install.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | PowerEyes/install.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | PowerEyes/install.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 2 | 2021-04-19T08:28:54.000Z | 2022-01-19T13:23:29.000Z | #!/usr/bin/python3
#coding:utf-8
import os
import subprocess
import hashlib
import platform
import sys
import time
banner = '''
_/_/_/ _/
_/ _/_/ _/_/_/_/ _/ _/ _/_/_/
_/_/ _/_/_/_/ _/ ... | 48.065502 | 191 | 0.564368 |
f465b4654dc71f8a3174d6662633dcf4da13dd5c | 2,156 | py | Python | books/PythonCleanCode/ch3_good_code/test_exceptions_2.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch3_good_code/test_exceptions_2.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch3_good_code/test_exceptions_2.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """Clean Code in Python - Chapter 3: General Traits of Good Code
"""
import unittest
from unittest.mock import Mock, patch
from exceptions_2 import DataTransport, Event
class FailsAfterNTimes:
def __init__(self, n_times: int, with_exception) -> None:
self._remaining_failures = n_times
self._exce... | 29.135135 | 87 | 0.669759 |
f479821ebb37561740faa9f1e056f7615c521ac7 | 2,608 | py | Python | Kaggle-Competitions/CrowdFlower/scripts/model_train_plus_test.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:16:23.000Z | 2019-05-10T09:16:23.000Z | Kaggle-Competitions/CrowdFlower/scripts/model_train_plus_test.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | null | null | null | Kaggle-Competitions/CrowdFlower/scripts/model_train_plus_test.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:17:28.000Z | 2019-05-10T09:17:28.000Z | from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.feature_selection import SelectPercentile, chi2
from sklearn.decomposition import TruncatedSVD
from sklearn.preprocessing import StandardScaler
from sklearn.svm import SVC
from sklearn.naive_bayes import MultinomialNB
from sklearn.neighbors import... | 33.87013 | 114 | 0.755752 |
be3045744eceafafab62eacefd65e9b627f1ad2b | 1,057 | py | Python | Theories/DataStructures/BinaryTree/PopulatingNextRightPointersEachNode/populate_next_right_pointers_each_node.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Theories/DataStructures/BinaryTree/PopulatingNextRightPointersEachNode/populate_next_right_pointers_each_node.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Theories/DataStructures/BinaryTree/PopulatingNextRightPointersEachNode/populate_next_right_pointers_each_node.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | # Definition for a Node.
class Node:
def __init__(self, val: int = 0, left: 'Node' = None, right: 'Node' = None, next: 'Node' = None):
self.val = val
self.left = left
self.right = right
self.next = next
# Recursive
def connect(root: 'Node') -> 'Node':
node_level = {}
def po... | 27.815789 | 101 | 0.558184 |
fe610d59722277e24965e2dde127c90dc8c0ec8a | 1,106 | py | Python | finbyz_dashboard/finbyz_dashboard/report/purchase_order_trends.py | finbyz/finbyz_dashboard | 9c58ab7bccf589bc010d0e5bf95b20cadd4d71f0 | [
"MIT"
] | 1 | 2021-11-19T05:27:11.000Z | 2021-11-19T05:27:11.000Z | finbyz_dashboard/finbyz_dashboard/report/purchase_order_trends.py | finbyz/finbyz_dashboard | 9c58ab7bccf589bc010d0e5bf95b20cadd4d71f0 | [
"MIT"
] | null | null | null | finbyz_dashboard/finbyz_dashboard/report/purchase_order_trends.py | finbyz/finbyz_dashboard | 9c58ab7bccf589bc010d0e5bf95b20cadd4d71f0 | [
"MIT"
] | 2 | 2021-08-21T10:41:38.000Z | 2021-11-19T05:27:13.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from erpnext.controllers.trends import get_columns,get_data
def execute(filters=None):
if not filters: filters ={}
... | 22.12 | 68 | 0.673599 |
22fa1d57675b34cc8bd00b36fc11b9faccb37e3d | 1,284 | py | Python | 0101symmetric-tree.py | meat00/my-leetcode-python | 8312de396b29e1d6dd54a65f87fa0511eb400faa | [
"MIT"
] | null | null | null | 0101symmetric-tree.py | meat00/my-leetcode-python | 8312de396b29e1d6dd54a65f87fa0511eb400faa | [
"MIT"
] | null | null | null | 0101symmetric-tree.py | meat00/my-leetcode-python | 8312de396b29e1d6dd54a65f87fa0511eb400faa | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
'''
遍历
'''
def isSymmetric(self, root):
if root == None:
return True
deQueue = [root.left, ... | 24.226415 | 53 | 0.479751 |
fe02376a9eac4f1480509625457317b840533b2b | 1,825 | py | Python | bos/txt2csv.py | DennisTobola/jskos-data | d32837447b01498fc4c05c49c534d4ab4faae35f | [
"CC0-1.0"
] | 7 | 2015-10-02T15:43:56.000Z | 2021-12-07T11:20:46.000Z | bos/txt2csv.py | DennisTobola/jskos-data | d32837447b01498fc4c05c49c534d4ab4faae35f | [
"CC0-1.0"
] | 22 | 2015-11-06T14:33:55.000Z | 2022-03-31T11:48:11.000Z | bos/txt2csv.py | DennisTobola/jskos-data | d32837447b01498fc4c05c49c534d4ab4faae35f | [
"CC0-1.0"
] | 4 | 2018-10-17T13:06:57.000Z | 2022-03-14T08:46:35.000Z | #!/usr/bin/env python3
import re
import csv
from namedentities import unicode_entities
# Öffne sys.txt zum Schreiben
csvfile = open('sys.csv', 'w', newline = '')
csvwriter = csv.writer(csvfile)
csvwriter.writerow(("level","notation","prefLabel"))
# Bereits verarbeitete Notationen
seen = set()
# Gibt einen Datensat... | 29.435484 | 76 | 0.546849 |
fe0bdad5faf27282abb24a685616dfeae353996d | 637 | py | Python | pacman-arch/test/pacman/tests/replace102.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/replace102.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/replace102.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Sysupgrade with a versioned replacement, original stays"
sp1 = pmpkg("python2-yaml", "5-1")
sp1.replaces = ["python-yaml<5"]
sp1.conflicts = ["python-yaml<5"]
sp1.files = ["lib/python2/file"]
self.addpkg2db("sync", sp1)
# the python3 version
sp2 = pmpkg("python-yaml", "5-1")
sp2.files = ["lib/pyth... | 26.541667 | 76 | 0.704867 |
60bce6adb4c4576ccc410124b6676cb03c1d2123 | 1,359 | py | Python | test/test_rohmu_dates.py | st3fan/sphinx-automation-experiment | c92c8400770c6c604e2451e4f1e71957fc4c5ef8 | [
"Apache-2.0"
] | 731 | 2018-06-01T21:48:43.000Z | 2022-03-29T08:21:42.000Z | test/test_rohmu_dates.py | st3fan/sphinx-automation-experiment | c92c8400770c6c604e2451e4f1e71957fc4c5ef8 | [
"Apache-2.0"
] | 124 | 2018-06-19T05:59:50.000Z | 2022-03-31T18:17:59.000Z | test/test_rohmu_dates.py | st3fan/sphinx-automation-experiment | c92c8400770c6c604e2451e4f1e71957fc4c5ef8 | [
"Apache-2.0"
] | 64 | 2018-06-26T14:12:53.000Z | 2022-03-20T07:33:33.000Z | """
rohmu test case
Copyright (c) 2017 Ohmu Ltd
See LICENSE for details
"""
import datetime
import re
import dateutil.tz
from pghoard.rohmu.dates import parse_timestamp
def test_parse_timestamp():
local_aware = datetime.datetime.now(dateutil.tz.tzlocal())
# split local_aware such as "2021-02-08T09:58:27.9... | 37.75 | 103 | 0.745401 |
71b24acd2e6f3dda9e4ad9c895364b9a583826ef | 216,404 | py | Python | samuri6.py | Redsamuribot/vpssamu | a8bdeb76d577536e064b761b6543b626c5900088 | [
"MIT"
] | null | null | null | samuri6.py | Redsamuribot/vpssamu | a8bdeb76d577536e064b761b6543b626c5900088 | [
"MIT"
] | null | null | null | samuri6.py | Redsamuribot/vpssamu | a8bdeb76d577536e064b761b6543b626c5900088 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import LINETCR
from LINETCR.lib.curve.ttypes import *
from datetime import datetime
import time, random, sys, ast, re, os, io, json, subprocess, threading, string, codecs, requests, tweepy, ctypes, urllib, urllib2, wikipedia, goslate
import timeit
from bs4 import BeautifulSoup
from urllib impor... | 46.40875 | 446 | 0.415117 |
e0d385ada0af96855016efa55f0e1e9cbf009856 | 1,290 | py | Python | FUNDASTORE/APPS/PRINCIPAL/views.py | GabrielB-07/FundaStore-cgb | b509a9743a651344b32dd7a40ab789f1db48e54b | [
"CC0-1.0"
] | null | null | null | FUNDASTORE/APPS/PRINCIPAL/views.py | GabrielB-07/FundaStore-cgb | b509a9743a651344b32dd7a40ab789f1db48e54b | [
"CC0-1.0"
] | null | null | null | FUNDASTORE/APPS/PRINCIPAL/views.py | GabrielB-07/FundaStore-cgb | b509a9743a651344b32dd7a40ab789f1db48e54b | [
"CC0-1.0"
] | null | null | null | from django.shortcuts import render
from django.core.mail import send_mail
from .forms import *
# Create your views here.
def ver_contactenos(request):
formulario = FormularioContactenos()
if request.method == "POST":
formulario = FormularioContactenos(request.POST)
asunto = 'CONSULTA DE -' + ... | 49.615385 | 109 | 0.691473 |
1ce2741de8abf220456b5b125a9240795c9a788a | 3,598 | py | Python | tests/test_lueftungsanlage_addr.py | fgoettel/wgt | e093e2a003fa6c9d4c2082cebbc95701d7f9089d | [
"Unlicense"
] | null | null | null | tests/test_lueftungsanlage_addr.py | fgoettel/wgt | e093e2a003fa6c9d4c2082cebbc95701d7f9089d | [
"Unlicense"
] | null | null | null | tests/test_lueftungsanlage_addr.py | fgoettel/wgt | e093e2a003fa6c9d4c2082cebbc95701d7f9089d | [
"Unlicense"
] | 1 | 2022-01-29T12:01:47.000Z | 2022-01-29T12:01:47.000Z | """Tests for `wgt` addresses package."""
import pytest
from wgt import WGT
def test_addr():
"""Ensure that the addresses are in sync with documentation.
Doc updated 31.03.2020
"""
# pylint: disable=protected-access,too-many-statements
assert WGT._addr_betriebsart == 100
assert WGT._addr_lu... | 42.329412 | 66 | 0.770984 |
1c344aad8538ab1fa6efeddea18a32c48a3a3f05 | 8,335 | py | Python | Packs/Exabeam/Integrations/Exabeam/test_data/response_constants.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Exabeam/Integrations/Exabeam/test_data/response_constants.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Exabeam/Integrations/Exabeam/test_data/response_constants.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | RESPONSE_PEER_GROUPS = [
"Marketing",
"usa",
"101",
"Program Manager",
"Channel Administrator",
"Chief Marketing Officer",
"",
"Chief Strategy Officer",
"CN=Andrew",
"BitLockerUsersComputers"
]
RESPONSE_USER_LABELS = [
"privileged_user",
"service_account"
]
RESPONSE_WATCH... | 35.317797 | 118 | 0.486623 |
1c73dd669e3d5d8f2a77870c748f6bd2534d6e15 | 942 | py | Python | 数据结构/NowCode/29_VerifySquenceOfBST.py | Blankwhiter/LearningNotes | 83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0 | [
"MIT"
] | null | null | null | 数据结构/NowCode/29_VerifySquenceOfBST.py | Blankwhiter/LearningNotes | 83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0 | [
"MIT"
] | 3 | 2020-08-14T07:50:27.000Z | 2020-08-14T08:51:06.000Z | 数据结构/NowCode/29_VerifySquenceOfBST.py | Blankwhiter/LearningNotes | 83e570bf386a8e2b5aa699c3d38b83e5dcdd9cb0 | [
"MIT"
] | 2 | 2021-03-14T05:58:45.000Z | 2021-08-29T17:25:52.000Z | # 输入一个整数数组,判断该数组是不是某二叉搜索树的后序遍历的结果。如果是则输出Yes,否则输出No。假设输入的数组的任意两个数字都互不相同。
class Solution:
def VerifySquenceOfBST(self, sequence):
if sequence == []:
return False
# 找ROOT节点,也就是最后一个
root = sequence[-1]
# 删除队列中的末尾节点
del sequence[-1]
# 寻找出划分的节点
index = ... | 30.387097 | 71 | 0.530786 |
c7add1482f438efd02b081cb25ef659e53ada2cb | 1,301 | py | Python | 3kCTF/2021/web/pawnshop/apache/src/funcs.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | 3kCTF/2021/web/pawnshop/apache/src/funcs.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | 3kCTF/2021/web/pawnshop/apache/src/funcs.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import cgi, cgitb ,json
from elasticsearch import Elasticsearch
from email.utils import parseaddr
import json
import re
es_client = Elasticsearch(['http://172.30.0.7:9200'])
def api(jsonv):
print("Content-type: application/json\r\n\r\n")
print(json.dumps(jsonv))
exit()
def verify_email(mail):
... | 25.019231 | 117 | 0.6103 |
406e0d25757cf95f5bc4eb64641827d4870c2485 | 330 | py | Python | Chapter9_AdvancedDL/Chapter9_3_ModelImprovement/bostonLinReg.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | 11 | 2020-10-12T14:06:31.000Z | 2022-02-22T09:16:32.000Z | Chapter9_AdvancedDL/Chapter9_3_ModelImprovement/bostonLinReg.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter9_AdvancedDL/Chapter9_3_ModelImprovement/bostonLinReg.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | 8 | 2020-10-29T07:53:49.000Z | 2022-03-17T11:01:20.000Z | from sklearn.linear_model import LinearRegression
from tf_utils.bostonData import BOSTON
if __name__ == "__main__":
boston = BOSTON()
x_train, y_train = boston.get_train_set()
x_test, y_test = boston.get_test_set()
regr = LinearRegression()
regr.fit(x_train, y_train)
print(regr.score(x_test,... | 23.571429 | 49 | 0.724242 |
29351fd1c6181f52ca793f43846030420bd0964f | 838 | py | Python | exercises/fr/test_02_06.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/fr/test_02_06.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/fr/test_02_06.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert (
"import Doc, Span" or "import Span, Doc" in __solution__
), "As-tu correctement importé Doc et Span ?"
assert doc.text == "Elle aime David Bowie", "As-tu correctement créé le Doc ?"
assert span.text == "David Bowie", "As-tu correctement créé le span ?"
assert span.label_... | 46.555556 | 82 | 0.640811 |
2976a5a2e0b2c451f863a1b16267138cce012fa5 | 1,200 | py | Python | 0-notes/job-search/Leetcode/~02-RemoveKDigits.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/Leetcode/~02-RemoveKDigits.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/Leetcode/~02-RemoveKDigits.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | # Given a non-negative integer num represented as a string, remove k digits from the number
# so that the new number is the smallest possible.
# NOTE: The length of num is less than 10002 and will be ≥ k.
# NOTE: The given num does not contain any leading zero.
'''
Example 1:
Input: num = "1432219", k = 3 | ... | 25.531915 | 92 | 0.598333 |
9ed4004596f156c049e789a78b6d553b3ed10e12 | 1,077 | py | Python | TreeModelLib/TreeModel.py | jvollhueter/pyMANGA-1 | 414204a394d44405225b4b8224b19464c1006f1d | [
"MIT"
] | null | null | null | TreeModelLib/TreeModel.py | jvollhueter/pyMANGA-1 | 414204a394d44405225b4b8224b19464c1006f1d | [
"MIT"
] | null | null | null | TreeModelLib/TreeModel.py | jvollhueter/pyMANGA-1 | 414204a394d44405225b4b8224b19464c1006f1d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@date: 2018-Today
@author: jasper.bathmann@ufz.de
"""
class TreeModel:
def prepareNextTimeStep(self, t_ini, t_end):
try:
self.concept.prepareNextTimeStep(t_ini, t_end)
except AttributeError:
self.raiseAttributeError("prepar... | 32.636364 | 79 | 0.600743 |
81fc2e38199db7eabafb311039595b8e7ff7a4cc | 91 | py | Python | python/pathlib/origin/rename.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/pathlib/origin/rename.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/pathlib/origin/rename.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | from pathlib import Path
path = Path('names.txt')
path.touch()
path.rename('mynames.txt') | 15.166667 | 26 | 0.725275 |
6f0aa528b4b8a3288c90ecba6ebb50d2787533dc | 261 | py | Python | app/views/models/sessions.py | zhiyong-lv/flask-login | d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63 | [
"MIT"
] | null | null | null | app/views/models/sessions.py | zhiyong-lv/flask-login | d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63 | [
"MIT"
] | null | null | null | app/views/models/sessions.py | zhiyong-lv/flask-login | d8bf0719bae19ba8f7f44ea6d6a8ca65ba22aa63 | [
"MIT"
] | null | null | null | from flask_restplus import Model, fields
session_json = Model('Session Input', {
'username': fields.String(required=True, description='The user name', attribute='username'),
'password': fields.String(required=True, description='The user password'),
})
| 37.285714 | 96 | 0.739464 |
48c94a7d57c69b47e22d4866ea75111eeb636145 | 3,621 | py | Python | synthetic/scripts/gen_data_2.py | zhewang/rdm | b2c00c5db6ee4861c1b7214e3a63b630be30bb31 | [
"Apache-2.0"
] | null | null | null | synthetic/scripts/gen_data_2.py | zhewang/rdm | b2c00c5db6ee4861c1b7214e3a63b630be30bb31 | [
"Apache-2.0"
] | null | null | null | synthetic/scripts/gen_data_2.py | zhewang/rdm | b2c00c5db6ee4861c1b7214e3a63b630be30bb31 | [
"Apache-2.0"
] | null | null | null | import argparse
import io
import struct
import json
import random
import numpy as np
import itertools
import math
import sys
def GetGaussInt(a, b):
value = random.gauss((a+b)/2, (b-a)/4)
while int(value) < a or int(value) > b:
value = random.gauss((a+b)/2, (b-a)/2)
return int(value)
def header()... | 29.680328 | 102 | 0.570284 |
82d90aedce759a77fd769f240bf4e76ce74a0b58 | 304 | py | Python | python/DeepLearning/test.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | 1 | 2019-05-22T07:12:34.000Z | 2019-05-22T07:12:34.000Z | python/DeepLearning/test.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | 3 | 2021-12-10T01:13:54.000Z | 2021-12-14T21:18:42.000Z | python/DeepLearning/test.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | null | null | null | import numpy as np
# 激活函数
def sigmoid(x):
s = 1 / (1 + np.exp(-x))
return s
if __name__ == '__main__':
a = np.array([[1, 2, 3]])
assert a.shape == (1, 3)
a = np.squeeze(a)
print(a.shape)
ret = sigmoid(np.array([-10000000, -4, -3, -2, -1, 0, 1, 2, 3, 4]))
print(ret)
| 16 | 71 | 0.503289 |
7dd22c8bf8f13865cfa0cc4f392b4be6d1354930 | 1,673 | py | Python | classification/predict_classifier_1.py | gitskim/DnntalPrivate | 20f84782e9ab20c68b43f32efb16cd22262b8ceb | [
"MIT"
] | null | null | null | classification/predict_classifier_1.py | gitskim/DnntalPrivate | 20f84782e9ab20c68b43f32efb16cd22262b8ceb | [
"MIT"
] | null | null | null | classification/predict_classifier_1.py | gitskim/DnntalPrivate | 20f84782e9ab20c68b43f32efb16cd22262b8ceb | [
"MIT"
] | 2 | 2019-05-16T05:48:26.000Z | 2021-01-27T01:26:22.000Z | from keras.models import load_model
import h5py
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
from PIL import Image
from skimage.io import imread
from keras.models import Model
import cv2
from keras import backend as K
model_path_classifier = '../Flaskapp/... | 26.983871 | 91 | 0.662881 |
8187f32f636a41836e6bcddf20b893841022962a | 92 | py | Python | 2015/misc/test-table-1/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2015/misc/test-table-1/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2015/misc/test-table-1/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 = '1yUpR-uFHjHoZvh9fOAmiF_-3KXZw01F1Ysi2qUhe0Ns'
| 23 | 68 | 0.826087 |
c4c7058ec6a032513d2812ed70f1b0ce7f05eebc | 8,449 | py | Python | Micropython_ESP8266/fontlib_rot.py | arkahu/Stuff | 6b5955444a4c538ce194764c28389e7043ab5cdd | [
"MIT"
] | null | null | null | Micropython_ESP8266/fontlib_rot.py | arkahu/Stuff | 6b5955444a4c538ce194764c28389e7043ab5cdd | [
"MIT"
] | null | null | null | Micropython_ESP8266/fontlib_rot.py | arkahu/Stuff | 6b5955444a4c538ce194764c28389e7043ab5cdd | [
"MIT"
] | null | null | null | #Shortened from Standard_rotated to fit RAM
# Font: Standard.pf
fonts = (
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # Char 000 (.)
0x7E, 0x81, 0x95, 0xB1, 0xB1, 0x95, 0x81, 0x7E, # Char 001 (.)
0x7E, 0xFF, 0xEB, 0xCF, 0xCF, 0xEB, 0xFF, 0x7E, # Char 002 (.)
0x0E, 0x1F, 0x3F, 0x7E, 0x3F, 0x1F, 0x0E, 0x00, # Ch... | 58.268966 | 63 | 0.617351 |
1efe6490a2180bf4fa387f2890107175b9e586b0 | 1,351 | py | Python | helper/res_ex.py | team172011/ps_cagebot | ab6f7bdbc74ad3baee3feebc4b7b0fa4f726b179 | [
"MIT"
] | null | null | null | helper/res_ex.py | team172011/ps_cagebot | ab6f7bdbc74ad3baee3feebc4b7b0fa4f726b179 | [
"MIT"
] | null | null | null | helper/res_ex.py | team172011/ps_cagebot | ab6f7bdbc74ad3baee3feebc4b7b0fa4f726b179 | [
"MIT"
] | null | null | null | """
Pyhton script for resizing existing images
@author: wimmer simon-justus
@param dir: 1 directory that contains the raw data
@param w: width of file
@param h: height of file
"""
import sys
import os
import cv2
import numpy as np
from time import sleep
# function for resizing existing images
def resize_images(dir,w... | 27.571429 | 84 | 0.606958 |
484bc701fe477e213e50b42304b49b83e8f22d6c | 17,198 | py | Python | scripts/xgboost_classifier.py | PyGeoL/GeoL | 67a5bd2f63091e19041094c14d419055fa5ce6f0 | [
"MIT"
] | 8 | 2018-03-09T16:44:38.000Z | 2021-04-07T11:33:30.000Z | scripts/xgboost_classifier.py | PyGeoL/GeoL | 67a5bd2f63091e19041094c14d419055fa5ce6f0 | [
"MIT"
] | 4 | 2020-03-24T15:34:54.000Z | 2021-06-01T21:54:33.000Z | scripts/xgboost_classifier.py | PyGeoL/GeoL | 67a5bd2f63091e19041094c14d419055fa5ce6f0 | [
"MIT"
] | 1 | 2020-05-13T14:30:55.000Z | 2020-05-13T14:30:55.000Z | """
Script to create word2vec models, given a set of mapped POIs.
"""
# Authors: Gianni Barlacchi <gianni.barlacchi@gmail.com>
# Michele Ferretti <mic.ferretti@gmail.com>
import argparse
import os
import math
import errno
import pandas as pd
import geopandas as gpd
from geopandas import GeoDataFrame
from sha... | 33.721569 | 140 | 0.58815 |
6f87eb77fbc1d283e5287b2e23e237fe220459f7 | 15,879 | py | Python | lale/datasets/data_schemas.py | vishalbelsare/lale | 654ca29ec0234b478d26724a25df28b28f5c0bc0 | [
"Apache-2.0"
] | 265 | 2019-08-06T14:45:43.000Z | 2022-03-30T23:57:48.000Z | lale/datasets/data_schemas.py | vishalbelsare/lale | 654ca29ec0234b478d26724a25df28b28f5c0bc0 | [
"Apache-2.0"
] | 467 | 2019-08-08T02:01:21.000Z | 2022-03-25T16:12:00.000Z | lale/datasets/data_schemas.py | vishalbelsare/lale | 654ca29ec0234b478d26724a25df28b28f5c0bc0 | [
"Apache-2.0"
] | 81 | 2019-08-07T19:59:31.000Z | 2022-03-31T09:11:58.000Z | # Copyright 2019 IBM Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 34.37013 | 205 | 0.648844 |
6feb9a8436d1827f198c673318393283f27c5d04 | 1,610 | py | Python | casts/serializers.py | rocky-roll-call/rrc-backend | 02e8e11c3dab7661e48650e2e861a4a97788a4ce | [
"MIT"
] | null | null | null | casts/serializers.py | rocky-roll-call/rrc-backend | 02e8e11c3dab7661e48650e2e861a4a97788a4ce | [
"MIT"
] | null | null | null | casts/serializers.py | rocky-roll-call/rrc-backend | 02e8e11c3dab7661e48650e2e861a4a97788a4ce | [
"MIT"
] | null | null | null | """
"""
from rest_framework.serializers import ModelSerializer
from events.serializers import EventSerializer
from .models import Cast, CastPhoto, PageSection
class CastSerializer(ModelSerializer):
"""
Serializer for the casts.Cast model
"""
upcoming_events = EventSerializer(many=True, read_only=Tru... | 23.333333 | 68 | 0.524224 |
7376490355ade9945afe24897f2f730ecddf4cad | 3,556 | py | Python | easytrader/ricequant_follower.py | izhangxm/easytrader | b4815c16fe99d43f4c131a7950a178d892c4c8f3 | [
"MIT"
] | 15 | 2018-05-16T02:39:01.000Z | 2021-05-22T13:12:55.000Z | autologin/ricequant_follower.py | pchaos/wanggejiaoyi | 60242d465bf10d4be46ee6eafc99557affc2a52e | [
"MIT"
] | null | null | null | autologin/ricequant_follower.py | pchaos/wanggejiaoyi | 60242d465bf10d4be46ee6eafc99557affc2a52e | [
"MIT"
] | 9 | 2018-05-16T00:47:34.000Z | 2021-11-26T05:39:48.000Z | # coding:utf8
from __future__ import unicode_literals
from datetime import datetime
from threading import Thread
from .follower import BaseFollower
from .log import log
class RiceQuantFollower(BaseFollower):
def login(self, user, password, **kwargs):
from rqopen_client import RQOpenClient
self.c... | 40.873563 | 101 | 0.639483 |
73f39e888b953d9abcef698f11b27405385d9468 | 797 | py | Python | nz_crawl_demo/day2/requests/youdao.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | nz_crawl_demo/day2/requests/youdao.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | nz_crawl_demo/day2/requests/youdao.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | import requests
import json
headers = {
'User-Agent':"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:64.0) Gecko/20100101 Firefox/64.0"
}
url = "http://fanyi.youdao.com/translate?smartresult=dict&smartresult=rule"
#_o要去掉
f = input('请输入要翻译的内容:')
#en zh-CHS AUTO
data = {
"i":f,
"version":"2.1",
"ts":"1583828597... | 22.771429 | 91 | 0.646173 |
fb9ff1dd029299b8da9dcbf6d6b7b19daf046a96 | 138 | py | Python | leetcode/231-Power-of-Two/PowofTwo_003.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/231-Power-of-Two/PowofTwo_003.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/231-Power-of-Two/PowofTwo_003.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution:
# @param {integer} n
# @return {boolean}
def isPowerOfTwo(self, n):
return n > 0 and (n & n - 1 is 0)
| 23 | 41 | 0.550725 |
e3d7b7511698b506cbfd22bdcaca42221de3137a | 609 | py | Python | Source/07_TCP/client.py | rbiotblbk/WBS_T9_2022 | 533156db88ff2fe676564b0e5d6e84e888ab0916 | [
"MIT"
] | 1 | 2022-02-28T09:49:35.000Z | 2022-02-28T09:49:35.000Z | Source/07_TCP/client.py | rbiotblbk/WBS_T9_2022 | 533156db88ff2fe676564b0e5d6e84e888ab0916 | [
"MIT"
] | null | null | null | Source/07_TCP/client.py | rbiotblbk/WBS_T9_2022 | 533156db88ff2fe676564b0e5d6e84e888ab0916 | [
"MIT"
] | null | null | null | import socket
print("Client Side TCP")
print("~" * 30)
# Create Socket
# AF_INET: IPV4
# SOCK_STREAM : TCP
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
ip = "localhost" # from which ip can i receive socket, or receive from all
port = 20000
# 1. Connect with the server
s.connect((ip,port))
try:
w... | 14.853659 | 74 | 0.6289 |
5497384233fe42ca473e8ff237ccc876bfc3345c | 2,839 | py | Python | frappe-bench/apps/erpnext/erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/report/asset_depreciation_ledger/asset_depreciation_ledger.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
def execute(filters=None):
columns, data = get_columns(), get_data(filters)
return columns, data
def get_data(filters):
... | 23.857143 | 95 | 0.653047 |
15100879c003422f43d6a8e73e80e3c5e89eb0b3 | 369 | py | Python | Python-programming-1/alpha_rearrange.py | sanxy/hacktoberfest-1 | 913582b310688d496602e8b1bc9166cb64866e38 | [
"MIT"
] | null | null | null | Python-programming-1/alpha_rearrange.py | sanxy/hacktoberfest-1 | 913582b310688d496602e8b1bc9166cb64866e38 | [
"MIT"
] | null | null | null | Python-programming-1/alpha_rearrange.py | sanxy/hacktoberfest-1 | 913582b310688d496602e8b1bc9166cb64866e38 | [
"MIT"
] | 1 | 2020-09-30T18:53:05.000Z | 2020-09-30T18:53:05.000Z | # Program to Rearrange the Entered Lower Case Alphabets in their Correct Arrangement
a = int(input("Enter Number of Alphabets:-"))
b = []
for i in range(a):
b.append(input(f"Enter {i}th Lower Case Alphabet:-"))
for i in range(a):
b[i] = ord(b[i])
b.sort()
for i in range(a):
b[i] = chr(b[i])
print(... | 28.384615 | 85 | 0.639566 |
421fb309e454892b6d80a271e25dba717d26140d | 8,040 | py | Python | official/cv/posenet/modelarts/train_start.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/posenet/modelarts/train_start.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/posenet/modelarts/train_start.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 50.566038 | 119 | 0.668284 |
42261dc12b7a9989f51b7053daaf95a0d44e1990 | 156 | py | Python | perimeterOfRectangle.py | mrmayurs4/Hacktoberfest-2020 | f2bc129bd8574d5870b9595a019bff3baddeaf73 | [
"MIT"
] | null | null | null | perimeterOfRectangle.py | mrmayurs4/Hacktoberfest-2020 | f2bc129bd8574d5870b9595a019bff3baddeaf73 | [
"MIT"
] | null | null | null | perimeterOfRectangle.py | mrmayurs4/Hacktoberfest-2020 | f2bc129bd8574d5870b9595a019bff3baddeaf73 | [
"MIT"
] | null | null | null | def perimeter(base,height):
return 2*base*height
base = int(input("Enter Base: "))
height = int(input("Enter height "))
print(perimeter(base,height)) | 26 | 37 | 0.698718 |
422f8fc136e2ef189e11a0cd0fa0ce7385751fb6 | 5,886 | py | Python | marsyas-vamp/marsyas/scripts/large-evaluators/make-mf.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/large-evaluators/make-mf.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/large-evaluators/make-mf.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import sys
import numpy
import pylab
PLOT = True
PLOT = False
INCLUDE_05 = False
#INCLUDE_05 = True
def accuracy(bpm_detected, bpm_ground):
tolerance = 0.04
diff = abs(bpm_detected - bpm_ground)
if diff <= tolerance * bpm_ground:
return True
return False
def double_har... | 23.173228 | 79 | 0.583248 |
428d45451783ca43ac3bfe544ab705e36f87eae5 | 2,784 | py | Python | official/cv/lenet_quant/export_bin_file.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | official/cv/lenet_quant/export_bin_file.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/cv/lenet_quant/export_bin_file.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 43.5 | 103 | 0.637931 |
674b9ddc42f1ff3d1c670e0d4aa4a409c115505a | 1,268 | py | Python | huTools/bank.py | gadventures/huTools | 8bc58d63491bcd3cfc3e78d219be703d943ffeb5 | [
"BSD-3-Clause"
] | null | null | null | huTools/bank.py | gadventures/huTools | 8bc58d63491bcd3cfc3e78d219be703d943ffeb5 | [
"BSD-3-Clause"
] | null | null | null | huTools/bank.py | gadventures/huTools | 8bc58d63491bcd3cfc3e78d219be703d943ffeb5 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
"""
bank.py
Created by Christian Klein on 2010-03-25.
Copyright (c) 2010 Christian Klein. All rights reserved.
"""
from __future__ import unicode_literals
from builtins import str
from string import ascii_uppercase
def convert_character(string):
"""Konvertierung von nicht... | 26.978723 | 78 | 0.671136 |
18fe11589d98cbb919f494bc680420c8f37b8e95 | 2,633 | py | Python | jordamach/linear_regression.py | lacriment/Jordamach | a17e22a48e4b3cb66c3f20a6c706b37dcbb56633 | [
"MIT"
] | null | null | null | jordamach/linear_regression.py | lacriment/Jordamach | a17e22a48e4b3cb66c3f20a6c706b37dcbb56633 | [
"MIT"
] | null | null | null | jordamach/linear_regression.py | lacriment/Jordamach | a17e22a48e4b3cb66c3f20a6c706b37dcbb56633 | [
"MIT"
] | null | null | null | from math import log
import numpy as np
class Regrezio:
"""Base class for linear regression models"""
def __init__(self, model='lin'):
# set the regression model
self.model = model.lower()
def fit(self, x, y):
""" Fits values to linear regression model and calculates
... | 36.068493 | 98 | 0.560957 |
7a08c6440ed591af6e4641ecdcbebe66240ceccb | 2,390 | py | Python | build/dart/verify_sources.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | build/dart/verify_sources.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | build/dart/verify_sources.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2.7
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import argparse
import os
import subprocess
import sys
FUCHSIA_ROOT = os.path.dirname( # $root
os.path.dirname( # b... | 33.661972 | 90 | 0.642259 |
e131d650446593c4a718f85066f749a6472c08e6 | 87 | py | Python | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE2/week1/list_fibo.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE2/week1/list_fibo.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE2/week1/list_fibo.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | l = [0,1]
for i in range(1,10+1):
k = l[i] + l[i-1]
l.append(k)
print(l.pop())
| 14.5 | 23 | 0.471264 |
e147d22f9dfa0b16a83fb133ab0d72a670aeecc2 | 235,179 | py | Python | bindings/python/ensmallen/datasets/kgobo.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | null | null | null | bindings/python/ensmallen/datasets/kgobo.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | null | null | null | bindings/python/ensmallen/datasets/kgobo.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | null | null | null | """Module providing graphs available from KGOBO.
References
----------
Please cite:
```bib
@misc{kgobo,
title = "KG-OBO",
year = "2021",
author = "{Reese, Justin and Caufield, Harry}",
howpublished = {\\url{https://github.com/Knowledge-Graph-Hub/kg-obo}},
note = {Online; accessed 14 Sep... | 35.222256 | 96 | 0.661585 |
e1719d8ebd372ec11c0a39ad33fb890f8a55ef58 | 459 | py | Python | src/xrt/targets/steamvr_drv/copy_plugin.py | leviathanch/monado | 36a540a764fd5529018dfceb28e10804db9596bf | [
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 2 | 2021-11-08T05:17:12.000Z | 2022-01-24T12:50:59.000Z | src/xrt/targets/steamvr_drv/copy_plugin.py | SimulaVR/monado | b5d46eebf5f9b7f96a52639484a1b35d8ab3cd21 | [
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | null | null | null | src/xrt/targets/steamvr_drv/copy_plugin.py | SimulaVR/monado | b5d46eebf5f9b7f96a52639484a1b35d8ab3cd21 | [
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2020, Collabora, Ltd.
# SPDX-License-Identifier: BSL-1.0
import os, sys, shutil
# get absolute input and output paths
input_path = os.path.join(
sys.argv[1])
output_path = os.path.join(
sys.argv[2])
# make sure destination directory exists
os.makedirs(os.path.dirname(outp... | 21.857143 | 70 | 0.72549 |
e1916ae94e8c8503838cc7fb1f8cdfc99c775f4d | 233 | py | Python | 2-resources/_PYTHON/code-examples-master/aws/python/rds/list_rds_instances.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_PYTHON/code-examples-master/aws/python/rds/list_rds_instances.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_PYTHON/code-examples-master/aws/python/rds/list_rds_instances.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 1 | 2021-11-05T07:48:26.000Z | 2021-11-05T07:48:26.000Z | import boto3
session = boto3.Session(region_name='eu-west-1', profile_name='test')
rds = session.client('rds')
response = rds.describe_db_instances()
for rds_dbs in response['DBInstances']:
print(rds_dbs['DBInstanceIdentifier'])
| 23.3 | 69 | 0.763948 |
363450b17a5ec7ebe740b2e6f3abee0aae1056f1 | 697 | py | Python | python_reference/useful_scripts/read_csv_to_dict.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:16:23.000Z | 2019-05-10T09:16:23.000Z | python_reference/useful_scripts/read_csv_to_dict.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | null | null | null | python_reference/useful_scripts/read_csv_to_dict.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-10-14T07:30:18.000Z | 2019-10-14T07:30:18.000Z | # Sebastian Raschka, 03/2014
def read_csv(csv_path):
"""
Read a csv file (with a header) into a dictionary
where the dictionary structure will be
{header_col1: [val1_line1, val1_line2, ...], header_col2: [val2_line1, val2_line2, ...], ...}
"""
with open(csv_path, 'r') as in_csv:
h... | 31.681818 | 97 | 0.53802 |
36939b23d5e0aa0155df7912ce8908decc6f5958 | 318 | py | Python | FizzBuzz/Python/fizzbuzz.py | IanDoarn/LearningRepo | 4c5906b3c1f497a979c3fce89a66d1e571cd6b42 | [
"MIT"
] | null | null | null | FizzBuzz/Python/fizzbuzz.py | IanDoarn/LearningRepo | 4c5906b3c1f497a979c3fce89a66d1e571cd6b42 | [
"MIT"
] | null | null | null | FizzBuzz/Python/fizzbuzz.py | IanDoarn/LearningRepo | 4c5906b3c1f497a979c3fce89a66d1e571cd6b42 | [
"MIT"
] | null | null | null | """
FizzBuzz
Written by: Ian Doarn
"""
def fizzbuzz(n):
if n % 3 == 0 and n % 5 == 0:
return 'FizzBuzz'
elif n % 3 == 0:
return 'Fizz'
elif n % 5 == 0:
return 'Buzz'
else:
return str(n)
if __name__ == '__main__':
for n in range(1, 101):
print(fizzbuzz(n)) | 16.736842 | 33 | 0.493711 |
36e34b05ce9277ef98a6d95195bb6e2724b47f33 | 1,997 | py | Python | test/test_npu/test_onnx/torch.onnx/custom_ops_demo/test_custom_ops_addcmul.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_onnx/torch.onnx/custom_ops_demo/test_custom_ops_addcmul.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_onnx/torch.onnx/custom_ops_demo/test_custom_ops_addcmul.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020 Huawei Technologies Co., Ltd
# Copyright (c) 2019, Facebook CORPORATION.
# 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/lice... | 34.431034 | 107 | 0.585378 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.