blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 616 | 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 777
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 149
values | src_encoding stringclasses 26
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 3 10.2M | extension stringclasses 188
values | content stringlengths 3 10.2M | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
734bf560f6432a6a310f7a443c030f24bb698856 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/358/usersdata/288/102525/submittedfiles/estatistica.py | 9fdd68752a0b6be1cd5aa630f88df85ada3bc87a | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 817 | py | # -*- coding: utf-8 -*-
def media(lista):
media=sum(lista)/len(lista)
return media
#Baseado na função acima, escreva a função para calcular o desvio padrão de uma lista
def desvio_padrao(lista):
soma=0
for i in range (0,len(lista),1):
soma+=((media(lista)-lista[i])**2)
desvio=(soma/(n-1))... | [
"[email protected]"
] | |
6a8852a241aa4d0975a748a95537d55dd3466a75 | 5b0dcb0a1f578d04b0c195a30ff1a7ccfd29deaf | /tests/import/pkg9/mod2.py | f4b3e265fb51091766734e9cb7f4f9ca064b8b03 | [
"MIT",
"GPL-1.0-or-later"
] | permissive | rk-exxec/micropython | c87ecd8743413c8a65e64fd82cd1910ccaed96c6 | d529c20674131b9ce36853b92784e901a1bc86f4 | refs/heads/master | 2023-08-18T01:18:34.511851 | 2023-08-09T03:19:18 | 2023-08-09T03:22:57 | 136,508,987 | 7 | 16 | MIT | 2023-01-13T20:48:50 | 2018-06-07T17:17:01 | C | UTF-8 | Python | false | false | 19 | py | from . import mod2
| [
"[email protected]"
] | |
2d527612149fb4de87f1e28e4faa947f02b7d21c | 407ca85cd6051a50884f38bb0514a6301f8e7101 | /Consolidated/POM/process_igd.py | 95e19baa709e2dfd1c4abcd641e5a4c6d49fe827 | [] | no_license | vivekaxl/MOLearner | 5ae4f40027b814ae5b20aaaeb255d6041505c0b9 | 236bf61e8ee1663eabcd73f355070022f908acfa | refs/heads/master | 2021-01-23T01:12:30.836318 | 2017-04-27T05:54:39 | 2017-04-27T05:54:39 | 85,847,238 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,027 | py | from __future__ import division
import pickle
import os
from sk import rdivDemo
pickle_files = [f for f in os.listdir(".") if ".py" not in f]
content = pickle.load(open(pickle_files[0]))
problems = content.keys()
prob = {}
for problem in problems:
al2 = pickle.load(open('al2_POM.p'))
al = pickle.load(open('al... | [
"[email protected]"
] | |
161618add3f39c9fe876a8d7b56a02309bb09785 | 2c68f9156087d6d338373f9737fee1a014e4546b | /src/vmware/azext_vmware/vendored_sdks/models/tracked_resource_py3.py | 27620df2d70b14816bdf6d808642b7b81ad668c9 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | anpaz/azure-cli-extensions | 8b0d4071c49840da9883f13cb0fd1f4515246ee0 | 847fd487fe61e83f2a4163a9393edc9555267bc2 | refs/heads/master | 2023-04-23T17:22:53.427404 | 2021-01-29T17:48:28 | 2021-01-29T18:01:33 | 257,394,204 | 2 | 0 | MIT | 2021-01-28T10:31:07 | 2020-04-20T20:19:43 | Python | UTF-8 | Python | false | false | 1,447 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from ... | [
"[email protected]"
] | |
feecfc389496c8c1ebf9368e8be2da15764d4830 | 04741556cbaa4f98afea194bc0997723eb06fa49 | /Python/Group(), Groups() & Groupdict().py | 4be0ae3f083124a4cdca9efedf23be66f04f9837 | [] | no_license | maybeee18/HackerRank | e75f619654326e0deae83ee4fe818d20d606bdda | dce488916f643248ea86500e176322a3b9e3b671 | refs/heads/master | 2023-01-21T23:22:07.206264 | 2020-10-05T04:54:45 | 2020-10-05T04:54:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 105 | py |
import re
s = str(input())
m = re.search(r'([a-zA-Z\d])\1+', s)
print(m.group(1) if m else -1)
| [
"[email protected]"
] | |
b15f982248a07bd81468603028e04993dab62e2c | 948f0a1ccee30084b5e6e9b1043bd1681d2ad38f | /app/1.2.py | 11b5df0c3846432a5436737d1486af287a9799af | [
"MIT"
] | permissive | filangelos/random-forest | 41454e934cf72cf1480cf5c001d569e629f578ac | 0fc7a4f74b1120f3e527e824abc1de1aa32f2b18 | refs/heads/master | 2021-09-09T13:53:30.982028 | 2018-03-16T18:38:36 | 2018-03-16T18:38:36 | 121,535,264 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,429 | py | # EXECUTION TIME: 49s
# Python 3 ImportError
import sys
sys.path.append('.')
import time
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
# prettify plots
plt.rcParams['font.family'] = 'Times New Roman'
sns.set_style({"xtick.direction": "in", "ytick.direction": "in"})
b... | [
"[email protected]"
] | |
45195cd9a511fdfd4e923e24cec6b203242b4440 | 5d5365a73e81ccf71c73b9d86eb070841f1e0001 | /backend/wallet/admin.py | bee6e39eb2e35074d6224625dcf762cc55d21246 | [] | no_license | crowdbotics-apps/yjjhffhg-22011 | 3c908901c5fa930df11d6af17471a39a7e3b1dd9 | c5649303aef6b69f515c4526df8b43ee82212c12 | refs/heads/master | 2023-01-12T02:01:16.200496 | 2020-10-27T15:36:39 | 2020-10-27T15:36:39 | 307,746,507 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 382 | py | from django.contrib import admin
from .models import (
PaymentTransaction,
TaskerPaymentAccount,
TaskerWallet,
PaymentMethod,
CustomerWallet,
)
admin.site.register(TaskerWallet)
admin.site.register(PaymentMethod)
admin.site.register(TaskerPaymentAccount)
admin.site.register(CustomerWallet)
admin.si... | [
"[email protected]"
] | |
30e1a84c06ca00940832ccc37ecb9ec95c660bef | f1c0ce462b185f7b633acb04ee8a85fcda87c748 | /tests/ui/help/test_application_help.py | 937e44be50886b1b7c39936744091d0878f09a36 | [
"MIT"
] | permissive | cole/clikit | 056c5f388043a43971a633470122b291fb51d23f | bdb286672f93e1ff7df1d864fb0751476e034d57 | refs/heads/master | 2020-09-08T12:11:05.287042 | 2019-11-12T05:02:42 | 2020-02-22T22:19:49 | 221,129,623 | 1 | 1 | MIT | 2019-11-12T04:27:10 | 2019-11-12T04:27:09 | null | UTF-8 | Python | false | false | 5,056 | py | from clikit import ConsoleApplication
from clikit.api.args import Args
from clikit.api.args.format import ArgsFormat
from clikit.api.args.format import Option
from clikit.api.config import ApplicationConfig
from clikit.args import ArgvArgs
from clikit.ui.help import ApplicationHelp
def test_render(io):
config = A... | [
"[email protected]"
] | |
5ab2fec2b8f90755f0c2c41cd1c55b6a58f2d869 | ea02eb8c52ef66fe8399516dc0103b95ea1dd7c4 | /leo/lilac.py | 62a481a1484a09dabefd18f739923e60614fee7a | [] | no_license | y010204025/repo | 6c9d9601a14b8d003789bfe8266b1e10e9d41a49 | 074fef70cdccf3c62092a848e88bb27fbabea8d3 | refs/heads/master | 2020-03-23T03:38:57.191796 | 2018-07-15T14:51:38 | 2018-07-15T14:51:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,265 | py | #!/usr/bin/env python3
#
# This is a complex version of lilac.py for building
# a package from AUR.
#
# You can do something before/after building a package,
# including modify the 'pkgver' and 'md5sum' in PKBUILD.
#
# This is especially useful when a AUR package is
# out-of-date and you want to build a new one, or you... | [
"[email protected]"
] | |
afa2880ef7c9ad5d7d0c8b552c93ec596a1567aa | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02712/s236119093.py | 71fea111b5f86f505bae1ae0688f57fdca6fed08 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 144 | py | import sys
input = sys.stdin.readline
N = int(input())
ans = 0
for i in range(1,N+1):
if i%3 != 0 and i%5 !=0:
ans += i
print(ans)
| [
"[email protected]"
] | |
cbd4dff58fb534940486ad7a745bc32cfa732058 | e268832c9a5ecd465851347fc870ccf92e073309 | /Top_Interview_Questions/48._Rotate_Image/solution.py | 0c0c4d7037d1b48406cc887ceb7c12e888dc1f8c | [] | no_license | hkim150/Leetcode-Problems | a995e74ecca6b34213d9fa34b0d84eea649f57c2 | 1239b805a819e4512860a6507b332636941ff3e9 | refs/heads/master | 2020-12-04T08:06:42.981990 | 2020-10-03T00:20:29 | 2020-10-03T00:20:29 | 231,688,355 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 565 | py | class Solution:
def rotate(self, matrix: List[List[int]]) -> None:
"""
Do not return anything, modify matrix in-place instead.
"""
# we can first transpose and then reverse the row
if not matrix:
return
l = len(matrix)
if l <= 1:
... | [
"[email protected]"
] | |
3b7a1f1b87e2d782ff133914ab7fc7467d0a30b3 | fec00348ab62d9539955f91f707291f8b09ecbd8 | /chainer_/chainercv2/models/irevnet.py | 0a86f6a43e3e4bd058b0b08765e3a0d0aaa6b1b9 | [
"MIT"
] | permissive | raijinspecial/imgclsmob | 192cae6cd5021f8ff951371d641e5f222cfe3068 | c5d3ab207a6304f1343e4394f0467bdc7403a72a | refs/heads/master | 2020-04-08T03:27:05.031453 | 2019-03-08T04:28:13 | 2019-03-08T04:28:13 | 158,976,223 | 0 | 0 | MIT | 2019-03-08T04:28:14 | 2018-11-24T21:47:08 | Python | UTF-8 | Python | false | false | 15,483 | py | """
i-RevNet, implemented in Chainer.
Original paper: 'i-RevNet: Deep Invertible Networks,' https://arxiv.org/abs/1802.07088.
"""
__all__ = ['IRevNet', 'irevnet301']
import os
import chainer.functions as F
import chainer.links as L
from chainer import Chain
from functools import partial
from chainer.serialize... | [
"[email protected]"
] | |
11a6fcb57a8d8be2f2d2ef039795233e246976d1 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03346/s839224624.py | 607b47a18949a8482e6d9a712cdca3e6c434dd8e | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 745 | py | import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter... | [
"[email protected]"
] | |
fd423a0b542b090db684de0a6a6f97329d80eeda | 129ea5d4b576639da63cf94dd3d1adb27422aa03 | /ceshi.py | 77dff77147c176733aea9a6bd577b26228b2cbda | [] | no_license | lianzhang132/bookroom | 55392db40bdf4bfd4d49c33d4dfb60947f954061 | 2bebdbd90be3fc356efdb6514688d1b6c7cb3c48 | refs/heads/master | 2020-07-11T01:29:03.630781 | 2019-08-26T07:21:45 | 2019-08-26T07:21:45 | 204,419,274 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,399 | py | import unittest
from run import app
import json
# # 可以借助于 urllib,requeset 发送请求
# import urllib
# import requests
# 登录测试
class LoginTest(unittest.TestCase):
# 测试用户名,密码 为空的测试方法
def setUp(self):
app.testing = True
# 调用测试代码之前一定会执行
# 初始化的代码 执行 放在这里
self.client = app.test_client()
... | [
"[email protected]"
] | |
901fa07849d22ed8b30cf47e067a33598d238cf6 | 916480ae24345193efa95df013f637e0a115653b | /web/transiq/api/management/commands/save_blackbuck_data.py | ef02a5eccb3223c25f6cb6c0b3b3b085eb722b2e | [
"Apache-2.0"
] | permissive | manibhushan05/tms | 50e289c670e1615a067c61a051c498cdc54958df | 763fafb271ce07d13ac8ce575f2fee653cf39343 | refs/heads/master | 2022-12-11T07:59:30.297259 | 2021-09-08T03:24:59 | 2021-09-08T03:24:59 | 210,017,184 | 0 | 0 | Apache-2.0 | 2022-12-08T02:35:01 | 2019-09-21T16:23:57 | Python | UTF-8 | Python | false | false | 303 | py | from django.core.management.base import BaseCommand
from api.blackbuck import fetch_blackbuck_data
class Command(BaseCommand):
args = 'Arguments not needed'
help = 'Django admin command to save blackbuck data'
def handle(self, *args, **options):
fetch_blackbuck_data(clean=True)
| [
"[email protected]"
] | |
a1ea1cd0c4454fea650614ef561225696796a60d | f9d564f1aa83eca45872dab7fbaa26dd48210d08 | /huaweicloud-sdk-organizations/huaweicloudsdkorganizations/v1/model/tag_resource_req_body.py | f43bc9df67f8aa35a1f1ec41372a38258bee7053 | [
"Apache-2.0"
] | permissive | huaweicloud/huaweicloud-sdk-python-v3 | cde6d849ce5b1de05ac5ebfd6153f27803837d84 | f69344c1dadb79067746ddf9bfde4bddc18d5ecf | refs/heads/master | 2023-09-01T19:29:43.013318 | 2023-08-31T08:28:59 | 2023-08-31T08:28:59 | 262,207,814 | 103 | 44 | NOASSERTION | 2023-06-22T14:50:48 | 2020-05-08T02:28:43 | Python | UTF-8 | Python | false | false | 3,188 | py | # coding: utf-8
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class TagResourceReqBody:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute... | [
"[email protected]"
] | |
28764e6985747a21ef890844cef47baaea2ac122 | 9d77c2434b0e804af2ecaf4a4ea6d99f6ac6d96d | /preprocessing/tf_image.py | b84b4284cb4af7ec6da652d92872d7f69efdf48a | [
"MIT"
] | permissive | UpCoder/ISBI_LiverLesionDetection | cce7c118601548eef8bfeeedfe4f50d88411a7df | e21ce360e55092a16acc4d147a1418a53545d562 | refs/heads/master | 2022-12-12T12:57:50.299718 | 2019-04-03T03:49:43 | 2019-04-03T03:49:43 | 179,206,267 | 8 | 1 | MIT | 2022-12-08T16:02:31 | 2019-04-03T03:49:00 | Python | UTF-8 | Python | false | false | 17,125 | py | # Copyright 2015 The TensorFlow Authors and Paul Balanca. 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 re... | [
"[email protected]"
] | |
3fb518dd7c6ff02dc92ef2aab9f585d679d2e42e | 85a9ffeccb64f6159adbd164ff98edf4ac315e33 | /pysnmp/HUAWEI-MIRROR-MIB.py | aa7dce312e3994d2b844631d194be929f967ddd7 | [
"Apache-2.0"
] | permissive | agustinhenze/mibs.snmplabs.com | 5d7d5d4da84424c5f5a1ed2752f5043ae00019fb | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | refs/heads/master | 2020-12-26T12:41:41.132395 | 2019-08-16T15:51:41 | 2019-08-16T15:53:57 | 237,512,469 | 0 | 0 | Apache-2.0 | 2020-01-31T20:41:36 | 2020-01-31T20:41:35 | null | UTF-8 | Python | false | false | 26,682 | py | #
# PySNMP MIB module HUAWEI-MIRROR-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HUAWEI-MIRROR-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:35:05 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Ma... | [
"[email protected]"
] | |
dd54c49f97d052f3d01d460d92b0d7b59506280b | 8dc84558f0058d90dfc4955e905dab1b22d12c08 | /tools/cygprofile/patch_orderfile.py | 071861e53b11cf764d6c45f7196291be77777555 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"LGPL-2.1-only",
"MIT",
"LGPL-2.0-or-later",
"Apache-2.0",
"LGPL-2.0-only",
"LicenseRef-scancode-unknown"
] | permissive | meniossin/src | 42a95cc6c4a9c71d43d62bc4311224ca1fd61e03 | 44f73f7e76119e5ab415d4593ac66485e65d700a | refs/heads/master | 2022-12-16T20:17:03.747113 | 2020-09-03T10:43:12 | 2020-09-03T10:43:12 | 263,710,168 | 1 | 0 | BSD-3-Clause | 2020-05-13T18:20:09 | 2020-05-13T18:20:08 | null | UTF-8 | Python | false | false | 16,496 | py | #!/usr/bin/env vpython
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Patch an orderfile.
Starting with a list of symbols in a binary and an orderfile (ordered list of
sections), matches the symbols i... | [
"[email protected]"
] | |
f453a36bcee504e1fc87eb4a16f5709e38556740 | 415a8a4315e6331b2a157de8a1429fe0562729f8 | /python/TryCatch.py | 75b958f68079d3ef596723ff8107b476c5de2643 | [] | no_license | alfaceor/programming-examples | 784690dd1104e4adbdf958e4163b3b462f635881 | abea970a54cfab0eacc5280ae62383495e9e6eeb | refs/heads/master | 2022-05-04T23:14:30.503114 | 2022-04-29T10:11:45 | 2022-04-29T10:11:45 | 36,015,541 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 290 | py | #!/usr/bin/python
import numpy as np
for i in range(4):
try:
data = np.loadtxt("NoExiste.dat")
except IOError as e:
print "Oops!"
pass
for i in range(5):
try:
data = np.loadtxt("NoExiste.dat")
except IOError as e:
print "NO PASS!"
break
print "Fuck U!!!"
| [
"alfaceor"
] | alfaceor |
afe52020807529d3d426f1f80748977c241334c4 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_137/548.py | 6499377835513cc99a4e2110302f4abf9f61a149 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 755 | py | data = open('minesweeper.txt')
mines = {}
while True:
line = data.readline()
line = line.split()
if len(line) == 0:
break
R = int(line[0])
C = int(line[1])
M = int(line[2])
line = data.readline().strip()
if line == 'Impossible':
mines[(R, C, M)] = 'Impossible'
else:... | [
"[email protected]"
] | |
4b270fa9d701f65ef4e79353a53e22d43df8424f | ad9782856ec2f860fccbefa5e75a896691b8e1cc | /MonteCarlo/test/opt6s3l/crab_step2_VBF_HToBB_OT613_200_IT4025_opt6s3l.py | 8031794a20b9cb961ae352984ee3b6e5b3a772d7 | [] | no_license | OSU-CMS/VFPix | 7fe092fc5a973b4f9edc29dbfdf44907664683e5 | 4c9fd903219742a4eba1321dc4181da125616e4c | refs/heads/master | 2020-04-09T05:52:05.644653 | 2019-01-09T13:44:22 | 2019-01-09T13:44:22 | 30,070,948 | 0 | 0 | null | 2018-11-30T13:15:54 | 2015-01-30T12:26:20 | Python | UTF-8 | Python | false | false | 944 | py | from CRABClient.UserUtilities import config, getUsernameFromSiteDB
config = config()
config.General.requestName = 'VBF_HToBB_14TeV_step2_923_PU200_OT613_200_IT4025_opt6s3l'
config.General.workArea = 'crab'
config.General.transferOutputs = True
config.General.transferLogs = True
config.JobType.pluginName = 'Analysis'... | [
"[email protected]"
] | |
5a308f6b7f9ceacdf803dead7dbd5a2dfc85628e | 9aa1885bfd666b5d3719c29334c9769bbe88d3e0 | /bin/cache-purge-consumer.py | d1bd99303ae097493edde7eadcd860165b207716 | [] | permissive | praekelt/django-ultracache | 9c240cfad4660afdb7e679192ca0f4b05bab1831 | 476eb8a4935043f4fc6901ed3541ececed1664bf | refs/heads/develop | 2022-01-27T18:20:00.062349 | 2020-05-29T09:58:01 | 2020-05-29T09:58:01 | 38,880,711 | 32 | 4 | BSD-3-Clause | 2022-01-06T22:24:32 | 2015-07-10T13:02:45 | Python | UTF-8 | Python | false | false | 3,973 | py | """Subscribe to RabbitMQ and listen for purge instructions continuously. Manage
this script through eg. supervisor."""
import json
import traceback
from multiprocessing.pool import ThreadPool
from optparse import OptionParser
from time import sleep
import pika
import requests
import yaml
class Consumer:
channe... | [
"[email protected]"
] | |
0e224f6a0ff6149cf70f6a426a50cdc40b769be9 | 8d1ceed7720e374691829d78007ea146a9030e4f | /arkestra_clinical_studies/lister.py | 5905346c3c39dba5232bfa745f6c1a2ba387225d | [
"BSD-2-Clause"
] | permissive | gonff/arkestra-clinical-studies | 25ef186207781bbc979f7f12bdef194802d9c71c | d75540e006a5d8b1ccb6d05a8253eba9c9fb0a79 | refs/heads/master | 2021-01-18T05:10:23.067652 | 2014-05-21T11:19:03 | 2014-05-21T11:19:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,978 | py | from django.db.models import Q
from django.utils.translation import ugettext_lazy as _
from arkestra_utilities.generic_lister import (
ArkestraGenericLister, ArkestraGenericList, ArkestraGenericFilterList,
ArkestraGenericFilterSet
)
from arkestra_utilities.settings import MULTIPLE_ENTITY_MODE
from .models... | [
"[email protected]"
] | |
3b15efcd4c58e73f9d4c0135da5f36a883347fa3 | d170efa06e6e682c71961fe1213298e5a68193c3 | /python/python/rotate/test_rotate.py | fc39d304949523ec047f2d1eddf13bc3a777fc50 | [
"MIT"
] | permissive | iggy18/data-structures-and-algorithms | 45b9ebf3c0820968bda62c0ebd90a9cfd65b3902 | 700ef727ca7656724120a1873af4bd4bce5962f4 | refs/heads/main | 2023-02-27T04:45:12.535801 | 2021-02-08T22:41:28 | 2021-02-08T22:41:28 | 300,975,693 | 0 | 0 | MIT | 2021-02-12T18:39:18 | 2020-10-03T20:42:08 | JavaScript | UTF-8 | Python | false | false | 232 | py | from rotate import rotate
def test_rotate():
assert rotate
def test_rotate_works_properly():
x = [[1,2,3], [1,2,3], [1,2,3]]
actual = rotate(x)
expected = [[1,1,1], [2,2,2], [3,3,3,]]
assert actual == expected
| [
"[email protected]"
] | |
5b5318e9339850b6265dc415340e362ff7e63894 | 8f3336bbf7cd12485a4c52daa831b5d39749cf9b | /Python/diameter-of-binary-tree.py | 2f8d44152f1d1d7bc911f4df55398ee39e93ccf0 | [] | no_license | black-shadows/LeetCode-Topicwise-Solutions | 9487de1f9a1da79558287b2bc2c6b28d3d27db07 | b1692583f7b710943ffb19b392b8bf64845b5d7a | refs/heads/master | 2022-05-30T22:16:38.536678 | 2022-05-18T09:18:32 | 2022-05-18T09:18:32 | 188,701,704 | 240 | 110 | null | 2020-05-08T13:04:36 | 2019-05-26T15:41:03 | C++ | UTF-8 | Python | false | false | 501 | py | # Time: O(n)
# Space: O(h)
class Solution(object):
def diameterOfBinaryTree(self, root):
"""
:type root: TreeNode
:rtype: int
"""
return self.depth(root, 0)[1]
def depth(self, root, diameter):
if not root:
return 0, diameter
... | [
"[email protected]"
] | |
ca8bebbb101f6f0a7ea337d1d0365016720fb6b6 | cf09d6430e37b5460d7208d6cae6d3af0fa15925 | /jsonbot/jsb/lib/config.py | 87dc5bc6d9858b7446409e090713d466ea5d113e | [
"MIT"
] | permissive | Lujeni/old-projects | 2bbf0ff89852a3e4a9677475a615d2ee4b07d635 | 657304c8b017a98935de9728fc695abe8be7cc4f | refs/heads/master | 2021-03-12T23:08:34.054777 | 2014-10-16T23:10:15 | 2014-10-16T23:10:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 21,266 | py | # jsb/lib/config.py
#
#
""" config module. config is stored as item = JSON pairs. """
## jsb imports
from jsb.utils.trace import whichmodule, calledfrom
from jsb.utils.lazydict import LazyDict
from jsb.utils.exception import handle_exception
from jsb.utils.name import stripname
from datadir import getdatadir
from er... | [
"[email protected]"
] | |
5d0ee6b0dc39b9f92bdb2eef54ed35b8d54a32c9 | 696e35ccdf167c3f6b1a7f5458406d3bb81987c9 | /content/test/gpu/gpu_tests/gpu_integration_test.py | 9f991d50206a63aaaaa763e1e5b49a5a4108a461 | [
"BSD-3-Clause"
] | permissive | mgh3326/iridium-browser | 064e91a5e37f4e8501ea971483bd1c76297261c3 | e7de6a434d2659f02e94917be364a904a442d2d0 | refs/heads/master | 2023-03-30T16:18:27.391772 | 2019-04-24T02:14:32 | 2019-04-24T02:14:32 | 183,128,065 | 0 | 0 | BSD-3-Clause | 2019-11-30T06:06:02 | 2019-04-24T02:04:51 | null | UTF-8 | Python | false | false | 10,996 | py | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
from telemetry.testing import serially_executed_browser_test_case
from telemetry.util import screenshot
from gpu_tests import exception_form... | [
"[email protected]"
] | |
96fd3506464c392a8fd723e5f4d4aeaf7d0ba1cc | 09e5cfe06e437989a2ccf2aeecb9c73eb998a36c | /modules/cctbx_project/cctbx/libtbx_refresh.py | b1206d46a3f922f73066f670596a7b7a0ef8f24f | [
"BSD-3-Clause-LBNL",
"BSD-3-Clause"
] | permissive | jorgediazjr/dials-dev20191018 | b81b19653624cee39207b7cefb8dfcb2e99b79eb | 77d66c719b5746f37af51ad593e2941ed6fbba17 | refs/heads/master | 2020-08-21T02:48:54.719532 | 2020-01-25T01:41:37 | 2020-01-25T01:41:37 | 216,089,955 | 0 | 1 | BSD-3-Clause | 2020-01-25T01:41:39 | 2019-10-18T19:03:17 | Python | UTF-8 | Python | false | false | 1,790 | py | from __future__ import absolute_import, division, print_function
import os
from libtbx.utils import warn_if_unexpected_md5_hexdigest
if self.env.is_ready_for_build():
message_template = ' Generating C++ files in:\n "%s"'
# eltbx
from cctbx.source_generators.eltbx import generate_henke_cpp
from cctbx.sourc... | [
"[email protected]"
] | |
264b62e7d0d2651cf9ec655cdfb6fafd32babdd4 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_201/2701.py | 4dfd25441bfd296e14ceefcf2861b262d56462e9 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,353 | py | import math
def get_stall(arg):
l = []
arg.sort()
for p1, p2 in zip(arg, arg[1:]):
diff = abs(p1 - p2)
if not l:
l.append(diff)
l.append(p1+(diff//2))
l.append(p1)
elif l[0] < diff:
l.clear()
l.append(diff)
l.a... | [
"[email protected]"
] | |
a28f99427e7b585a4de577169e2d4afd3ab4e90e | 618522a8ffed585e27701b9acb1a1171e3c5c924 | /salience_sum/module/encoder.py | 845e220e59a1dd02f3abb3eeec33d31e13a09aba | [] | no_license | blodstone/Salience_Sum | 9795c2a1c03c86218a8c4560ba65f7d1ff5f65e8 | ce2e9e316a68c18bd523ba9e3d1e3ea286bbf068 | refs/heads/master | 2020-08-29T11:49:40.695618 | 2020-01-21T16:17:18 | 2020-01-21T16:17:18 | 218,023,295 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,495 | py | import torch
from allennlp.modules import Seq2SeqEncoder
from allennlp.nn.util import get_lengths_from_binary_sequence_mask
from torch.nn import LSTM, Linear, Sequential, ReLU
from typing import Dict, Tuple
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
@Seq2SeqEncoder.register('salience_en... | [
"[email protected]"
] | |
2a9bf81297de2e77ef26a208ce9dd789aafb71d2 | 40248f9e5ed813fbb966df515ece9193cebf889d | /exapi/request_creators/hitbtc/market_data/interface.py | a1dc6f761c714843d5db467ba83515a00f5001a5 | [
"MIT"
] | permissive | astsu-dev/exapi1 | 29bc22e0949e835d6ea6887e9c52288584a095eb | 1ef39ccdd77e9ddb60ec6eaa16a2cc26e1ac3e12 | refs/heads/main | 2023-05-08T20:08:18.435247 | 2021-06-02T11:25:11 | 2021-06-02T11:25:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,161 | py | """Has interface for hitbtc market data request creator."""
from typing import Optional, Protocol
from exapi.request_creators.request import Request
from exapi.typedefs.hitbtc import (CandlesPeriod, Currencies, Currency,
IntervalValue, SortBy, SortDirection,
... | [
"[email protected]"
] | |
ad33747c00bc3429bacdc1bf31667c00daab67fc | 5f09c2581c28751589871068d1faa9297859d2f3 | /insert_banco.py | 737b50ad7286cc87824d9969603d863b81f055e2 | [] | no_license | fandrefh/curso-python-e-django-senac | f68b4b4ce7071ac78034afdaf63251ed0422fa56 | 8a418a7d9acd12c3ca8820c5589d5d02476d3d0c | refs/heads/master | 2021-01-20T20:28:53.311346 | 2016-08-27T20:48:44 | 2016-08-27T20:48:44 | 65,097,253 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 492 | py | import sqlite3
conn = sqlite3.connect("clientes.db")
cursor = conn.cursor()
cursor.execute("""
INSERT INTO cad_clientes (nome, idade) VALUES ('Regis', 35);
""")
cursor.execute("""
INSERT INTO cad_clientes (nome, idade) VALUES ('Aloisio', 87);
""")
cursor.execute("""
INSERT INTO cad_clientes (nome, idade) VALUES (... | [
"[email protected]"
] | |
47ec0b8daf1be246726bb38689c9967a2047b1d3 | 76050b0002dac757866a9fb95dc199918da665bb | /acme/utils/iterator_utils_test.py | ebe21f3a602dbf5b91ce2fc5ab468a73080be58f | [
"Apache-2.0"
] | permissive | RaoulDrake/acme | 2829f41688db68d694da2461d301fd6f9f27edff | 97c50eaa62c039d8f4b9efa3e80c4d80e6f40c4c | refs/heads/master | 2022-12-29T01:16:44.806891 | 2022-12-21T14:09:38 | 2022-12-21T14:10:06 | 300,250,466 | 0 | 0 | Apache-2.0 | 2020-10-01T11:13:03 | 2020-10-01T11:13:02 | null | UTF-8 | Python | false | false | 1,249 | py | # Copyright 2018 DeepMind Technologies Limited. 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 ... | [
"[email protected]"
] | |
e0484f2e58aab4de9e567907b0778dc57f18cc34 | 574d7955a32116e2fa315b5f75f124863ca70614 | /blog/admin.py | ee30581a5a79496780dd1cb38aa3d14fd815c3c0 | [] | no_license | harunurkst/django_course_04 | b15cb8e52a821b1157e1ac4dbe56b89fdebce848 | 5d93290cbee0f47795b6c9ecef8d33d8afe859d1 | refs/heads/master | 2022-11-22T20:48:36.196279 | 2020-07-26T17:20:37 | 2020-07-26T17:20:37 | 278,904,995 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 294 | py | from django.contrib import admin
from .models import Post, Author, Category, Comment
class PostAdmin(admin.ModelAdmin):
prepopulated_fields = {"slug": ("title",)}
admin.site.register(Post, PostAdmin)
admin.site.register(Author)
admin.site.register(Category)
admin.site.register(Comment) | [
"[email protected]"
] | |
2c4021079c1f87e0901a6b63792636763cca4222 | 71fbc701cf090716b213b4025e0d96e73f452aa1 | /thonny/plugins/micropython/bare_metal_backend.py | e2c05ea6a3bf2167e2930a0585828115101b1047 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | bosige/thonny | 678f3ab05185dbead41b0a04c2db025834008fc9 | 78317670d1ec8e8cd39f4bb2e5c6a2927fedd7b3 | refs/heads/master | 2022-12-11T12:25:49.484079 | 2020-09-16T12:48:55 | 2020-09-16T12:48:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 42,084 | py | import binascii
import datetime
import logging
import os
import queue
import re
import sys
import time
from _ast import Not
from textwrap import dedent, indent
from typing import BinaryIO, Callable, Optional, Tuple, Union
from thonny.backend import UploadDownloadMixin
from thonny.common import (
BackendEvent,
... | [
"[email protected]"
] | |
e7f7098869934c8e98d694a44382c6cb60479ac5 | 717e0190612c20b9f5d26fec77e293c9b53f0e17 | /numpywren/binops.py | cc74dd808794dfddd673758ef5304f701452777c | [
"Apache-2.0"
] | permissive | cloudbutton/lithops-array | 8336e16cf9b80e8745ba9c63256294d2d7206a1c | 5e74b881c7db95eccdccf986f1e3b0dc44603889 | refs/heads/main | 2023-04-23T08:15:42.450676 | 2021-04-06T13:40:15 | 2021-04-06T13:40:15 | 344,418,860 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,962 | py | import numpy as np
from .matrix import BigMatrix
from .matrix_utils import chunk, generate_key_name_binop
from . import matrix_utils
import concurrent.futures as fs
import os
import lithops
import time
from . import lambdapack as lp
from . import job_runner
def _gemm_remote_0(block_pairs, XY, X, Y, reduce_idxs=[0], ... | [
"[email protected]"
] | |
bb17b14f9cc0eaaeb740793ec62035edb8637a1f | 71f00ed87cd980bb2f92c08b085c5abe40a317fb | /Data/GoogleCloud/google-cloud-sdk/lib/surface/privateca/subordinates/activate.py | f9f73fb40b0bb8a564338a2a28bed7e1e5cf84c6 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | factoryofthesun/Rao-NLP | 2bd8269a8eed1cb352c14c8fde88e3111ccca088 | 87f9723f5ee51bd21310d58c3425a2a7271ec3c5 | refs/heads/master | 2023-04-18T08:54:08.370155 | 2020-06-09T23:24:07 | 2020-06-09T23:24:07 | 248,070,291 | 0 | 1 | null | 2021-04-30T21:13:04 | 2020-03-17T20:49:03 | Python | UTF-8 | Python | false | false | 3,547 | py | # Lint as: python3
# -*- coding: utf-8 -*- #
# Copyright 2020 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.... | [
"[email protected]"
] | |
0b06190e016241e069caff14b930d190e7d5f83f | 00d1856dbceb6cef7f92d5ad7d3b2363a62446ca | /djexample/images/forms.py | dce42d13b42c6f5dec509f69a49c66092513e4b3 | [] | no_license | lafabo/django_by_example | 0b05d2b62117f70681c5fc5108b4072c097bc119 | 3cf569f3e6ead9c6b0199d150adf528bd0b2a7c5 | refs/heads/master | 2020-12-29T17:54:12.894125 | 2016-06-04T10:35:22 | 2016-06-04T10:35:22 | 58,313,176 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,039 | py | from django import forms
from .models import Image
from urllib import request
from django.core.files.base import ContentFile
from django.utils.text import slugify
class ImageCreateForm(forms.ModelForm):
class Meta:
model = Image
fields = ('title', 'url', 'description')
widgets = {
'url': forms.HiddenInput
... | [
"[email protected]"
] | |
548053fb510f44628c5bba5b2b7d3b962e5a86e1 | b0b87924d07101e25fa56754ceaa2f22edc10208 | /workspace/python_study/python_gspark/15-2.py | 88ec8fdb1e8e43f9901bf9017a64fa128a312bad | [] | no_license | SoheeKwak/Python | 2295dd03e5f235315d07355cbe72998f8b86c147 | e1a5f0ecf31e926f2320c5df0e3416306b8ce316 | refs/heads/master | 2020-04-02T13:49:58.367361 | 2018-11-23T09:33:23 | 2018-11-23T09:33:23 | 154,499,204 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,204 | py | import numpy as np
a1 = np.arange(24)
a2 = np.arange(24).reshape((4,6))
a3 = np.arange(24).reshape((2,4,3))
a1[5]=1000
a2[0,1]=1000
a3[1,0,1]=1000 #2번째 행, 1번째열, 2번째depth
print(a1)
print(a2)
print(a2[1:3,1:5])
print(a2[1:-1,1:-1])
print(a2[:,1:3])
a2[:,1:3]=99
print(a2)
a1 = np.arange(1,25).reshape(4,6)
even_a = a1%2=... | [
"[email protected]"
] | |
79062eb15e440d5eabf1579ae5b439589bb6db1b | 1d928c3f90d4a0a9a3919a804597aa0a4aab19a3 | /python/statsmodels/2015/8/ar_model.py | 087a9e037a3426c2ccc54e0b8158c690ff99e06c | [] | no_license | rosoareslv/SED99 | d8b2ff5811e7f0ffc59be066a5a0349a92cbb845 | a062c118f12b93172e31e8ca115ce3f871b64461 | refs/heads/main | 2023-02-22T21:59:02.703005 | 2021-01-28T19:40:51 | 2021-01-28T19:40:51 | 306,497,459 | 1 | 1 | null | 2020-11-24T20:56:18 | 2020-10-23T01:18:07 | null | UTF-8 | Python | false | false | 34,034 | py | from __future__ import division
from statsmodels.compat.python import iteritems, range, string_types, lmap
import numpy as np
from numpy import dot, identity
from numpy.linalg import inv, slogdet
from scipy.stats import norm
from statsmodels.regression.linear_model import OLS
from statsmodels.tsa.tsatools import (lagm... | [
"[email protected]"
] | |
2a267560a422f7c6eff4da4d5177892beb9c99f9 | abeec076f89231c4dd589e84def8301e653d6e20 | /orders/views.DEP.py | 9ac624bc2133c17490ffaf2dc25abdf9178452e3 | [] | no_license | gibil5/pcm_restaurant | 1cde6ee2780d3aa39dbc26dd9583f8465a1ff13a | a56ec01c533ed2b6e198de9813f9518a3eca2d14 | refs/heads/master | 2020-08-29T20:10:13.606229 | 2019-12-01T19:48:47 | 2019-12-01T19:48:47 | 218,160,478 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 982 | py | def add_order(request, employee_id):
print()
print('Add order')
title = 'Add Order'
cook = get_object_or_404(Employee, pk=employee_id) # Get Object
print(cook)
table = Table.objects.first()
# Create and populate
if request.method == 'POST':
print('Create and populate')
form = lib.NewOrderForm(reques... | [
"[email protected]"
] | |
0302d39e78724531b2f09e38788aa5f669609958 | 82ca891008793f570668a7f2c760ae0f22d40494 | /src/VAMPzero/Component/Wing/Aileron/Geometry/tipYLocation.py | 078b55d940fb68c2cb44be5e6bcef8800cd0f839 | [
"Apache-2.0"
] | permissive | p-chambers/VAMPzero | 22f20415e83140496b1c5702b6acbb76a5b7bf52 | 4b11d059b1c7a963ec7e7962fa12681825bc2f93 | refs/heads/master | 2021-01-19T10:49:06.393888 | 2015-06-24T10:33:41 | 2015-06-24T10:33:41 | 82,208,448 | 1 | 0 | null | 2017-02-16T17:42:55 | 2017-02-16T17:42:55 | null | UTF-8 | Python | false | false | 2,598 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
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 wr... | [
"[email protected]"
] | |
b8e22c9f0854b5dda5191d086ca45baaa3e98d35 | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/exercism_data/python/twelve-days/5d8ab06a7a6b4acdb6be11d098786e90.py | 8c8955c509d158350c07858c3b2a1c0d850b89cb | [] | no_license | itsolutionscorp/AutoStyle-Clustering | 54bde86fe6dbad35b568b38cfcb14c5ffaab51b0 | be0e2f635a7558f56c61bc0b36c6146b01d1e6e6 | refs/heads/master | 2020-12-11T07:27:19.291038 | 2016-03-16T03:18:00 | 2016-03-16T03:18:42 | 59,454,921 | 4 | 0 | null | 2016-05-23T05:40:56 | 2016-05-23T05:40:56 | null | UTF-8 | Python | false | false | 2,893 | py | #twelve-days
def verse(day):
day = day
if day == 1:
return "On the first day of Christmas my true love gave to me, a Partridge in a Pear Tree.\n"
elif day == 2:
return "On the second day of Christmas my true love gave to me, two Turtle Doves, and a Partridge in a Pear Tree.\n"
elif day ==3:
return "On the t... | [
"[email protected]"
] | |
6b0c2baf8952bfe46d3c9ac541be5644748044b9 | e6a48a7d5ee2df232355f5d5488fa1cd3c53ce89 | /tests.py | 7f298b580cf0a2453c734408872a2479a954b2cd | [] | no_license | charleycodes/testing-py | f1e07cb678d52e26cd1cdb6bc34dcf7a3c2b331f | 963a50d0074083cf02a253ef77cef46db5c7ff7a | refs/heads/master | 2021-06-05T11:10:35.950108 | 2016-10-14T19:57:53 | 2016-10-14T19:57:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,406 | py | import unittest
import party
class PartyTests(unittest.TestCase):
"""Tests for my party site."""
def setUp(self):
self.client = party.app.test_client()
party.app.config['TESTING'] = True
def test_homepage(self):
result = self.client.get("/")
self.assertIn("I'm having a p... | [
"[email protected]"
] | |
4f5bb79b857664488c0166556416293328d76651 | b45230162af7ea65416f61cbbbcf1011a422692b | /tests/test_pygrade.py | 3508d0f3021904959e65229d569c26efa43bef25 | [
"ISC"
] | permissive | Joaron4/pygrade | 47a12ce4e8925d20e0d4384f4f39a102bf149f97 | 68416ba92afd3ef634a83560935941d03265df8f | refs/heads/master | 2023-03-16T18:47:48.576434 | 2020-12-01T02:52:15 | 2020-12-01T02:52:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 413 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_pygrade
----------------------------------
Tests for `pygrade` module.
"""
import unittest
from pygrade import pygrade
class TestPygrade(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_000_something(s... | [
"[email protected]"
] | |
93d2a93c3766b10060f1163b0518cd03a037d4de | e2468c60810764971f2dae2b959650b553042810 | /1859_sortingTheSentence.py | e35fc60b5dd3422f73069456f2c324e9ddef7fc4 | [] | no_license | awesome-liuxiao/leetcodesolution | 9a01b6f36266149ae7fe00625785d1ada41f190a | 3637cd1347b5153daeeb855ebc44cfea5649fc90 | refs/heads/master | 2023-06-08T13:42:14.653688 | 2023-06-01T08:39:35 | 2023-06-01T08:39:35 | 213,380,224 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 340 | py | class Solution:
def sortSentence(self, s: str) -> str:
ls = s.split()
res = [""]*len(ls)
for word in ls:
res[int(word[-1])-1] = word[0:len(word)-1]
return ' '.join(res)
X = Solution()
s = "is2 sentence4 This1 a3"
print(X.sortSentence(s))
s = "Myself2 Me1 I4 and3"
prin... | [
"[email protected]"
] | |
ce03108274b37dc8809c8883264cd853956d525c | 17f918c06ca476f79d28d712abfa356b2dcfb6c7 | /koishi/plugins/automation_touhou_feed/events.py | c0284afe3effa51079eda45d6079ea30d3d6ee10 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | HuyaneMatsu/Koishi | eb87693ad34da2483efe2b6bdaa4f3fae417e491 | 74f92b598e86606ea3a269311316cddd84a5215f | refs/heads/master | 2023-08-23T22:54:37.006530 | 2023-08-23T20:26:49 | 2023-08-23T20:26:49 | 163,678,458 | 17 | 6 | NOASSERTION | 2023-06-14T14:18:27 | 2018-12-31T15:18:31 | Python | UTF-8 | Python | false | false | 1,167 | py | __all__ = ()
from ...bots import SLASH_CLIENT
from ..automation_core import get_touhou_feed_enabled
from .logic import (
reset_touhou_feeders, reset_channel, should_touhou_feed_in_channel, try_remove_channel, try_remove_guild,
try_update_channel, try_update_guild
)
@SLASH_CLIENT.events
async def channel_cr... | [
"[email protected]"
] | |
33c67722dbb06879c8fb968c5865e09c1513e5c0 | 21fc3622bb7a3a89a8ed9dec932919936fb1ce36 | /buildout-cache/eggs/plone.app.dexterity-2.1.20-py2.7.egg/plone/app/dexterity/browser/types.py | deb8a418a6eb1ee8ec737110deb355f2e9dceb54 | [] | no_license | erlantostes/plone | 4bc1ccba9e0ab77ce5370489f6b47b806c889c29 | 3a5fb7574cee269a99b148eef695256805ce1a45 | refs/heads/master | 2020-04-01T18:04:32.927641 | 2018-10-17T11:22:59 | 2018-10-17T11:22:59 | 153,469,831 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,233 | py | # -*- coding: utf-8 -*-
from OFS.SimpleItem import SimpleItem
from Products.CMFCore.utils import getToolByName
from Products.Five.browser.pagetemplatefile \
import ViewPageTemplateFile as FiveViewPageTemplateFile
from ZPublisher.BaseRequest import DefaultPublishTraverse
from plone.app.dexterity import _
from plone.... | [
"[email protected]"
] | |
55d1af3af949c3e159d60b095ce259600e812de8 | 156f5362e7381b96f3b2839f94de8778b005274d | /tests/bindings/test_bindings.py | 99e0ca3c3d74647d7e7e35d5cb0769064383656b | [
"MIT",
"CC-BY-3.0"
] | permissive | sairam4123/godot-python | 3f8bfcd989ae1b06ec6bf5e01462895b9f5f5fe0 | a95ed14f6e53ae4eb59e6bd03efb0db90b070bc6 | refs/heads/master | 2021-05-20T20:43:18.764693 | 2020-03-02T13:49:06 | 2020-03-02T13:49:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,157 | py | import pytest
import godot
from godot import Vector3, Object, Node, Node2D, PluginScript, OK
def test_free_node():
v = Node.new()
v.free()
# `check_memory_leak` auto fixture will do the bookkeeping
def test_expose_contains_constant():
assert "OK" in dir(godot)
assert OK is not None
def test_e... | [
"[email protected]"
] | |
43d0b28b0b29cb0bb324df2d02c8001c4efe022f | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/verbs/_sting.py | bafade4da0ff73720d1509ad0c570e87d50fe446 | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 650 | py |
#calss header
class _STING():
def __init__(self,):
self.name = "STING"
self.definitions = [u'If an insect, plant, or animal stings, it produces a small but painful injury, usually with a poison, by brushing against the skin or making a very small hole in the skin: ', u'to cause sharp but usually temporary pain:... | [
"[email protected]"
] | |
8ff0cf9f0326d522054d28a689a09a1bba5d292a | 1c8ea05ed65d76ab0e7bf8e642e0573e34d880ab | /BOJ/continue_number.py | fd2990487b7814cfe23effa2dc2d61bb8c9f9285 | [] | no_license | PARKJUHONG123/turbo-doodle | 1d259c88544d5e52ed375f119792363f5c1b4377 | 6b073281236af50949042c1a6b269752037cb829 | refs/heads/master | 2023-01-14T13:41:58.299164 | 2020-11-23T12:12:30 | 2020-11-23T12:12:30 | 259,669,738 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 336 | py | # 1~9 : 9
# 10~99 : 90
# 100~999 : 900
# 1000~9999 : 9000
import sys
def nine_num(size):
num = pow(10, size - 1)
return num * 9
N = sys.stdin.readline().split()[0]
length = len(N)
answer = 0
for i in range(1, length):
answer += nine_num(i) * i
num = pow(10, length - 1)
answer += (int(N) - num + 1) * leng... | [
"[email protected]"
] | |
f5282b92dfb6af26a78d6b27d683a125d46c98c4 | 5196d8aeeded2cb8f3414d14b9a0050f69cb809e | /tools/train_nsfw.py | 99da01a0b02cff24860ef3151884daca10ce4c5d | [] | no_license | SethWen/nsfw-classification-tensorflow | 0a81ad422f762eedf188f4f8e7ec2161d6428276 | 6dfcb16fd655e66b9dd83237bbe89e84aa5322b9 | refs/heads/master | 2022-12-19T04:30:57.035744 | 2020-09-26T05:53:04 | 2020-09-26T05:53:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 21,848 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time : 19-2-15 下午8:53
# @Author : MaybeShewill-CV
# @Site : https://github.com/MaybeShewill-CV/CRNN_Tensorflow
# @File : train_nsfw.py
# @IDE: PyCharm
"""
Train nsfw model script
"""
import argparse
import os
import os.path as ops
import time
import math
impo... | [
"[email protected]"
] | |
c016beb5d996c1ca1390e35753f3e429fdebd5a6 | 4ec6ed4ebcb9346042669e6aa03be0e502ed48b3 | /leetcode/convert-sorted-array-to-binary-search-tree.py | 84e69232dd85203daae4a1d75c1f376e113add3f | [] | no_license | shonihei/road-to-mastery | 79ed41cb1ad0dc2d0b454db2ccc7dd9567b03801 | 312bdf5101c3c1fc9a4d0b6762b5749ca57efe08 | refs/heads/master | 2021-01-22T19:59:17.038641 | 2017-11-16T15:21:55 | 2017-11-16T15:21:55 | 85,266,186 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 415 | py | """
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.
"""
class TreeNode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None
def sortedArrayToBST(nums):
if not nums:
return None
mid = len(nums) // 2
root = TreeNode(nums[mid])
roo... | [
"[email protected]"
] | |
146ac52c155f6a21ab8f406bde451d1ce53f6925 | 0d464df42f5cc3c9a3b992ae9ff6160e5da5701d | /CHAPTER 12 (sorting and selection)/decorated_merge_sort.py | 1ac0479db866b540143a43557da8834d51e73996 | [
"MIT"
] | permissive | ahammadshawki8/DSA-Implementations-in-Python | 6b61d44e638bfb7f6cf3a8b1fc57d15777313420 | fc18b54128cd5bc7639a14999d8f990190b524eb | refs/heads/master | 2022-12-26T03:54:16.229935 | 2020-10-07T05:17:55 | 2020-10-07T05:17:55 | 267,899,551 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 527 | py | from linked_queue_class import *
from merge_sort_linked import *
def decorated_merge_sort(data,key=None):
"""Demonstration of the decorate-sort-undercorate pattern."""
if key is not None:
for j in range(len(data)):
data[j] = _Item(key(data[j]), data[j]) # decorate each element
merge_s... | [
"[email protected]"
] | |
ad1b85e24bddffba1588102c18d19e9a7f5c4a35 | ca75f7099b93d8083d5b2e9c6db2e8821e63f83b | /z2/part2/batch/jm/parser_errors_2/925229167.py | e0ca9ce450c7ef5983d536f9dd4a53f2584448db | [
"MIT"
] | permissive | kozakusek/ipp-2020-testy | 210ed201eaea3c86933266bd57ee284c9fbc1b96 | 09aa008fa53d159672cc7cbf969a6b237e15a7b8 | refs/heads/master | 2022-10-04T18:55:37.875713 | 2020-06-09T21:15:37 | 2020-06-09T21:15:37 | 262,290,632 | 0 | 0 | MIT | 2020-06-09T21:15:38 | 2020-05-08T10:10:47 | C | UTF-8 | Python | false | false | 1,170 | py | from part1 import (
gamma_board,
gamma_busy_fields,
gamma_delete,
gamma_free_fields,
gamma_golden_move,
gamma_golden_possible,
gamma_move,
gamma_new,
)
"""
scenario: test_random_actions
uuid: 925229167
"""
"""
random actions, total chaos
"""
board = gamma_new(2, 3, 3, 3)
assert board is... | [
"[email protected]"
] | |
dff782445f083c8852c95a14f37f05b290a8043b | ba6921a268198bc0af433622c021533905f5d462 | /scripts/in_container/run_migration_reference.py | 43692b2c458d2e0a50e097a818144f39bdf31553 | [
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] | permissive | potiuk/airflow | b6447765b1a7b586a3d6c8d7ba9262f6bf68fbfd | ca2f3013bcb123c4b3973a5b85de77094bf2c459 | refs/heads/main | 2023-08-30T13:05:50.698888 | 2023-05-21T21:08:14 | 2023-05-21T21:26:14 | 173,467,275 | 8 | 7 | Apache-2.0 | 2023-05-21T21:58:40 | 2019-03-02T15:50:53 | Python | UTF-8 | Python | false | false | 6,272 | py | #!/usr/bin/env python3
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# ... | [
"[email protected]"
] | |
40a42af680a63e3a17bb18fe661dc09bb9d98b56 | 6ef8abce322da7a6acf8b940801d7c2286b55f42 | /Programmers/compressString.py | fccb357227a2eb76df7a508063b6c1f0361d23a2 | [] | no_license | 702criticcal/1Day1Commit | 747a61308e2fae87bad6369cd0bc481bdc89b29a | aec375b8b41de1ed5366c714cc6a204905fb2763 | refs/heads/master | 2023-01-31T16:47:24.457584 | 2020-12-18T03:42:28 | 2020-12-18T03:42:28 | 287,663,502 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,211 | py | def solution(s):
if len(s) == 1:
return 1
answer = len(s)
# 압축할 수 있는 문자열의 최대 길이는 길이 / 2까지이다.
for cut in range(1, len(s) // 2 + 1):
result = ''
cnt = 1
temp_str = s[:cut]
# 1부터 길이 / 2까지 잘라서 문자열 비교.
for i in range(cut, len(s) + cut, cut):
# 앞의 ... | [
"[email protected]"
] | |
b86e21edd60be743de7e055ffd942d0674c17b3d | f82757475ea13965581c2147ff57123b361c5d62 | /gi-stubs/repository/GstGL/GLRenderbufferAllocationParams.py | 23d2ebdb5969b2516f3587d02945af8e1fa95f4d | [] | no_license | ttys3/pygobject-stubs | 9b15d1b473db06f47e5ffba5ad0a31d6d1becb57 | d0e6e93399212aada4386d2ce80344eb9a31db48 | refs/heads/master | 2022-09-23T12:58:44.526554 | 2020-06-06T04:15:00 | 2020-06-06T04:15:00 | 269,693,287 | 8 | 2 | null | 2020-06-05T15:57:54 | 2020-06-05T15:57:54 | null | UTF-8 | Python | false | false | 6,772 | py | # encoding: utf-8
# module gi.repository.GstGL
# from /usr/lib64/girepository-1.0/GstGL-1.0.typelib
# by generator 1.147
"""
An object which wraps an introspection typelib.
This wrapping creates a python module like representation of the typelib
using gi repository as a foundation. Accessing attributes of the ... | [
"[email protected]"
] | |
54e634a91b6785558588740c3c225ac1aa4c252c | bdf3c98e33c6bc9c8e0332043cc5a3a3f5e8ea42 | /src/mantis_model/catkin_generated/pkg.develspace.context.pc.py | c4db2075151b9a2c10d3a4400eb7142cca173946 | [] | no_license | jstestsuite/ros-test | c33e244794287e2665cace847a9faf1b596ddf92 | b0bb5b06c1c18b804c0f0a4e2deb4d88be894d1f | refs/heads/master | 2020-04-11T16:54:41.401198 | 2019-02-13T00:44:14 | 2019-02-13T00:44:14 | 161,938,209 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 394 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "mantis_model"
PROJECT_SPACE_DIR = "/h... | [
"[email protected]"
] | |
11673e6ceffc1b11d4fa20923c84c7444b026e7c | f559b4d607cfdd3f192daed155ed8b0d263c71b2 | /env/bin/easy_install | 8340023df64d2030d9cc8e363b11ec8e070ff138 | [] | no_license | chris-baby/WbOnline | 6270015e9a7897b413a3fe97e2aca8a33f744995 | 91425f677d2e7c2a0ac9aeb8c1ee47d75f9b9321 | refs/heads/master | 2022-07-14T23:57:56.162760 | 2020-05-11T13:56:22 | 2020-05-11T13:56:22 | 263,056,250 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 271 | #!/Users/tongtong/Desktop/root/bwOnline/env/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from setuptools.command.easy_install import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"[email protected]"
] | ||
4f8956babeaeca36bcee259d46ecb8ec16dbe067 | dc084a369e0f767bc5296739b24813470869522f | /main.py | ad9e07dfe136e778903fe0b117e3877fc9bb1631 | [] | no_license | JakeRoggenbuck/player_data_finder | 4a539ac7963f1f5025eda89c96c75e76a8268574 | 0ba87a5511810ac10d3f40049b21541b9a8be1bb | refs/heads/master | 2022-12-02T06:59:34.054775 | 2020-08-19T05:56:55 | 2020-08-19T05:56:55 | 288,645,171 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,609 | py | from position_reader import PositionReader
from config import Config
from ftplib import FTP
import inquirer
import json
import os
class FTPConnection:
def __init__(self):
self.server = FTP()
def connect(self):
self.server.connect(Config.host, Config.port)
def login(self):
self.se... | [
"[email protected]"
] | |
d80b410b5348e0c0627858a462910f433012546d | 53be3b2a18d4df2e675525a610f4e7dab8c0de6f | /myems-api/core/version.py | 0b884d96063823d791417aec31bff4eac4345132 | [
"MIT"
] | permissive | yxw027/myems | 16dc82fa26328e00adbba4e09301c4cf363ad28d | ea58d50c436feafb1a51627aa4d84caf8f3aee08 | refs/heads/master | 2023-09-03T17:57:18.728606 | 2021-11-04T14:13:42 | 2021-11-04T14:13:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 473 | py | import falcon
import simplejson as json
class VersionItem:
@staticmethod
def __init__():
""""Initializes VersionItem"""
pass
@staticmethod
def on_options(req, resp, id_):
resp.status = falcon.HTTP_200
@staticmethod
def on_get(req, resp):
result = {"version": ... | [
"[email protected]"
] | |
0e541e32d749a1302541ce19ccdf2b6c8d442a16 | bdc4ae3d691fcb50405235d963012d84ea8b8a06 | /src/b2r2b_youbot/message.py | d8d3c2a392182dba8f26573558c936ec091c3489 | [] | no_license | AndreaCensi/rosstream2boot | 53552a256979f072c7bf4abb9bc01eed3c960e97 | 7cce8cf270b67e8c9e5abe6cdfed9d5969a82c00 | refs/heads/master | 2021-01-01T19:11:04.669798 | 2013-07-13T14:11:28 | 2013-07-13T14:11:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,658 | py | from b2r2b_youbot import get_JointVelocities, get_JointValue, get_JointPositions
__all__ = ['get_joint_position_msg', 'get_joint_velocity_msg']
def get_joint_velocity_msg(array, timeStamp=None):
'''
:param array: float array with values to the joints
'''
JointVelocities = get_JointVelocities... | [
"[email protected]"
] | |
5fa21fadd207f6922a41ad01fad7d3295d852e5d | de358ba57518d65393c810da20c53e1c41494bff | /ALGOPYTHON/array2.py | 616580064c661e80fb9915007e10e09ad9a0cb0f | [] | no_license | avirupdandapat/ALGOPROJECT | 43eef94b13e38452cdc6a506b17b6fee581a07e1 | 55b60a0c6e51cae900e243505f6a4557ad4d7069 | refs/heads/master | 2022-12-29T13:02:54.655976 | 2020-10-18T12:23:57 | 2020-10-18T12:23:57 | 305,095,375 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 252 | py | import subprocess
subprocess.run('dir', shell=True)
if __name__ == '__main__':
t = int(input())
for t_itr in range(t):
n = int(input())
q = list(map(int, input().rstrip().split()))
# arr = minimumBribes(a)
print(q)
| [
"[email protected]"
] | |
eadaff38311d9b7fd22fb7f22162f2934b0a0a94 | 87bb2b9258c887e8fbcaca08d18e5d95ae96462d | /Codewars/Python/7kyu/7kyu_Largest pair in array.py | aec94dec63fcfa2b5e935b6ac65a4134e7f49ecf | [] | no_license | KonradMarzec1991/Codewars-LeetCode | a9e4d09f4271fecb3a7fc1ee436358ac1bbec5e4 | 442113532158f5a3ee7051a42e911afa5373bb5f | refs/heads/master | 2023-04-21T17:04:37.434876 | 2021-05-11T21:47:14 | 2021-05-11T21:47:14 | 166,555,499 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 99 | py | def largest_pair_sum(numbers):
from heapq import nlargest
return sum(nlargest(2, numbers))
| [
"[email protected]"
] | |
0b7b8cc2114aca9d05671b6b132a1a909f63ca55 | f97a267b066f64177e382346e36cc06c25a3a6b1 | /src/quart/typing.py | a1be3a52dbb6ec3db1d23f2cf3688f19f97a56fe | [
"MIT"
] | permissive | p-unity-lineage/quart | a54ec9a1e6f61159c5c2688e24a2b54462bcd231 | 14efcd92f37bb4ef78d463d6d145f71c61665470 | refs/heads/master | 2023-03-31T23:56:56.881288 | 2021-04-11T09:28:28 | 2021-04-11T09:28:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,067 | py | from __future__ import annotations
import os
from datetime import datetime, timedelta
from types import TracebackType
from typing import (
Any,
AnyStr,
AsyncContextManager,
AsyncGenerator,
Awaitable,
Callable,
Dict,
Generator,
List,
Optional,
Tuple,
Type,
TYPE_CHECKI... | [
"[email protected]"
] | |
e2d70ea6765a4d2275d7fe4d41337de6d45d5449 | 8f6aa9ac9c8c2e409875bbf36fbc49b3eb37d88b | /enthought/traits/ui/qt4/key_binding_editor.py | 12c440438d2c61dd566c494f787af54b63d61666 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | enthought/etsproxy | 5660cf562c810db2ceb6b592b6c12274bce96d73 | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | refs/heads/master | 2023-03-27T04:51:29.297305 | 2020-12-02T09:05:18 | 2020-12-02T09:05:18 | 1,632,969 | 3 | 1 | NOASSERTION | 2020-12-02T09:05:20 | 2011-04-18T22:29:56 | Python | UTF-8 | Python | false | false | 61 | py | # proxy module
from traitsui.qt4.key_binding_editor import *
| [
"[email protected]"
] | |
f2db845f6ed0455eb72a111058ae787634caf967 | 181e9cc9cf4e52fcc6e9979890cc5b41e7beb756 | /Module 1/02_Codes/miscellaneous/4-TenSecondCameraCapture.py | ffe0427cfa69b339ad2ddf078ae4c70f2d0dfbde | [
"MIT"
] | permissive | PacktPublishing/OpenCV-Computer-Vision-Projects-with-Python | ace8576dce8d5f5db6992b3e5880a717996f78cc | 45a9c695e5bb29fa3354487e52f29a565d700d5c | refs/heads/master | 2023-02-09T14:10:42.767047 | 2023-01-30T09:02:09 | 2023-01-30T09:02:09 | 71,112,659 | 96 | 72 | null | null | null | null | UTF-8 | Python | false | false | 515 | py | import cv2
cameraCapture = cv2.VideoCapture(0)
fps = 30 # an assumption
size = (int(cameraCapture.get(cv2.cv.CV_CAP_PROP_FRAME_WIDTH)),
int(cameraCapture.get(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT)))
videoWriter = cv2.VideoWriter(
'MyOutputVid.avi', cv2.cv.CV_FOURCC('I','4','2','0'), fps, size)
success, frame = ... | [
"[email protected]"
] | |
07008e999f02c35e6a8c414d9321c124e90b441c | 1127be36a03677a9bf7226c87c4f6aec0b5a4fd7 | /pocdb.py | df443d329c92b598262c214df108ab1d4563081d | [] | no_license | chriskcl/AngelSword | b44de0194502a6a3e3d38b7fd0f949747f697b63 | f2dc09ee41422ef07c43b64a0aba523378cb7667 | refs/heads/master | 2021-05-14T00:44:28.175262 | 2018-01-04T08:11:32 | 2018-01-04T08:11:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 31,189 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
name: 漏洞字典
referer: unknow
author: Lucifer
description: 引入main接口
'''
from cms.cmsmain import *
from system.systemmain import *
from industrial.industrialmain import *
from hardware.hardwaremain import *
from information.informationmain import *
class pocdb_pocs:
def... | [
"[email protected]"
] | |
49cc7ab24fcf653315ed8b0a0c768e7420905965 | 4a2eac368e3e2216b0cd1dd70224da3ca4ee7c5e | /SecretManager/owlbot.py | 50c7c9bb3fb0bdd3f2138665e345cd50407ebd4c | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | googleapis/google-cloud-php | 856a940eee158eafa6f2443f8d61813779216429 | ad50f749431287e7074279e2b4fa32d6d6c2c952 | refs/heads/main | 2023-09-06T05:48:31.609502 | 2023-09-05T20:27:34 | 2023-09-05T20:27:34 | 43,642,389 | 642 | 330 | Apache-2.0 | 2023-09-13T22:39:27 | 2015-10-04T16:09:46 | PHP | UTF-8 | Python | false | false | 1,871 | py | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | [
"[email protected]"
] | |
1ac2383f4356c4123f3f0424f2d41eeb4d65eef7 | e00d41c9f4045b6c6f36c0494f92cad2bec771e2 | /multimedia/sound/celt/actions.py | ebbc7ace073cda6de994f48d6de40b6054304d7d | [] | no_license | pisilinux/main | c40093a5ec9275c771eb5fb47a323e308440efef | bfe45a2e84ea43608e77fb9ffad1bf9850048f02 | refs/heads/master | 2023-08-19T00:17:14.685830 | 2023-08-18T20:06:02 | 2023-08-18T20:06:02 | 37,426,721 | 94 | 295 | null | 2023-09-14T08:22:22 | 2015-06-14T19:38:36 | Python | UTF-8 | Python | false | false | 407 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
def setup():
autotools.configure("--disable-static")
def build():
autotools.ma... | [
"[email protected]"
] | |
ef1dee427fd1886305f8a5488e392f4572706fde | bc9cb3f0f104778026ca6f3a07595dd5d6ce840f | /DIA_01/introducao_python/aula/linguagem_python/05_conversao_de_tipos/exemplo_03.py | ba7db84a4bd8944411f327a1af919b84d29843a2 | [] | no_license | JohnRhaenys/escola_de_ferias | ff7a5d7f399459725f3852ca6ee200486f29e7d4 | 193364a05a5c7ccb2e5252c150745d6743738728 | refs/heads/master | 2023-01-12T11:30:46.278703 | 2020-11-19T14:59:10 | 2020-11-19T14:59:10 | 314,278,831 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 138 | py | # Convertendo float para string
real = 1.23
print(real)
print(type(real))
print()
string = str(real)
print(string)
print(type(string)) | [
"[email protected]"
] | |
2bb80d3e76ad8eeb95f106c44017b8529377a982 | b715c79f52cf2c95927c19edf8f6d64f5322bf7d | /PJLink/start_kernel.py | 94e029381f90239bda03ffb6c2dba92292df92be | [
"MIT"
] | permissive | sunt05/PJLink | 4d6805b07070c0a2c7452464358ebcf075eeabb0 | cd623efebf4ddae8c5ea75b3ee08fe9819e78b40 | refs/heads/master | 2020-03-29T05:46:10.707576 | 2018-09-20T07:36:51 | 2018-09-20T07:36:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,842 | py | """start_kernel is a convenience script for starting a kernel thread in python
"""
import sys, os, argparse
sys.stdout.flush()
true_file = os.path.abspath(__file__)
sys.path.insert(0, os.path.dirname(os.path.dirname(true_file)))
from PJLink import *
### I should do a lot more argparsing... but I don't
parser = ... | [
"[email protected]"
] | |
86ca70ec064a1b497a8d74d0e3d0844b4fa7c668 | 3e1d9a25426e2a157a69f3c4c6c41b5216deb8de | /LeetCode/Python/Easy/Heaters.py | 749d9559b5c23d9ae2cfa22db847e1981c3ed067 | [] | no_license | jashansudan/Data-Structures-and-Algorithms | 4e420586bc773c5fc35b7ce7be369ca92bf51898 | e38cfb49b3f9077f47f1053207f4e44c7726fb90 | refs/heads/master | 2021-01-12T10:47:05.754340 | 2018-02-13T01:01:50 | 2018-02-13T01:01:50 | 72,697,093 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 412 | py | class Solution(object):
def findRadius(self, houses, heaters):
houses.sort()
heaters.sort()
i, maxDistance = 0, 0
for house in houses:
while (i < len(heaters) - 1 and
abs(heaters[i] - house) >= abs(heaters[i + 1] - house)):
i += 1
... | [
"[email protected]"
] | |
d7844833faffeeb6ea09e3c6a4e91c845c8bcd78 | b2d3bd39b2de8bcc3b0f05f4800c2fabf83d3c6a | /examples/pwr_run/checkpointing/new_short/feedback/job13.py | 70a3df461607c82369d2bf42af52327b64207e16 | [
"MIT"
] | permissive | boringlee24/keras_old | 3bf7e3ef455dd4262e41248f13c04c071039270e | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | refs/heads/master | 2021-11-21T03:03:13.656700 | 2021-11-11T21:57:54 | 2021-11-11T21:57:54 | 198,494,579 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,222 | py | """
#Trains a ResNet on the CIFAR10 dataset.
"""
from __future__ import print_function
import keras
from keras.layers import Dense, Conv2D, BatchNormalization, Activation
from keras.layers import AveragePooling2D, Input, Flatten
from keras.optimizers import Adam
from keras.callbacks import ModelCheckpoint, LearningRa... | [
"[email protected]"
] | |
c250ce17de3d4b5cc6706f63c1977f4f2fcee481 | d6d20681f41102df3feb2b438ef80569bd73730f | /Uge4-numpy/.history/exercises_20200218170520.py | ca2f210387343db0503dbab4b0b5f8b7d2cf8f1b | [] | no_license | MukHansen/pythonAfleveringer | d0ad2629da5ba2b6011c9e92212949e385443789 | 4107c3c378f757733961812dd124efc99623ff2e | refs/heads/master | 2020-12-22T13:27:19.135138 | 2020-05-22T11:35:52 | 2020-05-22T11:35:52 | 236,796,591 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,046 | py | import numpy as np
import matplotlib.pyplot as plt
from collections import OrderedDict
filename = './befkbhalderstatkode.csv'
data = np.genfromtxt(filename, delimiter=',', dtype=np.uint, skip_header=1)
neighb = {1: 'Indre By', 2: 'Østerbro', 3: 'Nørrebro', 4: 'Vesterbro/Kgs. Enghave',
5: 'Valby', 6: 'Vanløse',... | [
"[email protected]"
] | |
4d7a7650d95d9418c7a99e03149894a0c5c686dc | bbe447a740929eaee1955bd9c1517cf760dd5cb9 | /keygrabber/adwords/adwords_api_python_14.2.1/adspygoogle/adwords/zsi/v200909/CampaignService_services.py | f1101c95aafb53ba4c75e90dcf48c195df9f883f | [
"Apache-2.0"
] | permissive | MujaahidSalie/aranciulla | f3d32e7dd68ecfca620fe4d3bf22ecb4762f5893 | 34197dfbdb01479f288611a0cb700e925c4e56ce | refs/heads/master | 2020-09-07T02:16:25.261598 | 2011-11-01T21:20:46 | 2011-11-01T21:20:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,176 | py | ##################################################
# CampaignService_services.py
# generated by ZSI.generate.wsdl2python
##################################################
from CampaignService_services_types import *
import urlparse, types
from ZSI.TCcompound import ComplexType, Struct
from ZSI import client
import... | [
"[email protected]"
] | |
fdd25e91bdb09e58d4f219ef3803e81fd78e0545 | 6493bc4fdf2618b401c7c2acf6e04567a27a1b00 | /klearn/kernels/__init__.py | 1a14748333710a3cb0f1405360498e01722b3acd | [] | no_license | mpharrigan/klearn | 75dc5bfea65ed7018fd42d7eb502b32c4ff7a007 | 697e62993cf3a42444cc9115f8fea0425950fec2 | refs/heads/master | 2021-01-16T00:31:34.616280 | 2014-05-21T22:50:10 | 2014-05-21T22:50:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 142 | py | from .baseclasses import AbstractKernel
from .dotproduct import DotProduct
from .polynomial import Polynomial
from .gaussian import Gaussian
| [
"[email protected]"
] | |
c63339a1a53f68331bf60b14c7938e6240219f5a | 826e10209af5462022e3aff1511f1e48842d32a4 | /promoterz/representation/oldschool.py | 99a894122cd5eb447a3eeae0a2347854961cdb4b | [
"MIT"
] | permissive | IanMadlenya/japonicus | 0309bbf8203525770e237b2b385844ef4a3610ae | 112aabdd3362ca6259ddbe57440cdd583a674022 | refs/heads/master | 2021-04-15T12:06:15.027249 | 2018-03-20T22:23:43 | 2018-03-20T22:23:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,645 | py | #!/bin/python
import random
import json
import os
from copy import deepcopy
from .import Creator
from deap import base
from deap import tools
from deap import algorithms
import numpy as np
from .import Creator
from . .import parameterOperations
def constructPhenotype(stratSettings, individue):
# THIS FUNCTION... | [
"[email protected]"
] | |
56799809ff84f9be3ec51a12f546d1c89424b975 | d305e9667f18127e4a1d4d65e5370cf60df30102 | /tests/ut/python/dataset/test_random_crop_and_resize_with_bbox.py | 2727325e007ba40b6bb6c02558a5846a078903a1 | [
"Apache-2.0",
"MIT",
"Libpng",
"LicenseRef-scancode-proprietary-license",
"LGPL-2.1-only",
"AGPL-3.0-only",
"MPL-2.0-no-copyleft-exception",
"IJG",
"Zlib",
"MPL-1.1",
"BSD-3-Clause",
"BSD-3-Clause-Open-MPI",
"MPL-1.0",
"GPL-2.0-only",
"MPL-2.0",
"BSL-1.0",
"LicenseRef-scancode-unknow... | permissive | imyzx2017/mindspore_pcl | d8e5bd1f80458538d07ef0a8fc447b552bd87420 | f548c9dae106879d1a83377dd06b10d96427fd2d | refs/heads/master | 2023-01-13T22:28:42.064535 | 2020-11-18T11:15:41 | 2020-11-18T11:15:41 | 313,906,414 | 6 | 1 | Apache-2.0 | 2020-11-18T11:25:08 | 2020-11-18T10:57:26 | null | UTF-8 | Python | false | false | 9,546 | py | # Copyright 2020 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... | [
"[email protected]"
] | |
a582cff63bfa1208999424ac532f639d57e4946c | ce6fc44470dcb5fca78cdd3349a7be70d75f2e3a | /AtCoder/Grand 039/A.py | 2ec2212c13eebe7ef3a938d8513f35a3b69c6e01 | [] | no_license | cormackikkert/competitive-programming | f3fa287fcb74248ba218ecd763f8f6df31d57424 | 3a1200b8ff9b6941c422371961a127d7be8f2e00 | refs/heads/master | 2022-12-17T02:02:40.892608 | 2020-09-20T11:47:15 | 2020-09-20T11:47:15 | 266,775,265 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 546 | py | S = input()
K = int(input())
import random
import string
def count(string):
total = 0
i = 1
while i < len(string):
if string[i-1] == string[i]:
total += 1
i += 1
i += 1
return total
if S == len(S) * S[0]:
res = (K * len(S)) // 2
elif S[0] == S[-1]:
... | [
"[email protected]"
] | |
2bea257ba29d7d3568169cd2499598f98eebd812 | 8255dcf7689c20283b5e75a452139e553b34ddf3 | /app/views/dashboard/items/index.py | b38bac919cd8357f3585cc1c835d0bce2c8762e2 | [
"MIT"
] | permissive | Wern-rm/raton.by | 09871eb4da628ff7b0d0b4415a150cf6c12c3e5a | 68f862f2bc0551bf2327e9d6352c0cde93f45301 | refs/heads/main | 2023-05-06T02:26:58.980779 | 2021-05-25T14:09:47 | 2021-05-25T14:09:47 | 317,119,285 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,654 | py | from flask import render_template, redirect, url_for, request
from flask_login import login_required
from flask_paginate import get_page_args
from app import db, logger
from app.controllers.dashboard_controller import dashboard_controller
from app.controllers.pagination import get_pagination
from app.forms.dashboard_i... | [
"[email protected]"
] | |
09e278b839107b839c504a7ee39854da665cd9f9 | 394072f7fd3e2a226aeed78bf0a4f587f4c4e383 | /lambdaExpr/pick_lambda.py | eb8c2306a372907e577c942ccd5c5b4e7827dcb3 | [] | no_license | LeonCrashCode/DRSparsing | ec5cca079a2c73eb512444e1ac86215722e6503a | c7e92beb8878ff2386bc6789e6c17f0d35bf1277 | refs/heads/master | 2020-03-16T09:52:11.217219 | 2019-01-17T14:20:16 | 2019-01-17T14:20:16 | 124,549,958 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 932 | py | import sys
import types
import json
def ascii_encode_dict(data):
ascii_encode = lambda x: x.encode('ascii') if isinstance(x, unicode) else x
return dict(map(ascii_encode, pair) for pair in data.items())
def tostring(expre):
assert type(expre) == types.DictType
re = []
re.append(expre["type"]+"(")
if len(... | [
"[email protected]"
] | |
67b4fdb18932e728d619611ee41d81e11eb82f6e | 02c6b39399c1cfb434ad718c90bed3d8e6310ed0 | /symbolic/symbolic_interval/__init__.py | a05b1f606a6c61911dc1a5c02ffb66d08e5ade09 | [] | no_license | phate09/SafeDRL | 09b8924fa91aa43cf543ea5727ebe4cc8e13c0a5 | 3d4278eaaabb046a90fc1cebd1b5862d63dc5894 | refs/heads/master | 2022-09-17T05:12:28.529329 | 2022-08-29T08:21:32 | 2022-08-29T08:21:32 | 204,663,981 | 8 | 3 | null | 2021-12-02T14:13:46 | 2019-08-27T09:07:04 | Python | UTF-8 | Python | false | false | 97 | py | from .interval import Interval, Symbolic_interval
from .symbolic_network import Interval_network
| [
"[email protected]"
] | |
8ac0480670678ce2f641aae18ee7719838e5f722 | d30c6d691a34fc9181fb71e9712b9505384422ec | /数字,日期和时间/分数的计算_P96.py | be37c7b9b724074146f45662cb34e480751597bf | [] | no_license | shishengjia/PythonDemos | cef474eb01ee9541ba0c70fc0750ee48a025f42f | c0a857b1cacdbb2b6b727a84f95f93b6e86d60c2 | refs/heads/master | 2021-01-01T16:15:19.593635 | 2017-10-26T07:18:46 | 2017-10-26T07:18:46 | 97,797,104 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 328 | py | """
fractions模块
"""
from fractions import Fraction
a = Fraction(1, 2)
b = Fraction(3, 4)
print(a + b) # 5/4
c = a + b
print(c.numerator) # 5 分子
print(c.denominator) # 4 分母
print(float(c)) # 1.25 转化为小数
print(c.limit_denominator(8))
x = 0.625
print(Fraction(*x.as_integer_ratio())) # 5/8 小数化分数
| [
"[email protected]"
] | |
0ce4d0fdfbcbdcb08fd020f84fdb01abca1796f9 | 42685605f569e9d0afadc358ace6ce212e86bf1c | /1_Zadania/Dzien_3/5_Virtualenv_biblioteki/ddd.py | 63411dd73ff18565b3727122a9f9e1681374153c | [] | no_license | Danutelka/Coderslab-Podstawy-Python | e6bdbbd9dc2031cf9ec5d9d3eeba717d22e9ecd7 | eed6a957f081e488ae3c94298718f7b93e17a93c | refs/heads/master | 2020-08-04T15:21:28.058433 | 2019-04-07T19:24:54 | 2019-04-07T19:24:54 | 212,181,477 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 62 | py | import requests
r = requests.get("http://onet.pl")
print(r)
| [
"[email protected]"
] | |
8dff565e4a3145736f3847daf00e0a91801c7e21 | a4275e529b564c3ec5c084fb360c2f4207068477 | /src/montague/validation.py | 9a20e422a8c17d2122978e27db86e67d8d0db92f | [
"MIT"
] | permissive | rmoorman/montague | aacc11837016400e37b69e18b2461a3246c2052c | 423a2a5a773e975fa27f7b61627cc706fb084984 | refs/heads/master | 2020-12-29T01:41:17.262828 | 2015-06-18T00:46:45 | 2015-06-18T00:46:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,702 | py | from __future__ import absolute_import
import collections
import types
def validate_montague_standard_format(config):
for key in ('globals', 'application', 'composite', 'filter', 'server', 'logging'):
assert key in config
assert isinstance(config[key], collections.Mapping)
def validate_config_l... | [
"[email protected]"
] | |
a211852f23f82de502629246d40e8e38a13b64de | 96fe253e9a740b51dcd7f83d6ab01bb248c2bf4b | /patrones_arquitectura/DDD/value_object/prueba_cuenta_bancaria.py | 013e69c83e8ab92979a1390c08af8ed518910598 | [] | no_license | vvalotto/Patrones_Disenio_Python | 7574470752a5f14214434a927c2c5e0faaa592ba | 7ab6a74e9b008c3434af0a56d4c2b6b7de3617bf | refs/heads/master | 2021-04-28T19:16:21.535998 | 2018-10-21T14:05:36 | 2018-10-21T14:05:36 | 121,891,812 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 238 | py | from DDD.value_object.cuenta_bancaria import *
mi_dinero = Dinero(100, Moneda.Pesos)
print(mi_dinero.moneda)
print(mi_dinero.monto)
mi_cuenta = CuentaBancaria(1, mi_dinero)
print(mi_cuenta.balance.monto)
print(mi_cuenta.balance.moneda) | [
"[email protected]"
] | |
a1b6fb392741e41deadbff3e6f9ad7e1f8c4f790 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/63/usersdata/158/31530/submittedfiles/swamee.py | 2c5e1ac2906cab6729e807c9e54f3c38de172e65 | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 396 | py | # -*- coding: utf-8 -*-
import math
f=float(input('digite f:'))
L=float(input('digite L:'))
Q=float(input('digite Q:'))
deltaH=float(input('digite deltaH:'))
v=float(input('digite v:'))
g=9.81
E=0.000002
D=((8*f*L*(Q)**2)/((math.pi)**2*g*deltaH))**1/5
print('D é:%.4f'%D)
Rey=(4*Q)/(math.pi*D*v)
print('Rey é:%.4f'%Rey)
... | [
"[email protected]"
] | |
185d7e4291d29d014020b6b40ebfb2d8398b5f8c | cf444d07d8056416dfba34e73bba128567b7c692 | /readandloadperfpadbenchasof.py | fd9df58a4e0df4d295b906d84dace758c8374d5d | [] | no_license | rtstock/scriptsvapp01 | cf9e993e5253e9a60dc191cca5e34532fa559ee1 | 7c2db888f0dcd92de62c031f9867e1c5cb4cbc0e | refs/heads/master | 2021-01-23T00:29:11.267852 | 2017-03-21T19:24:34 | 2017-03-21T19:24:34 | 85,737,024 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,756 | py | import ftplib
class perform:
#def __init__(self):
# print 'class initialized...'
# #self.DataFilePathName = []
# #self.BuildFilepaths()
def __init__(self,p_datafilepathname):
print 'initialized readandloadperfpadbenchasof.py'
self.DataFilePathName = p_datafilep... | [
"[email protected]"
] | |
912732738030d84355aa57768facc7293bf43a88 | 187a6558f3c7cb6234164677a2bda2e73c26eaaf | /jdcloud_sdk/services/clouddnsservice/models/HostRRlb.py | a70c1c23618e54df92e3c0396719c63ee09311d7 | [
"Apache-2.0"
] | permissive | jdcloud-api/jdcloud-sdk-python | 4d2db584acc2620b7a866af82d21658cdd7cc227 | 3d1c50ed9117304d3b77a21babe899f939ae91cd | refs/heads/master | 2023-09-04T02:51:08.335168 | 2023-08-30T12:00:25 | 2023-08-30T12:00:25 | 126,276,169 | 18 | 36 | Apache-2.0 | 2023-09-07T06:54:49 | 2018-03-22T03:47:02 | Python | UTF-8 | Python | false | false | 1,141 | py | # coding=utf8
# Copyright 2018 JDCLOUD.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
#
# Unless required by applicable law or agreed ... | [
"[email protected]"
] | |
987b92e6df6ed00e5ca4fb6ce748e467405a8347 | f4434c85e3814b6347f8f8099c081ed4af5678a5 | /sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2019_03_22/aio/operations/_certificates_operations.py | 4fdc763e3e5033ecae73c8337024f88ac2e80684 | [
"LicenseRef-scancode-generic-cla",
"MIT",
"LGPL-2.1-or-later"
] | permissive | yunhaoling/azure-sdk-for-python | 5da12a174a37672ac6ed8e3c1f863cb77010a506 | c4eb0ca1aadb76ad892114230473034830116362 | refs/heads/master | 2022-06-11T01:17:39.636461 | 2020-12-08T17:42:08 | 2020-12-08T17:42:08 | 177,675,796 | 1 | 0 | MIT | 2020-03-31T20:35:17 | 2019-03-25T22:43:40 | Python | UTF-8 | Python | false | false | 23,167 | 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 ... | [
"[email protected]"
] | |
a1f08199e9d65120982277c5b73430048437c363 | e751c59ca3c98c8f6a98b7c6fc7167fe615aa1b0 | /streamz/orderedweakset.py | 82136ecdea1138314b8cd2277154f13f468712af | [
"BSD-3-Clause"
] | permissive | yutiansut/streamz | a10e0d2beefd450b5d19cb7d78b4c8a333ebcd48 | e51f0397d27957f8b3bfc78ecdb946cbfbac21b6 | refs/heads/master | 2020-07-10T15:23:35.567092 | 2019-12-24T07:07:43 | 2019-12-24T07:07:43 | 204,297,562 | 1 | 0 | NOASSERTION | 2019-12-24T07:07:44 | 2019-08-25T13:24:35 | Python | UTF-8 | Python | false | false | 977 | py | # -*- coding: utf8 -*-
# This is a copy from Stack Overflow
# https://stackoverflow.com/questions/7828444/indexable-weak-ordered-set-in-python
# Asked by Neil G https://stackoverflow.com/users/99989/neil-g
# Answered/edited by https://stackoverflow.com/users/1001643/raymond-hettinger
import collections
import weakref
... | [
"[email protected]"
] | |
afe7b68eebc859166be1c5e13503095b75df042c | 3527ff6346f98a5b7c51ce3c58428227f4bc8617 | /acwing/800.py | 3e10fbf147a1197999a55e116c697baa1c94510e | [] | no_license | ShawnDong98/Algorithm-Book | 48e2c1158d6e54d4652b0791749ba05a4b85f96d | f350b3d6e59fd5771e11ec0b466f9ba5eeb8e927 | refs/heads/master | 2022-07-17T04:09:39.559310 | 2022-07-13T15:46:37 | 2022-07-13T15:46:37 | 242,317,482 | 0 | 0 | null | 2020-10-11T14:50:48 | 2020-02-22T09:53:41 | C++ | UTF-8 | Python | false | false | 277 | py | n, m, x = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
i = 0
j = m -1
while i< n:
while j >= 0 and A[i] + B[j] > x:
j -= 1
if j >= 0 and A[i] + B[j] == x:
print(f'{i} {j}')
break
i += 1
| [
"[email protected]"
] | |
5d9d6c025131f2a3f97852b760a240950735157f | 46eb22dbe3514fc586ca57dd5e9a2ef1e486ed7e | /src/lanyon/parser.py | 5e43a9d5db751938ac34fd688b085ebb43fc5d44 | [
"BSD-3-Clause"
] | permissive | arthurk/lanyon | 06d37d2e96358a190f8926a65f9f8df00db09393 | d4c319cc5659c50aa3e356cbf74e976ba82acc4b | refs/heads/master | 2021-01-17T07:41:28.518803 | 2011-04-16T11:37:06 | 2011-04-16T11:37:06 | 804,624 | 5 | 2 | null | 2016-06-06T13:33:41 | 2010-07-29T06:45:49 | Python | UTF-8 | Python | false | false | 6,056 | py | import datetime
import re
from os.path import splitext
class ParserException(Exception):
"""Exception raised for errors during the parsing."""
pass
class Parser(object):
output_ext = None
def __init__(self, settings, source):
self.settings = settings
self.source = source
self.... | [
"[email protected]"
] | |
ae5543276e6ec4f6dc0823885d5ba0a303c5e818 | cfc3fa658f826d02308453e557d82758895399c2 | /datasets/covid_qa_deepset/covid_qa_deepset.py | d43c1e5924c54b5a73b245220e1e6d2c37d225e1 | [
"Apache-2.0"
] | permissive | meehawk/datasets | cac530ec0e17514c01cdff30302521d6303ed93b | b70141e3c5149430951773aaa0155555c5fb3e76 | refs/heads/master | 2023-03-29T12:51:54.700891 | 2021-04-08T17:22:53 | 2021-04-08T17:22:53 | 355,996,122 | 9 | 0 | Apache-2.0 | 2021-04-08T17:31:03 | 2021-04-08T17:31:02 | null | UTF-8 | Python | false | false | 4,607 | py | # coding=utf-8
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
#
# 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/lice... | [
"[email protected]"
] | |
64a3215ec3906affa3702053fa372ce9684ba680 | 60a831fb3c92a9d2a2b52ff7f5a0f665d4692a24 | /IronPythonStubs/release/stubs.min/System/Windows/Media/Animation_parts/Timeline.py | fc7d6ac0df9229690da3777f143d98381abde625 | [
"MIT"
] | permissive | shnlmn/Rhino-Grasshopper-Scripts | a9411098c5d1bbc55feb782def565d535b27b709 | 0e43c3c1d09fb12cdbd86a3c4e2ba49982e0f823 | refs/heads/master | 2020-04-10T18:59:43.518140 | 2020-04-08T02:49:07 | 2020-04-08T02:49:07 | 161,219,695 | 11 | 2 | null | null | null | null | UTF-8 | Python | false | false | 14,492 | py | class Timeline(Animatable,ISealable,IAnimatable,IResource):
""" Defines a segment of time. """
def AllocateClock(self,*args):
"""
AllocateClock(self: Timeline) -> Clock
Creates a System.Windows.Media.Animation.Clock for this System.Windows.Media.Animation.Timeline.
Returns: A clock for this System.Win... | [
"[email protected]"
] | |
a92459e9e8ae533390d8cd2ec5542ac8dbe5714e | 7e9977bbf988fe2136529640afb08460cce833bc | /HeroRegistrationProj/manage.py | c117eea3936972ec247c0372ef508f7c1c854c19 | [
"Apache-2.0"
] | permissive | cs-fullstack-2019-spring/django-fields-widgets-cw-itayanna | b8c761376f89fd0c8b4d2fead46b5dc75a7194df | 7702fe9b541dfaf5ac0458729bcdacd538b6c232 | refs/heads/master | 2020-04-27T13:24:13.427170 | 2019-03-12T14:37:11 | 2019-03-12T14:37:11 | 174,368,562 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 552 | py | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "HeroRegistrationProj.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import... | [
"[email protected]"
] | |
10f5ab79003ff1e2cbfd7c31754b890b1ab31a6d | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03283/s440786665.py | fe6e5bf6654473cf6b9ff410adac87f56d2c24dd | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,237 | py | class BIT:
def __init__(self, n):
self.n = n
self.bit = [0]*(self.n+1) # 1-indexed
def init(self, init_val):
for i, v in enumerate(init_val):
self.add(i, v)
def add(self, i, x):
# i: 0-indexed
i += 1 # to 1-indexed
while i <= self.n:
... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.