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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
21c77d5dbc21a2e76cc25360a58f05ff0f35abbd | 8,936 | py | Python | test/smallTests/test_WithoutOGS.py | mcwimm/pyMANGA | 6c7b53087e53b116bb02f91c33974f3dfd9a46de | [
"MIT"
] | 1 | 2021-03-16T08:35:50.000Z | 2021-03-16T08:35:50.000Z | test/smallTests/test_WithoutOGS.py | mcwimm/pyMANGA | 6c7b53087e53b116bb02f91c33974f3dfd9a46de | [
"MIT"
] | 67 | 2019-11-14T11:29:52.000Z | 2022-03-09T14:37:11.000Z | test/smallTests/test_WithoutOGS.py | mcwimm/pyMANGA | 6c7b53087e53b116bb02f91c33974f3dfd9a46de | [
"MIT"
] | 6 | 2019-11-12T11:11:41.000Z | 2021-08-12T13:57:22.000Z | # This script tests pyMANGA using seven setups
# The first test only checks whether the setups can be calculated without
# errors
# The second test compares the calculated results with reference results
import sys
from os import path
import os
sys.path.append(
path.dirname(path.dirname(path.dirname(path.abspath(_... | 37.078838 | 79 | 0.56748 |
1d1d8fb439380425aa5583e73ef78fe6653d2868 | 1,974 | py | Python | src/bo4e/com/tarifpreispositionproort.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/com/tarifpreispositionproort.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/com/tarifpreispositionproort.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | """
Contains TarifpreispositionProOrt class
and corresponding marshmallow schema for de-/serialization
"""
from typing import List
import attr
from marshmallow import fields
from bo4e.com.com import COM, COMSchema
from bo4e.com.tarifpreisstaffelproort import TarifpreisstaffelProOrt, TarifpreisstaffelProOrtSchema
fro... | 34.631579 | 203 | 0.741135 |
d592d46fb1f10de739404ea2afa4efa361c4cd96 | 2,529 | py | Python | mcsf/commands/up.py | beremaran/mcsf | 7651e849b860cf4f0517fa8e4fc4b7a417bbc3a4 | [
"MIT"
] | null | null | null | mcsf/commands/up.py | beremaran/mcsf | 7651e849b860cf4f0517fa8e4fc4b7a417bbc3a4 | [
"MIT"
] | null | null | null | mcsf/commands/up.py | beremaran/mcsf | 7651e849b860cf4f0517fa8e4fc4b7a417bbc3a4 | [
"MIT"
] | null | null | null | import time
import logging
from mcsf.commands.base import Command
from mcsf.services.backup import BackupService
from mcsf.services.json_storage import JsonStorage
from mcsf.services.ssh import SshService
from mcsf.services.vultr import VultrService
class UpCommand(Command):
def __init__(self):
self.json... | 33.72 | 119 | 0.605773 |
98a61ea0ef056a7e141b295b3ae78569040d414d | 768 | py | Python | tournamentmasters/command_tournament_master.py | jorgeparavicini/FourWins | 1c5e8a23b4464ef6b71d70c9ff040aa004b9ca83 | [
"MIT"
] | 1 | 2021-01-20T18:33:01.000Z | 2021-01-20T18:33:01.000Z | tournamentmasters/command_tournament_master.py | jorgeparavicini/FourWins | 1c5e8a23b4464ef6b71d70c9ff040aa004b9ca83 | [
"MIT"
] | null | null | null | tournamentmasters/command_tournament_master.py | jorgeparavicini/FourWins | 1c5e8a23b4464ef6b71d70c9ff040aa004b9ca83 | [
"MIT"
] | 2 | 2019-09-04T08:27:14.000Z | 2019-09-06T20:32:30.000Z | from bots import BaseBot
from tournamentmasters.tournament_master import TournamentMaster
class CommandTournamentMaster(TournamentMaster):
def __init__(self, bot_1: BaseBot, bot_2: BaseBot, grid_width: int, grid_height: int,
time_between_rounds: float = 0):
super(CommandTournamentMaster,... | 33.391304 | 113 | 0.674479 |
7f33f969861ce36707f69e0d676d19ed8854e14c | 1,191 | py | Python | 2-resources/python-data-generation/generate-random-data-into-dynamodb.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/python-data-generation/generate-random-data-into-dynamodb.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/python-data-generation/generate-random-data-into-dynamodb.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | import boto.dynamodb2
from boto.dynamodb2.table import Table
from boto.dynamodb2.fields import HashKey
from boto.regioninfo import RegionInfo
from boto.dynamodb2.layer1 import DynamoDBConnection
from faker import Factory
import uuid
import time
try:
sessions = Table(
table_name='usertable',
schema=... | 25.891304 | 70 | 0.61461 |
7f6acd31318f5c4bfd333a4da43cc8cda74af81a | 237 | py | Python | Python/Exercícios_Python/001_=_deixando_tudo_pronto.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/001_=_deixando_tudo_pronto.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/001_=_deixando_tudo_pronto.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""001 = Deixando tudo pronto
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1GhfZy4Dql6Q-h1khGuR5Uji39RilKx9T
"""
msg = "Olá, Mundo"
print(msg) | 21.545455 | 77 | 0.729958 |
f6ddc6d52a2697c2e00fad3667afa3431dfb6e82 | 6,648 | py | Python | plugins/tff_backend/tff_backend_plugin.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | null | null | null | plugins/tff_backend/tff_backend_plugin.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 178 | 2017-08-02T12:58:06.000Z | 2017-12-20T15:01:12.000Z | plugins/tff_backend/tff_backend_plugin.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 2 | 2018-01-10T10:43:12.000Z | 2018-03-18T10:42:23.000Z | # -*- coding: utf-8 -*-
# Copyright 2017 GIG Technology NV
#
# 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... | 60.436364 | 118 | 0.752858 |
122994747c2a13127ad78bcd1d5fd256224d5531 | 1,815 | py | Python | tests/test_aio_trampoline.py | suned/pfun | 46c460646487abfef897bd9627891f6cf7870774 | [
"MIT"
] | 126 | 2019-09-16T15:28:20.000Z | 2022-03-20T10:57:53.000Z | tests/test_aio_trampoline.py | suned/pfun | 46c460646487abfef897bd9627891f6cf7870774 | [
"MIT"
] | 54 | 2019-09-30T08:44:01.000Z | 2022-03-20T11:10:00.000Z | tests/test_aio_trampoline.py | suned/pfun | 46c460646487abfef897bd9627891f6cf7870774 | [
"MIT"
] | 11 | 2020-01-02T08:32:46.000Z | 2022-03-20T11:10:24.000Z | import pytest
from hypothesis import assume, given
from pfun import compose, identity
from pfun.aio_trampoline import Done
from pfun.hypothesis_strategies import aio_trampolines, anything, unaries
from .monad_test import MonadTest
class TestTrampoline(MonadTest):
@pytest.mark.asyncio
@given(aio_trampolines(... | 33.611111 | 78 | 0.653994 |
d617560fad487fb40c30b78a99e13b3301e8e135 | 1,088 | py | Python | python/coursera_python/MICHIGAN/WEB/week4/asss.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/MICHIGAN/WEB/week4/asss.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/MICHIGAN/WEB/week4/asss.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | # socketTest.py
import socket
mysocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
mysocket.connect(('http://data.pr4e.org/intro-short.txt', 80))
mysocket.send('GET intro-short.txt HTTP/1.0\n')
mysocket.send('Host: www.pythonlearn.com\n\n')
# mysocket.send(b'GET http://www.pythonlearn.com/code/intro-short.txt... | 51.809524 | 620 | 0.748162 |
4eef2b9c8a7122b31e2cf15f614f728388893bc9 | 825 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v7_2/setup_auto_close_settings.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/v7_2/setup_auto_close_settings.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v7_2/setup_auto_close_settings.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.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
def execute():
# update the selling settings and set the close_opportunity_after_days
frappe.reload_doc("selling", "doctype", "selling_... | 45.833333 | 96 | 0.781818 |
4ef11c982f683b48e3440a58f4b6ee74ea937fe7 | 777 | py | Python | Projects/Opencv/read&write&showvideo.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | 1 | 2021-10-06T13:55:02.000Z | 2021-10-06T13:55:02.000Z | Projects/Opencv/read&write&showvideo.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | null | null | null | Projects/Opencv/read&write&showvideo.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | null | null | null | import cv2
cap = cv2.VideoCapture(0)
fourcc = cv2.VideoWriter_fourcc(*'DIVX')
out = cv2.VideoWriter('output.avi',fourcc,20.0,(640,480))
#cap.isOpened()=>will return true value if cammera is linked or file name is correct and false in other case
while cap.isOpened():
ret,frame=cap.read()#ret will store true or fa... | 33.782609 | 145 | 0.657658 |
2148772a2395b86c3dfd7797db93b09c8386122d | 555 | py | Python | BITs/2014/Budashov_A_E/task_3_8.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Budashov_A_E/task_3_8.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Budashov_A_E/task_3_8.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача N3. Вариант 8
#Напишите программу, которая выводит имя "Борис Николаевич Бугаев", и
#запрашивает его псевдоним. Программа должна сцеплять две эти строки и
#выводить полученную строку, разделяя имя и псевдоним с помощью тире.
#Будашов Андрей
#03.03.2016
print("Герой нашей сегодняшней программы-Борис Николаевич ... | 37 | 70 | 0.767568 |
dcd89a646ed4de53ab60c6761471c5a725d4fec5 | 3,793 | py | Python | mltrain-nips-2017/yang_shi/vqa-mxnet-gluon/VQAtrainIter.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:16:23.000Z | 2019-05-10T09:16:23.000Z | mltrain-nips-2017/yang_shi/vqa-mxnet-gluon/VQAtrainIter.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | null | null | null | mltrain-nips-2017/yang_shi/vqa-mxnet-gluon/VQAtrainIter.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-10-14T07:30:18.000Z | 2019-10-14T07:30:18.000Z | import numpy as np
import mxnet as mx
import bisect
class VQAtrainIter(mx.io.DataIter):
def __init__(self, img, sentences, answer, batch_size, buckets=None, invalid_label=-1,
text_name='text', img_name = 'image', label_name='softmax_label', dtype='float32', layout='NTC'):
super(VQAtrainIter... | 41.681319 | 114 | 0.569997 |
b4af6bb9768f39bbf401218d586eb9a4734af7f7 | 258 | py | Python | tests/views/test_planing.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | tests/views/test_planing.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | tests/views/test_planing.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | def test_list(client, seeder, utils):
user_id, admin_unit_id = seeder.setup_base()
seeder.create_event(admin_unit_id)
url = utils.get_url("planing")
utils.get_ok(url)
url = utils.get_url("planing", keyword="name")
utils.get_ok(url)
| 25.8 | 50 | 0.693798 |
2591beb5d300408e2e808c5ab6d8dfbf86491647 | 2,496 | py | Python | quant/markets/market.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 7 | 2017-10-22T15:00:09.000Z | 2019-09-19T11:45:43.000Z | quant/markets/market.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 1 | 2018-01-19T16:19:40.000Z | 2018-01-19T16:19:40.000Z | quant/markets/market.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 5 | 2017-12-11T15:10:29.000Z | 2018-12-21T17:40:58.000Z | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
import logging
import time
from quant import config
class Market(object):
"""
eth_btc
base_currency :btc
quote_currency:eth
"""
def __init__(self, base_currency, market_currency, pair_code, fee_rate):
self._name = None
sel... | 29.023256 | 98 | 0.563702 |
d301a19fa423c4f3d2a1fc176b0c0b012c9f1beb | 1,091 | py | Python | Contrib-Inspur/openbmc/poky/meta-selftest/lib/oeqa/runtime/cases/virgl.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 5 | 2019-11-11T07:57:26.000Z | 2022-03-28T08:26:53.000Z | Contrib-Inspur/openbmc/poky/meta-selftest/lib/oeqa/runtime/cases/virgl.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 3 | 2019-09-05T21:47:07.000Z | 2019-09-17T18:10:45.000Z | Contrib-Inspur/openbmc/poky/meta-selftest/lib/oeqa/runtime/cases/virgl.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 11 | 2019-07-20T00:16:32.000Z | 2022-01-11T14:17:48.000Z | from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.depends import OETestDepends
import subprocess
import oe.lsb
class VirglTest(OERuntimeTestCase):
@OETestDepends(['ssh.SSHTest.test_ssh'])
def test_kernel_driver(self):
status, output = self.target.run('dmesg|grep virgl')
... | 45.458333 | 120 | 0.698442 |
d3743a8aa5f1510dd3f669978d46692e94eb7fc2 | 459 | py | Python | Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/22.01-Binary Search.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/22.01-Binary Search.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/22.01-Binary Search.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | def binary_search(nums, target):
low = 0
high = len(nums) - 1
while low <= high:
mid = low + ((high - low) // 2)
if nums[mid] > target:
high = mid-1
elif nums[mid] < target:
low = mid+1
else:
return mid
return -1
if __name__ == "__mai... | 21.857143 | 39 | 0.501089 |
6ccef462688d16cb92cef21492dc0fd5e4283a78 | 2,602 | py | Python | frappe-bench/env/lib/python2.7/site-packages/gocardless_pro/services/base_service.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/gocardless_pro/services/base_service.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/gocardless_pro/services/base_service.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # WARNING: Do not edit by hand, this file was generated by Crank:
#
# https://github.com/gocardless/crank
#
import re
import time
from requests import Timeout, ConnectionError
from uuid import uuid4
from .. import list_response
from ..api_response import ApiResponse
from ..errors import MalformedResponseError
clas... | 35.162162 | 89 | 0.646042 |
2c6dd4921a2f7275b0427573adcb23e1fc586fda | 3,717 | py | Python | pyScript/custom_src/Node.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | pyScript/custom_src/Node.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | pyScript/custom_src/Node.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | from PySide2.QtGui import QColor
class Node:
def __init__(self):
# general attributes
# static:
self.title = ''
self.type = '' # kind of extends the title with further information, f.ex.: 'function input node'
self.description = ''
self.package = None # 'built i... | 33.790909 | 117 | 0.636535 |
2c98456d30f5b46db435fa071b8c455399af76a6 | 686 | py | Python | diversos/dicionario.py | lcarlin/guppe | a0ee7b85e8687e8fb8243fbb509119a94bc6460f | [
"Apache-2.0"
] | 1 | 2021-12-18T15:29:24.000Z | 2021-12-18T15:29:24.000Z | diversos/dicionario.py | lcarlin/guppe | a0ee7b85e8687e8fb8243fbb509119a94bc6460f | [
"Apache-2.0"
] | null | null | null | diversos/dicionario.py | lcarlin/guppe | a0ee7b85e8687e8fb8243fbb509119a94bc6460f | [
"Apache-2.0"
] | 3 | 2021-08-23T22:45:20.000Z | 2022-02-17T13:17:09.000Z | dicionario_sites = {"Diego": "diegomariano.com"}
print(dicionario_sites['Diego'])
dicionario_sites = {"Diego": "diegomariano.com", "Google": "google.com", "Udemy": "udemy.com", "Luiz Carlin" : "luizcarlin.com.br"}
print ("-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=")
for chave in dicionario_sites:
print (chave + " -... | 32.666667 | 131 | 0.514577 |
e2db99e29e21264d7560a22a15f2efa22bf76450 | 3,167 | py | Python | hardware-check.py | thysia-zosa/hardware-check | fc5803f2fd72559da03914e7e21ff83684fab5a0 | [
"MIT"
] | null | null | null | hardware-check.py | thysia-zosa/hardware-check | fc5803f2fd72559da03914e7e21ff83684fab5a0 | [
"MIT"
] | null | null | null | hardware-check.py | thysia-zosa/hardware-check | fc5803f2fd72559da03914e7e21ff83684fab5a0 | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
#
# Authors: Severin Hasler, Melvin Tas, Jonas Tochtermann
# (c) 2021
from pathlib import Path
from datetime import datetime
import os.path
import requests
import yaml
import json
from pyspectator.processor import Cpu
from crontab import CronTab
import sys
# constants
CONFIG_FILE = 'config.yam... | 30.747573 | 74 | 0.691506 |
1a4cf179953a44432def4819e4265ca455404390 | 148 | py | Python | src/training/tensorflow/convert_tfjs.py | klawr/deepmech | 61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff | [
"MIT"
] | 1 | 2020-04-17T12:27:06.000Z | 2020-04-17T12:27:06.000Z | src/training/tensorflow/convert_tfjs.py | klawr/deepmech | 61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff | [
"MIT"
] | 1 | 2022-02-27T13:13:17.000Z | 2022-02-27T13:13:17.000Z | src/training/tensorflow/convert_tfjs.py | klawr/deepmech | 61de238f1d4b1b867ec1d5f4e4af2a3b25a5abff | [
"MIT"
] | null | null | null | import tensorflowjs as tfjs
import tensorflow as tf
model = tf.keras.models.load_model("model.h5")
tfjs.converters.save_keras_model(model, "tfjs")
| 24.666667 | 47 | 0.797297 |
1a7efb1223893d6f492c200694ea59eb1db5bb6b | 1,315 | py | Python | checks/load_favicons_test.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 19 | 2018-04-20T11:03:41.000Z | 2022-01-12T20:58:56.000Z | checks/load_favicons_test.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 160 | 2018-04-05T16:12:59.000Z | 2022-03-01T13:01:27.000Z | checks/load_favicons_test.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 8 | 2018-11-05T13:07:57.000Z | 2021-06-11T11:46:43.000Z | from pprint import pprint
import httpretty
from httpretty import httprettified
import unittest
from checks import load_favicons
from checks.config import Config
@httprettified
class TestFavicons(unittest.TestCase):
def test_favicons(self):
# This site has a favicon
url1 = 'http://example1.com/fa... | 29.886364 | 83 | 0.49962 |
64ae08055048e7cff7b1c281503df2b7128f782e | 873 | py | Python | quant/example/ex_binance.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 7 | 2017-10-22T15:00:09.000Z | 2019-09-19T11:45:43.000Z | quant/example/ex_binance.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 1 | 2018-01-19T16:19:40.000Z | 2018-01-19T16:19:40.000Z | quant/example/ex_binance.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 5 | 2017-12-11T15:10:29.000Z | 2018-12-21T17:40:58.000Z | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
from __future__ import print_function
from quant.brokers.broker_factory import create_brokers
pair_code = 'Binance_ZRX_ETH'
'''test broker'''
brokers = create_brokers([pair_code])
broker = brokers[pair_code]
'''sell order'''
# amount = 10
# price = 0.0019
# order_id = ... | 22.384615 | 58 | 0.67354 |
37520517ffd89e15b6585bfcd6ef32eb6050138f | 679 | py | Python | backend/tests.py | Marcuse7/openschufa | 6a44ddca9eda0d2fde7103d4ae76d7e1ac3ee40e | [
"MIT"
] | 46 | 2018-05-16T05:52:29.000Z | 2021-12-10T14:52:52.000Z | backend/tests.py | algorithmwatch/2018-openschufa | 6a44ddca9eda0d2fde7103d4ae76d7e1ac3ee40e | [
"MIT"
] | 45 | 2018-05-10T05:56:44.000Z | 2020-09-04T18:41:48.000Z | backend/tests.py | algorithmwatch/2018-openschufa | 6a44ddca9eda0d2fde7103d4ae76d7e1ac3ee40e | [
"MIT"
] | 8 | 2018-05-16T05:38:46.000Z | 2020-06-29T09:00:14.000Z | import json
from io import BytesIO
def test_ping(app):
client = app.test_client()
resp = client.get('/ping')
data = json.loads(resp.data.decode())
assert resp.status_code == 200
assert 'records' in data['message']
assert 'success' in data['status']
def test_add_user(app):
"""Ensure a ne... | 27.16 | 88 | 0.603829 |
b36a7b23a68d0e64fd4259f5d1fad5165833f8b4 | 75 | py | Python | testserver/blueprints/__init__.py | IfengAutomation/AutomationTestServer | b16ad0fae9cd7198a93cf2f3cd68d46fdae2dbdd | [
"Apache-2.0"
] | null | null | null | testserver/blueprints/__init__.py | IfengAutomation/AutomationTestServer | b16ad0fae9cd7198a93cf2f3cd68d46fdae2dbdd | [
"Apache-2.0"
] | null | null | null | testserver/blueprints/__init__.py | IfengAutomation/AutomationTestServer | b16ad0fae9cd7198a93cf2f3cd68d46fdae2dbdd | [
"Apache-2.0"
] | null | null | null | from . import api, casemanager, users
__all__ = [api, casemanager, users]
| 18.75 | 37 | 0.733333 |
ff54c0f94664c3fe7c5610fbab4fb2b28d06536d | 510 | py | Python | src/python/fibonacci.py | allenjzhang/playground | ef32d383d6c1751e204cb77db6658c6ed72624ad | [
"MIT"
] | 1 | 2020-06-10T11:34:59.000Z | 2020-06-10T11:34:59.000Z | src/python/fibonacci.py | allenjzhang/playground | ef32d383d6c1751e204cb77db6658c6ed72624ad | [
"MIT"
] | null | null | null | src/python/fibonacci.py | allenjzhang/playground | ef32d383d6c1751e204cb77db6658c6ed72624ad | [
"MIT"
] | 2 | 2020-05-26T06:39:04.000Z | 2020-11-16T06:34:23.000Z | memMap = {}
def fibonacci (n):
if (n not in memMap):
if n <= 0:
print("Invalid input")
elif n == 1:
memMap[n] = 0
elif n == 2:
memMap[n] = 1
else:
memMap[n] = fibonacci (n-1) + fibonacci (n-2)
return memMap[n]
def fibonacciSlow (n):
if n <= 0:
print("Invalid inpu... | 18.214286 | 51 | 0.527451 |
443a9462413497637a0060c472a67586814d927f | 19,356 | py | Python | tests/onegov/election_day/views/test_views_manage.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/views/test_views_manage.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/views/test_views_manage.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from datetime import date
from lxml.html import document_fromstring
from onegov.ballot import ProporzElection
from onegov.election_day.collections import ArchivedResultCollection
from onegov.election_day.layouts import ElectionLayout
from tests.onegov.election_day.common import login
from tests.onegov.election_day.co... | 34.938628 | 79 | 0.671936 |
2b9926939d5419688aef9a14054cb84c8273ba54 | 2,872 | py | Python | Lab_02/gcd_fsm.py | SadequrRahman/advance-SoC | 35da93adfcdb1b4ec740cb44ffc54d9c8cc7adc4 | [
"BSD-4-Clause-UC"
] | null | null | null | Lab_02/gcd_fsm.py | SadequrRahman/advance-SoC | 35da93adfcdb1b4ec740cb44ffc54d9c8cc7adc4 | [
"BSD-4-Clause-UC"
] | null | null | null | Lab_02/gcd_fsm.py | SadequrRahman/advance-SoC | 35da93adfcdb1b4ec740cb44ffc54d9c8cc7adc4 | [
"BSD-4-Clause-UC"
] | null | null | null | #
# Copyright (C) 2019 Mohammad Sadequr Rahman <mohammad.rahman@tuhh.de>
#
# This file is part of Advance SoC Design Lab Soultion.
#
# SoC Design Lab Soultion can not be copied and/or distributed without the express
# permission of Mohammad Sadequr Rahman
#
# File: gcd_fsm.py
# This is a pymtl gcd gloden algo. imple... | 24.758621 | 82 | 0.405641 |
5b64bc81fb6aabc52e204679478b58d2ab1aab95 | 20,126 | py | Python | dialogs/top_level_dialog.py | Maxwingber/corobot | a959e0deba734d3900d7b8a826b3fb56964db4c6 | [
"MIT"
] | null | null | null | dialogs/top_level_dialog.py | Maxwingber/corobot | a959e0deba734d3900d7b8a826b3fb56964db4c6 | [
"MIT"
] | null | null | null | dialogs/top_level_dialog.py | Maxwingber/corobot | a959e0deba734d3900d7b8a826b3fb56964db4c6 | [
"MIT"
] | 2 | 2020-03-22T11:38:54.000Z | 2020-03-24T11:11:56.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import base64
from datetime import date, time
from botbuilder.core import MessageFactory
from botbuilder.dialogs import (
WaterfallDialog,
DialogTurnResult,
WaterfallStepContext,
ComponentDialog,
ConfirmPr... | 54.690217 | 593 | 0.674898 |
7541d60d211572e9b3ba5a1c8b51f97ba28e9286 | 686 | py | Python | backend/api/migrations/0007_auto_20210930_1352.py | giacomooo/CASFEE_Project2 | 420ff488d6b9deefe6623a45ecfed299f97a4639 | [
"MIT"
] | null | null | null | backend/api/migrations/0007_auto_20210930_1352.py | giacomooo/CASFEE_Project2 | 420ff488d6b9deefe6623a45ecfed299f97a4639 | [
"MIT"
] | null | null | null | backend/api/migrations/0007_auto_20210930_1352.py | giacomooo/CASFEE_Project2 | 420ff488d6b9deefe6623a45ecfed299f97a4639 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.4 on 2021-09-30 11:52
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0006_reservation_iscanceled'),
]
operations = [
migrations.AddField(
model_name='reservation',
name='Amount',... | 26.384615 | 82 | 0.603499 |
3416327fb0f9f3461b62f07b8caef06cd7307131 | 585 | py | Python | python/image_processing/closing.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/image_processing/closing.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/image_processing/closing.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z |
import cv2
import numpy as np
img = cv2.imread('closing.png',0)
kernel = np.ones((5,5),np.uint8)
closing = cv2.morphologyEx(img, cv2.MORPH_CLOSE, kernel)
blackhat = cv2.morphologyEx(img, cv2.MORPH_BLACKHAT, kernel)
gradient = cv2.morphologyEx(img, cv2.MORPH_GRADIENT, kernel)
tophat = cv2.morphologyEx(img, cv2.MORPH_T... | 24.375 | 60 | 0.753846 |
caa3e773801e8aa2ce7d83c2194444a7b7c51d08 | 1,146 | py | Python | exercise00/start.py | tschibu/hslu-ipcv-exercises | 2d42c2fddfecee4f7694ade378cce22a058bc8ec | [
"MIT"
] | 1 | 2020-07-16T06:23:10.000Z | 2020-07-16T06:23:10.000Z | exercise00/start.py | tschibu/hslu-ipcv-exercises | 2d42c2fddfecee4f7694ade378cce22a058bc8ec | [
"MIT"
] | null | null | null | exercise00/start.py | tschibu/hslu-ipcv-exercises | 2d42c2fddfecee4f7694ade378cce22a058bc8ec | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#!/usr/bin/python3
"""
"""
# =============================================================================
# Imports
# =============================================================================
import cv2
import numpy as np
import matplotlib as mpl
from matplotlib import pyplot as plt
# M... | 20.836364 | 79 | 0.608202 |
1ba3d2025d7b7ce0fc0f3a74d63ef0e4894010e3 | 5,592 | py | Python | api/linkCreationHelpers.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | 2 | 2021-03-23T20:32:38.000Z | 2021-04-21T11:20:12.000Z | api/linkCreationHelpers.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | 4 | 2021-04-19T11:00:55.000Z | 2021-04-20T08:21:48.000Z | api/linkCreationHelpers.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Corona-Info-App
#
# © 2020 Tobias Höpp.
# Include utilities
import urllib
import json
from sqlalchemy import or_
import bs4
import visvalingamwyatt as vw
# Include db connection
from main import db, api
# Include models
from models.districts import districts, updateDistrictIncidence, create... | 32.323699 | 207 | 0.54721 |
1bcdd8f54f3556ddf7d2cfe219e933a999018f43 | 762 | py | Python | v602/python/vorbereitung.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 2 | 2019-12-10T10:25:11.000Z | 2021-01-26T13:59:40.000Z | v602/python/vorbereitung.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | null | null | null | v602/python/vorbereitung.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 1 | 2020-12-06T21:24:58.000Z | 2020-12-06T21:24:58.000Z | import numpy as np
import scipy.constants as const
planckh = const.Planck
cspeed = const.speed_of_light
charge = const.elementary_charge
d = 201.4*10**(-12)
ordnung = np.array([29, 29, 30, 32, 35, 37, 38, 40, 41])
ek = np.array([8.048, 8.905, 9.673 ,11.115 ,13.483 ,15.202 ,16.106 ,17.997 ,18.985])
ek = ek * charge * 1... | 27.214286 | 89 | 0.650919 |
ca052855dae94ae49b901206ffa68288e3011ad6 | 300 | py | Python | pacman-arch/test/pacman/tests/upgrade074.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/upgrade074.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/upgrade074.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "pkg2<2.0 dependency (satisfy)"
p = pmpkg("pkg1")
p.depends = ["pkg2<2.0"]
self.addpkg(p)
lp = pmpkg("pkg2", "1.9b-3")
self.addpkg2db("local", lp)
self.args = "-U %s" % p.filename()
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")
self.addrule("PKG_EXIST=pkg2")
| 20 | 50 | 0.67 |
ca4d1cd6ab8853ca002a1ce2d49507b3dfc70323 | 339 | py | Python | exercises/zh/solution_03_09_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/zh/solution_03_09_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/zh/solution_03_09_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | from spacy.lang.zh import Chinese
from spacy.tokens import Token
nlp = Chinese()
# 注册词符的扩展属性"is_country",其默认值是False
Token.set_extension("is_country", default=False)
# 处理文本,将词符"新加坡"的is_country属性设置为True
doc = nlp("我住在新加坡。")
doc[3]._.is_country = True
# 对所有词符打印词符文本及is_country属性
print([(token.text, token._.is_country) ... | 22.6 | 58 | 0.769912 |
ca61afc03fb4605ab810701f6f211d0f3c6ad247 | 92 | py | Python | Python/Courses/Python-Tutorials.Zulkarnine-Mahmud/00.Fundamentals/10.0-Debugging.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Zulkarnine-Mahmud/00.Fundamentals/10.0-Debugging.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Zulkarnine-Mahmud/00.Fundamentals/10.0-Debugging.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | user_name = input("You name: ")
value = 1
new_string = value + user_name
print(new_string)
| 15.333333 | 31 | 0.717391 |
edb8b43d02230e34848138e4aa3e833df697e236 | 19,261 | py | Python | Packs/Imperva_WAF/Integrations/ImpervaWAF/ImpervaWAF.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Imperva_WAF/Integrations/ImpervaWAF/ImpervaWAF.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Imperva_WAF/Integrations/ImpervaWAF/ImpervaWAF.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
''' IMPORTS '''
import json
import requests
import traceback
# Disable insecure warnings
requests.packages.urllib3.disable_warnings()
''' CONSTANTS '''
INTEGRATION_CONTEXT_NAME = 'ImpervaWAF'
class Client(BaseClient... | 41.421505 | 120 | 0.643165 |
6128869bbbd1b6d663dea52577327d9fda3814e7 | 1,300 | py | Python | Python/Buch_ATBS/Teil_2/Kapitel_17_Bildbearbeitung/03_formen_zeichnen/03_formen_zeichnen.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_ATBS/Teil_2/Kapitel_17_Bildbearbeitung/03_formen_zeichnen/03_formen_zeichnen.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_ATBS/Teil_2/Kapitel_17_Bildbearbeitung/03_formen_zeichnen/03_formen_zeichnen.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # 03_formen_zeichnen.py
# In dieser Übung geht es darum Formen zu zeichnen mit der Funktion ImageDraw
from PIL import Image, ImageDraw
import os
os.chdir(os.path.dirname(__file__))
target_file='.\\drawed_image.png'
if os.path.exists(target_file):
os.remove(target_file)
new_image=Image.new('RGBA', (200,200), 'whi... | 36.111111 | 118 | 0.75 |
b65c098c84b052f6ebd8bf731c4ac636571a7bc5 | 9,104 | py | Python | feedcrawler/ombi.py | rix1337/FeedCrawler | 6c104c39f1bd45e5d49c02c90bb8d9fd35f9709e | [
"MIT"
] | 16 | 2021-04-06T07:37:18.000Z | 2022-03-27T15:05:32.000Z | feedcrawler/ombi.py | rix1337/FeedCrawler | 6c104c39f1bd45e5d49c02c90bb8d9fd35f9709e | [
"MIT"
] | 17 | 2021-06-09T10:37:49.000Z | 2022-03-31T07:29:36.000Z | feedcrawler/ombi.py | rix1337/FeedCrawler | 6c104c39f1bd45e5d49c02c90bb8d9fd35f9709e | [
"MIT"
] | 3 | 2021-05-22T13:49:57.000Z | 2022-01-05T11:15:47.000Z | # -*- coding: utf-8 -*-
# FeedCrawler
# Projekt von https://github.com/rix1337
import json
import requests
from imdb import IMDb
import feedcrawler.search.shared.content_all
import feedcrawler.search.shared.content_shows
from feedcrawler import internal
from feedcrawler.common import decode_base64
from feedcrawler.c... | 47.915789 | 119 | 0.426955 |
1ea25f96262b8f3b601a8f5a5914c8a331412ede | 930 | py | Python | Theories/DataStructures/QueueAndStack/StackDFS/BSTInorderTraversal/bst_inorder_traversal.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Theories/DataStructures/QueueAndStack/StackDFS/BSTInorderTraversal/bst_inorder_traversal.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Theories/DataStructures/QueueAndStack/StackDFS/BSTInorderTraversal/bst_inorder_traversal.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | from typing import List
# Definition for a binary tree node.
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
# Recursively
# def inorderTraversal(root: TreeNode) -> List[int]:
# traversal_list = []
#
# def traver... | 24.473684 | 53 | 0.622581 |
1eabcbd4a8bf4fe8a9167df6618cfb21090c2e90 | 136 | py | Python | EC3/Thu.py | CSUpengyuyan/ECExperiment | 4ea41837de421f18884be31248d57e88ea32b84b | [
"MIT"
] | null | null | null | EC3/Thu.py | CSUpengyuyan/ECExperiment | 4ea41837de421f18884be31248d57e88ea32b84b | [
"MIT"
] | null | null | null | EC3/Thu.py | CSUpengyuyan/ECExperiment | 4ea41837de421f18884be31248d57e88ea32b84b | [
"MIT"
] | null | null | null | import thulac
string = open('paper','r',encoding='UTF-8').read()
t = thulac.thulac()
result = t.cut(string)
print(len(result),result)
| 17 | 50 | 0.683824 |
15846da1e5d4bf26623eefb4252273111caff529 | 1,311 | py | Python | verto/processors/CommentPreprocessor.py | uccser/verto | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 4 | 2017-04-10T06:09:54.000Z | 2019-05-04T02:07:40.000Z | verto/processors/CommentPreprocessor.py | uccser/verto | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 268 | 2017-04-03T20:40:46.000Z | 2022-02-04T20:10:08.000Z | verto/processors/CommentPreprocessor.py | uccser/kordac | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 1 | 2019-01-07T15:46:31.000Z | 2019-01-07T15:46:31.000Z | from markdown.preprocessors import Preprocessor
import re
class CommentPreprocessor(Preprocessor):
''' Searches a Document for comments (e.g. {comment example text here})
and removes them from the document.
'''
def __init__(self, ext, *args, **kwargs):
'''
Args:
ext: An in... | 30.488372 | 82 | 0.611747 |
01ea323a6f50daf34073d0b73b233c52d48d26a6 | 295 | py | Python | exercises/en/exc_02_02_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/en/exc_02_02_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/en/exc_02_02_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | from spacy.lang.en import English
nlp = English()
doc = nlp("David Bowie is a PERSON")
# Look up the hash for the string label "PERSON"
person_hash = ____.____.____[____]
print(person_hash)
# Look up the person_hash to get the string
person_string = ____.____.____[____]
print(person_string)
| 22.692308 | 48 | 0.755932 |
01f4a18493bfb22d2c1901b879b8cf20d9f32f0f | 6,792 | py | Python | bridges/east_open_cv_bridge.py | ChristianKitte/Textextraktion-und-Einordnung-mit-Hilfe-neuronaler-Netze | 53d3fc6b1c17f31146741cdebd743f4aa12a09e0 | [
"MIT"
] | null | null | null | bridges/east_open_cv_bridge.py | ChristianKitte/Textextraktion-und-Einordnung-mit-Hilfe-neuronaler-Netze | 53d3fc6b1c17f31146741cdebd743f4aa12a09e0 | [
"MIT"
] | 16 | 2020-01-28T23:04:13.000Z | 2022-03-12T00:02:40.000Z | bridges/east_open_cv_bridge.py | ChristianKitte/Textextraktion-und-Einordnung-mit-Hilfe-neuronaler-Netze | 53d3fc6b1c17f31146741cdebd743f4aa12a09e0 | [
"MIT"
] | null | null | null | """
This file contains source code from another GitHub project. The comments made there apply. The source code
was licensed under the MIT License. The license text and a detailed reference can be found in the license
subfolder at models/east_open_cv/license. Many thanks to the author of the code.
For reasons of c... | 42.716981 | 110 | 0.552415 |
1742d077bb905d8522808434ce28bc222558d79b | 50 | py | Python | src/server/db/__init__.py | ralfstefanbender/Studifix2 | 281c0a89ce56796437fe054068058c0f01a7df02 | [
"RSA-MD"
] | null | null | null | src/server/db/__init__.py | ralfstefanbender/Studifix2 | 281c0a89ce56796437fe054068058c0f01a7df02 | [
"RSA-MD"
] | null | null | null | src/server/db/__init__.py | ralfstefanbender/Studifix2 | 281c0a89ce56796437fe054068058c0f01a7df02 | [
"RSA-MD"
] | null | null | null | print("db package (Mapper) wird initialisiert...") | 50 | 50 | 0.74 |
176fa23117b8291f663bab8e7d082dea0bbac0f6 | 3,287 | py | Python | Chapter7_CNN/Chapter7_3_CNN_Optimization/mnistData.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter7_CNN/Chapter7_3_CNN_Optimization/mnistData.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter7_CNN/Chapter7_3_CNN_Optimization/mnistData.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | from typing import Tuple
import numpy as np
from sklearn.model_selection import train_test_split
from tensorflow.keras.datasets import mnist
from tensorflow.keras.preprocessing.image import ImageDataGenerator
from tensorflow.keras.utils import to_categorical
class MNIST:
def __init__(self, with_normali... | 41.607595 | 89 | 0.639793 |
da0671570ab644de2ce4f71e6570e6da551814ad | 651 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch03_recursion/ex09_pascal_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch03_recursion/ex09_pascal_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch03_recursion/ex09_pascal_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
import pytest
from ch03_recursion.solutions.ex09_pascal_triangle import calc_pascal_with_action
@pytest.mark.parametrize("n, expected",
[(1, [1]),
(2, [1, 1]),
... | 32.55 | 81 | 0.473118 |
e50927dcc0a07e35b56a084b8f3a7711877da2df | 709 | py | Python | user/managers.py | TheKiddos/StaRat | 33807d73276563f636b430e1bbfcb65b645869f7 | [
"MIT"
] | 1 | 2021-05-18T16:33:10.000Z | 2021-05-18T16:33:10.000Z | user/managers.py | TheKiddos/StaRat | 33807d73276563f636b430e1bbfcb65b645869f7 | [
"MIT"
] | 3 | 2021-05-18T16:02:32.000Z | 2021-05-21T15:20:12.000Z | user/managers.py | TheKiddos/StaRat | 33807d73276563f636b430e1bbfcb65b645869f7 | [
"MIT"
] | 1 | 2021-09-12T22:56:09.000Z | 2021-09-12T22:56:09.000Z | from django.contrib.auth.base_user import BaseUserManager
class UserManager(BaseUserManager):
def create_user(self, email, password=None, **kwargs):
"""Creates and saves a new user"""
if not email:
raise ValueError("User must have an email address")
user = self.model(email=se... | 27.269231 | 70 | 0.64598 |
97416b0e9958cd86fc9e9dfc6f8bd4b6ecd45671 | 1,545 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/ch03_recursion/solutions/ex02_digits.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch03_recursion/solutions/ex02_digits.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch03_recursion/solutions/ex02_digits.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
def count_digits(value):
if value < 0:
raise ValueError("value must be >= 0")
# rekursiver Abbruch
if value < 10:
return 1
# rekursiver Abstieg
return count_digits(value // 10) + 1
def count_... | 19.807692 | 53 | 0.673786 |
a9ef68c84e2f76bdbda7bbe30d25d26e26003e2e | 3,932 | py | Python | python/fleetx/dataset/ctr_data_generator.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 170 | 2020-08-12T12:07:01.000Z | 2022-03-07T02:38:26.000Z | python/fleetx/dataset/ctr_data_generator.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 195 | 2020-08-13T03:22:15.000Z | 2022-03-30T07:40:25.000Z | python/fleetx/dataset/ctr_data_generator.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 67 | 2020-08-14T02:07:46.000Z | 2022-03-28T10:05:33.000Z | #!/usr/bin/python
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | 38.930693 | 79 | 0.56943 |
ec56638e34e686b038f1d4f5c918467dd5d6ec30 | 1,654 | py | Python | 7-assets/past-student-repos/_Individual-Projects/Computer-Architecture-Notes-master/lectureII/beejMachine.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 1 | 2021-03-19T19:25:39.000Z | 2021-03-19T19:25:39.000Z | 7-assets/past-student-repos/_Individual-Projects/Computer-Architecture-Notes-master/lectureII/beejMachine.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/_Individual-Projects/Computer-Architecture-Notes-master/lectureII/beejMachine.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | import sys
PRINT_BEEJ = 1
HALT = 2
PRINT_NUM = 3
SAVE = 4
PRINT_REGISTER = 5
ADD = 6
'''
SAVE takes 2 arguments
saves value in [ARG1] to register [ARG2]
'''
register = [0] * 8
memory = [0] * 128 # 128 bytes of RAM
def load_memory(filename):
try:
address = 0
... | 17.784946 | 60 | 0.527207 |
6bde5c3cf5dfee5fc50013e7c4782f365d39d8c6 | 2,917 | py | Python | python/gdal_cookbook/cookbook_geometry/calculate_in_geometry.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/gdal_cookbook/cookbook_geometry/calculate_in_geometry.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/gdal_cookbook/cookbook_geometry/calculate_in_geometry.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | from osgeo import ogr
"""
Calculate Envelope of a Geometry
"""
wkt = "LINESTRING (1181866.263593049 615654.4222507705, 1205917.1207499576 623979.7189589312, 1227192.8790041457 643405.4112779726, 1224880.2965852122 665143.6860159477)"
geom = ogr.CreateGeometryFromWkt(wkt)
# Get Envelope return a tuple (minX, maxX, mi... | 41.671429 | 208 | 0.782996 |
2e1cd67fa9c46a1e222aea71efa3b999151f6255 | 6,514 | py | Python | test/test_npu/test_ne.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_ne.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_ne.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... | 40.459627 | 99 | 0.562327 |
d89d003bb7f2ea99bc1e7bd32b9f2292f5f699ed | 402 | py | Python | Properties/analysis/complexity metrics/complexity/PMSmetrics.py | NazaninBayati/SCA | 74e670462dd0da5e24147aab86df393b38405176 | [
"MIT"
] | null | null | null | Properties/analysis/complexity metrics/complexity/PMSmetrics.py | NazaninBayati/SCA | 74e670462dd0da5e24147aab86df393b38405176 | [
"MIT"
] | null | null | null | Properties/analysis/complexity metrics/complexity/PMSmetrics.py | NazaninBayati/SCA | 74e670462dd0da5e24147aab86df393b38405176 | [
"MIT"
] | null | null | null |
db = open("Project Metrics Summary.txt","r")
db = db.read()
db_st=[]
db_st2=[]
db_st = db.split("\n")
#print(db_st.__len__())
i = 0
db_list=[]
print(db_st[0])
#print(db.split("\n"))
db_temp = db_st[2:db_st.__len__()-1]
db_st=db_temp
#print(db_st)
with open('Project Metrics Summary Report.txt', 'w') as filehandle:
... | 20.1 | 67 | 0.659204 |
d8cc710dba9b48a6f8d274fb7baf7678071cc322 | 2,745 | py | Python | Paddle_Industry_Practice_Sample_Library/nlp_projects/nlu/bilstm_with_crf/model.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | 1 | 2022-01-12T06:52:43.000Z | 2022-01-12T06:52:43.000Z | Paddle_Industry_Practice_Sample_Library/nlp_projects/nlu/bilstm_with_crf/model.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | null | null | null | Paddle_Industry_Practice_Sample_Library/nlp_projects/nlu/bilstm_with_crf/model.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 38.125 | 147 | 0.718033 |
2b71197dcae926c71c551b473549219aad6d1372 | 1,047 | py | Python | Kapitel_1/_E1_int_string_adder.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | 1 | 2020-12-24T15:42:54.000Z | 2020-12-24T15:42:54.000Z | Kapitel_1/_E1_int_string_adder.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | null | null | null | Kapitel_1/_E1_int_string_adder.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | null | null | null | # --- Diese Klasse soll demonstrieren, dass das 'other'-Arguemnt der 'Dunder'-Methods alles sein darf ---#
class IntStringAdder(int):
def __init__(self, number):
self.number = number
def __add__(self, other):
if isinstance(other, str):
try:
x = int(other)
... | 33.774194 | 106 | 0.642789 |
515e4d71ccc6bd2511e5a622dda3504f52bb9362 | 4,902 | py | Python | packages/watchmen-rest-doll/src/watchmen_rest_doll/system/external_writer_router.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest-doll/src/watchmen_rest_doll/system/external_writer_router.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest-doll/src/watchmen_rest_doll/system/external_writer_router.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import List, Optional
from fastapi import APIRouter, Body, Depends
from watchmen_auth import PrincipalService
from watchmen_meta.common import ask_meta_storage, ask_snowflake_generator
from watchmen_meta.system import ExternalWriterService
from watchmen_model.admin import UserRole
from watchmen_model.comm... | 37.136364 | 114 | 0.825989 |
850899eec319e2500a48436535153540cac42d7e | 1,191 | py | Python | exercises/python/data-types/basic/nested-list.py | rogeriosantosf/hacker-rank-profile | d4b9c131524d138c415e5c5de4e38c6b8c35dd77 | [
"MIT"
] | null | null | null | exercises/python/data-types/basic/nested-list.py | rogeriosantosf/hacker-rank-profile | d4b9c131524d138c415e5c5de4e38c6b8c35dd77 | [
"MIT"
] | null | null | null | exercises/python/data-types/basic/nested-list.py | rogeriosantosf/hacker-rank-profile | d4b9c131524d138c415e5c5de4e38c6b8c35dd77 | [
"MIT"
] | null | null | null | # Given the names and grades for each student in a class of students,
# store them in a nested list and print the name(s) of any student(s)
# having the second lowest grade.
# Note: If there are multiple students with the second lowest grade,
# order their names alphabetically and print each name on a new line.
#... | 25.891304 | 71 | 0.641478 |
5ccb76dd9da3cb156598bffc9e3ef0a2861567f8 | 3,544 | py | Python | resources/mechanics_lib/Fulcrum.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | 7 | 2016-01-20T02:33:00.000Z | 2021-02-04T04:06:57.000Z | resources/mechanics_lib/Fulcrum.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | null | null | null | resources/mechanics_lib/Fulcrum.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | 3 | 2016-10-05T07:20:30.000Z | 2017-11-20T10:36:50.000Z | from api.component import Component
class Fulcrum(Component):
def defComponents(self):
# Subcomponents used in this assembly
self.addSubcomponent("stem", "Hinge")
self.addSubcomponent("left", "RectBeam")
self.addSubcomponent("right", "RectBeam")
self.addSubcomponent("t", "TJoint")
def defParam... | 35.79798 | 97 | 0.638544 |
7797ba9b8e78f7c518aa5d04ea99606c72938a01 | 1,146 | py | Python | project/forms/admin_unit_member.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/forms/admin_unit_member.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/forms/admin_unit_member.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | from flask_babelex import lazy_gettext
from flask_wtf import FlaskForm
from wtforms import SubmitField
from wtforms.fields.html5 import EmailField
from wtforms.validators import DataRequired
from project.forms.widgets import MultiCheckboxField
class InviteAdminUnitMemberForm(FlaskForm):
email = EmailField(lazy_g... | 33.705882 | 74 | 0.787958 |
24987bca0ce019f2e50599e070edc7e7f513338a | 240 | py | Python | exercises/ja/exc_03_16_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/ja/exc_03_16_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/ja/exc_03_16_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
nlp = spacy.load("ja_core_news_sm")
text = (
"チックフィレイはジョージア州カレッジパークに本社を置く、"
"チキンサンドを専門とするアメリカのファストフードレストランチェーンです。"
)
# parserを無効化
with ____.____(____):
# テキストを処理する
doc = ____
# docの固有表現を表示
print(____)
| 16 | 42 | 0.691667 |
700381ccb012800fd290fe6f050f23dcad6553fa | 878 | py | Python | gshiw/quotes_web/quotes/adminx.py | superlead/gsw | fc2bb539e3721cc554b4116b553befd653d2ec74 | [
"MIT"
] | null | null | null | gshiw/quotes_web/quotes/adminx.py | superlead/gsw | fc2bb539e3721cc554b4116b553befd653d2ec74 | [
"MIT"
] | null | null | null | gshiw/quotes_web/quotes/adminx.py | superlead/gsw | fc2bb539e3721cc554b4116b553befd653d2ec74 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from quotes_web.adminx import BaseAdmin
import xadmin
from .models import Quotes, Categories, Works, Writers, Speakers, Topics
class QuotesAdmin(BaseAdmin):
exclude = ('owner', 'view_nums', 'dig_nums')
xadmin.site.register(Quotes, QuotesAdmin)
c... | 22.512821 | 72 | 0.741458 |
7026c91c039c9c3b05345c27e403b5cd3b5c3e50 | 1,286 | py | Python | INBa/2015/Mitin_D_S/task_8_15.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Mitin_D_S/task_8_15.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Mitin_D_S/task_8_15.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 8. Вариант 15.
# Доработайте игру "Анаграммы" (см. М.Доусон Программируем на Python. Гл.4) так, чтобы к каждому слову полагалась подсказка.
# Игрок должен получать право на подсказку в том случае, если у него нет никаких предположений.
# Разработайте систему начисления очков, по которой бы игроки, отгадавшие... | 34.756757 | 139 | 0.717729 |
7043ae6313fef14181ab3cef6e00e0df705b57cc | 2,149 | py | Python | utilities/HSV_detection.py | jlittek/Anki-Vector | 1478885955dc142c70d92c6a9e24ef9e8fd5cb18 | [
"MIT"
] | null | null | null | utilities/HSV_detection.py | jlittek/Anki-Vector | 1478885955dc142c70d92c6a9e24ef9e8fd5cb18 | [
"MIT"
] | null | null | null | utilities/HSV_detection.py | jlittek/Anki-Vector | 1478885955dc142c70d92c6a9e24ef9e8fd5cb18 | [
"MIT"
] | null | null | null | from cv2 import cv2
import numpy as np
import anki_vector
from anki_vector.util import distance_mm, speed_mmps, degrees
def empty(a):
pass
robot=anki_vector.Robot()
robot.connect()
robot.camera.init_camera_feed()
robot.behavior.set_lift_height(0.0)
robot.behavior.set_head_angle(degrees(0))
cv2.namedWindow("Tr... | 35.229508 | 111 | 0.674267 |
567805096414549ca01eb464e1dd6912f98739a2 | 267 | py | Python | DataProcess/config.py | zhangupkai/RFID_Script | 9e05fad86e71dc6bd5dd12650d369f13d5a835c8 | [
"MIT"
] | null | null | null | DataProcess/config.py | zhangupkai/RFID_Script | 9e05fad86e71dc6bd5dd12650d369f13d5a835c8 | [
"MIT"
] | null | null | null | DataProcess/config.py | zhangupkai/RFID_Script | 9e05fad86e71dc6bd5dd12650d369f13d5a835c8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
@Project :DataProcess
@File :config.py
@Author :Zhang Qihang
@Date :2021/11/8 13:21
"""
READ_PRINT_FILES_PATH = "../data/read_print"
HOP_FILES_PATH = "../data/hop"
DELTA = 0
REFER_CHANNEL = 923.125
HAMPEL = 8
| 17.8 | 44 | 0.655431 |
569488138911262f4b1392cb7a8e883d673af59a | 312 | py | Python | exercises/es/test_03_14_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/es/test_03_14_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/es/test_03_14_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert (
"patterns = list(nlp.pipe(people))" in __solution__
), "¿Estás usando nlp.pipe envuelto en una lista?"
__msg__.good(
"¡Buen trabajo! Ahora continuemos con un ejemplo práctico que usa nlp.pipe "
"para procesar documentos con metadatos adicionales."
)
| 31.2 | 84 | 0.653846 |
3b0cf254e84996d64feead20ef75a0dde786add0 | 100 | py | Python | py/jpy/ci/appveyor/dump-dlls.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | 210 | 2015-03-19T14:07:16.000Z | 2022-03-31T19:28:13.000Z | py/jpy/ci/appveyor/dump-dlls.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | 943 | 2021-05-10T14:00:02.000Z | 2022-03-31T21:28:15.000Z | py/jpy/ci/appveyor/dump-dlls.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | 40 | 2015-10-17T13:53:41.000Z | 2021-07-18T20:09:11.000Z | import psutil, os
p = psutil.Process(os.getpid())
for dll in p.memory_maps():
print(dll.path)
| 14.285714 | 31 | 0.68 |
8dc1a5cf9af6d9450e0358bd13bcee9c29be28ac | 2,328 | py | Python | storage/baidu_cloud.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | storage/baidu_cloud.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | storage/baidu_cloud.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
bypy,第一次运行时需要授权,只需跑任何一个命令(比如 bypy info)然后跟着说明(登陆等)来授权即可。
授权只需一次,一旦成功,以后不会再出现授权提示.
更详细的了解某一个命令:bypy help <command>
显示在云盘(程序的)根目录下文件列表:bypy list
把当前目录同步到云盘:bypy syncup or bypy upload
把云盘内容同步到本地来:bypy syncdown or bypy downdir /
比较本地当前目录和云盘(程序的)根目录(个人认为非常有用):b... | 32.788732 | 92 | 0.561856 |
c63ad1f80a2cb5614fe8283a636d42a91bd2065a | 612 | py | Python | radiomics/utility.py | RimeT/p3_radio | 3d522a4356c62255cd93c6d74eb388a2e474dd00 | [
"Apache-2.0"
] | null | null | null | radiomics/utility.py | RimeT/p3_radio | 3d522a4356c62255cd93c6d74eb388a2e474dd00 | [
"Apache-2.0"
] | null | null | null | radiomics/utility.py | RimeT/p3_radio | 3d522a4356c62255cd93c6d74eb388a2e474dd00 | [
"Apache-2.0"
] | null | null | null | import logging
def get_logger(log_file=None, name='radiomics_logger'):
logger = logging.getLogger(name)
logger.setLevel(logging.DEBUG)
# stream handler will send message to stdout
formatter = logging.Formatter('%(asctime)s [%(levelname)s] %(message)s', datefmt='%Y-%m-%d %H:%M:%S')
ch = logging.St... | 30.6 | 105 | 0.681373 |
cc45fbee123019327799d384f3210a7383d1d239 | 5,153 | py | Python | 20-hs-redez-sem/groups/05-decentGames/src/DontGetAngry.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-hs-redez-sem/groups/05-decentGames/src/DontGetAngry.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-hs-redez-sem/groups/05-decentGames/src/DontGetAngry.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | import copy
import json
import os
import random
import socket
import sys
import xmlrpc.client
import State
from AbsGame import AbsGame, MY_IP
from DGA import DGA
from Exceptions import FileAlreadyExists
from GameInformation import GameInformation
class DontGetAngry(AbsGame):
is_looping = True
def _sync_log... | 32.408805 | 119 | 0.577334 |
ccc94b51bdd15e2bdac688d0a638f51191e25921 | 85 | py | Python | python/python_backup/PRAC_PYTHON/deb.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/deb.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/deb.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | a=input("enter a no")
if a>0:
print "a is positive"
else:
print "a is negative" | 17 | 23 | 0.635294 |
aed0bbea08182958a4aa6ca4ca13d7c219a63c2c | 310 | py | Python | Problems/Two Pointers/easy/ReverseOnlyLetters/reverse_only_letters.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Problems/Two Pointers/easy/ReverseOnlyLetters/reverse_only_letters.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Problems/Two Pointers/easy/ReverseOnlyLetters/reverse_only_letters.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | def reverseOnlyLetters(s: str) -> str:
s = list(s)
l, r = 0, len(s) - 1
while l < r:
if not s[l].isalpha():
l += 1
elif not s[r].isalpha():
r -= 1
else:
s[l], s[r] = s[r], s[l]
l += 1
r -= 1
return ''.join(s)
| 20.666667 | 38 | 0.354839 |
ee8e723ac890839db5dae21fc3e12e45aceff55c | 117 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-008/ph-8.11-uppercase-lowercase-capitalize.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-008/ph-8.11-uppercase-lowercase-capitalize.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-008/ph-8.11-uppercase-lowercase-capitalize.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | s1 = "Bangladesh"
s_up = s1.upper()
print(s_up)
s_lo = s1.lower()
print(s_lo)
s_cap = s1.capitalize()
print(s_cap)
| 11.7 | 23 | 0.675214 |
4e442ebd5ed6d464aa6b0b32453f08df31ee878b | 1,284 | py | Python | haas_lib_bundles/python/docs/examples/temperature_humidity/haas506/code/gxht30.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/docs/examples/temperature_humidity/haas506/code/gxht30.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/docs/examples/temperature_humidity/haas506/code/gxht30.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | from driver import I2C
class GXHT30(object):
# init i2cDev
def __init__(self,i2cObj):
self.i2cObj=None
if not isinstance(i2cObj,I2C):
raise ValueError("parameter is not an I2C object")
self.i2cObj=i2cObj
# write cmd to register
# commands:0x2c、0x06
def writ... | 29.860465 | 105 | 0.60514 |
14d6c765813b314fef595ce2c9a7fb5f971b579b | 4,879 | py | Python | python/en/archive/dropbox/miscellaneous_python_files/data4models_old_old.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/dropbox/miscellaneous_python_files/data4models_old_old.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/dropbox/miscellaneous_python_files/data4models_old_old.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
data4models.py
# Sentiment Indentification for Roman Urdu
'''
import numpy as np
import pandas as pd
class Data:
# Constructor
def __init__( self, config ):
self.config = config
def split( self, df ):
'''
Sp... | 39.991803 | 97 | 0.562615 |
09a66417b9701135332178e35c8c492d4dbc91c1 | 10,661 | py | Python | research/cv/metric_learn/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/metric_learn/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/metric_learn/train.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... | 47.59375 | 120 | 0.670294 |
09fe26b416f8f39b1bc3594cc62188984305284f | 8,296 | py | Python | test/test_npu/test_network_ops/test_not_equal.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_not_equal.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_not_equal.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 43.434555 | 112 | 0.659595 |
115c2696ff108c7f748acdd64479d1a4247e058f | 501 | py | Python | SQLFileManager.py | whde/Movie | 5d712642242042b0fa2e43f526605def9a6a4343 | [
"MIT"
] | 1 | 2018-12-03T06:08:46.000Z | 2018-12-03T06:08:46.000Z | SQLFileManager.py | whde/Movie | 5d712642242042b0fa2e43f526605def9a6a4343 | [
"MIT"
] | null | null | null | SQLFileManager.py | whde/Movie | 5d712642242042b0fa2e43f526605def9a6a4343 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import threading
mu = threading.Lock()
def create_sql_file():
open('sql.txt', 'w+', encoding='utf-8')
def lock_test(sql):
if mu.acquire(True):
write_to_file(sql)
mu.release()
def write_to_file(sql):
fp = open('sql.txt', 'a+')
print('wri... | 14.735294 | 43 | 0.556886 |
febb379b1fadcfc13939427c562a9743628bb217 | 290 | py | Python | packages/watchmen-auth/src/watchmen_auth/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-auth/src/watchmen_auth/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-auth/src/watchmen_auth/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from .auth_helper import authorize, authorize_token
from .authentication import AuthenticationDetails, AuthenticationManager, AuthenticationProvider, AuthenticationScheme
from .authorization import AuthFailOn401, AuthFailOn403, Authorization
from .principal_service import PrincipalService
| 58 | 118 | 0.889655 |
fedbbb8d9bc97ca7bc07bcf42748c00fe9cb014e | 150 | py | Python | Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/24.zip.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/24.zip.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/24.zip.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | names = ["Navin", "Kiran", "Harsh", "Navin"]
comps = ["Dell", "Apple", "MS", "Dell"]
zipped = zip(names, comps)
for a, b in zipped:
print(a, b)
| 18.75 | 44 | 0.56 |
3a6f4b18547be01116e98140fccd762c654faa91 | 1,881 | py | Python | src/bo4e/com/zeitreihenwert.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/com/zeitreihenwert.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/com/zeitreihenwert.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | """
Contains Zeitreihenwert class
and corresponding marshmallow schema for de-/serialization
"""
from datetime import datetime
import attr
from marshmallow import fields
from bo4e.com.zeitreihenwertkompakt import Zeitreihenwertkompakt, ZeitreihenwertkompaktSchema
from bo4e.validators import check_bis_is_later_than_vo... | 36.882353 | 183 | 0.759702 |
c94972e43abc5815818c8d971961d98908db47f7 | 610 | py | Python | elements/python/11/10/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 11 | 2019-02-08T06:54:34.000Z | 2021-08-07T18:57:39.000Z | elements/python/11/10/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 1 | 2019-05-21T08:14:10.000Z | 2019-05-21T08:14:10.000Z | elements/python/11/10/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | null | null | null | import heapq
import random
class Stack(object):
def __init__(self):
self.h = []
def push(self, x):
heapq.heappush(self.h, (-len(self.h), x))
def pop(self):
if self.empty():
return None
_, x = heapq.heappop(self.h)
return x
def empty(self):
... | 16.052632 | 56 | 0.527869 |
42c69d359bed45586ffb7396c6fd890b5ac2e4f8 | 563 | py | Python | Projekteuler/projecteuler_aufgabe001.py | kilian-funk/Python-Kurs | f5ef5a2fb2a875d2e80d77c1a6c3596a0e577d7f | [
"MIT"
] | null | null | null | Projekteuler/projecteuler_aufgabe001.py | kilian-funk/Python-Kurs | f5ef5a2fb2a875d2e80d77c1a6c3596a0e577d7f | [
"MIT"
] | null | null | null | Projekteuler/projecteuler_aufgabe001.py | kilian-funk/Python-Kurs | f5ef5a2fb2a875d2e80d77c1a6c3596a0e577d7f | [
"MIT"
] | null | null | null | """
Aufgabe 1 aus http://projecteuler.net
(Deutsche Übersetzung auf http://projekteuler.de)
Wenn wir alle natürlichen Zahlen unter 10 auflisten, die Vielfache von 3
oder 5 sind, so erhalten wir 3, 5, 6 und 9. Die Summe dieser Vielfachen ist 23.
Finden Sie die Summe aller Vielfachen von 3 oder 5 unter 1000.
Lösungshi... | 29.631579 | 90 | 0.765542 |
284b349d772a3697a416d1f85c88edc7197debdd | 212 | py | Python | DataStructures/LinkedList/CycleDetection.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | DataStructures/LinkedList/CycleDetection.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | DataStructures/LinkedList/CycleDetection.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | #coding:utf-8
def has_cycle(head):
ptr1 = head
ptr2 = head
while ptr2 and ptr1.next:
ptr1 = ptr1.next.next
ptr2 = ptr2.next
if ptr1 is ptr2:
return 1
return 0
| 17.666667 | 29 | 0.54717 |
288dbe0819f6ab670d4d780c584ed1ac0e60354f | 165 | py | Python | models/spec_analyse.py | zaqwes8811/voicegen | 938e26d9e83c8be9df830698aa5b65cb904dd2eb | [
"Apache-2.0"
] | null | null | null | models/spec_analyse.py | zaqwes8811/voicegen | 938e26d9e83c8be9df830698aa5b65cb904dd2eb | [
"Apache-2.0"
] | null | null | null | models/spec_analyse.py | zaqwes8811/voicegen | 938e26d9e83c8be9df830698aa5b65cb904dd2eb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#-*- coding: utf-8 -*-
import wave as wv
import numpy as np
import matplotlib.pyplot as plt
x = np.arange(0, 5, 0.1);
y = np.sin(x)
plt.plot(x, y) | 20.625 | 31 | 0.648485 |
6c2171b07e9987cfb49540e503dc6107e2ef63fc | 2,466 | py | Python | spo/spo/doctype/medizinischer_bericht/medizinischer_bericht.py | libracore/spo | efff6da53a776c4483f06d9ef1acc8a7aa96b28e | [
"MIT"
] | null | null | null | spo/spo/doctype/medizinischer_bericht/medizinischer_bericht.py | libracore/spo | efff6da53a776c4483f06d9ef1acc8a7aa96b28e | [
"MIT"
] | 6 | 2019-08-23T18:36:26.000Z | 2019-11-12T13:12:12.000Z | spo/spo/doctype/medizinischer_bericht/medizinischer_bericht.py | libracore/spo | efff6da53a776c4483f06d9ef1acc8a7aa96b28e | [
"MIT"
] | 1 | 2021-08-14T22:22:43.000Z | 2021-08-14T22:22:43.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2019, libracore and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from frappe.utils.data import formatdate
class MedizinischerBericht(Document):
pass
# def valida... | 41.1 | 142 | 0.711273 |
9fd9cb4ef25ac783d9cb8e8694587b821db59b4d | 3,371 | py | Python | js/SFLIX/getfilepath.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | js/SFLIX/getfilepath.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | js/SFLIX/getfilepath.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | import os
from shutil import move as moveFile
os.chdir(os.getcwd())
print("".center(50, "="))
print("Update STEFFLIX-Daten".center(50))
print("".center(50, "="))
homeDir = os.getcwd()
allowedFileTypes = ["jpg", "jpeg", "mp4", "mp3", "png"]
diallowedItems = ["System Volume Information", "$RECYCLE.BIN", ".vscode", "s... | 37.455556 | 120 | 0.571344 |
b00f2460e890e6f4a142d1daf4e25740ab790667 | 1,200 | py | Python | Interview Preparation Kits/Interview Preparation Kit/Graphs/DFS: Connected Cell in a Grid/connected_cells.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | 1 | 2021-02-22T17:37:45.000Z | 2021-02-22T17:37:45.000Z | Interview Preparation Kits/Interview Preparation Kit/Graphs/DFS: Connected Cell in a Grid/connected_cells.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Interview Preparation Kits/Interview Preparation Kit/Graphs/DFS: Connected Cell in a Grid/connected_cells.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | #!/bin/python3
import math
import os
import random
import re
import sys
# Complete the maxRegion function below.
def in_graph(grid, i, j):
n = len(grid)
m = len(grid[0])
return i >= 0 and j >= 0 and i < n and j < m
def dfs(grid, visited, i, j):
visited.add((i, j))
ans = 1
neighbors = [(i-1, j... | 21.052632 | 104 | 0.5225 |
b020e29b5069b5c83b3331ecac5504bcdfad3e5a | 465 | py | Python | expect.py | chendong2016/chendong2016.github.io | d120b4aedd8739791432117665bf3c927db183d1 | [
"MIT"
] | null | null | null | expect.py | chendong2016/chendong2016.github.io | d120b4aedd8739791432117665bf3c927db183d1 | [
"MIT"
] | null | null | null | expect.py | chendong2016/chendong2016.github.io | d120b4aedd8739791432117665bf3c927db183d1 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import pexpect
import os
import sys
def git_expect(repodir, u, p):
os.chdir(repodir)
os.system('git pull')
os.system('git add .')
os.system('git commit -m update')
foo = pexpect.spawn('git push')
foo.expect('.*Username.*:')
foo.sendline(u)
foo.expect('.*ssword:*')
... | 18.6 | 41 | 0.615054 |
af00604e8cec5ece69bda0fcc4b6b77604e5f984 | 2,070 | py | Python | Session09_AWSSagemakerAndLargeScaleModelTraining/utils_cifar.py | garima-mahato/TSAI_EMLO1.0 | f1478572a20988296831e70d6cf1dac9b36e7573 | [
"Apache-2.0"
] | null | null | null | Session09_AWSSagemakerAndLargeScaleModelTraining/utils_cifar.py | garima-mahato/TSAI_EMLO1.0 | f1478572a20988296831e70d6cf1dac9b36e7573 | [
"Apache-2.0"
] | null | null | null | Session09_AWSSagemakerAndLargeScaleModelTraining/utils_cifar.py | garima-mahato/TSAI_EMLO1.0 | f1478572a20988296831e70d6cf1dac9b36e7573 | [
"Apache-2.0"
] | null | null | null | import torch
import torchvision
import torchvision.transforms as transforms
import matplotlib.pyplot as plt
import numpy as np
classes = ('beaver','dolphin','otter','seal','whale','aquarium fish','flatfish','ray','shark','trout','orchids','poppies','roses','sunflowers','tulips','bottles','bowls','cans','cups','plates'... | 57.5 | 936 | 0.637681 |
597f409d6d7b0943097111bbce6c5d890bf7b9bd | 2,452 | py | Python | 2-resources/_External-learning-resources/02-pyth/python-patterns-master/patterns/creational/prototype.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_External-learning-resources/02-pyth/python-patterns-master/patterns/creational/prototype.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_External-learning-resources/02-pyth/python-patterns-master/patterns/creational/prototype.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 1 | 2021-11-05T07:48:26.000Z | 2021-11-05T07:48:26.000Z | """
*What is this pattern about?
This patterns aims to reduce the number of classes required by an
application. Instead of relying on subclasses it creates objects by
copying a prototypical instance at run-time.
This is useful as it makes it easier to derive new kinds of objects,
when instances of the class have only ... | 29.902439 | 76 | 0.667618 |
0501d3d1de8e2cc2be8c008390642f57530559f7 | 221 | py | Python | euler-29.py | TFabijo/euler | 58dc07b9adb236890556ccd5d75ca9dbd2b50df9 | [
"MIT"
] | null | null | null | euler-29.py | TFabijo/euler | 58dc07b9adb236890556ccd5d75ca9dbd2b50df9 | [
"MIT"
] | null | null | null | euler-29.py | TFabijo/euler | 58dc07b9adb236890556ccd5d75ca9dbd2b50df9 | [
"MIT"
] | null | null | null | def različne_potence(a_max,b_max):
stevila = set()
for a in range(2,a_max+1):
for b in range(2,b_max+1):
stevila.add(a**b)
return len(stevila)
različne_potence(100,100)
| 22.1 | 35 | 0.565611 |
f951e56906f6675bf3d54a788c7aaed5a54a2c48 | 4,626 | py | Python | yolov5-coreml-tflite-converter/utils/constants.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | yolov5-coreml-tflite-converter/utils/constants.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | yolov5-coreml-tflite-converter/utils/constants.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | import os
# -------------------------------------------------------------------------------------------------------------------- #
# Constants
# -------------------------------------------------------------------------------------------------------------------- #
# General
# - - - - - - - - - - - - - - - - - - - - - -... | 35.584615 | 120 | 0.409641 |
fb11da9cad0274eb51c00948a846ff631a019147 | 3,437 | py | Python | Machine Learning/TensorflowExamples/simple_gradient_descent.py | sarojjethva/Learning-Resources | 17da7dd5e39c28fb1e363b9f0643d624ab047274 | [
"MIT"
] | 639 | 2016-03-17T10:54:05.000Z | 2021-07-22T10:17:36.000Z | Machine Learning/TensorflowExamples/simple_gradient_descent.py | sarojjethva/Learning-Resources | 17da7dd5e39c28fb1e363b9f0643d624ab047274 | [
"MIT"
] | 210 | 2016-03-19T15:18:28.000Z | 2020-10-01T06:36:47.000Z | Machine Learning/TensorflowExamples/simple_gradient_descent.py | sarojjethva/Learning-Resources | 17da7dd5e39c28fb1e363b9f0643d624ab047274 | [
"MIT"
] | 376 | 2016-03-17T10:54:09.000Z | 2021-08-19T18:22:29.000Z | """
Author: Yash Mewada
Github: github.com/yashbmewada
Program for demonstrating simple line fitting using Tensorflow and Gradient Descent Algorithm
This program trains the model to fit two values, slope(m) and x-intercept(b) in the equation
of line y=mx+b. Here we would provide very small dataset of randomly generat... | 40.916667 | 132 | 0.748036 |
34c56272a08186e39af3f77a180a6a2272eff2cb | 6,609 | py | Python | Securinets/2021/Quals/web/Warmup/app.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | Securinets/2021/Quals/web/Warmup/app.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | Securinets/2021/Quals/web/Warmup/app.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | from itsdangerous import Signer, base64_encode, base64_decode
from flask import Flask, request, render_template, make_response, g, Response
from flask.views import MethodView
import urlparse
import shutil
import utils
import os
import mimetypes
app = Flask(__name__.split('.')[0])
app.config.from_object(__name__)
BUF... | 28.734783 | 127 | 0.589045 |
1f5ad0ea434b6b0ee51b3be2fff5dab3afd07d73 | 1,693 | py | Python | src/test/tests/databases/xform_precision.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/databases/xform_precision.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/databases/xform_precision.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: xform_precision.py
#
# Tests: Transform manager's conversion to float
#
# Programmer: Mark C. Miller
# Date: September 24, 2006
#
# Modifications:
#
# Mark C. Miller, Wed Jan 20 07:37... | 19.686047 | 78 | 0.670998 |
2f6244b35b7a2075be7229011d561a8fcff2ef5e | 356 | py | Python | python/decorator/vanishing_ret_fixed.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/decorator/vanishing_ret_fixed.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/decorator/vanishing_ret_fixed.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | def debug_transformer(func):
def wrapper():
print(f'Function `{func.__name__}` called')
ret = func()
print(f'Function `{func.__name__}` finished')
return ret
return wrapper
@debug_transformer
def walkout():
print('Bye Felical')
@debug_transformer
def get_bob():
retur... | 16.181818 | 53 | 0.632022 |
8d0adc4ed9ef5199fe4fc22c9e4224a584dd7c04 | 1,177 | py | Python | tests/test_myst_plugins.py | noirbizarre/pelican-myst | c2c7b44803ebc33e70d915c35b692df14597469b | [
"MIT"
] | null | null | null | tests/test_myst_plugins.py | noirbizarre/pelican-myst | c2c7b44803ebc33e70d915c35b692df14597469b | [
"MIT"
] | 21 | 2021-12-21T16:47:35.000Z | 2022-03-29T04:34:59.000Z | tests/test_myst_plugins.py | noirbizarre/pelican-myst | c2c7b44803ebc33e70d915c35b692df14597469b | [
"MIT"
] | null | null | null | from __future__ import annotations
from typing import Union
import pytest
from .helpers import read_content_metadata
# from pyquery import PyQuery as pq
TASKLIST_EXPECTATIONS: tuple[tuple[Union[dict, list], str], ...] = (
([], "disabled"),
({}, "disabled"),
(["tasklist"], "default"),
({"tasklist":... | 30.179487 | 96 | 0.677995 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.