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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
977ced426a86f741bf9b0bca34da63716ac47957 | 1b72ba557512a33c6fe896648496233448550ce6 | /top_100_liked/python3/longest_palindromic_substring.py | c6bd27d67f4a849eb78897c4ee58266ff4c01789 | [] | no_license | henrylaih41/LeetCode | e59c8c091186935dd88ffdfe6d52c270ddb4bc20 | 1ea2880c2c1ff03b23ac8f4a278acbe02cdaee99 | refs/heads/main | 2023-07-30T23:25:46.068109 | 2021-09-16T02:48:46 | 2021-09-16T02:48:46 | 342,108,527 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,704 | py | class Solution:
### Expand Center
def AlongestPalindrome(self, s: str) -> str:
maxx, start, end = 0, 0, 0
for i in range(len(s)-1):
# even palindrome center
maxx = max(maxx, self.expandCenter(s, i, i+1))
if(end - start + 1 < maxx):
start = i -... | [
"henrylaih41@gmail.com"
] | henrylaih41@gmail.com |
5b7cde2bb7a440017b23e75d48ec2d98ded43879 | 0809673304fe85a163898983c2cb4a0238b2456e | /src/lesson_runtime_features/platform_platform.py | 64f03d319cb3ab477ff1353fafda7e1fd0169301 | [
"Apache-2.0"
] | permissive | jasonwee/asus-rt-n14uhp-mrtg | 244092292c94ff3382f88f6a385dae2aa6e4b1e1 | 4fa96c3406e32ea6631ce447db6d19d70b2cd061 | refs/heads/master | 2022-12-13T18:49:02.908213 | 2018-10-05T02:16:41 | 2018-10-05T02:16:41 | 25,589,776 | 3 | 1 | Apache-2.0 | 2022-11-27T04:03:06 | 2014-10-22T15:42:28 | Python | UTF-8 | Python | false | false | 156 | py | import platform
print('Normal :', platform.platform())
print('Aliased:', platform.platform(aliased=True))
print('Terse :', platform.platform(terse=True))
| [
"peichieh@gmail.com"
] | peichieh@gmail.com |
548a4fdb63026ae6af3a69b82f70642e4fd8a37d | fd7b34b6f4261b0e81961594f38338e8e2c1a4cc | /src/command_modules/azure-cli-backup/setup.py | 3284b6826682f42a104f956bbe5505e1b066b288 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | WangYeJian/azure-cli-test | 3158da9f5dfb4321e3dfef3eed8cd213abb78dc7 | decdaa80a2d99a1a5753ed6f620d3cea5947bada | refs/heads/master | 2023-01-13T05:51:48.247079 | 2019-06-27T01:35:24 | 2019-06-27T01:35:24 | 194,001,154 | 0 | 0 | MIT | 2022-12-27T15:34:45 | 2019-06-27T01:25:56 | Python | UTF-8 | Python | false | false | 2,040 | py | #!/usr/bin/env python
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# ----------------------------------------------... | [
"ericw2@wicresoft.com"
] | ericw2@wicresoft.com |
b81934196f2241e9589da67bb279b5232ac201e8 | bd639cd74f395031a6fb592539da47f9de328144 | /.history/polls/views_20210720163231.py | a8a6ea62edc536b742917f8b8fcd03418fcd9756 | [] | no_license | ninjapolski2/djangoLearning | c6082df9e14cf086d204f6d37dbd9d1c209338ed | 7a07777587ae54eca1ca45d9518716120f871d51 | refs/heads/master | 2023-06-22T04:42:53.923592 | 2021-07-23T18:21:47 | 2021-07-23T18:21:47 | 387,380,428 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 910 | py | from django.http import HttpResponse, Http404
from django.shortcuts import render, get_
from django.template import loader
from .models import Question
def index(request):
latest_question_list = Question.objects.order_by("-pub_date")[:5]
context = {'latest_question_list': latest_question_list,}
return rend... | [
"73312515+ninjapolski2@users.noreply.github.com"
] | 73312515+ninjapolski2@users.noreply.github.com |
205d9224e15149034de29e44918aa39669ec46ab | bad62c2b0dfad33197db55b44efeec0bab405634 | /sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/_key_vault_management_client.py | d8af9051377895a46d11c57234bd3a05063bdd85 | [
"LicenseRef-scancode-generic-cla",
"MIT",
"LGPL-2.1-or-later"
] | permissive | test-repo-billy/azure-sdk-for-python | 20c5a2486456e02456de17515704cb064ff19833 | cece86a8548cb5f575e5419864d631673be0a244 | refs/heads/master | 2022-10-25T02:28:39.022559 | 2022-10-18T06:05:46 | 2022-10-18T06:05:46 | 182,325,031 | 0 | 0 | MIT | 2019-07-25T22:28:52 | 2019-04-19T20:59:15 | Python | UTF-8 | Python | false | false | 7,097 | 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"
] | test-repo-billy.noreply@github.com |
fa1a819e3e80edc2e6a6836b53f246ec9bf57d51 | 8a378ddae37f834a1c00ba6e63d3ff8f9cabbffb | /tailpos_sync/tailpos_sync/doctype/device_category/device_category.py | 0d8661c8f145f7ba5497ceb3b8a1b0471ba07938 | [
"MIT"
] | permissive | aakvatech/tailpos-sync | 2985d998d0e7ee394c68da578e19819f00cc4acd | 7f199459769395d8d21e8effad1af39b1512c205 | refs/heads/master | 2020-09-08T19:16:57.633724 | 2020-04-22T05:56:49 | 2020-04-22T05:56:49 | 221,221,323 | 2 | 0 | NOASSERTION | 2020-04-22T05:56:50 | 2019-11-12T13:13:32 | null | UTF-8 | Python | false | false | 275 | py | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Bai Web and Mobile Lab and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class DeviceCategory(Document):
pass
| [
"jangeles@bai.ph"
] | jangeles@bai.ph |
ce8c135c87d5d2812fbbe14147ea598c31313339 | e1abc07dc0dd71225b1f90d03a66222e7aa2b66c | /test/dream3/test_d3c4.py | 0313b68b35ca0cef79c54c59d2cfde134eca5bec | [] | no_license | apratap/dreamtools | f1c0c6bbf0f15b4175d4915ada1f0b78fc71e35c | cdb99ffe812b840b4c6d35ca39f0ce547e75c702 | refs/heads/master | 2021-01-17T05:03:40.625498 | 2015-08-06T14:30:08 | 2015-08-06T14:30:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 442 | py | from dreamtools import D3C4
from easydev.easytest import assert_list_almost_equal
def test_d3c4_10():
# we have templates for 10 only
s = D3C4()
aurocs = []
for batch in ['Ecoli1', 'Ecoli2', 'Yeast1']:
filename = s.download_template('10_'+ batch)
print filename
aurocs.append(... | [
"cokelaer@gmail.com"
] | cokelaer@gmail.com |
f33001bdbc06d6c66405cffcbeb864e101468c13 | 34599596e145555fde0d4264a1d222f951f49051 | /pcat2py/class/256421f2-5cc5-11e4-af55-00155d01fe08.py | a705827f5f41182eec98c9754eed5d6a93c6319e | [
"MIT"
] | permissive | phnomcobra/PCAT2PY | dc2fcbee142ce442e53da08476bfe4e68619346d | 937c3b365cdc5ac69b78f59070be0a21bdb53db0 | refs/heads/master | 2021-01-11T02:23:30.669168 | 2018-02-13T17:04:03 | 2018-02-13T17:04:03 | 70,970,520 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,530 | py | #!/usr/bin/python
################################################################################
# 256421f2-5cc5-11e4-af55-00155d01fe08
#
# Justin Dierking
# justindierking@hardbitsolutions.com
# phnomcobra@gmail.com
#
# 10/24/2014 Original Construction
################################################################... | [
"phnomcobra@gmail.com"
] | phnomcobra@gmail.com |
73abffab8a45dae504747a90e90f0986f1dec3eb | 353def93fa77384ee3a5e3de98cfed318c480634 | /.history/week01/homework01/gettop10frommaoyam01_20200626151301.py | 0a8fe6e0a0cc0ce001c1a10738923c6df6f25a66 | [] | no_license | ydbB/Python001-class01 | d680abc3ea1ccaeb610751e3488421417d381156 | ad80037ccfc68d39125fa94d2747ab7394ac1be8 | refs/heads/master | 2022-11-25T11:27:45.077139 | 2020-07-19T12:35:12 | 2020-07-19T12:35:12 | 272,783,233 | 0 | 0 | null | 2020-06-16T18:28:15 | 2020-06-16T18:28:15 | null | UTF-8 | Python | false | false | 2,933 | py | # 使用requests,bs4库,爬取猫眼电影top10的电影名称、电影类型、上映时间,并以utf-8的字符集保存到csv文件中
import requests
from bs4 import BeautifulSoup as bs
import re
import pandas as pd
maoyanUrl = "https://maoyan.com/board/4";
header = {
'Content-Type': 'text/plain; charset=UTF-8',
'Cookie' : '__mta=251934006.1593072991075.1593140975947.159... | [
"31039587+ydbB@users.noreply.github.com"
] | 31039587+ydbB@users.noreply.github.com |
fd76b849e1c42b691c62b7517ca09059a9eabc09 | e5d5fa28999bcc6c642bb42dda93afd38e272b81 | /LeetCode/746. Min Cost Climbing Stairs/solve2.py | 6684edab3e50b6ce4787de2aedb2d98986ca1855 | [] | no_license | chiahsun/problem_solving | cd3105969983d16d3d5d416d4a0d5797d4b58e91 | 559fafa92dd5516058bdcea82a438eadf5aa1ede | refs/heads/master | 2023-02-05T06:11:27.536617 | 2023-01-26T10:51:23 | 2023-01-26T10:51:23 | 30,732,382 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 289 | py | class Solution:
def minCostClimbingStairs(self, cost):
"""
:type cost: List[int]
:rtype: int
"""
dp = [cost[0], cost[1]]
for i in range(2, len(cost)):
dp.append(min(dp[-1], dp[-2])+cost[i])
return min(dp[-1], dp[-2])
| [
"chiahsun0814@gmail.com"
] | chiahsun0814@gmail.com |
abe966505d4a34924a5b147288bc574573add92f | 5917a63a6d16de893f54e86a70f5d881648112c1 | /Py1_spc-master/Lec7/main2.py | 36d41d432e80bd5c3b6eaac8031865f26b6a3f2d | [] | no_license | litded/lessons | f14e8e68577d417fc87eaca1c426f535baa04e8b | af2e0f6cae61878a833a7eebd7c2509d930ede48 | refs/heads/master | 2023-08-22T00:49:50.362770 | 2021-10-16T20:33:01 | 2021-10-16T20:33:01 | 417,940,562 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 188 | py | """
D3: M solution
"""
n = int(input())
# 2 -> (-2, -1, 0, 1, 2)
# 3 -> (-3, -2, -1, 0, 1, 2, 3)
for i in range(-n, n + 1 ,1):
print("Квадрат числа", i, "равен", i**2) | [
"i.ivlev@westwing.ru"
] | i.ivlev@westwing.ru |
84372fbe777e6c5d7e53371c5c45c9aad2b19897 | 1cfa9dc29acbe1c6cdc3ee74379750aacdfee7b5 | /test/functional/forknotify.py | b127b6d0f5807bafa0bbef7567ce0e786c8f419c | [
"MIT"
] | permissive | yinsongbj/MagnaChain-dev-master | e2198ba2f46d64d4bd75d55cb257d5b475d0fb70 | 0b1f1d1a881c82ec11474e250c1dfdaec4d55a38 | refs/heads/master | 2020-04-08T21:55:45.810445 | 2018-11-29T07:37:54 | 2018-11-29T07:38:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,137 | py | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The MagnaChain Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the -alertnotify option."""
import os
import time
from test_framework.test_framework import Ma... | [
"weigun@weigun.com"
] | weigun@weigun.com |
fbc1a53d51886c105ee6ee4bcc23aa4e509938c1 | 2ef009eaa4cc0a6a6d1aee6794f43d8409c99711 | /01_Python基础/hm_04_高级数据类型.py | 237021836cd9f7156910e9b1c13ab3205b4b9fa2 | [] | no_license | vkhaibao/PyProject | 6ae833cef09d7000af00dd7c842d2db29a1cd0cc | 2a733b34f337d4497051660f473a4cfb977fc15b | refs/heads/master | 2022-11-22T07:41:22.630002 | 2019-07-29T01:17:17 | 2019-07-29T01:17:17 | 173,897,429 | 1 | 3 | null | 2020-07-22T23:14:22 | 2019-03-05T07:32:41 | Python | UTF-8 | Python | false | false | 759 | py | # 2.1 列表常用操作
name_list = ["zhangsan", "lisi", "wangwu", "lisi"]
print(len(name_list))
print(name_list.count("lisi"))
for name in name_list:
if name == 'lisi':
print(name)
print(name_list.index(name))
print("end")
print(name_list[3])
import keyword
print(keyword.kwlist)
# print(len(keyword.kwlist))
... | [
"280764069@qq.com"
] | 280764069@qq.com |
a90945249cf0cac48240c92dc089bae2d1d21154 | 2194b6c17f3153c5976d6ac4a9ab78211027adab | /otoroshi_admin_api_client/models/otoroshimodels_local_jwt_verifier_type.py | b9f09cd202314608a8c64800ac515cb0cb9cef2f | [] | no_license | krezreb/otoroshi-admin-api-client | 7fab5e873c9c5950d77fffce6bcf80d3fdf4c319 | 9b3156c11eac227024cfe4a26c0129618deb2c4d | refs/heads/master | 2023-05-08T08:32:00.982987 | 2021-05-27T09:55:00 | 2021-05-27T09:55:00 | 371,324,636 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 198 | py | from enum import Enum
class OtoroshimodelsLocalJwtVerifierType(str, Enum):
GLOBAL_ = "global"
LOCAL = "local"
REF = "ref"
def __str__(self) -> str:
return str(self.value)
| [
"josephbeeson@gmail.com"
] | josephbeeson@gmail.com |
c8b4152f892cb857f9b250045bd91c041c52297f | 9ef44a289282c1d58f4fc82d6154194071539e14 | /tests/traffic/traffic_scalable_sources_multicast_receivers.py | de0dafd2d24a8159b2a20f86adb421bc75277cef | [] | no_license | Jitter00/ixnetwork_restpy | a3d3bfac9d6e6fcadbd84cfc320f7c96a77cadc9 | effccb0e914d70dd223b98326b38718996db92f1 | refs/heads/master | 2020-05-25T04:13:12.129994 | 2019-05-14T12:08:31 | 2019-05-14T12:08:31 | 187,621,989 | 0 | 0 | null | 2019-05-20T10:48:31 | 2019-05-20T10:48:30 | null | UTF-8 | Python | false | false | 2,446 | py | """Demonstrates creating a traffic item that uses scalable sources and igmp multicast receivers.
"""
from ixnetwork_restpy.testplatform.testplatform import TestPlatform
# connect to a test platform, create a session and get the root IxNetwork object
test_platform = TestPlatform('127.0.0.1', rest_port=1... | [
"srvc_cm_packages@keysight.com"
] | srvc_cm_packages@keysight.com |
480c51a18629faf461137578b2615d5414dce846 | f8ff25224bf827406c65560e247e7c3c064cdd38 | /data/euler_angles_utils.py | 5db68a08a8d4a5da1f51c404d26366a900168e77 | [] | no_license | akinoriosamura/PFLD | 893cadbbdc8a7ef424327c814196e1e3608f937f | b3f3c74369c1a8dc4dc0d2e5266dd2b473dfd582 | refs/heads/master | 2021-06-17T15:06:05.468485 | 2020-12-10T09:39:08 | 2020-12-10T09:39:08 | 211,257,866 | 0 | 0 | null | 2019-09-27T07:09:04 | 2019-09-27T07:09:03 | null | UTF-8 | Python | false | false | 5,003 | py | import cv2
import numpy as np
import math
def calculate_pitch_yaw_roll(landmarks_2D, cam_w=256, cam_h=256, radians=False):
""" Return the the pitch yaw and roll angles associated with the input image.
@param radians When True it returns the angle in radians, otherwise in degrees.
"""
c_x = c... | [
"osamura.akinori@gmail.com"
] | osamura.akinori@gmail.com |
731d7afe418d68eabc3a642be041f7cdb03f884b | 056ce350bf4f56a8047e673a5458632debd9802b | /benchmark/experiments/geodesic_step_difference.py | 07c9cff1b3b768572f85d24f522c07c2561870dc | [
"MIT"
] | permissive | LaYeqa/integrator-benchmark | a2402d37754682f442298fbe2554ae25f7af063d | bb307e6ebf476b652e62e41ae49730f530732da3 | refs/heads/master | 2021-09-10T15:41:31.040482 | 2018-02-12T19:49:29 | 2018-02-12T19:49:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,124 | py | """
How big of a difference is there, on average, between taking a large
geodesic drift step, and taking several smaller geodesic drift steps?
In other words, what does
$$f(n, dt) \equiv \mathbb{E}_\pi \| R(dt)(x, v) - (R^n(dt / n)(x,v)) \|$$
look like?
"""
import os
import pickle
import matplotlib
import numpy as... | [
"jf694@cornell.edu"
] | jf694@cornell.edu |
cd7259bc84504a05ad7bc82d8b4d29d20d798225 | c75ec82316ed5322c5844912ce9c528c24360b9f | /nsd1905/devops/day01/get_web.py | b68bfe7fbcc6a645d8877e4c80008c293f8ad64a | [] | no_license | MrZhangzhg/nsd2019 | a94cde22f2e4bd648bb9e56ca63827f558f3c083 | 54f6d2c7b348a69f13ad5f38f2fbdc8207528749 | refs/heads/master | 2021-08-22T17:38:27.697675 | 2020-02-22T08:36:21 | 2020-02-22T08:36:21 | 183,539,489 | 21 | 24 | null | 2020-05-17T12:07:55 | 2019-04-26T02:06:16 | HTML | UTF-8 | Python | false | false | 1,011 | py | import wget
import os
import re
from urllib import error
def get_url(fname, patt, encoding=None):
patt_list = []
cpatt = re.compile(patt)
with open(fname, encoding=encoding) as fobj:
for line in fobj:
m = cpatt.search(line)
if m:
patt_list.append(m.group())
... | [
"zhangzg@tedu.cn"
] | zhangzg@tedu.cn |
a9528c47f0427df06b12ad6f86f8429f0851b740 | d554b1aa8b70fddf81da8988b4aaa43788fede88 | /5 - Notebooks e Data/1 - Análises numéricas/Arquivos David/Atualizados/logDicas-master/data/2019-1/224/users/4376/codes/1649_2704.py | a64630f97bc256896769ff291db857d3d7e03c4d | [] | no_license | JosephLevinthal/Research-projects | a3bc3ca3b09faad16f5cce5949a2279cf14742ba | 60d5fd6eb864a5181f4321e7a992812f3c2139f9 | refs/heads/master | 2022-07-31T06:43:02.686109 | 2020-05-23T00:24:26 | 2020-05-23T00:24:26 | 266,199,309 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 204 | py | nota=float(input("nota de zero a dez: "))
bonificacao=input("recebera bonificacao:? (S/N) ")
if(bonificacao.upper()=="S"):
x=nota+nota*0.1
print(x)
else:
if(bonificacao.upper()=="N"):
print(nota) | [
"jvlo@icomp.ufam.edu.br"
] | jvlo@icomp.ufam.edu.br |
fe62f9196ac1d7de2c9682c4cbf7540e4b65c255 | 8ae55aa410a9f00eb7c1ceee96a89335360c1dba | /odps/pai/nodes/io_nodes.py | b9d64b78b355bf89f19967f7141bee5375b74f75 | [
"Apache-2.0"
] | permissive | ifedora/aliyun-odps-python-sdk | 05edbb9d0d9a7ddbf14efd1d5dfd20131cbc25a1 | d8c6f0d1e94576387f4c7a439ae607a08d7c640d | refs/heads/master | 2021-01-21T15:23:00.086425 | 2015-12-16T08:39:47 | 2015-12-16T08:39:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,596 | py | # encoding: utf-8
# 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
# "Licens... | [
"xuye.qin@alibaba-inc.com"
] | xuye.qin@alibaba-inc.com |
fe17771cf14228812de464e561c08b36770ac5c9 | 9f4d4f501c2d8f234724a0c1318cfbf9f4e53b7c | /metro/urls.py | 77a307bc34e9643aa52fae90e11461143951969c | [] | no_license | twine03/multipagos | 7976dee720db0d140b3e38865a89c8ef4d655812 | 280baa00388962c38e95fa3ac48505a94260b1ae | refs/heads/master | 2020-12-25T21:43:48.784429 | 2016-03-07T23:25:24 | 2016-03-07T23:25:24 | 53,214,508 | 0 | 0 | null | 2016-03-05T17:44:54 | 2016-03-05T17:44:54 | null | UTF-8 | Python | false | false | 1,008 | py | from django.conf.urls import patterns, include, url
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from ajax_select import urls as ajax_select_urls
import autocomplete_light
autocomplete_light.autodiscover()
admin.autodiscover()
urlpatterns = patterns('',
... | [
"cesarabel@johnmay.com.ni"
] | cesarabel@johnmay.com.ni |
1c645a71e8337c9771c44f8c0968e4b1f5ba39b7 | 406dbe33e8a94dfb598490b812727612d3700d66 | /tasks/views.py | dafbc374cb19c612046b8179d75f8e4c22723fa5 | [] | no_license | solar1um/todo_rep | 6236e3873d684a3bfbd2b842b88053778b9cd8b7 | 0831f1d27a80958e750f50513ce695ea86a1eddd | refs/heads/master | 2023-06-27T05:50:33.418751 | 2021-07-30T13:53:49 | 2021-07-30T13:53:49 | 391,062,955 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,967 | py | from django.shortcuts import render, redirect
from .forms import TaskForm
from .models import Task
from django.db.models import Q
from django.core.paginator import Paginator
def register():
pass
def task_create(request):
if request.method == 'POST':
form = TaskForm(request.POST)
if form.is_va... | [
"mitya.klimenko123@gmail.com"
] | mitya.klimenko123@gmail.com |
f3652020d63040895821fa7c50d1e87da103552b | 9ff8e796c2cfac90d5bc55cbdedab02e45a344d0 | /clevercsv/console/commands/detect.py | 3071d018a3568625f94030b8e9db8d830dd0319f | [
"MIT"
] | permissive | backwardn/CleverCSV | e798ab6f3f44c193664c74ea7358334552adc486 | 2dabc628075561b49da14715b0db86f19c66f117 | refs/heads/master | 2020-12-22T09:23:24.577326 | 2020-06-24T13:44:23 | 2020-06-24T13:44:23 | 236,739,019 | 0 | 0 | MIT | 2020-01-28T13:15:18 | 2020-01-28T13:15:18 | null | UTF-8 | Python | false | false | 1,674 | py | # -*- coding: utf-8 -*-
from cleo import Command
from clevercsv.wrappers import detect_dialect
from ._utils import parse_int
class DetectCommand(Command):
"""
Detect the dialect of a CSV file
detect
{ path : The path to the CSV file }
{ --c|consistency : Use only the consistency measur... | [
"gertjanvandenburg@gmail.com"
] | gertjanvandenburg@gmail.com |
09b0755392094870fe94f9841b80464a6862c7a5 | 2b41c06bd5ad99e300d0244282869eeb46468e1f | /Interpreter Boolfuck.py | 342942fa080314f63c94532b9587b502f333a46e | [] | no_license | gil9red/Boolfuck | d9daf92d4f979f05e757585cd0141d0912bbc083 | 0add7ce45c184be4ec9ee06f4ac3831882e72888 | refs/heads/master | 2021-01-10T20:52:28.636146 | 2014-08-08T20:19:49 | 2014-08-08T20:19:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,253 | py | """
EN:
Interpreter language Boolfuck.
+ : Flips the value of the bit under the pointer.
, : Reads a bit from the input stream, storing it under the pointer. The end-user types information using
characters, though. Bytes are read in little-endian order; the first bit read from the character a, for
... | [
"gil9red@gmail.com"
] | gil9red@gmail.com |
cee72e3541ad2926135ccc215a476ef6f03d421d | d860a2c1fa8fffc76a9101e4f91cecc80c27e802 | /lintcode/414_Divede_Two_Integers.py | 20391022052276903e73044ce4f1d7f7c1ded39b | [] | no_license | heroming/algorithm | 80ea8f00ac049b0bc815140253568484e49c39e3 | 18e510f02bff92bc45cceb7090a79fbd40c209ec | refs/heads/master | 2021-01-19T01:27:31.676356 | 2019-06-09T08:51:16 | 2019-06-09T08:51:16 | 62,952,889 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 7,859 | py | #coding=utf-8
#!/usr/bin/python
class ListNode(object):
def __init__(self, x):
self.val = x
self.next = None
def show(self) :
print self.val,
if self.next is not None :
self.next.show()
else :
print
class TreeNode(object):
def __init__(... | [
"heroming7788@gmail.com"
] | heroming7788@gmail.com |
72537d597563a0e5a2b9a2426219f72a428ecaa6 | 3b7474148c07df7f4755106a3d0ada9b2de5efdc | /training/c25_flask/examples/world_api/tests/cities/test_city_dao.py | 9aff583077f4ee578b1c06237a64ca0fb7322d0f | [] | no_license | juancsosap/pythontraining | 7f67466846138f32d55361d64de81e74a946b484 | 1441d6fc9544042bc404d5c7efffd119fce33aa7 | refs/heads/master | 2021-08-26T05:37:15.851025 | 2021-08-11T22:35:23 | 2021-08-11T22:35:23 | 129,974,006 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 5,410 | py | import unittest
from cities import City
from cities import CityDAO
class TestCityDAO(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_create(self):
dao = CityDAO()
# Success Creation
# Original Creation
city = City(1, 'Santiag... | [
"user.nuage@gmail.com"
] | user.nuage@gmail.com |
01860f4b49c4b175d10bc6eee982f9b3490556a0 | f9d564f1aa83eca45872dab7fbaa26dd48210d08 | /huaweicloud-sdk-dli/huaweicloudsdkdli/v1/model/create_auth_info_response.py | a68dccb07b26d3d4c05551ddb0f5717ca37d102f | [
"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 | 4,308 | py | # coding: utf-8
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class CreateAuthInfoResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
and the ... | [
"hwcloudsdk@huawei.com"
] | hwcloudsdk@huawei.com |
14db19259ea02a8ebfc660432d40c3ed489f6f98 | 5b95e608f5548647bde8e72768624fe19b8064ac | /optimization/operators/SimplePopCrossover.py | 0ce69cdab58998f6ef7859de5d0df938a5142980 | [
"MIT"
] | permissive | prise-3d/noise-detection-attributes-optimization | af4c45f839a78edb6ac28b8de9cd48a11733e4cb | a18c913871480999fd271cc0c361942d3d661499 | refs/heads/master | 2023-09-04T02:19:27.629406 | 2021-09-07T13:44:09 | 2021-09-07T13:44:09 | 191,719,703 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,522 | py | from macop.operators.base import Crossover
import random
class SimplePopCrossover(Crossover):
def apply(self, solution1, solution2=None):
"""Create new solution based on best solution found and solution passed as parameter
Args:
solution1: {:class:`~macop.solutions.base.Solution`} -- ... | [
"contact@jeromebuisine.fr"
] | contact@jeromebuisine.fr |
64377bb318e39198c4e55068343052ebbc40350c | d6b6e3d544d22b11d2ec1119f53aa9f9a448f95a | /client-server-app/messenger/server/jim/utils.py | 76d06b805ec70b98afcd70aa9533cee95586e75a | [] | no_license | GrigoriiKluev/python-learning | 56d139f9e284aa398cd52f7f7e74ccfc80115d5b | cd43e0e205b98ce0fa954d4cc25ec7cc3494325b | refs/heads/master | 2023-01-09T12:26:17.987089 | 2019-11-01T09:43:41 | 2019-11-01T09:43:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,280 | py | #!/usr/bin/env python
import argparse
import configparser
import json
import struct
from .config import SERVER_ADDRESS, SERVER_PORT, STORAGE, ENCODING
from . import messages
from . import exceptions
def parse_arguments():
parser = argparse.ArgumentParser(description="Messenger application.")
parser.add_argu... | [
"ezhik@ezhik.info"
] | ezhik@ezhik.info |
40dbf871ec01499cc433802fe92ea545320016eb | 7208db50a22368c335e7d7d8b37a3fedb09c60e5 | /cairis/gui/CodingTextCtrl.py | f7786399859247f7d2c5d0f69cbf7dd2cc49a49d | [
"Apache-2.0"
] | permissive | nebloc/cairis | 41c7f20af56c46bddcb3927dc4aa410f6477e6ed | 1277a148a270d5471b59fc238aa6590bc1d3044e | refs/heads/master | 2020-03-24T03:51:11.908096 | 2018-07-27T16:07:36 | 2018-07-27T16:07:36 | 142,434,768 | 0 | 0 | Apache-2.0 | 2018-07-26T11:58:24 | 2018-07-26T11:58:24 | null | UTF-8 | Python | false | false | 7,183 | py | # 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
# "License"); you may... | [
"shamal.faily@googlemail.com"
] | shamal.faily@googlemail.com |
cacf1237416c36e49c093c0138b0a09f2c9addac | 5327fc07e605bf139e70f340fe8865d3e0f42194 | /python/django-react-chat/drchat/settings.py | ed11b053cee8bff8f20100928f205c12de0bbdb1 | [] | no_license | ikedaosushi/sandbox | a5dcc763bdac4308a82d38c91017496e6e27e5ec | 3e4ec6ecee7702e7397f9cf511558afbe86ba4a6 | refs/heads/master | 2023-01-06T20:49:38.004773 | 2020-05-27T07:06:59 | 2020-05-30T07:06:59 | 148,887,939 | 1 | 0 | null | 2023-01-06T01:03:41 | 2018-09-15T09:25:34 | Jupyter Notebook | UTF-8 | Python | false | false | 3,482 | py | """
Django settings for drchat project.
Generated by 'django-admin startproject' using Django 3.0.4.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os
# ... | [
"ikeda.yutaro@gmail.com"
] | ikeda.yutaro@gmail.com |
05e8a70ecd95a309e78a333aef2595f15dd29e44 | 509d12280eefb2e6736a51f0de640abf0f423d8a | /setup.py | 5d478b86346dd94f51e7cb70c119577fc343725b | [
"MIT"
] | permissive | wangonya/norris-cli | c9bc2368425a1409f7fb2a3a5aa7e047991b8c9c | 350b66469f5e8422e1dcb6deb52a4eb3e94f37b4 | refs/heads/master | 2022-12-16T11:00:16.336521 | 2019-11-02T04:54:45 | 2019-11-02T04:54:45 | 163,190,151 | 3 | 1 | MIT | 2021-06-01T23:10:21 | 2018-12-26T14:50:48 | Python | UTF-8 | Python | false | false | 883 | py | from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name='norris-cli',
version='2.0',
description="A simple cli app that brightens up your day with Chuck Norris jokes.",
long_description=long_description,
long_description_content_t... | [
"kwangonya@gmail.com"
] | kwangonya@gmail.com |
81897b605e378e055b078ec9d712c087dcd701ba | 6b42ce9394dc2c06a92497780d293c7b6caf55d3 | /sites/urls.py | 96ecafc79ab72835a7519a8eaed4785cec30cedb | [] | no_license | hejibo/DPress | 98a262caf8124e3b3b229422689bce3e06b6aa0a | 91ca6c401c954063307d3551b67f72e55e74db83 | refs/heads/master | 2020-04-30T02:48:54.085398 | 2010-10-26T12:59:35 | 2010-10-26T12:59:35 | 3,426,378 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 970 | py | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
from django.conf.urls.defaults import *
from django.contrib import admin
from django.conf import settings
admin.autodiscover()
#cp -R /path/to/grappelli/media /path/to/your/admin/media
urlpatterns = patterns('',
(r'^static/(.*)$', 'django.views.static.serve'... | [
"zbirder@gmail.com"
] | zbirder@gmail.com |
ac2f6f66ba4799ee3ce47093e6815f5d83ae90fa | fc05249c73f910a4d36f471eb91e05256a64cdfe | /phd/dynamics.py | 3bb10c8d1a2aea2529ab15be0e8ca4bbcb711396 | [] | no_license | rsoutelino/sandbox | f51b37619cd7a61a0446d83e2e1c2af58f14802a | 814d215582d8e14514ba93daf1b41f6d118b906c | refs/heads/master | 2023-03-02T12:05:18.703732 | 2023-03-02T01:58:15 | 2023-03-02T01:58:15 | 28,204,889 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 7,587 | py | #!/usr/local/epd-7.2-1-rh5-x86_64/bin/python
# -*- coding:utf-8 -*-
import glob
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.mlab import griddata
import seawater.csiro as sw
import scipy.io as sp
import romslab
from qg_tools import *
from qg_plot import *
#########################################... | [
"rsoutelino@gmail.com"
] | rsoutelino@gmail.com |
4e7d003057aa98458dff88aa9c62ded312dede5f | 00657ecc75e0529f5b77759112398bdb11e612bb | /Python3.6/85-Py3-maximal-rectangle.py | 4bcbce0e4ab6b308b5592a5652fc1d2bf5e601fe | [] | no_license | Hidenver2016/Leetcode | da949cd17f8e29d6007b492719bbc97418ae9cb7 | 1379a6dc2400751ecf79ccd6ed401a1fb0d78046 | refs/heads/master | 2021-07-18T14:46:00.986614 | 2020-05-08T05:02:20 | 2020-05-08T05:02:20 | 152,190,601 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,229 | py | # -*- coding: utf-8 -*-
"""
Created on Tue Dec 11 15:16:44 2018
@author: hjiang
"""
"""
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area.
Example:
Input:
[
["1","1","1","0","0"],
["1","0","1","1","1"],
["1","1","1","1","1"],
... | [
"noreply@github.com"
] | Hidenver2016.noreply@github.com |
ae9672847f9c8f99b88cc55912fe11d211553f68 | 46349356d4812a6bf04a1dff4ee3311864f8b7ff | /ma_py/mic_py/calc_metric.py | aa06a07c6287bf2624b4bbf642485e86e1a74187 | [] | no_license | alexdoberman/ma | 1ca9d20f64d0e8c87feff9f7bb04d09d3088aeb3 | 219e5e87b80c6a795c0d4161b3ad22b9973ed745 | refs/heads/master | 2022-07-17T13:15:21.672335 | 2020-05-12T15:10:40 | 2020-05-12T15:10:40 | 263,365,873 | 12 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,192 | py | # -*- coding: utf-8 -*-
import numpy as np
import soundfile as sf
import os
import mir_eval
def calc_metric(in_Main, in_Main_Sp, in_Main_Mus, Est_Sp, Est_Sp_lag = 256):
"""
Calc SDR impr
:in_Main: - path to mus+sp wav file
:in_Main_Sp: - path to sp wav file
:in_Main_Mus: - path to mus wav ... | [
"lavrentyev@speechpro.com"
] | lavrentyev@speechpro.com |
a54049b8cbc985db73a5c62b62e988053ea2a7aa | b872f8b7fde5dab4c197e3f2f6f9b0f973b25fc2 | /PaddleCV/Research/webvision2018/reader.py | 9c424c97e0f3b128e03c72ef0a9ba43ce8078023 | [
"Apache-2.0"
] | permissive | liuzengzhen1/models | 467247ae43835ac8d0c133f1bb52d9d4c721125b | 6a29ae8591fea72ffd4e03d346a111f8f777b8e9 | refs/heads/develop | 2020-06-13T10:51:35.380959 | 2019-08-12T10:27:06 | 2019-08-12T10:27:06 | 194,632,015 | 0 | 0 | Apache-2.0 | 2019-08-12T10:27:07 | 2019-07-01T08:28:40 | Python | UTF-8 | Python | false | false | 4,385 | py | import os
import math
import random
import functools
import numpy as np
import paddle
import cv2
import io
random.seed(0)
np.random.seed(0)
THREAD = 8
BUF_SIZE = 128
img_mean = np.array([0.485, 0.456, 0.406]).reshape((3, 1, 1))
img_std = np.array([0.229, 0.224, 0.225]).reshape((3, 1, 1))
def rotate_image(img):
... | [
"dangqingqing@baidu.com"
] | dangqingqing@baidu.com |
97430f960269dbfffeb2fe558c8c243ac766003c | a27360fc3580895cf9c8627177854be2b2d6a5f4 | /ML/python/others_example/svm_adult_UCI_formal.py | bd7c727ff4ebe5cabc8c2ff5ce0aab274378d233 | [] | no_license | HandWang/mllib | d12148f02dabe232906aac67d6f67cd6fc39b5bb | bccc0cc9802b6e4e955d4a79d13f717717c3ac7e | refs/heads/master | 2020-03-16T15:33:34.638696 | 2016-09-12T09:55:35 | 2016-09-12T09:55:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,617 | py | #!usr/bin/env python
#encoding: utf-8
from pyspark import SparkConf, SparkContext
from pyspark.mllib.regression import LabeledPoint
from pyspark.mllib.linalg import SparseVector, Vectors
from pyspark.mllib.classification import SVMWithSGD, SVMModel
from pyspark.mllib.util import MLUtils
import numpy as np
import re
c... | [
"heshang1203@sina.com"
] | heshang1203@sina.com |
3bfa2bb060fc6e5d9860393848581c6982a53ee9 | 253021ade66fddb1d580ef6f118abc36458ee913 | /src/learn_python_the_right_way/unit_37/two_point_distance.py | 42b9eb30e23a2f49a99a5a42c991faa933ba0f6a | [] | no_license | giinie/CSBootcamp | 0e6fb1f722066e172309a5f20d0504bcf60a2fa0 | c8a5799c1b328c1275b05df01b5c9417342cd086 | refs/heads/master | 2021-07-13T07:56:48.330806 | 2020-08-10T00:30:21 | 2020-08-10T00:30:21 | 168,725,917 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 500 | py | import math
class Point2D:
def __init__(self, x, y):
self.x = x
self.y = y
p1 = Point2D(x=30, y=20) # 점1
p2 = Point2D(x=60, y=50) # 점2
a = p2.x - p1.x # 선 a의 길이
b = p2.y - p1.y # 선 b의 길이
c = math.sqrt((a * a) + (b * b)) # (a * a) + (b * b)의 제곱근을 구함.
# c = math.sqrt(math.pow(a, 2) + math.p... | [
"giinie72@gmail.com"
] | giinie72@gmail.com |
b8215071a049cb92580c15909d054cb7996fa5ab | a86ca34e23afaf67fdf858df9e47847606b23e0c | /lib/temboo/Library/Google/DistanceMatrix/BicyclingDistanceMatrix.py | d31152acf76c6b45905f7d14a664dad6ff694c83 | [] | no_license | miriammelnick/dont-get-mugged | 6026ad93c910baaecbc3f5477629b0322e116fa8 | 1613ee636c027ccc49c3f84a5f186e27de7f0f9d | refs/heads/master | 2021-01-13T02:18:39.599323 | 2012-08-12T23:25:47 | 2012-08-12T23:25:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,847 | py |
###############################################################################
#
# BicyclingDistanceMatrix
# Obtain bicycling distances and times for a martix of addresses and/or latitude/longitude coordinates.
#
# Python version 2.6
#
###############################################################################
f... | [
"miriam@famulus"
] | miriam@famulus |
2f60be22151dc61ea1fee0b48b9dddf2c027f93d | c498cefc16ba5d75b54d65297b88357d669c8f48 | /static/datapack/data/scripts/quests/626_ADarkTwilight/__init__.py | 2a2853003beb037539227a0ea585746b16dbacfe | [] | no_license | ManWithShotgun/l2i-JesusXD-3 | e17f7307d9c5762b60a2039655d51ab36ec76fad | 8e13b4dda28905792621088714ebb6a31f223c90 | refs/heads/master | 2021-01-17T16:10:42.561720 | 2016-07-22T18:41:22 | 2016-07-22T18:41:22 | 63,967,514 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 3,353 | py | # Made by disKret
# Rate Fix by Gnat
import sys
from ru.catssoftware import Config
from ru.catssoftware.gameserver.model.quest import State
from ru.catssoftware.gameserver.model.quest import QuestState
from ru.catssoftware.gameserver.network.serverpackets import SocialAction
from ru.catssoftware.gameserver.model.quest.... | [
"u3n3ter7@mail.ru"
] | u3n3ter7@mail.ru |
de42da89e76aa62b8ac36ca7d6e3a6f1cb734de7 | d13692dd60980b2b768907494541e872fa8f77ce | /scrapydemo/myscrapy/myscrapy/spiders/BlogSpider.py | bdbe93c8eea62e83d1897e6de769590debcfc0c1 | [] | no_license | langjity/Python-spider | c312029efb44ee8898189e3299c381d9aaae9bee | 8d4e15e12cacacf527a108a92d49bbe658edb29c | refs/heads/master | 2022-10-25T05:16:06.516427 | 2020-06-14T13:23:01 | 2020-06-14T13:23:01 | 271,993,378 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 996 | py | import scrapy
from bs4 import *
class BlogSpider(scrapy.Spider):
name = 'BlogSpider'
start_urls = [
'https://geekori.com/blogsCenter.php?uid=geekori'
]
def parse(self,response):
# 过滤出指定页面所有的博文
sectionList = response.xpath('//*[@id="all"]/div[1]/section').extract()
... | [
"huwt15@163.com"
] | huwt15@163.com |
54f2dc3ac766367c6e9b738f0ff54c5807a48072 | 96c4e333510091368070e2a655b11d09e41bef5a | /tfeed/urls.py | 53e86d1c271bf8036167d4cbaf643a7af8d19f7b | [] | no_license | Tuss4/trickfeed.django | dced804b72ed0b6ac1917d17061afc0f1503c4b1 | 948f3dd9f2fb9929c61fd47b42ada400772327aa | refs/heads/master | 2016-08-05T06:00:35.729887 | 2013-07-01T14:25:46 | 2013-07-01T14:25:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 991 | py | from django.conf.urls import *
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', 'tfeed.views.trick'),
url(r'^home/$', 'tfeed.views.trick'),
url(r'^search/$', 'books.views.search'),
url(r'^contact/$', 'contact.views.... | [
"tuss4dbfn@gmail.com"
] | tuss4dbfn@gmail.com |
252c66e955830f6f83d552afa3153aebd16cfe6b | d6a87864028abde8da69b0a1075e3d4c483ed73c | /Valid Perfect Square.py | 31f85e50c7009486305b36dbf4e6a6aec2f8a572 | [] | no_license | Windsooon/LeetCode | 7ef78c7e001c1e6924244869a7ba5491d33eb246 | 409d7db811d41dbcc7ce8cda82b77eff35585657 | refs/heads/master | 2021-01-10T15:26:16.986357 | 2020-01-01T14:57:58 | 2020-01-01T14:57:58 | 54,531,267 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 987 | py | class Solution:
def isPerfectSquare(self, num):
"""
:type num: int
:rtype: bool
"""
# binary search
if num == 1:
return True
# 0 5
left, right = 0, num//2+1
while right - left > 1:
# 2
mid = (left+right)//2
... | [
"wiwindson@outlook.com"
] | wiwindson@outlook.com |
35531eaa0f48b26a7bc5cda8928c4ba5c951ed7c | ad6c519f356c0c49eb004084b12b5f08e3cd2e9e | /contrib/compile_topic_icons_test.py | f27c1cf0757bbaf1afb3e77263c6c90d54dbcac6 | [
"MIT"
] | permissive | csilvers/kake | 1a773e7c2232ea243be256bb5e6bd92e0189db9d | 51465b12d267a629dd61778918d83a2a134ec3b2 | refs/heads/master | 2021-05-05T23:07:40.425063 | 2019-01-23T23:35:48 | 2019-01-23T23:35:48 | 116,594,798 | 0 | 0 | MIT | 2019-01-23T23:19:17 | 2018-01-07T19:59:09 | Python | UTF-8 | Python | false | false | 6,686 | py | # TODO(colin): fix these lint errors (http://pep8.readthedocs.io/en/release-1.7.x/intro.html#error-codes)
# pep8-disable:E128
"""Tests for compile_topic_icons.py"""
from __future__ import absolute_import
import cStringIO
import json
import os
import shutil
import PIL.Image
from shared.testutil import testsize
from ... | [
"csilvers@khanacademy.org"
] | csilvers@khanacademy.org |
348b07276934ad33dafa91616e63811a044f9b8d | 1ebd997c78b5e31d55ab0d0678d4f20889c7fd01 | /meiduo/apps/payment/urls.py | 96bfeee416e9a4fb0014e2c88c3ba3c430c3dbb0 | [
"MIT"
] | permissive | libin-c/Meiduo | f99ba4b105783c55011ebc301ae7068cbf946598 | 58468fd619a8d9f022df442a10a56b1b12ed1dd8 | refs/heads/master | 2022-12-13T10:02:56.715687 | 2019-07-13T11:26:53 | 2019-07-13T11:26:53 | 188,040,862 | 0 | 0 | MIT | 2022-12-10T04:49:02 | 2019-05-22T13:07:59 | HTML | UTF-8 | Python | false | false | 328 | py | from django.conf.urls import url
from . import views
urlpatterns = [
# 支付 payment/(?P<order_id>\d+)/
url(r'^payment/(?P<order_id>\d+)/$', views.PaymentView.as_view(), name='payment'),
# 支付成功payment/status/
url(r'^payment/status/$', views.PaymentStatusView.as_view(), name='payment_status'),
]
| [
"84045407@qq.com"
] | 84045407@qq.com |
aa8aaecf80ca40eebc2c44e44867d7f22492efc1 | 8cbb685d6ac3a9eb9dcce700f251c02bbeafe368 | /src/middleware.py | 87a8ad8b8944f93a771f763d32c47efe0aaf3e4d | [] | no_license | luzi82/telegram-hub.1602 | 99e880a0b5d3ba536b26c692391dab3b887d10d7 | c6b1215c5303eeafa30a86cf09a1a8562bf245a6 | refs/heads/master | 2023-04-18T09:53:04.319847 | 2021-04-30T09:03:03 | 2021-04-30T09:03:03 | 302,798,145 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 684 | py | import flask
import typing
# import werkzeug.types # type: ignore
from typing import Any
from typing import Callable
from werkzeug.datastructures import EnvironHeaders
#from werkzeug.types import WSGIEnvironment
class WebTemplateMiddleWare:
def __init__(self, wsgi_app: Callable[..., Any], app: flask.Flask) -> Non... | [
"luzi82@gmail.com"
] | luzi82@gmail.com |
efc99b599fee949c82bb9cfe4a2d81b035b94afb | 1edd52cf197e5ae67b5939a3beb3e70761334e62 | /Notes/Udemy/Aws-automation-with-boto3/Session-4/get_all_ec2_in_region_services.py | 1509f8b409f4c2c0a4fa06ed18b3dd12c1d61286 | [] | no_license | sandeepmchary/Devops_wordpress_Notes | bdcd85d526780d03c494ecb93e714e7ffe0a4d58 | ffd2092162073e1e7342c6066d023d04e6ca8c1c | refs/heads/master | 2022-06-18T21:33:02.471025 | 2022-06-12T11:14:47 | 2022-06-12T11:14:47 | 154,679,658 | 1 | 4 | null | 2022-05-19T16:59:57 | 2018-10-25T13:51:40 | HTML | UTF-8 | Python | false | false | 729 | py | '''
import boto3
session=boto3.session.Session(profile_name="root")
ec2_cli=session.client(service_name="ec2",region_name="us-east-2")
#print (ec2_cli.describe_regions()['Regions']) -- same output for the below
for each_region_info in ec2_cli.describe_regions().get('Regions'):
print ((each_region_info).get('Region... | [
"awssandeepchary@gmail.com"
] | awssandeepchary@gmail.com |
cc7910443adba63ae9d04fe46419377da3343a19 | de88a649182d42206358e53bba69252e04d8a69f | /abc_py/abc166/c.py | 9c5162ea57f921191792cbdec08f1c0cba6d9201 | [] | no_license | aki-nasu/competition | 47b05312d9b19dcf62212570d6253ec7a109382d | 9edb02abb14d896932f08218417d3f10b54f1755 | refs/heads/master | 2021-06-22T22:09:14.433407 | 2021-06-06T06:53:42 | 2021-06-06T06:53:42 | 225,662,310 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 314 | py | n,m = map(int,input().split())
judge = [1]*n
H = list(map(int,input().split()))
for i in range(m):
a,b = map(int,input().split())
a -= 1
b -= 1
if H[a] > H[b]:
judge[b] *= 0
elif H[a] < H[b]:
judge[a] *= 0
else:
judge[a] *= 0
judge[b] *= 0
print(sum(judge)) | [
"t.t.akiyoshi2@gmail.com"
] | t.t.akiyoshi2@gmail.com |
90826635dd9ce2990f3895f581901059fc02ea04 | 66012480066f06dd2c6d710807da84be25ca77de | /mall/mall/settings.py | 4f7e53b73f21ae3cef7d29ccf1ce05b47209f18f | [] | no_license | leeye9421/mdsc | 38e597115997c9e732516b324652d9c4948d6fdb | 361aef333f37bd737d8256f0642f42440d3dee24 | refs/heads/master | 2020-03-28T05:29:29.948246 | 2018-09-07T09:09:01 | 2018-09-07T09:09:01 | 147,779,551 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,076 | py | """
Django settings for mall project.
Generated by 'django-admin startproject' using Django 1.11.11.
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 os
i... | [
"xwp_fullstack@163.com"
] | xwp_fullstack@163.com |
3bd9603899711932aa83b58dcdd042485a00b1d3 | 7b67ea903cc08e31c6156fa4bb7b40b64950b474 | /note21/test.py | 9cc687cddd4bcc75bc58a7f0aa375c4ab4cd2a50 | [
"MIT"
] | permissive | icexmoon/python-learning-notes | 62596c2d6a439f30c8c0637eca1af36d88a3bea6 | 838c91d896404290b89992b6517be1b6a79df41f | refs/heads/main | 2023-05-27T11:21:25.575286 | 2021-06-08T07:33:22 | 2021-06-08T07:33:22 | 365,742,219 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,092 | py | hellowStr = "Hellow world!"
hellowByte = bytes(hellowStr, encoding='ascii')
print(hellowByte)
print(hellowByte[0])
# 输出
# b'Hellow world!'
# 72
hellowBytes = "Hellow wolrd!".encode(encoding='ascii')
print(hellowBytes)
print(hellowBytes[0])
hellowStr = hellowBytes.decode(encoding='ascii')
print(hellowStr)
# b'Hellow wol... | [
"icexmoon@qq.com"
] | icexmoon@qq.com |
fed017a1452b26b510df96ea0e49e0f2ae3ceea1 | 847273de4b1d814fab8b19dc651c651c2d342ede | /.history/Sudoku_II_006_20180620144248.py | 19d50e38cd2c149b1334c9c20ac2fd0c1e24a00a | [] | no_license | Los4U/sudoku_in_python | 0ba55850afcffeac4170321651620f3c89448b45 | 7d470604962a43da3fc3e5edce6f718076197d32 | refs/heads/master | 2020-03-22T08:10:13.939424 | 2018-07-04T17:21:13 | 2018-07-04T17:21:13 | 139,749,483 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,858 | py | from random import randint
sudoku1 = [
[5, 9, 8, 6, 1, 2, 3, 4, 7],
[2, 1, 7, 9, 3, 4, 8, 6, 5],
[6, 4, 3, 5, 8, 7, 1, 2, 9],
[1, 6, 5, 4, 9, 8, 2, 7, 3],
[3, 2, 9, 7, 6, 5, 4, 1, 8],
[7, 8, 4, 3, 2, 1, 5, 9, 6],
[8, 3, 1, 2, 7, 6, 9, 5, 4],
[4, 7, 2, 8, 5, 9, 6, 3, 1],
[9, 5, 6, 1,... | [
"inz.kamil.wos@gmail.com"
] | inz.kamil.wos@gmail.com |
d41c1ef516bced2bf510b3e8afb60b1817b195ce | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /5GW5Kb2RpGwhHax2W_0.py | 60a1141a3f3d4589d6db47a04cccc4ba0c2db694 | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 921 | py | """
Create a function that takes a two-dimensional list as an argument and returns
a one-dimensional list with the values of the original 2d list that are
arranged by spiralling through it (starting from the top-left).
### Examples
spiral_transposition([
[7, 2],
[5, 0]
])
➞ [7, 2, 0, 5... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
56906b5c80858d12df22a68b3a4d206cc28c0fd3 | e59f257d5735cae8cf7bb46d52792aa7371c9dae | /.history/core/forms_20200223012638.py | ed65dcae8ecfd949142a6840038a79bb470c8613 | [] | no_license | okumujustine/django-eccomerce-website | 95499049dd4e46513c25a0fe6e6b82cf69d2080b | 00c1ca600af5faa89829702044cc9f329bbc8b66 | refs/heads/master | 2022-12-08T23:29:19.453109 | 2021-05-31T11:23:22 | 2021-05-31T11:23:22 | 242,557,196 | 1 | 2 | null | 2022-12-08T03:44:29 | 2020-02-23T17:08:21 | Python | UTF-8 | Python | false | false | 811 | py | from django import forms
from django_countries.fields import CountryField
PAYMENT_CHOICES = {
('S', 'Stripe'),
('P', 'Paypal')
}
class CheckoutForm(forms.Form):
street_address = forms.CharField(widget=forms.TextInput(attrs={
'placeholder':'1234 Main St'
}))
apartment_address = forms.CharFi... | [
"okumujustine01@gmail.com"
] | okumujustine01@gmail.com |
6debc96c2e83fc656faf7aa12591c20d48fff6d7 | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/FrogRiver_20200723134922.py | 54a96a3c21c35b01618284b4e753f9a90e89dc78 | [] | no_license | MaryanneNjeri/pythonModules | 56f54bf098ae58ea069bf33f11ae94fa8eedcabc | f4e56b1e4dda2349267af634a46f6b9df6686020 | refs/heads/master | 2022-12-16T02:59:19.896129 | 2020-09-11T12:05:22 | 2020-09-11T12:05:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 400 | py | def Frog(X,A):
# given x where the frog wants to go
# find earliest time
# once you get the second that has that position
# return the second
pos = set()
for i in range(len(A)):
if A[i] <= X:
pos.add(A[i])
print
if len(pos) == X:
return i
... | [
"mary.jereh@gmail.com"
] | mary.jereh@gmail.com |
f62d0b82237aaf75298b52beee5686367a31cf2d | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /GbyPdqNnp75Wci7Cn_22.py | 4a51c863b7b6836483e67b8530c9ef27f8c90c3a | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 380 | py | """
Count the amount of ones in the _binary representation_ of an integer. For
example, since 12 is _1100_ in binary, the return value should be `2`.
### Examples
count_ones(0) ➞ 0
count_ones(100) ➞ 3
count_ones(999) ➞ 8
### Notes
The input will always be a valid integer (number).
"""
de... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
d7650e4de6707beba586ea7f9707c139e649e8de | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03251/s875733383.py | 76d083ae4238f31444210b4a8da2d7ffb477483d | [] | 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 | 192 | py | N,M,x,y = map(int,input().split())
X = list(map(int,input().split()))
Y = list(map(int,input().split()))
l = max(X)
r = min(Y)
print('No War' if l < r and not (y <= l or r <= x) else 'War') | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
cb121e9d3348d5bd57629b331a997f98e872d090 | 55b4fe0a6616b30c128b51a9918605050ce49f6d | /vel_perturb_mineos | 11808f89fbe8c0d62bd62697fe21e26a428223fe | [] | no_license | samhaug/ScS_reverb_setup | 783a4fb7c942a598f18dc6c9e3544aa5e2bbcafe | 05e96b9f871d25a1e7b5e9284083167993f56cec | refs/heads/master | 2021-01-12T03:35:45.657459 | 2017-06-24T17:24:07 | 2017-06-24T17:24:07 | 78,234,557 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,084 | #!/home/samhaug/anaconda2/bin/python
from sys import argv
import numpy as np
from scipy.signal import blackman
from scipy.interpolate import interp1d
from matplotlib import pyplot as plt
'''
Use this to perturb the upper 220km of the mantle to get best estimate
of ScS reverberation times.
This script wants to read p... | [
"samhaug@umich.edu"
] | samhaug@umich.edu | |
8f4b6067ae272aa417798259b7ffcbcd9e5a6e06 | 2f557f60fc609c03fbb42badf2c4f41ef2e60227 | /Configuration/Generator/python/Hadronizer_MgmMatchTuneCUETP8M1_13TeV_madgraph_pythia8_cff.py | d59bd8a35872a074350dc0fadbbdea77054aaacf | [
"Apache-2.0"
] | permissive | CMS-TMTT/cmssw | 91d70fc40a7110832a2ceb2dc08c15b5a299bd3b | 80cb3a25c0d63594fe6455b837f7c3cbe3cf42d7 | refs/heads/TMTT_1060 | 2020-03-24T07:49:39.440996 | 2020-03-04T17:21:36 | 2020-03-04T17:21:36 | 142,576,342 | 3 | 5 | Apache-2.0 | 2019-12-05T21:16:34 | 2018-07-27T12:48:13 | C++ | UTF-8 | Python | false | false | 1,854 | py | # Copied from https://github.com/cms-sw/genproductions for RelVal June 5, 2014
import FWCore.ParameterSet.Config as cms
from Configuration.Generator.Pythia8CommonSettings_cfi import *
from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import *
generator = cms.EDFilter("Pythia8HadronizerFilter",
... | [
"you@somedomain.com"
] | you@somedomain.com |
b09614452b1104b11fd5a817c8dc7d6454f9b364 | c7243b2c88e8a7c8bc70087d04fdbdcba3f22a40 | /page2/recommand.py | d055531326bd59a44f1a5ed418eae4d245e88fdb | [] | no_license | houhailun/collective_intelligence_programming | e85429833e7466f817af46c74374a7f6ae770835 | 919d178593918f9aba504bd3d78786e48bb6664e | refs/heads/master | 2021-07-05T09:51:36.853412 | 2021-04-01T07:52:23 | 2021-04-01T07:52:23 | 229,213,251 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,682 | py | #!/usr/bin/env python
# -*- encoding:utf-8 -*-
"""
主要推荐算法:
1、基于内容的推荐:根据物品本身的属性来推荐相似的物品,不存在冷启动问题
2、协同过滤:
(1)基于用户的协同过滤:根据用户对物品的行为(浏览、评分、评论等),计算相似用户,推荐相似用户喜欢的物品
(2)基于物品的协同过滤:根据用户对物品的行为,计算相似物品,给用户推荐相似物品
3、基于模型的推荐:LR
4、基于热度的推荐:推荐热门商品
这里实现了基于用户的协同过滤和基于物品的协同过滤算法
一些讨论:
Q:UserCF和ItemCF分别适用于什么情况... | [
"hailun.hou@dmall.com"
] | hailun.hou@dmall.com |
bacfe0cedd641eedac0e37cfc4a6643a46fa649f | d0677b27a5360651c5ca491cf566207810e57639 | /pterasoftware/problems.py | 8e2af8914addac9fab7b6fc0e2474e348dd7712a | [
"MIT"
] | permissive | Haider-BA/PteraSoftware | a0e9a73b7474a379cf1fbc686042ec9e3b52d4c5 | 06b62a78e1da04975d115af2d7b95434ab9cc550 | refs/heads/master | 2023-09-02T20:05:12.799392 | 2021-10-27T05:23:28 | 2021-10-27T05:23:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,797 | py | """This module contains the class definitions for different types of problems.
This module contains the following classes:
SteadyProblem: This is a class for steady aerodynamics problems.
UnsteadyProblem: This is a class for unsteady aerodynamics problems.
This module contains the following exceptions:
N... | [
"camerongurban@gmail.com"
] | camerongurban@gmail.com |
b6b6a1c266d7583326d7eaef59d61d60bb2a4344 | 7624e7fca387651e278e1e9911b37c675e3a599c | /LeetCode/中等/链表/143. 重排链表.py | 0a13101193b07ff6811aadd9017ea677eb88777a | [] | no_license | homezzm/leetcode | 53269f1c94c040a41b03e4342d4c241e3f1102b5 | 63ac5a0921835b1e9d65f71e1346bbb7d66dad9b | refs/heads/master | 2023-03-03T09:28:16.974397 | 2021-02-15T03:21:17 | 2021-02-15T03:21:17 | 330,537,897 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,530 | py | # Definition for singly-linked list.
class ListNode(object):
def __init__(self, val=0, next=None):
self.val = val
self.next = next
class Solution(object):
def reorderList(self, head):
"""
https://leetcode-cn.com/problems/reorder-list/
:type head: ListNode
:rtype... | [
"homezzm@126.com"
] | homezzm@126.com |
ae07ec3de96f7483fd01e1ab2bb87752fb118af9 | db56d3d14d85e2171c1d8be5564b227da544a056 | /DashBoard/migrations/0012_auto_20171028_1448.py | 2f1342db41cb51096810c59978f6d3a5171805da | [] | no_license | onkar27/BillDesk | cd039793f90916745399dfcbbef661b8cc42e9af | 0c0046c3fd54198b24042d52b3e206204560d02f | refs/heads/master | 2020-03-12T16:55:28.711387 | 2018-03-15T10:59:50 | 2018-03-15T10:59:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 508 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-10-28 09:18
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('DashBoard', '0011_auto_20171028_1435'),
]
operations = [
mi... | [
"vvt5676@gmail.com"
] | vvt5676@gmail.com |
3f0c9e227a43f78a688dc7a8eb87be2b962aafca | 3e879618053d86aa6c3d1a3a4de76a8337ed4ff8 | /generate_info.py | 79f3d96d2b2a92a184a6299c8577cf1521e35c26 | [] | no_license | robertvandeneynde/parascolaire | a3bad82e420dfc2a9d2ed72b717453a388dc8b3e | 444a7b8ea862571d120e8e165943ae5c034ede70 | refs/heads/master | 2021-04-29T00:02:21.674614 | 2021-02-01T06:09:32 | 2021-02-01T06:09:32 | 77,689,850 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,174 | py |
from itertools import starmap
GROUPINGS = ('theorie', 'exercice', 'pygame',
'progra', 'gl', 'lecture', 'pdf',
'projet', 'colorpicker', '')
EXTS = {
'.pdf': 1,
'.odp': 2,
'.html': 3,
'.css': 4,
'.svg': 5,
'.png': 6,
'.jpg': 7,
'.py': 8,
'.php': 9,
'.ja... | [
"robertvandeneynde@hotmail.com"
] | robertvandeneynde@hotmail.com |
95694b5a35ed7e24b56a74b1afda76ae1b26ee3a | 1e9a1a0198c87ea5af7f84b829299016170a5a93 | /gallery/urls.py | 4d666cc1b6c4299441356e6af2afb5b42c3e3836 | [
"MIT"
] | permissive | Sonray/personal-gallery-app-django-IP1 | 015e96f919686bfd5640ba9b1380f4e076f60dcb | 6a6a46b7b0c2a6454e5645581c12a2981f58116e | refs/heads/master | 2022-12-27T05:22:28.479829 | 2020-10-12T13:14:18 | 2020-10-12T13:14:18 | 302,561,118 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,007 | py | """gallery URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based... | [
"osweredavid@gmail.com"
] | osweredavid@gmail.com |
b4b8e0efb99ad3d22c79b13a413614ed2bee17d1 | 1b30905742e50f8e45494c847c2bacdd43da21e7 | /src/test80_02.py | 84dbff46965cbff9eb41d1bb13451e06ae09c947 | [] | no_license | choijaehoon1/baekjoon_workbook | e57e30f84fafa3ffcd8da9a2238260eab29f7d9f | 26966e9fc814c2099408a6b96906522f432aa602 | refs/heads/main | 2023-07-20T18:54:36.727559 | 2021-08-20T14:39:54 | 2021-08-20T14:39:54 | 352,350,916 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,040 | py | import sys
import heapq
N = int(sys.stdin.readline().rstrip())
max_h = []
min_h = []
visit = [0]*100001
for i in range(N):
P,L = map(int,sys.stdin.readline().rstrip().split())
heapq.heappush(max_h,[-L,-P])
heapq.heappush(min_h,[L,P])
visit[P] = 1
M = int(sys.stdin.readline().rstrip())
for i in ran... | [
"wogns_20@naver.com"
] | wogns_20@naver.com |
380416663a81baac84017b3079c63794ee8e9744 | 0a620b0673ba92013b40b2c60c47eab2014c8c46 | /setup.py | 9d272131374b006ced1dc197d27f2798c66f98a0 | [
"BSD-3-Clause"
] | permissive | epaxon/neurokernel | 691c541ff548272bd73db03d5db7a2f57f18c7a2 | e66eb7b97c7efb54d6929cd25ac511ec663a3691 | refs/heads/master | 2021-01-14T10:26:55.831028 | 2014-12-31T17:58:58 | 2014-12-31T17:58:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,806 | py | #!/usr/bin/env python
import sys, os
from glob import glob
# Install setuptools if it isn't available:
try:
import setuptools
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from distutils.command.install import INSTALL_SCHEMES
from distutils.command.install_headers import instal... | [
"lev@columbia.edu"
] | lev@columbia.edu |
fff6d8c0f7b8487ee92f9790aeac3b6acd4859e0 | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /data/p3BR/R1/benchmark/startQiskit_QC40.py | 4dfb9a84f44fa199d004bd3d846167efe2748c34 | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/QDiff | ad53650034897abb5941e74539e3aee8edb600ab | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | refs/heads/main | 2023-08-05T04:52:24.961998 | 2021-09-19T02:56:16 | 2021-09-19T02:56:16 | 405,159,939 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,295 | py | # qubit number=3
# total number=9
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collections import Counter
from ... | [
"wangjiyuan123@yeah.net"
] | wangjiyuan123@yeah.net |
e70e21698dc4de599aab6c2d98e3f6f7418249d0 | e7ce07610fc908eb941d149d1d2905680934fa34 | /src/xades/xades_context.py | 438fd95bb61eadf9f5e1b5b55dff88bc9d168387 | [
"BSD-3-Clause"
] | permissive | blaggacao/python-xades | 47cdb7f5e40615df988c4bd33b9f1ab770259ce2 | 95d85e894ad777c26d78e41cd3077341f63d5761 | refs/heads/master | 2020-08-04T18:34:01.286510 | 2019-10-02T10:04:15 | 2019-10-02T10:04:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,562 | py | # -*- coding: utf-8 -*-
# © 2017 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from datetime import datetime
from os import path
import pytz
from lxml import etree
from xmlsig import SignatureContext, constants
from .constants import NS_MAP
from .policy import ImpliedPolicy
class... | [
"etobella@creublanca.es"
] | etobella@creublanca.es |
2e70268271bbd3d3aabebcfc7b64fe149f4a326e | 8fb9441f0e09986477a847a65eb21b1adc84c117 | /uzytkownik/views.py | 3ced65212a6905ed6205a9fc3ff54436f3dc3217 | [] | no_license | arbuz-team/asbhp | 2eb9a44d681fb427dcc2c920b0000260d9ea70af | 182a79b331bf68a173cb887158d4417dfea4d06c | refs/heads/master | 2021-01-15T15:33:39.203194 | 2016-08-30T13:06:14 | 2016-08-30T13:06:14 | 59,667,831 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,047 | py | from .forms import *
from dodatek.views import *
def Logowanie(request):
Sprawdz_Sesje(request, meta_tag=False)
if request.method == 'POST':
formularz = Formularz_Logowania(request.POST)
if formularz.is_valid():
request.session['zalogowany'] = True
return redirect('W... | [
"93.endo@gmail.com"
] | 93.endo@gmail.com |
43e8d8f6985b083027ed7999594214ceab8a9329 | cd2aaf0097f2e244aa4a22c9da7133dd0e2f2fb8 | /Saylani/python-code-master/17Sep2017/storingdata/storing5.py | 52ca4fee5f1896aac8f78b84c72e1319e12030be | [] | no_license | EnggQasim/SSUET-2017-Module-I | 349ea6e9b0554fa8c55899622bf0ee97fd19b685 | cd41ab8e768616ca56ddaa1d7662283f653674f9 | refs/heads/master | 2020-03-25T10:36:38.330710 | 2018-09-30T13:17:38 | 2018-09-30T13:17:38 | 143,698,684 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 136 | py | import json
data = []
filename = 'numbers.json'
with open(filename) as f_obj:
data = json.load(f_obj)
print(data);
print(data[1]); | [
"m.qasim077@gmail.com"
] | m.qasim077@gmail.com |
1031ac492db51714efd93f523ebc4793486476d2 | 3a891a79be468621aae43defd9a5516f9763f36e | /desktop/core/ext-py/tablib-0.10.0/tablib/packages/openpyxl3/reader/__init__.py | 76f10f8ddba56ce1a227345abd905928ab605724 | [
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"BSD-Advertising-Acknowledgement",
"MIT"
] | permissive | oyorooms/hue | b53eb87f805063a90f957fd2e1733f21406269aa | 4082346ef8d5e6a8365b05752be41186840dc868 | refs/heads/master | 2020-04-15T20:31:56.931218 | 2019-01-09T19:02:21 | 2019-01-09T19:05:36 | 164,998,117 | 4 | 2 | Apache-2.0 | 2019-01-10T05:47:36 | 2019-01-10T05:47:36 | null | UTF-8 | Python | false | false | 1,389 | py | # file openpyxl/reader/__init__.py
# Copyright (c) 2010 openpyxl
#
# 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 rights
# to use, copy... | [
"abraham@elmahrek.com"
] | abraham@elmahrek.com |
21831bda7582e2074b3ed9e4b09a1d18b4667a95 | 45de7d905486934629730945619f49281ad19359 | /xlsxwriter/test/comparison/test_cond_format16.py | 8cfca00a63e33d510a4fa60177a20a30d0034d21 | [
"BSD-2-Clause"
] | permissive | jmcnamara/XlsxWriter | 599e1d225d698120ef931a776a9d93a6f60186ed | ab13807a1be68652ffc512ae6f5791d113b94ee1 | refs/heads/main | 2023-09-04T04:21:04.559742 | 2023-08-31T19:30:52 | 2023-08-31T19:30:52 | 7,433,211 | 3,251 | 712 | BSD-2-Clause | 2023-08-28T18:52:14 | 2013-01-04T01:07:06 | Python | UTF-8 | Python | false | false | 1,590 | py | ###############################################################################
#
# Tests for XlsxWriter.
#
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c), 2013-2023, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparison_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompar... | [
"jmcnamara@cpan.org"
] | jmcnamara@cpan.org |
db0058f8d1802e457c5cfb2a3465725d63b921d9 | 3a476e0de377d1580facbfd78efdfbca009ed7a3 | /TG-zerg and TG-Terran/Terran/lib/option.py | 0ff27c57103882421c22e5a6e8ddf6a2bb52081c | [
"MIT"
] | permissive | liuruoze/Thought-SC2 | b7366186dbb4494fabdb3e0104354665e21ff707 | b3cfbeffbfa09b952c596805d2006af24613db2d | refs/heads/master | 2023-04-28T11:47:56.771797 | 2021-01-15T00:25:26 | 2021-01-15T00:25:26 | 296,185,180 | 4 | 2 | MIT | 2023-04-24T09:06:48 | 2020-09-17T01:17:04 | Python | UTF-8 | Python | false | false | 6,506 | py | import lib.config as C
import lib.utils as U
from lib import transform_pos as T
import numpy as np
def check_params(agent, action, unit_type, args, action_type):
valid = False
if action_type == 0: # select
if action in agent.obs.observation["available_actions"]:
valid = True
#... | [
"liuruoze@163.com"
] | liuruoze@163.com |
0632feef348d336bf19c4ddf42f5c2225a6b50ed | aa5050aeccdd649730c1163e56e98bcd919e460d | /array/88_合并两个有序数组/88_easy_合并两个有序数组.py | 55eec79f1a430f3e563a6befa4638100406bd2d3 | [] | no_license | darrenzhang1007/Algorithm | 482ad837fc7135ba521d73f21989d2326953d506 | 8e121225b7952ef0aa45d2d4970874be944ae93a | refs/heads/master | 2022-12-02T17:44:41.934246 | 2020-08-16T15:43:42 | 2020-08-16T15:43:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,386 | py | #
# @lc app=leetcode.cn id=88 lang=python3
#
# [88] 合并两个有序数组
#
# https://leetcode-cn.com/problems/merge-sorted-array/description/
#
# algorithms
# Easy (47.27%)
# Likes: 554
# Dislikes: 0
# Total Accepted: 171K
# Total Submissions: 356.1K
# Testcase Example: '[1,2,3,0,0,0]\n3\n[2,5,6]\n3'
#
# 给你两个有序整数数组 nums1 和 ... | [
"785320051@qq.com"
] | 785320051@qq.com |
d929d705f363209e013b1da755584f274bf5de96 | 942ee5e8d54e8ebe9c5c841fbfdd1da652946944 | /1001-1500/1334.Find the City With the Smallest Number of Neighbors at a Threshold Distance.py | 0d727445642105f41abb7fb991bb47a512e43b69 | [] | no_license | kaiwensun/leetcode | 0129c174457f32887fbca078fb448adce46dd89d | 6b607f4aae3a4603e61f2e2b7480fdfba1d9b947 | refs/heads/master | 2023-08-31T07:30:50.459062 | 2023-08-27T07:59:16 | 2023-08-27T07:59:16 | 57,526,914 | 69 | 9 | null | 2023-08-20T06:34:41 | 2016-05-01T05:37:29 | Python | UTF-8 | Python | false | false | 909 | py | from collections import defaultdict
class Solution(object):
def findTheCity(self, n, edges, distanceThreshold):
"""
:type n: int
:type edges: List[List[int]]
:type distanceThreshold: int
:rtype: int
"""
dist = [[float('inf')] * n for _ in xrange(n)]
fo... | [
"noreply@github.com"
] | kaiwensun.noreply@github.com |
8d84e5efa9253e987e739bea72008303a15df86f | 3325f16c04ca8e641cbd58e396f983542b793091 | /Seção 16 - Orientação a Objetos com Python/classes.py | dd69e9cfdabe3c81f84cb908b6744589cb05cfda | [] | no_license | romulovieira777/Programacao_em_Python_Essencial | ac929fbbd6a002bcc689b8d6e54d46177632c169 | e81d219db773d562841203ea370bf4f098c4bd21 | refs/heads/master | 2023-06-11T16:06:36.971113 | 2021-07-06T20:57:25 | 2021-07-06T20:57:25 | 269,442,342 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,789 | py | """
POO - Classes
Em POO, Classes nada mais são do que modelos dos objetos do mundo real sendo representados
computacionalmente.
Imagine que você queira fazer um sistema para automatizar o controle das lâmpadas da sua casa.
Classes podem conter:
- Atributos -> Representam as características do objeto. Ou seja, p... | [
"romulo.vieira777@gmail.com"
] | romulo.vieira777@gmail.com |
1834f93e1043057e73707a4bb030ba6e43331367 | edbd6ee1c76ed53c24c711ca68d643c94ac97481 | /History/0815/617_mergeTrees.py | 5ca516dd3919d4be9c322376726e2d85de182494 | [] | no_license | Linjiayu6/LeetCode | dd0ee7cff962fce7298227d9ce52ed6700fed98b | 2dea64cb7198bd7c71ba023d074b1036088d5632 | refs/heads/master | 2021-07-22T21:44:23.536275 | 2020-07-09T00:56:28 | 2020-07-09T00:56:28 | 194,610,005 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 735 | py | # -*- coding: utf-8 -*
"""
[1,3,2,5]
[2,1,3,null,4,null,7]
"""
# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def mergeTrees(self, t1, t2):
"""
:type t... | [
"linjiayu@meituan.com"
] | linjiayu@meituan.com |
0d8ef4e07cb81013beb9c95d73f4a91302e7b3a1 | 12972f4d9e7de2c38e79ae911f2e7b125965cac9 | /virtual/lib/python3.6/site-packages/pip/_vendor/pep517/envbuild.py | c63bffbc9060f09f821f1501c18dc8fc8098a1b6 | [
"MIT"
] | permissive | Michellemukami/pitch | b33d0de81cc2a0dfe70ddc1e91affc88af63ff2b | aebb7736d18766343a5a295de0782aa175245c35 | refs/heads/master | 2022-10-22T03:55:33.364628 | 2019-08-07T10:15:10 | 2019-08-07T10:15:10 | 200,673,234 | 0 | 0 | null | 2022-09-16T18:07:53 | 2019-08-05T14:38:26 | Python | UTF-8 | Python | false | false | 5,759 | py | """Build wheels/sdists by installing build deps to a temporary environment.
"""
import os
import logging
from pip._vendor import pytoml
import shutil
from subprocess import check_call
import sys
from sysconfig import get_paths
from tempfile import mkdtemp
from .wrappers import Pep517HookCaller
log = logging.getLogge... | [
"you@example.com"
] | you@example.com |
be65924495ab1c9a6ab5aee66b2b19ad5b8c1a21 | 4a76ac7ad1aaeec44729ab6d5b121b1cae0d910c | /Week 6/maxDepthNaryTree.py | bc7f73fda7817b1615c5f5e38ea8c5ed8531b94f | [] | no_license | kalmad99/CompetitiveProgramming | 2d825e839faa9e13ef43dbb45498bd3eef6723ab | 6cbb1f12f7670d0016fa2af8f2dd597d9123070d | refs/heads/main | 2023-03-25T20:18:23.389396 | 2021-03-24T21:36:52 | 2021-03-24T21:36:52 | 325,816,614 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,248 | py | from collections import deque
#DFS
class Node:
def __init__(self, val=None, children=None):
self.val = val
self.children = children
class Solution:
def maxDepth(self, root: 'Node') -> int:
if not root:
return 0
if not root.children:
return 1
de... | [
"kalemesfin12@gmail.com"
] | kalemesfin12@gmail.com |
0f58d636ea9285c6459e85548da063b77ff286af | ce074998469af446e33d0fab7adb01320ccc77ed | /dst_procedures/Winlogon Userinit Key Persistence- PowerShell.py | 0ffafa370f7052069e7a8bab9ebe7c21601971d2 | [] | no_license | parahaoer/detection_rules | 1341063568b0ccfa180da129a29aeec0a62e679e | c9f3408eccbcb4b61d1d441af31839872f9bb26c | refs/heads/master | 2023-02-09T13:54:40.254874 | 2020-12-28T09:25:31 | 2020-12-28T09:25:31 | 265,990,044 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 511 | py | {"query": {"constant_score": {"filter": {"bool": {"must": [{"match_phrase": {"event_id": "4104"}}, {"bool": {"should": [{"multi_match": {"query": "*Set-ItemProperty*", "fields": [], "type": "phrase"}}, {"multi_match": {"query": "*New-Item*", "fields": [], "type": "phrase"}}]}}, {"multi_match": {"query": "*CurrentVersio... | [
"33771109+parahaoer@users.noreply.github.com"
] | 33771109+parahaoer@users.noreply.github.com |
8cc30ef1290424be58d62d87be62e0eee9a89112 | 7087a5dd1772c9456f098bc024a894dcaeef5432 | /calbin/build/calkube/kubernetes-6.0.0_snapshot-py2.7.egg/kubernetes/client/models/v1_handler.py | 73e39ea71f754f35cca6baf6a428df2c9e810425 | [] | no_license | santhoshchami/kubecctl-python | 5be7a5a17cc6f08ec717b3eb1c11719ef7653aba | cd45af465e25b0799d65c573e841e2acb983ee68 | refs/heads/master | 2021-06-23T11:00:43.615062 | 2019-07-10T16:57:06 | 2019-07-10T16:57:06 | 145,669,246 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,801 | py | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.10.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re... | [
"root@kube-node02.local"
] | root@kube-node02.local |
2baa10ab7a1535d5fe4a43f4f8daca199741c09c | 032aaf688e40a52012d9075710b2a90e7f6b724f | /plugins/vt/vtmanager.py | 7223408b7aa451dbaabfa4c21f3479e515c06879 | [] | no_license | lipengbo/vt_manager | 54fdb48f948277d906d9e48d4dd2e242c538f7b9 | 8a9797d3fc0fa9cd883db9df50985f01679fb062 | refs/heads/master | 2021-01-22T02:49:25.167340 | 2013-10-30T17:55:55 | 2013-10-30T17:55:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,518 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Filename:vtmanager.py
# Date:Sun Oct 06 01:40:50 CST 2013
# Author:Pengbo Li
# E-mail:lipengbo10054444@gmail.com
from plugins.common.agent_client import AgentClient
from resources.models import Server
from plugins.vt.models import VirtualMachine
from etc import config
imp... | [
"lipengbo10054444@gmail.com"
] | lipengbo10054444@gmail.com |
3ab4b2c2e59ca8f0174efe71d80a7839f3409b20 | b15d2787a1eeb56dfa700480364337216d2b1eb9 | /samples/cli/accelbyte_py_sdk_cli/social/_get_stats.py | 019dda652e918ffdb1d98f51810de6e77804f9c1 | [
"MIT"
] | permissive | AccelByte/accelbyte-python-sdk | dedf3b8a592beef5fcf86b4245678ee3277f953d | 539c617c7e6938892fa49f95585b2a45c97a59e0 | refs/heads/main | 2023-08-24T14:38:04.370340 | 2023-08-22T01:08:03 | 2023-08-22T01:08:03 | 410,735,805 | 2 | 1 | MIT | 2022-08-02T03:54:11 | 2021-09-27T04:00:10 | Python | UTF-8 | Python | false | false | 2,596 | py | # Copyright (c) 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
#
# Code generated. DO NOT EDIT!
# template_file: python-cli-command.j2
# AGS Social Service (2.9.2)
# pylint: disable=duplicate-code
# py... | [
"elmernocon@gmail.com"
] | elmernocon@gmail.com |
fcd03d4b7b6db79e76be39b40af55a551a5d9844 | bb88122fc4978b14e8a9b02d8c11f1ce67ea17d0 | /01_keras/keras33_1_boston_cnn.py | 25e6908da01d7646e9da6bd97a3abe88fdee2a3c | [] | no_license | star10919/Keras_ | c2c8a6f3d0e1a7ceba9e81dbc51ecfd12bd5fe78 | f3156b7db6e12feea075b46e94b09157f43a141c | refs/heads/main | 2023-08-17T22:44:54.324315 | 2021-10-24T02:47:00 | 2021-10-24T02:47:00 | 390,066,491 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,997 | py | from sklearn.preprocessing import MaxAbsScaler, RobustScaler, QuantileTransformer, PowerTransformer
from sklearn.datasets import load_boston
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Conv2D, Flatten, MaxPool2D, GlobalAveragePooling2D
from sklearn.model_selection import tr... | [
"star10919@naver.com"
] | star10919@naver.com |
facbc85873001655bb58f0379568952146dabc23 | 9c722610171dd5ee5db1bbec362e095203b17d2b | /fn_rsa_netwitness/tests/test_netwitness_query.py | f7b78753c4b2da7c6ea75119b92b03df297c6177 | [
"MIT"
] | permissive | johnrehw/resilient-community-apps | 9833cd371c81a258c76843d4ca608987fc17e2f6 | 4cac28b9d723bb3014684fadbdc6f7da163566ea | refs/heads/master | 2020-06-04T08:23:25.216849 | 2019-06-25T19:25:05 | 2019-06-25T19:25:05 | 191,943,353 | 0 | 0 | MIT | 2019-06-14T12:57:34 | 2019-06-14T12:57:34 | null | UTF-8 | Python | false | false | 3,108 | py | # -*- coding: utf-8 -*-
"""Tests using pytest_resilient_circuits"""
from __future__ import print_function
import pytest
import os
from resilient_circuits.util import get_function_definition
from resilient_circuits import SubmitTestFunction, FunctionResult
from fn_rsa_netwitness.util.helper import get_headers, create_t... | [
"brianwal@us.ibm.com"
] | brianwal@us.ibm.com |
468ee7fdc7e84727ab46d73817feb901911e8bc0 | 7b270cf5f9d0a3e26b5afd758563c6cff73a5248 | /comportamentais/visitor/arvore_binaria/arvore/padroes/__init__.py | 323fe5dec34100464eb7fa97146201ded0360ec9 | [] | no_license | reginaldosantarosa/DesignPatterns | 10810672d3831e562ec636a5f66bd709c797ca34 | bec4247f52b8d2e1fe41c570408816a5d4b22608 | refs/heads/master | 2020-04-04T06:54:19.757054 | 2018-01-04T03:06:05 | 2018-01-04T03:06:05 | 155,761,201 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 213 | py | from arvore.padroes.exibirInOrderVisitor import ExibirInOrderVisitor
from arvore.padroes.exibirPostOrderVisitor import ExibirPostOrderVisitor
from arvore.padroes.exibirPreOrderVisitor import ExibirPreOrderVisitor
| [
"victorhad@gmail.com"
] | victorhad@gmail.com |
555e8b6afc0b843910e59c2f3a49c959e1aafa6b | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03125/s773197868.py | 8aad020f8a7fed260f50f476ac0933dbdc166539 | [] | 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 | 306 | py | '''A - B +/- A
https://atcoder.jp/contests/abc118/tasks/abc118_a
>>> main(4, 12)
16
>>> main(8, 20)
12
>>> main(1, 1)
2
'''
def main(a: int, b: int):
if (b % a) == 0:
print(a+b)
else:
print(b-a)
if __name__ == "__main__":
a, b = map(int, input().split(' '))
main(a, b)
| [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
f23881c57abafdc7aab0e0ab0d9ed8d212eefd30 | d5cf8601eee96e0570795324d4cf257f9c27ec97 | /log_parser/commands/stats/statistics.py | ef3b1d85f1422e6830350e05f2bd131e2e5009f1 | [] | no_license | pcieslinski/log_parser | 13f20ea2a75455a026c372cb60c365abac50fb20 | b2acfa249ccc0ece492b282d3d144ead9c33f01d | refs/heads/master | 2021-07-06T22:03:26.114935 | 2020-08-30T13:36:12 | 2020-08-30T13:36:12 | 236,012,442 | 1 | 0 | null | 2021-04-20T19:14:07 | 2020-01-24T13:58:12 | Python | UTF-8 | Python | false | false | 1,790 | py | import math
from typing import List
from collections import Counter
from log_parser.services import date_service
from log_parser.parser.log_line import LogLine
from log_parser.commands.stats.istatistic import IStatistic
SIZES_NAMES = ('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB')
class AverageResponseSize(I... | [
"pcieslinski721@gmail.com"
] | pcieslinski721@gmail.com |
b731b52cb49b2ce6dd8d6eab592b8b4bb125a1eb | ba0cbdae81c171bd4be7b12c0594de72bd6d625a | /MyToontown/Panda3D-1.9.0/direct/ffi/FFIRename.py | c969afc388bc7e04a7e1bb6185789f4dd66f06b7 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | sweep41/Toontown-2016 | 65985f198fa32a832e762fa9c59e59606d6a40a3 | 7732fb2c27001264e6dd652c057b3dc41f9c8a7d | refs/heads/master | 2021-01-23T16:04:45.264205 | 2017-06-04T02:47:34 | 2017-06-04T02:47:34 | 93,279,679 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,292 | py | import FFIConstants
from string import *
pythonKeywords = ['and','del','for','is','raise','assert','elif','from','lambda','return','break','else','global','not','try','class','except','if','or','while','continue','exec','import','pass','def','finally','in','print']
methodRenameDictionary = {
'operator==... | [
"sweep14@gmail.com"
] | sweep14@gmail.com |
f59bd97b1ebaf4a54ff4955ef8d347fe34341724 | 3c184e42c99c14c2a36e318ac1b2407a2a3360c4 | /Python爬虫/python-scraping/chap4_API/scrapetest4-1.py | 74820e19d66e2c42eaf77315937337847484900e | [] | no_license | lovehhf/some_notes | 58fc2d4c6cd83bf017d766cb65550be5caa2af20 | 54152b6f33072b279660588bc6e43faa4b468389 | refs/heads/master | 2020-12-25T22:07:41.553903 | 2016-12-22T15:41:08 | 2016-12-22T15:41:08 | 66,702,281 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 616 | py | import json
from urllib.request import urlopen
from bs4 import BeautifulSoup
def get_ipv4():
html = urlopen("http://ipinfo.io/ip")
bsObj = BeautifulSoup(html,"html.parser")
ipv4 = bsObj.get_text()
return str(ipv4)
def get_ip_info(ipAddress):
response = urlopen("http://freegeoip.net/json/"+ipAddress... | [
"853885165@qq.com"
] | 853885165@qq.com |
b508c206e2d4407a5c0105f7c1819aed75dda1d0 | e00d41c9f4045b6c6f36c0494f92cad2bec771e2 | /programming/language/python3/python3-charset-normalizer/actions.py | 1b9da7a344abcb0e51ea43135537b674f211cc38 | [] | 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 | 376 | py | #!/usr/bin/env 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 pythonmodules
from pisi.actionsapi import pisitools
def build():
pythonmodules.compile(pyVer="3")
def install():
pythonmod... | [
"muscnsl@hotmail.com"
] | muscnsl@hotmail.com |
30cf2e860c5b03dac59f013145d2ff5b3e73b55e | 1a53955f724bdbc92c78b76707e8cd198c44a57f | /6.scrapy/02.持久化存储/代码/基于终端指令/qiubaiPro/qiubaiPro/settings.py | f6f5009df3de27bc15be4b2261d9be1e227d093c | [] | no_license | foremostxiao/studying-of-scrapy | bc36b18b28361b4929d5e61ecf61a2f29007039a | c3e40d0a844d115a39e6dffb0f1e3c0f4093ade2 | refs/heads/master | 2020-04-10T18:07:42.932688 | 2018-12-10T15:19:30 | 2018-12-10T15:19:30 | 161,194,629 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,243 | py | # -*- coding: utf-8 -*-
# Scrapy settings for qiubaiPro project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://doc.scrapy.org/en/latest/topics/settings.html
# https://doc.scrapy.org/en/latest/top... | [
"foremostxiao@163.com"
] | foremostxiao@163.com |
b91b448c726e9db1fdd0393c6221f32f8c219afc | 38d34dcc8b14b05063cef875734eb4866591d133 | /medicifyapp/urls.py | 41a64ce4d5392bd8e049bee46009fe8d3cc9c9eb | [] | no_license | AbdurRahman111/Awsome_E-Commerce_Website | 02a4061a3842559d14dd38f7a00a61b403a04822 | 743b702bb3e87e38aaf63470b67398ee33a10358 | refs/heads/master | 2023-02-25T09:38:51.146166 | 2021-02-05T16:29:00 | 2021-02-05T16:29:00 | 336,326,420 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,414 | py | from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('gp_jobs', views.gp_jobs, name='gp_jobs'),
path('about', views.about, name='about'),
path('contact', views.contact, name='contact'),
path('profile', views.profile, name='profile'),
path('... | [
"mdabdurrahmanchowdhury1122@gmail.com"
] | mdabdurrahmanchowdhury1122@gmail.com |
1dfeb076d834cdde83aa94d8319e99dfc4e9cfb9 | 0e1e643e864bcb96cf06f14f4cb559b034e114d0 | /Exps_7_v3/doc3d/Wyx_w_M_w_Sob_to_Wz_focus/Sob_Wxy/Sob_k05_s001_EroM_Mae_s001/pyr_Tcrop256_p60_j15/pyr_1s/L3/step10_a.py | c43b415796616cc436d10783f04ff645dc55befb | [] | no_license | KongBOy/kong_model2 | 33a94a9d2be5b0f28f9d479b3744e1d0e0ebd307 | 1af20b168ffccf0d5293a393a40a9fa9519410b2 | refs/heads/master | 2022-10-14T03:09:22.543998 | 2022-10-06T11:33:42 | 2022-10-06T11:33:42 | 242,080,692 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,268 | py | #############################################################################################################################################################################################################
##################################################################################################################... | [
"s89334roy@yahoo.com.tw"
] | s89334roy@yahoo.com.tw |
0e0f4be6048da3caa6829e4901cb516ef0add56a | eddb6fee4c31b747b260404d6cc7297bfcd6ae64 | /decals/build_mtl_truth.py | eb953dd9b6c767b8bcfb0f74a2fffb95a3cee2b6 | [] | no_license | forero/SandboxDESI | 200b33f078e8ba45f73a7351bb7a494e07dc8fdc | 98557fdf2a1cbaa3ca3b2fd762bccf3aa9433a42 | refs/heads/master | 2023-06-21T23:55:58.564257 | 2023-06-16T16:34:28 | 2023-06-16T16:34:28 | 21,949,010 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,792 | py | from astropy.table import Table
import astropy
import desitarget.mock.build as mb
import numpy as np
from desitarget.targetmask import desi_mask, bgs_mask, mws_mask
import desitarget.mtl
targetsfilename = "targets-dr5.0-0.16.2.fits"
#targetsfilename = "small_chunk_targets-dr5.0-0.16.2.fits"
targets = Table.read(target... | [
"j.e.forero.romero@gmail.com"
] | j.e.forero.romero@gmail.com |
5fa19d79135ea6a8c41f3039980eb414bf9dde95 | 711756b796d68035dc6a39060515200d1d37a274 | /output_exocyst_tags/optimized_7909.py | edd8e8b8fc6e5eac298f0461b9c3e54086a745ab | [] | no_license | batxes/exocyst_scripts | 8b109c279c93dd68c1d55ed64ad3cca93e3c95ca | a6c487d5053b9b67db22c59865e4ef2417e53030 | refs/heads/master | 2020-06-16T20:16:24.840725 | 2016-11-30T16:23:16 | 2016-11-30T16:23:16 | 75,075,164 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,843 | py | import _surface
import chimera
try:
import chimera.runCommand
except:
pass
from VolumePath import markerset as ms
try:
from VolumePath import Marker_Set, Link
new_marker_set=Marker_Set
except:
from VolumePath import volume_path_dialog
d= volume_path_dialog(True)
new_marker_set= d.new_marker_set
marker_set... | [
"batxes@gmail.com"
] | batxes@gmail.com |
34da857444bde70325b4d7f5bb1ef5be26695a11 | 3fe6d203369947431e71f41480b9fe4c48b3f0f3 | /atm-interface/account_test.py | dcce1157370a0e85c8ae2fa5ee24fd85e740025a | [] | no_license | tomaccosheep/guild-class | 8e68f3f1a4a4b470d557aefdcda77dcecc593aa7 | 29ff7cdeeb34ca175f91b37aba99cb6a249a8013 | refs/heads/master | 2021-01-22T02:08:23.543351 | 2017-06-01T23:27:16 | 2017-06-01T23:27:16 | 92,336,057 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 818 | py | import account
acc1 = account.Account(500)
print('Account #1', acc1)
acc2 = account.Account(1500)
print('Account #2', acc2)
acc1.withdraw(10)
print(acc1)
acc2.deposit(10)
print(acc2)
print(acc1.get_standing())
print(acc2.get_standing())
print(acc1.getfunds())
print(acc2.getfunds())
acc1.deposit(1)
acc2.deposit(1)
ac... | [
"al.burns.email@gmail.com"
] | al.burns.email@gmail.com |
e56bcf73c9b2416bf7cacc3cbdc8da198d1e8db1 | c3da4b42fb6650a1fe0008e4f75065d51d3df0a2 | /people_api/models/department.py | f162290c1074932419fff71994f29e850272f5ee | [] | no_license | DevHerles/minsa_viajeros | dcdc395696125be3cbf5277472623f0349574714 | 5d7ae71b53c43c1065d576953061c6a6c1150b68 | refs/heads/master | 2023-09-02T18:46:59.652226 | 2021-10-05T21:59:41 | 2021-10-05T21:59:41 | 379,735,212 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 455 | py | """MODELS - PERSON SYMPTOMS
The symptoms of a person is part of the Person model
"""
# # Native # #
from datetime import date
from typing import Optional
from contextlib import suppress
# # Package # #
from .common import BaseModel
from .fields import DepartmentFields
__all__ = ("Department", )
class Department(Ba... | [
"herles.incalla@gmail.com"
] | herles.incalla@gmail.com |
117ef5b0e9e96424e0b395b208c01f2418bf7b00 | 36957a9ce540846d08f151b6a2c2d582cff1df47 | /VR/Python/Python36/Lib/test/test_raise.py | 112e7c3d5b77fb77a53b67b8956fae174b8b2bdd | [] | no_license | aqp1234/gitVR | 60fc952307ef413e396d31e0d136faffe087ed2b | e70bd82c451943c2966b8ad1bee620a0ee1080d2 | refs/heads/master | 2022-12-29T15:30:12.540947 | 2020-10-07T15:26:32 | 2020-10-07T15:26:32 | 290,163,043 | 0 | 1 | null | 2020-08-25T09:15:40 | 2020-08-25T08:47:36 | C# | UTF-8 | Python | false | false | 130 | py | version https://git-lfs.github.com/spec/v1
oid sha256:363f2b571d0b691b26e68dc1ea3853b1f710f3217d72904a23340ec61e914085
size 11710
| [
"aqp1234@naver.com"
] | aqp1234@naver.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.