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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
43b33abced12630b4b24f937759544ab20ef8370 | 7f7bf9a5827d1441f18f568fc75ed5bf0159ca6c | /14_Yandex_Final_Tasks/A/A.py | d4258510d4f596ba4eaf12fd680b41e62c69c28d | [] | no_license | KorsakovPV/yandex_contest | 08bcff4eaf38d46a8348ac3abbb5f496857fe8e4 | f67917ef710f5b138142b11ec4e6e4678b23e408 | refs/heads/master | 2023-01-06T13:04:07.955570 | 2020-10-24T20:22:41 | 2020-10-24T20:22:41 | 290,097,693 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,166 | py | """
A. Большое число
Вечером ребята решили поиграть в игру "Большое число".
Даны числа. Нужно определить, какое самое большое число можно из них составить.
Формат ввода
В первой строке записано n - количество чисел. Оно не превосходит 100.
Во второй строке через пробел записаны n неотрицательных чисел, каждое из
кото... | [
"[email protected]"
] | |
db312e4b277fb2bb1bcd2efcb4f3457c0f939a0b | 460f981dfe1a05f14d2a4cdc6cc71e9ad798b785 | /3/amd64/envs/navigator/lib/python3.6/site-packages/osgeo/_osr.py | 35c7ae045de0cf8a2f9d8473b59af53c353048cc | [
"GPL-2.0-only",
"GPL-1.0-or-later",
"LGPL-2.0-or-later",
"LicenseRef-scancode-mit-old-style",
"dtoa",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain-disclaimer",
"Zlib",
"LicenseRef-scancode-public-domain",
"BSD-3-Clause",
"LicenseRef-scancode-proprietary-lic... | permissive | DFO-Ocean-Navigator/navigator-toolchain | d8c7351b477e66d674b50da54ec6ddc0f3a325ee | 930d26886fdf8591b51da9d53e2aca743bf128ba | refs/heads/master | 2022-11-05T18:57:30.938372 | 2021-04-22T02:02:45 | 2021-04-22T02:02:45 | 234,445,230 | 0 | 1 | BSD-3-Clause | 2022-10-25T06:46:23 | 2020-01-17T01:26:49 | C++ | UTF-8 | Python | false | false | 309 | py | def __bootstrap__():
global __bootstrap__, __loader__, __file__
import sys, pkg_resources, imp
__file__ = pkg_resources.resource_filename(__name__, '_osr.cpython-36m-x86_64-linux-gnu.so')
__loader__ = None; del __bootstrap__, __loader__
imp.load_dynamic(__name__,__file__)
__bootstrap__()
| [
"[email protected]"
] | |
a5d2f2afc771f9616114150718cd4b7d835be5b4 | 30150c7f6ed7a10ac50eee3f40101bc3165ebf9e | /src/coghq/DistributedMazeAI.py | 29fd883b37c9512dac79c0b2b4c58979121052c7 | [] | no_license | toontown-restoration-project/toontown | c2ad0d552cb9d5d3232ae6941e28f00c11ca3aa8 | 9bef6d9f823b2c12a176b33518eaa51ddbe3fd2f | refs/heads/master | 2022-12-23T19:46:16.697036 | 2020-10-02T20:17:09 | 2020-10-02T20:17:09 | 300,672,330 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,244 | py | from otp.level import DistributedEntityAI
from . import DistributedBarrelBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.distributed.ClockDelta import globalClockDelta
from direct.task import Task
class DistributedMazeAI(DistributedEntityAI.DistributedEntityAI):
notify = DirectNotifyGlobal.... | [
"[email protected]"
] | |
e71df24b87f48a17c62c90b1f716500fac38224f | 5c4136623d2ffea23d9e4d25e4f930f06cb627f3 | /tapis_cli/commands/taccapis/v2/jobs/helpers/error.py | 0457ab4a363f6ab7a9217d436d081e16e837c4c8 | [
"BSD-3-Clause"
] | permissive | shwetagopaul92/tapis-cli-ng | 3ca8ee0127fca435151a2f2e6dbdb26ab501d470 | 6f424b8352c0d034d4f5547fac21d5c8dd097a7f | refs/heads/master | 2020-12-13T09:31:33.334743 | 2020-01-08T19:14:51 | 2020-01-08T19:14:51 | 234,377,360 | 0 | 0 | BSD-3-Clause | 2020-01-16T17:45:14 | 2020-01-16T17:45:13 | null | UTF-8 | Python | false | false | 2,221 | py | """Exceptions and error handlers
"""
import logging
import re
import os
import time
from agavepy.agave import AgaveError
from attrdict import AttrDict
from requests.exceptions import HTTPError
__all__ = [
'AgaveError', 'HTTPError', 'HTTPNotFoundError', 'TapisOperationFailed',
'ImportNotCompleteError', 'OutputF... | [
"[email protected]"
] | |
3ce314bb3d0814413a90400f26fbcd5b9b62d98b | 177338a720f904f63926da055364cc0e2c0a850c | /spark/pyspark(by Leaderman git)/1.5.1/examples/app/spark_app_read_data_from_rcfile.py | b07906362ca93ab5697ccd402ee00a50a9c8df24 | [
"Apache-2.0"
] | permissive | xuefenga616/mygit | 60ef7bf7201603e13d4621cf7a39dea8ec92e0b7 | be3b8003fcc900ce7ca6616a9ddebb0edcbc1407 | refs/heads/master | 2020-09-13T11:50:55.448041 | 2017-08-27T10:59:00 | 2017-08-27T10:59:00 | 67,042,409 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 670 | py | from pyspark import SparkConf, SparkContext
conf = SparkConf().setAppName("spark_app_read_data_from_rcfile")
sc = SparkContext(conf=conf)
rowRDD = sc.hadoopFile(path="hdfs://dip.cdh5.dev:8020/user/yurun/rcfile",
inputFormatClass="org.apache.hadoop.hive.ql.io.RCFileInputFormat",
... | [
"[email protected]"
] | |
f9de43be1783e9e199bc07fac2b6171e9cd208b6 | 888a39e5e75f0e8311bbef63749685acf67fe715 | /clubs/migrations/0004_auto_20150313_0759.py | dcccaf36853555bf052545438947b8beb7c4d180 | [] | no_license | mozilla/teach-api | 94820e4ef9d51b1735b046a2a76cfbb9a37321da | 35a38df7addb8ca37e014705fe056755c3c1564f | refs/heads/master | 2023-09-01T09:00:37.995896 | 2016-12-15T19:42:23 | 2016-12-15T19:42:23 | 32,082,559 | 3 | 12 | null | 2019-03-29T05:11:24 | 2015-03-12T14:50:19 | Python | UTF-8 | Python | false | false | 994 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('clubs', '0003_auto_20150313_0020'),
]... | [
"[email protected]"
] | |
d091faee1b1bd72dac81cd9817bad618455a9452 | a3978d2c5367b116e77c73637d6c04f6cb8bc8a8 | /1807-1/07day/14-登录.py | 1bbd9e9ee574d863a8484430290440535cae5329 | [] | no_license | liuchenghao2000/1807 | 9acb1abd0035f93113cd7c1bda5b2b30f511a4d7 | cdbec3aae134b6f5ed0208fb5f8ee3e2a874a4ae | refs/heads/master | 2020-03-27T07:17:25.369702 | 2018-09-06T01:46:28 | 2018-09-06T01:46:28 | 139,957,605 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 251 | py | account = 123456
password = 'abc'
a = int(input('请输入账号:'))
p = input('请输入密码:')
if a == account and p == password:
print('登陆成功')
elif a != account:
print('账号不对')
elif p != password:
print('密码错误')
| [
"[email protected]"
] | |
115dec5e597d87a852c7cd0e1e0fb2a005e0196e | 54c5ddf4d427c52447a983b8e26409fdb4de6c11 | /src/architectures/jet_transforms/nmp/fixed_nmp/fixed_nmp.py | b844083ab5732d9827823ede20402583841bff3a | [
"BSD-3-Clause"
] | permissive | XintianHan/jets | eda3b0f4f1256b57669cc59664d22b38d3999bc1 | 2ee178eaa7f6629d25ca87ee1096e5ea5d15bfd3 | refs/heads/master | 2021-04-18T21:35:03.263843 | 2018-03-22T21:32:35 | 2018-03-22T21:32:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,785 | py | import os
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
#from .adjacency import construct_physics_based_adjacency_matrix
#from ..stacked_nmp.attention_pooling import construct_pooling_layer
from ..message_passing import MP_LAYERS
#from ..message_passing.adja... | [
"[email protected]"
] | |
619650f861eaee6a6fc6e373f4559eec6ede90b5 | 5963c12367490ffc01c9905c028d1d5480078dec | /homeassistant/components/rachio/webhooks.py | 94c79a1504f06214aa4c2cdbc3d1318956b902b8 | [
"Apache-2.0"
] | permissive | BenWoodford/home-assistant | eb03f73165d11935e8d6a9756272014267d7d66a | 2fee32fce03bc49e86cf2e7b741a15621a97cce5 | refs/heads/dev | 2023-03-05T06:13:30.354545 | 2021-07-18T09:51:53 | 2021-07-18T09:51:53 | 117,122,037 | 11 | 6 | Apache-2.0 | 2023-02-22T06:16:51 | 2018-01-11T16:10:19 | Python | UTF-8 | Python | false | false | 4,360 | py | """Webhooks used by rachio."""
from aiohttp import web
from homeassistant.const import URL_API
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_send
from .const import (
CONF_CLOUDHOOK_URL,
CONF_WEBHOOK_ID,
DOMAIN,
KEY_EXTERNAL_ID,
KEY_TYPE,
... | [
"[email protected]"
] | |
6abfb37f56100c04c5a8cbe2d7015c80c253cf6e | 711756b796d68035dc6a39060515200d1d37a274 | /output_cog_tags/optimized_5276.py | f96515b50804aa1965f08969e7801c0d9cc5cbeb | [] | 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,580 | 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... | [
"[email protected]"
] | |
e98489d6b8cb40edbfccddb2db4baba39162bb6f | d7016f69993570a1c55974582cda899ff70907ec | /sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_status_operations.py | 1576cd774f361745d159f2234176c397ca099b72 | [
"MIT",
"LicenseRef-scancode-generic-cla",
"LGPL-2.1-or-later"
] | permissive | kurtzeborn/azure-sdk-for-python | 51ca636ad26ca51bc0c9e6865332781787e6f882 | b23e71b289c71f179b9cf9b8c75b1922833a542a | refs/heads/main | 2023-03-21T14:19:50.299852 | 2023-02-15T13:30:47 | 2023-02-15T13:30:47 | 157,927,277 | 0 | 0 | MIT | 2022-07-19T08:05:23 | 2018-11-16T22:15:30 | Python | UTF-8 | Python | false | false | 7,849 | py | # pylint: disable=too-many-lines
# 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) AutoRe... | [
"[email protected]"
] | |
b70ee8da1219dd9283206acf0b078fbbe721eef6 | 558157826e0d25ff8f8e1e3a99a602832b49cfae | /model_0/mtl_model.py | 78ab9c906397f549608234f6815d6fb3659eb38a | [] | no_license | xljhtq/Transfer-learning- | 3ed5d6b8663cc852193f5b5935e7932732158910 | 44e83b30753dd92dbc5d4fae2d85aa8aaef2c82c | refs/heads/master | 2020-03-22T21:45:00.927073 | 2018-08-08T06:56:24 | 2018-08-08T06:56:24 | 140,711,696 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,166 | py | # encoding=utf8
import tensorflow as tf
from base_model import *
TASK_NUM = 2
class MTLModel():
def __init__(self,
max_len=25,
filter_sizes=1,
num_filters=1,
num_hidden=1,
word_vocab=None,
l2_reg_lambda=0.0,
... | [
"[email protected]"
] | |
16928356a06c1cffc5c619e3e67d56b0eaf4414c | 18825807a4cf373f00419e46ac70566d17115e9e | /top_interview_questions/easy/linked_list/merge_two_sorted_lists.py | 029cef4d6de1b99c91d8a393ac56ff86aff1ced9 | [] | no_license | StefanRankovic/leetcode | 51154d7297b4674c62e481c6c13016097207b4d0 | bbed81b50acaef025186648c61110dbf65e5f6cb | refs/heads/master | 2023-02-20T06:16:02.913457 | 2021-01-24T09:42:50 | 2021-01-24T09:42:50 | 266,200,324 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 623 | py | # Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def mergeTwoLists(self, l1: ListNode, l2: ListNode) -> ListNode:
head = current = ListNode()
while l1 and l2:
if l1.val <... | [
"[email protected]"
] | |
624993d2163e8fe840c9d4e7291e4d17025c0920 | e47afb9557d5143da9397faa9d63003ec7b84b0d | /4_5_List comprehension and generator expressions/Main.py | 0f3bb1163ed1bf5569b3eda82ee2c2ab4e9b0f01 | [] | no_license | Pavlo-Olshansky/Python_learns_1 | feb12d6a258d98162844efec465343b7cfc14788 | 98d278198dca833887e456f09934a4b4c336bf40 | refs/heads/master | 2021-01-19T13:29:47.174180 | 2019-12-16T08:16:35 | 2019-12-16T08:16:35 | 82,393,126 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 886 | py | xyz = [i for i in range(5)]
print(xyz)
xyz = (i for i in range(5)) # generator - it's in your memory now
print(xyz)
for i in xyz:
print(i)
# Generator's faster creating, but for working with them - it's longer
print('-------- 5 ----------\n')
input_list = [1, 5, 7, 10, 3, 20, 25, 12, 5]
def div_by_five(num):... | [
"[email protected]"
] | |
e1480a36e4bd0529d505b4b9880353a5e348cd05 | 818c7b09d7e264c130a849f86dabaa3d43656870 | /pycharm学习-基础篇/python模块/1.1时间模块.py | 4938bf771a3a97e2f539239d9f336f6ae9b1c548 | [] | no_license | rishinkaku/python_course | b89d51b38f64248e074ba66230353b1b335475ab | 6a2f2c175c863776a0e1125a8359a8ea97b95456 | refs/heads/master | 2020-03-28T11:50:20.231058 | 2018-08-29T13:01:59 | 2018-08-29T13:01:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,584 | py | # 时间戮
import time
print(time.time()) # 通常时间表示从1970年1月1日00:00:00开始以秒为单位,返回的是一个float型数据
print(type(time.time())) # 通常时间表示从1970年1月1日00:00:00开始以秒为单位,返回的是一个float型数据
print(time.clock()) # 函数以浮点数计算的秒数返回当前的CPU时间,用来衡量不同程序的耗时
'''
符号 简述
%a 本地简化的星期的名称
%A 本地完整的星期的名称
%b 本地简化的月份的名称
%B 本地完整的月份的... | [
"[email protected]"
] | |
368bcb43fae4cd5bd1b4080cb962bf41bf443ccd | ecb6b752523a126ef17895854b18e02df41c4cfe | /api_restful/user/api.py | 419c2cc52c3f7985a8cb407d107b4cbb59b9a520 | [
"MIT"
] | permissive | zhanghe06/bearing_project | cd6a1b2ba509392da37e5797a3619454ca464276 | 25729aa7a8a5b38906e60b370609b15e8911ecdd | refs/heads/master | 2023-05-27T17:23:22.561045 | 2023-05-23T09:26:07 | 2023-05-23T09:39:14 | 126,219,603 | 2 | 5 | MIT | 2022-12-08T03:11:27 | 2018-03-21T17:54:44 | JavaScript | UTF-8 | Python | false | false | 3,193 | py | #!/usr/bin/env python
# encoding: utf-8
"""
@author: zhanghe
@software: PyCharm
@file: api.py
@time: 2020-02-28 21:26
"""
import datetime
from api_restful.databases.bearing import db_bearing
from app_common.maps.status_delete import STATUS_DEL_OK
from api_restful.models.model_bearing import User
from app_common.li... | [
"[email protected]"
] | |
cb4beb5018f9938b6d550942065e3d19aee69687 | 8fa162cddb2046cb47f3a06c72743ed67685d03a | /dvc/dependency/__init__.py | 50222f02926bcad6b80fa0a1227b00b7b0ee84f1 | [
"Apache-2.0"
] | permissive | franekp/dvc | be9c123f03b77daa39781bd7e62fa25b9fae449f | e380a4a8586da643bf4e0d2281b13aee0d5e5207 | refs/heads/master | 2020-03-19T18:35:47.416381 | 2018-06-10T14:35:49 | 2018-06-10T14:35:49 | 136,816,230 | 0 | 0 | Apache-2.0 | 2018-06-10T14:32:53 | 2018-06-10T14:32:52 | null | UTF-8 | Python | false | false | 1,817 | py | import schema
try:
from urlparse import urlparse
except ImportError:
from urllib.parse import urlparse
from dvc.exceptions import DvcException
from dvc.config import Config
from dvc.dependency.base import DependencyBase
from dvc.dependency.s3 import DependencyS3
from dvc.dependency.gs import DependencyGS
fro... | [
"[email protected]"
] | |
ada4e614cc5df9247d515e08a82694f458afec8b | 4d0cf37d15fda02881c5b8dcdb1f0076bb31c778 | /lifelike/utils.py | 333c2bc8c859c626173cd738f634a22aa3c49bef | [
"MIT"
] | permissive | sudoentropy/lifelike | b53d70e666d94fdd266ea3567aa9291baf42efdf | 2af3a9d25e777f67648f772f805ee66d6982bab0 | refs/heads/master | 2023-01-19T05:28:35.152335 | 2020-11-15T02:48:30 | 2020-11-15T02:48:30 | 290,666,687 | 0 | 0 | MIT | 2020-08-27T03:33:52 | 2020-08-27T03:33:51 | null | UTF-8 | Python | false | false | 620 | py | from functools import wraps
import cloudpickle as pickle
def must_be_compiled_first(function):
@wraps(function)
def f(self, *args, **kwargs):
if not self.is_compiled:
raise ValueError(
"You must run .compile first on the model before using this method."
)
... | [
"[email protected]"
] | |
256e9f2acc7001d59650a9633bf384d5377f1b05 | 66b82b6b95dd4eb85f037ed8c70a9dc0cccc16e4 | /app/view_models/book.py | 91e719be3070dc400a9b4ce0fd4a227e56128885 | [] | no_license | jpch89/fishbook | 6c359b5efec88cbb414b72504a9131f924fe5f60 | 97db589046b9d59107033fa0ba9c071e63b6fcc0 | refs/heads/master | 2022-12-10T17:39:45.835372 | 2019-03-07T08:53:13 | 2019-03-07T08:53:13 | 144,078,892 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,148 | py | # -*- coding: utf-8 -*-
# @Author: jpch89
# @Time: 2018/8/14 22:44
class BookViewModel:
def __init__(self, book):
self.title = book['title']
self.publisher = book['publisher']
self.author = '、'.join(book['author'])
self.image = book['image']
self.price = book['... | [
"[email protected]"
] | |
ea316e15a1e1e0ff59fbe6cb5228abfa0b24ffb3 | 1e013dc5f0de0f61e27f2867557803a01c01f4da | /Language/python/grammer/decorator/6_func_impl.py | 63f6ff403a1a6df4d392df63c3735e914233c4a4 | [] | no_license | chengyi818/kata | a2941ce8675c6e7a47169a0eae4c757d3f6f5bf9 | a7cb7ad499037bcc168aaa0eaba857b33c04ef14 | refs/heads/master | 2023-04-10T18:39:09.518433 | 2023-01-08T15:22:12 | 2023-01-08T15:22:12 | 53,040,540 | 1 | 0 | null | 2023-03-25T00:46:51 | 2016-03-03T10:06:58 | C++ | UTF-8 | Python | false | false | 554 | py | #!/usr/bin/env python3
# Author: ChengYi
# Mail: [email protected]
# created time: Thu 21 Sep 2017 10:29:02 AM CST
def make_bold(func):
print('Initialize')
def wrapper():
print('Call')
return '<b>{}</b>'.format(func())
return wrapper
def get_content():
return "hello world"
@ma... | [
"[email protected]"
] | |
16529f3d07c226ff0580848d78c9cdaa4cb386d7 | c5222000bf859009850452ec7bcf1533f7bf59f7 | /color_picker.py | 441acc9eaccbd29186422b5dc395c9f72cf5debc | [] | no_license | nss-day-cohort-25/07-06-orientation-classes | 38b016995c0a6273268d07104c0db2124383592a | 9ed6046550e7b5254f8237efab47a057b74c94de | refs/heads/master | 2020-03-22T14:52:01.360486 | 2018-07-09T17:31:10 | 2018-07-09T17:31:10 | 140,211,391 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 283 | py | class ColorPicker():
def __init__(self, primary_color, **kwargs):
self.primary_color = primary_color
for key, value in kwargs.items():
setattr(self, key + "_color", value)
def get_colors(self):
return {k: v for k, v in self.__dict__.items() if 'color' in k}
| [
"[email protected]"
] | |
775999792fcec355ac984e6f1f97f26fbf4e854b | 7950c4faf15ec1dc217391d839ddc21efd174ede | /leetcode-cn/2038.0_Remove_Colored_Pieces_if_Both_Neighbors_are_the_Same_Color.py | aa42c48cf130143120865f6675418d6da1b8c5b4 | [] | no_license | lixiang2017/leetcode | f462ecd269c7157aa4f5854f8c1da97ca5375e39 | f93380721b8383817fe2b0d728deca1321c9ef45 | refs/heads/master | 2023-08-25T02:56:58.918792 | 2023-08-22T16:43:36 | 2023-08-22T16:43:36 | 153,090,613 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,461 | py | '''
T: O(N)
S: O(1)
执行用时:112 ms, 在所有 Python3 提交中击败了98.98% 的用户
内存消耗:15.6 MB, 在所有 Python3 提交中击败了28.57% 的用户
通过测试用例:83 / 83
'''
class Solution:
def winnerOfGame(self, colors: str) -> bool:
a, b, pre = 0, 0, None
part_a = part_b = 0
for ch in colors:
if ch == pre:
... | [
"[email protected]"
] | |
bf375adb961dbcf915e1628a1b202e385aba4351 | d554b1aa8b70fddf81da8988b4aaa43788fede88 | /5 - Notebooks e Data/1 - Análises numéricas/Arquivos David/Atualizados/logDicas-master/data/2019-1/226/users/4422/codes/1585_842.py | db14692d52f1f0a69e0aaedd361b0687c76c6431 | [] | 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 | 230 | py | # Teste seu codigo aos poucos.
# Nao teste tudo no final, pois fica mais dificil de identificar erros.
# Nao se intimide com as mensagens de erro. Elas ajudam a corrigir seu codigo.
x = int(input("Digite um numero: "))
print(x)
| [
"[email protected]"
] | |
1a4bf86142afa60772834ed02506ed40060db509 | 0b9e884be78ecc22a44a94e2c1cabefd637b9ed0 | /Python_Talk/mpt-master/ch14/live_price.py | 04c8d8d261bcbee41454ee1c2b57b439f4d9d005 | [] | no_license | marcovnyc/penguin-code | 6ba3faa5f21186918e2d08f5a0fcacebb2697e56 | a0c1f91219ff74a8bb8e9fd3375b03b667056b54 | refs/heads/master | 2021-12-22T15:04:26.002512 | 2021-12-16T04:01:40 | 2021-12-16T04:01:40 | 7,264,458 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 533 | py | from yahoo_fin import stock_info as si
# Start an infinite loop
while True:
# Obtain ticker symbol from you
ticker = input("What's the ticker symbol of the stock you are looking for?\n")
# If you want to stop, type in "done"
if ticker == "done":
break
# Otherwise, type in a stock t... | [
"[email protected]"
] | |
d6dff94c7a3c17100e31444270570019c51afe06 | 611ffe1973f843626000e2320c1d425cdf0995ca | /lib/modules/synthesis_decoder.py | cddd9d53ae22e5c5bcb03badb09275f99bd209cc | [] | no_license | kapitsa2811/Text2Scene | f5b1ff803329a68f9035420481db651e5fb0cf54 | f471771cb8e6f8e1e27296f2c535b84fa27a79ed | refs/heads/master | 2020-06-11T03:07:09.853489 | 2019-06-19T05:19:53 | 2019-06-19T05:19:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,853 | py | #!/usr/bin/env python
import math, cv2
import numpy as np
import torch
import torch.nn as nn
from torchvision import models
from modules.separable_convolution import same_padding_size
# from modules.bilinear_downsample import BilinearDownsample
import torch.nn.functional as F
from modules.separable_convolution import ... | [
"[email protected]"
] | |
25189b66364fe5afb9c41481a00735828b4ffd74 | 14f455693213cae4506a01b7d0591e542c38de79 | /config/munin/hookbox | 95845775bd8e21f8cfa9f7bb60dcb248538dd6b1 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Cvalladares/Newsblur_Instrumented | f0b14d063759973330f202108a7eed3a29bcc033 | 4d6ee6aa9713879b1e2550ea5f2dbd819c73af12 | refs/heads/master | 2022-12-29T15:19:29.726455 | 2019-09-03T17:09:04 | 2019-09-03T17:09:04 | 206,130,022 | 0 | 0 | MIT | 2022-12-10T06:00:26 | 2019-09-03T17:07:04 | Python | UTF-8 | Python | false | false | 1,641 | #!/srv/newsblur/venv/newsblur/bin/python
import os
import json
import urllib
import urllib2
from vendor.munin import MuninPlugin
class HookboxPlugin(MuninPlugin):
title = 'hookbox'
args = "--base 1000"
vlabel = "Y"
info = "Subscibed users"
scale = False
def get_channels(s... | [
"[email protected]"
] | ||
870388e6f5642063a0b73de0282f49f939814e28 | aedd3aeadfb13eda4489d26ee3d9762598878936 | /leetcode/111. 二叉树的最小深度.py | 70ee52bca1092dfa4ae3db932f4be11bf0763e60 | [] | no_license | AnJian2020/Leetcode | 657e8225c4d395e8764ef7c672d435bda40584c7 | cded97a52c422f98b55f2b3527a054d23541d5a4 | refs/heads/master | 2023-03-26T16:25:36.136647 | 2021-03-26T07:04:10 | 2021-03-26T07:04:10 | 283,940,538 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 527 | py | class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def minDepth(self, root: TreeNode) -> int:
if not root:
return 0
elif root.left is None and root.right is None:
return 1
else:
... | [
"[email protected]"
] | |
ef350d4222192afd3cb54baab0613d0cc93f46a1 | d9eef8dd3489682c8db41f2311e3058d1f369780 | /.history/abel-network-files/metis_transf_20180709120220.py | efc72c43810042d5e2eddbbadbc20d2d9643e947 | [] | no_license | McKenzie-Lamb/Gerrymandering | 93fe4a49fe39a0b307ed341e46ba8620ea1225be | b7a7c4129d6b0fcd760ba8952de51eafa701eac3 | refs/heads/master | 2021-01-25T06:06:43.824339 | 2018-10-16T14:27:01 | 2018-10-16T14:27:01 | 93,526,515 | 0 | 0 | null | 2018-07-12T19:07:35 | 2017-06-06T14:17:47 | Python | UTF-8 | Python | false | false | 1,080 | py | # Author: Abel Gonzalez
# Date: 06/26/18
#
# Description:
# This program uses the .shp file to create a network graph where each node
# represents a census tract and the edge represents adjacency between each
# tract, usign graph-tool instead of networkx
import graph_tool.all as gt
import metis
from pathlib import Pat... | [
"[email protected]"
] | |
fe487c41d5826fb6bcb3c75532dc7c84986de7df | 0dc37ab83fc6603770ba60050fc3d46534b3ef65 | /backend/shah_rukh_2_dev_16118/settings.py | f652824a018a14d25dffd321a0319273f3cde280 | [] | no_license | crowdbotics-apps/shah-rukh-2-dev-16118 | c668cdbf67780b1c0715013725c49edad4c84e11 | 1d39dd000cee1dd28ff33a0c8837d7443bf667e6 | refs/heads/master | 2023-01-19T00:29:50.251660 | 2020-12-03T09:26:54 | 2020-12-03T09:26:54 | 317,791,591 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,035 | py | """
Django settings for shah_rukh_2_dev_16118 project.
Generated by 'django-admin startproject' using Django 2.2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""... | [
"[email protected]"
] | |
e6a1599936b8a69e0e220ace641024745c01d0ab | 85a1d1c79c152903e48ac29f2cd066c21e825485 | /lcbru_events/views/home.py | 19631feef3331bd6e46cf96532475d975774e3c0 | [
"MIT"
] | permissive | LCBRU/lcbru-events | 2fd02f196ec9cbf31f76ec2f2dff2e7c0ea7f4d3 | 97245fbc711fc1876643d23df635d82752509040 | refs/heads/master | 2021-06-06T19:42:43.750497 | 2016-10-27T10:40:12 | 2016-10-27T10:40:12 | 43,355,191 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 132 | py | from flask import render_template
from lcbru_events import app
@app.route('/')
def index():
return render_template('index.html')
| [
"[email protected]"
] | |
76e85db8873a136388ecef88893460abfada2771 | a1b795c17832c1ec4a4a942b7e35c1f9d283b4db | /examples/timeline.py | a2075a79236a537b8ab42e32a2b7811b7b32b626 | [
"MIT"
] | permissive | ammunk/cassiopeia | 016f1a79bcdb4758953625a5953ca19f3b79ccf4 | 4e77919f53a130b3f16977c76cc5f54f3868d8e5 | refs/heads/master | 2020-04-12T23:19:13.401624 | 2018-12-19T15:51:21 | 2018-12-19T15:51:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 465 | py | import cassiopeia as cass
from cassiopeia import Summoner
def print_newest_match(name: str, account: int, id: int, region: str):
summoner = Summoner(name=name, account=account, id=id, region=region)
match_history = summoner.match_history
match = match_history[0]
print('Match ID:', match.id)
prin... | [
"[email protected]"
] | |
d69062af5e4d244aba9c8bd7406683449558f838 | 66f17204c2bc83c9edbde10eda1797752a9e4e37 | /download_data.py | 7df33ed7924489c3e153d839d2ea478aec8cbbee | [
"MIT"
] | permissive | lukassnoek/ICON2017 | a698df9dc583408c8ea9893bc65b18fa1397224e | 4797357978577317c65d8aed06d49aa842a6e653 | refs/heads/master | 2023-08-08T02:07:42.649391 | 2023-08-01T18:50:43 | 2023-08-01T18:50:43 | 95,113,866 | 23 | 6 | null | 2017-08-06T11:44:17 | 2017-06-22T12:35:47 | Jupyter Notebook | UTF-8 | Python | false | false | 1,410 | py | """ This script downloads the data for the ICON2017 MVPA workshop
from Surfdrive (a data storage repository/drive from the
Dutch institute for IT in science/academia) using cURL,
which should be cross-platform. """
from __future__ import print_function
import subprocess
import os
import zipfile
import os.path as op
im... | [
"[email protected]"
] | |
1610566f544070fb05ac4fa174c60cccc4d70b9d | ae6189642a07fd789f51caadb924328a54919cac | /100-problems/review/minimum-spanning-tree/65-finals.py | e4f3b830d0c3a9a5dadb40a5102023f83f0676f9 | [] | no_license | d-matsui/atcorder | 201e32403653b2fdf0d42188faf095eb8b793b86 | 22ec1af8206827e10a986cb24cf12acc52ab1d6a | refs/heads/master | 2020-09-27T23:15:27.281877 | 2020-09-01T13:24:34 | 2020-09-01T13:24:34 | 226,632,569 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,289 | py | #!/usr/bin/env python3
from pprint import pprint
from collections import deque, defaultdict
import itertools
import math
import sys
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
N, M, K = map(int, input().split())
edges = []
for _ in range(M):
u, v, w = map(int, input().split())
edges.append([u-1, v-1, w... | [
"[email protected]"
] | |
004c6fef77001f731bfe2d9f676ea0d9f9ab8385 | 2eae961147a9627a2b9c8449fa61cb7292ad4f6a | /test/test_post_business_exchange_rates_business_exchange_rate.py | 22b1621a24d2d74a9197a5506af05ada3ce07a5b | [] | no_license | kgr-eureka/SageOneSDK | 5a57cc6f62ffc571620ec67c79757dcd4e6feca7 | 798e240eb8f4a5718013ab74ec9a0f9f9054399a | refs/heads/master | 2021-02-10T04:04:19.202332 | 2020-03-02T11:11:04 | 2020-03-02T11:11:04 | 244,350,350 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,920 | py | # coding: utf-8
"""
Sage Business Cloud Accounting - Accounts
Documentation of the Sage Business Cloud Accounting API. # noqa: E501
The version of the OpenAPI document: 3.1
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import datetime
imp... | [
"[email protected]"
] | |
08ac7056e18731742d5bd1cc2e2715f239731609 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2351/60636/244985.py | 6927ce260bfd2b8f832d5b9567ff1180a363ec44 | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,073 | py | n=int(input())
sources=[]
for i in range(n-1):
x=input().split(" ")
source=[]
for a in x:
source.append(int(a))
sources.append(source)
number=[]
for i in range(1,n+1):
delete=sources.copy()
for y in sources:
if(i in y):
delete.pop(delete.index(y))
all_length=[]
... | [
"[email protected]"
] | |
7bfd897fff357e2cc168ed67c397530fca7c3742 | d41d18d3ea6edd2ec478b500386375a8693f1392 | /plotly/validators/choropleth/colorbar/_titleside.py | 3de81a3fa5674ea7244e6816a53d2b3a7e0e4379 | [
"MIT"
] | permissive | miladrux/plotly.py | 38921dd6618650d03be9891d6078e771ffccc99a | dbb79e43e2cc6c5762251537d24bad1dab930fff | refs/heads/master | 2020-03-27T01:46:57.497871 | 2018-08-20T22:37:38 | 2018-08-20T22:37:38 | 145,742,203 | 1 | 0 | MIT | 2018-08-22T17:37:07 | 2018-08-22T17:37:07 | null | UTF-8 | Python | false | false | 510 | py | import _plotly_utils.basevalidators
class TitlesideValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name='titleside',
parent_name='choropleth.colorbar',
**kwargs
):
super(TitlesideValidator, self).__init__(
plotly_name... | [
"[email protected]"
] | |
c2c73c9559c6f08d54ca4743125ef3d87c63a6f0 | a6ca86b1dce35a9a59405b29e1f97e13bf1c7fc1 | /tests/src/TestSuites/FunctionalTestSuite/Run_SchoolInfraReport.py | 66f303df061a96feb40930453863ac3e89c44158 | [
"MIT"
] | permissive | htvenkatesh/cQube | 44a0bfd9a281b07992f17c2d885392e62b3d0a83 | c6e91d58fef5084b8b5962f313cd49f0400d7bfa | refs/heads/master | 2022-12-04T02:40:54.425582 | 2020-08-21T07:21:47 | 2020-08-21T07:21:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,756 | py | import time
from get_dir import pwd
from CRC import crc_report_functional_testing
from SI.MAP import School_Map_functional_testing
from SI.Report import School_report_functional_testing
import unittest
from HTMLTestRunner import HTMLTestRunner
from reuse_func import GetData
class MyTestSuite(unittest.TestCase):
... | [
"[email protected]"
] | |
c81d93a49136768a898af81f73879a9dc37451d7 | f2ec1298c00d813c7e973cac22184ea8f54eb60c | /MxShop/apps/goods/migrations/0009_auto_20190526_1746.py | 3161358484d5d2ccc8825db304559f7006c8be63 | [] | no_license | llf-1996/mx_drf | fcfaa028630eeb02be91af5e30fb2a200037400c | f4878c0d9857e7af7277d10cc32da5d9c522de0c | refs/heads/master | 2020-06-05T06:51:49.629343 | 2019-06-17T13:20:29 | 2019-06-17T13:20:29 | 192,350,339 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 410 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2019-05-26 17:46
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('goods', '0008_auto_20170826_1201'),
]
operations = [
migrations.AlterModelTable(
... | [
"[email protected]"
] | |
32eb948acc27bdfecd863a46de5660de37ba0f63 | 29da2ca6def1270be13a3096685a8e5d82828dff | /CIM14/IEC61970/Wires/RatioVariationCurve.py | e9599a428e11145a2c9f6036061938d3a0e6d732 | [
"MIT"
] | permissive | rimbendhaou/PyCIM | 75eb3bcd3729b2410c03f3d5c66d6f1e05e21df3 | d578bb0bf1af344342bd23344385ed9c06c2d0ee | refs/heads/master | 2022-04-28T01:16:12.673867 | 2020-04-16T02:19:09 | 2020-04-16T02:19:09 | 256,085,381 | 0 | 0 | MIT | 2020-04-16T02:15:20 | 2020-04-16T02:08:14 | null | UTF-8 | Python | false | false | 2,481 | py | # Copyright (C) 2010-2011 Richard Lincoln
#
# 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, modify, merge, publish... | [
"[email protected]"
] | |
33e488832c4747e6af26ad44f680379afbfb7ddf | 3280f0c0c41e157bff2d4ad420c1b871402d6f95 | /utils/cmfish/cmfish/middlewares.py | 4dd368481be51d12184948c37537d4409716b44e | [] | no_license | sui84/pytest | 5efae6843556c541bcffed1ff4c4a38d598bca85 | 696f05ec40adb78e9a4bd7fab1eef6d324cbb9bb | refs/heads/master | 2021-01-21T15:00:28.604917 | 2019-08-31T05:22:10 | 2019-08-31T05:22:10 | 95,368,315 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,904 | py | # -*- coding: utf-8 -*-
# Define here the models for your spider middleware
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/spider-middleware.html
from scrapy import signals
class CmfishSpiderMiddleware(object):
# Not all methods need to be defined. If a method is not defined,
# scrapy ac... | [
"[email protected]"
] | |
d0eda4330f1ac653701045a4fc49b166fbca0fca | d6cf604d393a22fc5e071a0d045a4fadcaf128a6 | /Enterprise/Marine/2020/2020_D.py | 7e514768e74cacdb1d7271f0361b50aa5e7e7e78 | [] | no_license | shikixyx/AtCoder | bb400dfafd3745c95720b9009881e07bf6b3c2b6 | 7e402fa82a96bc69ce04b9b7884cb9a9069568c7 | refs/heads/master | 2021-08-03T21:06:45.224547 | 2021-07-24T11:58:02 | 2021-07-24T11:58:02 | 229,020,968 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,329 | py | import sys
import numpy as np
from collections import defaultdict
sys.setrecursionlimit(10 ** 7)
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
# 愚直解
# TLE
N = int(readline())
VW = [0] + [list(map(int, readline().split())) for _ in range(N)]
Q = int(readlin... | [
"[email protected]"
] | |
0346e52eb44f0345bff729be90cefcd608a480f3 | c46754b9600a12df4f9d7a6320dfc19aa96b1e1d | /src/transformers/models/groupvit/__init__.py | d0de4a00bd15005fe974f7240b9bc6c940f5b789 | [
"Apache-2.0"
] | permissive | huggingface/transformers | ccd52a0d7c59e5f13205f32fd96f55743ebc8814 | 4fa0aff21ee083d0197a898cdf17ff476fae2ac3 | refs/heads/main | 2023-09-05T19:47:38.981127 | 2023-09-05T19:21:33 | 2023-09-05T19:21:33 | 155,220,641 | 102,193 | 22,284 | Apache-2.0 | 2023-09-14T20:44:49 | 2018-10-29T13:56:00 | Python | UTF-8 | Python | false | false | 2,875 | py | # Copyright 2022 The HuggingFace Team. 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 applicabl... | [
"[email protected]"
] | |
0f7692a5b74a0bcdc450d391708db3d19733b7c8 | 0db97db08743783019efe022190f409d22ff95bd | /aliyun/api/rest/Rds20140815DescribeSQLLogReportListRequest.py | ade9beff607028d9b0aa607aa956e0d2735bff32 | [
"Apache-2.0"
] | permissive | snowyxx/aliyun-python-demo | 8052e2a165f1b869affe632dda484d6ca203bd9b | ed40887ddff440b85b77f9b2a1fcda11cca55c8b | refs/heads/master | 2021-01-10T03:37:31.657793 | 2016-01-21T02:03:14 | 2016-01-21T02:03:14 | 49,921,095 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 451 | py | '''
Created by auto_sdk on 2015.08.07
'''
from aliyun.api.base import RestApi
class Rds20140815DescribeSQLLogReportListRequest(RestApi):
def __init__(self,domain='rds.aliyuncs.com',port=80):
RestApi.__init__(self,domain, port)
self.DBInstanceId = None
self.EndTime = None
self.Page = None
self.PageN... | [
"[email protected]"
] | |
dfdef595c1fdf2280519df6b76a1384d3bfc50b8 | 61747f324eaa757f3365fd7bf5ddd53ea0db47d1 | /casepro/cases/migrations/0041_populate_partner_users.py | e14bef94e0e4ce2732c88f32738b188cfc2b350d | [
"BSD-3-Clause"
] | permissive | BlueRidgeLabs/casepro | f8b0eefa8f961dd2fdb5da26a48b619ebc1f8c12 | 8ef509326f3dfa80bb44beae00b60cc6c4ac7a24 | refs/heads/master | 2022-01-24T09:01:18.881548 | 2017-12-05T18:46:05 | 2017-12-05T18:49:42 | 113,502,588 | 0 | 0 | null | 2017-12-07T21:57:37 | 2017-12-07T21:57:37 | null | UTF-8 | Python | false | false | 760 | py | # -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
from django.db import migrations, models
def populate_partner_users(apps, schema_editor):
User = apps.get_model('auth', 'User')
for user in User.objects.exclude(profile__partner=None):
partner = user.profile.partner
... | [
"[email protected]"
] | |
5c7616aab880b8627ecf408e28c5d0fd92c361c3 | c54f5a7cf6de3ed02d2e02cf867470ea48bd9258 | /pyobjc/PyOpenGL-2.0.2.01/src/shadow/GL.3DFX.tbuffer.0001.py | e9fc25dbf782313f2fe2acf197b631a13a69c4d1 | [] | no_license | orestis/pyobjc | 01ad0e731fbbe0413c2f5ac2f3e91016749146c6 | c30bf50ba29cb562d530e71a9d6c3d8ad75aa230 | refs/heads/master | 2021-01-22T06:54:35.401551 | 2009-09-01T09:24:47 | 2009-09-01T09:24:47 | 16,895 | 8 | 5 | null | null | null | null | UTF-8 | Python | false | false | 1,502 | py | # This file was created automatically by SWIG.
# Don't modify this file, modify the SWIG interface instead.
# This file is compatible with both classic and new-style classes.
import _tbuffer
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
if (name == "this"):
if isinstance(value, class_... | [
"ronaldoussoren@f55f28a5-9edb-0310-a011-a803cfcd5d25"
] | ronaldoussoren@f55f28a5-9edb-0310-a011-a803cfcd5d25 |
7cd1a27a27d0669662e639931e57b15c76d48382 | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/BuildLinks1.10/test_input/CJ_16_1/16_1_1_roy999_main.py | d064a2f9d473ab5a4c2b76814eef2cbb9857e32e | [] | no_license | DaHuO/Supergraph | 9cd26d8c5a081803015d93cf5f2674009e92ef7e | c88059dc66297af577ad2b8afa4e0ac0ad622915 | refs/heads/master | 2021-06-14T16:07:52.405091 | 2016-08-21T13:39:13 | 2016-08-21T13:39:13 | 49,829,508 | 2 | 0 | null | 2021-03-19T21:55:46 | 2016-01-17T18:23:00 | Python | UTF-8 | Python | false | false | 388 | py |
def process(input_file, out):
t = int(input_file.readline())
for i in range(1, t + 1):
line = input_file.readline().strip()
result = solve(line)
out.write("Case #%i: %s\n" % (i, result))
def solve(s):
li = [s[0]]
for c in s[1:]:
if c < li[0]:
li.append(... | [
"[[email protected]]"
] | |
801203ff33777b339565f62d514f14301dc94b25 | c50e7eb190802d7849c0d0cea02fb4d2f0021777 | /src/qumulo/azext_qumulo/aaz/latest/qumulo/__cmd_group.py | fabbbf233a1f1fca33e7e3fe0128b75b847faa29 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | Azure/azure-cli-extensions | c1615b19930bba7166c282918f166cd40ff6609c | b8c2cf97e991adf0c0a207d810316b8f4686dc29 | refs/heads/main | 2023-08-24T12:40:15.528432 | 2023-08-24T09:17:25 | 2023-08-24T09:17:25 | 106,580,024 | 336 | 1,226 | MIT | 2023-09-14T10:48:57 | 2017-10-11T16:27:31 | Python | UTF-8 | Python | false | false | 594 | py | # --------------------------------------------------------------------------------------------
# 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 aaz-dev-tools
# --------------------------------... | [
"[email protected]"
] | |
12cdaf829a0bb0cf9396af90e035ecbb241bf6a3 | cf19e3a857d488ca449e515f641c686c7409fa87 | /C01-Python-Basics/13-C01P02/Solution01/solution.py | e603c40480ffc9c2f8355ab07cb8e5d1095d5c40 | [
"MIT"
] | permissive | CreeperBeatz/Python-101-Forever | c2133962c0bd50e09f58df3908c8c52234363b7b | 5b3e8706bec84104712d96419210a1e266b4d518 | refs/heads/master | 2023-06-07T07:53:23.796406 | 2021-07-05T14:19:33 | 2021-07-05T14:19:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 389 | py | # Video - https://youtu.be/PmW8NfctNpk
def sum_of_digits(n):
n = abs(n)
digits = []
char_digits = list(str(n))
for char_digit in char_digits:
digits.append(int(char_digit))
return sum(digits)
tests = [
(1325132435356, 43),
(123, 6),
(6, 6),
(-10, 1)
]
for n, expected in... | [
"[email protected]"
] | |
0c5769fd45ee518599738a13853fe563e251f03f | 529e713a78e82de2ae5d44cfb8ef209e0894d72a | /typer-cli-python/source_code_step_3/rptodo/cli.py | 89531fcd5bf31d59d49aa457dba1661b7d555049 | [
"MIT"
] | permissive | realpython/materials | cd2f548276be2c82f134ca03eadb1cd279e0f26e | d2d62756d3854f54a12a767f2bf9470486c0ceef | refs/heads/master | 2023-09-05T22:12:29.806738 | 2023-08-31T20:56:28 | 2023-08-31T20:56:28 | 132,374,697 | 4,678 | 6,482 | MIT | 2023-09-12T22:22:06 | 2018-05-06T20:46:18 | HTML | UTF-8 | Python | false | false | 1,423 | py | """This module provides the RP To-Do CLI."""
from pathlib import Path
from typing import Optional
import typer
from rptodo import ERRORS, __app_name__, __version__, config, database
app = typer.Typer()
@app.command()
def init(
db_path: str = typer.Option(
str(database.DEFAULT_DB_FILE_PATH),
"-... | [
"[email protected]"
] | |
5f91e1a1b7cb3ff8938287fb6fb8a0b3e3c9cd66 | b4e4399f6d18ee83760604fc67c90d3f5eac52dd | /10 Days of Statistics/Day4.BinomialDistributionI.py | 165bbc7384022eb86ad2468c05a50783bcab3f4c | [] | no_license | angelvv/HackerRankSolution | 88415c3ace68ddc10c76ae8df43ab5193aa921d4 | 8b2c323507f9a1826b4156aeab94815f41b6fc84 | refs/heads/master | 2021-07-17T20:51:50.758364 | 2020-05-26T17:25:05 | 2020-05-26T17:25:05 | 167,896,187 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 702 | py | # Enter your code here. Read input from STDIN. Print output to STDOUT
boy,girl = list(map(float, input().split())) # or =[float(x) for x in input().split()]
pBoy = boy/(boy+girl)
# hard code calculation
p0Boy = (1-pBoy)**6
p1Boy = 6 * pBoy * (1-pBoy)**5
p2Boy = 6*5/2 * (pBoy**2) * ((1-pBoy)**4)
pAtLeast3Boy = 1 - p0Bo... | [
"[email protected]"
] | |
70b366de4381df49308e12f0fad8a1925a18c1a7 | b6bb53780f3d186ccbc6a900a977a766b6ac4ffb | /doc/src/slides/src/solver.py | 3783db7b97e638d13cef6d46ee58fd929429c1bc | [
"BSD-3-Clause"
] | permissive | wolf9s/doconce | 1fa91766cad77dd16debade99e48954cfc7b6dee | 0c7fecb267502a74cdeb7d90100cd2bdc0701cc1 | refs/heads/master | 2021-01-17T15:44:51.703555 | 2015-09-28T07:59:41 | 2015-09-28T07:59:41 | 43,336,393 | 1 | 0 | null | 2015-09-29T01:02:48 | 2015-09-29T01:02:48 | null | UTF-8 | Python | false | false | 4,512 | py | from numpy import *
from matplotlib.pyplot import *
import sys
def solver(I, a, T, dt, theta):
"""Solve u'=-a*u, u(0)=I, for t in (0,T]; step: dt."""
dt = float(dt) # avoid integer division
N = int(round(T/dt)) # no of time intervals
T = N*dt # adjust T to fit time step dt... | [
"[email protected]"
] | |
624ad33267ce9d85d2f3e6466b07a72980e4d01d | c8cee25ecb60ca3e6ce5e24c37db57f82f9858f6 | /Vision Artificial/Emparejamiento.py | 272fabf738a5fc92fc5a35e7e1cfddf092898c0c | [] | no_license | mecomontes/Python | a0b4a0b69ae33ad3623e908731710563392d1615 | daba4247cca90c43a979e3e3f292cd7b8951b3d0 | refs/heads/master | 2023-05-30T05:24:41.999196 | 2020-03-23T02:30:09 | 2020-03-23T02:30:09 | 249,317,310 | 1 | 0 | null | 2023-05-22T22:42:36 | 2020-03-23T02:29:38 | Python | UTF-8 | Python | false | false | 4,283 | py | """ Emparejamiento de plantillas
Teoría
El emparejamiento de plantillas (o template matching en inglés) es un método para buscar y encontrar la ubicación de una imagen de
plantilla en una imagen más grande. OpenCV viene con la función cv2.matchTemplate() para este pr... | [
"[email protected]"
] | |
13576721467bab9704a406a6cae793fe3350b13e | 576cc83449e10fd3f98281970c46016ea7a5aea2 | /Exercise_for_Job/华为牛客网/华为.py | e16a1edaa5afa95c959bd857bca6a52cf8e8b8f3 | [] | no_license | HotView/PycharmProjects | 215ab9edd341e3293daebcf86d97537f8cd28d75 | 61393fe5ba781a8c1216a5cbe7e0d06149a10190 | refs/heads/master | 2020-06-02T07:41:53.608742 | 2019-11-13T08:31:57 | 2019-11-13T08:31:57 | 191,085,178 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 512 | py | data = input().split()
str_data = []
def constr(str):
count = 8-len(i)
con_str = ''
while(count):
con_str =con_str+'0'
count = count-1
return i+con_str
for i in data[1:]:
if len(i)<=8:
str_data.append(constr(i))
else:
while(len(i)>8):
str_data.append(i... | [
"[email protected]"
] | |
ebb69f7ee17d733cf4f31b161a6e6a4d3c547dc5 | 23fddc940a266c2d1d0e0b1687c36cdbcc9d54d9 | /app/login/model/manager.py | 5528fcd8f4ce6716526ba111e2d8e93647621f0f | [] | no_license | Cuick/traversing | 210fcfb1c780037de59343fffeb4fa4d3f2eae32 | c78982580af7f63c8bff4dcb37005b7f7c682b5b | refs/heads/master | 2021-01-10T17:38:37.899460 | 2016-11-18T06:06:55 | 2016-11-18T06:06:55 | 55,397,540 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,181 | py | # -*- coding:utf-8 -*-
"""
created by sphinx on 18/9/14.
"""
import os
import json
import time
account_cache = {}
class ServerManager(object):
def __init__(self):
self._servers = {}
self._is_static = False
if os.path.exists('server_list.json'):
sl = json.load(open('server_list... | [
"[email protected]"
] | |
63cbc8726893fed727dd884f838445cd7a2fd8e0 | 91d1a6968b90d9d461e9a2ece12b465486e3ccc2 | /s3api_read_1/bucket-cor_get.py | 906435f85b7feabef6ef4ae7f3baf051c9a51d1e | [] | no_license | lxtxl/aws_cli | c31fc994c9a4296d6bac851e680d5adbf7e93481 | aaf35df1b7509abf5601d3f09ff1fece482facda | refs/heads/master | 2023-02-06T09:00:33.088379 | 2020-12-27T13:38:45 | 2020-12-27T13:38:45 | 318,686,394 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,377 | py | #!/usr/bin/python
# -*- codding: utf-8 -*-
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
from common.execute_command import read_one_parameter
# url : https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3api/get-bucket-cors.html
if __name__ == '__mai... | [
"[email protected]"
] | |
b34c147b369988436ae350599d980ba016babbb4 | dd65b9bc9475a6cc58817fd45c078e5a6abae241 | /Tensorflow/car/web-tf2/gcf-packs/tensorflow2.0/source/tensorflow/_api/v2/compat/v1/test/__init__.py | bb58509c61e8cafbbf2c339d984a1ae2bc2e3996 | [] | no_license | jumbokh/gcp_class | 5b68192ab4ad091362d89ad667c64443b3b095bb | 0a8e2663bfb5b01ce20146da178fa0c9bd7c6625 | refs/heads/master | 2021-10-22T09:22:04.634899 | 2021-10-21T12:46:10 | 2021-10-21T12:46:10 | 228,617,096 | 8 | 7 | null | 2021-08-25T15:55:30 | 2019-12-17T12:58:17 | Python | UTF-8 | Python | false | false | 1,438 | py | # This file is MACHINE GENERATED! Do not edit.
# Generated by: tensorflow/python/tools/api/generator/create_python_api.py script.
"""Testing.
See the [Testing](https://tensorflow.org/api_guides/python/test) guide.
Note: `tf.test.mock` is an alias to the python `mock` or `unittest.mock`
depending on the python version... | [
"[email protected]"
] | |
bf244d1b65a6a4561dbd18468710c9bbcc05e83c | 3529ecaa44a53172094ba13498097057c8972723 | /Questiondir/655.print-binary-tree/655.print-binary-tree_112661405.py | c0358586c049dfc21db112211b47cf96f501e3f7 | [] | no_license | cczhong11/Leetcode-contest-code-downloader | 0681f0f8c9e8edd5371fd8d0a1d37dcc368566b6 | db64a67869aae4f0e55e78b65a7e04f5bc2e671c | refs/heads/master | 2021-09-07T15:36:38.892742 | 2018-02-25T04:15:17 | 2018-02-25T04:15:17 | 118,612,867 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 986 | py | # 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 ht(self, root):
if root is None:
return 0
return 1 + max(self.ht(root.left), self.ht(root... | [
"[email protected]"
] | |
901fc421da3ad2c486a8789dd60bf1740f10dabf | 8da76aabcf9cfea3478f56037edbb5fa1513140b | /tallsmall/production/tallsmall/account/.svn/text-base/models.py.svn-base | 0b5425bbac404be079a32c07f10089f307f8dc28 | [] | no_license | mikanyman/.virtualenvs-legacy | 039479f31f2ca9f9a3d3544d8837429ddd0a7492 | 5486128b5b3b7ddb9ec81d43e3bb601a23b4025a | refs/heads/master | 2020-12-31T07:10:07.018881 | 2017-02-01T02:16:55 | 2017-02-01T02:16:55 | 80,566,220 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,390 | """
#http://www.turnkeylinux.org/blog/django-profile
#http://docs.django-userena.org/en/latest/installation.html
from django.contrib.auth.models import User
from userena.models import UserenaLanguageBaseProfile
from django.db import models
#class UserProfile(models.Model):
class UserProfile(UserenaLanguageBa... | [
"[email protected]"
] | ||
e08a02cbe98519c266ea2415228cd8b1314f6563 | 7cd2c3868d83be96f2699eeed4f6f4ae9dbf3a35 | /programmers/DFSorBFS/타겟넘버.py | 3e62a03c143dbc24cf8dad5323f0f1826310106e | [] | no_license | Kimyechan/codingTestPractice | 4189e97f8543b9afc87374539acb5d1cecf40ce6 | c9d3878eb0d47fab22151fc0d39eef1dfd2210b5 | refs/heads/master | 2023-06-09T14:34:55.984710 | 2021-06-27T18:30:45 | 2021-06-27T18:30:45 | 282,819,605 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,089 | py | import sys
import copy
sys.setrecursionlimit(100000)
operatorList = []
# def dfs(operators, count):
# if len(operators) == count:
# operatorList.append(copy.deepcopy(operators))
# return
#
# for x in [1, -1]:
# operators.append(x)
# dfs(operators, count)
# operators.p... | [
"[email protected]"
] | |
0f054b6e23fbaf3c471d841c202f72d1f2244345 | 62c523b000e43b41bcb2bc96259f2e0136e8548f | /src/data/data.py | 703cef216a5a30549d909773faa9f1b5d06e41ca | [] | no_license | OlofHarrysson/pytorch-foundation | d7e0bd6d4bdf52bcf65d0c6e370e8e78ee0219cd | 6632e5260302669c458dde28be47c03fed052e53 | refs/heads/master | 2021-10-07T22:46:05.674105 | 2021-01-27T19:20:22 | 2021-01-27T19:20:22 | 212,659,773 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,357 | py | from torchvision import datasets
from torch.utils.data import DataLoader
from collections import namedtuple
from anyfig import get_config
from ..transforms import get_train_transforms, get_val_transforms
from ..utils.meta_utils import get_project_root
def setup_dataloaders():
dataloaders = namedtuple('Dataloaders'... | [
"[email protected]"
] | |
51b475ef145277d90a9da2e2b9fd07047a6f501b | 2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02 | /PyTorch/contrib/cv/classification/LResNet100E-IR/prof.py | 7c2e0f01a90ddcd74354f146f728d0b9b6cc1964 | [
"GPL-1.0-or-later",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Ascend/ModelZoo-PyTorch | 4c89414b9e2582cef9926d4670108a090c839d2d | 92acc188d3a0f634de58463b6676e70df83ef808 | refs/heads/master | 2023-07-19T12:40:00.512853 | 2023-07-17T02:48:18 | 2023-07-17T02:48:18 | 483,502,469 | 23 | 6 | Apache-2.0 | 2022-10-15T09:29:12 | 2022-04-20T04:11:18 | Python | UTF-8 | Python | false | false | 4,277 | py | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | [
"[email protected]"
] | |
f676137f1b3df9dd44c03457f8de846a6d8ac76e | 255e19ddc1bcde0d3d4fe70e01cec9bb724979c9 | /all-gists/4187084/snippet.py | 47fc8edb16f6917914298e0cefd3eb24d7a13d52 | [
"MIT"
] | permissive | gistable/gistable | 26c1e909928ec463026811f69b61619b62f14721 | 665d39a2bd82543d5196555f0801ef8fd4a3ee48 | refs/heads/master | 2023-02-17T21:33:55.558398 | 2023-02-11T18:20:10 | 2023-02-11T18:20:10 | 119,861,038 | 76 | 19 | null | 2020-07-26T03:14:55 | 2018-02-01T16:19:24 | Python | UTF-8 | Python | false | false | 2,729 | py | # Name: EXIFmover.py
# Author: Brian Klug (@nerdtalker / [email protected])
# Purpose:
# Move Files into directory based on EXIF data make and model
# Designed to un-clusterfuck the Dropbox camera upload directory which is a mess of every
# JPEG and PNG ever if you use it like I do on a bunch of phones, and thus tot... | [
"[email protected]"
] | |
6cc8562d0421b4e61baf344ba161216a74b334cb | e802ed36cbfb55b87654b8aa7932ae2fc2ae7d43 | /u05ps02q03.py | 46947989451ecf5e42a777c1666b562aa1a090d4 | [] | no_license | maryammouse/cs101 | 29f493ab421117fb9bc038da4de7c5bdc29ca7ac | 6c15855c7cdc24972a0ff370d417c5de8278ce9c | refs/heads/master | 2016-09-01T22:34:16.016963 | 2014-05-26T21:54:49 | 2014-05-26T21:54:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,251 | py | # Write a procedure, rotate which takes as its input a string of lower case
# letters, a-z, and spaces, and an integer n, and returns the string constructed
# by shifting each of the letters n steps, and leaving the spaces unchanged.
# Note that 'a' follows 'z'. You can use an additional procedure if you
# choose to as... | [
"[email protected]"
] | |
fbee9da62d0a7ff55bff70fe12034d97b7805070 | 55ceefc747e19cdf853e329dba06723a44a42623 | /_CodeTopics/LeetCode_contest/weekly/weekly2021/248-[smallweek]/248_1.py | 0810c9fe1f89962d294e01c337639653707396fc | [] | no_license | BIAOXYZ/variousCodes | 6c04f3e257dbf87cbe73c98c72aaa384fc033690 | ee59b82125f100970c842d5e1245287c484d6649 | refs/heads/master | 2023-09-04T10:01:31.998311 | 2023-08-26T19:44:39 | 2023-08-26T19:44:39 | 152,967,312 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 429 | py | class Solution(object):
def buildArray(self, nums):
"""
:type nums: List[int]
:rtype: List[int]
"""
n = len(nums)
res = [-1] * n
for i in range(n):
res[i] = nums[nums[i]]
return res
"""
https://leetcode-cn.com/submissions/deta... | [
"[email protected]"
] | |
71b966c7a8456e8f3cde13f79f2955b28d5a2c91 | d9b5fc6e35e56e182fe1bfe9bafd2562a5d9cf33 | /bluefly/areadetector_sim.py | 9e8a4cac9d449257fc4dc3b75dcff4ded04a82b3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | untzag/bluefly | 6406ef19b573c05a52bcd6cc53c27c5db1ca5cdf | 5f461998a3f629a5f07e8733ab937a0302fa92f6 | refs/heads/master | 2022-12-16T13:52:30.621420 | 2020-09-17T11:12:06 | 2020-09-17T11:12:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,981 | py | import asyncio
import h5py
import numpy as np
from bluesky.run_engine import get_bluesky_event_loop
from bluefly.areadetector import DetectorDriver, HDFWriter
from bluefly.motor import MotorDevice
from bluefly.simprovider import SimProvider
def make_gaussian_blob(width: int, height: int) -> np.ndarray:
"""Make ... | [
"[email protected]"
] | |
35be7f5c28be793d70e91298fc6b79f1a31dec25 | 64cf985225d14e1954ed91e5a261a465a44b0cc5 | /mirror/mirror/settings.py | 225f4f100303392553e2236166673a8b2600eb68 | [] | no_license | pinewoods/back-to-game | dee3c76e85186c86c6feaa0bd56635c1e460e6f0 | 824734bbd2e235886e3cb8e30d587949896a0d7e | refs/heads/master | 2021-01-21T12:26:50.102778 | 2015-05-13T14:13:37 | 2015-05-13T14:13:37 | 34,489,413 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,808 | py | """
Django settings for mirror project.
Generated by 'django-admin startproject' using Django 1.8.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build paths i... | [
"[email protected]"
] | |
92d63691e4e9d10e1eea6a25f16402a6962731df | c61a28aba19f7cdf9a5127e8a782bf115c265e70 | /apps/recruitpro/recruitpro/recruitpro/doctype/territory/test_territory.py | 8009c125ad483c92f2292298cee52bee7615b914 | [
"MIT"
] | permissive | sharmilaviji/RecruitPRO-NEW | fa72c8fc00f469a41798b1047c11dcc470fbc495 | dcfaedebe56b45acd6ddcab7e24c939b853a2c8c | refs/heads/master | 2021-05-26T12:14:12.611154 | 2020-04-27T04:40:50 | 2020-04-27T04:40:50 | 254,125,640 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 209 | py | # -*- coding: utf-8 -*-
# Copyright (c) 2020, teampro and Contributors
# See license.txt
from __future__ import unicode_literals
# import frappe
import unittest
class TestTerritory(unittest.TestCase):
pass
| [
"[email protected]"
] | |
43e980b35ac84de26ba65cce540a4d5a8ca11f20 | 6d2cf861c46230de97d5244b7915057419f8125d | /sdk/cognitiveservices/azure-cognitiveservices-language-textanalytics/samples/async_samples/sample_recognize_entities_async.py | 6111e4ec8f8009664718b89662fd6c86bef2616e | [
"MIT",
"LicenseRef-scancode-generic-cla"
] | permissive | pombredanne/azure-sdk-for-python | 075bfef712c014445bacdef4dd05aacd82673dcc | ebd73c3fc22dcf17be2a903f32bdd95d9090f283 | refs/heads/master | 2020-10-01T15:56:00.475346 | 2019-12-11T21:31:24 | 2019-12-11T21:31:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,464 | 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.
# --------------------------------------------------------------------... | [
"[email protected]"
] | |
7c13f5d302cee4d4a134bad26d56721e3d3d4450 | fb2a07bbf368076b83e31639c4152799fcccfdcd | /siteEtu/accountCreator.py | bac6f408ceb7f1c017bd05300e040e40f5634235 | [] | no_license | Trymal/TrombinoscopeCorrec | ae696473593c6d01b2533765c037e436f84fea98 | cebcfffa7df5a45d60da125b11523f933c0341e2 | refs/heads/master | 2022-07-08T08:21:07.441738 | 2020-05-10T15:51:48 | 2020-05-10T15:51:48 | 257,204,317 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 693 | py | import random
import hashlib
from setup import *
def saveAccount(account):
with open("./comptes.csv", "a") as fichier:
fichier.write(account)
nb_comptes = 150
m_hash = hashlib.sha256()
for nb in range(nb_comptes):
prenom = random.choice(PRENOMS)
nom = random.choice(NOMS)
filiere = random.... | [
"[email protected]"
] | |
df11f48a42b4597d6517b5f0ba783ccce171f5c3 | 382df78024f588acea08039a0b0a9e24f297b6a3 | /python/pandas/ewma.py | bee90fab01dfaa6c378c98d0f5f613642413a4a8 | [] | no_license | id774/sandbox | c365e013654790bfa3cda137b0a64d009866d19b | aef67399893988628e0a18d53e71e2038992b158 | refs/heads/master | 2023-08-03T05:04:20.111543 | 2023-07-31T14:01:55 | 2023-07-31T14:01:55 | 863,038 | 4 | 1 | null | 2020-03-05T06:18:03 | 2010-08-26T01:05:11 | TeX | UTF-8 | Python | false | false | 275 | py | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
ewma = pd.stats.moments.ewma
x = list(range(1, 50)) + list(range(50, 0, -1))
ma = ewma(np.array(x), span=15)
plt.plot(x, linewidth=1.0)
plt.plot(ma, linewidth=1.0)
plt.show()
plt.savefig("image.png")
| [
"[email protected]"
] | |
0836dc0604cbb303c5dd9456b4ff69711997d47a | a4c04117685c3d28dd60bdfc45654cb2c935f746 | /rasterio_example.py | e5c89ffdf395eb38ede6fd20f40df78b4fb1d5d6 | [] | no_license | DKnapp64/General_Python_Codes | 1ca40779bb381d526d61c5d5fedcc76ae797c590 | 8d4669c82c17455640a0a3123f92760cd65cc26a | refs/heads/main | 2023-02-28T05:55:46.018482 | 2021-02-01T21:55:16 | 2021-02-01T21:55:16 | 335,077,354 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 437 | py | import rasterio
import numpy
with rasterio.drivers():
with rasterio.open('baikal_subset.tif') as src:
b1, b2, b3, b4, b5 = src.read()
profile = src.profile
profile.update(
dtype=rasterio.float64,
count=1,
compress='lzw')
ndvi = numpy.zeros(b1.shape)
ndvi = (b1-b2)/(b1+... | [
"[email protected]"
] | |
710b13be4f032fd0628dfcd05eec3fa390d50805 | 9b0f102588acdc125cf8d4dfa1e51dffe12e1f2f | /apps/trade/urls.py | e272b659438321b9cf37e506f4956b8d547cecd9 | [] | no_license | aurthurm/sagetrader | d6e8fc3df5847acc05d134e7a39797ca6258d4ef | 97ca91b4f460fdf83837244e1dc5517fc0d74850 | refs/heads/master | 2023-01-24T23:23:59.129638 | 2020-07-21T09:19:46 | 2020-07-21T09:19:46 | 165,684,233 | 1 | 0 | null | 2023-01-03T16:11:42 | 2019-01-14T15:23:52 | CSS | UTF-8 | Python | false | false | 1,019 | py | from django.urls import path, include
from .views import *
app_name = 'trade'
urlpatterns = [
path('dashboard/', Dashboard.as_view(), name='dashboard'),
path('statistics/member', Statistics.as_view(), name='member-statistics'),
path('trading-plan/update/', UpdatePlan.as_view(), name='update-plan'),
pat... | [
"[email protected]"
] | |
7c91cb81835b975d6fc34bfe38d28812aecc2704 | b0cdbad299f6174bfdb0fba173dbcf3889b82209 | /Object Oriented Programming/oops/class_11.py | a4d0fb9c8a988a9e9eb3c05db8bf43193528c9e4 | [] | no_license | deesaw/PythonD-06 | a33e676f1e0cfc13b4ea645c8b60547b198239ac | 3c6f065d7be2e3e10cafb6cef79d6cae9d55a7fa | refs/heads/master | 2023-03-18T08:24:42.030935 | 2021-03-02T14:15:09 | 2021-03-02T14:15:09 | 343,797,605 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 594 | py | #usage of super
# parent class
class Deer:
def __init__(self):
print("Deer is in forest")
def whoisThis(self):
print("Parent - Deer")
def jump(self):
print("Deer is jumping")
# child class
class Stag(Deer):
def __init__(self):
print("Stag is ready")
def who... | [
"[email protected]"
] | |
b055b4c4e168f77967e6a90390a200084d7360a1 | 265b451de88d2cbc7cb7af24e42c78b128cd80ee | /SQL/group-by-time.py | e6bf6985cece32effe0706b8b63c7b57e2c4140a | [] | no_license | ryanchang1005/Django-lab | c967f0bf01fc1bc5727194bb036e6e378cfe075c | 9186c07177d6f563a8b8dcd00464ac741f736ce9 | refs/heads/master | 2023-06-30T03:44:37.749216 | 2021-08-03T03:06:01 | 2021-08-03T03:06:01 | 288,667,082 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,235 | py | """
Group by minute
Input:
6 2020-12-09 09:29:04.215836
7 2020-12-09 09:29:18.682882
8 2020-12-09 09:29:19.831128
9 2020-12-09 09:29:34.918914
10 2020-12-09 09:29:37.036617
11 2020-12-09 09:29:38.672620
12 2020-12-09 09:29:40.311120
13 2020-12-09 09:29:40.820016
14 2020-12-09 09:29:4... | [
"[email protected]"
] | |
96ce5236d2509a84730721428f0aa0e3a53f1054 | 2d54ab7a1e829f89b554d6abc27527fdb38539ff | /run.py | ec5c92c704cc0c8aa94e6d0680f4482f76dfc1e3 | [] | no_license | zhtjtcz/Software-Backend | 1c3c73d8863d0d0df9cdfa08e4900f878127ed6c | ca865f1fe75493098050b236634f776f7b97d04d | refs/heads/main | 2023-06-07T06:28:05.345830 | 2021-06-17T16:30:47 | 2021-06-17T16:30:47 | 367,622,524 | 8 | 0 | null | null | null | null | UTF-8 | Python | false | false | 190 | py | import os
os.system("python manage.py makemigrations")
os.system("python manage.py migrate")
os.system("nohup python manage.py runserver 0.0.0.0:8000 & \n")
print("The backend is running!") | [
"[email protected]"
] | |
956d2b8dc4154b4476b17b8c513d88086fefd4be | b47c136e077f5100478338280495193a8ab81801 | /Lights/adafruit-circuitpython-bundle-6.x-mpy-20210310/examples/register_unarystruct.py | 42858d8bc61cd90d8330727506be4c495ca3014f | [
"Apache-2.0"
] | permissive | IanSMoyes/SpiderPi | 22cd8747cc389f674cc8d95f32b4d86f9b7b2d8e | cc3469980ae87b92d0dc43c05dbd579f0fa8c4b1 | refs/heads/master | 2023-03-20T22:30:23.362137 | 2021-03-12T17:37:33 | 2021-03-12T17:37:33 | 339,555,949 | 16 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,397 | py | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
from board import SCL, SDA
from busio import I2C
from adafruit_bus_device.i2c_device import I2CDevice
from adafruit_register.i2c_struct import UnaryStruct
DEVICE_ADDRESS = 0x74 # device address of PCA9685 board
A_D... | [
"[email protected]"
] | |
43fb565c520ceba642840b9e2be90020c32f9bab | 00ef8e1eb57b73427508b20aadf0266da6b1f900 | /rlf/rl/loggers/sanity_checker.py | b27b9192a2eb8ad7ad2c58c8f3ceb49e8e0e9079 | [
"MIT"
] | permissive | amy12xx/rl-toolkit | f4643935cc8afd960356bfeae74c233d2596dea9 | 8254df8346752ea0226ae2064cc1eabc839567b0 | refs/heads/master | 2023-08-14T00:56:52.270642 | 2021-09-28T15:59:32 | 2021-09-28T15:59:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,400 | py | from collections import defaultdict
import torch.nn as nn
def print_tensor(x):
if len(x.shape) > 1:
return str(x.view(-1, x.shape[-1])[0, :5])
else:
return str(x[:5])
class SanityChecker:
def __init__(self, should_check, is_verbose, stop_key, stop_iters):
self.is_verbose = is_verb... | [
"[email protected]"
] | |
49a249a7ab9728cf12bc9b8176cd9f2b40792e1f | 553af2a9b110d54c0c2d972726f69ad9578f772f | /k2_domain/tests.py | 63942882cb5753b4c1bdf78693ee9e5f8bc64b29 | [] | no_license | simonemmott/k2 | 31ca9aca661e4a070ec3dfd6f6533abcc84ed883 | f455727c3f25dd2ad428c9c2936f05d94a62f843 | refs/heads/master | 2022-12-16T23:10:48.687149 | 2019-06-24T22:48:24 | 2019-06-24T22:48:24 | 192,113,010 | 0 | 0 | null | 2022-12-08T05:15:52 | 2019-06-15T18:47:55 | Python | UTF-8 | Python | false | false | 2,428 | py | from django.test import TestCase
from jinja2 import Environment
from k2.jinja2 import environment
from jinja2 import PackageLoader
import json
from k2_util import templates
from k2.settings import BASE_DIR
from posix import lstat
jinja2_env = environment(loader=PackageLoader('k2_domain', 'jinja2'))
def test_domain():... | [
"[email protected]"
] | |
eab2e39b65e58dce27b14af21523d7b9932dfbcf | e82b761f53d6a3ae023ee65a219eea38e66946a0 | /All_In_One/addons/cellblender/bng/bng_operators.py | a10ca18c55f2aa90e867e4bc68e9c7d6f33991d3 | [] | no_license | 2434325680/Learnbgame | f3a050c28df588cbb3b14e1067a58221252e2e40 | 7b796d30dfd22b7706a93e4419ed913d18d29a44 | refs/heads/master | 2023-08-22T23:59:55.711050 | 2021-10-17T07:26:07 | 2021-10-17T07:26:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,935 | py | import bpy
import os
import subprocess
from cellblender import cellblender_properties, cellblender_operators
#from . import net
# We use per module class registration/unregistration
filePath = ''
def register():
bpy.utils.register_module(__name__)
def unregister():
bpy.utils.unregister_module(__name__)
d... | [
"[email protected]"
] | |
d40c9fe210c8f3cad3a2f5d0c8912bb687d1a187 | 82b946da326148a3c1c1f687f96c0da165bb2c15 | /sdk/python/pulumi_azure_native/subscription/v20191001preview/__init__.py | 809b67527e985eb66ca6611d911e43258c96a031 | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | morrell/pulumi-azure-native | 3916e978382366607f3df0a669f24cb16293ff5e | cd3ba4b9cb08c5e1df7674c1c71695b80e443f08 | refs/heads/master | 2023-06-20T19:37:05.414924 | 2021-07-19T20:57:53 | 2021-07-19T20:57:53 | 387,815,163 | 0 | 0 | Apache-2.0 | 2021-07-20T14:18:29 | 2021-07-20T14:18:28 | null | UTF-8 | Python | false | false | 393 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
from ... import _utilities
import typing
# Export this package's modules as members:
from ._enums import *
from .get_subscription_alias import *
from .... | [
"[email protected]"
] | |
9e2cf686b700b1a54492e9adc5d477ec83e3fbad | eec698a1cb1b76a5f00ca51726bb7387104dbe89 | /backend/app/models/category.py | a5d236d50fa781ec1431eabd8c1822f4bc571eab | [] | no_license | MSurfer20/recommender-portal | 9450153e94f89785038918c29c227556df3636b4 | 02924c0d813af4ddb29041ccad34e57963e57168 | refs/heads/master | 2022-10-28T11:10:48.265123 | 2020-06-09T20:36:18 | 2020-06-09T20:36:18 | 267,325,013 | 1 | 0 | null | 2020-06-09T13:43:08 | 2020-05-27T13:20:46 | JavaScript | UTF-8 | Python | false | false | 1,119 | py | from enum import Enum
from pydantic import AnyUrl, Field
from typing import List, Optional
from bson.objectid import ObjectId
from .base import Base, ObjectID, MusicEnum, VideoEnum, CategoryEnum
class Category(Base):
"""Category definiton"""
id: CategoryEnum = Field(None, alias="_id")
class ItemBase(Base)... | [
"[email protected]"
] | |
468e1bd89d23c215a903bc44ce45617e25a3f400 | c3787b68c6276a2dd10008f609e6091ecbcca0b0 | /two_pointers/triplets_smaller_sum.py | 138fbcefec62ae14e4e1f8c54378519a6183ac46 | [
"MIT"
] | permissive | cosmos-sajal/ds_algo | 45afc8470c2b32fc56041bfbca8acb886cb70864 | d01912b8c42d8465660cee04e7648731c9acbaff | refs/heads/master | 2022-11-06T15:44:25.030664 | 2020-06-20T16:59:56 | 2020-06-20T16:59:56 | 263,012,260 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 622 | py | # https://www.educative.io/courses/grokking-the-coding-interview/mElknO5OKBO
def triplet_with_smaller_sum(arr, target):
arr.sort()
arr_len = len(arr)
result = 0
for i in range(arr_len - 1):
ptr1 = i + 1
ptr2 = arr_len - 1
sum = target - arr[i]
while ptr1 < ptr2:
... | [
"[email protected]"
] | |
9274b3b36010b8ebad3d07e1d6dd9345b598c5df | 5cf0842f3c066b2dbbea703bfff9e90b69905937 | /neurodsp/tests/test_utils_outliers.py | 09058cbc0b8443cc26506d563be3579b51a623c6 | [
"MIT"
] | permissive | srcole/neurodsp | 9e880c990587e928e3cc550fef53f5bb1d112bfa | 6b500d967a2ca63b62d07ab345e021f15e53be6a | refs/heads/master | 2021-05-23T05:48:06.916165 | 2019-06-14T03:44:06 | 2019-06-14T03:44:06 | 94,925,277 | 1 | 0 | null | 2017-08-30T18:30:22 | 2017-06-20T18:58:16 | Jupyter Notebook | UTF-8 | Python | false | false | 1,261 | py | """Tests for outlier related utility functions."""
import numpy as np
from numpy.testing import assert_equal
from neurodsp.utils.outliers import *
###################################################################################################
######################################################################... | [
"[email protected]"
] | |
019daba148c86709b395b3909db8a86a6c9a1bd3 | bda7a0576e17fe417175680b5698635b876c8091 | /users/migrations/0002_auto_20200219_1614.py | b420d734a989b370f84149c8b0aed3a478f4ff1b | [
"Apache-2.0"
] | permissive | Robotix-NITRR/RobotixWeb2021 | 56bb66667e5bd106930138f7ed69afeee609fe59 | 7f66a0dd5c54c44e6a128d8139d6bfd1135580f9 | refs/heads/master | 2023-04-04T09:59:53.961189 | 2021-04-12T12:07:25 | 2021-04-12T12:07:25 | 334,345,468 | 0 | 2 | Apache-2.0 | 2021-01-30T08:26:24 | 2021-01-30T06:31:56 | Python | UTF-8 | Python | false | false | 541 | py | # Generated by Django 2.1.7 on 2020-02-19 10:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='userprofile',
name='currency',
... | [
"[email protected]"
] | |
d65d42379061c239c3e54ddd63c11dffd5c86e91 | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-3/9e31bd9e2d6cba783883eb4905b19fcbe0ca5534-<backend_pyqt4_internal_check>-bug.py | 7487ccb89335c1e72c0ba32a5347a266fdafb3a0 | [] | no_license | wsgan001/PyFPattern | e0fe06341cc5d51b3ad0fe29b84098d140ed54d1 | cc347e32745f99c0cd95e79a18ddacc4574d7faa | refs/heads/main | 2023-08-25T23:48:26.112133 | 2021-10-23T14:11:22 | 2021-10-23T14:11:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 436 | py | def backend_pyqt4_internal_check(self):
try:
from PyQt4 import QtCore
except ImportError:
raise CheckFailed('PyQt4 not found')
try:
qt_version = QtCore.QT_VERSION
pyqt_version_str = QtCore.QT_VERSION_STR
except AttributeError:
raise CheckFailed('PyQt4 not correctl... | [
"[email protected]"
] | |
407652123c34cc2bfd537335f227c65cefbb2c11 | f1af5236a561c07d1def8da8716be333e2fb896c | /test/Service/test_pack_unpack.py | 35fbd6df707d360ab26b285c2acb982ad03f3d84 | [
"Apache-2.0"
] | permissive | chryswoods/acquire | 1a9dbbfa0f82d761a314fd34b77c0ad982ff60e6 | fe4c9cb2b90374b386d5ea38e514faa96661701a | refs/heads/devel | 2022-12-22T08:29:52.155771 | 2022-01-11T11:34:02 | 2022-01-11T11:34:02 | 156,683,200 | 21 | 5 | Apache-2.0 | 2022-12-17T12:47:35 | 2018-11-08T09:35:59 | Python | UTF-8 | Python | false | false | 2,995 | py |
import pytest
from Acquire.Crypto import PrivateKey, get_private_key
from Acquire.Service import pack_arguments, unpack_arguments
from Acquire.Service import pack_return_value, unpack_return_value
from Acquire.Service import create_return_value
from Acquire.ObjectStore import string_to_bytes, bytes_to_string
import ... | [
"[email protected]"
] | |
7014ef7a1f5107c645c6b794df58809717cbbcd7 | 2d47e5f7f358429ac46ed6bf61e8b8d68581dfeb | /cart/views.py | 3899a4bae7bb3e9e967e15dcfab285467cdcbbb8 | [] | no_license | hossamelneily/Freeshop | 7e24bbf6eb3668a121e9d6903347e6405295d589 | 48b1650164bad5f9691b11dc7f2377c800bd8240 | refs/heads/master | 2021-11-21T20:11:23.306946 | 2019-10-28T13:16:42 | 2019-10-28T13:16:42 | 144,614,064 | 1 | 2 | null | 2021-09-08T00:07:47 | 2018-08-13T17:46:42 | HTML | UTF-8 | Python | false | false | 5,513 | py | from django.shortcuts import render,redirect
from django.contrib.auth import authenticate , login , get_user_model
from django.conf import settings
# Create your views here.
from cart.models import cart
from products.models import product
from products.models import product
from orders.models import orders
from ecommer... | [
"[email protected]"
] | |
20683b9d7eaaf6988c7944329dd9cec29ca2947e | bab737891a602e8afc8b6a132ace3f05c37999e4 | /blog/migrations/0009_auto_20170821_1442.py | d499a002ce2474ef9b550b762290ec0d1950cb34 | [] | no_license | lianchonghui/django-blog | 34ddf308d15adf633b10676f835f27dd94a457f0 | 53f395f1d2ad2e4cea1fe38b99db705bb7fb352e | refs/heads/master | 2021-09-09T15:33:40.171955 | 2018-03-17T14:24:05 | 2018-03-17T14:24:05 | 118,338,599 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,203 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-08-21 06:42
from __future__ import unicode_literals
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
import blog
class Migration(migrations.Migration):
dependencies = [
('blog', '0008_... | [
"[email protected]"
] | |
90bb6f2d6386a5ad0b37e43f530eb0556d348aa8 | 64bf39b96a014b5d3f69b3311430185c64a7ff0e | /intro-ansible/venv2/lib/python3.8/site-packages/ansible/modules/network/netvisor/pn_ospfarea.py | 34739d451da56d21430f472be5da741f0e3d2cbd | [
"MIT"
] | permissive | SimonFangCisco/dne-dna-code | 7072eba7da0389e37507b7a2aa5f7d0c0735a220 | 2ea7d4f00212f502bc684ac257371ada73da1ca9 | refs/heads/master | 2023-03-10T23:10:31.392558 | 2021-02-25T15:04:36 | 2021-02-25T15:04:36 | 342,274,373 | 0 | 0 | MIT | 2021-02-25T14:39:22 | 2021-02-25T14:39:22 | null | UTF-8 | Python | false | false | 6,375 | py | #!/usr/bin/python
""" PN-CLI vrouter-ospf-add/remove """
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any... | [
"[email protected]"
] | |
52c0c13d7052ae235e036a5de1bc4bb4f2f89261 | a5a3ccf9feae3f5aa475153d92447f8f3ba8c013 | /data/kcbot.py | b5e78e6669e62e23f0901827fbc01946a7740baa | [] | no_license | waldenven/tsdata | 2a309d976ce2994c7cca8ad91e6287cb8180b8cf | a4229b7978f4c14ffc2201ea38a1a44e68dec130 | refs/heads/master | 2020-06-13T22:42:45.334001 | 2012-07-03T03:42:01 | 2012-07-03T03:42:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,369 | py | import urllib, re
from datetime import datetime
from pandas import DataFrame, Series, read_csv
from BeautifulSoup import BeautifulSoup
from tsdata.data.basedata import basedata
def all_daily_urls():
url = 'http://www.kcbt.com/daily_wheat_price.asp'
f = urllib.urlopen(url)
txt = f.read()
f.close()
... | [
"[email protected]"
] | |
9f73be10103f40ed4d479780397977619122dcb9 | 9947d1e328a3262a35a61385dc537c3dc557ab7d | /pythonnet/day3_PM/day3/recv_file.py | db7d06884dc73ce18d8d0d17c294d3419bf2c549 | [] | no_license | nuass/lzh | d0a7c74a3295523d1fe15eeaa73997fc04469f06 | 3cb1cf1e448b88ade226d113a7da4eab7bbb5c09 | refs/heads/master | 2021-02-06T06:10:32.772831 | 2019-06-10T08:54:49 | 2019-06-10T08:54:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 268 | py | from socket import *
s = socket()
s.bind(('127.0.0.1',8888))
s.listen(3)
c,addr = s.accept()
print("Connect from",addr)
f = open('leg.jpg','wb')
while True:
data = c.recv(1024)
if not data:
break
f.write(data)
f.close()
c.close()
s.close()
| [
"[email protected]"
] | |
3bacc8c066e42bc4d4187216f852f631b9e01070 | e21ab91cf22bf8359831e974d49e1fd90b69197a | /tests/conftest.py | 3208b58757a89871d4e97393c3db78b2a76d169c | [
"BSD-3-Clause"
] | permissive | creamofclubs/odin | 9be21013a7d707aee978e83bc2cb9ef70f81befa | deb00b6af56d319a3e11f71dbee7d217c8713fae | refs/heads/master | 2023-08-12T04:06:34.791245 | 2021-09-06T03:11:55 | 2021-09-06T03:11:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 364 | py | import os
import sys
import datetime
HERE = os.path.abspath(os.path.dirname(__file__))
SRC = os.path.normpath(os.path.join(HERE, "..", "src"))
sys.path.insert(0, SRC)
import odin.datetimeutil
ARE_YOU_EXPERIENCED = datetime.date(1967, 5, 12)
MWT = odin.datetimeutil.FixedTimezone(-6, "Mountain War Time")
BOOM = dateti... | [
"[email protected]"
] | |
28248168d3c9bf357c416aec52b917287ae926cf | 158a327c3cbff52a607d4ec668c658f0d8d8eea8 | /DP/55. Jump Game.py | 13c37440c5ef1d510135f5ac8ff8bfe1773f858b | [] | no_license | smartwell/leet_niuke | f11cbf826f9b2b358b614a63200e93aef47054a2 | eb84aaa1248074dceda831f9385d68a24941fa04 | refs/heads/master | 2020-06-24T16:37:33.073534 | 2019-07-25T13:19:49 | 2019-07-25T13:19:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,648 | py | ########################45##########################
def Jump(nums): #想象成这一步所能跳跃的范围,若最后终点在范围内则为最佳点 采用贪心算法 最优避免DP规划导致多余计算
n,fir,end,count=len(nums),0,0,0 #count计步器 思路:fir0,end0中找到使其跳的最远的作为end1,fir1=end0+1,依照此规律知道某段firn,endn中的数超过n-1
while end < n-1: #n-1表示从0到len(nums)要完成的最少跳跃步... | [
"[email protected]"
] | |
c7e9e9554266187a384876586f55b405a1471944 | 9fd934751ef1d332b792d204df0757ed91f36ef6 | /route66_project/route66/views.py | b3e6cee4b0f257ed94d9ee9aff83c33beaa4838e | [] | no_license | cs-fullstack-2019-spring/django-intro2-routes-cw-cgarciapieto | e55fa7a7b4c9ef317b9c6e3db1a8ba8eaea7602c | f232f3125fce93c03e687940e10b22280ba1d0d0 | refs/heads/master | 2020-04-23T23:57:22.501082 | 2019-02-20T05:04:38 | 2019-02-20T05:04:38 | 171,550,878 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 468 | py | from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse
# http response function
def goods(request):
return HttpResponse("Here you go, POKEMON FOREVER")
def joy(request):
return HttpResponse("This song drives me nuts")
def index(request):
return HttpResponse("t... | [
"[email protected]"
] | |
189c925a75f59f6b8ae9d4cfeb0648a69fcff9a5 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_199/388.py | 94106f5f14c7292d2212da973bc6701dbe2060af | [] | 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 | 374 | py | def solve(s, k):
s = list(s)
k = int(k)
ans = 0
while s:
if s.pop() != '+':
if len(s) < k - 1: return "IMPOSSIBLE"
for i in range(1, k):
s[-i] = '-' if s[-i] == '+' else '+'
ans += 1
return ans
for i in range(1, int(input()) + 1):
prin... | [
"[email protected]"
] | |
6498e8c2aa931f3faecf9b2f1027d5f19f53e176 | d24a6e0be809ae3af8bc8daa6dacfc1789d38a84 | /other_contests/PAST2019/I.py | 1fe31e281c0bf9947e3edece5bda7e352ee8a741 | [] | no_license | k-harada/AtCoder | 5d8004ce41c5fc6ad6ef90480ef847eaddeea179 | 02b0a6c92a05c6858b87cb22623ce877c1039f8f | refs/heads/master | 2023-08-21T18:55:53.644331 | 2023-08-05T14:21:25 | 2023-08-05T14:21:25 | 184,904,794 | 9 | 0 | null | 2023-05-22T16:29:18 | 2019-05-04T14:24:18 | Python | UTF-8 | Python | false | false | 1,051 | py | def solve(n, m, s_list, c_list):
dp = [[sum(c_list) + 1] * (2 ** n) for _ in range(m + 1)]
dp[0][0] = 0
for i in range(m):
k = 0
s = s_list[i]
for p in range(n):
if s[- p - 1] == "Y":
k += 2 ** p
c = c_list[i]
for j in range(2 ** n):
... | [
"[email protected]"
] | |
5fcafa9dc665d308fac15b10dc9dda4e4a8b26f0 | 45b64f620e474ac6d6b2c04fbad2730f67a62b8e | /Varsity-Final-Project-by-Django-master/.history/project/quiz/models_20210424121724.py | e9feec73e98c6b749012c04f069e8911025079ec | [] | no_license | ashimmitra/Final-Project | 99de00b691960e25b1ad05c2c680015a439277e0 | a3e1d3c9d377e7b95b3eaf4dbf757a84a3858003 | refs/heads/master | 2023-04-11T06:12:35.123255 | 2021-04-26T15:41:52 | 2021-04-26T15:41:52 | 361,796,607 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,603 | py | from django.db import models
# Create your models here.
class Quiz(models.Model):
question = models.CharField(max_length = 500)
option1 = models.CharField(max_length = 20)
option2 = models.CharField(max_length = 20)
option3 = models.CharField(max_length = 20)
option4 = models.CharField(max_length =... | [
"[email protected]"
] | |
1d1d26c8fc8487564347ded0561a2639a59ac73e | 2fc1e3382ae1024b008004ef6302914b492f51e1 | /cos/models/const.py | ce15e48b226aeb7293242c88f466838c589fd636 | [] | no_license | tclh123/COS | abf475b32cb45e6f099508675a8138dd2211e963 | 7e4843fbfe67f7e795eccffc3b48270b152ba438 | refs/heads/master | 2016-09-15T21:43:55.956184 | 2014-01-04T17:46:50 | 2014-01-04T17:46:50 | 15,521,178 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 395 | py | # coding=utf-8
PERM_BASIC = 0b001
PERM_ADMIN = 0b010
PERM_DELIVERY = 0b100
ORDER_STATUS_SUBMIT = 1
ORDER_STATUS_PAY = 2
ORDER_STATUS_WAIT = 3
ORDER_STATUS_DELIVERY = 4
ORDER_STATUS_OVER = 5
# '待买家完善订单后提交'
# '待买家付款'
# '待餐厅处理'
# '待送餐员送餐'
# '订单结束'
PAYMENT = {
u'货到付款': 1,
u'工资支付': 2,
u'网上支付': 3,
}
| [
"[email protected]"
] | |
eea2161b70cf5a3ecfebef0a04cfa64e7e059291 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/adjectives/_corrective.py | fc4041522f6dce91bdc98602bc6f91a6cf0a525b | [
"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 | 477 | py |
#calss header
class _CORRECTIVE():
def __init__(self,):
self.name = "CORRECTIVE"
self.definitions = [u'intended to improve a situation: ', u'used to refer to something that is intended to cure a medical condition: ']
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.s... | [
"[email protected]"
] | |
9d42ae4909b6084829161c508e2a65ffa42c2b2a | a9e3b2e87563acf39ce74c5e57aa4ad5c13404bf | /cartridge/shop/admin.py | 2cae83122ba67a49a11d3d4dce0a7b0f2428ceaf | [
"BSD-3-Clause"
] | permissive | CDC/cartridge | 40cf531f2912637f9bde261baf6b52e94aed388f | b9229617bbf054f1958bf5f2fadaf523d5d72522 | refs/heads/master | 2021-01-20T23:37:26.759210 | 2011-12-19T23:30:15 | 2011-12-19T23:30:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,718 | py |
from copy import deepcopy
from django.contrib import admin
from django.db.models import ImageField
from django.utils.translation import ugettext_lazy as _
from mezzanine.core.admin import DisplayableAdmin, TabularDynamicInlineAdmin
from mezzanine.pages.admin import PageAdmin
from cartridge.shop.fields import MoneyF... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.