blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 616 | content_id stringlengths 40 40 | detected_licenses listlengths 0 112 | license_type stringclasses 2
values | repo_name stringlengths 5 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 777
values | visit_date timestamp[us]date 2015-08-06 10:31:46 2023-09-06 10:44:38 | revision_date timestamp[us]date 1970-01-01 02:38:32 2037-05-03 13:00:00 | committer_date timestamp[us]date 1970-01-01 02:38:32 2023-09-06 01:08:06 | github_id int64 4.92k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us]date 2012-06-04 01:52:49 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[us]date 2008-05-22 07:58:19 2023-08-21 12:35:19 ⌀ | gha_language stringclasses 149
values | src_encoding stringclasses 26
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 3 10.2M | extension stringclasses 188
values | content stringlengths 3 10.2M | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
91efd913c270d343c4b45b6d1eb44d4aa58f912c | 35a6b6b5cabcf9fb39527bab020ef7c96265a026 | /p3.py | 5911e61bf240cc3e917c3377949ca16c9c46851d | [] | no_license | mepky/data-structure-and-algorithm | 9a1324142276e6966692c51734613f15234f5300 | 96f64e657f97e46fc2d32cca5294fa0f104d5d01 | refs/heads/master | 2020-03-24T08:57:41.692564 | 2020-02-10T12:40:13 | 2020-02-10T12:40:13 | 142,614,071 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 476 | py | from collections import defaultdict
t=int(input())
for _ in range(t):
l=defaultdict(int)
n=int(input())
d=2**20
t=0
s=input()
a=[-1]*27
for i in range(n):
if a[ord(s[i])-97]==-1:
a[ord(s[i])-97]=i
else:
d=min(d,i-a[ord(s[i])-97])
t=1
... | [
"[email protected]"
] | |
f4cc030b9c8573c816c10160ff087a8c68c9d808 | e00cf0bf72421ec31e4d3608c615aeeba5064731 | /wows/move.py | 3165d0d74b85208a58ea1b2ed7ee70fd489a053c | [] | no_license | lorne-luo/auto-wows | b4a84c7d99585c84a635fb5be11fd0f03a5f37fd | 992ad473f1d5a78686e1c4c939c6c218e72373d7 | refs/heads/master | 2020-12-30T00:52:17.497039 | 2020-02-25T11:10:30 | 2020-02-25T11:10:30 | 238,803,938 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,190 | py | import time
from random import randint
import pyautogui as pag
import settings as settings
from helper import search_template, get_map_image
class WOWS_Move(object):
def move_ship(self):
global MOVE_TO
pag.press('m', presses=1, interval=0.25)
pag.sleep(1.5)
if not MOVE_TO:
... | [
"[email protected]"
] | |
327de0fb6195fa9d70bb2f59a1b649c60f9ad8da | 31900bdf5648061a3093230711c5394e20b90436 | /usr/lib/enigma2/python/Plugins/Extensions/MediaPortal/additions/porn/cliphunter.py | f0ad44408f3a495045054598cafc29b1ceb97fb7 | [] | no_license | linuxbox10/enigma2-plugin-extensions-mediaportal | aa6f14ecfc42ce91e22c487070541459a1ab820c | e6b388918c186442718e7200e03c83d0db260831 | refs/heads/master | 2021-05-01T18:50:50.332850 | 2018-02-10T11:33:48 | 2018-02-10T11:33:48 | 121,009,954 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,746 | py | # -*- coding: utf-8 -*-
###############################################################################################
#
# MediaPortal for Dreambox OS
#
# Coded by MediaPortal Team (c) 2013-2018
#
# This plugin is open source but it is NOT free software.
#
# This plugin may only be distributed to and executed... | [
"[email protected]"
] | |
12e05ceaac7c5c4174fb21ada9bdbb1e70c90c54 | ffb05b145989e01da075e2a607fb291955251f46 | /pypers/oxford/non_cooperative.py | 6c7b293967ae50f89ebf7f90ccccdc8e62ba6d40 | [] | no_license | micheles/papers | a5e7f2fa0cf305cd3f8face7c7ecc0db70ce7cc7 | be9070f8b7e8192b84a102444b1238266bdc55a0 | refs/heads/master | 2023-06-07T16:46:46.306040 | 2018-07-14T04:17:51 | 2018-07-14T04:17:51 | 32,264,461 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 255 | py | # non_cooperative.py
class B1(object):
def __init__(self, **kw):
print "B1.__init__"
super(B1, self).__init__(**kw)
class B2(object):
def __init__(self, **kw):
print "B2.__init__"
super(B2, self).__init__(**kw)
| [
"[email protected]"
] | |
94f2093636ae67fdc8ec2d5431c2b52cbd51d7c2 | ac5e52a3fc52dde58d208746cddabef2e378119e | /exps-gsn-edf/gsn-edf_ut=3.0_rd=0.5_rw=0.06_rn=4_u=0.075-0.35_p=harmonic-2/sched=RUN_trial=25/params.py | 1e06a0ee411f4cd8e4e96c1df8f010d7336d6730 | [] | no_license | ricardobtxr/experiment-scripts | 1e2abfcd94fb0ef5a56c5d7dffddfe814752eef1 | 7bcebff7ac2f2822423f211f1162cd017a18babb | refs/heads/master | 2023-04-09T02:37:41.466794 | 2021-04-25T03:27:16 | 2021-04-25T03:27:16 | 358,926,457 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 254 | py | {'cpus': 4,
'duration': 30,
'final_util': '3.041500',
'max_util': '3.0',
'periods': 'harmonic-2',
'release_master': False,
'res_distr': '0.5',
'res_nmb': '4',
'res_weight': '0.06',
'scheduler': 'GSN-EDF',
'trial': 25,
'utils': 'uni-medium-3'}
| [
"[email protected]"
] | |
6cd613bcdd91d3c252c77c5671f432f525d64cfc | bee2af5228232ce94f418b61810cecd93af62615 | /virtual/bin/django-admin.py | d6b83b56c12b4e16e7f24824f482b665a071f57a | [] | no_license | thuitafaith/djangoapp | b64c2e1a05c67b1135d4d9dd7975c17522238a69 | e06280b34a7b1ec012d0baab6f0fb153875a39b4 | refs/heads/master | 2022-12-11T19:06:08.540528 | 2019-08-29T12:36:45 | 2019-08-29T12:36:45 | 203,321,071 | 0 | 0 | null | 2022-11-22T04:13:07 | 2019-08-20T07:15:28 | Python | UTF-8 | Python | false | false | 158 | py | #!/home/faith/Desktop/django-rem/virtual/bin/python
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| [
"[email protected]"
] | |
f3467f1043b80a0ea9337c61aa83eb37180e440c | 98c6ea9c884152e8340605a706efefbea6170be5 | /examples/data/Assignment_2/mphnok005/question3.py | 8ab32014734be33c45000ec60015c87758483dae | [] | no_license | MrHamdulay/csc3-capstone | 479d659e1dcd28040e83ebd9e3374d0ccc0c6817 | 6f0fa0fa1555ceb1b0fb33f25e9694e68b6a53d2 | refs/heads/master | 2021-03-12T21:55:57.781339 | 2014-09-22T02:22:22 | 2014-09-22T02:22:22 | 22,372,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 207 | py | from math import*
x=sqrt(2)
a=2
pi=2*(a/x)
while x<2:
x=(sqrt(2+x))
pi=(pi*a/x)
print("Approximation of pi:",round(pi,3))
c=eval(input("Enter the radius:\n"))
print("Area:",round(c**2*pi,3)) | [
"[email protected]"
] | |
3da3e17495525b485fd627a5d52d55b261e728ec | 8d50cc4f37c153fcb51de4501f3fa50c00394d9b | /test/benchmark/resnet_tl_benchmark.py | 0273e724c53f6d0c0598924637c84431b5b3fe0c | [
"MIT"
] | permissive | liujuanLT/InsightFace_TF | dbd239dfdda1866c348e82211932884f73cb3067 | 257b6e0dcf7e7c3523dc7e1c08ba529fab1bf75b | refs/heads/master | 2022-04-27T21:24:01.458277 | 2022-03-17T12:28:15 | 2022-03-17T12:28:15 | 463,040,192 | 0 | 0 | MIT | 2022-02-24T06:51:16 | 2022-02-24T06:51:15 | null | UTF-8 | Python | false | false | 1,255 | py | import tensorflow as tf
import tensorflow.contrib.slim.nets as nets
import numpy as np
from nets.resnet import get_resnet
slim = tf.contrib.slim
resnet = nets.resnet_v1
if __name__ == '__main__':
output_shape = 85164
batch_size = 128
image = tf.placeholder(name='input_x', shape=[None, 224, 224, 3], dtype... | [
"[email protected]"
] | |
51d5ae1fa2d5ae73a65d826bd1113e9b57cef767 | 03383b657ad6d526e7e6aa6639fe41019cd39ea2 | /recursion/palandrome.py | 985c2d63e7528bf16d0978634606988d462fbf30 | [] | no_license | ahmedmeshref/Leetcode-Solutions | 1c5f908cb2f6487c9dfadcc8f91192dedbb5a17e | 28f848cb25e4aa22e6d8c9d715488f191ed15137 | refs/heads/main | 2023-05-26T14:33:11.246122 | 2021-06-07T21:32:13 | 2021-06-07T21:32:13 | 356,045,965 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 402 | py | def isPalindrome(s: str) -> bool:
l = 0
r = len(s) - 1
while l != r:
if not s[l].isalpha():
l += 1
elif not s[r].isalpha():
r -= 1
elif s[l].lower() != s[r].lower():
return False
else:
l += 1
r -= 1
... | [
"[email protected]"
] | |
e49952bb3039c47341a3a2001f153c1fcea8521c | 05169e203974411667ab947298a74575b8a179e0 | /packages/jet_bridge_base/jet_bridge_base/serializers/relationship_override.py | c985788ccf2e5eeaf886f08eb8bb093846f356d8 | [
"MIT"
] | permissive | jet-admin/jet-bridge | f6b563e1801985063483ddb02e9e1c3301dc0612 | c53d30fb308eed5822083eaf71f641c4098610cc | refs/heads/master | 2023-09-01T14:31:42.261427 | 2023-08-24T13:54:34 | 2023-08-24T13:54:34 | 163,167,532 | 1,564 | 166 | MIT | 2023-03-18T03:20:04 | 2018-12-26T10:27:33 | Python | UTF-8 | Python | false | false | 4,873 | py | from jet_bridge_base.models.model_relation_override import ModelRelationOverrideModel
from jet_bridge_base.store import store
from sqlalchemy import inspect
from jet_bridge_base import fields
from jet_bridge_base.db import get_mapped_base, reload_request_graphql_schema, get_request_connection
from jet_bridge_base.exce... | [
"[email protected]"
] | |
8ba80ac4b037dde92443141d60bd35bf1f98031e | e4414bd8152e52855db7ab9065ae12b7329143e0 | /python/src/hangman.py | 0dd38bbfdc6501bc39f632a253400dd40bbf2d07 | [] | no_license | catalinc/programmingpraxis-solutions | 39cb847877ec46d2fb85740791c24889ab5654a8 | c0b13906aa76ffac705bf108db138fb9a38bc16a | refs/heads/master | 2021-03-27T16:46:47.781839 | 2017-09-09T15:17:38 | 2017-09-09T15:17:38 | 53,532,233 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,889 | py | #!/usr/bin/env python
# See http://programmingpraxis.com/2011/12/20/hangman/
import random
import sys
HANGMAN = [
"",
"""
O
""",
"""
O
|
""",
"""
_O
|
""",
"""
_O_
|
""",
"""
_O_
|
/
""",
"""
_O_
|
/ \\
"""
]
def play_game():
secret_word = random_word().upper()
guessed_letters = set()
failed_at... | [
"[email protected]"
] | |
74242c01bb15f0739920d399519d7227f57b8f8a | fc91e867bb74cbebcb0ee608f1477ae16af91631 | /.venv/bin/django-admin.py | 96ac186b1a98732e5519c8d218d286e285191802 | [] | no_license | karthik018/FacebookPosts | 7580afbfab066c6bd09a43be086e4ce9621bbd65 | 2fbe59e8640ca2da01e0028f7b10c4f9d7b62b65 | refs/heads/master | 2020-06-12T05:29:43.493418 | 2019-07-16T06:16:25 | 2019-07-16T06:16:25 | 194,204,422 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 157 | py | #!/home/ib_admin/FacebookPosts/.venv/bin/python3.7
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| [
"[email protected]"
] | |
900ce188b2d480f02d08d8fe381e861ddc612129 | acb8e84e3b9c987fcab341f799f41d5a5ec4d587 | /langs/4/j33.py | 32bc61a86b88039321d406fcdd145e2fdf95b792 | [] | no_license | G4te-Keep3r/HowdyHackers | 46bfad63eafe5ac515da363e1c75fa6f4b9bca32 | fb6d391aaecb60ab5c4650d4ae2ddd599fd85db2 | refs/heads/master | 2020-08-01T12:08:10.782018 | 2016-11-13T20:45:50 | 2016-11-13T20:45:50 | 73,624,224 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 486 | py | import sys
def printFunction(lineRemaining):
if lineRemaining[0] == '"' and lineRemaining[-1] == '"':
if len(lineRemaining) > 2:
#data to print
lineRemaining = lineRemaining[1:-1]
print ' '.join(lineRemaining)
else:
print
def main(fileName):
with open(fileName) as f:
for line in f:
... | [
"[email protected]"
] | |
99023c5533e743afb8349cd031816969f2e0f52e | 6527b66fd08d9e7f833973adf421faccd8b765f5 | /yuancloud/recicler/event/tests/test_mail_schedule.py | 7b92308e184f89e0d7bc6436545f7d9324c6b05d | [] | no_license | cash2one/yuancloud | 9a41933514e57167afb70cb5daba7f352673fb4d | 5a4fd72991c846d5cb7c5082f6bdfef5b2bca572 | refs/heads/master | 2021-06-19T22:11:08.260079 | 2017-06-29T06:26:15 | 2017-06-29T06:26:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,952 | py | # -*- coding: utf-8 -*-
import datetime
from dateutil.relativedelta import relativedelta
from yuancloud import fields, tools
from yuancloud.addons.event.tests.common import TestEventCommon
from yuancloud.tools import mute_logger
class TestMailSchedule(TestEventCommon):
@mute_logger('yuancloud.addons.base.ir.ir... | [
"[email protected]"
] | |
f2b1502e69ebbcb83d168b947b4e1536ab2f5ca9 | 2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02 | /PyTorch/dev/nlp/Speech_Transformer_ID0487_for_PyTorch/test/test_lr.py | 50038c0c6c0a3d30f8e5cf25a74a0eebf9c1ebc4 | [
"GPL-1.0-or-later",
"MIT",
"Apache-2.0",
"BSD-2-Clause",
"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 | 1,717 | py | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"[email protected]"
] | |
7d82abc23d5e3d4bf5e54cd6ec2da4a4d1a8768f | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02631/s475540632.py | 3a87c44b29ca2411c0463a78d1676b61c5e7616c | [] | 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 | 267 | py | N = int(input())
a = list(map(int, input().split()))
# XOR演算子 ^
# aの要素全てのXORを計算、それをSとする
S = 0
for aa in a:
S ^= aa
# i番目の番号はaiとSのXORで表される
ans = []
for ai in a:
ans.append(S ^ ai)
print(*ans) | [
"[email protected]"
] | |
8319e02dd8e51c0f3c972288a559d15a0f3bb1c5 | acd41dc7e684eb2e58b6bef2b3e86950b8064945 | /res/packages/scripts/scripts/common/Lib/plat-mac/Carbon/Cm.py | 81888a1e6189f6251d73285153430da7c7720a3a | [] | no_license | webiumsk/WoT-0.9.18.0 | e07acd08b33bfe7c73c910f5cb2a054a58a9beea | 89979c1ad547f1a1bbb2189f5ee3b10685e9a216 | refs/heads/master | 2021-01-20T09:37:10.323406 | 2017-05-04T13:51:43 | 2017-05-04T13:51:43 | 90,268,530 | 0 | 0 | null | null | null | null | WINDOWS-1250 | Python | false | false | 362 | py | # 2017.05.04 15:34:09 Střední Evropa (letní čas)
# Embedded file name: scripts/common/Lib/plat-mac/Carbon/Cm.py
from _Cm import *
# okay decompyling C:\Users\PC\wotmods\files\originals\res\packages\scripts\scripts\common\Lib\plat-mac\Carbon\Cm.pyc
# decompiled 1 files: 1 okay, 0 failed, 0 verify failed
# 2017.05.04 15... | [
"[email protected]"
] | |
8e3269fafdfc4c4927faaa47a88c3a3c531bf398 | 676f6f2d02db6aeeaa1bb0b28ab49e8c73923d0e | /venv/Lib/site-packages/falcon/bench/bench.py | b0c60863ab0aaefa5eee2e548c536b1e6bc55c82 | [
"Apache-2.0"
] | permissive | vrian/orsen | ce34f74ea3a14c95d37ffa5c694b7c66725925df | 9c10148aba62868fad4b679a4b9b717829586e96 | refs/heads/master | 2023-01-21T21:47:06.210918 | 2018-06-23T04:46:26 | 2018-06-23T04:46:26 | 120,284,869 | 1 | 0 | Apache-2.0 | 2023-01-09T09:39:16 | 2018-02-05T09:44:03 | Python | UTF-8 | Python | false | false | 11,546 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2014 by Rackspace Hosting, Inc.
#
# 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
#
... | [
"[email protected]"
] | |
b3df535e0bf14619764330e153f9691f97ebfe7a | ae3df32afc258c80cb2ce504ce87fa5bb7740ea7 | /main/apps.py | a1c166fbd7a6ef9873d13d2341e00132f5d8b9dd | [] | no_license | chensandiego/elast-python | 622251d806b947899d74dc064c19193b418ac505 | 8c28a47acfc5ef540a017abcd786cf815591b163 | refs/heads/master | 2020-12-24T05:40:38.917432 | 2016-08-08T09:16:39 | 2016-08-08T09:16:39 | 65,190,208 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 240 | py | from __future__ import unicode_literals
from django.apps import AppConfig
from elasticsearch_dsl.connections import connections
class MainConfig(AppConfig):
name = 'main'
def ready(self):
connections.create_connection() | [
"[email protected]"
] | |
03077baac22100638f1f73d6914d61d5790e636d | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03804/s359892659.py | cf5a2561cd5c03f89d2bfa0dc2d375e6139544c1 | [] | 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 | 477 | py | n, m = map(int, input().split())
a = [""] * n
b = [""] * m
for i in range(n):
a[i] = input()
for i in range(m):
b[i] = input()
for i in range(n):
for j in range(n):
if i + m > n or j + m > n:
continue
flag = True
for k in range(m):
for l in range(m):
... | [
"[email protected]"
] | |
d5ca2bcbd5de3c1b9c9bac46eab8058ddbdaa268 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_200/1005.py | d1785f14535df9f9f8739a47a08da1ea17308063 | [] | 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 | 405 | py | import numpy as np
def solve(n, j):
front = 0
for i in range(1, len(n)):
if n[-i-1] > n[-i]:
n[-i-1] -= 1
front = i
if front:
n[-front:] = 9
if not n[0]:
n = n[1:]
print('Case #{}: {}'.format(j+1, ''.join(map(str, n))))
def main():
T = int(input())
for i in range(T):
solv... | [
"[email protected]"
] | |
4b4fb06a5c7779a15bbde10c3ca456691d7aa16b | 2ed6ad4a736879a47d192159da45ca56610c089a | /tests/test_utils.py | 5322f50e74f0e19c141fd1adbdd2a5b05e92fb39 | [
"MIT"
] | permissive | poonyisaTH/gsheets-db-api | a82bd35984766697757cc96aa74a1281d948f019 | f023b32986d4da9a501fca8d435f2b6edc153353 | refs/heads/master | 2023-05-29T15:01:10.604324 | 2021-02-17T20:59:41 | 2021-02-17T20:59:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,952 | py | # -*- coding: utf-8 -*-
import unittest
from moz_sql_parser import parse
import pyparsing
from .context import format_gsheet_error, format_moz_error
class UtilsTestSuite(unittest.TestCase):
def test_format_moz_error(self):
query = 'SELECT ))) FROM table'
with self.assertRaises(pyparsing.ParseE... | [
"[email protected]"
] | |
26c3ed7037c5e7c99c281a9602db0848de390886 | ce55c319f5a78b69fefc63595d433864a2e531b5 | /前后端分离-vue-DRF/houfen_DRF-projects/15day周末作业/booklogin/user/views.py | ea76a3b29e6788ab22cbcb4e135039d76dd5f722 | [] | no_license | Suijng/1809_data | a072c875e8746190e3b715e53f1afe3323f4666b | 45f8a57089f5c30ccc1a3cddb03b76dc95355417 | refs/heads/master | 2022-12-21T12:38:30.458291 | 2019-09-27T01:14:41 | 2019-09-27T01:14:41 | 211,207,071 | 0 | 0 | null | 2022-11-22T03:16:18 | 2019-09-27T00:55:21 | HTML | UTF-8 | Python | false | false | 7,016 | py | from django.shortcuts import render
# Create your views here.
from rest_framework.views import APIView
from rest_framework.response import Response
from user.serializers import ResgsterUserSerializer,CategorySerializer,\
BookDetailSerializer,BookSerializer,\
ChpaterListSerializer,ChpaterDetailSerializer
from ... | [
"[email protected]"
] | |
bcf4694b4be4de84974a88f8c1e0c68664a56527 | 4913fb7fd32c3dd0da53af7a012569ec2254b35a | /59.集合数据的操作.py | 75c83dbf6875876bad10856772cd2746191883a6 | [] | no_license | puhaoran12/python_note | 8a21954050ba3126f2ef6d5d1e4a2904df954b9b | b807e7b7dd90c87cee606f50421400c8f3d0ba03 | refs/heads/master | 2023-07-07T20:20:04.546541 | 2021-08-21T02:17:12 | 2021-08-21T02:17:12 | 398,439,725 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 325 | py | #交集intersection() 或者 &
s1={10,20,30}
s2={30,40,50}
print(s1.intersection(s2))
print(s1 & s2)
#并集union() 或者 |
print(s1.union(s2))
print(s1 | s2)
#差集difference() 或者 -
print(s1.difference(s2))
print(s1 - s2)
#对称差集symmetric_difference() 或者 ^
print(s1.symmetric_difference(s2))
print(s1 ^ s2)
| [
"[email protected]"
] | |
cbc7ff8ebf0f55d2d54140505ce153702a872ce4 | 9784a90cac667e8e0aaba0ca599b4255b215ec67 | /convert_models.py | d3b743be02b1e3c57c11c482699a1440c12daa44 | [
"MIT"
] | permissive | osmr/imgclsmob | d2f48f01ca541b20119871393eca383001a96019 | f2993d3ce73a2f7ddba05da3891defb08547d504 | refs/heads/master | 2022-07-09T14:24:37.591824 | 2021-12-14T10:15:31 | 2021-12-14T10:15:31 | 140,285,687 | 3,017 | 624 | MIT | 2022-07-04T15:18:37 | 2018-07-09T12:57:46 | Python | UTF-8 | Python | false | false | 87,933 | py | """
Script for converting models between frameworks (MXNet, Gluon, PyTroch, Chainer, Keras, TensorFlow).
"""
import argparse
import logging
import re
import numpy as np
from common.logger_utils import initialize_logging
def parse_args():
parser = argparse.ArgumentParser(description="Convert models (Gluon/PyT... | [
"[email protected]"
] | |
687597834631051ff823fce8248de22de124ebb5 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02553/s242742740.py | 19cb61040111d626c69f31e200e94dcd971f47c1 | [] | 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 | 78 | py | a,b,c,d = map(int,input().split())
s = max(max(a*c,a*d),max(b*c,b*d))
print(s) | [
"[email protected]"
] | |
4e860abb10b550c48e16c59c692326f5f75730fa | f08177abce14672891c34c0eecc064f2b42f2441 | /hydrus/client/db/ClientDBMappingsCounts.py | 5df0ef9fa636429b38e960148136fbb76dc8a01a | [
"WTFPL"
] | permissive | bbappserver/hydrus-userpatch | d217006cc7691a08c11c98ddfd2415da56d6b27d | ef19e2167e24433d960a0811a93a683d62203518 | refs/heads/master | 2022-09-19T03:36:16.575489 | 2022-05-04T21:40:27 | 2022-05-04T21:40:27 | 179,595,032 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 22,801 | py | import collections
import sqlite3
import typing
from hydrus.core import HydrusConstants as HC
from hydrus.core import HydrusDBBase
from hydrus.client import ClientData
from hydrus.client.db import ClientDBModule
from hydrus.client.db import ClientDBServices
from hydrus.client.metadata import ClientTags
def GenerateC... | [
"[email protected]"
] | |
1265bb8736bd9b11afc120fcc3bdcb77428869ec | 29a4c1e436bc90deaaf7711e468154597fc379b7 | /modules/ieee/doc2/nextpow2.py | 7c5fcf15c55e96875561be4f21550ed813ecbc7a | [
"BSL-1.0"
] | permissive | brycelelbach/nt2 | 31bdde2338ebcaa24bb76f542bd0778a620f8e7c | 73d7e8dd390fa4c8d251c6451acdae65def70e0b | refs/heads/master | 2021-01-17T12:41:35.021457 | 2011-04-03T17:37:15 | 2011-04-03T17:37:15 | 1,263,345 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,923 | py | [{'functor': {'arity': '1',
'call_types': [],
'ret_arity': '0',
'rturn': {'default': 'typename nt2::meta::as_integer<typename boost::result_of<nt2::meta::floating(T)>::type, signed>::type'},
'type_defs': [],
'types': ['real_', 'unsigned_int_', 'signe... | [
"[email protected]"
] | |
969ff18c3b0c3ebd06ccfc2dc0dfe97216e6a725 | 6a47ec6800610ea93479f91505e73a3eb4f34ae0 | /user/serviced.py | 74e25a9df84b86e320e670d436afb861e42769b5 | [] | no_license | risification/queue_project | 1158aac7bae3b04f98c106c23c27281c96bcaf41 | e85f9f2d1835f10a0247a569f88d4cb29803538a | refs/heads/master | 2023-04-26T08:05:25.573243 | 2021-06-07T21:03:47 | 2021-06-07T21:03:47 | 374,119,444 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 579 | py | from django.contrib.auth.models import User
from django.core.mail import EmailMessage
def mailing(username):
email_list = []
obj = User.objects.filter(is_superuser=True)
for user in obj:
email_list.append(user.email)
subjects = 'hi'
body = f'User with {username} register in database, pls c... | [
"[email protected]"
] | |
5a4d8c674b599a2c01fdc8fd795bf0ea39b3d9b4 | 0ddcfcbfc3faa81c79e320c34c35a972dab86498 | /puzzles/orderly_queue.py | a373cf1f75c26e6261bdd30af8d0855a2660bb45 | [] | no_license | IvanWoo/coding-interview-questions | 3311da45895ac4f3c394b22530079c79a9215a1c | 1312305b199b65a11804a000432ebe28d1fba87e | refs/heads/master | 2023-08-09T19:46:28.278111 | 2023-06-21T01:47:07 | 2023-06-21T01:47:07 | 135,307,912 | 0 | 0 | null | 2023-07-20T12:14:38 | 2018-05-29T14:24:43 | Python | UTF-8 | Python | false | false | 1,048 | py | # https://leetcode.com/problems/orderly-queue/
"""
ou are given a string s and an integer k. You can choose one of the first k letters of s and append it at the end of the string..
Return the lexicographically smallest string you could have after applying the mentioned step any number of moves.
Example 1:
Input: s = ... | [
"[email protected]"
] | |
7267956f1f7b465699fb043dc755525ce97b5ccf | 2c73882fc59ca85f4854a43bcda8cc9edd282b8d | /polls_api/views.py | 2664dfc220c7e377fed156deed7d18e979f75115 | [] | no_license | mjstealth/guide-to-backbonejs-with-django | 540236f3535ee171c3aa4c43a1be9394a8a7e4bc | e7d5016c800e1e0e282da0386cc6112d4eed63c1 | refs/heads/master | 2021-01-17T22:40:28.191509 | 2012-09-04T22:17:12 | 2012-09-04T22:17:12 | 5,679,419 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 990 | py | from django.shortcuts import get_object_or_404
from django.core.urlresolvers import reverse
from djangorestframework import views
from djangorestframework.response import Response
from polls.forms import PollForm
from polls.models import Poll
from .resources import PollResource
class PollResults (views.View):
def... | [
"[email protected]"
] | |
42a8dac1509c16a1f9ee4746a23db2e89449bf64 | 11d265eba2ced9de43c339e4014c779b521320cd | /accounts/migrations/0004_auto_20200423_2253.py | eccb31bc3dd7e0a1872e9574429fc5cdc2edd129 | [] | no_license | Sloshpit/budget_old | d9271de625cd7e3aa66ccbec501b005e50cd2812 | a5603996b026542adb3bc8c578c03bcb843bea01 | refs/heads/master | 2022-04-23T08:42:43.377827 | 2020-04-25T14:40:39 | 2020-04-25T14:40:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 606 | py | # Generated by Django 3.0.5 on 2020-04-24 02:53
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('accounts', '0003_auto_20200423_2251'),
]
operations = [
migrations.RenameField(
model_name='account',
old_name='transaction_... | [
"[email protected]"
] | |
f71387df36af9f3c0cb4897aa762c93b0ccbdb5f | 3f60b999ea7bda83c9586f75f52463dc20337f24 | /sensitive_user_portrait/weibo_rank/Offline_task.py | de919db3a2449e8b9e35b521386aa9943040a4ae | [] | no_license | jianjian0dandan/sensitive_user_portrait | 629e49ce71db92b50634bac9c828811cdb5381e9 | cacc30267ebc0e621b1d48d4f1206277a0f48123 | refs/heads/master | 2021-01-20T23:18:07.138057 | 2016-05-22T12:09:40 | 2016-05-22T12:09:40 | 42,869,287 | 0 | 0 | null | 2015-09-21T13:55:12 | 2015-09-21T13:55:11 | null | UTF-8 | Python | false | false | 6,454 | py | #-*-coding: utf-8 -*-
import datetime
import json
import time as TIME
from elasticsearch import Elasticsearch
from time_utils import ts2datetime, datetime2ts, ts2date
from global_utils import es_user_portrait as es
WEIBO_RANK_KEYWORD_TASK_INDEX = 'weibo_rank_keyword_task'
WEIBO_RANK_KEYWORD_TASK_TYPE = 'weibo_rank_ta... | [
"[email protected]"
] | |
43bf411f069beff4b058247c875c82e5f19f01bc | 4b1965b3d831ab54998973afb26f4327ed010336 | /info/user/views.py | 4edbf7fa25d4329141c2449cb244798b16174185 | [] | no_license | yc12192057/information11_mm | 7d353dfe61962eb0bd2c29b7f0b54a2a62953262 | 2e4052d130b200797aa8a57a0d37f8267d523a8b | refs/heads/master | 2020-03-21T10:22:23.558714 | 2018-06-24T02:34:25 | 2018-06-24T02:34:25 | 138,447,718 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,383 | py | from flask import current_app
from flask import g
from flask import request
from flask import session
from info.utils.image_storage import storage
from info import constants
from info import db
from info.models import Category, News
from info.utils.response_code import RET
from . import profile_blue
from flask import r... | [
"[email protected]"
] | |
1fcb9a5bc116b70cacd5ddbd3646b35b3f6e0d8c | e0527bce5c53a196752d3a16adf50cb60754de5f | /05-How to Repeat Actions demos/02-dotty_dots.py | 47bb00a38d29385492c81d3cb4b98ea027472cab | [] | no_license | ARWA-ALraddadi/python-tutorial-for-beginners | ddeb657f419fbc176bea273bc9fb6b88d1894191 | 21cedfc47871ca4d25c2382464c60ab0a2121205 | refs/heads/master | 2023-06-30T20:24:30.688800 | 2021-08-08T08:22:29 | 2021-08-08T08:22:29 | 193,094,651 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,825 | py | #---------------------------------------------------------------------
#
# Dotty dots - Repeating actions with minor variations
#
# Up until now the only repetition we've seen has been the same action
# done many times. This simple demonstration shows how actions can
# be repeated with minor variations for each differ... | [
"[email protected]"
] | |
93d1c4b038d428ed57ee5e22dfd6aa42a7abb5be | d0168d08221da5bf95c0dd511efeecddc9b0a73d | /profiles/migrations/0001_initial.py | cdaa8070d22ad1710c0d0041619d3e087f6b3285 | [] | no_license | alexarirok/roret-farm-software | 900b5842c7b39c4a19543e138a719e4b496531a9 | aa23fd729351f0d045b2e310dc839a8b4d639c6d | refs/heads/master | 2021-04-08T21:03:59.709224 | 2020-05-01T00:07:53 | 2020-05-01T00:07:53 | 248,808,990 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 853 | py | # Generated by Django 3.0.5 on 2020-04-23 21:43
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Profile',
fields=[
('id', models.AutoField(... | [
"[email protected]"
] | |
22f3c9cd4a9a1004dd7c7bb512643d2bbf2cbdb2 | 048405bfa0b48eaf78dd2298bdfe61472bd74eef | /scripts/multiproc.py | d0bf77fe6d0ed47a785ac752a9bddf3529d5e1ed | [] | no_license | sousa-edvan/greedy_grasp_ant | 2218ae20f707baa8d5428db76129e5c758a21d07 | 12f5ac99b4d0e9599a2ecd138f8f6a3551fe2473 | refs/heads/master | 2022-01-27T02:30:35.977782 | 2019-07-19T16:39:20 | 2019-07-19T16:39:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 654 | py | import os
import pandas as pd
import subprocess
from multiprocessing import cpu_count, Pool
from auto_tqdm import tqdm
from notipy_me import Notipy
def score(data):
csv = "scores/{data}.csv".format(data=data)
subprocess.run([
"./gga/greedy_grasp_ant",
"--data=data/{data}".format(data=data),
... | [
"[email protected]"
] | |
6e29a6e6c458214a2a869d88d2a4615e11373078 | adf2e802c7563e4b7b7cc279a54deceb6a803098 | /openapi_client/models/pdf_annotate_parameters.py | 9dc6b17b59f3a07476f94e6f5e9c90548eeb50bf | [] | no_license | Orpalis/passportpdfsdk-python | 2466f7568becf2bd386bd9e4e00b4e3c1e642727 | 257d305ca9e6508d44fe521a1e4721f1835e8d0e | refs/heads/master | 2022-04-24T15:58:21.257112 | 2020-04-27T11:09:37 | 2020-04-27T11:09:37 | 254,665,250 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,981 | py | # coding: utf-8
"""
PassportPDF API
Another brick in the cloud # noqa: E501
The version of the OpenAPI document: 1.0.1
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from openapi_client.configuration import Configuration
class PdfAnnotateParam... | [
"[email protected]"
] | |
46716e05f494d85df10a692e589e37f999ee1bdd | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/CodeJamCrawler/CJ/16_0_2_anrieff_b.py | 9217d8d49f04d08baad00e10f7695015df8cedd7 | [] | 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 | 570 | py | #!/usr/bin/env python
# Contestant: Veselin 'anrieff' Georgiev
# Round: Google Code Jam Qualification 2016
# Task: B. Revenge of the pancakes
# Solution: Greedy. At each step, find the largest single-colored block at the top, and flip it, until we finish.
TC = int(raw_input().strip())
for tc in xrange(1, TC + 1):
p... | [
"[[email protected]]"
] | |
e82f2bd71cc0846186353d8c20817723d286fc4f | 4d4fcde3efaa334f7aa56beabd2aa26fbcc43650 | /server/src/uds/reports/lists/__init__.py | 2cb963d21ee727e9b5b0bcc891ec8e5716d7db72 | [] | no_license | xezpeleta/openuds | a8b11cb34eb0ef7bb2da80f67586a81b2de229ef | 840a7a02bd7c9894e8863a8a50874cdfdbf30fcd | refs/heads/master | 2023-08-21T17:55:48.914631 | 2021-10-06T10:39:06 | 2021-10-06T10:39:06 | 414,489,331 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,712 | py | # -*- coding: utf-8 -*-
#
# Copyright (c) 2015-2020 Virtual Cable S.L.U.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright not... | [
"[email protected]"
] | |
630d1956e0b63d64523db795b9be2b9148d32cde | 5cb98473ea9972d0a9a0278cde9b6ee8264f9bac | /01. Jump to python/chap05/5_6/260.py | 3716f386db385102e9e74387bd614dd0a58e1cff | [] | no_license | libus1204/bigdata2019 | fd85dbcd8c89db991ab5c3efa11ff85466a823f8 | 5e9a6fa2c340c1fcd2840889ba40c7b805926558 | refs/heads/master | 2020-04-21T10:56:33.519490 | 2019-04-15T05:28:19 | 2019-04-15T05:28:19 | 169,503,607 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 83 | py | import time
index = 1
while True:
print(index)
index += 1
time.sleep(5) | [
"[email protected]"
] | |
89dffaba38711b93fdcb658ebbf0b28432889f78 | 113b962bd5e2eb770067bd374a15dfe8a1c2d09f | /py_scripts/get_mappedcount_byLibID.py | 8a5cee444afcf4ef2e1d1d2b47beaaa11f6be665 | [] | no_license | aungthurhahein/biotech_script | ecce51950bcef69405843da12ece2f84ea5541d6 | 2fda699343e6c46543fa1df2412c8ca2f2622cda | refs/heads/master | 2020-12-24T06:20:13.028141 | 2016-07-06T15:23:34 | 2016-07-06T15:23:34 | 25,574,741 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 827 | py | """
# get occurences of ref_ids by Lib_IDs
# modification tips: file type, column of file ids
# __author__ = 'atrx'
# Date: 22012015
"""
import sys
from Bio import SeqIO
usage = "Usage %s infile" % sys.argv[0] # specific massage for no input
try:
fastafile = sys.argv[1]
contigid = sys.argv[2]
except:
pri... | [
"[email protected]"
] | |
fa568dcd357b037a884e720bb3f4b2961b3d5e46 | 343413e76c09d2bd3d009f382d9dcd19c984d58f | /.history/main_20201229180214.py | e7c1f84e7a234bab2a2ddd0a968647204387eebe | [] | no_license | rozbeh1212/cipher | 7b81e640501639cefb0fe6bf100647dd2602291e | abdebdd7d1e155ffab78ce38be8bf28074366c42 | refs/heads/master | 2023-02-04T13:44:36.892470 | 2020-12-29T14:44:10 | 2020-12-29T14:44:10 | 325,314,022 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 991 | py | alphabet = [
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
]
direction = input("Type 'encode' to encryp... | [
"[email protected]"
] | |
21a65c73620f2a40477d64a11550fc36704d99f4 | 85a9ffeccb64f6159adbd164ff98edf4ac315e33 | /pysnmp/A3COM-HUAWEI-RS485-MIB.py | 6e4c22f4a88026cd33571d0023c92ae07bce922d | [
"Apache-2.0"
] | permissive | agustinhenze/mibs.snmplabs.com | 5d7d5d4da84424c5f5a1ed2752f5043ae00019fb | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | refs/heads/master | 2020-12-26T12:41:41.132395 | 2019-08-16T15:51:41 | 2019-08-16T15:53:57 | 237,512,469 | 0 | 0 | Apache-2.0 | 2020-01-31T20:41:36 | 2020-01-31T20:41:35 | null | UTF-8 | Python | false | false | 10,571 | py | #
# PySNMP MIB module A3COM-HUAWEI-RS485-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/A3COM-HUAWEI-RS485-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 16:52:12 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (d... | [
"[email protected]"
] | |
6b98012278b2ef3e02f3bdbc33e146865eb26807 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/59/usersdata/201/46743/submittedfiles/testes.py | 3378d84c86f02731a2be48d3b0f834f8d9cb8366 | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 111 | py | # -*- coding: utf-8 -*-
#COMECE AQUI ABAIXO
r=float(input('Digite um raio:'))
pi=3,14
a=pi*(r**2):
print(a) | [
"[email protected]"
] | |
3ab2ab497849cf95c4e137ee698165d20cbe687f | 1939f5b78e6dbd0675f6f2a9a0f4f49c2b069389 | /instagram/src/instabot.py | 91bd65f0544dd187a1655c570d6dcb9774751ecf | [
"MIT"
] | permissive | pavel-malin/instagram | cb7988d9fbfad14911bf39567f7b2f6336b1fb34 | b53f00c20521f46f5836946a499f476859d431f5 | refs/heads/master | 2021-03-16T07:54:57.942684 | 2017-11-20T11:23:46 | 2017-11-20T11:23:46 | 111,401,293 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 36,349 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import atexit
import datetime
import itertools
import json
import logging
import random
import signal
import sys
if 'threading' in sys.modules:
del sys.modules['threading']
import time
import requests
from unfollow_protocol import unfollow_protocol
from userinfo impor... | [
"[email protected]"
] | |
84a2a9db3cd847433912ae84459035f42045f6bc | da3e36172daaf863ef73372f8c36cc2629ec1769 | /UMDC/03/17g.py | ce55196990dd77c97e38c5ebc70122baad56ce1d | [] | no_license | mentecatoDev/python | 08eef1cb5a6ca2f16b01ee98192ccf1a65b9380a | 80ddf541d3d1316ba8375db8f6ec170580e7831b | refs/heads/master | 2021-06-30T07:03:51.957376 | 2021-02-22T09:40:46 | 2021-02-22T09:40:46 | 222,322,503 | 3 | 4 | null | null | null | null | UTF-8 | Python | false | false | 2,333 | py | """
Ejercicio 17g
Escribir funciones que resuelvan los siguientes problemas:
g) Dadas dos fechas (dia1, mes1, año1, dia2, mes2, año2), indicar el tiempo
transcurrido entre ambas, en años, meses y dias. Nota: en todos los casos,
involucrar las funciones escritas previamente cuando sea posible.
"""
def bisiesto(anio)... | [
"[email protected]"
] | |
eee6c26c594ab5b9fa6e26288db0e7e9dee3d498 | ff886f5f947460576feaec2a049f6a9f78f2a63f | /core/management/commands/wait_for_db.py | 460989d579a419bc219cba5e76cc9fcb204aa701 | [
"MIT"
] | permissive | devendraprasad1984/loan_payment_app | 2bc927afbc084504bb10a959105d72f6f419e2c8 | 1a4c31d03a8c5ecf4dae2a981373649f4f699aa3 | refs/heads/main | 2023-07-21T19:00:40.692978 | 2021-09-09T03:36:04 | 2021-09-09T03:36:04 | 400,111,124 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 707 | py | import time
from django.db import connections
from django.db.utils import OperationalError
from django.core.management.base import BaseCommand
class Command(BaseCommand):
"""django overriding default app run until database is made available"""
def handle(self, *args, **options):
self.stdout.write('w... | [
"[email protected]"
] | |
0d543afecf4a0144548d3602be45f8e851f1657b | a61dae5e34605f708cec4ba661a3e6d2ed78ab73 | /Weather/GUI.py | 595c6a018becfbd6c4cf78563b0fa83b0d9947dd | [] | no_license | ChyiYaqing/PythonPrj | a475c2f83db2a607377d24a78a8c0aa1220229e3 | a7f8e9c0263b4f0f3827c5488ab4fed002962a1b | refs/heads/master | 2020-06-02T01:27:05.095901 | 2017-06-25T12:48:30 | 2017-06-25T12:48:30 | 94,090,551 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,424 | py | #!/usr/bin/env python3
#-*- coding: utf-8 -*-
try:
# for Python2
from Tkinter import * ## notice capitalized T in Tkinter
except ImportError:
# for Python3
from tkinter import * ## notice lowercase 't' in tkinter here
from Weathers import *
import urllib2
from threading import Thread
import tkMessageBox... | [
"[email protected]"
] | |
95414f7ed3b48f7baf6bd13799ea4698d7f6093f | 199522cb43b4e2c7e3bf034a0e604794258562b1 | /0x0F-python-object_relational_mapping/3-my_safe_filter_states.py | 3659d402edd14791ff0d3dce555884770499752c | [] | no_license | jormao/holbertonschool-higher_level_programming | a0fd92f2332f678e6fe496057c04f2995d24a4ac | 360b3a7294e9e0eadcadb57d4c48c22369c05111 | refs/heads/master | 2020-09-29T01:36:20.094209 | 2020-05-15T03:27:06 | 2020-05-15T03:27:06 | 226,915,744 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 607 | py | #!/usr/bin/python3
"""
script that takes in arguments and displays all values in the
states table of hbtn_0e_0_usa where name matches the argument.
But this time, write one that is safe from MySQL injections!
"""
import MySQLdb
from sys import argv
if __name__ == "__main__":
db = MySQLdb.connect(host="localhost", ... | [
"[email protected]"
] | |
041350efe6b160a115e9e22c301c74a34ff53193 | 71257430418ed7410ddffb6df692a5e816eb53b7 | /61hunter.py | ed47aa6e3c043824bfe5d9b810408fd96bd965c2 | [] | no_license | aarthisandhiya/aarthi | 917283541b9aa133db5d50a3b68eda2a10c38af7 | 00b31831832ea573dfd886eb0001ad824325136d | refs/heads/master | 2020-04-15T05:10:42.585357 | 2019-07-21T13:57:58 | 2019-07-21T13:57:58 | 164,411,781 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 199 | py | a=int(input())
c=0
b=[int(a) for a in input().split()]
u,v=map(int,input().split())
for i in range(0,len(b)):
if b[i]==u:
while b[i]<int(v):
c=c+1
i=i+1
print(c)
| [
"[email protected]"
] | |
0ac0305052893eb0942f039d2bc543f72d5454e5 | cf09d6430e37b5460d7208d6cae6d3af0fa15925 | /jsonbot/jsb/lib/reboot.py | 9209bd73573898a076abeb23cc8bd8fa26b3fd6a | [
"MIT"
] | permissive | Lujeni/old-projects | 2bbf0ff89852a3e4a9677475a615d2ee4b07d635 | 657304c8b017a98935de9728fc695abe8be7cc4f | refs/heads/master | 2021-03-12T23:08:34.054777 | 2014-10-16T23:10:15 | 2014-10-16T23:10:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,632 | py | # jsb/reboot.py
#
#
""" reboot code. """
## jsb imports
from jsb.lib.fleet import getfleet
from jsb.imports import getjson
json = getjson()
## basic imports
import os
import sys
import pickle
import tempfile
import logging
import time
## reboot function
def reboot():
""" reboot the bot. """
logging.warn(... | [
"[email protected]"
] | |
e25ee8942b20a0704262265705ad3ad2b5b7b407 | f99f30752e9bb9e023b37c731f64fb2155ac3daf | /03/zip.py | 69160f8e55ebbe1da4acd417e0cd571fe8488b3e | [] | no_license | chu83/python-basics | 148ff6977f5ca04775951d90ed1f5f763c51a9ff | 19fe0937842c668f604876be0aeb0962a2630dd2 | refs/heads/master | 2023-01-19T01:29:25.203738 | 2020-11-29T18:34:33 | 2020-11-29T18:34:33 | 311,258,549 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 335 | py | print('========== zip() 함수 사용 예 ===========')
s1 = ['foo', 'bar', 'baz']
s2 = ['one', 'two', 'three', 'four']
z = zip(s1, s2)
print(z, type(z))
print('========== 순회1 ===========')
for t in z:
print(t, type(t))
z = zip(s1, s2)
for a, b in z:
print(a, b)
print('========== 순회2 ===========')
z = zip(s1, s2) | [
"[email protected]"
] | |
318d59a2c7fd3d07c465da350c7d3b65dd8f4934 | 91d1a6968b90d9d461e9a2ece12b465486e3ccc2 | /ivs_write_f/playback-key-pair_import.py | e6227c4b54f4786793a1d735b01d2cf516e72ad9 | [] | 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 | 773 | 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 write_parameter
# url : https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-instances.html
if __name__ == '__main__... | [
"[email protected]"
] | |
4cdb8d4ce152583225c607c387d527a82eced8d3 | 7c9707f0f1cb8e633ac605934f3dbd8036790868 | /projet/rpi_manager/models.py | f61c7c196096c5f2351a5ccd5919b2269e0b3f2e | [] | no_license | ometeore/hydropo | 891e1abd4c1b8ccd0a3b27a043abf894b70ceb5b | 324076d4b7ddbd14e718c424eb24d129c2a2243c | refs/heads/master | 2023-06-14T08:35:55.838469 | 2021-07-04T16:28:09 | 2021-07-04T16:28:09 | 290,198,666 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,146 | py | from django.db import models
from django import forms
from datetime import datetime
from channels.layers import get_channel_layer
from asgiref.sync import async_to_sync
class Rpi(models.Model):
name = models.CharField(max_length=200)
uid_name = models.CharField(max_length=200)
last_connect = models.DateTi... | [
"[email protected]"
] | |
6d21cd382eeb98e10bb5bc8a2a202726211def5f | ce6ace34704e74c2a53e9b38b2630876d9cd52e2 | /mdias_addons/metro_park_maintenance/models/day_plan_limit.py | 8f25985b0d5a8f7e281a0c359a8c74c657e8ef34 | [] | no_license | rezaghanimi/main_mdias | e3cfd8033204d8e7e484041f506892621a3e3479 | 13b428a5c4ade6278e3e5e996ef10d9fb0fea4b9 | refs/heads/master | 2022-09-17T20:15:42.305452 | 2020-05-29T05:38:35 | 2020-05-29T05:38:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 861 | py |
# -*- coding: utf-8 -*-
from odoo import models, fields, api
class DayPlanLimit(models.Model):
'''
日计划限制
'''
_name = 'metro_park_maintenance.day_plan_limit'
location = fields.Many2one(string='地点', comodel_name='metro_park_base.location')
max_repair_after_high_run = fields.Integer(string='高峰... | [
"[email protected]"
] | |
f23d62dafdbb77a295d93ac632a4441e517a6c10 | c92d5b8509f23444622529aa24d4bc85bf1d3c9f | /main/question47/book1.py | 44b832b082eb8ed9403996e4f3f5e5ee8a3f4ad1 | [] | no_license | qcymkxyc/JZoffer | 75dfb747394018f14552f521413b01a5faa9c07f | 28628616589061653a8322d5b400f9af32f2249d | refs/heads/master | 2021-07-15T00:53:00.711360 | 2019-02-10T03:16:52 | 2019-02-10T03:16:52 | 149,714,958 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 926 | py | #!/usr/bin/env python
# _*_coding:utf-8_*_
"""
@Time : 19-1-24 上午10:58
@Author: qcymkxyc
@File: book1.py
@Software: PyCharm
"""
def max_value(matrix):
"""
动态规划
:param matrix: List[List[int]]
矩阵
:return: int
最大值
"""
n_row, n_col = len(matrix), len... | [
"[email protected]"
] | |
5802eeeb0ab8d6f8d89deb95c876c1ac27840b2a | 4fc9cb4cf01e41c4ed3de89f13d213e95c87dd33 | /angr/procedures/definitions/win32_wdsclientapi.py | dcbb07c74c314d0c5708a98cc0f55187713044fc | [
"BSD-2-Clause"
] | permissive | mborgerson/angr | ea5daf28576c3d31b542a0e229139ab2494326e9 | 8296578e92a15584205bfb2f7add13dd0fb36d56 | refs/heads/master | 2023-07-24T22:41:25.607215 | 2022-10-19T19:46:12 | 2022-10-20T18:13:31 | 227,243,942 | 1 | 2 | BSD-2-Clause | 2021-04-07T22:09:51 | 2019-12-11T00:47:55 | Python | UTF-8 | Python | false | false | 14,784 | py | # pylint:disable=line-too-long
import logging
from ...sim_type import SimTypeFunction, SimTypeShort, SimTypeInt, SimTypeLong, SimTypeLongLong, SimTypeDouble, SimTypeFloat, SimTypePointer, SimTypeChar, SimStruct, SimTypeFixedSizeArray, SimTypeBottom, SimUnion, SimTypeBool
from ...calling... | [
"[email protected]"
] | |
8168b5bf889b97e447da255e86d69e116f571d47 | c8975f8bbe32637399a3ca00ad21e8e6602e358d | /aoc/year2021/day14/day14.py | bf40f0314c32c659180cf4eaa5ae69c3475ea98d | [
"Unlicense"
] | permissive | Godsmith/adventofcode | 0e8e0beb813300206b2810b523b54a6c40ca936f | 3c59ea66830f82b63881e0ea19bfe3076f2a500d | refs/heads/master | 2021-12-28T13:05:42.579374 | 2021-12-26T22:19:55 | 2021-12-26T22:24:01 | 225,074,419 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 977 | py | from collections import Counter
from aocd import get_data
from more_itertools import pairwise
def run(data, iterations):
new_element_from_pair = {tuple(line.split(" -> ")[0]): line.split(" -> ")[1] for line in data.splitlines()[2:]}
new_pairs_from_pair = {(e1, e2): [(e1, inserted), (inserted, e2)] for (e1, e... | [
"[email protected]"
] | |
f32d24f9fdb32d8eb2a1eef5c82ae7102d01c864 | cc5f2ee6a5de6faf141f10b1b10717243821a0a5 | /problems/problem 106.py | e9b15f310b5e23ecf09e8a1864e6f1ea2dd3f449 | [] | no_license | alexandrepoulin/ProjectEulerInPython | faf634025c86bc74fc764d315813bf1706e58f63 | 97cb52cdd7508f2db891d1644e3d247814571718 | refs/heads/master | 2020-04-22T11:47:04.594328 | 2019-02-16T00:17:40 | 2019-02-16T00:17:40 | 170,341,883 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 793 | py | print("Starting")
import useful
## only need to check subset pairs which have the same number of elements
## there are useful.nChooseK(n,s)*useful.nChooseK(n-s,s)*0.5 such pairs
## for a specific subset, we only need to look at pairs which have interweining elements
## such as (1,3)(2,4)
## number of times th... | [
"[email protected]"
] | |
3cd515eca280170fe3a32456a2936ef77006c086 | 286b6dc56323f982092ffafbfac8a32dbbaeb7ef | /Day_09/sample_pyvmomi.py | 10033c34292fb7b9d33af55fc34b5e48284d85bb | [] | no_license | learndevops19/pythonTraining-CalsoftInc | ccee0d90aadc00bfdb17f9578620f6bf92f80a4c | c5f61516b835339b394876edd1c6f62e7cc6f0c3 | refs/heads/master | 2021-02-05T04:27:17.590913 | 2019-11-20T17:27:06 | 2019-11-20T17:27:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,761 | py | import ssl
from pyVim import connect
from pyVmomi import vim
def connectVcenter(vCenterHost, username, password, portNum=443):
"""
Description : Performs vCenter connection.
Parameters : vCenterHost - vCenter server ip address (STRING)
username - vCenter server username (STRING)
... | [
"[email protected]"
] | |
aaf684914f88ee47e002fe6283aad1328b10f3ad | 6cce023315d4083c7df0fcdeea2a037b00818878 | /py-files/data_setup.py | 3a1efa85492db400854022be0137e9d4defafa58 | [] | no_license | Limmen/Distributed_ML | e02e865a123e552d3795c76a4a0846f2da6f3a55 | d5b65a0bcb89182e3ac773b0a3cec46625dabccb | refs/heads/master | 2021-05-09T03:52:41.530823 | 2018-01-28T12:21:47 | 2018-01-28T12:21:47 | 119,255,519 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,735 | py |
import argparse
import pyspark
from pyspark.sql.functions import udf
from pyspark.sql.types import *
import tensorflow as tf
import pandas as pd
import numpy as np
SEQ_LABELS_TRAIN = "data/y_train.csv"
SEQ_FEATURES_TRAIN = "data/x_train.csv"
SEQ_LABELS_TEST = "data/y_test.csv"
SEQ_FEATURES_TEST = "data/x_test.csv"
c... | [
"[email protected]"
] | |
df7e6169ccdea122ba78000885ec1008e3579ebd | bc539788b876773e294383863252c1637de9eb7f | /Pscrapy/PycharmProjects/Reptile/Practise/practise4.py | a3249cb05379978d945554dfcee685df198bd50c | [] | no_license | umsung/scrapy | 4eb56bf74f3e617e49dcdec61cf77010eb912f4f | deacd9f289159c5af114b0dd3110448ad7eb43e8 | refs/heads/master | 2020-05-31T14:11:46.530793 | 2019-10-16T01:32:25 | 2019-10-16T01:32:25 | 190,321,772 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 120 | py |
num = input('输入数字:').strip()
num = int(num)
for i in range(1, num):
print(' '*(num-i),'* '*i)
| [
"[email protected]"
] | |
a3abadf3e5c58d3196f6ac02b55a07ff35093bd4 | 16c77266859989d156fe3f4d0ce3a37a1898ad38 | /ml/sk/__init__.py | 2e9e9ccc69e32e7f29ce91893b4883b61084bc5d | [
"MIT"
] | permissive | SRHerzog/ut | 92620e66be2ea9707d9cd3cf390179326ed2eefe | 894bd5607eb76676aaea7a37ed8a91b5fb5e805e | refs/heads/master | 2021-06-30T19:15:46.131299 | 2017-09-15T20:47:35 | 2017-09-15T20:47:35 | 103,696,926 | 0 | 0 | null | 2017-09-15T20:08:10 | 2017-09-15T20:08:10 | null | UTF-8 | Python | false | false | 54 | py | from __future__ import division
__author__ = 'thor'
| [
"[email protected]"
] | |
8cf423d1f9f0257fa371e065ae2d57628aeedaf2 | ee4db47ccecd23559b3b6f3fce1822c9e5982a56 | /Analyse Data/NumpPy.py | d2bf919d8ad04f330f143dfea2c477d7387bd3ee | [] | no_license | meoclark/Data-Science-DropBox | d51e5da75569626affc89fdcca1975bed15422fd | 5f365cedc8d0a780abeb4e595cd0d90113a75d9d | refs/heads/master | 2022-10-30T08:43:22.502408 | 2020-06-16T19:45:05 | 2020-06-16T19:45:05 | 265,558,242 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,021 | py | # Introduction to NumPy: Numerical Python
#NumPy is great at storing and manipulating numerical data in arrays.
import numpy as np
# NumPy Arrays
#A NumPy array is a special type of list. It’s a data structure that organizes multiple items. Each item can be of any type (strings, numbers, or even other arrays).
test... | [
"[email protected]"
] | |
e1e458abdbc5777af32bf1194e4add3db39fd867 | 36b9fa9f2d8ff655546a33cb47ddacd009bc00c9 | /autogalaxy/profiles/light/linear/__init__.py | bb275334df92a6bf4b34d18f21e6aa123ae5dc62 | [
"MIT"
] | permissive | Jammy2211/PyAutoGalaxy | 67b76968b8516309b2ebdbff7affd5c1923cf0b1 | d1a2e400b7ac984a21d972f54e419d8783342454 | refs/heads/main | 2023-08-19T01:00:22.320073 | 2023-08-17T15:39:46 | 2023-08-17T15:39:46 | 216,190,501 | 27 | 9 | MIT | 2023-09-13T14:07:43 | 2019-10-19T10:45:44 | Python | UTF-8 | Python | false | false | 401 | py | from .abstract import LightProfile, LightProfileLinear, LightProfileLinearObjFuncList
from .gaussian import Gaussian, GaussianSph
from .moffat import Moffat
from .sersic import Sersic, SersicSph
from .exponential import Exponential, ExponentialSph
from .dev_vaucouleurs import DevVaucouleurs, DevVaucouleursSph
fro... | [
"[email protected]"
] | |
7a8252f05c1ee87e900b5ed853a3cabc43688b96 | 74081581575e80b2b0f6b75ba912d58ea4f37ac6 | /maskrcnn_benchmark/modeling/detector/detectors.py | 35064d2f9992fd2c2e08d4a29ad31d1e5a229f8f | [] | no_license | youngfly11/LCMCG-PyTorch | 5f6b9f231613b86ac7b250ca0f34229402e1615e | e95299b9a9f1b13e21750ef0dcde0941d703d009 | refs/heads/master | 2021-10-25T19:29:12.967318 | 2021-10-25T03:35:14 | 2021-10-25T03:35:14 | 221,908,808 | 56 | 12 | null | null | null | null | UTF-8 | Python | false | false | 419 | py | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
from .generalized_rcnn import GeneralizedRCNN
from .generalized_rcnn_det import GeneralizedRCNNDet
_DETECTION_META_ARCHITECTURES = {"GeneralizedRCNN": GeneralizedRCNN, "GeneralizedRCNNDet": GeneralizedRCNNDet}
def build_detection_model(cfg):
... | [
"[email protected]"
] | |
cbf3083dd8ea5ae4718b4b154ac624468f4e7c15 | 68b23f776fddb77de735419cbf30f33a49e9def2 | /backend/terminus/home/urls.py | 501046c917470aac71074c89c9f1d1a75f5cceac | [] | no_license | vash512/terminus | cbd00f74a600a13fd52aa2206c3eb1e7b5301ec7 | 4eb86d853bc76c22cd1af3c86fed1bc10d457c88 | refs/heads/master | 2016-09-05T14:49:42.655635 | 2015-07-09T03:34:38 | 2015-07-09T03:34:38 | 32,414,141 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,155 | py | # -*- coding: utf-8 -*-
from django.conf.urls import patterns, include, url
from django.views.generic import TemplateView
urlpatterns=patterns('home.views',
url(r'^$', 'index_view', name='index'),
url(r'^humans.txt$', TemplateView.as_view(template_name='statics/humans.txt', content_type='text/plain; charset=utf-... | [
"[email protected]"
] | |
a05385930991319e2dc5ebf3029f337f10410b3a | ffba5c4a64a87214160c5904b220be8a6e88cd58 | /python-packages/maizy_f/r.py | 5e83d68deeca516eed184231752129e90e707f19 | [] | no_license | maizy/dev-setup | 6e8ae5bc9b56dd85f7612b453e92e31043816189 | 5eb8473cf9c66c66ff8fd9e8c72cecf931f62494 | refs/heads/master | 2022-11-13T22:08:00.184435 | 2022-11-13T08:33:25 | 2022-11-13T08:33:25 | 7,286,016 | 2 | 0 | null | 2017-12-22T11:57:00 | 2012-12-22T13:20:57 | Python | UTF-8 | Python | false | false | 361 | py | # coding: utf-8
# Copyright (c) Nikita Kovaliov, maizy.ru, 2013
from __future__ import print_function, absolute_import, unicode_literals
from fabric.api import task, run
@task
def info():
run('uname -a')
run('hostname')
lsb_rel = run('which lsb_release')
if lsb_rel != '':
print('Debian like ... | [
"[email protected]"
] | |
9290a1f679623cb6793f2eaef635da4b4689e597 | 6fce025097cebfd9d1dd37f6611e7fdfdbea90e6 | /rainfields/model_conv.py | 8a22d603ee800aed0a84aee26d7728f6111a7b66 | [] | no_license | ANU-WALD/pluvi_pondus | ec0439d19acdcf4fdf712d6b14a1714297d661b2 | ff8680f7115ab2cb75138bf6705abb59618e47d1 | refs/heads/master | 2021-07-01T14:32:14.501631 | 2020-08-22T09:41:28 | 2020-08-22T09:41:28 | 138,804,652 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,287 | py | from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Conv2D, Flatten
from tensorflow.keras.optimizers import Adam, SGD
import numpy as np
x = np.load("x_conv.npy")[:10000000]
print(x.shape)
y = np.load("y_conv.npy")[:10000000,None]
print(y.shape)
prec_mask = np.nonzero(y>0)
print... | [
"[email protected]"
] | |
53b09cda44362a8837373232a16c18428dcb871d | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02585/s497439083.py | c64c92fb3dffd1704057e5332cba0a7d2217f5e0 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,416 | py | n,k = map(int,input().split())
P = list(map(int,input().split()))
C = list(map(int,input().split()))
g = [[0]*(n) for _ in range(n)]
A = [n]*n
# for i in range(n):
# tmp = 0
# idx = i
# cnt = 0
# set_ =set()
# while cnt<n:
# if C[idx] not in set_:
# tmp += C[idx]
# se... | [
"[email protected]"
] | |
9a79bc2d121ab5020b5787e81900966444fc6e38 | 76fefdb20c453e830b8db86f32a1b42d79108cdd | /venv/bin/django-admin.py | a02fc84b3fe69bf065a0bd2537f44fe524e8d4d0 | [] | no_license | Belie06Loryn/chaty-final-master | 35f6762e9bf45e1086db6280cd0bd7dc0828fb96 | 86e839c069eb54dad3390e84c6b7534d165a3942 | refs/heads/master | 2022-12-09T14:31:19.478090 | 2019-12-08T16:00:45 | 2019-12-08T16:00:45 | 226,365,156 | 0 | 0 | null | 2022-12-08T06:59:44 | 2019-12-06T16:08:51 | Python | UTF-8 | Python | false | false | 166 | py | #!/home/alexie/Documents/chaty-final-master/venv/bin/python
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| [
"[email protected]"
] | |
5f28d3473174758f29072135291cc13603f342ab | 94bb77d0847df86ead773650cf4aa0885ed3ad4e | /dappcrowd/restapi/submissions_endpoint.py | d2fb9fe38acbfc271ba77225c557ec7a4ae17f5a | [] | no_license | Tribler/dappcoder | 3766f0b252ac38d889ad3596b5b6335669d31100 | 8ae43d51a284929bc081c87debc9ef003d1f9116 | refs/heads/master | 2020-04-01T07:53:38.236183 | 2019-01-17T13:07:53 | 2019-01-17T13:07:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,196 | py | import json
from twisted.web import http
from twisted.web.server import NOT_DONE_YET
from dappcrowd.restapi.root_endpoint import DAppCrowdEndpoint
class SubmissionsEndpoint(DAppCrowdEndpoint):
def render_GET(self, request):
"""
Get all submissions.
"""
dappcrowd_overlay = self.g... | [
"[email protected]"
] | |
b4b798b4b5b230c3088019cf13bf6acb5fe54680 | 95d4c8f4cda7ad1c7623a2df02da8cee1ad0941d | /src/classifier/german_pos_tagger.py | a66192956c55f524f2b1142c45afdf0df24c1383 | [
"MIT"
] | permissive | tiefenauer/ip7-python | 8f587b7b77430facff19b24441490756b01d5b17 | 512105ba39110ec77d2ea0961dd7c2a42d4ec26d | refs/heads/master | 2021-09-09T20:37:21.647146 | 2018-02-20T12:07:46 | 2018-02-20T12:07:46 | 107,635,390 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,382 | py | # -*- coding: utf-8 -*-
#
# Natural Language Toolkit: ClassifierBasedGermanTagger
#
# URL: <http://www.experimentallabor.de/>
#
# Copyright 2011 Philipp Nolte
#
# 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... | [
"[email protected]"
] | |
73b8eea0e247cc2fb5986af3fd0beca8578749f2 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /E9FwvGyad5CDbiH4C_9.py | d750b3eefe4c93d1c5db878cb337dcc042cf9e95 | [] | 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 | 1,348 | py | """
Create a function that takes a 2D array as an argument and returns the number
of people whose view is blocked by a tall person. The concert stage is pointed
towards the top of the 2D array and the tall person (represented by a 2)
blocks the view of all the people (represented by a 1) behind them.
### Examples
... | [
"[email protected]"
] | |
2d4b29a8afb8ba840c0c97a4e5296c98779b4382 | 1f696631898e0279951709e150da6d87045e4bc4 | /mysite/blog/migrations/0003_auto_20201018_1329.py | 55a90dffcfe644d3983ed6e04e389fcac44cd412 | [] | no_license | henryfrstr/django_project_blog | 9f50b004b2fed59304c3f5a1f05247d44a232992 | 0f3c391a3cd790ae504fb84a786158a1d775abda | refs/heads/main | 2022-12-31T05:05:20.989719 | 2020-10-25T11:26:27 | 2020-10-25T11:26:27 | 305,067,579 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 357 | py | # Generated by Django 3.0.8 on 2020-10-18 10:29
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('blog', '0002_auto_20201018_1327'),
]
operations = [
migrations.RenameField(
model_name='post',
old_name='titles',
... | [
"[email protected]"
] | |
10177a53490eb98107c90432833b44de0dc5241f | 36e3d735e06d0642f1e8c26bff57305a01cc627c | /nms/priClient/settings.py | 70dc9c3a439ae7865ae186e64032e891229bbeb1 | [] | no_license | WilsonWangTHU/ipv6_server | 5c768cdaeaf22ee508c5fff162b208481a42f95d | 5088f58ab25061e65127699ed328ddaab24f9aac | refs/heads/master | 2021-01-18T21:18:39.653994 | 2016-05-27T04:22:23 | 2016-05-27T04:22:23 | 55,656,523 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,819 | py | """
Django settings for subClient project.
Generated by 'django-admin startproject' using Django 1.9.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os
... | [
"[email protected]"
] | |
ee692b4e30708d7c40cc7efe0f041f668c08dcb4 | f63314b4852fb97ad740e53e450110fcd08a515b | /app.py | ce08afaac1bc0e74d4fe1216c543d83672b30fd1 | [] | no_license | xsomam/askfm-scrapper | ee0e2c4439d5be3e4ebd7fceb27d01fbff3aa4da | 2e997268f40cd37dfc56bc7adc496d609106b327 | refs/heads/master | 2023-04-09T03:45:56.074797 | 2020-08-07T23:48:31 | 2020-08-07T23:48:31 | 384,990,560 | 0 | 0 | null | 2023-03-17T21:32:19 | 2021-07-11T15:56:16 | null | WINDOWS-1250 | Python | false | false | 7,611 | py | # Basic imports
import os
import time
import json
import logging
# Modules imports
import requests
from bs4 import BeautifulSoup
# Imports from files
from answer import SinglePost
from locators import *
logging.basicConfig(format='%(asctime)s %(levelname)-8s [%(filename)s:%(lineno)d] %(message)s',
... | [
"[email protected]"
] | |
023d1d8dece7491ac60d165dac3295008bf0a004 | 6109a95a284891792c35d0d19906ab8d1697f9c7 | /src/k8s-configuration/azext_k8s_configuration/vendored_sdks/v2021_05_01_preview/aio/operations/_operations.py | 3c82397333fb155b013c9017f213f97b26d8e9e6 | [
"MIT",
"LicenseRef-scancode-generic-cla"
] | permissive | Tatsinnit/azure-cli-extensions | 3e5a1752edced00d7c33660027d2c17fae074569 | a1959b123d4c11149adae2728ab5791949889d54 | refs/heads/master | 2022-10-05T17:40:10.825889 | 2022-03-16T10:33:56 | 2022-03-16T10:33:56 | 250,102,909 | 0 | 0 | MIT | 2020-03-25T22:12:01 | 2020-03-25T22:12:01 | null | UTF-8 | Python | false | false | 4,949 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | [
"[email protected]"
] | |
cee01a1f512e64d11d177b39003a6d66c4c62798 | f375899369ba86aed1da89101c31817168ffec40 | /cinema/urls.py | f73d16e3686a88eb9e7b40b41d324fb2021b3100 | [] | no_license | sheremilbekov/cinema | f596a7d1e41f03161a3ddf0c3594f39619c812df | d8baac5c7e25a90340a35e1e0b0cce093014f965 | refs/heads/master | 2023-03-30T10:19:20.654540 | 2021-04-07T12:10:54 | 2021-04-07T12:10:54 | 354,850,726 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 941 | py | """cinema 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 ... | [
"[email protected]"
] | |
c3a87e73a1c9e46f95c2c5bbf037974632f09470 | 747f759311d404af31c0f80029e88098193f6269 | /addons/esale_joomla/__terp__.py | 0b9ba5da767aab77ff4bccd6f9b18701e5bdec38 | [] | no_license | sgeerish/sirr_production | 9b0d0f7804a928c0c582ddb4ccb7fcc084469a18 | 1081f3a5ff8864a31b2dcd89406fac076a908e78 | refs/heads/master | 2020-05-19T07:21:37.047958 | 2013-09-15T13:03:36 | 2013-09-15T13:03:36 | 9,648,444 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 62 | py | /home/openerp/production/extra-addons/esale_joomla/__terp__.py | [
"[email protected]"
] | |
16effac639ce13ca5ccf22f2cfad0658eac06638 | 547ba955855ff623a8ef6e80fcfaddebadf34bed | /Chapter08/B06246_08_14-slope.py | a5a8f6c01c4af2755f280d506db81016afd04122 | [] | no_license | CodedQuen/QGIS-Python-Programming-Cookbook | 94a36d265d0336d5bb36ac02d637ba17ee765b04 | f84e0159f7c8ec81a29573a7fd2e03b046efce33 | refs/heads/master | 2022-05-28T05:04:35.053121 | 2020-05-05T09:44:50 | 2020-05-05T09:44:50 | 261,414,871 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,009 | py | # Computing Road Slope using Elevation Data
# https://github.com/GeospatialPython/Learn/raw/master/road.zip
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import processing
dem = "/qgis_data/road/dem.asc"
road = "/qgis_data/road/road.shp"
slope = "/qgis_data/road/slope.tif"
segRoad = "/qgis_data/roa... | [
"[email protected]"
] | |
9620af649f65a0c0002935d9e24ea87dd7578b35 | b0cdab54c5e81681125c01801148c287605ee8d0 | /speciality/migrations/0005_auto_20181228_2150.py | ad4d5210ff776dbc55eeccf74f5266e8a064ed44 | [] | no_license | lpd76/rdavid2 | 5528746749acc51d4d0f5efd77886929798e2569 | 18aa5120fe4ba0ea44f611dd52b008db52641f17 | refs/heads/master | 2020-04-13T20:47:58.141579 | 2019-01-17T16:51:31 | 2019-01-17T16:51:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 637 | py | # Generated by Django 2.1.4 on 2018-12-28 21:50
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('speciality', '0004_auto_20181228_2140'),
]
operations = [
migrations.AlterModelOptions(
name='s... | [
"[email protected]"
] | |
b68987bce2f40abf5a5b3be0d046f49f02354bc8 | 650f9e246de38d0ceaee8726f27801f3337e24ce | /string-trainer/simple/csimple.py | 7d3e49c4a22d4dd82a8951120a8f4e6961a58054 | [
"MIT"
] | permissive | paulscottrobson/old-trainer-archive | 57b6fbb5886e5fe526c37f40b7fb9c179176bce7 | b3659d3f36b7443594202e0ae9439e80e493a22c | refs/heads/master | 2021-01-20T02:46:44.751050 | 2017-04-26T07:26:34 | 2017-04-26T07:26:34 | 89,451,106 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,861 | py | # *****************************************************************************************
#
# Simple compiler for TAB1 format
#
# *****************************************************************************************
import re,sys
# ************************************************************************... | [
"[email protected]"
] | |
10252106e1b1114e8e4adf56f12d670ac5aee1e0 | 397c9e2743c41cf591692c4fc37f43a9070119bd | /build/env/lib/python2.7/site-packages/SQLAlchemy-1.2.0b3-py2.7-linux-x86_64.egg/sqlalchemy/cutils.py | a62e8adc17fa043f78d6b8b32d3c703fd2682408 | [
"Apache-2.0"
] | permissive | bopopescu/myhue | cf41238c782d12b3a1a0ee9ef70196359bb67894 | 5f566970a5a1fa5af9f01832c9e9808c47634bc7 | refs/heads/master | 2022-11-18T05:37:24.467150 | 2019-11-23T16:16:22 | 2019-11-23T16:16:22 | 282,390,507 | 0 | 0 | Apache-2.0 | 2020-07-25T07:03:40 | 2020-07-25T07:03:39 | null | UTF-8 | Python | false | false | 282 | py | def __bootstrap__():
global __bootstrap__, __loader__, __file__
import sys, pkg_resources, imp
__file__ = pkg_resources.resource_filename(__name__, 'cutils.so')
__loader__ = None; del __bootstrap__, __loader__
imp.load_dynamic(__name__,__file__)
__bootstrap__()
| [
"[email protected]"
] | |
93c4453f26512207811cdba404053b9a07b2e9c1 | b68887f55cfcd0225d732acfbfcc7f3724e49d5d | /pages/factories.py | a59431ddc5e91da1966fb1ba58c8d6ad49dcbfb0 | [
"MIT"
] | permissive | rds0751/nhsuk-content-store | 0ac7eb06f85cc97cd57e58a3f24e19db9991a8a2 | 7bd6a386e3583779ddba2347a4b3a80fdf75b368 | refs/heads/master | 2020-04-19T08:53:54.273378 | 2019-01-29T05:08:18 | 2019-01-29T05:08:18 | 168,092,530 | 0 | 0 | null | 2019-01-29T05:05:33 | 2019-01-29T05:05:33 | null | UTF-8 | Python | false | false | 1,515 | py | import factory
from home.factories import HomePageFactory, ParentBasedFactory
from . import models
class ConditionsPageFactory(ParentBasedFactory, factory.django.DjangoModelFactory):
title = 'Conditions'
slug = 'conditions'
path = '000100010002'
depth = 3
_ParentFactory = HomePageFactory
_u... | [
"[email protected]"
] | |
93f72136ac32eeb64dafcf570b2025f0c7a8aca7 | a51b2cfd2fcfce0e800fba591efb675d7e83da61 | /src/multi_gpu_train.py | 6bb22be2ec00116833cd6539d7ba2be1e6fb2546 | [] | no_license | yyht/tf-center-loss | a3c4164b9de151b970ec3efaf38f79609e1f8f34 | 5cdcb638f1cec355f1938bf3a646338596bc21ef | refs/heads/master | 2020-05-05T08:05:36.618949 | 2018-08-05T04:29:33 | 2018-08-05T04:29:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,137 | py | # auther : lxy
# time : 2017.12.15 /09:56
#project:
# tool: python2
#version: 0.1
#modify:
#name: center loss
#citations: https://github.com/ydwen/caffe-face
#############################
import numpy as np
import tensorflow as tf
from read_tfrecord_v2 import read_single_tfrecord
from net import *
from Center_loss_cust... | [
"[email protected]"
] | |
6acd9d44dc1191828b5807335b648d30c0e9194d | 0eda43d797abfc69ad28000b3c3599af44049bdf | /setup.py | 21f2ea356d1b8e4b3e0b98a7bd61d346e529cf0b | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | biomodels/BIOMD0000000048 | d8d23b0491ac80e27692b6e115b9884ee46397d6 | 6d17577fdde45ed5c0ec8457eacb860458e30215 | refs/heads/master | 2021-01-18T14:19:32.446581 | 2014-10-16T05:18:50 | 2014-10-16T05:18:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 377 | py | from setuptools import setup, find_packages
setup(name='BIOMD0000000048',
version=20140916,
description='BIOMD0000000048 from BioModels',
url='http://www.ebi.ac.uk/biomodels-main/BIOMD0000000048',
maintainer='Stanley Gu',
maintainer_url='[email protected]',
packages=find_packages(... | [
"[email protected]"
] | |
a03f688cd3bb6ceef3f26b749170bc2c0ac710d7 | 82770c7bc5e2f27a48b8c370b0bab2ee41f24d86 | /microblog/flask/venv/lib/python2.7/site-packages/billiard/forking.py | 57fc9795e47d83e6c656232b9ddde88438c6ec12 | [
"Apache-2.0"
] | permissive | johankaito/fufuka | 77ddb841f27f6ce8036d7b38cb51dc62e85b2679 | 32a96ecf98ce305c2206c38443e58fdec88c788d | refs/heads/master | 2022-07-20T00:51:55.922063 | 2015-08-21T20:56:48 | 2015-08-21T20:56:48 | 39,845,849 | 2 | 0 | Apache-2.0 | 2022-06-29T23:30:11 | 2015-07-28T16:39:54 | Python | UTF-8 | Python | false | false | 17,515 | py | #
# Module for starting a process object using os.fork() or CreateProcess()
#
# multiprocessing/forking.py
#
# Copyright (c) 2006-2008, R Oudkerk
# Licensed to PSF under a Contributor Agreement.
#
from __future__ import absolute_import
import os
import sys
import signal
import warnings
from pickle import load, HIGHE... | [
"[email protected]"
] | |
47f0abfaceb11e660d4f305e745db7fe9fee819f | da84fa23cc4cf2e81e50892085ac162508bff155 | /nestris_ocr/capturing/linux/linux_mgr.py | 6381209b8dd85f1880aca2b7eb9cbc653ec9f0cd | [] | no_license | alex-ong/NESTrisOCR | 83ddaba55b100f0ee20e924731459e547e321887 | 488beeb30e596ccd0548152e241e1c6f772e717b | refs/heads/master | 2023-01-10T08:02:41.702538 | 2021-07-07T06:33:39 | 2021-07-07T06:33:39 | 169,196,192 | 25 | 8 | null | 2022-12-27T15:37:40 | 2019-02-05T05:44:34 | Python | UTF-8 | Python | false | false | 1,202 | py | import Xlib
import Xlib.display
from Xlib import X
class WindowMgr:
"""Encapsulates some calls for window management"""
def __init__(self, hwnd=None):
self.handle = hwnd
def checkWindow(self, hwnd):
"""checks if a window still exists"""
return hwnd
def getWindows(self):
... | [
"[email protected]"
] | |
11065362a8ac77972c519aadeae585300bb5085d | 7bededcada9271d92f34da6dae7088f3faf61c02 | /pypureclient/flasharray/FA_2_25/models/active_directory_get_response.py | ee529854e041a3ff612ccf174315845d4e2c49ef | [
"BSD-2-Clause"
] | permissive | PureStorage-OpenConnect/py-pure-client | a5348c6a153f8c809d6e3cf734d95d6946c5f659 | 7e3c3ec1d639fb004627e94d3d63a6fdc141ae1e | refs/heads/master | 2023-09-04T10:59:03.009972 | 2023-08-25T07:40:41 | 2023-08-25T07:40:41 | 160,391,444 | 18 | 29 | BSD-2-Clause | 2023-09-08T09:08:30 | 2018-12-04T17:02:51 | Python | UTF-8 | Python | false | false | 5,613 | py | # coding: utf-8
"""
FlashArray REST API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.25
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re
import six
import typing
from ... | [
"[email protected]"
] | |
e0cf8c5298a8ee4e8a3b21eb3b1fe65504c3047e | 204ec78fcebcea9e1e1da4905cf3fad0a514b01f | /test/unit/test_timeout.py | 4990b87aad1b2d40888f75acc3481c349d3eb4e0 | [
"Apache-2.0"
] | permissive | ARMmbed/pyOCD | 659340bf8753aa8e15a72890b8bea64dff2c2f42 | d4cdcf7e532cae17caad866839287bbe1e0d952b | refs/heads/master | 2023-05-31T13:45:15.797588 | 2020-10-12T13:55:47 | 2020-10-12T13:55:47 | 190,203,829 | 3 | 1 | Apache-2.0 | 2019-07-05T11:05:40 | 2019-06-04T13:09:56 | Python | UTF-8 | Python | false | false | 1,942 | py | # pyOCD debugger
# Copyright (c) 2017-2019 Arm Limited
# SPDX-License-Identifier: Apache-2.0
#
# 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... | [
"[email protected]"
] | |
f158c6821e350e490fa25d9eda4fc880f01fe9d0 | 6e2dc82bcfbc420ce6fd8e890f9f254e8e594902 | /www/cursivedata/migrations/0005_auto__add_field_pipeline_anim_loop.py | 92063d7e04206acf824ce406bdbd7eabe0b2d325 | [
"CC-BY-4.0"
] | permissive | mattvenn/cursivedata | 8ea86bde4a58a5678b1116953d17f0ae3600daf6 | 43e43263bef6f01698166d87bcff00b246957277 | refs/heads/master | 2021-01-17T08:06:38.715586 | 2016-07-22T16:04:10 | 2016-07-22T16:04:10 | 5,599,674 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,340 | py | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Pipeline.anim_loop'
db.add_column('cursivedata_pipeline',... | [
"[email protected]"
] | |
4a1c309a93de9647a0f1adc90e88ad9c8624b3be | 2b8c88dfee5c5a784357515eafe8cd5f997c8774 | /leetcode/dynamic_programming/code-84.py | 1b9e7013a5652e79e6603e09d069daf7eb6aa134 | [] | no_license | archenRen/learnpy | e060f3aa2f77c35fc1b12345720af6c8b528da57 | 934ef76b97297f746a722a48c76672c7bc744cd9 | refs/heads/master | 2022-04-28T20:25:59.114036 | 2020-05-03T02:16:03 | 2020-05-03T02:16:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,187 | py |
# This is a TLE solution.
def largestRectangleArea2(heights: 'List[int]') -> int:
n = len(heights)
max_val = 0
for i in range(n):
min_val = heights[i]
max_val = max(max_val, min_val)
for j in range(i-1, -1, -1):
min_val = min(heights[j], min_val)
max_val = m... | [
"[email protected]"
] | |
610ac8671393a3cc93c8ac2f5fb7cbe982e9e849 | 96090102d5e87f1771ba5a90f7b676f4ccb0afa6 | /src/profiles/forms.py | ef4d8adbf95e2f2acf6f725493fe0bef6afcef2b | [] | no_license | rahulsayon/SocialWedding | b4b37ad69b89236784c6fb983ab27b4cd2e4266e | ab96b6a5d381936463065e75f74d0c8ffd3b1907 | refs/heads/master | 2022-12-18T15:08:39.380348 | 2020-09-27T14:49:40 | 2020-09-27T14:49:40 | 299,053,233 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 197 | py | from django import forms
from . models import Profile
class ProfileModalForm(forms.ModelForm):
class Meta:
model = Profile
fields = [ 'first_name','last_name','bio','avatar' ] | [
"[email protected]"
] | |
ffd4ff39507434f06cbbc5a0767aeadf66cdf5a4 | 2bdedcda705f6dcf45a1e9a090377f892bcb58bb | /src/main/output/idea/party/issue/line_friend/group_lot_guy_lombok_kind/door/oauth.py | 555d4e970019c6d7f81128a63b321c2efb7bdedb | [] | no_license | matkosoric/GenericNameTesting | 860a22af1098dda9ea9e24a1fc681bb728aa2d69 | 03f4a38229c28bc6d83258e5a84fce4b189d5f00 | refs/heads/master | 2021-01-08T22:35:20.022350 | 2020-02-21T11:28:21 | 2020-02-21T11:28:21 | 242,123,053 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,672 | py | const request = require('request')
const uuidv4 = require('uuid/v4')
const { LimitReachedError } = require('./errors')
const ITEMS_IN_REQUEST_LIMIT = 25
const REQUEST_CHAR_LIMIT = 5000
const CHAR_PER_HOUR_LIMIT = 2000000
// const subscriptionKey = process.env.TRANSLATOR_TEXT_KEY;
// if (!subscriptionKey) {
// throw... | [
"[email protected]"
] | |
7094d4bbe7a500eb46faa9fac35c316ada1389af | 77fc5af96da1d461c86c7f9668b64b99ca04a1b6 | /codes/horner.py | 4458f960d38c57f60ba6940082b190afccdbd331 | [] | no_license | rene-d/edupython | 5b6bc8ddb5eb8ec896ee70fb961d4e689af1075a | 1261d0c7aae17bb2d4ff3370860768b73ba4172d | refs/heads/master | 2020-11-24T10:07:18.504472 | 2019-12-21T21:03:08 | 2019-12-21T21:03:08 | 228,099,675 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 425 | py | # Méthode de Hörner
# https://edupython.tuxfamily.org/sources/view.php?code=horner
# Créé par IANTE, le 12/07/2011
from lycee import *
P=liste_demande('entrez les coefficients de P(x) par ordre des puissances croissantes')
r=demande('Entrez une racine évidente')
Q=[0]*(len(P)-1)
v=0
for d in range(len(P)-2,-1,-1):
... | [
"[email protected]"
] | |
39d5e277eb935eee8876c1af0b0557edcf5f6b91 | 146012dda21ab72badad6daa8f98e6b26fedb128 | /13day/9-名片系统.py | c647a413c352cb726036cb58e94329648c26b284 | [] | no_license | fengshuai1/1805 | 41786c3561beca580ba82d9e9d4347571e38e198 | 8dc3e6605cc1d6f91685ae45bfebfc062f0aa489 | refs/heads/master | 2020-03-19T07:41:40.608389 | 2018-06-28T01:45:43 | 2018-06-28T01:45:43 | 136,140,329 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,124 | py | list = []#存放名字
print("名片管理系统".center(50,"*"))
while True:
print("1:添加名片".center(50," "))
print("2:查找名片".center(50," "))
print("3:修改名片".center(50," "))
print("4:删除名片".center(50," "))
print("5:打印名片".center(50," "))
num = int(input("请选择功能"))
if num == 1:
d = {}#空字典
while True... | [
"[email protected]"
] | |
c441941156bd0808bc93eb34a0c6ef9a076dbaee | 06164402e4a9c46a03d579175e588519dbd4048d | /experiments/experiments_gdsc/cross_validation/vb_nmf/linesearch_xval_vb.py | 013c70a9a0481ff098be2e4b97b6fb3098dc6e91 | [
"Apache-2.0"
] | permissive | XuanHeIIIS/BNMTF | 19547e36466ecee8d45fb0002d305ee6b7ba6c23 | 34df0c3cebc5e67a5e39762b9305b75d73a2a0e0 | refs/heads/master | 2020-03-27T12:47:58.375964 | 2018-06-10T10:22:19 | 2018-06-10T10:22:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,825 | py | """
Run the cross validation with line search for model selection using VB-NMF on
the Sanger dataset.
"""
import sys, os
project_location = os.path.dirname(__file__)+"/../../../../../"
sys.path.append(project_location)
import numpy, random
from BNMTF.code.models.bnmf_vb_optimised import bnmf_vb_optimised
from BNMTF.c... | [
"[email protected]"
] | |
72dde4d0cca5ada32dd37e6e36d79b7dc6680cba | 685e7dc080a383d12dd526a510a8f74c34ef2e71 | /tests/nonci/test_compare_pretrained.py | cf57a0df969679003ebcb54d6d1f3d881dc8170d | [
"MIT"
] | permissive | 18813055625/bert-for-tf2 | f1b86351675861ebe710bb4f94e99b89a639f83a | e71d108f0bd8c5af0c4e0b8427b144e996c02fdb | refs/heads/master | 2020-07-29T08:24:33.635201 | 2019-09-09T11:56:37 | 2019-09-09T11:56:37 | 209,729,589 | 0 | 1 | MIT | 2019-09-20T07:16:54 | 2019-09-20T07:16:53 | null | UTF-8 | Python | false | false | 8,706 | py | # coding=utf-8
#
# created by kpe on 27.Mar.2019 at 15:37
#
from __future__ import absolute_import, division, print_function
import unittest
import re
import os
import numpy as np
import tensorflow as tf
from tensorflow.python import keras
from tensorflow.python.keras import backend as K
import params
from bert i... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.