blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 288 | content_id stringlengths 40 40 | detected_licenses listlengths 0 112 | license_type stringclasses 2
values | repo_name stringlengths 5 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 684
values | visit_date timestamp[us]date 2015-08-06 10:31:46 2023-09-06 10:44:38 | revision_date timestamp[us]date 1970-01-01 02:38:32 2037-05-03 13:00:00 | committer_date timestamp[us]date 1970-01-01 02:38:32 2023-09-06 01:08:06 | github_id int64 4.92k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us]date 2012-06-04 01:52:49 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[us]date 2008-05-22 07:58:19 2023-08-21 12:35:19 ⌀ | gha_language stringclasses 147
values | src_encoding stringclasses 25
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 128 12.7k | extension stringclasses 142
values | content stringlengths 128 8.19k | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
629ad7161947983e30003f917353693a04574f14 | ad1d46b4ec75ef1f00520ff246d0706c6bb7770e | /content/chapters/how-to-browse-sequences/25.py | e0850b41997e10de7e8f2f2fdf52af7e4fd0a553 | [] | no_license | roberto-arista/PythonForDesigners | 036f69bae73095b6f49254255fc473a8ab7ee7bb | 1a781ea7c7ee21e9c64771ba3bf5634ad550692c | refs/heads/master | 2022-02-24T15:28:04.167558 | 2021-09-07T10:37:01 | 2021-09-07T10:37:01 | 168,937,263 | 103 | 37 | null | 2022-02-11T02:24:01 | 2019-02-03T11:17:51 | Python | UTF-8 | Python | false | false | 234 | py | linesAmount = 4
newPage(100, 100)
stroke(0)
for eachLineIndex in range(linesAmount):
# the width() function provides the canvas width in pts
quota = width()/(linesAmount+1)*(eachLineIndex+1)
line((20, quota), (80, quota)) | [
"arista.rob@gmail.com"
] | arista.rob@gmail.com |
4ba530650c4721fb280087ccbc644b3749bde818 | f159aeec3408fe36a9376c50ebb42a9174d89959 | /908.Smallest-Range-I.py | 3508da6f00d256b33a6feb475eb1f2fc769042a6 | [
"MIT"
] | permissive | mickey0524/leetcode | 83b2d11ab226fad5da7198bb37eeedcd8d17635a | fc5b1744af7be93f4dd01d6ad58d2bd12f7ed33f | refs/heads/master | 2023-09-04T00:01:13.138858 | 2023-08-27T07:43:53 | 2023-08-27T07:43:53 | 140,945,128 | 27 | 9 | null | null | null | null | UTF-8 | Python | false | false | 428 | py | # https://leetcode.com/problems/monotonic-array/description/
#
# algorithms
# Easy (65.12%)
# Total Accepted: 2.8k
# Total Submissions: 4.3k
class Solution(object):
def smallestRangeI(self, A, K):
"""
:type A: List[int]
:type K: int
:rtype: int
"""
if len(A) == 1... | [
"buptbh@163.com"
] | buptbh@163.com |
fa3751191ddf11b217c6eb670413a9adf50781c4 | cb61ba31b27b232ebc8c802d7ca40c72bcdfe152 | /leetcode/MaxSubArray/solution.py | bce136e8c8ff078608c00208d22aac159de2eb60 | [
"Apache-2.0"
] | permissive | saisankargochhayat/algo_quest | c7c48187c76b5cd7c2ec3f0557432606e9096241 | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | refs/heads/master | 2021-07-04T15:21:33.606174 | 2021-02-07T23:42:43 | 2021-02-07T23:42:43 | 67,831,927 | 5 | 1 | Apache-2.0 | 2019-10-28T03:51:03 | 2016-09-09T20:51:29 | Python | UTF-8 | Python | false | false | 1,926 | py | # https://leetcode.com/problems/maximum-subarray/
class Solution:
def find_max_subarray(self, A, low, high):
# means only one element present.
if high == low:
return (low, high, A[low])
else:
mid = (low + high) // 2
left_low, left_high, left_sum = self.fin... | [
"saisankargochhayat@gmail.com"
] | saisankargochhayat@gmail.com |
2dd0237030d554f35a13f1533f56214f68389736 | a3d72c9d47a3711ff1a7213da25bacdcb3a7aa32 | /stickerfinder/models/inline_query.py | 230faf23540fc4f4ecebb19740a86738467102a4 | [
"MIT"
] | permissive | crashcoredump/sticker-finder | 225a46c586d1b2b8764cf325e296186cbece5edd | 8158724ebc3e8346012d0ede05a75bb8f9f5f7eb | refs/heads/master | 2020-08-26T23:28:56.991893 | 2019-10-23T22:34:58 | 2019-10-23T22:34:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,059 | py | """The sqlite model for a inline search."""
from sqlalchemy.orm import relationship
from sqlalchemy import (
Column,
func,
ForeignKey,
)
from sqlalchemy.types import (
BigInteger,
DateTime,
String,
)
from stickerfinder.db import base
from stickerfinder.config import config
class InlineQuery(b... | [
"arne@twobeer.de"
] | arne@twobeer.de |
56ff8207e78b231e1fea0c024582ba1d89105dca | 2b86301d5ad3fecaa5a300cabfe6b4dfc82b78ed | /venv/Lib/site-packages/adodbapi/process_connect_string.py | a8dab5a10443ed24537ce76705a9c1de02f5ef71 | [
"MIT",
"LGPL-2.1-only",
"LGPL-2.0-or-later"
] | permissive | sserrot/champion_relationships | 72823bbe73e15973007e032470d7efdf72af3be0 | 91315d6b7f6e7e678d9f8083b4b3e63574e97d2b | refs/heads/master | 2022-12-21T05:15:36.780768 | 2021-12-05T15:19:09 | 2021-12-05T15:19:09 | 71,414,425 | 1 | 2 | MIT | 2022-12-18T07:42:59 | 2016-10-20T01:35:56 | Python | UTF-8 | Python | false | false | 5,376 | py | """ a clumsy attempt at a macro language to let the programmer execute code on the server (ex: determine 64bit)"""
from . import is64bit as is64bit
def macro_call(macro_name, args, kwargs):
""" allow the programmer to perform limited processing on the server by passing macro names and args
:new_key - the key ... | [
"sserrot@users.noreply.github.com"
] | sserrot@users.noreply.github.com |
49e6d7da11e749a220fab3a24a443fe317ea54ab | 6e1ea8d65052f025060453f66819ac446a7592d8 | /archive/neg_190406_3.py | e062dc3d131ae0f2f2565440c8ac7a7146698d5d | [] | no_license | csJd/oj-codes | bc38b79b9227b45d34139c84f9ef1e830f6b996c | 2bd65d0070adc3400ee5bee8d1cf02a038de540b | refs/heads/master | 2022-03-21T20:21:40.153833 | 2019-11-28T13:11:54 | 2019-11-28T13:11:54 | 47,266,594 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,801 | py | """
题目描述:n 个 电池, m 条电线 (电线是单向的!) , 电源连着电池 b, 电源功率为 e
某个电池充满电后通向其的功率会平均分往所连的电池
输入 n 个电池的容量
输出每个电池充满电所需时间
2
6 6 1 2
4 2 4 2 2 20
1 2
1 3
2 4
3 5
4 6
5 6
2 0 2 1
10 10
2.0000 4.0000 6.0000 6.0000 8.0000 17.0000
-1.0000 10.0000
"""
T = int(input())
for case in range(T):
n, m, b, e = map(int, input().split())
rem... | [
"d.vay@qq.com"
] | d.vay@qq.com |
c22785ef3b2a5baca3fdb90c053ddeda973ccced | c8371b410f19dc87059bbe0a28e983c3cfe0f4f8 | /src/etheroll/settings.py | 8e2e0292db8743d6e368ca46c0f468eb6156dac1 | [
"MIT"
] | permissive | homdx/EtherollApp | c70e37cff4fbbde8c605a8ca87776535185a7167 | 4953ce0f10ac58d43517fbc3a18bc5ed43297858 | refs/heads/master | 2020-03-28T19:05:10.591229 | 2018-09-30T21:25:32 | 2018-09-30T21:25:32 | 148,942,827 | 0 | 0 | MIT | 2018-09-15T21:52:51 | 2018-09-15T21:52:51 | null | UTF-8 | Python | false | false | 2,576 | py | from etheroll.store import Store
from etheroll.utils import SubScreen, load_kv_from_py
from pyetheroll.constants import DEFAULT_GAS_PRICE_GWEI, ChainID
load_kv_from_py(__file__)
class SettingsScreen(SubScreen):
"""
Screen for configuring network, gas price...
"""
def __init__(self, **kwargs):
... | [
"andre.miras@gmail.com"
] | andre.miras@gmail.com |
5197c2424a9a662ba7a7350d9247e1a5e7ccc646 | e2d23d749779ed79472a961d2ab529eeffa0b5b0 | /gcloud/commons/template/apps.py | afc2887f420be79a219cef1a5aafb3839402098a | [
"MIT",
"BSD-3-Clause",
"BSL-1.0",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | manlucas/atom | 9fa026b3f914e53cd2d34aecdae580bda09adda7 | 94963fc6fdfd0568473ee68e9d1631f421265359 | refs/heads/master | 2022-09-30T06:19:53.828308 | 2020-01-21T14:08:36 | 2020-01-21T14:08:36 | 235,356,376 | 0 | 0 | NOASSERTION | 2022-09-16T18:17:08 | 2020-01-21T14:04:51 | Python | UTF-8 | Python | false | false | 1,016 | py | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | [
"lucaswang@canway.net"
] | lucaswang@canway.net |
e39396344dfa389cd482fb0f09a82d0ffbd041e9 | 930a868ae9bbf85df151b3f54d04df3a56bcb840 | /benchmark/union_find_decoder/atomic_qubit_model/perfect_measurement/run_experiment.py | 4f1ba3312e3746483f2566fb68d9402c43a492e5 | [
"MIT"
] | permissive | yuewuo/QEC-Playground | 1148f3c5f4035c069986d8b4103acf7f1e34f9d4 | 462208458cdf9dc8a33d4553a560f8a16c00e559 | refs/heads/main | 2023-08-10T13:05:36.617858 | 2023-07-22T23:48:49 | 2023-07-22T23:48:49 | 312,809,760 | 16 | 1 | MIT | 2023-07-22T23:48:51 | 2020-11-14T12:10:38 | Python | UTF-8 | Python | false | false | 3,372 | py | import os, sys
import subprocess, sys
qec_playground_root_dir = subprocess.run("git rev-parse --show-toplevel", cwd=os.path.dirname(os.path.abspath(__file__)), shell=True, check=True, capture_output=True).stdout.decode(sys.stdout.encoding).strip(" \r\n")
rust_dir = os.path.join(qec_playground_root_dir, "backend", "rust... | [
"yue.wu@yale.edu"
] | yue.wu@yale.edu |
be0b75475d921e2b3150d46ad352382e2d5dc7bb | dfc57c864598d8c6cf4a438fdf683722b8bdfa97 | /datastax_cassandra_deploy/utils.py | fcb6c03f5d309032d32f092db183ad5a18d0f545 | [
"Apache-2.0"
] | permissive | ownport/datastax-cassandra-deploy | 9432ee7ffafb50feef066fe493d8876b9da4beb9 | 5eeb24f09ea7ae63f6234c75279f3592b4557400 | refs/heads/master | 2021-06-17T15:41:52.785970 | 2019-06-25T19:34:33 | 2019-06-25T19:34:33 | 191,298,874 | 1 | 0 | Apache-2.0 | 2021-03-25T22:40:53 | 2019-06-11T05:18:14 | Python | UTF-8 | Python | false | false | 1,665 | py |
import json
import yaml
import logging
logger = logging.getLogger(__name__)
def load_deployment(deployments):
''' reused from https://github.com/ansible/ansible/blob/devel/lib/ansible/utils/vars.py
and modified according to DataStax Cassandra deployment requirements
'''
result = {}
if not... | [
"ownport@gmail.com"
] | ownport@gmail.com |
ae95c88713e0cb71918e8f7b95f9960e7bfb1160 | 9a063667fb866fc3be52910e8dab53b73c144e7d | /forecast/auth/views.py | b27f15d7233fb8340c071ad09b54cdd67b27b4c6 | [
"MIT"
] | permissive | lockefox/ProsperForecast | 45634904ce5f51628754dba791c414db23189787 | eccba1ba6e5e2322c20bec65421fb531acdf5f43 | refs/heads/master | 2020-04-07T18:03:21.192557 | 2018-11-30T20:58:54 | 2018-11-30T20:58:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,587 | py | from flask import request, jsonify, Blueprint, current_app as app
from flask_jwt_extended import (
create_access_token,
create_refresh_token,
jwt_required,
jwt_refresh_token_required,
get_jwt_identity,
get_raw_jwt
)
from forecast.models import User
from forecast.extensions import pwd_context, j... | [
"locke.renard@gmail.com"
] | locke.renard@gmail.com |
f3712b6de2d824dba7c3ff61ab63cb05a89d7b24 | 0211c16c9a3785444e5204156adafb53a8d8c93c | /src/spaceone/identity/service/domain_owner_service.py | 01c0bf7823d294377de40e8eb37e3d53e5a2790d | [
"Apache-2.0"
] | permissive | pyengine/identity | b85eed6513225b20db998c01832bc316a1cd4f24 | 4ab9feb3694851fe41b74ecce75c6f5b4f00549f | refs/heads/master | 2022-12-12T04:44:55.472721 | 2020-09-11T02:42:01 | 2020-09-11T02:42:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,233 | py | import logging
from spaceone.core.service import *
from spaceone.identity.manager import DomainManager, DomainOwnerManager
from spaceone.identity.manager.domain_secret_manager import DomainSecretManager
from spaceone.identity.model import Domain
#@authentication_handler
#@authorization_handler
@event_handler
class Do... | [
"whdalsrnt@megazone.com"
] | whdalsrnt@megazone.com |
9892521d3ac95312fdcb0b4127583b854e9f9472 | b000127408f96db7411f301553585f5da0e426cd | /code/Find-Smallest-Letter-Greater-Than-Target.py | 8aee8cd7459327bce3cf3cb8411503c855d7e7b3 | [] | no_license | SaiVK/Leetcode-Archive | 5f758faf97d1ab559c4c75d26ae5cf7a256baef8 | 56bafeaaced2d0fd3b3d2f1a0365d24d5b41e504 | refs/heads/master | 2022-11-23T08:50:17.610247 | 2020-07-27T02:09:53 | 2020-07-27T02:09:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 983 | py | import string
class Solution(object):
def nextGreatestLetter(self, letterList, target):
self.letters = list((string.ascii_lowercase * 3))
self.target = target
self.letterIndex = self.letters.index(target)
def calc_distance(letter):
x = self.letters.index(letter)
... | [
"christopherlambert106@gmail.com"
] | christopherlambert106@gmail.com |
2813003b3862939824725bf3c272bb60edbaa9e8 | c9000e5e30825b29febbefa5ad00da1f57551f8e | /03/zhumeichao/test02.py | 80b502f03b776005dc5eeba1ff236505504d123b | [] | no_license | xiaotian1991/actual-10-homework | 81c58b24f58fc87e4890f1475ad83de8b66ee53b | 0b379ca6189f843f121df4db5814c83262f9981a | refs/heads/master | 2021-06-12T23:35:52.954510 | 2017-03-24T07:41:18 | 2017-03-24T07:41:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,608 | py | #!/usr/bin/env python
#coding=utf-8
#字符串、列表、字典之间的转换
text="who have touched their lives Love begins with a smile grows with a kiss and ends with a tear The brightest future will always be based on a forgotten past you can’t go on well in lifeuntil you let go of your past failures and heartaches"
#字符串切割 --》列表
... | [
"shengxinjing@addnewer.com"
] | shengxinjing@addnewer.com |
64edf9702104dce44c2a1f5a7b4477742e5c33cd | 6b98594c029605806418d187672f476fde5792b7 | /sandbox/rocky/tf/spaces/discrete.py | 13ad009859ccef63e31b6edb60a1316baeaee9ff | [
"MIT",
"LicenseRef-scancode-generic-cla"
] | permissive | russellmendonca/GMPS | 3f65eb250bff008da9beea6b9d1f04aca2d46c6a | 638087160c48f9f016dc74b0904f8ba2503ea285 | refs/heads/master | 2023-01-22T07:53:21.504243 | 2019-10-26T11:23:42 | 2019-10-26T11:23:42 | 178,866,391 | 18 | 8 | NOASSERTION | 2023-01-19T06:42:27 | 2019-04-01T13:12:40 | Python | UTF-8 | Python | false | false | 1,611 | py | from rllab.spaces.base import Space
import numpy as np
from rllab.misc import special
from rllab.misc import ext
import tensorflow as tf
class Discrete(Space):
"""
{0,1,...,n-1}
"""
def __init__(self, n):
self._n = n
@property
def n(self):
return self._n
def sample(self)... | [
"russellm@berkeley.edu"
] | russellm@berkeley.edu |
016c9a80eb3293fe19613d524785afd10481a1bc | 3512a534001e2b4dcc10808fee7d57b9ac9f1f13 | /accounts/views.py | 9907d95a50e352a839fd4a6446ea54056ea407f4 | [] | no_license | suryanshtokas/blog-app | 1adb4521e731ed693d103220c4ec1111c26894a8 | 80784c643e73a67e0bc89ee62e5358b3312a9314 | refs/heads/master | 2022-11-21T01:35:59.437795 | 2020-07-16T14:23:28 | 2020-07-16T14:23:28 | 280,171,745 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 334 | py | from django.shortcuts import render
from django.contrib.auth.forms import UserCreationForm
from django.urls import reverse_lazy
from django.views import generic
class SignUpView(generic.CreateView):
form_class = UserCreationForm
success_url = reverse_lazy('login')
template_name='signup.html'
# Create you... | [
"yourname@email.com"
] | yourname@email.com |
984dfecf51ecb2edfcee1084f4c5a3dcfe5126f0 | 9eb6528606cf9dd011a3ce0c1605b111c9d50955 | /python/6-4super函数使用2.py | 415ba6a7c294f71de06da5708a31d96bf1bab2d8 | [] | no_license | arch123A/luoye | 0ca9f787c7d5e9ba89d2ae602528e68d7d31a636 | ba8e902cefba2c3ccc58bc266cdf9a7eff03a458 | refs/heads/master | 2023-02-02T22:47:00.256065 | 2020-12-13T09:30:33 | 2020-12-13T09:30:33 | 104,022,159 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,788 | py | print("******多继承使用super().__init__ 发生的状态******")
class Parent(object):
def __init__(self, name, *args, **kwargs): # 为避免多继承报错,使用不定长参数,接受参数
print('parent的init开始被调用')
self.name = name
print('parent的init结束被调用')
class Son1(Parent):
def __init__(self, name, age, *args, **kwargs): # 为避免多继... | [
"arch@msn.cn"
] | arch@msn.cn |
88d24b558542bdd433aa64dcd61afba9c7240541 | e836eb7ee910c1ca85233c48eadcd49a52bb20ea | /Fractals/Mandelbrot.py | 6e40f7a3084de57394306c1bc84a6b0b921b5a2c | [] | no_license | SymmetricChaos/MyOtherMathStuff | 5d0c47adfaad0e7fb7f0e8736617f15bbac7ed37 | 9dd6920b44658d2faacb54d7120e83ff7de45bf3 | refs/heads/master | 2021-06-26T18:34:13.178520 | 2021-01-03T14:22:10 | 2021-01-03T14:22:10 | 196,845,677 | 38 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,062 | py | import math
import numpy as np
def mandel(n=30,m=30):
imarr = np.zeros((m*3+1,m*3+1))
r = math.floor(m*1.5)
xr = [x / float(m) -0.75 for x in range(-r,r+1,1)]
yr = [x / float(m) for x in range(-r,r+1,1)]
print(len(xr))
for x in range(m*3+1):
for y in range(m*3+1):
a,b... | [
"ajfraebel@gmail.com"
] | ajfraebel@gmail.com |
9eb39fa7e26c964a1c581ca9bc6c19ae3c5518d4 | 45c170fb0673deece06f3055979ece25c3210380 | /toontown/coghq/CashbotMintControlRoom_Battle00_Cogs.py | 8e2affb201f05aaddb5f6cf4666f6853885ade9a | [] | no_license | MTTPAM/PublicRelease | 5a479f5f696cfe9f2d9dcd96f378b5ce160ec93f | 825f562d5021c65d40115d64523bb850feff6a98 | refs/heads/master | 2021-07-24T09:48:32.607518 | 2018-11-13T03:17:53 | 2018-11-13T03:17:53 | 119,129,731 | 2 | 6 | null | 2018-11-07T22:10:10 | 2018-01-27T03:43:39 | Python | UTF-8 | Python | false | false | 1,048 | py | #Embedded file name: toontown.coghq.CashbotMintControlRoom_Battle00_Cogs
from toontown.coghq.SpecImports import *
from toontown.toonbase import ToontownGlobals
CogParent = 10000
BattleCellId = 0
BattleCells = {BattleCellId: {'parentEntId': CogParent,
'pos': Point3(0, 0, 0)}}
CogData = [{'parentEntId': C... | [
"linktlh@gmail.com"
] | linktlh@gmail.com |
aa8692f6cc8eabdf8af875a4dae6910929b7849a | 534570bbb873293bd2646a1567b63d162fbba13c | /Python/Data Structure/Linear List/Array/K Sum/18.4-sum.py | 5c1d0a6f23af7229aebaed7b762696320f35849d | [] | no_license | XinheLIU/Coding-Interview | fa3df0f7167fb1bc6c8831748249ebaa6f164552 | d6034c567cef252cfafca697aa316c7ad4e7d128 | refs/heads/master | 2022-09-17T14:30:54.371370 | 2022-08-19T15:53:35 | 2022-08-19T15:53:35 | 146,382,499 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,123 | py | #
# @lc app=leetcode id=18 lang=python3
#
# [18] 4Sum
#
# @lc code=start
class Solution:
def fourSum(self, nums: List[int], target: int) -> List[List[int]]:
nums.sort()
res = []
n = len(nums)
for i in range(0, n - 3):
if i and nums[i] == nums[i - 1]:
cont... | [
"LIUXinhe@outlook.com"
] | LIUXinhe@outlook.com |
5b73b192746d5b1228688ae57162a9d58057078d | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2248/60690/275776.py | ca2ee4bb78146b5668b55fdda0acc54a66584f86 | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 131 | py | n=int(input())
a=int(input())
b=int(input())
num=1
while n>0:
if num%a==0 or num%b==0: n-=1
num+=1
print((num-1)%(10**9+7)) | [
"1069583789@qq.com"
] | 1069583789@qq.com |
34ba01a58336d2f71eda9ce17d9bb08ce4174e3f | 1e30de35480b76f5d00229f5d2fd805bf96ccd9a | /ch10_httpd/p5_lab1_config_web_app/webapp.wsgi | e535b4a2a1e06a05abcd8cb604bdf8fc0e354507 | [] | no_license | alexbaltman/RHCE | 4be7987cb1b58c81d870f93b11d5a7a9d52d40c3 | b143daeb2d5d92ebb4e2eb92efd2892dc8ed3bab | refs/heads/master | 2021-01-13T14:50:44.837021 | 2017-02-16T03:51:05 | 2017-02-16T03:51:05 | 76,525,209 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 277 | wsgi | def application(environ, start_response):
status = '200 OK'
output = 'Hello World!\n'
response_headers = [('Content-type', 'text/plain'),
('Content-Length', str(len(output)))]
start_response(status, response_headers)
return [output]
| [
"aaltman@cisco.com"
] | aaltman@cisco.com |
0c428f58dddfce0e8d9c0d84f7a3137bcccc4a8b | 61166d9797ba949be9ad1b805ae840ff8749e64b | /BINARY_SEARCH/binary_search_recursive.py | 5c2a64976a81160344236a62fe27a90c71a91683 | [] | no_license | shubhamrocks888/questions | 216f4f6e8ae6df5a1eb156c2cbf1004b09b1ca88 | 76c98c0e3edccf6552823892058e097b61daa530 | refs/heads/master | 2022-12-16T23:07:07.689312 | 2020-09-14T04:45:12 | 2020-09-14T04:45:12 | 284,040,183 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 395 | py | # RECURSIVE APPROACH:
def binary_search(arr,start,end,n):
mid = (start+end)//2
if start<=end:
if arr[mid]==n:
return "yes"
elif arr[mid]<n:
return binary_search(arr,mid+1,end,n)
else:
return binary_search(arr,start,mid-1,n)
return "no"
... | [
"shubhamrocks888@gmail.com"
] | shubhamrocks888@gmail.com |
7be4818b6c0e6441e0cbd480a64d904766a69b8c | 525a9f62e61c08e73e8dc9a862ac16f1a38c90ee | /guillotina_cms/content/document.py | d292d22d28c9bd5c118bd5020c43434a0ee22d2d | [
"BSD-2-Clause"
] | permissive | plone/guillotina_cms | 3a665e7bb226239d39226212773109e2aca16d88 | 44f945d263e92195a3a004a9bea3c89cb68db298 | refs/heads/master | 2021-06-05T15:14:12.181692 | 2020-11-25T06:42:20 | 2020-11-25T06:42:20 | 96,428,280 | 5 | 2 | NOASSERTION | 2019-11-27T08:02:50 | 2017-07-06T12:34:14 | Python | UTF-8 | Python | false | false | 491 | py | # -*- encoding: utf-8 -*-
from guillotina import configure
from guillotina.content import Folder
from guillotina.directives import index
from guillotina_cms.interfaces import IDocument
@configure.contenttype(
type_name="Document",
schema=IDocument,
behaviors=[
"guillotina.behaviors.dublincore.IDub... | [
"ramon.nb@gmail.com"
] | ramon.nb@gmail.com |
522d2d0a1f3690c89ebea50346950bc9d5bdae9c | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2313/60730/307045.py | 03ebc4ac892099f3b7f6ae0b0fd55ca0e4c16566 | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,168 | py | # coding=utf-8
import queue
class TreeNode(object):
def __init__(self, data=None, left=0, right=0):
self.data = data
if left != 0:
self.left = left
else:
self.left = 0
if right != 0:
self.right = right
else:
self.right = 0
... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
9b5869e02799aa26440534bb61ebed80f49efc52 | 54f352a242a8ad6ff5516703e91da61e08d9a9e6 | /Source Codes/AtCoder/agc025/B/3089839.py | 33a767ce2060231504f7cf243adfe0c97f64ab32 | [] | no_license | Kawser-nerd/CLCDSA | 5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb | aee32551795763b54acb26856ab239370cac4e75 | refs/heads/master | 2022-02-09T11:08:56.588303 | 2022-01-26T18:53:40 | 2022-01-26T18:53:40 | 211,783,197 | 23 | 9 | null | null | null | null | UTF-8 | Python | false | false | 693 | py | N,A,B,K=map(int,input().split())
P=998244353
def egcd(a, b):
(x, lastx) = (0, 1)
(y, lasty) = (1, 0)
while b != 0:
q = a // b
(a, b) = (b, a % b)
(x, lastx) = (lastx - q * x, x)
(y, lasty) = (lasty - q * y, y)
return (lastx, lasty, a)
def inv(x):
return eg... | [
"kwnafi@yahoo.com"
] | kwnafi@yahoo.com |
4b9e9217785da8c7dabeb772d5a56b118350522c | aa0270b351402e421631ebc8b51e528448302fab | /sdk/eventgrid/azure-mgmt-eventgrid/generated_samples/partner_configurations_unauthorize_partner.py | 3d4824a9f378093e0e3631555305ab784c298df3 | [
"MIT",
"LGPL-2.1-or-later",
"LicenseRef-scancode-generic-cla"
] | permissive | fangchen0601/azure-sdk-for-python | d04a22109d0ff8ff209c82e4154b7169b6cb2e53 | c2e11d6682e368b2f062e714490d2de42e1fed36 | refs/heads/master | 2023-05-11T16:53:26.317418 | 2023-05-04T20:02:16 | 2023-05-04T20:02:16 | 300,440,803 | 0 | 0 | MIT | 2020-10-16T18:45:29 | 2020-10-01T22:27:56 | null | UTF-8 | Python | false | false | 1,838 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | [
"noreply@github.com"
] | fangchen0601.noreply@github.com |
44f6ec999e0c559eb303b70a47b8dd21f56f6cb8 | d057cafdb198af93a969c10829f4f28c59fbcd15 | /reborn_web/free/migrations/0002_free_images.py | ddf679d2579ed6b560ebab34463b808d2ca30c1a | [] | no_license | PresentJay/Re-Born-Web | b6b979b965fdc2e442d4e55decc1d6917f8ef0aa | 36521e59829c3b01cc749e20241db277ce027fcd | refs/heads/master | 2021-01-01T13:43:49.803851 | 2020-02-08T15:05:17 | 2020-02-08T15:05:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 436 | py | # Generated by Django 3.0.2 on 2020-01-29 10:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('free', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='free',
name='images',
field=mo... | [
"park19996@naver.com"
] | park19996@naver.com |
439126eba273377bc5ea787c30d09045764a9ec6 | ee8c4c954b7c1711899b6d2527bdb12b5c79c9be | /assessment2/amazon/run/core/controllers/vase.py | fc7802475ede80af2fe9834e372e63427cc31a19 | [] | no_license | sqlconsult/byte | 02ac9899aebea4475614969b594bfe2992ffe29a | 548f6cb5038e927b54adca29caf02c981fdcecfc | refs/heads/master | 2021-01-25T14:45:42.120220 | 2018-08-11T23:45:31 | 2018-08-11T23:45:31 | 117,135,069 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 362 | py | #!/usr/bin/env python3
from flask import Blueprint, Flask, render_template, request, url_for
controller = Blueprint('vase', __name__, url_prefix='/vase')
# @controller.route('/<string:title>', methods=['GET'])
# def lookup(title):
# if title == 'Republic': # TODO 2
# return render_template('republic.ht... | [
"sqlconsult@hotmail.com"
] | sqlconsult@hotmail.com |
5a537e03cd977e2a4724cfe99883c2d5f3f1c0c4 | 87cac4166f07729f1c94066259996c8b752c1202 | /aiobbox/tools/startbox.py | e18beb378195b37e2a8fc3854c14fcedddfff47a | [] | no_license | danielsocials/bbox | 068238a15880468d214109a23017a19e70fc13ec | 292e350b1cefbbab987baf8c946d4021abd211ea | refs/heads/master | 2020-03-16T06:25:47.907369 | 2018-05-08T04:42:45 | 2018-05-08T04:42:45 | 132,554,332 | 0 | 0 | null | 2018-05-08T04:36:35 | 2018-05-08T04:36:35 | null | UTF-8 | Python | false | false | 2,299 | py | import os, sys
import logging
import uuid
import json
import asyncio
import argparse
import aiobbox.server as bbox_server
from aiobbox.cluster import get_box, get_cluster
from aiobbox.cluster import get_ticket
from aiobbox.utils import import_module
from aiobbox.handler import BaseHandler
class Handler(BaseHandler):
... | [
"superisaac.ke@gmail.com"
] | superisaac.ke@gmail.com |
08f74db631409569f43498b9e98548a9ab7a92ac | 62d6a37e1fb1b224b53e14a1cf151ef0571aa20f | /orun/contrib/admin/models/log.py | d3899b5d47850b596221aa5c978c9a89307a0514 | [] | no_license | katrid/orun | 4fa0f291a1ef43f16bc1857a170fc0b2e5e06739 | bfc6dae06182124ba75b1f3761d81ba8ca387dea | refs/heads/master | 2023-08-30T03:58:34.570527 | 2023-08-09T04:05:30 | 2023-08-09T04:05:30 | 66,562,767 | 14 | 4 | null | 2023-01-06T22:29:37 | 2016-08-25T14:01:44 | Python | UTF-8 | Python | false | false | 1,293 | py | from orun.db import models
class LogEntry(models.Model):
"""
Log entries on the internal database logging
"""
user = models.ForeignKey('auth_user', null=False, db_index=True)
action = models.ForeignKey('ui.action') # optional ui action
object_id = models.BigIntegerField()
content_type = m... | [
"alexandre@katrid.com"
] | alexandre@katrid.com |
4efb2692ed3bce696cc2881b9ce2700ab1ab1953 | 61747f324eaa757f3365fd7bf5ddd53ea0db47d1 | /casepro/msgs/migrations/0030_label_tests.py | ecf4d3e3d4410ce80bff7c39c61bfae32aa3f217 | [
"BSD-3-Clause"
] | permissive | BlueRidgeLabs/casepro | f8b0eefa8f961dd2fdb5da26a48b619ebc1f8c12 | 8ef509326f3dfa80bb44beae00b60cc6c4ac7a24 | refs/heads/master | 2022-01-24T09:01:18.881548 | 2017-12-05T18:46:05 | 2017-12-05T18:49:42 | 113,502,588 | 0 | 0 | null | 2017-12-07T21:57:37 | 2017-12-07T21:57:37 | null | UTF-8 | Python | false | false | 1,016 | py | # -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
import json
from casepro.rules.models import ContainsTest, Quantifier
from casepro.utils import parse_csv
from django.db import migrations, models
def populate_label_tests(apps, schema_editor):
Label = apps.get_model('msgs', 'Label'... | [
"rowanseymour@gmail.com"
] | rowanseymour@gmail.com |
89f128b97ed2d3eddc33a16f5476131dc083373e | b95fa99bb1ba2210b73251614d2613363c37f932 | /deploy/anne/top.py | 3f131536072081265b07d93441651fadcbd48744 | [] | no_license | lingxiao/learn-adj-relation | d1a8894fefc776ec0bd414b5f038361ed4b79d16 | dc4285af19e53d7e2d015eb6394f6c601c707da0 | refs/heads/master | 2020-12-30T16:27:51.531268 | 2017-06-07T18:59:48 | 2017-06-07T18:59:48 | 87,714,049 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,532 | py | ############################################################
# Module : get google anne lines that contain words in graph
# split edges and make main-#.py
# Date : April 2nd, 2017
# Author : Xiao Ling
############################################################
import os
import pickle
import shutil
from... | [
"lingxiao@seas.upenn.edu"
] | lingxiao@seas.upenn.edu |
850b4c367e89f11ec61b6ca59130366be349187c | 8f12530968425e36a41e3495aefedece69278364 | /第八章appium使用爬取app/爬取美团店铺名称.py | 2d1c69712a879ebf49cbe9bd5597347e7da9f0be | [] | no_license | q3293183121/hhh | 126ab6f93dec613b0d0bf69595a09ca3c7a4623d | bc72bd6ad69a2bdd1a562466b1d7a8ab29c2aef9 | refs/heads/master | 2020-05-21T16:08:53.380063 | 2019-05-11T09:31:45 | 2019-05-11T09:31:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 923 | py | from appium import webdriver
import time
desired_caps = {}
desired_caps['platformName'] = 'Android'
desired_caps['platformVersion'] = '5.1.1'
desired_caps['deviceName'] = '8934c63a'
desired_caps['appPackage'] = 'com.sankuai.meituan.takeoutnew'
desired_caps['appActivity'] = '.ui.page.boot.WelcomeActivity'
driver = web... | [
"you@example.com"
] | you@example.com |
3b981a9fba01cd273902606da0f933d6922cccc7 | fea44d5ca4e6c9b2c7950234718a4531d453849e | /sktime/forecasting/online_learning/tests/test_online_learning.py | 0d69e830d91f097dbf4c44b2f9e82f9db2795a82 | [
"BSD-3-Clause"
] | permissive | mlgig/sktime | 288069ab8c9b0743113877032dfca8cf1c2db3fb | 19618df351a27b77e3979efc191e53987dbd99ae | refs/heads/master | 2023-03-07T20:22:48.553615 | 2023-02-19T18:09:12 | 2023-02-19T18:09:12 | 234,604,691 | 1 | 0 | BSD-3-Clause | 2020-01-17T17:50:12 | 2020-01-17T17:50:11 | null | UTF-8 | Python | false | false | 3,478 | py | #!/usr/bin/env python3 -u
# -*- coding: utf-8 -*-
# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)
"""Test OnlineEnsembleForecaster."""
__author__ = ["magittan"]
import numpy as np
import pytest
from sklearn.metrics import mean_squared_error
from sktime.datasets import load_airline
from sktime... | [
"noreply@github.com"
] | mlgig.noreply@github.com |
53900eeda350da17ad2b6331007f483e1777455b | c23fe3a934687023b2b93fd4992f0e01ed008a18 | /ckanext/queue/config.py | c2a907abe04817741b17e46e14450915790cf767 | [] | no_license | okfn/ckanext-queue | eb928cfee6d04a69c53ba544c2f0c2c0eddafe5c | c8c55f8c92bce04f060dd573fac2ff10ecd35b44 | refs/heads/master | 2016-09-05T11:49:13.147030 | 2011-03-07T14:52:25 | 2011-03-07T14:52:25 | 2,897,696 | 0 | 0 | null | 2014-09-17T14:51:23 | 2011-12-02T10:15:53 | Python | UTF-8 | Python | false | false | 2,359 | py | import ConfigParser
import os
import logging
import optparse
from urlparse import urlparse
from paste.script.util.logging_config import fileConfig
DEFAULT_SECTION = 'worker'
class attrDict(dict):
def __setattr__(self, item, value):
self[item] = value
def make_optparse(parser=None):
if parser is No... | [
"friedrich@pudo.org"
] | friedrich@pudo.org |
ad356df0eb0e885f01ed9f78a0b2c4534c95b4f3 | c2a7c8c85bfd48be44ee1d1e42871c1be6e28566 | /lib/saq/persistence/__init__.py | 7a353deebf86e4f9b4b3a149557016a3d9f753f4 | [
"Apache-2.0"
] | permissive | iaji/ACE-1 | 3f2b1f51ee03d85883fb804e7c48a545f2bc1e89 | 8c1d96179d252cbbea16384097522d9db4f2aa83 | refs/heads/master | 2022-07-19T19:33:08.493579 | 2020-03-15T20:09:47 | 2020-03-15T20:09:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,414 | py | # vim: sw=4:ts=4:et
#
# Persistence
# Functionality to store data in long term storage external to the system.
#
import functools
import logging
import pickle
import saq
from saq.database import (
Persistence,
PersistenceSource,
execute_with_retry,
get_db_connection,
retry
)
def persistant_pr... | [
"unixfreak0037@gmail.com"
] | unixfreak0037@gmail.com |
51be6a501ac26b5d773bf8b304e3986f6b5d3afd | e2d23d749779ed79472a961d2ab529eeffa0b5b0 | /pipeline/component_framework/component.py | 78c9c838bffb9e79b9aee8600ea2886df757a6c7 | [
"MIT",
"BSD-3-Clause",
"BSL-1.0",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | manlucas/atom | 9fa026b3f914e53cd2d34aecdae580bda09adda7 | 94963fc6fdfd0568473ee68e9d1631f421265359 | refs/heads/master | 2022-09-30T06:19:53.828308 | 2020-01-21T14:08:36 | 2020-01-21T14:08:36 | 235,356,376 | 0 | 0 | NOASSERTION | 2022-09-16T18:17:08 | 2020-01-21T14:04:51 | Python | UTF-8 | Python | false | false | 2,699 | py | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | [
"lucaswang@canway.net"
] | lucaswang@canway.net |
d2fb7dcbe451a07d724df45a7878f626dacd3386 | 64267b1f7ca193b0fab949089b86bc7a60e5b859 | /slehome/account/migrations/0097_auto_20150202_0039.py | 22375ff145f8b8257f860a9b8807a456a1d3db1d | [] | no_license | hongdangodori/slehome | 6a9f2b4526c2783932627b982df0540762570bff | 3e558c78c3943dadf0ec485738a0cc98dea64353 | refs/heads/master | 2021-01-17T12:00:34.221088 | 2015-02-06T13:44:00 | 2015-02-06T13:44:00 | 28,847,585 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 711 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('account', '0096_auto_20150201_2051'),
]
operations = [
migrations.AlterField(
model_name='basicmemberinformation... | [
"chungdangogo@gmail.com"
] | chungdangogo@gmail.com |
52f2f4d3f8ca4356fc81a84b1d54b9beb4ba9fbb | 698069070a63a49e0b29852af71228f88b2596d7 | /digitalocean.py | d33fdee76940229bf4ec6380ccb30de07b1aca50 | [] | no_license | DevOpsHW/DevOps-HW1 | 7f3682c00a49d10ba7a9ee2bee8a547592e25f58 | 2ea59b136b3bdd6e0d94f124e3a5fb76e057209c | refs/heads/master | 2020-04-14T13:19:24.587756 | 2015-09-24T00:26:52 | 2015-09-24T00:26:52 | 42,484,702 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,345 | py | import requests
import json
import os
import time
import sys
class Droplet():
def __init__(self, *args, **kwargs):
if kwargs:
self.id = kwargs['id']
self.name = kwargs['name']
self.ip = kwargs['networks']['v4'][0]['ip_address']
self.status = kwargs['status'... | [
"kgong@ncsu.edu"
] | kgong@ncsu.edu |
c2967c440e90bbd9acfffcffd7a7062990563747 | 4469139b6bb093e2cb6cfca85b74d70836fb8056 | /python-notebook/tests/test_notebook.py | 29aab0dc3cc875e3e312cc854661c5ea641a25ed | [
"MIT"
] | permissive | ucphhpc/nbi-jupyter-docker-stacks | ef30abfa6fcaf606bb75f35ff18526cf1abb416a | f1b5c83efb2df0f2e07c7c7d0199b650a3b33750 | refs/heads/master | 2023-08-31T09:31:18.096582 | 2023-08-25T11:36:12 | 2023-08-25T11:36:12 | 148,879,765 | 6 | 2 | MIT | 2023-03-27T07:08:42 | 2018-09-15T07:25:22 | Jupyter Notebook | UTF-8 | Python | false | false | 1,384 | py | import os
import subprocess
import tempfile
import nbformat
cur_path = os.path.abspath(".")
notebooks_path = os.path.join(cur_path, "notebooks")
kernels = ["python3"]
def _notebook_run(path, kernel="python3", timeout=300):
"""Execute a notebook via nbconvert and collect output.
:returns (parsed nb object, ex... | [
"munk1@live.dk"
] | munk1@live.dk |
9ad6372f1990c0bf87835f2cc9cc0edb20415089 | 0c3757dfd4e0a4b8201bc4d2b040029fd7a62e9c | /listEx.py | b0b0863b44e2139cbd395b2d45d3edbb88c3ea36 | [] | no_license | RubelAhmed57/Python-Bangla | 41074164c7f4a076747a339589f18dc73137414c | cdde682dd97e8081afbd406b00dad7aa5cd038c4 | refs/heads/master | 2021-06-26T15:48:34.674659 | 2017-09-09T15:35:56 | 2017-09-09T15:35:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 389 | py | item = [1, 2,4,3,5,6,7,8]
print(type(item))
item2 = ["A", "C", "B"]
print(item2)
print(" sort function")
resize = list(sorted(item))
print(resize)
print("Reverse function")
re = list(reversed(resize))
print(re)
print(" adding system ")
resize.append(9)
print(resize)
print("Remove system ")
resize.remove(1)
prin... | [
"vubon.roy@gmail.com"
] | vubon.roy@gmail.com |
9aa74c13724d80155c54c651c7793d6ebbb844c1 | 9dba277eeb0d5e9d2ac75e2e17ab5b5eda100612 | /exercises/1901010167/d09/main.py | 6212354875adecd6ba0d9a597876c1306511eabe | [] | no_license | shen-huang/selfteaching-python-camp | e8410bfc06eca24ee2866c5d890fd063e9d4be89 | 459f90c9f09bd3a3df9e776fc64dfd64ac65f976 | refs/heads/master | 2022-05-02T05:39:08.932008 | 2022-03-17T07:56:30 | 2022-03-17T07:56:30 | 201,287,222 | 9 | 6 | null | 2019-08-08T15:34:26 | 2019-08-08T15:34:25 | null | UTF-8 | Python | false | false | 294 | py | from mymodule import stats_word
if __name__ == "__main__":
try:
stats_word.stats_file('D:/Documents/GitHub/selfteaching-python-camp/exercises/1901010167/d09/tang300.json','r',100,0)
except ValueError :
print('输入的为非字符串')
| [
"2470962+srvz@users.noreply.github.com"
] | 2470962+srvz@users.noreply.github.com |
1b10619c4db7046649eca80fc0c3e8be0f29b2ff | a7d6807af3b8b67d0ac93b014d9a688d8d612539 | /graphs/create_adj_list.py | 46891842757d6888c5e7a1a1eb60009541c089d0 | [] | no_license | shehryarbajwa/Algorithms--Datastructures | 06a9f86bedbf40909011365cf169d5c77791b643 | cbd456e0db9ea6a542926015aeee4bd2ceff9ff9 | refs/heads/master | 2023-04-11T21:00:17.438588 | 2021-05-11T23:19:05 | 2021-05-11T23:19:05 | 193,496,161 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 734 | py | def create_adj_list(edges, amount_of_vertices):
graph = [[] for _ in range(amount_of_vertices)]
for u,v in edges:
graph[u].append(v)
graph[v].append(u)
return graph
def create_adj_matrix(edges, amount_of_vertices):
graph = [[None for _ in range(amount_of_vertices)] for _ in range(am... | [
"shehryar.bajwa@gmail.com"
] | shehryar.bajwa@gmail.com |
a0c5fee17f2a900bdabde9b78064baad397e371c | e6f45fba3f8c6b6fba07f51e6cf3ae848e711551 | /center_three/voice_label/voice_quality/test_regex.py | a9a58680a6e3da39099c5c611f31ae81b35feda5 | [] | no_license | yangwen1997/ASR | c0a49de2bcde7fe0a8806d4b7c1d2f2faeda0c70 | 8d8691f74646a1f66573ecbeaf022911f8363b55 | refs/heads/master | 2022-12-07T14:36:20.842942 | 2020-09-08T02:34:31 | 2020-09-08T02:34:31 | 293,677,799 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,503 | py | # !/usr/bin/env Python3
# -*- coding: utf-8 -*-
# @Author : wangchen
# @FILE : run.py
# @Time : 2020/7/13 20:55
# @Software : PyCharm
import os
import sys
sys.path.append(os.environ['PUSHPATH'])
from center_three.voice_label.voice_quality.data_processing_addfunc import Data_Processing
from center_three.voice_... | [
"1120021365@qq.com"
] | 1120021365@qq.com |
faf34fd6b3c2704e4a6a1710e4d5c16d9fafcb1b | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_322/ch73_2019_04_06_21_23_14_306424.py | a879897561f7b920a0c6251106cdf3d6805deb08 | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 195 | py | def remove_vogais(n):
lista = []
vogais = ["a", "e", "i", "o", "u"]
for i in n:
if i not in vogais:
lista.append(i)
lista = "".join(lista)
return lista | [
"you@example.com"
] | you@example.com |
6e1173e136811e0d667fdb4de6e48847d65e0fed | d73409535734a788af83a9b2b2e32dd1b979d5d2 | /proxySTAR_V3/certbot/venv.1509389747.bak/lib/python2.7/site-packages/twine/repository.py | 7aeebcd2feec22f9e35f8ee11a1c85cd6c2ed485 | [
"Apache-2.0",
"MIT"
] | permissive | mami-project/lurk | adff1fb86cb3e478fe1ded4cbafa6a1e0b93bfdd | 98c293251e9b1e9c9a4b02789486c5ddaf46ba3c | refs/heads/master | 2022-11-02T07:28:22.708152 | 2019-08-24T19:28:58 | 2019-08-24T19:28:58 | 88,050,138 | 2 | 2 | NOASSERTION | 2022-10-22T15:46:11 | 2017-04-12T12:38:33 | Python | UTF-8 | Python | false | false | 7,083 | py | # Copyright 2015 Ian Cordasco
#
# 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, sof... | [
"diego.deaguilarcanellas@telefonica.com"
] | diego.deaguilarcanellas@telefonica.com |
902e1d1b428f38fde1ca93edfaae6cde5fc512c6 | 2e7d24351eb91ebf57d2dae23606b20661de6dd3 | /circuitpython/frozen/Adafruit_CircuitPython_BusDevice/adafruit_bus_device/i2c_device.py | d2ee118dc9a7b1c65b700920e096100a65a59646 | [
"MIT"
] | permissive | BitKnitting/wakey_circuitpython | 9978d4a437cf7d9e671a1c9b3e10aa7cb3735df9 | 44da963f7f0422f93513f8b9efcdc6b9b704dc42 | refs/heads/master | 2020-03-21T15:46:18.362833 | 2018-08-31T12:33:07 | 2018-08-31T12:33:07 | 138,731,763 | 3 | 2 | null | 2018-07-03T12:03:54 | 2018-06-26T12:00:44 | Python | UTF-8 | Python | false | false | 4,107 | py | # The MIT License (MIT)
#
# Copyright (c) 2016 Scott Shawcroft for Adafruit Industries
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the ... | [
"farmerrobbie@freshsalad.today"
] | farmerrobbie@freshsalad.today |
f979fef97028dcfc003ffad3e0d58622e1a3d5c9 | 01fcf89c5a4f1c67621e07c99a6092a27e92f34e | /homework_sample_answer/chap11/chap_11_01.py | 235eb1cbd7d84e732fbce991ab71320ba64ae7e5 | [] | no_license | fintalk/study-python | f3d86c06c4e3cdd2fcadf051ed883c78117f339e | 62cb9a9df0493e671b5ccb7fcb14703466fab324 | refs/heads/main | 2023-04-21T01:18:01.356090 | 2021-05-14T03:59:13 | 2021-05-14T03:59:13 | 317,142,313 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,316 | py | # P350 の urillibモジュールの機能を使う、を写経して実行してください
pass
# P351 を 読んでOrderedDictを使う、を写経して実行してください
from collections import OrderedDict
od = OrderedDict()
od["a"] = "A"
od["c"] = "C"
od["b"] = "B"
print(od)
d = {}
d["a"] = "A"
d["c"] = "C"
d["b"] = "B"
print(d)
# od から B を削除して下さい
od.popitem()
print(od)
# OrderedDict の公式ドキュメン... | [
"shinsei.all@gmail.com"
] | shinsei.all@gmail.com |
9c9bcfe777119a1657627881597b927da34239e2 | 24cf6d01fc9485c2e5578523bce6313aab47a30e | /DataLoaders/Flat_DataLoader.py | 8118ed234c95d2e2ce6c7b176ab4bd64ba986bd0 | [] | no_license | sahahn/GenDiagFramework | 352212b2c540a6db73e810e416a9d3d4fa84f95a | 29498d3667d644d5b3a8fd0f0e277cbdd14027ba | refs/heads/master | 2020-04-14T06:10:10.609366 | 2019-06-18T20:22:31 | 2019-06-18T20:22:31 | 163,678,894 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,328 | py | from DataLoaders.IQ_DataLoader import IQ_DataLoader
import os
import numpy as np
def load_map(dr, name, ind):
left = np.load(dr + name + '-lh.npy')[:,:,ind]
right = np.load(dr + name + '-rh.npy')[:,:,ind]
full = np.stack([left, right], axis=-1)
return full
class Flat_DataLoader(IQ_DataLoader... | [
"sahahn@uvm.edu"
] | sahahn@uvm.edu |
81c41286026d665cd68a617771359ef7abdc7b15 | 0bcd3d105e53286a1f9970dfef1d92c2fb67d738 | /tutorial/views.py | 1ee1c6df0dcde5662f94be624ea3851fd672e239 | [] | no_license | billy0402/django-todo-list | b2b9c74f4152d835521cdf9d088a0f79cb10a246 | 0ee51612ea9a91d866055724f4c325de8568b96d | refs/heads/master | 2022-03-20T15:55:03.911331 | 2019-09-28T01:08:39 | 2019-10-05T15:54:04 | 211,426,756 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,158 | py | from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
def root(request):
s = '<h1>Hello World</h1>'
return HttpResponse(s)
def request_test(request):
# http://127.0.0.1:8000/tutorial/request_test/?s1=Hello&s2=World
s1 = request.GET.get('s1')
s2 = requ... | [
"10646003@ntub.edu.tw"
] | 10646003@ntub.edu.tw |
de55d3bb9bde3646fcaf7ebfc3094bcb62b0b6c3 | 2357a471980f925ba58a9045868ec2cc9ad2a7c7 | /1haha.py | 0224529ebfc4ce78344f3e945f1502d88015f02e | [] | no_license | yyyuaaaan/pythonfirst | ec0a63eebf0ec753caf6119ce5c21178868f0135 | 8374e85646b0025be2689e96be2b3cbf6ac15109 | refs/heads/master | 2021-01-10T01:40:49.284641 | 2017-01-12T17:14:58 | 2017-01-12T17:14:58 | 52,094,871 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,858 | py | """
不要在iterate list 的时候改变它的值,会出错,要clone这个list再做操作。
for e1 in L1[:]: #在iterate的时候,拷贝一下list
L1=[1, 2, 3, 4]
L2=[1,2,5,6]
class BinaryTreeNode: # this will not work,python do not suppurt pointer, and recursion
def __init__(self,value=0):
self.value = value
self.left = BinaryTreeNode()
... | [
"yyyuaaaan@gmail.com"
] | yyyuaaaan@gmail.com |
b50ea4f921725dc555649786318d9db6b0221eed | bc9f66258575dd5c8f36f5ad3d9dfdcb3670897d | /lib/surface/vmware/private_clouds/management_dns_zone_bindings/create.py | 0a1b65fdb80eb05ca00517f4a46682fb1e7a6968 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | google-cloud-sdk-unofficial/google-cloud-sdk | 05fbb473d629195f25887fc5bfaa712f2cbc0a24 | 392abf004b16203030e6efd2f0af24db7c8d669e | refs/heads/master | 2023-08-31T05:40:41.317697 | 2023-08-23T18:23:16 | 2023-08-23T18:23:16 | 335,182,594 | 9 | 2 | NOASSERTION | 2022-10-29T20:49:13 | 2021-02-02T05:47:30 | Python | UTF-8 | Python | false | false | 3,829 | py | # -*- coding: utf-8 -*- #
# Copyright 2022 Google LLC. 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 requir... | [
"cloudsdk.mirror@gmail.com"
] | cloudsdk.mirror@gmail.com |
18275199fd9c26d3212b785f9a9f49ab7414ab26 | 79c8b6f17f22dd6b72b7ab228e38539797b3d1e9 | /common/access/shortcuts.py | 146b418bcf109b49d1a4c7e022692711308aac33 | [] | no_license | wd5/system | ac81e76413c620a225fdaff335f5c59f6ebf5bd0 | 26d8453965598e5b28bf2178c5cd01e637ac89b7 | refs/heads/master | 2021-01-17T22:07:50.130502 | 2013-01-22T14:37:08 | 2013-01-22T14:37:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,598 | py | # -*- coding: utf-8 -*-
from django.contrib.auth.models import Group
from guardian.shortcuts import get_groups_with_perms, assign, remove_perm, get_perms_for_model
def check_perm_for_model(perm_name, model):
perms = get_perms_for_model(model)
for perm in perms:
if perm.codename == perm_name:
... | [
"dostovalov@gmail.com"
] | dostovalov@gmail.com |
fc07cc8aa332da4535122a8f44ad78050787f822 | bd5b3934969ebf4f693ceb4be17a68f9c3ebd414 | /beginPython/ch09/queen2.py | 0496019e7f12164f89f9d5fb28ddc7b2fe3a2ec6 | [] | no_license | lyk4411/untitled | bc46863d3bbb2b71edf13947f24b892c2cf43e1a | 875b7dfa765ffa40d76582d2ae41813d2e15c8bd | refs/heads/master | 2021-04-06T09:09:08.977227 | 2021-03-10T02:56:34 | 2021-03-10T02:56:34 | 124,990,530 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,238 | py | def conflict(state,nextx):
'定义冲突函数,state为元组,nextx为下一个皇后的水平位置,nexty为下一个皇后的垂直位置'
nexty = len(state)
for i in range(nexty):
if abs(state[i]-nextx) in (0,nexty-i):#若下一个皇后和前面的皇后列相同或者在一条对角线上,则冲突
return True
return False
def queens(num=8,state=()):
'八皇后问题,这里num表示规模'
for pos in rang... | [
"moneyflying_2006@hotmail.com"
] | moneyflying_2006@hotmail.com |
06f83917b5ba4e8ace83e5b1da0fa8851fcb74f7 | c83473c2f9b63429f40e8a4806ab49305815c81d | /introduction/basic_version_celcius.py | 69e0eb4e50b6eb3724bf74838d7c3f1fd6c76375 | [] | no_license | pelinbalci/machinelearning | f8f84cda07a2ae87f23598188a6c148badb6e15f | 33e9786ea49f114c24c02dbf24e33434d0421f65 | refs/heads/master | 2022-11-15T19:55:46.633659 | 2020-07-05T18:38:54 | 2020-07-05T18:38:54 | 273,779,533 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 670 | py | # https://colab.research.google.com/github/tensorflow/examples/blob/master/courses/udacity_intro_to_tensorflow_for_deep_learning/l02c01_celsius_to_fahrenheit.ipynb
import numpy as np
import tensorflow as tf
celsius_q = np.array([-40, -10, 0, 8, 15, 22, 38], dtype=float)
fahrenheit_a = np.array([-40, 14, 32, 46, ... | [
"balci.pelin@gmail.com"
] | balci.pelin@gmail.com |
7f1db2986a6ad0c55e96979360f37996b7a2233f | b66985c330740d191b009abc46ff042c664eb3f6 | /sporthub/settings.py | 2d3b8bfce760454890cba8a644586e1aac1b09aa | [] | no_license | kalyevb/footbal_pole | fee9fc4e082ca6b7bbb779b52aad69f8c4a3620b | 349b528452369759fa570d36ae3489bfd9609f64 | refs/heads/master | 2022-05-09T13:30:12.493178 | 2019-12-17T15:52:51 | 2019-12-17T15:52:51 | 228,650,159 | 0 | 0 | null | 2022-04-22T22:57:22 | 2019-12-17T15:50:45 | Python | UTF-8 | Python | false | false | 4,303 | py | """
Django settings for sporthub project.
Generated by 'django-admin startproject' using Django 1.11.26.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import ... | [
"tip.beka99@gmail.com"
] | tip.beka99@gmail.com |
1711f9fe6583e0525560bad95419872022ed4f1f | 879e06ea72c26dc4e7647fbd9e6eedb6bd3f0129 | /PKD/ch01/co11p224.py | 1d6d70bc9e80923c0205926e0e8d1f08ee862d04 | [] | no_license | IEP/submissions | 6b27f1ef5518ce7ebc60525b2e2e237c4a6bebec | 235aceee8bc48395b7fea25d00344554b22144f6 | refs/heads/master | 2022-04-15T09:08:48.391941 | 2020-04-05T15:08:16 | 2020-04-05T15:08:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 343 | py | #!/bin/python
a = input()
b = input()
flag = False
o = 'Tentu saja bisa!'
if len(a) == len(b)+1:
b += ' '
for i in range(len(a)):
if not (a[i] == b[i] or a[i] == b[i-1]):
if not flag:
flag = True
else:
o = 'Wah, tidak bisa :('
else:
o = 'Wah, t... | [
"ivan.ega.p@gmail.com"
] | ivan.ega.p@gmail.com |
643c167da61137f80baf505c741c81ef55235688 | 91075a58261b9858b6bba98968eca7f486175891 | /62_quickWeather.py | 1fa7bdcf712264adf01301da1841571191232f76 | [] | no_license | bingo8670/automat_the_boring_stuff_with_python | 4b144cfd58dd25ffd57bab205719d13c103320e3 | 493da9438ae7053d6140b67c53fcba95fe3deb18 | refs/heads/master | 2020-03-25T23:57:54.305785 | 2018-12-14T09:07:21 | 2018-12-14T09:07:21 | 144,301,078 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 946 | py | #! python3
# quickWeather.py - Prints the weather for a location from the command line.
import json, requests, sys
# Compute location from command line arguments.
if len(sys.argv) < 2:
print('Usage: quickWeather.py location')
sys.exit()
location = ' '.join(sys.argv[1:])
# Download the JSON data from OpenWeath... | [
"307286130@qq.com"
] | 307286130@qq.com |
796c928dadf5c6278d15c714e6bd6781ff12818f | 81c8baf31e15cf132b22cc489e7c8fc7b86003a4 | /linuxos/context_processors.py | 4ffb841705a623f5e4eac674d4a08e6f88c10080 | [
"MIT"
] | permissive | LinuxOSsk/Shakal-NG | 0b0030af95a8dad4b120ae076920aa3a4020c125 | 93631496637cd3847c1f4afd91a9881cafb0ad83 | refs/heads/master | 2023-09-04T04:27:05.481496 | 2023-08-30T04:10:41 | 2023-08-30T04:10:41 | 2,168,932 | 11 | 8 | MIT | 2023-08-16T03:34:02 | 2011-08-07T14:36:25 | Python | UTF-8 | Python | false | false | 280 | py | # -*- coding: utf-8 -*-
from django.conf import settings as django_settings
def settings(request):
return {
'ANONYMOUS_COMMENTS': django_settings.ANONYMOUS_COMMENTS,
'ANONYMOUS_NEWS': django_settings.ANONYMOUS_NEWS,
'ANONYMOUS_TOPIC': django_settings.ANONYMOUS_TOPIC,
}
| [
"miroslav.bendik@gmail.com"
] | miroslav.bendik@gmail.com |
5348f68bdd375eb497ae98d8ed944d330932b35f | 597ed154876611a3d65ca346574f4696259d6e27 | /dbaas/account/forms/user.py | 05ce9c8dfc4d9ad444b5f31238c03b90d4befc9e | [] | permissive | soitun/database-as-a-service | 41984d6d2177734b57d726cd3cca7cf0d8c5f5d6 | 1282a46a9437ba6d47c467f315b5b6a3ac0af4fa | refs/heads/master | 2023-06-24T17:04:49.523596 | 2018-03-15T19:35:10 | 2018-03-15T19:35:10 | 128,066,738 | 0 | 0 | BSD-3-Clause | 2022-05-10T22:39:58 | 2018-04-04T13:33:42 | Python | UTF-8 | Python | false | false | 1,538 | py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import logging
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.forms import UserChangeForm, UserCreationForm
from django import forms
LOG = logging.getLogger(__name__)
class CustomUserChangeForm(UserChan... | [
"raposo.felippe@gmail.com"
] | raposo.felippe@gmail.com |
818277c61c410adf352a1317283a04d8cb8c17ac | d5328a2837883aaccdae8f7367cc4787ae70e070 | /Processors/DataProcessor.py | c12c65b609679d60ce974a260dfb182a22e28a8a | [] | no_license | FishRedLeaf/Bert-TextClassification | 3845e09dc1b25e66c7cfeffb3ce14bbd22dcef15 | b9da0b7a1f1964b482cfbedcad913498ffe7feb9 | refs/heads/master | 2020-05-28T09:33:11.638594 | 2019-05-24T10:19:40 | 2019-05-24T10:19:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,048 | py | # coding=utf-8
import csv
import sys
class DataProcessor(object):
"""Base class for data converters for sequence classification data sets."""
def get_train_examples(self, data_dir):
"""Gets a collection of `InputExample`s for the train set."""
raise NotImplementedError()
def get_dev_exam... | [
"18310523922@163.com"
] | 18310523922@163.com |
44fe4c04c6ddd445c93ccb8e9984814ada833c22 | f0a62605171bc62eb68dd884c77cf146657ec5cb | /library/f5bigip_net_vlan_interface.py | bb60660e07979ad7089d4656178a45cb28f870a6 | [
"Apache-2.0"
] | permissive | erjac77/ansible-role-f5 | dd5cc32c4cc4c79d6eba669269e0d6e978314d66 | c45b5d9d5f34a8ac6d19ded836d0a6b7ee7f8056 | refs/heads/master | 2020-04-06T08:13:14.095083 | 2020-02-16T23:44:13 | 2020-02-16T23:44:13 | 240,129,047 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,146 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2016 Eric Jacob <erjac77@gmail.com>
#
# 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
#... | [
"erjac77@gmail.com"
] | erjac77@gmail.com |
1d1723243121552343f803b0adc17d95025ac667 | 11aaeaeb55d587a950456fd1480063e1aed1d9e5 | /.history/ex45-test_20190612192241.py | 37276da8d14d02df67279a69ce50e3a8905fe3b3 | [] | no_license | Gr4cchus/Learn-Python-3-The-Hard-Way | 8ce9e68f6a91ea33ea45fe64bfff82d65422c4a8 | f5fa34db16cdd6377faa7fcf45c70f94bb4aec0d | refs/heads/master | 2020-05-17T23:18:29.483160 | 2019-06-26T18:42:52 | 2019-06-26T18:42:52 | 184,023,439 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,746 | py |
class Scenes(object):
# def __init__(self):
# # self.starting_room = starting_room
# # self.locations = {
# # 'room1': Room1(),
# # 'room2': Room2()
# # }
map_list = [
'room1',
'room2',
'finish'
]
def start(self):... | [
"ahivent@gmail.com"
] | ahivent@gmail.com |
d906481dbbceaebae4e4370ca5579524e678f153 | 9d9e0a269aca2280e841a083a5e10dc24a0eb14d | /build/rosserial/rosserial_mbed/catkin_generated/pkg.installspace.context.pc.py | 6241f97f8af16ab6afe029d36c62ce4e12ddfe1e | [] | no_license | JoseBalbuena181096/ROS_TUTORIAL | 9e4eb8116366f5c4e449afe2d16a6954fa9c9b05 | caba9b86f8456a660e8256abb8b75f45ed3b6dd7 | refs/heads/master | 2020-06-27T12:25:24.553275 | 2019-08-01T01:34:54 | 2019-08-01T01:34:54 | 199,954,345 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 463 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/jose/catkin_ws/install/include".split(';') if "/home/jose/catkin_ws/install/include" != "" else []
PROJECT_CATKIN_DEPENDS = "message_runtime".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = ... | [
"angelsnek2510@gmail.com"
] | angelsnek2510@gmail.com |
a01b5418aa330eafea4e8e610fc1e9de8a1fa572 | 9ca9226e11162d39dd5ef2db23b853bfac80020b | /pages/tuozhen_NewsdetailPage.py | ac64187510e909cac772d477e4c490ff91729503 | [] | no_license | chenshl/py_app_autoTest | ede64a5f380926aa191e9f1ba86955eb6bd3725e | 5957112bf20f577ed71d851e73e1e1ce1800ff79 | refs/heads/master | 2020-03-12T11:02:51.630080 | 2018-04-29T08:49:39 | 2018-04-29T08:49:39 | 130,587,156 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 802 | py | #!/usr/bin/python
# coding:utf-8
# @author : csl
# @date : 2018/04/29 09:04
# 新闻详情页面
from appium import webdriver
from base.Element import Element
class NewsdetailPage(Element):
#评论框
comment = "//android.widget.EditText[contains(@text, '说两句')]"
comment_comment = "很好的移动医疗平台"
submit_comment = "//andr... | [
"35643856@qq.com"
] | 35643856@qq.com |
9be5a3a01f914b8842b74aea6fd0a01f02607b5e | 0032c98333ffc0efdb920ecca31ab224378880e5 | /rpi-tutorial/RaspEasy1.py | c6acfd285bdcdc7fae9df32146d5ae3281c0daba | [] | no_license | raspibrick/install | bd1c6f9a8cb524f2ab5a2c17ad8c5463b768dffa | 96288d6ca21abd8fb993cc376e37c16473b54dd5 | refs/heads/master | 2021-01-10T05:00:39.159879 | 2019-07-25T09:46:04 | 2019-07-25T09:46:04 | 40,703,681 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 451 | py | # RaspEasy1.py
# Button press/release to switch on/off LED
import RPi.GPIO as GPIO
P_BUTTON = 12 # Button A
#P_BUTTON = 13 # Button B
P_LED = 7 # LED A
#P_LED = 11 # LED B
def setup():
GPIO.setmode(GPIO.BOARD)
GPIO.setup(P_BUTTON, GPIO.IN)
GPIO.setup(P_LED, GPIO.OUT)
print "starting..."
setup()
while Tr... | [
"a2015@pluess.name"
] | a2015@pluess.name |
47ae774d608c22a3626c9bee64788db4ff3229a6 | 88ae8695987ada722184307301e221e1ba3cc2fa | /v8/tools/release/mergeinfo.py | 7136463afb265929947d5bc1429e69855cdc0582 | [
"BSD-3-Clause",
"SunPro",
"Apache-2.0"
] | permissive | iridium-browser/iridium-browser | 71d9c5ff76e014e6900b825f67389ab0ccd01329 | 5ee297f53dc7f8e70183031cff62f37b0f19d25f | refs/heads/master | 2023-08-03T16:44:16.844552 | 2023-07-20T15:17:00 | 2023-07-23T16:09:30 | 220,016,632 | 341 | 40 | BSD-3-Clause | 2021-08-13T13:54:45 | 2019-11-06T14:32:31 | null | UTF-8 | Python | false | false | 5,496 | py | #!/usr/bin/env python3
# Copyright 2015 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# for py2/py3 compatibility
from __future__ import print_function
import argparse
import os
import sys
import re
from subprocess i... | [
"jengelh@inai.de"
] | jengelh@inai.de |
e64b04bed60680e2acb04477bef4c8a503e4a2f3 | 3d39974209f890080456c5f9e60397c505540c64 | /0x0A-python-inheritance/5-main.py | df9dd05cb9641b418d71e98f33974e3e81993285 | [] | no_license | salmenz/holbertonschool-higher_level_programming | 293ca44674833b587f1a3aec13896caec4e61ab6 | 23792f8539db48c8f8200a6cdaf9268d0cb7d4e6 | refs/heads/master | 2020-09-28T11:42:51.264437 | 2020-05-13T22:56:39 | 2020-05-13T22:56:39 | 226,771,568 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 150 | py | #!/usr/bin/python3
BaseGeometry = __import__('5-base_geometry').BaseGeometry
bg = BaseGeometry()
print(bg)
print(dir(bg))
print(dir(BaseGeometry))
| [
"salmen.zooro@gmail.com"
] | salmen.zooro@gmail.com |
64c4c0966c54ffac9c7ef815fc3a30c92146fa0e | a606893da1e354c7c617d0c9247b23118be2813a | /动态规划/19.py | 5b823571231090602205c302b2258b4f90e32ff4 | [] | no_license | lindo-zy/leetcode | 4ce6cb9ded7eeea0a6953b6d8152b5a9657965da | f4277c11e620ddd748c2a2f3d9f5f05ee58e5716 | refs/heads/master | 2023-07-22T06:19:00.589026 | 2023-07-16T12:35:14 | 2023-07-16T12:35:14 | 229,958,065 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,550 | py | #!/usr/bin/python3
# -*- coding:utf-8 -*-
class Solution:
def isMatch(self, s: str, p: str) -> bool:
# m = len(s)
# n = len(p)
# dp = [[0 for i in range(m)] for i in range(n)]
# for i in range(m):
# for j in range(n):
# if s[i] == p[j]:
# ... | [
"492201845@qq.com"
] | 492201845@qq.com |
9affb7daf8c9cbd553358fe630f1221b9be2311b | cb181d1bd709faff629203c057809615ef4cf02e | /chembl_extras/management/commands/generate_ora2pg_conf.py | 75c1685a4614bc20938312e5beac34024625a3b1 | [
"Apache-2.0"
] | permissive | chembl/chembl_extras | 78361e3e65c00a166aaf793fac2cdf105a021af0 | ed4f4782d77b10f76984a7fbe18642cdb015c2de | refs/heads/master | 2021-01-25T08:54:18.946778 | 2017-05-10T12:42:22 | 2017-05-10T12:42:22 | 27,765,269 | 0 | 1 | null | 2015-03-03T13:20:24 | 2014-12-09T12:20:49 | Python | UTF-8 | Python | false | false | 4,784 | py | __author__ = 'mnowotka'
import os
from django.core.management.base import BaseCommand
from optparse import make_option
from django.db import DEFAULT_DB_ALIAS
from django.conf import settings
from django import db
from django.db import connections
from collections import OrderedDict
from django.core.serializers import ... | [
"mnowotka@ebi.ac.uk"
] | mnowotka@ebi.ac.uk |
1f73255d352061d5d5de367ce1cde91ab143216a | 373035950bdc8956cc0b74675aea2d1857263129 | /spar_python/query_generation/generators/keyword_query_generator_test.py | 1a3ad343f9a5a7f147d582faaaeaa4e2f1435ce0 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | limkokholefork/SPARTA | 5d122cd2e920775d61a5404688aabbafa164f22e | 6eeb28b2dd147088b6e851876b36eeba3e700f16 | refs/heads/master | 2021-11-11T21:09:38.366985 | 2017-06-02T16:21:48 | 2017-06-02T16:21:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,503 | py | # *****************************************************************
# Copyright 2013 MIT Lincoln Laboratory
# Project: SPAR
# Authors: ATLH
# Description: Tests for equality_query_generator
#
# Modifications:
# Date Name Modification
# ---- ---- ... | [
"mitchelljd@ll.mit.edu"
] | mitchelljd@ll.mit.edu |
32015bbff11b11145a125a55d2a4a1aa07262ac3 | f9b30e3406d23569c5b6dd4a778454683a72744b | /editor/views/timeline.py | a959317d8333fd9cf176e1430b9df22b9978ac13 | [
"CC-BY-SA-3.0",
"Apache-2.0"
] | permissive | numbas/editor | 65b0644f28192180b83ab18a9ed09886b4c0ce6b | c11a5ae11f013d63114535a8f0b0f3ec635c8bd5 | refs/heads/master | 2023-08-17T07:34:00.283142 | 2023-08-16T13:44:54 | 2023-08-16T13:44:54 | 3,493,021 | 65 | 83 | Apache-2.0 | 2023-07-19T08:27:36 | 2012-02-20T11:20:15 | JavaScript | UTF-8 | Python | false | false | 2,253 | py | import json
from editor.views.generic import user_json, stamp_json, comment_json
from editor.models import TimelineItem
from django.views import generic
from django import http
from django.urls import reverse
event_json_views = {
'stamp': stamp_json,
'comment': comment_json,
}
def event_json(event, viewed_by)... | [
"christianperfect@gmail.com"
] | christianperfect@gmail.com |
926176b80e39090a452bfcef204049145d25a362 | 68f757e7be32235c73e316888ee65a41c48ecd4e | /python_book(이것이 코딩테스트다)/조합문제 예시 p486.py | 3e5176b472357fc8ad7125c6f28c9d12695f6b86 | [] | no_license | leejongcheal/algorithm_python | b346fcdbe9b1fdee33f689477f983a63cf1557dc | f5d9bc468cab8de07b9853c97c3db983e6965d8f | refs/heads/master | 2022-03-05T20:16:21.437936 | 2022-03-03T01:28:36 | 2022-03-03T01:28:36 | 246,039,901 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,313 | py | """조합 문제 예시
L개의 비번갯수와 C개의 알파벳 입력받음
최소 모음 1개이상자음 2개이상으로 정렬순으로 L개의 암호를 가진것을 알파벳순으로 출력
combinations의 기본
- 반환값 : 특정 주소를 가지는 조합타입 [(),(),()..]식으로 반환
- 원소값 : 튜플형식을 가짐
반환값에 대해서 리스트형으로 형변환과 원소값도 리스트로 형변환 하는게 편하다.
문자열에대한 조합 사용 예시
2개로 나누어서 풀었는데 그냥 다 뽑은 다음에 모음과 자음 갯수를 검사해서 출력하는식으로 푸는게 훨씬 편했을듯
"""
import sys, itertools
input = ... | [
"aksndk123@naver.com"
] | aksndk123@naver.com |
8f482032abe72bd653d2038e495eca19f4fa7f93 | 89207f4e5c5a8fd955adf775a553c32359a0cae8 | /test.py | 84b1107cbbfbcc2f81877535be972409c2ed3e10 | [
"BSD-4-Clause"
] | permissive | ikbear/seven-cow | 065161f811c465f0ce1579471bf9a0ba4fc1105d | 4a6fc7392b2feddf67d7f338794758bdc19379a9 | refs/heads/master | 2021-01-16T17:50:41.438442 | 2013-06-27T09:25:16 | 2013-06-27T09:25:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,586 | py | import os
from sevencow import Cow
class Test(object):
def setUp(self):
ACCESS_KEY = os.environ['QINIU_ACCESS_KEY']
SECRET_KEY = os.environ['QINIU_SECRET_KEY']
bucket = os.environ['QINIU_BUCKET']
cow = Cow(ACCESS_KEY, SECRET_KEY)
self.b = cow.get_bucket(bucket)
fo... | [
"yueyoum@gmail.com"
] | yueyoum@gmail.com |
41a41fbbd319825b3648367519e4f9dd507552ae | 27aa2aa55c4c03b032b62c462e98385e011ec923 | /5_5_1_Hash_Functions.py | 9d0b25bfbc81006f485cc366cbc720e19fc89387 | [] | no_license | huiyanglu/DataStructures | bb08f07ded680f5c02d7264123b7b48cab41a223 | 76c6dee95c747729a19b7f910c9f344d25e4bab0 | refs/heads/master | 2020-04-02T04:49:23.676385 | 2019-08-13T15:37:23 | 2019-08-13T15:37:23 | 154,036,882 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 641 | py | """
create hash functions for character-based items such as strings.
"""
def hash(astring,tablesize):
sum = 0
for pos in range(len(astring)):
sum = sum + ord(astring[pos])
return sum % tablesize
"""
When using this hash function, anagrams will always be given the same hash value.
To remedy this, w... | [
"luchocoice@gmail.com"
] | luchocoice@gmail.com |
8fa00d7a6d2ce243aade814d74998d95242efa9e | 18e2f67599b45b98c14931a8287a15b963250c83 | /23_mtPool.py | fe2e58291b7370c831f0b2aec7e444b631bd39c9 | [] | no_license | uuboyscy/eb102-python | 77ffb9a79a05d8371a5f38463c60ce579cbd9b39 | ec0e32cb1b383b9ad0c0eb68696a15569bf6037d | refs/heads/master | 2022-09-09T05:16:31.749893 | 2020-05-18T03:47:17 | 2020-05-18T03:47:17 | 262,553,112 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 564 | py | # from multiprocessing import Pool
# import multiprocessing as mp
from multiprocessing.dummy import Pool
import time
import os
def longTimeTask(i):
print('task: {}, PID: {}'.format(i, os.getpid()))
time.sleep(5)
result = 10 ** 30
print('result: ', result)
return result
if __name__ == '__main__':
... | [
"aegis12321@gmail.com"
] | aegis12321@gmail.com |
85e4609531f380ca3101cd87f99fb0acd6f0d120 | 7463a66dfa00572f4e4d8ef4349309531f0105ae | /TrainerDL/Utils/PytorchToCaffe/Caffe/caffe_lmdb.py | b4d538d0ba5c54137d4889ea9bdce54292bb09a6 | [
"MIT"
] | permissive | fx19940824/DetectionModel | f2e380fd21f4b31a17fd175a6dea1067b8f0d5cc | edc0d2f9eea481d2bc6f3abb2f222b59fdc25538 | refs/heads/master | 2022-12-20T19:58:32.224829 | 2019-05-30T01:16:05 | 2019-05-30T01:16:05 | 188,800,679 | 2 | 0 | null | 2022-11-22T02:39:23 | 2019-05-27T08:13:38 | Python | UTF-8 | Python | false | false | 1,005 | py | import lmdb
from Utils.PytorchToCaffe.Caffe import caffe_pb2 as pb2
import numpy as np
class Read_Caffe_LMDB():
def __init__(self,path,dtype=np.uint8):
self.env=lmdb.open(path, readonly=True)
self.dtype=dtype
self.txn=self.env.begin()
self.cursor=self.txn.cursor()
@staticmetho... | [
"you@example.com"
] | you@example.com |
4001aed2525fab6e77d25b475686406794abbccd | 5004bd99b73653d6288122f38f5a58b4550ac55c | /setup.py | 9df34b00cc918fa68ec26797d512db67fdea0c2f | [] | no_license | BrancoLab/Fiberphotometry | 78e2abb2149360393e4d718af908a6ee1351949e | d4440c1a6d343bd0d55f43f70a2f59bffa19c7c8 | refs/heads/master | 2023-01-01T09:37:02.908497 | 2020-10-28T15:46:07 | 2020-10-28T15:46:07 | 222,673,325 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 632 | py | from setuptools import setup, find_namespace_packages
requirements = [
"numpy",
"pandas",
"moviepy",
"tqdm",
"python-opencv",
"matplotlib",
"seaborn",
"sklearn",
"scipy",
"psychopy",
"pypylon",
"fancylog"
]
setup(
name="fiberphotometry",
version="0.0.0.1",
author_email="federicoclaudi@protonmail.com",
... | [
"federicoclaudi@protonmail.com"
] | federicoclaudi@protonmail.com |
eb50e7b8c14f42d9fcd0d1cde2a5ef4b1a278281 | c8f4731bf85003b7d9f5a908723d15a33415eea5 | /caffe2/python/layers/pairwise_dot_product.py | 1c6820c9f9ee001e34dd652a4739c342bd27d27f | [
"BSD-2-Clause",
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla"
] | permissive | ChengduoZhao/caffe2 | 5c90fd66374f7f00b1330831e23dc9915da5028c | 7811796ac91f5457208cb20bcfc55de2d39d21ba | refs/heads/master | 2021-01-01T17:11:43.297274 | 2017-07-27T04:52:18 | 2017-07-27T05:08:00 | 98,018,932 | 0 | 1 | null | 2017-07-22T08:44:58 | 2017-07-22T08:44:58 | null | UTF-8 | Python | false | false | 2,244 | py | ## @package dot_product
# Module caffe2.python.layers.dot_product
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from caffe2.python import schema
from caffe2.python.layers.layers import (
ModelLayer,
)
class Pai... | [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
43c48db2124ce6475b7e25ca5a6994119a4adfc0 | 2dd560dc468af0af4ca44cb4cd37a0b807357063 | /Leetcode/705. Design HashSet/solution1.py | 2911a94a76a9164618872d1ff81eb7f0dd2f38a2 | [
"MIT"
] | permissive | hi0t/Outtalent | 460fe4a73788437ba6ce9ef1501291035c8ff1e8 | 8a10b23335d8e9f080e5c39715b38bcc2916ff00 | refs/heads/master | 2023-02-26T21:16:56.741589 | 2021-02-05T13:36:50 | 2021-02-05T13:36:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 869 | py | class MyHashSet:
def __init__(self):
"""
Initialize your data structure here.
"""
self.base = 2003
self.nums = [[] for _ in range(self.base + 1)]
def hash(self, val: int) -> int:
return val % self.base
def add(self, val: int) -> None:
key = self.has... | [
"info@crazysquirrel.ru"
] | info@crazysquirrel.ru |
823d20f448832d54b724475aa2a27e940270962e | e3fc83e77e218f7b8df4b14b0753fd65afd4b923 | /downloaded_kernels/loan_data/parsed_kernels/kernel_145.py | 0662aad9202d5179619ffc67e902f318905da38c | [
"MIT"
] | permissive | jupste/wranglesearch | 982684fdaa7914af59758880fdc3a4ff3346477f | a6978fae73eee8ece6f1db09f2f38cf92f03b3ad | refs/heads/master | 2023-06-18T04:46:34.474046 | 2021-07-15T23:43:24 | 2021-07-15T23:43:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 710 | py |
# coding: utf-8
# In[ ]:
# This Python 3 environment comes with many helpful analytics libraries installed
# It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python
# For example, here's several helpful packages to load in
import numpy as np # linear algebra
import pandas as pd # ... | [
"jcamsan@mit.edu"
] | jcamsan@mit.edu |
a9a19434ebb517c7a921ab19b578cb91f3b4122c | 842e3cd1266d18752a3baf2b90232ed4ce41eb4f | /grako/_config.py | 03667f3d52c03b56dfbf518acb6fd9cceeda8d79 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | apalala/grako | 2786d85eef9799bf614c46c92f19ff183a435d46 | efb373d89e6805930e661758c2cff2b26da4658a | refs/heads/master | 2020-12-25T17:37:05.353167 | 2017-05-02T02:53:11 | 2017-05-02T02:53:11 | 65,163,853 | 16 | 6 | null | null | null | null | UTF-8 | Python | false | false | 178 | py | # -*- coding: utf-8 -*-
# Copyright (C) 2017 by Juancarlo Añez
# Copyright (C) 2012-2016 by Juancarlo Añez and Thomas Bragg
__toolname__ = 'Grako'
__version__ = '3.22.1'
| [
"apalala@gmail.com"
] | apalala@gmail.com |
2b230404d0e84a18fc16f8ce7256f407c6c35f18 | 2c9eadb22d2de54ac06c6731664ed65276fd7062 | /pipeline/contrib/periodic_task/tasks.py | f7bd50ffbcc0f37ed5abc9245031aeceea715a5d | [
"MIT",
"LicenseRef-scancode-free-unknown"
] | permissive | TencentBlueKing/bk-nodeman | 34bba9b217d84bb4dad27e735c29361a5c62789b | 72d2104783443bff26c752c5bd934a013b302b6d | refs/heads/v2.4.x | 2023-08-19T01:27:58.805715 | 2023-08-10T02:59:31 | 2023-08-10T02:59:31 | 385,203,367 | 54 | 49 | MIT | 2023-09-14T06:51:33 | 2021-07-12T10:05:11 | Python | UTF-8 | Python | false | false | 3,327 | py | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | [
"durantzhang@tencent.com"
] | durantzhang@tencent.com |
aea944b0b2ea135e01e165057d5e429f2000308a | 6b78bd7f62f7f407bf11d877cc4d91e7db3b62fe | /csc/python/Intro-Python-I/src/13_file_io.py | 0bf87c9f36afd02ad1c53557568a38d023ac4bce | [] | no_license | PascalUlor/code-challenges | b85efacd4bc5999a0748d1fa1e84f503be09dc94 | 6488d0a6d2729bd50b106573f16488479fd6e264 | refs/heads/master | 2023-03-03T17:50:18.413127 | 2023-02-21T13:10:02 | 2023-02-21T13:10:02 | 212,979,719 | 1 | 0 | null | 2023-02-15T22:59:13 | 2019-10-05T10:14:29 | Python | UTF-8 | Python | false | false | 1,198 | py | """
Python makes performing file I/O simple. Take a look
at how to read and write to files here:
https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files
"""
import os
cwd = os.getcwd() # Get the current working directory (cwd)
files = os.listdir(cwd) # Get all the files in that directory
pri... | [
"pascalulor@yahoo.com"
] | pascalulor@yahoo.com |
29058817ee9d433c087476175de412e5db922af4 | 2c74bb301f1ed83b79254944183ac5a18a639fdf | /tests/components/rituals_perfume_genie/test_config_flow.py | 3582f49598cb373ccfa3c0a6a1533dd8f2b49cc5 | [
"Apache-2.0"
] | permissive | Adminiuga/home-assistant | 5bec93007ddac1a268cc359bf7e48530c5f73b38 | dcf68d768e4f628d038f1fdd6e40bad713fbc222 | refs/heads/dev | 2023-02-22T22:03:31.013931 | 2022-11-09T00:27:20 | 2022-11-09T00:27:20 | 123,929,062 | 5 | 4 | Apache-2.0 | 2023-02-22T06:14:31 | 2018-03-05T14:11:09 | Python | UTF-8 | Python | false | false | 3,789 | py | """Test the Rituals Perfume Genie config flow."""
from http import HTTPStatus
from unittest.mock import AsyncMock, MagicMock, patch
from aiohttp import ClientResponseError
from pyrituals import AuthenticationException
from homeassistant import config_entries
from homeassistant.components.rituals_perfume_genie.const i... | [
"noreply@github.com"
] | Adminiuga.noreply@github.com |
9788a113b67bc1688dfc6029b4307f0c4f4a0ae5 | d0758e0ca004226cec8ad8b26c9565c98534a8b8 | /10-iot/A08_Timers/main.py | fb8ca3b0af0f866b91b8576dbba52d491a05c9ca | [] | no_license | pythoncanarias/eoi | 334d64a96afc76ac1fa10282378f291b6d8c94b3 | 349367254f85e3e4273cede067ca950913a1332c | refs/heads/master | 2023-07-06T08:00:11.366345 | 2023-06-30T15:19:33 | 2023-06-30T15:19:33 | 222,742,870 | 26 | 19 | null | 2023-06-25T16:03:46 | 2019-11-19T16:41:25 | Jupyter Notebook | UTF-8 | Python | false | false | 552 | py | from machine import Timer
import utime
# Creado por Daniel Alvarez (danidask@gmail.com) para curso de Python de EOI (eoi.es)
tim1 = Timer(-1) # -1 para timer virtual (basado en RTOS)
tim1.init(period=2500, mode=Timer.ONE_SHOT, callback=lambda x:print("#### esto solo se ejecuta una vez"))
tim2 = Timer(-1)
tim... | [
"euribates@gmail.com"
] | euribates@gmail.com |
2c0df1c54b9524d5226128cc8385117b79d65e35 | 59ac85afd2c2bc45ad8d3576412abdb3b3e97ca4 | /abc/abstract_class.py | 273493371254c038b25a14e4193a641b79ec7abe | [] | no_license | xaneon/NetworkAutomation | 1833bd22b4a573a7ec1e2266bc44abf9b7bdbf11 | 2560194047b93442ea4f8d822e2b20c77256d5c9 | refs/heads/master | 2020-06-12T09:23:28.770655 | 2019-07-18T15:11:16 | 2019-07-18T15:11:16 | 194,256,868 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 406 | py | from abc import ABC, abstractmethod
class abstrakteKlasse(ABC):
def __init__(self, wert):
self.wert = wert
super().__init__()
@abstractmethod
def methode(self):
print("Implementation einer Methode")
class unterKlasse(abstrakteKlasse):
def methode(self):
super().methode... | [
"bonne.habekost@gmail.com"
] | bonne.habekost@gmail.com |
c2a0329c735e5460445333113559810b77c9c3aa | 2fac796fa58c67fb5a4a95a6e7f28cbef169318b | /python/plus-one.py | efcbb3b165edecd501ea0840a8ea5cf5c2953ed2 | [] | no_license | jwyx3/practices | f3fe087432e79c8e34f3af3a78dd10278b66dd38 | 6fec95b9b4d735727160905e754a698513bfb7d8 | refs/heads/master | 2021-03-12T20:41:59.816448 | 2019-04-14T06:47:30 | 2019-04-14T06:47:30 | 18,814,777 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 432 | py | class Solution:
# @param {int[]} digits a number represented as an array of digits
# @return {int[]} the result
def plusOne(self, digits):
accum = 0
for i in range(len(digits) - 1, -1, -1):
s = digits[i] + 1
digits[i] = s % 10
accum = s / 10
if... | [
"jwyx88003@gmail.com"
] | jwyx88003@gmail.com |
5ed5bcc26e2db118fd1170a5b9a0f5080180348d | c90ddd0930894c565197b739cd76140a7151fffd | /HLTrigger/Configuration/python/HLT_75e33/modules/hltEle5WP70HgcalIsoL1SeededFilter_cfi.py | 70dd91b6f62ac3f26070f6991491084c7c0cb402 | [
"Apache-2.0"
] | permissive | p2l1pfp/cmssw | 9cc6b111ff1935e49f86ec3da9f9b84fb13bbcdf | 9f0a3a22fe451c25114134c30ac1f5c1261f3183 | refs/heads/L1PF_12_5_X | 2023-08-17T00:38:15.374760 | 2023-06-13T12:55:57 | 2023-06-13T12:55:57 | 127,881,751 | 6 | 1 | Apache-2.0 | 2023-09-05T13:54:59 | 2018-04-03T09:10:17 | C++ | UTF-8 | Python | false | false | 1,256 | py | import FWCore.ParameterSet.Config as cms
hltEle5WP70HgcalIsoL1SeededFilter = cms.EDFilter("HLTEgammaGenericQuadraticEtaFilter",
absEtaLowEdges = cms.vdouble(0.0, 1.0, 1.479, 2.0),
candTag = cms.InputTag("hltEle5WP70EcalIsoL1SeededFilter"),
doRhoCorrection = cms.bool(False),
effectiveAreas = cms.vdouble... | [
"Thiago.Tomei@cern.ch"
] | Thiago.Tomei@cern.ch |
80dfa8532967766e18e04183fad7d4cc19314823 | bee77315d08def61c1155930285211ef3d8d7654 | /nevergrad/functions/topology_optimization/core.py | 9e1854a0ddb44d1eb2798e9cbd41db0f372b7d58 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | facebookresearch/nevergrad | d2da592c1bf3b7c398392b3d39217a3753a4912c | daddb18184bf64ba9082ecc55a56e07429a23103 | refs/heads/main | 2023-09-04T10:53:42.903505 | 2023-08-30T17:10:37 | 2023-08-30T17:10:37 | 158,468,845 | 3,526 | 367 | MIT | 2023-09-11T13:37:36 | 2018-11-21T00:33:17 | Python | UTF-8 | Python | false | false | 1,891 | py | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
# Based on a discussion at Dagstuhl's seminar on Computational Intelligence in Games with:
# - Dan Ashlock
# - Chiara Sironi
# - Guenter Ru... | [
"noreply@github.com"
] | facebookresearch.noreply@github.com |
2fc4dba57667c84709b6c1d9ee331d86b4c34248 | d0a3d3ea055152b141c24f7cebf06892599e4d73 | /autoTest/day8/04下载文件.py | 2af4fad086557cbc9534686ac920cbe969f949f0 | [] | no_license | limiyou/Pyproject | bffe0bc880509a9e525f03568bf9898ed7af80a3 | 2c5cd25a5a5123eb61fdcb846ad5f7bd3bf145d1 | refs/heads/master | 2023-06-28T20:56:28.793740 | 2021-08-09T02:30:52 | 2021-08-09T02:30:52 | 393,281,667 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,004 | py | import requests
url = 'https://img1.bitautoimg.com/bitauto/2013/01/23/854be0a2-ef1c-440a-926d-94e1e5051e18.jpg'
resp = requests.get(url)
with open('bmw.jpg', 'wb') as f: # wb: write in bytes
f.write(resp.content) # resp.content 返回值是 bytes
# 思考: 如果下载的是一个4G的电影,该怎么办?
# 方案: 流式下载
def downloader(url,file... | [
"756093055@qq.com"
] | 756093055@qq.com |
aedddbffc558e1e94a49de45294167bd85b9fc3a | 11514265e06c7326d376650400a28bfec667f8d6 | /lifelines/tests/test_statistics.py | 215130716ab6ce4b418ada393907d100b4b1e8e3 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | fengyinyang/lifelines | dcd6a5f7e5e7cccf4fc9a4919d87eee6d6c03b0e | 4d951e24e45de533adf61c4e7d12c905f122ae6b | refs/heads/master | 2021-01-19T21:29:06.641207 | 2015-01-25T17:51:02 | 2015-01-25T17:51:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,642 | py | from __future__ import print_function
import numpy.testing as npt
from scipy.stats import beta
from ..statistics import *
from ..datasets import load_waltons, load_g3
def test_unequal_intensity_with_random_data():
data1 = np.random.exponential(5, size=(2000, 1))
data2 = np.random.exponential(1, size=(2000, ... | [
"cam.davidson.pilon@gmail.com"
] | cam.davidson.pilon@gmail.com |
f28b58a328699f18011079b840097f1c5daa3783 | 97b827ddf260dfc8a2725e66359e3625af84b7d1 | /test/ssm_document_generator_test/utils/test_result.py | 61e1ca571d9792a374abe9662683696a1ad805cf | [
"Apache-2.0"
] | permissive | ken2190/aws-systems-manager-document-generator | eeea79dbae67c0b12f0d50a8412de3e8293a0037 | 2c041fd52342d95da4535fe3236e43933cc6e08d | refs/heads/master | 2023-03-16T03:15:07.034439 | 2018-05-12T16:56:57 | 2018-11-04T12:26:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,392 | py | import pytest
from ssm_document_generator.command.result_status import ResultStatus
from ssm_document_generator.command.result import Result
@pytest.mark.parametrize('test_input', [
[],
[1, 2],
{'foo': 'bar'}
])
def test_success(test_input):
assert Result.success(test_input) == {'status': ResultStatu... | [
"sitalov@amazon.com"
] | sitalov@amazon.com |
1973184e8e2d2fdc08da62087eeff140f306cc81 | 2a32ba95aa3b5da7b7376f7a7a4df5bc932c6b90 | /Dynamic Programming/PickupCoin.py | b8b4ba20c81b4dfbd81f64f6a38f4cd2baaed874 | [] | no_license | maruichen2004/EPI | 33cb4f1860ca294c9aba460ac7f22e25c2c9b210 | 2379e83536bdbeaa7f21ceeb8f1e369a90f434a0 | refs/heads/master | 2016-09-06T03:32:04.412640 | 2014-11-23T05:29:59 | 2014-11-23T05:29:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 701 | py | class Solution:
# Time: O(n^2)
# Space: O(n^2)
def pickupCoin(self, C):
T = [[-1 for i in range(len(C))] for j in range(len(C))]
return self.pickupCoinHelper(C, 0, len(C) - 1, T)
def pickupCoinHelper(self, C, a, b, T):
if a > b: return 0
if T[a][b] == -1:
T[a][b] = max(min(... | [
"ruichenma@RUICHENs-MacBook-Pro.local"
] | ruichenma@RUICHENs-MacBook-Pro.local |
f18d406c55e6b102eeb675204f764d108a626194 | d857f5868d87043b61a005394ff7dbe50f76f53c | /pero/backends/json/export.py | c528c570e0c34425918f20df131ac0f839cf45e4 | [
"LicenseRef-scancode-philippe-de-muyter",
"LicenseRef-scancode-commercial-license",
"AGPL-3.0-or-later",
"MIT"
] | permissive | xxao/pero | 54ac4724863faf43eb5868a77373adcfea34c0dd | d59b1bc056f3037b7b7ab635b6deb41120612965 | refs/heads/master | 2023-03-08T18:15:23.106519 | 2022-08-04T13:56:15 | 2022-08-04T13:56:15 | 187,512,526 | 31 | 3 | MIT | 2023-03-08T06:29:44 | 2019-05-19T18:19:23 | Python | UTF-8 | Python | false | false | 1,421 | py | # Created byMartin.cz
# Copyright (c) Martin Strohalm. All rights reserved.
from ... enums import *
from . canvas import JsonCanvas
def export(graphics, path, width=None, height=None, **options):
"""
Saves given graphics as JSON dump into specified file.
Args:
graphics: pero.Graphics
... | [
"github@bymartin.cz"
] | github@bymartin.cz |
7f16fc2499693b5b91a5ffd9693c183710708666 | cc26a1bbae6af3dec61fd27e44484e01da21d36e | /Scientific Expedition/YAML. Simple Dict/mission.py | c2fdba111285c7f644957f12036ae5c371af82f1 | [] | no_license | ofisser86/py-check-io | 6bacef0783987e49f3bf28b9bea74e59e4ebb184 | 70469deea240f03199072f2dd28d6819815a2624 | refs/heads/master | 2023-02-02T09:32:53.934629 | 2020-12-16T13:44:51 | 2020-12-16T13:44:51 | 309,277,316 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 613 | py | def yaml(a):
# your code here
if len(a) > 1:
print({k.split(':')[0]: k.split(':')[1] for k in a.split(',')})
return 0
if __name__ == '__main__':
print("Example:")
print(yaml("""name: Alex Fox,
age: 12
class: 12b"""))
# These "asserts" are used for self-checking and not for an auto-t... | [
"ofisser86@gmail.com"
] | ofisser86@gmail.com |
14405a386a8935c30692341adba5ee958e13efe5 | 177338a720f904f63926da055364cc0e2c0a850c | /spark/pyspark(by Leaderman git)/1.2.0/examples/sql/spark_sql_udf.py | 43e12d4f6b4b0a25882e01dd61896c1c57c31697 | [
"Apache-2.0"
] | permissive | xuefenga616/mygit | 60ef7bf7201603e13d4621cf7a39dea8ec92e0b7 | be3b8003fcc900ce7ca6616a9ddebb0edcbc1407 | refs/heads/master | 2020-09-13T11:50:55.448041 | 2017-08-27T10:59:00 | 2017-08-27T10:59:00 | 67,042,409 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,742 | py | from pyspark import SparkConf, SparkContext
from pyspark.sql import HiveContext, StructType, StructField, StringType, IntegerType, ArrayType, FloatType, MapType
conf = SparkConf().setAppName("spark_sql_udf")
sc = SparkContext(conf=conf)
hc = HiveContext(sc)
source = sc.parallelize([("value",)])
schema = StructType... | [
"xuefeng_11@qq.com"
] | xuefeng_11@qq.com |
62aa33b6d48c86ecc35dc3f1d54d26916c6e3d3d | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2783/60767/254054.py | cf5a7c151b7d8e43fc1c81f463a2cc082961d494 | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 948 | py | def getWinner(scores):
dic = {}
for i in range(len(scores)):
if(scores[i][0] not in dic):
dic[scores[i][0]] = int(scores[i][1])
else:
dic[scores[i][0]] += int(scores[i][1])
temp = max(dic.values())
#print("te",temp)
res = []
for i in dic.keys():
if... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
0522f1067dafa89bae00c169c67ad9b03a7206ac | 66cab93c26cc252f412860778131b208c6f120be | /bin/supervisord | 223e3eb1ed4aa5dda5a3377f8d1f756e9b634e3b | [] | no_license | marcogarzini/Zodiac | 3332733f6ae8d64924557ff022f44c835aeac0a9 | 06e8ad0c709189dc65a26fb7d6c17a9ee2bc9112 | refs/heads/master | 2016-09-11T03:18:12.805299 | 2014-01-17T12:50:03 | 2014-01-17T12:50:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 316 | #!/usr/bin/python2.7
import sys
sys.path[0:0] = [
'/home/user1/newproject/eggs/supervisor-3.0-py2.7.egg',
'/home/user1/newproject/eggs/meld3-0.6.10-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages',
]
import supervisor.supervisord
if __name__ == '__main__':
sys.exit(supervisor.supervisord.main())
| [
"user1@user1-VirtualBox.(none)"
] | user1@user1-VirtualBox.(none) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.