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
d29a348904016924e690b825b758b20f51d24b6e
e82ba9700d831ddc884928eb2cc04173075561e1
/torba/torba/client/baseheader.py
339dd5e54e13fed55e625d277b9ebe4c5d76b3f3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
raymondSeger/lbry-sdk
ee223d7fbfdd3495a66a457cfaf87e311eb22f44
bbc056eef066dfe35967b14f676b22792bbab40e
refs/heads/master
2022-02-04T11:58:03.309249
2019-07-19T15:26:50
2019-07-19T15:26:50
null
0
0
null
null
null
null
UTF-8
Python
false
false
7,851
py
import os import logging from io import BytesIO from typing import Optional, Iterator, Tuple from binascii import hexlify from torba.client.util import ArithUint256 from torba.client.hash import double_sha256 log = logging.getLogger(__name__) class InvalidHeader(Exception): def __init__(self, height, message):...
d9543dbbf9479d52cb98637c34019ef3f722181a
7db6c1865cf9102808824ff06cda747b6e572a21
/Python/Lib/ApiWsh/api/__init__.py
41aa17cca0eea053eef435c89f4e7a83a28b7316
[]
no_license
hyteer/testing
1f6cabc1d2b67faa4533e6ad7eb5be8c13d542c9
1d8b47b3bbb2daf00e4f15b5d18e86111ea4e113
refs/heads/master
2020-05-21T16:19:08.243676
2017-01-03T01:25:17
2017-01-03T01:25:17
60,914,071
0
0
null
null
null
null
UTF-8
Python
false
false
382
py
# encoding: utf-8 from init_session import InitSession from shop import Shop from common import Common from marketing import Marketing from utils import CommonUtils from product import Product from member import Member from wexin import Weixin __all__ = [ "InitSession", "Common", "Shop", "Marketing", ...
a6cfd0b621c47bbada59feb13b42ff40770c9170
c83e356d265a1d294733885c373d0a4c258c2d5e
/mayan/apps/announcements/views.py
8c1c80a96b85a9513f753a1ed3a35b6c541b84dc
[ "Apache-2.0" ]
permissive
TrellixVulnTeam/fall-2021-hw2-451-unavailable-for-legal-reasons_6YX3
4160809d2c96707a196b8c94ea9e4df1a119d96a
0e4e919fd2e1ded6711354a0330135283e87f8c7
refs/heads/master
2023-08-21T23:36:41.230179
2021-10-02T03:51:12
2021-10-02T03:51:12
null
0
0
null
null
null
null
UTF-8
Python
false
false
3,860
py
import logging from django.template import RequestContext from django.urls import reverse_lazy from django.utils.translation import ugettext_lazy as _ from mayan.apps.views.generics import ( MultipleObjectConfirmActionView, SingleObjectCreateView, SingleObjectEditView, SingleObjectListView ) from ...
38e00c28fd10a054e3f45b1869c473b5a80aff1c
57dfd89d63b3b52eed144653c8264d50fa9fba6e
/consolidacion/urls.py
ccb88f7779bde647146b0913aaa142b06376d955
[]
no_license
geovanniberdugo/siiom
c850620214a1a3b8b1fc83ab895c0601241da3b4
5e2b72aff7ac5e94a93b7575603114b4ea5f628a
refs/heads/main
2023-02-16T15:02:30.539674
2021-01-15T22:29:36
2021-01-15T22:29:36
330,036,242
0
0
null
null
null
null
UTF-8
Python
false
false
499
py
from django.urls import re_path from . import views app_name = 'consolidacion' urlpatterns = [ re_path(r'^asignar_grupo_visitas/$', views.asignar_grupo_visitas, name="asignar_grupo_visitas"), re_path(r'^visitas/nueva/$', views.CrearVisitaView.as_view(), name="crear_visita"), re_path(r'^visitas/editar/(?P<p...
8d8428dc37777f73a06a488c972c3fc9cb65d1a0
68cec278ee55799811b3fd9643c31bab4460457d
/honcho/test/integration/test_run.py
7195e979d11c6e3137f9562611c873eb0f1cb441
[ "MIT" ]
permissive
BoldBigflank/honcho
78d03da885172a14898bf2706ce14661c1c7047c
bbcb4d6b466c9008c85980307317603afd3bc101
refs/heads/master
2021-01-18T09:04:10.447029
2016-01-26T21:55:20
2016-01-26T21:55:20
50,392,809
0
0
null
2016-01-26T01:05:43
2016-01-26T01:05:43
null
UTF-8
Python
false
false
1,318
py
import sys import textwrap from ..helpers import TestCase from ..helpers import TestEnv python_bin = sys.executable script = textwrap.dedent(""" from __future__ import print_function import os import sys print(os.environ.get("ANIMAL", "elephant")) print("error output", file=sys.stderr) """) cla...
a39cb4a7ba8bcae6fe139e57c54bd5c6b056a517
f167dffa2f767a0419aa82bf434852069a8baeb8
/lib/youtube_dl/extractor/gigya.py
412178492fe1062ac83c554617034b6df61cbabd
[ "MIT" ]
permissive
firsttris/plugin.video.sendtokodi
d634490b55149adfdcb62c1af1eb77568b8da3f5
1095c58e2bc21de4ab6fcb67a70e4f0f04febbc3
refs/heads/master
2023-08-18T10:10:39.544848
2023-08-15T17:06:44
2023-08-15T17:06:44
84,665,460
111
31
MIT
2022-11-11T08:05:21
2017-03-11T16:53:06
Python
UTF-8
Python
false
false
677
py
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( ExtractorError, urlencode_postdata, ) class GigyaBaseIE(InfoExtractor): def _gigya_login(self, auth_data): auth_info = self._download_json( 'https://accounts.eu1.gigya.com/accounts.login',...
7b39b19ccd500ec83103a1e07e89e55b108079df
7a6e2a3492b6e237a70b12d75fd05b7a77472af3
/py/corePy/13.1_object_intrudce.py
7cc7f9937ce8aebe920253080fa91f4d7131c4bb
[]
no_license
timtingwei/prac
e44b7e4634a931d36ed7e09770447f5dba5f25e6
ae77fa781934226ab1e22d6aba6dba152dd15bfe
refs/heads/master
2020-05-21T17:53:07.144037
2017-10-10T14:55:52
2017-10-10T14:55:52
63,440,125
3
0
null
null
null
null
UTF-8
Python
false
false
2,305
py
#13.1_object_intrudce.py #/// instance and class class MyData(object): """" def __init__(self): self.x = 10 self.y = 20 """ pass mathObj = MyData() mathObj.x = 4 #/// x是实例特有的属性,不是类的属性,是动态的 mathObj.y = 5 print (mathObj.x + mathObj.y) #9 print (mathObj.x * mathObj.y) #20 #/// method cla...
691d455b00d64ff5f36b32c1a00b31fec450c885
b3ea7a2d723d432a65748e073cae25e83441580f
/dns_spoof.py
b1b224ca654ef3801acf63b08b9e01cf3b6380b1
[]
no_license
jcohen66/htools
7622aa90465abb674e8f413bab7686b26b6a99fd
ba8bef2a540e1c58772143b9d3446fd8c30eade7
refs/heads/master
2023-02-15T04:13:23.419561
2020-02-01T19:16:50
2020-02-01T19:16:50
233,474,276
0
0
null
2023-01-20T23:39:22
2020-01-12T23:24:49
Python
UTF-8
Python
false
false
1,143
py
#!/usr/bin/env python # iptables -I FORWARD -j NFQUEUE --queue-num 0 # iptables -I OUTPUT -j NFQUEUE --queue-num 0 # Must do when done: iptables fllush import netfilterqueue import scapy.all as scapy def process_packet(packet): scapy_packet = scapy.IP(packet.get_payload()) if scapy_packet.haslayer(scapy.DN...
e3ee32f2248a6378906588b43cc58abefa8e0771
28d5174b51d43ade5e57dc6498473e8029356b1a
/src/openfermion/transforms/_bravyi_kitaev.py
2dacc68b00b30341aa27575a0b971c01ba5b5301
[ "Apache-2.0", "LicenseRef-scancode-generic-cla" ]
permissive
Strilanc/OpenFermion
2b350ae7ea464460e1f422a59c8d7033dc5774ef
3a0a57b8b545acd2a2ff6b61e88f7c8a8a4437c8
refs/heads/master
2021-01-25T13:59:21.177659
2018-03-02T15:47:22
2018-03-02T15:47:22
123,639,421
1
0
null
2018-03-02T22:55:29
2018-03-02T22:55:28
null
UTF-8
Python
false
false
4,691
py
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distribu...
89c69e1d90ba66dd187d673e41bc6ef863d979f0
9efe15e39ffda8391abd5a63b95e441648ba57c2
/comments_service/app.py
551ddf03f80dc3fd17554f8b88ebd2fce2b36a9a
[]
no_license
TechAcademy-Azerbaijan/mini_microservice_app
3af2f80047b9a945f07ac1d4c7dd5a01980169e0
b06c13a7feac4b9f46ab1d3bed19e36a7de3cd4e
refs/heads/master
2023-08-15T19:49:22.058966
2021-10-22T08:21:40
2021-10-22T08:21:40
null
0
0
null
null
null
null
UTF-8
Python
false
false
171
py
from flask import Flask from flask_cors import CORS app = Flask(__name__) CORS(app) from routers import * if __name__ == '__main__': app.run(port=5001, debug=True)
63f67629a5a7b16ce7fd1a19104293260e41bb86
1b81f2ac5e48b7d91949a6b71c4cc9f9b9f3f19c
/vera/params/models.py
83f99aecd67832508b05874797e90e7e02e8e836
[ "MIT" ]
permissive
erick-otenyo/vera
b794d8caf9cb4e183ffbb5ac075122a1475d9cb1
bd6a7aed8bdafc8a3025aefa5d54616473f203a6
refs/heads/master
2020-08-30T07:13:18.258335
2017-09-14T15:44:18
2017-09-14T15:44:18
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,778
py
from django.db import models from wq.db.patterns import models as patterns import swapper swapper.set_app_prefix('params', 'WQ') # Base metadata classes (Site, ReportStatus, Parameter) class BaseSite(patterns.IdentifiedModel): @property def valid_events(self): events = self.event_set.filter( ...
d466f5bbc2de930da13d832fc7fac286b4311dea
d8fe3b5243bec2b61fd7907c4ff799b24bb617e5
/LeetCode/MajorityElement.py
f1235e14e87b3df2f12c928bee4c7e9c41e4d3f2
[ "Unlicense" ]
permissive
SelvorWhim/competitive
b89ed252512d88d9346d168dc6b48e0a42a6142d
1c73a5c7b2d0dc1b6c4f3f06ace69cdf5c6a34c0
refs/heads/master
2023-04-13T01:02:52.083519
2023-04-11T10:14:38
2023-04-11T10:14:38
96,573,533
0
0
null
null
null
null
UTF-8
Python
false
false
440
py
from collections import Counter class Solution: # lazy solution that works if majority element exists (not hard to check for one if necessary). Should be O(n) time, and anywhere from O(1) to O(k) space depending on most_common implementation, for k number of unique elements def majorityElement(self, nums): ...
6c5868e7dbe4f882d68893fb9771b13e4d45611d
c91f2ebbc7d808fea953249cb8baec35addb0c63
/AlgoTrading/examples/WindBasedStrategy.py
26e98b38c0ac13455fee9a1e8cd49ee9121c264f
[]
no_license
wellengo/AlgoTrading
8644dc687ae1524f3b9778624b6fab6299d6336f
1d5925580f9fc4b9065df275f79873071742c61a
refs/heads/master
2021-12-13T22:18:07.413556
2017-04-13T04:33:12
2017-04-13T04:33:12
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,757
py
# -*- coding: utf-8 -*- u""" Created on 2015-9-23 @author: cheng.li """ import datetime as dt from AlgoTrading.api import Strategy from AlgoTrading.api import strategyRunner from AlgoTrading.api import DataSource from AlgoTrading.api import set_universe from PyFin.api import MA from PyFin.api import MAX from PyFin.a...
69b3a8a5656a6229d00db9a433b364d43faecb76
266947fd84eed629ed0c21f6d91134239512afd9
/BeginnerContest_B/070.py
44ab7e3e3b48dab05d40236c4d90574db6a44ef3
[]
no_license
SkiMsyk/AtCoder
c86adeec4fa470ec14c1be7400c9fc8b3fb301cd
8102b99cf0fb6d7fa304edb942d21cf7016cba7d
refs/heads/master
2022-09-03T01:23:10.748038
2022-08-15T01:19:55
2022-08-15T01:19:55
239,656,752
0
0
null
null
null
null
UTF-8
Python
false
false
163
py
# input A, B, C, D = map(int, input().split()) # processing # 0 -- A -- B ---... # 0 ---- C ---- D ---... res = max(min(B, D) - max(A, C), 0) # output print(res)
f06cc6f2c9d30f0a1597c6703f19934298fd36c3
9e31cabea36b122be02fa778264a5c9a313a7a3c
/chapter_17/p17_4.py
01f1d2cde0b036ebaedf4b1335f016b631309473
[]
no_license
anywhere1234/CTCI_python
b1c27997fe20d17f48b423e647fed600811ab015
6c7e71f4829708da397867dd9b2cec61a654d3f9
refs/heads/master
2023-02-09T14:02:29.710006
2021-01-06T00:04:58
2021-01-06T00:04:58
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,564
py
from typing import List def get_bit(a: int, bit_nr: int) -> int: shifted_a = a >> (bit_nr) return shifted_a & 0b1 def find_mssing(arr: List[int], n: int) -> int: return find_missing_helper(arr, list(range(len(arr))), 0, n) def find_missing_helper(arr: List[int], list_indexes: L...
db0a75c33b2d39ccd10641bc74430fa734206139
d305e9667f18127e4a1d4d65e5370cf60df30102
/tests/ut/cpp/python_input/gtest_input/pre_activate/fused_batch_norm_fusion_test.py
472e7a5d4be4cf0dc07a5047f721afdf0469bf6f
[ "Apache-2.0", "MIT", "Libpng", "LicenseRef-scancode-proprietary-license", "LGPL-2.1-only", "AGPL-3.0-only", "MPL-2.0-no-copyleft-exception", "IJG", "Zlib", "MPL-1.1", "BSD-3-Clause", "BSD-3-Clause-Open-MPI", "MPL-1.0", "GPL-2.0-only", "MPL-2.0", "BSL-1.0", "LicenseRef-scancode-unknow...
permissive
imyzx2017/mindspore_pcl
d8e5bd1f80458538d07ef0a8fc447b552bd87420
f548c9dae106879d1a83377dd06b10d96427fd2d
refs/heads/master
2023-01-13T22:28:42.064535
2020-11-18T11:15:41
2020-11-18T11:15:41
313,906,414
6
1
Apache-2.0
2020-11-18T11:25:08
2020-11-18T10:57:26
null
UTF-8
Python
false
false
4,398
py
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
156a74067eb5fcfb827403fb746855c07b61a2b1
6cd690fb01e100f440289ea8fe7342bb58d37e78
/src/elemental/ability/abilities/rampage.py
5048dec0f9e2721eec09a8315b46108a732a6b0c
[]
no_license
Hammerlord/Monbot
6db8308ae492d7cfbb6f1bdff909105129924269
fde8177d9170dddd958a89068a560008259d6e24
refs/heads/master
2020-03-07T16:43:20.019123
2019-08-29T03:08:33
2019-08-29T03:08:33
127,591,188
2
0
null
null
null
null
UTF-8
Python
false
false
693
py
from src.core.elements import Elements, Category from src.elemental.ability.ability import Ability class Rampage(Ability): def __init__(self): super().__init__() self.name = 'Rampage' self._description = ("Strike the opponent in a fury over the next 3 turns. " ...
169a1fd5a957f93eb770569acd3dbba2aa737d62
2411e39691f02bec1cd03958a0bd5c2c850db457
/py/applets/teapot.py
43d30204e469053006ae47273dbd721402594e44
[]
no_license
wielandgmeiner/javacard_playground
d9c2067901e3005b69cd69b17774f00f19a04c6e
758fb14418f6aa0079da794efa67384db512fafd
refs/heads/master
2022-09-21T15:32:28.194817
2020-05-31T19:16:54
2020-05-31T19:16:54
259,915,974
0
0
null
2020-04-29T12:13:25
2020-04-29T12:13:24
null
UTF-8
Python
false
false
336
py
from .core import AppletBase class Teapot(AppletBase): def __init__(self, connection=None): super().__init__("B00B5111CA01", connection) def get_data(self): return self.request("B0A10000") def put_data(self, d): data = bytes([len(d)])+d.encode() return self.request("B0A200...
c4eabefbb636b88c245f4eeddf235b3bf569d694
e6e57bf7d4eda37f1188ab72ff249675f40029ee
/algorithms_and_data_structures/arrays/Valid Sudoku.py
cd5a560608706499dcf3eb78cabfb8e53630207a
[]
no_license
juanpedrovel/bomboclap
4e186331ef1c26c8522e44c21d6a33358471786b
99db02266c31dd14357ef6a575d35fcf55718617
refs/heads/master
2020-04-19T21:16:38.141830
2019-01-31T00:31:24
2019-01-31T00:31:24
168,436,881
0
0
null
null
null
null
UTF-8
Python
false
false
1,638
py
class Solution: def isValidSudoku(self, board): """ :type board: List[List[str]] :rtype: bool """ def bx_numb(i, j): box_number = 0 if j > 5: box_number += 2 elif j > 2: box_number += 1 if i > 5: ...
b22195cecdaf5c8cf512f825dadae2c5286b19a2
2c97e11e13bfbabfdae8979385ba0957c7b11270
/ebl/tests/transliteration/test_normalized_akkadian.py
647d2b00a0572b7f4c97be63209b86160d835bb1
[ "MIT" ]
permissive
ElectronicBabylonianLiterature/ebl-api
72a2a95291e502ec89a20ebe5c14447e63ac6d92
4910f6fbb57fa213fef55cbe9bc16215aebbaa27
refs/heads/master
2023-08-16T12:42:03.303042
2023-08-16T10:59:44
2023-08-16T10:59:44
135,266,736
11
3
MIT
2023-09-12T09:56:14
2018-05-29T08:39:58
Python
UTF-8
Python
false
false
5,532
py
import pytest from ebl.dictionary.domain.word import WordId from ebl.lemmatization.domain.lemmatization import LemmatizationToken from ebl.tests.asserts import assert_token_serialization from ebl.transliteration.application.token_schemas import OneOfTokenSchema from ebl.transliteration.domain.atf import Flag from ebl....
ab8f7035259fa98d9b0d12e248edfddb9335aab6
407ae3372e98442698332394a3da95f8f4c488a6
/results/mcmc_100chains/chains_fidsig_fidcov_nonuni_landyszalay/prep_corrmatrixDATAPARAMS/combine_dddr_78.py
1c845494911885a0a55f330c93ae926b4511b1ec
[]
no_license
aszewciw/MW_Structure
0ce437627f4c43f776eae658aad8b98a280d6b06
ba25761aa9444ca5c04e3a4ad617b29d586ba4c8
refs/heads/master
2021-01-12T11:59:15.717154
2017-12-07T00:21:54
2017-12-07T00:21:54
68,852,501
0
0
null
null
null
null
UTF-8
Python
false
false
2,417
py
''' Produce files containing the indices of binned pairs. Here we do this for a uniform sample. ''' import mw_utilities_python as mwu import sys, pickle, os import numpy as np def main(): Nmocks = 1000 star_factor = 10 dd_dir = '../../prep_fid_errors_DATAPARAMS/data/' dr_dir = './data/' out_dir = ...
03b93222dc4c00950cafabceaa0b78a0966de0bf
5c8139f1e57e06c7eaf603bd8fe74d9f22620513
/PartB/py图像的渲染.py
d38a444d1e9b9dacfe956cabdc89c130cf467422
[]
no_license
madeibao/PythonAlgorithm
c8a11d298617d1abb12a72461665583c6a44f9d2
b4c8a75e724a674812b8a38c0202485776445d89
refs/heads/master
2023-04-03T07:18:49.842063
2021-04-11T12:02:40
2021-04-11T12:02:40
325,269,130
0
0
null
null
null
null
UTF-8
Python
false
false
2,144
py
# 图片的渲染。 有一幅以二维整数数组表示的图画,每一个整数表示该图画的像素值大小,数值在 0 到 65535 之间。 给你一个坐标 (sr, sc) 表示图像渲染开始的像素值(行 ,列)和一个新的颜色值 newColor,让你重新上色这幅图像。 为了完成上色工作,从初始坐标开始,记录初始坐标的上下左右四个方向上像素值与初始坐标相同的相连像素点,接着再记录这四个方向上符合条件的像素点与他们对应四个方向上像素值与初始坐标相同的相连像素点,……,重复该过程。将所有有记录的像素点的颜色值改为新的颜色值。 最后返回经过上色渲染后的图像。 示例 1: 输入: image = [[1,1,1],[1,1,0],[1,0,1]]...
1c0672167fdd543464f6bbd6c8ac7098353c0bea
d1ddb9e9e75d42986eba239550364cff3d8f5203
/google-cloud-sdk/lib/googlecloudsdk/command_lib/billing/utils.py
718213de8b0203d284f7c2d410fd64d0ab94b416
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
bopopescu/searchparty
8ecd702af0d610a7ad3a8df9c4d448f76f46c450
afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6
refs/heads/master
2022-11-19T14:44:55.421926
2017-07-28T14:55:43
2017-07-28T14:55:43
282,495,798
0
0
Apache-2.0
2020-07-25T17:48:53
2020-07-25T17:48:52
null
UTF-8
Python
false
false
1,117
py
# Copyright 2017 Google Inc. 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 applicable law or ag...
83e04af598a29f1f5bb89e074965a329449c3d81
bc1928bb2742ad96bceb725e4bca65abd9bdbcaf
/NinjaGold/venv/bin/pip2
c23e2d6f7d0480927da64b475980713b2e1817b2
[]
no_license
waterFlowin/Python-Projects
767ad675be902739cea0119e554ed3501eeba793
1503bc0c236295c53c38f8fbc5189f4a9b7ba1f1
refs/heads/master
2021-01-20T00:21:08.155024
2017-04-23T03:48:20
2017-04-23T03:48:20
89,115,581
0
0
null
null
null
null
UTF-8
Python
false
false
262
#!/Users/waterFlow/Documents/PythonAssignments/NinjaGold/venv/bin/python2.7 # -*- coding: utf-8 -*- import re import sys from pip import main if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) sys.exit(main())
5c9c45a5bbfac836a6957791a648c100d07822db
dfaf6f7ac83185c361c81e2e1efc09081bd9c891
/k8sdeployment/k8sstat/python/kubernetes/client/models/v1beta1_local_subject_access_review.py
0010ecb23188972522b0f3c64241b7f6a494e26f
[ "Apache-2.0", "MIT" ]
permissive
JeffYFHuang/gpuaccounting
d754efac2dffe108b591ea8722c831d979b68cda
2c63a63c571240561725847daf1a7f23f67e2088
refs/heads/master
2022-08-09T03:10:28.185083
2022-07-20T00:50:06
2022-07-20T00:50:06
245,053,008
0
0
MIT
2021-03-25T23:44:50
2020-03-05T02:44:15
JavaScript
UTF-8
Python
false
false
7,366
py
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: v1.15.6 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class V1beta1Loc...
40e963c4b3b5b9e68d8105b83d2b6b6c606d607d
04cfd073ca0ce0e55a437ea6c1fd6536873d7553
/ex45.py
37c91b8eb307fd86a3ac004192e82bea6f32e679
[]
no_license
randy-wittorp/ex
5a682be54cf72404349fe397e4c7b3357d2b32d8
f8c22f0507609e69dadaf8a847dd7d8c4aad304f
refs/heads/master
2016-09-05T09:57:14.924825
2015-05-11T02:37:28
2015-05-11T02:37:28
35,258,942
0
0
null
null
null
null
UTF-8
Python
false
false
1,960
py
from sys import argv script, filename = argv print "=" * 40, '\n\n' print "Let's make up a bunch of different types of rooms for a game." print "At anytime, enter [Q] to quit.\n\n" target = open(filename, 'w') game_rooms = [] while True: room = {} # get the name of a room print "First, what type of...
[ "=" ]
=
789a17b497fcabc2aa2f1afd85c5bd55ffaf58a1
6af81c1e3853255f064ce58e848b34211decdd23
/test/top/api/rest/DeliveryTemplateDeleteRequest.py
ed625006af2c7cf18003711289ed9a7a170cdc58
[]
no_license
dacy413/TBAutoTool
d472445f54f0841f2cd461d48ec6181ae2182d92
ca7da4638d38dd58e38c680ee03aaccf575bce7b
refs/heads/master
2016-09-06T16:13:01.633177
2015-02-01T00:04:50
2015-02-01T00:04:50
29,625,228
0
0
null
null
null
null
UTF-8
Python
false
false
328
py
''' Created by auto_sdk on 2015-01-20 12:36:26 ''' from top.api.base import RestApi class DeliveryTemplateDeleteRequest(RestApi): def __init__(self,domain='gw.api.taobao.com',port=80): RestApi.__init__(self,domain, port) self.template_id = None def getapiname(self): return 'taobao.delivery.template.d...
fa3a4ad9a1fb7ac12f9eeee873960f975fe4b561
083b3f5b0d23c269c6a9ff1ea413e70fb799a497
/Leetcode Challenge/09_September_2020/Python/Week 1/4_Partition Labels.py
d7760779eeaf21e4b1358e275335701835e975b5
[]
no_license
HectorIGH/Competitive-Programming
b2e02dff140d9ebb06c646f7be0b53ea0afe90c9
467058c63e8a7e76805feebe3020bac4d20516a6
refs/heads/master
2022-12-31T18:32:46.824626
2020-10-16T20:38:33
2020-10-16T20:38:33
279,733,136
0
0
null
null
null
null
UTF-8
Python
false
false
1,275
py
#A string S of lowercase English letters is given. We want to partition this string into as many parts as possible so that each letter appears in at most one part, and return a list of integers representing the size of these parts. # # # #Example 1: # #Input: S = "ababcbacadefegdehijhklij" #Output: [9,7,8] #Explanatio...
bd38508a4ddf2cb90bdd31c649292c99a7e7cbf3
b343b5101e453fff9d59a1644ba54f77ead0bad2
/face_test/metric-distance.py
a951870b8795d33ac57810c90c148f74b0b74e86
[]
no_license
BarshaGuha/face-detect-recognize
cb0643f9297d803d3b05ae1f7036757c8ba43d0b
d193669c3a68b645d9cce30378c20d225d0fef7f
refs/heads/master
2020-04-10T16:04:12.846940
2018-10-31T07:21:22
2018-10-31T07:21:22
161,132,045
1
1
null
2018-12-10T07:05:46
2018-12-10T07:05:46
null
UTF-8
Python
false
false
2,869
py
#python #similarity distance 今天一个偶然的机会体会到了python数据运算的强大。求一个数组各样本之间的距离仅简单的几句代码就行。看来真的技术改变世界啊。废话不多说,记下来怕以后忘记。 [python] view plain copy from scipy.spatial.distance import pdist, squareform 下面结合API文档标注一下具体用法: [python] view plain copy 1.X = pdist(X, 'euclidean') 计算数组X样本之间的欧式距离 返回值为 Y 为压缩距离元组或矩...
39569cf295296908556488db4b1939a139e7dd20
037a97b5de833dfdd6b9489e776cf6be651c2703
/fpraktikum/migrations/0013_auto_20170913_1402.py
d86db83742caf7dadcea2f1acefe1883b435a415
[ "MIT" ]
permissive
PhysikOnline/fpraktikum_backend
6fc6ec521749f92387e7b99873b27a73b255d46a
b040aef86dba6137f1c5d0fd936143a48b4f9c13
refs/heads/master
2021-04-18T19:46:24.019906
2020-03-15T15:43:16
2020-03-15T15:43:16
126,201,619
2
1
MIT
2020-06-05T17:37:58
2018-03-21T15:38:11
Python
UTF-8
Python
false
false
2,404
py
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-09-13 14:02 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('fpraktikum', '0012_auto_20170912_1105'), ] operations = [ migrations.AlterMo...
d421307da7fd37864161ea2092ae764586add0c4
c1a0c19b236a7291d1ab510611206ff8946b8655
/run.py
d5a367baaa99410b1277617e4727f2711ff0be6c
[]
no_license
LeeHuangChen/2018_03_22_MosaicFinderResultAnalysis
5e211e5d3a931ae8030ac0a8b907f99863262f98
dcf0de140a3385ac2f5b4f3efc08fa84c890af26
refs/heads/master
2021-04-15T13:06:05.928299
2018-03-22T22:53:13
2018-03-22T22:53:13
126,397,794
0
0
null
null
null
null
UTF-8
Python
false
false
4,783
py
import Configurations as conf import os from cPickle import load from src import util def readResultFile(folder, filename): fusedDict = {} familyDict = {} with open(os.path.join(folder, filename)) as f: for i, line in enumerate(f): if i > 0: # reference: ...
ba073293648a25847d17dc772cd96e10004f5085
2c1e06ff5fc659188735bba84707d07ab1578f58
/backend/deposits/helpers/banks.py
9cd234c213c944457aa8ac2d9acf51c35b5db110
[]
no_license
aviaryan/deposits-app
b15db26d4fe79d5934b36167d2edfa70c1f009f2
dc6e4e93749aa2001feba35b461b4c1168a893a1
refs/heads/master
2021-03-30T21:26:24.923656
2018-05-11T09:06:40
2018-05-11T09:06:40
124,782,433
3
0
null
null
null
null
UTF-8
Python
false
false
1,013
py
# bank = https://tin.tin.nsdl.com/tan/Bank.html BANKS = """ Allahabad Bank Andhra Bank Axis Bank Bank of Bahrain and Kuwait Bank of Baroda - Corporate Banking Bank of Baroda - Retail Banking Bank of India Bank of Maharashtra Canara Bank Central Bank of India City Union Bank Corporation Bank Deutsche Bank Development C...
2e37aa5d9e2825c50325ba060540a1765c2d14f7
0475a5b592a4f9d9bff229dc4308ab6a5e6f1ba9
/pyalysis/_compat.py
c839af6cebaec9d4342a3128f85843d17b9f8a3a
[ "BSD-3-Clause" ]
permissive
DasIch/pyalysis
5f7cf7ff188739e117136315a79e1cb8a6aa9734
314fd86c268b9b0fd61bf4ab2dbf10810e77a8bf
refs/heads/master
2016-09-06T05:51:00.478360
2014-02-26T02:54:49
2014-02-26T02:54:49
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,772
py
# coding: utf-8 """ pyalysis._compat ~~~~~~~~~~~~~~~~ :copyright: 2014 by Daniel Neuhäuser and Contributors """ import sys import codecs try: import __pypy__ del __pypy__ PYPY = True except ImportError: PYPY = False PY2 = sys.version_info[0] == 2 if PY2: text_type = unicode def...
14935b76244e1588351e41945ab39bd8eda80882
18a79067223932c2f7aa6ff6b81d0b3f36169db2
/atcoder/abc198/A.py
3a9ccde63436d9b2a4c9eedca30aad16300ec6a6
[]
no_license
aadiupadhyay/CodeForces
894b0e5faef73bfd55a28c2058fb0ca6f43c69f9
76dac4aa29a2ea50a89b3492387febf6515cf43e
refs/heads/master
2023-04-12T17:58:52.733861
2021-05-07T20:08:00
2021-05-11T20:07:11
330,149,645
1
0
null
null
null
null
UTF-8
Python
false
false
591
py
# aadiupadhyay import os.path from math import gcd, floor, ceil, factorial from collections import * import sys mod = 1000000007 INF = float('inf') def st(): return list(sys.stdin.readline().strip()) def li(): return list(map(int, sys.stdin.readline().split())) def mp(): return map(int, sys.stdin.readline().split()) de...
56d5ba5271e24ce0b3cba44c3f85cb51a3403840
aac418419c2ef4d10c5c4ceb607d3d8329a5f395
/Algorithms/Miscellaneous/Gcd.py
bd88fe1c2e7a751961f75b187fda83c809005b18
[]
no_license
sudhirshahu51/projects
bb13395227355ff84933b6d3a0f158ee42bcdceb
b2d8331d14d2163b20535368a60c81f6c8bc2c8f
refs/heads/master
2021-01-01T17:09:18.654060
2017-04-24T10:46:15
2017-04-24T10:46:15
null
0
0
null
null
null
null
UTF-8
Python
false
false
129
py
# To find the greatest common divisor def gcd(x,y): if x == 0: return y else: return gcd(y%x, x)
2ebe4b45268b5fbc1b7af9b11f7786c3d33e1429
9743d5fd24822f79c156ad112229e25adb9ed6f6
/xai/brain/wordbase/nouns/_nick.py
08c83ac70115fc28cd22074d9bc50429622e92b8
[ "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
373
py
#calss header class _NICK(): def __init__(self,): self.name = "NICK" self.definitions = [u'a small cut in a surface or an edge: ', u'prison: ', u'a stated condition, especially of health: '] self.parents = [] self.childen = [] self.properties = [] self.jsondata = {} self.specie = 'nouns' def run...
40f2752d77ccabe27f319e292703ae57571be5d9
7a3c194356437db110671ad163f03df1344a5e87
/code/utils/debug/processinfo.py
7eb8cf32210c745af00544bfa293ec2de1123e71
[ "MIT" ]
permissive
dmytrov/gaussianprocess
6b181afdb989415ec929197cdb20efee571ebbcc
7044bd2d66f44e10656fee17e94fdee0c24c70bb
refs/heads/master
2022-12-08T22:23:11.850861
2020-09-14T19:37:33
2020-09-14T19:37:33
295,513,701
0
0
null
null
null
null
UTF-8
Python
false
false
1,303
py
import os import psutil _proc_status = '/proc/%d/status' % os.getpid() _scale = {'kB': 1024.0, 'mB': 1024.0*1024.0, 'KB': 1024.0, 'MB': 1024.0*1024.0} def _VmB(VmKey): '''Private. ''' global _proc_status, _scale # get pseudo file /proc/<pid>/status try: t = open(_proc_status) ...
ceb9352b0878dace0d3cd48be46ad14679a4847b
aec4fcd0361b9292c48178e5e77cab5df17f8f44
/DRL/Base.py
f90397ddb2603f156ecb04afe07cb33123db724e
[ "Apache-2.0" ]
permissive
kbehouse/ezDRL
99bf2d1b37fceaa219651264c2f865ef3c70b146
1f8e5675780700d8e66f753fceac17c2b36fa56b
refs/heads/master
2021-08-24T12:39:48.804699
2017-12-05T09:05:53
2017-12-05T09:05:53
110,926,129
2
0
null
null
null
null
UTF-8
Python
false
false
533
py
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: DRL.py # Description: Abstract Class For DRL Methods # Author: Kartic <[email protected]> import six from abc import ABCMeta,abstractmethod @six.add_metaclass(ABCMeta) class RL(object): @abstractmethod def choose_action(self, state): pass ...
c858313d78d4f1f97702e366a93be4fd43b773ca
22f1c0d8406be377e588ac0eaeea7bd19385156c
/src/zeep/wsdl/attachments.py
6a85312813d7e7288a0ade3ed9b22b4bc7827ab0
[ "BSD-3-Clause", "MIT" ]
permissive
mbehrle/python-zeep
999be22a91f6df04b995b823dc68ae83953fb046
5921b047d4fda2d87d9ab178fd37ef77d70d1a1f
refs/heads/master
2021-01-23T08:04:47.801530
2017-01-31T11:39:47
2017-01-31T11:39:47
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,727
py
"""Basic implementation to support SOAP-Attachments See https://www.w3.org/TR/SOAP-attachments """ import base64 from cached_property import cached_property from requests.structures import CaseInsensitiveDict class MessagePack(object): def __init__(self, parts): self._parts = parts def __repr__(s...
c0f1f52cd692bb07290aa056b772de8af1130bde
6e1aa6cfe11a93740cdbc9503d992769ced8879b
/tests/test_column_inclusion_and_exclusion.py
c58313a1b040dd81981afb2faf5082b2e5c0d84b
[]
no_license
dtheodor/sqlalchemy-continuum
04008d03209a1df930037e324e3f666a10a8abfc
22dbc811ac3a67d883da6b47584992d6dd22b20c
refs/heads/master
2021-01-22T16:32:22.137475
2014-10-23T09:55:15
2014-10-23T09:55:15
17,176,669
1
1
null
null
null
null
UTF-8
Python
false
false
3,756
py
from datetime import datetime from pytest import mark import sqlalchemy as sa from sqlalchemy_utils import TSVectorType from sqlalchemy_continuum import version_class from tests import TestCase class TestDateTimeColumnExclusion(TestCase): def create_models(self): class Article(self.Model): __t...
200adc49c9d7032f1d19d9caec3133ac4ebf1673
54f352a242a8ad6ff5516703e91da61e08d9a9e6
/Source Codes/AtCoder/arc098/C/3270864.py
5c62ff7a855a8056aab79c2b97f8d36d0b122b1f
[]
no_license
Kawser-nerd/CLCDSA
5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb
aee32551795763b54acb26856ab239370cac4e75
refs/heads/master
2022-02-09T11:08:56.588303
2022-01-26T18:53:40
2022-01-26T18:53:40
211,783,197
23
9
null
null
null
null
UTF-8
Python
false
false
802
py
from collections import defaultdict N, K, Q = map(int, input().split()) A = list(map(int, input().split())) A_sorted = sorted(A) ans = float("inf") ap = 0 for i, a in enumerate(A_sorted): if a==ap: continue ap = a L = [0] d = defaultdict(list) for aa in A: if aa < a: ...
3a735af93117f64efe81849413af4f3138ba8356
9cb7670c64c13f09abee315f85f1f6b67b8eb1ad
/ptp/components/language/sentence_one_hot_encoder.py
3996236c4d9b703946b38c4f4760c5c9e33b0c2a
[ "Apache-2.0" ]
permissive
ConnectionMaster/pytorchpipe
057325a5d4e8e6ce2198a953a705721388531add
9cb17271666061cb19fe24197ecd5e4c8d32c5da
refs/heads/develop
2023-04-07T17:46:26.451692
2019-11-05T23:36:13
2019-11-05T23:36:13
183,084,219
1
0
Apache-2.0
2023-04-03T23:18:43
2019-04-23T19:38:29
Python
UTF-8
Python
false
false
4,091
py
# Copyright (C) tkornuta, IBM Corporation 2019 # # 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 agr...
ff6ed44e73bac7a6b62db504dd1009a7c10746ca
2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02
/PyTorch/contrib/cv/video/I3D/mmaction/datasets/__init__.py
f04440bfbd5b1cb1aa81e8b37daed35a0a8f87cc
[ "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
1,922
py
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
d8751d6aed8551800d5fa2b4ca68e98c118d9357
284b8949a5e8a65d791bc8b6531fb4029100f798
/02281043.py
511423569a2e60d8b6f61d89283604c871259bad
[]
no_license
Yanl05/Crawler
3ce19be3a041b9db0a2fa5e340f4e9aa37593e4c
af1c34b9e28b24740e090415a45c0ee808d058ab
refs/heads/master
2020-04-09T16:35:22.272829
2018-12-05T04:25:39
2018-12-05T04:25:39
160,457,052
0
0
null
null
null
null
UTF-8
Python
false
false
146
py
class Car: color = '' def run(self): print('go go go!!') bmw = Car() bmw.color = 'red' print(bmw.color) bmw.run() print(bmw.run)
eeeff347b088cf7928a142ac122aa3e6ebe54d89
6f5b8fa3693be70f258e1a74f4874d02fdb105a6
/asdl/__init__.py
5dde4913227376aa52bf3e5eb64c1cadab4fcc40
[ "Apache-2.0" ]
permissive
ionutzzu12/external-knowledge-codegen
fb02823516e14f19d171928d88588623631d2963
3f96ee7c4a50cdd8649e564115dbe96bff059d87
refs/heads/master
2023-02-24T12:22:55.962963
2020-06-06T08:34:54
2020-06-06T08:34:54
262,047,517
0
0
Apache-2.0
2020-06-06T08:34:55
2020-05-07T12:43:54
Python
UTF-8
Python
false
false
334
py
import six from .lang.lambda_dcs.lambda_dcs_transition_system import LambdaCalculusTransitionSystem from .lang.prolog.prolog_transition_system import PrologTransitionSystem if six.PY2: from .lang.py.py_transition_system import PythonTransitionSystem else: from .lang.py3.py3_transition_system import Python3Tran...
583929ad0765fe89d9a7f1fc8b3f321c8cb5bdbe
6b78bd7f62f7f407bf11d877cc4d91e7db3b62fe
/csc/python/week-3-ds/src/day3/lru_cache/lru_cache.py
b8009b5e6480947a1769a37d0687614b451baee4
[]
no_license
PascalUlor/code-challenges
b85efacd4bc5999a0748d1fa1e84f503be09dc94
6488d0a6d2729bd50b106573f16488479fd6e264
refs/heads/master
2023-03-03T17:50:18.413127
2023-02-21T13:10:02
2023-02-21T13:10:02
212,979,719
1
0
null
2023-02-15T22:59:13
2019-10-05T10:14:29
Python
UTF-8
Python
false
false
2,759
py
from doubly_linked_list import DoublyLinkedList class LRUCache: """ Our LRUCache class keeps track of the max number of nodes it can hold, the current number of nodes it is holding, a doubly- linked list that holds the key-value entries in the correct order, as well as a storage dict that provides f...
5f9cd7cd2d9cea9cc9a1f16b39eca20fbfb64326
8cbe8ff380e170312a36a0213dfaddd71f0d8bf7
/accounts/admin.py
f619a6fecfd446404431f7a8e26f82aa010f4708
[]
no_license
Gemy-star/bauhaus_new
60926aa9907b2b619a620d3ca0324ed7d99d08d1
270663f918c8965e9760ef547b89d3c8d7967120
refs/heads/main
2023-02-12T09:58:51.939396
2021-01-12T21:17:03
2021-01-12T21:17:03
321,507,414
0
0
null
null
null
null
UTF-8
Python
false
false
3,099
py
from django import forms from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.forms import ReadOnlyPasswordHashField from .models import User class AddUserForm(forms.ModelForm): """ New User Form. Requires password confirmation. """ ...
375ca61df7f3c090b6cae7b47334f507cdcba96b
cb4ab4584c4feda3bb1826aafadfea462ecdbf42
/AIs/AI_PlanC/__init__.py
d40f31db6ffa0b9f248c9431ab20f861a8eab6c4
[ "MIT" ]
permissive
rimpo/coding-world-cup
15660a570ca400c82f0966f302b9b4a7a8968c77
964e3b58637f768f6dc5976bf729d993d63b46ab
refs/heads/master
2020-12-02T22:49:53.789544
2017-09-11T15:47:24
2017-09-11T15:47:24
30,821,540
0
0
null
2015-02-21T01:56:31
2015-02-15T07:56:10
C#
UTF-8
Python
false
false
231
py
from .coding_worldcup_api import CodingWorldCupAPI from .js_object import JSObject from .goh_ai import GohAI from .position import Position from .vector import Vector from .classes import MarginFactors, DirectionType, GoalType
db8283120c322835780a8040b991fc6cd6140f64
8fa3634da0f827c57480051fab280903501fa007
/setup.py
4553dd8663c4ff0091c6649a2c32f26918cf3d92
[ "Apache-2.0" ]
permissive
ahnan4arch/seldom-pytest
519a30cbe31edc57ab804088acfa6a9f72c6b681
40e252c686118d137927592d6749313470ea0481
refs/heads/main
2023-07-24T04:49:26.858053
2021-09-07T15:28:45
2021-09-07T15:28:45
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,328
py
import re import ast import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() _version_re = re.compile(r'__version__\s+=\s+(.*)') with open('pytest_seldom/__init__.py', 'rb') as f: version = str(ast.literal_eval(_version_re.search( f.read().decode('utf-8'))....
c1d05b21f21eda71db21e7fb3630c69eb6861bcd
460e920c18fe887cb2b07ca57fe2ad422ce7d0ce
/blog/admin.py
73067696a3e0be1372d1b776763f378177638aa8
[]
no_license
acid-n/mydjangoBlog
893a4c1c7027c79fde3df5dd5c0feb82d8c252f6
e1f62b4f1504ecc13dfbd56a1c5be6b28951ba40
refs/heads/master
2020-09-12T19:14:44.187413
2019-11-18T19:07:17
2019-11-18T19:07:17
222,522,745
0
0
null
null
null
null
UTF-8
Python
false
false
696
py
from django.contrib import admin from .models import Post, Comment # Register your models here. @admin.register(Post) class PostAdmin(admin.ModelAdmin): list_display = ('title', 'slug', 'author', 'publish', 'status') list_filter = ('status', 'created', 'publish', 'author') search_fields = ('title', 'body')...
fccad511ed6b1da264dece544d72513fcfa263c0
16bcda63a6bba61af0c835aabd73b0467696be4a
/SymmetricDifference/main.py
e1c9af5ac1b754656877c686ed64ee3aaaab231e
[]
no_license
ZirvedaAytimur/HackerRank_Python
8ea7d629e75b4db31e04c64d102bf7a0a0b5632b
175017ed3d8ff11385e12e926b94da97797fc094
refs/heads/master
2023-03-13T13:00:42.225364
2021-03-10T20:36:18
2021-03-10T20:36:18
288,210,152
0
0
null
null
null
null
UTF-8
Python
false
false
249
py
n = int(input()) a = set(map(int, input().split())) m = int(input()) b = set(map(int, input().split())) differenceAB = a.difference(b) differenceBA = b.difference(a) result = sorted(differenceAB.union(differenceBA)) for i in result: print(i)
eceba96f45693fbccf22d2a2e037432f1a9a458c
05caf48bd067c050666026b75686f23d02327378
/weekly-contest-141/shortest-path-in-binary-matrix.py
b7a5d64bbebde05852b1100a7d86ae4af78e79ec
[ "MIT" ]
permissive
elfgzp/Leetcode
3b6fa307c699fd5a1ba5ea88988c324c33a83eb7
964c6574d310a9a6c486bf638487fd2f72b83b3f
refs/heads/master
2023-08-21T23:11:38.265884
2020-10-17T11:55:45
2020-10-17T11:55:45
168,635,331
3
0
MIT
2023-07-21T03:50:43
2019-02-01T03:14:49
Python
UTF-8
Python
false
false
898
py
from collections import deque class Solution: def shortestPathBinaryMatrix(self, grid: List[List[int]]) -> int: n = len(grid) if grid[0][0] == 1 or grid[-1][-1] == 1: return -1 queue = deque([((0,0), 1)]) visited = {(0, 0)} drs = [-1, 0,...
af3d51a8c6651d6a849e9cf2e188cdf5e8176eaf
99e1a15d8f605be456f17608843c309dd8a3260f
/src/Pokemon/Abilities/resist_type_ability.py
7ae249538edcd5eca1ceabf4685a1ace3dbf6a34
[]
no_license
sgtnourry/Pokemon-Project
e53604096dcba939efca358e4177374bffcf0b38
3931eee5fd04e18bb1738a0b27a4c6979dc4db01
refs/heads/master
2021-01-17T23:02:25.910738
2014-04-12T17:46:27
2014-04-12T17:46:27
null
0
0
null
null
null
null
UTF-8
Python
false
false
631
py
from Pokemon.Abilities.ability import Ability class ResistTypeAbility(Ability): """ An Ability with modified effectivensses """ def __init__(self, name, types): """ """ Ability.__init__(self, name) self.types = types def effectivenessOnDefense(self, at...
bf5555989d86fa4f6bcf35bcbad1fc8472065722
1dacbf90eeb384455ab84a8cf63d16e2c9680a90
/pkgs/astropy-1.1.2-np110py27_0/lib/python2.7/site-packages/astropy/utils/compat/misc.py
9b56940a7d85a04a5497f9b2f99abf3c2480f150
[ "Apache-2.0", "BSD-3-Clause", "LicenseRef-scancode-unknown" ]
permissive
wangyum/Anaconda
ac7229b21815dd92b0bd1c8b7ec4e85c013b8994
2c9002f16bb5c265e0d14f4a2314c86eeaa35cb6
refs/heads/master
2022-10-21T15:14:23.464126
2022-10-05T12:10:31
2022-10-05T12:10:31
76,526,728
11
10
Apache-2.0
2022-10-05T12:10:32
2016-12-15T05:26:12
Python
UTF-8
Python
false
false
3,556
py
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Simple utility functions and bug fixes for compatibility with all supported versions of Python. This module should generally not be used directly, as everything in `__all__` will be imported into `astropy.utils.compat` and can be accessed from there. ...
147cf4364b9e0ec4c97c14d9487f7650af798832
0767d96d7d389d0c76b9915f33d19e910f5e3ae2
/changingthefoodchain/organizations/management/commands/loadorganizations.py
75cf04100d16dd9dbbdd0ba537a4b680f88c6ab4
[]
no_license
ebrelsford/changingthefoodchain-back
3d7b68aadd97339910a98ea6da0f66ce2af46979
58d093ff4f4f211c1e83de099f4bf3981d598588
refs/heads/master
2021-01-22T09:05:20.114067
2016-01-15T02:33:10
2016-01-15T02:33:10
21,173,480
0
0
null
null
null
null
UTF-8
Python
false
false
2,099
py
import csv from django.contrib.gis.geos import Point from django.core.management.base import BaseCommand from organizations.models import Organization, Sector, Type class Command(BaseCommand): args = 'filename' help = 'Load the organizations in the given CSV' type_abbreviations = { 'a': 'advoca...
c1abfa1d38d1a7389e9f65eaf991440fc0579afd
f6fca4fe9923e82bdd69fbca661a4e7df16660cb
/kws_streaming/layers/sub_spectral_normalization.py
10b924a1b0189041f860da536ea4105cd6ad8052
[ "Apache-2.0", "CC-BY-4.0" ]
permissive
zdeagle/google-research
85664eae969cbeff3012bc5b0beb94c557030f9c
249751dfe7cb6e0b5be5c2e301d0aed71ab15ff2
refs/heads/master
2023-09-03T06:44:06.126169
2021-11-01T01:44:43
2021-11-01T02:11:44
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,133
py
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # 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 applicab...
41f97e277f906e0452fb33ce4ea04de915867d9e
a8d55aa06c84ba592207d3e784cb449987dbf73d
/python/HI/dijet_analysis/pPb8TeV/Pythia8_Dijet120_pp_TuneCUETP8M1_8160GeV_cff.py
9d359c1099dc989d03f935217c82f54be254fca2
[]
no_license
CmsHI/genproductions
1a38e6d00a286ca485cc01f89c476d888a947b7f
bda8af4537f692677eafe10148cd17a7d364ebf8
refs/heads/master
2023-03-07T10:33:28.844648
2023-02-03T12:54:52
2023-02-03T12:54:52
15,395,480
0
5
null
2020-03-21T21:33:13
2013-12-23T12:58:04
Python
UTF-8
Python
false
false
1,075
py
import FWCore.ParameterSet.Config as cms from Configuration.Generator.Pythia8CommonSettings_cfi import * from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import * generator = cms.EDFilter("Pythia8GeneratorFilter", PythiaParameters = cms.PSet( pythia8CommonSettingsBlock, pythia8CUEP8M1SettingsBl...
913972683869049d67d35ad24c16ab8a76fb8aea
380372bbec9b77df14bb96fc32aca7061cca0635
/covid/calc/italy/sird_out.py
0839b65487e1954ded6ee16c860c90ae410488da
[]
no_license
IchiroYoshida/python_public
d3c42dc31b3206db3a520a007ea4fb4ce6c1a6fd
37ccadb1d3d42a38561c7708391f4c11836f5360
refs/heads/master
2023-08-16T17:19:07.278554
2023-08-13T21:29:51
2023-08-13T21:29:51
77,261,682
2
0
null
null
null
null
UTF-8
Python
false
false
944
py
''' SIRD/Optuna1 model simulation Plot 2020-03-28 ''' import numpy as np from scipy.integrate import odeint import matplotlib.pylab as plt from matplotlib.pylab import rcParams plt.style.use('seaborn-colorblind') N = 60480000 # community size t_max = 200 tspan = np.linspace(0.0, t_max, t_max + 1) # para...
7a09e0bbbfb0ff3a03a00cbce4ceef84c246cfae
163bbb4e0920dedd5941e3edfb2d8706ba75627d
/Code/CodeRecords/2177/60760/320775.py
e9baa7cea28a2c72ead4bdca35056de12a8b98dc
[]
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
561
py
n=int(input()) res=n if res==11: print(12) print("6 7 5 8 4 9 3 10 2 11 1 12",end=" ") elif res==1: print(2) print("1 2",end=" ") elif res==9: print(10) print("5 6 4 7 3 8 2 9 1 10",end=" ") elif res==13: print(14) print("7 8 6 9 5 10 4 11 3 12 2 13 1 14",end=" ") elif res==35: print...
09179808823e6090a2772bb6dfde9ff15c641ee6
86ce7710dfb1a4598d02a8006ebb3077c9101f29
/nekidblog/postsapp/models.py
a434d6e5778917beda41daf69fd0ec3cfb6c1931
[]
no_license
spoliv/test_task_nekidaem_ru
33b9fe8db54bf9d588834963fa3c1b9a5ae02159
3fa29a95cce5e2eb698827c0e3b8e89177022ab6
refs/heads/main
2023-01-30T04:48:25.101257
2020-12-10T15:45:16
2020-12-10T15:45:16
318,528,386
0
0
null
null
null
null
UTF-8
Python
false
false
819
py
from django.db import models from django.contrib.auth.models import User class Blog(models.Model): class Meta: verbose_name = 'Блог' verbose_name_plural = 'Блоги' author = models.ForeignKey(User, on_delete=models.CASCADE) blog_theme = models.CharField(verbose_name='тема блога', max_length...
b5015f583a686346339dadaed0cc14a8864fa920
b107883be08ea56bd3a56ddb0e2dd8dacce7db2e
/src/polystar/utils/dataframe.py
e020875b53a3ba4999062cc4d269e2850ea2cef9
[]
no_license
PolySTAR-mtl/cv
ef7977b62577e520f6c69a9b7891c7f38e307028
27564abe89e7dff612e3630c31e080fae4164751
refs/heads/master
2023-05-01T16:45:19.777459
2021-05-30T10:36:10
2021-05-30T10:36:10
356,053,312
0
0
null
2021-05-30T10:36:11
2021-04-08T21:32:06
Python
UTF-8
Python
false
false
908
py
from typing import Any, Callable, Iterable, Union from pandas import DataFrame Format = Union[str, Callable] def format_df_column(df: DataFrame, column_name: str, fmt: Format): df[column_name] = df[column_name].map(fmt.format) def format_df_columns(df: DataFrame, column_names: Iterable[str], fmt: Format): ...
6d253e9041fc0f16e07e2166ab6ba8890b19bf1e
511fd0cb7e338bc5c2d5a9d60de8166efd5882fe
/pyrecs/icp_compat/ICPSequenceFile.py
52f9c298bca501818f68f0444fe3b05b72aba2a2
[]
no_license
bmaranville/pyrecs
43341af4931538e57c8de7655efbcdbdd9099f02
29468ae4d8a4a9de5cac8988fd3620f806a71907
refs/heads/master
2021-01-15T15:45:47.514371
2016-11-04T14:07:50
2016-11-04T14:07:50
5,635,023
0
0
null
null
null
null
UTF-8
Python
false
false
5,369
py
from __future__ import with_statement from StringIO import StringIO class PyICPSequence: """controls and reads from a sequence file, moving the marker around it is defined as an iterator, so getting the next element moves the marker can use syntax "for cmd in PyICPSequenceFile(filename):" to iterate ...
bc583257ba2fa8e75999f1420d42612329c9011a
f34c9ba52317b2871ef309d25c6a62ada2a4c4e3
/2019-1/exemplos/calc/calc-ast.py
6121565647ee90707c33f27b56bed0f9abc48cf7
[]
no_license
azurah/compiladores-1
b2a24e4dc67b39d106803ce431740918feebeddb
b8bcd58aa5c0ffd02b9c24aa3eaa64b8827d9263
refs/heads/master
2022-03-25T06:55:48.714820
2019-12-16T14:38:25
2019-12-16T14:38:25
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,577
py
import ox import operator as op lexer_rules = [ ('NUMBER', r'\d+'), ('ADD', r'\+'), ('SUB', r'\-'), ('MUL', r'\*'), ('DIV', r'\/'), ('LPAR', r'\('), ('RPAR', r'\)'), ('VAR', r'[a-zA-Z_]+') ] lexer = ox.make_lexer(lexer_rules) tokens = [x for x, _ in lexer_rules] binop = (lambda x, op,...
1db6fe1c31490177a0f129ccbd8add2e3939d210
ee9655d3ffcdb70ae68692f400096b479b39d0f7
/Python/kebabize.py
1180f40f74723d5a9da84caa4daaccca95f4a1db
[]
no_license
yaelBrown/Codewars
4f123387b8c4ea6e55ec1ff5d2ae9b1d674c06cf
efa10770b593e48579c256b9d6b69deede64e9ba
refs/heads/master
2020-11-27T16:02:43.409465
2020-03-20T00:59:49
2020-03-20T00:59:49
229,521,981
0
0
null
null
null
null
UTF-8
Python
false
false
1,091
py
""" Modify the kebabize function so that it converts a camel case string into a kebab case. kebabize('camelsHaveThreeHumps') // camels-have-three-humps kebabize('camelsHave3Humps') // camels-have-humps Notes: the returned string should only contain lowercase letters """ import string def kebabize(string): out = ...
8b186ae2a6c66100621dcf603ad1b02c54d99e63
e4200b764d0b4ffba65180e54cf84b30ee84efcc
/selfdrive/loggerd/SConscript
6a392d15d6fdafd6f37d01e59e8c9462835f717c
[ "LicenseRef-scancode-warranty-disclaimer", "MIT" ]
permissive
kegman/openpilot
c9ba96a72d905956f02c684e065091e023942883
54a8614b5a6451154817a4c6c86141c96103ae47
refs/heads/kegman-0.7
2022-05-22T17:07:16.656336
2020-01-23T16:40:55
2020-01-23T16:40:55
229,979,925
105
212
MIT
2022-03-13T05:47:51
2019-12-24T17:27:11
C
UTF-8
Python
false
false
311
Import('env', 'messaging', 'common', 'visionipc') env.Program(['loggerd.cc', 'logger.c', 'raw_logger.cc', 'encoder.c'], LIBS=[ 'zmq', 'czmq', 'capnp', 'kj', 'yaml-cpp', 'z', 'avformat', 'avcodec', 'swscale', 'avutil', 'OmxVenc', 'OmxCore', 'yuv', 'bz2', 'cutils', common, 'json', messaging, visionipc])
f0f3d9ede2624be9ecb55304fb9360137bbef785
cf7c928d6066da1ce15d2793dcf04315dda9b9ed
/Jungol/Lv1_LCoder_Python/pyg0_함수3/Main_JO_406_함수3_자가진단6.py
9cb189b371e5e8cb5f56948b15f087c90bbe53ef
[]
no_license
refresh6724/APS
a261b3da8f53de7ff5ed687f21bb1392046c98e5
945e0af114033d05d571011e9dbf18f2e9375166
refs/heads/master
2022-02-01T23:31:42.679631
2021-12-31T14:16:04
2021-12-31T14:16:04
251,617,280
0
0
null
null
null
null
UTF-8
Python
false
false
296
py
# 9자리 이하의 자연수를 입력받아 재귀함수를 이용하여 각 자리 숫자의 제곱의 합을 출력하는 프로그램을 작성하시오. def recursive(n): if n < 10: return n*n return recursive(n//10) + recursive(n%10) n = int(input()) print(recursive(n))
01ecef42b6e7f285755d7f03e8bb2dcc7c993ecf
b532a2188d312a377ea89192569897714f500980
/memorious/operations/store.py
52c9e9a5bb52970965df0014bb536fb4c9aec676
[ "MIT" ]
permissive
patcon/memorious
b41baff81656c343770d9bec8743a7f710daac1b
316a4bc15a83065106de7e34935b77f337bb11e6
refs/heads/master
2021-08-20T00:32:33.320287
2017-11-27T13:53:44
2017-11-27T13:53:44
112,242,987
0
0
null
2017-11-27T20:08:07
2017-11-27T20:08:07
null
UTF-8
Python
false
false
1,418
py
import os import json import shutil from normality import safe_filename from memorious import settings def _get_directory_path(context): """Get the storage path fro the output.""" path = os.path.join(settings.BASE_PATH, 'store') path = context.params.get('path', path) path = os.path.join(path, contex...
43a4347035b0440386c7229b773e43eacc80d101
27010a7ad70bf69511858a91d42dc7a64e61b66d
/src/0342_power_of_four.py
76a22ceba8325a13c2b1e510bd9f19870f9f5a0f
[ "Apache-2.0" ]
permissive
hariharanragothaman/leetcode-solutions
fb7d967f2c6e3f4c936e3c7afe369415bc8d2dc6
44e759f80d3c9df382fdf8d694d6378881e3649d
refs/heads/master
2023-09-03T20:31:59.200701
2021-10-18T00:50:56
2021-10-18T00:50:56
267,927,538
1
1
null
null
null
null
UTF-8
Python
false
false
571
py
""" Given an integer n, return true if it is a power of four. Otherwise, return false. An integer n is a power of four, if there exists an integer x such that n == 4x. Example 1: Input: n = 16 Output: true Example 2: Input: n = 5 Output: false Example 3: Input: n = 1 Output: true Constraints: -231 <= n...
f6c388f9433fe0af9510b9b05baaba3657776db1
15f321878face2af9317363c5f6de1e5ddd9b749
/solutions_python/Problem_126/128.py
0b43d4fbaa876ff9dcf5d33290291df8461be100
[]
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
2,683
py
import os import unittest import itertools from python_toolbox.cute_iter_tools import consecutive_pairs PROB_NAME = 'consonants' INPUT_TYPE = 'large' VOWELS = 'aeiou' def solve(case): """break 'case', solve and return the solution""" name, n = case l = len(name) consecutive_consonants...
5eb911a7220230a00c7447f3afc31e62046a0e8e
36ff0f28aeb47c03d8e22f69057c12f830e917e8
/Blog/admin.py
55f78d419afa2db728fbf7600fa18758d465be30
[]
no_license
michael-basweti/duke
673721540fa1b260508f03518b0043e8e1fc3f14
5eae51ceac89e77c6ab712e6311fef9f15fb51ad
refs/heads/master
2022-12-06T02:53:04.494299
2019-07-30T10:47:06
2019-07-30T10:47:06
195,955,279
0
0
null
2022-11-22T04:09:15
2019-07-09T07:25:08
CSS
UTF-8
Python
false
false
306
py
from django.contrib import admin from .models import Blog class Post(admin.ModelAdmin): exclude = ('author',) list_display = ('title', 'author', 'date_added') def save_model(self, request, obj, form, change): obj.author = request.user obj.save() admin.site.register(Blog, Post)
19a633a72dd7eb16a803a4443726aff405985b67
836705d3c321ea8e62f3b2a0ea7e837fe5d45dfd
/3-1.py
164f25998bf0219f9aa1f0012d4645ca8930a802
[]
no_license
Accomlish/tensorflow_learn
e11acedbb81f9ef08866a15daf5155853d81cb49
19126ae75e1460aa0bb3bd041d96f99db56181d0
refs/heads/master
2021-05-22T16:50:09.878737
2020-04-04T14:36:22
2020-04-04T14:36:22
253,009,595
0
0
null
null
null
null
UTF-8
Python
false
false
1,473
py
""" 回归的例子 非线性回归例子 """ import tensorflow as tf import numpy as np import matplotlib.pyplot as plt #使用numpy生成500样本点 x_data = np.linspace(-1,1,500)[:,np.newaxis] print(x_data.shape) noise = np.random.normal(0,0.5,x_data.shape) y_data = np.square(x_data) + noise #定义连个placeholder x = tf.placeholder(...
[ "your email" ]
your email
d1143635201d221e500300bb7ebd02e942d5c100
b3b38ebf386bbd323d832ee077ae249a6ab331e9
/Day 25/Day 25.py
ef5461ad1763efb757ef34109cad57f402fc1d04
[]
no_license
bakkerjangert/AoC_2017
7bae1b1b9da5b2263d911eff5bbadc2849716be6
1c36b80965875cdcbc50c6abe75cc5def72ee573
refs/heads/master
2023-02-03T05:19:55.933367
2020-12-18T14:39:40
2020-12-18T14:39:40
322,620,627
0
0
null
null
null
null
UTF-8
Python
false
false
1,906
py
state = 'A' steps = 12172063 data = [0] index = 0 def move_left(index): if index == 0: data.insert(0, 0) else: index -= 1 return index def move_right(index): if index == len(data) - 1: data.append(0) index += 1 return index for step in range(steps): if step % 10...
b286d2b08daca3903a5d072416370fd615da25e7
95b87a3c8f5492feb8c4faea9202c68f560544b5
/tests/parsers/mcafeeav.py
084d4b95a852fc78fac08e330c14e5a16a80d540
[ "Apache-2.0" ]
permissive
sebdraven/plaso
82e87149e845347a0481d9908117c0c227960446
77c7f00f0f648b158bd9c9cc3f698dd5ff294b4d
refs/heads/master
2020-12-02T08:08:48.427006
2017-07-08T17:07:50
2017-07-08T17:07:50
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,402
py
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the McAfee AV Log parser.""" import unittest from plaso.formatters import mcafeeav # pylint: disable=unused-import from plaso.lib import timelib from plaso.parsers import mcafeeav from tests import test_lib as shared_test_lib from tests.parsers import test_lib ...
955e1f1ce5febef1ea2829471b58315b4d9b2f23
3eae9c14c119ee2d6a7d02ef1ba5d61420959e3c
/modules/core/rwvx/rwsched/src/rwsched_gi_filter.py
b06f9bbfdb82967c05b581ec652bad0f46393135
[ "Apache-2.0" ]
permissive
RIFTIO/RIFT.ware
94d3a34836a04546ea02ec0576dae78d566dabb3
4ade66a5bccbeb4c5ed5b56fed8841e46e2639b0
refs/heads/RIFT.ware-4.4.1
2020-05-21T14:07:31.092287
2017-06-05T16:02:48
2017-06-05T16:02:48
52,545,688
9
8
null
null
null
null
UTF-8
Python
false
false
1,082
py
#!/usr/bin/python # STANDARD_RIFT_IO_COPYRIGHT # -*- Mode: Python; py-indent-offset: 4 -*- # vim: tabstop=4 shiftwidth=4 expandtab import sys # rwsched_instance_ptr_t -> RwschedInstance renames = { 0: {'rwsched': 'RwSched'}, 1: {'instance': 'Instance', 'CFRunLoop': 'CFRunLoop', 'CFRunLoopSou...
c834c39c8e08fc958e2256b388af4f839efe7988
9743d5fd24822f79c156ad112229e25adb9ed6f6
/xai/brain/wordbase/otherforms/_pricier.py
17e602d16998edcee93d654fd2ff4a313028fae5
[ "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
220
py
#calss header class _PRICIER(): def __init__(self,): self.name = "PRICIER" self.definitions = pricy self.parents = [] self.childen = [] self.properties = [] self.jsondata = {} self.basic = ['pricy']
020d3a02c9aba18d9ceb63b09b9389dd7f395e1e
c1bfadbc033efba287ad55a804e9d69d297c3bf2
/valohai_cli/commands/logout.py
bf4821b4666e80b85d595e51d78ca79a387cdd40
[ "MIT" ]
permissive
valohai/valohai-cli
16560b078d20a02c8cdc7388beeea9bebac4be7d
c57cc164e749fb77b622d629a5ad05b2685534bb
refs/heads/master
2023-08-31T14:04:26.979762
2023-08-22T12:54:51
2023-08-22T12:54:51
81,329,264
14
5
MIT
2023-09-11T13:35:04
2017-02-08T12:46:54
Python
UTF-8
Python
false
false
735
py
import click from valohai_cli.consts import yes_option from valohai_cli.messages import success from valohai_cli.settings import settings @click.command() @yes_option def logout(yes: bool) -> None: """Remove local authentication token.""" user = settings.user token = settings.token if not (user or to...
3db2907e0ec1a60da6727317afaec49ef2217e4c
96ad67554b01832b873fc0bdab0c33aa2178a2fd
/3_visualExploratory/3_violationDistrict.py
ac3f3009cd46c72bad29b203a4a88e5a3d37b070
[]
no_license
RobertNguyen125/Datacamp---Project-PoliceActivities
09447ee1290c40b3c038ccd387e80c7e703cb053
af14e4d7c4ff864f68cfa3aaecdfee9883c24659
refs/heads/master
2021-01-02T02:00:15.928445
2020-02-10T06:48:13
2020-02-10T06:48:13
239,445,139
0
0
null
null
null
null
UTF-8
Python
false
false
812
py
# .crosstab(), short for cross_tabulation import pandas as pd import matplotlib.pyplot as plt ri2 = pd.read_csv('/Users/apple/desktop/policeActivities/dataset/ri2.csv') table = pd.crosstab(ri2['driver_race'], ri2['driver_gender']) # NOTE: frequency table in form of dataframe print(table) # check the result of frequenc...
4fa0a7eb80583b752126f933c7de41b6086d7e94
f9e3a0fb511470561d3d94bc984dafaee06000cb
/9780596009250/PP3E-Examples-1.2/Examples/PP3E/System/App/Bases/app.py
9e971584749335e8bfed0687516b1d673471aca7
[ "LicenseRef-scancode-oreilly-notice" ]
permissive
Sorath93/Programming-Python-book
359b6fff4e17b44b9842662f484bbafb490cfd3d
ebe4c93e265edd4ae135491bd2f96904d08a911c
refs/heads/master
2022-12-03T01:49:07.815439
2020-08-16T22:19:38
2020-08-16T22:19:38
287,775,012
0
0
null
null
null
null
UTF-8
Python
false
false
4,823
py
################################################################################ # an application class hierarchy, for handling top-level components; # App is the root class of the App hierarchy, extended in other files; ################################################################################ import ...
1376fbee52bacc27bd80efd4d16b435c5e946b03
549270020f6c8724e2ef1b12e38d11b025579f8d
/recipes/libnetfilter_queue/all/test_package/conanfile.py
1097433829a7c2a75801555fd3e085e9063cd7b5
[ "MIT" ]
permissive
conan-io/conan-center-index
1bcec065ccd65aa38b1fed93fbd94d9d5fe6bc43
3b17e69bb4e5601a850b6e006e44775e690bac33
refs/heads/master
2023-08-31T11:34:45.403978
2023-08-31T11:13:23
2023-08-31T11:13:23
204,671,232
844
1,820
MIT
2023-09-14T21:22:42
2019-08-27T09:43:58
Python
UTF-8
Python
false
false
469
py
import os from conans import ConanFile, CMake, tools class Libnetfilter_queueTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" generators = "cmake" def build(self): cmake = CMake(self) cmake.configure() cmake.build() def test(self): if not tools...
8263c0e2c597868a62777d0b2bf18d2d862238d2
632d7759536ed0726499c2d52c8eb13b5ab213ab
/Data/Packages/Default/swap_line.py
5c098bc61d83d61eb12c2cf637e2417ebeab613c
[]
no_license
Void2403/sublime_text_3_costomize
e660ad803eb12b20e9fa7f8eb7c6aad0f2b4d9bc
c19977e498bd948fd6d8f55bd48c8d82cbc317c3
refs/heads/master
2023-08-31T21:32:32.791574
2019-05-31T11:46:19
2019-05-31T11:46:19
null
0
0
null
null
null
null
UTF-8
Python
false
false
3,886
py
import sublime import sublime_plugin def expand_to_line(view, region): """ As view.full_line, but doesn't expand to the next line if a full line is already selected """ if not (region.a == region.b) and view.substr(region.end() - 1) == '\n': return sublime.Region(view.line(regi...
e62ab15957a3c82e8578924508c3baeabde046be
b550eda62179ffd8e49a59df7f8a30163140204f
/backend/openshift-old/services/job/worker/src/nodes/requests/openshift.py
169b62b8c283420c6106a524f7d57862ca40833b
[ "Apache-2.0" ]
permissive
bgoesswe/openeo-repeatability
6222fb235b70fda9da998b63fec92c0e5ac07169
087b9965e710d16cd6f29cb25e2cb94e443c2b30
refs/heads/master
2022-12-11T03:43:35.365574
2018-08-07T20:02:02
2018-08-07T20:02:02
139,158,921
0
1
null
2022-12-08T02:15:15
2018-06-29T14:27:34
Python
UTF-8
Python
false
false
801
py
from os import environ from utils import send_post # OPENSHIFT_URL = environ.get("OPENSHIFT_API") # OPENSHIFT_AUTH = auth = {"Authorization": "Bearer " + environ.get("SERVICEACCOUNT_TOKEN")} # OPENSHIFT_NAMESPACE = environ.get("EXECUTION_NAMESPACE") # OPENSHIFT_STORAGE_CLASS = environ.get("STORAGE_CLASS") # OPENSHIFT_...
72455241a618db9120f1ce31fffb5ed5a14566bd
fbfb724f8d0c3a6b64b2d6773c6f723bedb9f7f5
/Python/Django_full/courses/apps/course_app/views.py
49c2de66092e1c0453f40735e9ff07ab1f17f2ca
[]
no_license
eddieverity/DojoAssignments
32ae4a1de768069d6636d1f109845e86bb20dec5
8860b4ca87633e722fa5aa93952ea719e9e95413
refs/heads/master
2020-04-06T03:59:56.185985
2017-04-26T18:04:41
2017-04-26T18:04:41
83,149,714
1
2
null
null
null
null
UTF-8
Python
false
false
763
py
from django.shortcuts import render, redirect, HttpResponse from .models import Course, Description, Comment # Create your views here. def index(request): course=Course.objects.all() desc= Description.objects.all() context = { "courses": course, "desc": desc } return render(request, "course_app/ind...
a5146ae5de1b53ffccabf6a5318027797a5bb10a
9743d5fd24822f79c156ad112229e25adb9ed6f6
/xai/brain/wordbase/nouns/_psoriasis.py
8b4a1ae76769598d8296034103fda0e42994b41d
[ "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
373
py
#calss header class _PSORIASIS(): def __init__(self,): self.name = "PSORIASIS" self.definitions = [u'a disease in which areas of skin turn red and are covered with small dry pieces of skin'] self.parents = [] self.childen = [] self.properties = [] self.jsondata = {} self.specie = 'nouns' def run...
ac87a80c7946de405af73d9d842c2e7763946960
fee6d256bb4430569f9c055735d5f52a04afac45
/admin/town_get.py
3c317a73eecfa09a13f9b9e9edfd840faf725e1f
[]
no_license
microprediction/pandemic
633367e3a11af1418e255a595b4c01a9c1f4c1bb
4ca339b8c6e1925d7d70e9659b34e7cf8d7b534b
refs/heads/master
2021-05-23T15:27:12.726299
2020-11-12T13:52:56
2020-11-12T13:52:56
253,360,903
9
8
null
2020-05-18T14:00:25
2020-04-06T00:34:55
Python
UTF-8
Python
false
false
260
py
from pandemic.config_private import REDIS_CONFIG from pprint import pprint import json if __name__=="__main__": import redis r = redis.Redis(**REDIS_CONFIG) key = '00021250616501801290085' data = r.hgetall(name='town::hash') pprint(data)
7aba0b9e83fa79101172ddd4c5618b3be76aada9
d17a8870ff8ac77b82d0d37e20c85b23aa29ca74
/lite/tests/unittest_py/op/common/test_unsqueeze_op_base.py
2501e10cdaad936fb10b222f6afd2e47286d2faa
[ "Apache-2.0" ]
permissive
PaddlePaddle/Paddle-Lite
4ab49144073451d38da6f085a8c56822caecd5b2
e241420f813bd91f5164f0d9ee0bc44166c0a172
refs/heads/develop
2023-09-02T05:28:14.017104
2023-09-01T10:32:39
2023-09-01T10:32:39
104,208,128
2,545
1,041
Apache-2.0
2023-09-12T06:46:10
2017-09-20T11:41:42
C++
UTF-8
Python
false
false
2,275
py
# Copyright (c) 2021 PaddlePaddle 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 appli...
d86b2af56d25376ca533a9b8f5974a461cddc95f
41e22cef6ded081632f21cd3877884f76c69bef3
/flaskmob/api.py
2835e31958cc88e0b8e048455be2281aea280abb
[ "MIT" ]
permissive
brotherjack/Flask-Mob
737cac3623c8a062653e2eefa981de30526b4510
f0f4f5fe79f2fe7e63c2f882dc4b5d61276dbf45
refs/heads/master
2021-01-20T09:37:26.091977
2017-03-04T22:09:56
2017-03-04T22:09:56
83,924,618
0
0
null
2017-03-04T21:03:59
2017-03-04T21:03:59
null
UTF-8
Python
false
false
1,012
py
from flask import jsonify from flaskmob import app, db from flask_restful import Resource, Api api = Api(app) class Pokeymon(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String, unique=True) color = db.Column(db.String) def __init__(self, name, color=None): if n...
d84f0b803d8be1aa81bc7e7291137ca415656a52
9870d2c6880fd3fa558c46e3bf160aae20c74157
/removeNthFromEnd.py
5719f47e75ed040bbcce08e05727590f9c52fbbc
[]
no_license
Yigang0622/LeetCode
e7f7f115c6e730c486296ef2f1a3dd1a3fdca526
c873cd1ee70a2bdb54571bdd50733db9f6475e9e
refs/heads/master
2023-03-03T14:32:25.498633
2021-02-15T13:59:00
2021-02-15T13:59:00
281,423,565
1
0
null
null
null
null
UTF-8
Python
false
false
1,322
py
# LeetCode # removeNthFromEnd # Created by Yigang Zhou on 2020/7/22. # Copyright © 2020 Yigang Zhou. All rights reserved. # 给定一个链表,删除链表的倒数第 n 个节点,并且返回链表的头结点。 # # 示例: # # 给定一个链表: 1->2->3->4->5, 和 n = 2. # # 当删除了倒数第二个节点后,链表变为 1->2->3->5. # 说明: # # 给定的 n 保证是有效的。 # # 进阶: # # 你能尝试使用一趟扫描实现吗? #Definition for singly-linked ...
13549ec011843c3269631dae4df79481e9adcee9
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p03759/s647507996.py
7c66b69c12d94e46dcce65b1e8b12fc11d1775b6
[]
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
129
py
i = list(map(int, input().split())) a=i[0] b=i[1] c=i[2] j_1 = b-a j_2=c-b if j_1==j_2: print('YES') else : print('NO')
54dc0172f201f8adc5440482208dbc2e4a20f88b
f0d713996eb095bcdc701f3fab0a8110b8541cbb
/Fe6wvtjcNFwuANuLu_1.py
19b5746b7b1b7d4c659dd13e0c67a617790fb718
[]
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
938
py
""" A game of table tennis almost always sounds like _Ping!_ followed by _Pong!_ Therefore, you know that Player 2 has won if you hear _Pong!_ as the last sound (since Player 1 didn't return the ball back). Given a list of _Ping!_ , create a function that inserts _Pong!_ in between each element. Also: * If `win`...
d8656572c733b1f9a10bc318e47dbba7721dca6b
beea74a2a1f2445b107af411197e8b6300e715e6
/supervised_learning/0x07-cnn/0-conv_forward.py
ce94808fac80cec28daaffce4ba0d4471128adfc
[]
no_license
95ktsmith/holbertonschool-machine_learning
0240d8fa8523b06d3353c2bffa74205b84253be8
2757c8526290197d45a4de33cda71e686ddcbf1c
refs/heads/master
2023-07-26T16:02:26.399758
2021-09-09T15:57:57
2021-09-09T15:57:57
310,087,776
0
0
null
null
null
null
UTF-8
Python
false
false
2,360
py
#!/usr/bin/env python3 """ Convolution forward propagation """ import numpy as np def conv_forward(A_prev, W, b, activation, padding="same", stride=(1, 1)): """ Performs forward propagation over a convolutional layer of a neural network A_prev is a numpy.ndarray of shape (m, h_prev, w_prev, c_prev) contai...
3c516ada6af314021aa4340dc715126b4d3b5c3d
2e94ded940d9a8015f5cf877bfbef71a77b5ddaf
/bigml/api_handlers/clusterhandler.py
133a66bc205f295795f8d4e768542ab1a9575aa3
[ "Apache-2.0", "LicenseRef-scancode-public-domain" ]
permissive
mmerce/python
9ac63efacec3e54285a969b6c6279eeba6bceb78
696ddc2a10c985cfe266ec2807c24b98f0c9a317
refs/heads/master
2023-08-04T09:10:17.016748
2020-11-10T23:43:34
2020-11-10T23:43:34
5,256,921
0
0
null
2017-10-03T22:54:20
2012-08-01T08:38:09
Python
UTF-8
Python
false
false
3,898
py
# -*- coding: utf-8 -*- # # Copyright 2014-2020 BigML # # 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 ...
6eab9a88af0ceee39b0d08197e81ce32a0290429
88ae8695987ada722184307301e221e1ba3cc2fa
/third_party/grpc/src/src/python/grpcio_csds/setup.py
6523648516b6ebe0624f0243eb91978bdf3a3b93
[ "Apache-2.0", "LGPL-2.0-or-later", "MIT", "GPL-1.0-or-later", "BSD-3-Clause", "MPL-2.0" ]
permissive
iridium-browser/iridium-browser
71d9c5ff76e014e6900b825f67389ab0ccd01329
5ee297f53dc7f8e70183031cff62f37b0f19d25f
refs/heads/master
2023-08-03T16:44:16.844552
2023-07-20T15:17:00
2023-07-23T16:09:30
220,016,632
341
40
BSD-3-Clause
2021-08-13T13:54:45
2019-11-06T14:32:31
null
UTF-8
Python
false
false
2,120
py
# Copyright 2021 The gRPC Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
20119dd4bf027bc85b6d0743586dd8843d61e207
f9d564f1aa83eca45872dab7fbaa26dd48210d08
/huaweicloud-sdk-sa/huaweicloudsdksa/v2/model/update_playbook_action_request.py
65f38548f9f7ce143f3cb61570505abafe3b769a
[ "Apache-2.0" ]
permissive
huaweicloud/huaweicloud-sdk-python-v3
cde6d849ce5b1de05ac5ebfd6153f27803837d84
f69344c1dadb79067746ddf9bfde4bddc18d5ecf
refs/heads/master
2023-09-01T19:29:43.013318
2023-08-31T08:28:59
2023-08-31T08:28:59
262,207,814
103
44
NOASSERTION
2023-06-22T14:50:48
2020-05-08T02:28:43
Python
UTF-8
Python
false
false
6,398
py
# coding: utf-8 import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class UpdatePlaybookActionRequest: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is ...
7cbb792e2cb7f0c7d51684f1e7fad31c4ff22284
23c944ff03ea82cb1b557780bbe9810a4f5e001c
/mymath/tests/features/increment-steps.py
61521a4c6f342460fe2a1e3af70507f51d283d1f
[]
no_license
akshar-raaj/hack
711e13659530c0202879b815bf295efed661bb7d
4cab4d8ededd7adf8877b56741db2df7dabd0828
refs/heads/master
2020-04-04T00:33:29.900091
2015-09-05T12:05:13
2015-09-05T12:05:13
41,952,605
0
0
null
null
null
null
UTF-8
Python
false
false
324
py
from lettuce import * from fact import num, increment @step('I have access to increment') def access(step): pass @step('I use increment') def use_increment(step): increment() @step('num is (\d+)') def num_is(step, number): number = int(number) assert num == number, "Expected %d, found %d" % (number, ...
ae7c82de852c37f2276fa60c5a266cb353d7610c
afc8d5a9b1c2dd476ea59a7211b455732806fdfd
/Configurations/ggH/Full2016_nanoAOD/aliases.py
7e9a914cfb01546c67ef05e6dd9d77d585774d16
[]
no_license
latinos/PlotsConfigurations
6d88a5ad828dde4a7f45c68765081ed182fcda21
02417839021e2112e740607b0fb78e09b58c930f
refs/heads/master
2023-08-18T20:39:31.954943
2023-08-18T09:23:34
2023-08-18T09:23:34
39,819,875
10
63
null
2023-08-10T14:08:04
2015-07-28T07:36:50
Python
UTF-8
Python
false
false
7,480
py
import os import copy import inspect configurations = os.path.realpath(inspect.getfile(inspect.currentframe())) # this file configurations = os.path.dirname(configurations) # ggH2016 configurations = os.path.dirname(configurations) # Differential configurations = os.path.dirname(configurations) # Configurations #alia...
adff771b2088a82c77b2f650a290c0117b99034f
5eb29ce7104e10a399d9afd7e253f029bf8bc0ff
/cu_image_search/memex_tools/image_dl.py
dd8e2583167f9141fbc46ae7257f0a4980fbc490
[ "BSD-2-Clause" ]
permissive
svebk/DeepSentiBank_memex
69789dc09316e97aad711edeb251837a60184e7e
4e69ce66e3a177817ff360ddc263f55c6e0b63f7
refs/heads/master
2021-01-18T18:55:10.870052
2017-10-19T22:51:29
2017-10-19T22:51:29
36,091,024
22
1
null
2017-02-09T20:31:20
2015-05-22T19:20:54
Python
UTF-8
Python
false
false
4,721
py
import os import requests import shutil import time import warnings import numpy as np imagedltimeout = 3 session = requests.Session() session.trust_env = False from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning) def mkpath(outpath...
5d7ac2ba25b18ff4484f8328d3f21f2d5fe93401
810ce1c1ac47743e253171ec7541c0e431d952c2
/standard_library/Concurrency/Subprocess/subprocess_signal_parent_shell.py
f65410bbf08ac27c3089d736b913256dd8f8f41d
[]
no_license
hjlarry/practise-py
91052c25dc7ab706c6234f6d657db76667a27124
871e06b9652d356f55e3888f1f7ea180ac2b1954
refs/heads/master
2022-09-11T17:47:48.557194
2022-08-10T02:07:24
2022-08-10T02:07:24
136,263,989
1
0
null
null
null
null
UTF-8
Python
false
false
1,047
py
""" 用于发送信号的 pid 与等待信号的运行 shell 脚本的子进程 id 不同,因为这个例子中有三个独立的进程在交互: 1. 主程序 subprocess_signal_parent_shell.py 2. 主程序创建的运行脚本的 shell 进程。 3. 程序signal_child.py 如果由 Popen 创建的进程产生子进程,那么子进程将不会收到任何发送给父进程的任何信号。 """ import os import signal import subprocess import tempfile import time import sys print("由于父进程创建的子进程是shell,shell再创建的...
e27f776e66186c3805e38f5fe1037c380b83a772
97f2f0d821ce8d12b6d03f200692721418458e4b
/ths/test/testsentimentensemble.py
828bd399e2ea80bf67545e102de46b91a1a2fe46
[]
no_license
manuelr417/DetectDiseaseTHS
0851f3c2fe5caa460eacfe1fc57c790fcd43fd0a
43ae6482a4e3009fcf0899d0a1047590c4c77f7f
refs/heads/master
2021-04-15T08:23:43.430178
2020-04-13T11:46:34
2020-04-13T11:46:34
126,485,918
0
3
null
2018-10-17T13:32:44
2018-03-23T13:01:29
Python
UTF-8
Python
false
false
488
py
from ths.nn.sequences.processemsemble import ProcessTweetsWord2VecOnePassEnsemble def main(): print("Working:") #P = ProcessTweetsWord2VecOnePass2DCNNv2_1("data/cleantextlabels3.csv", "trained/embedding3.csv") P = ProcessTweetsWord2VecOnePassEnsemble("data/cleantextlabels3.csv", "data/glove.6B.50d.txt") ...
64e423abf7ebbca4e0426ebdce632030f0eb92f9
ae87b11560c543cb678c52a28916ea2252d7aa52
/tests/parsers/mac_appfirewall.py
af22d404ed067295db1745d695a435ad49dfadcc
[ "Apache-2.0" ]
permissive
CNR-ITTIG/plasodfaxp
19ccf77d0be62cfa8a9b246eb6797cf64a480d80
923797fc00664fa9e3277781b0334d6eed5664fd
refs/heads/master
2016-09-13T11:14:08.877399
2016-04-11T15:01:42
2016-04-11T15:01:42
55,975,921
1
0
null
null
null
null
UTF-8
Python
false
false
3,765
py
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for Mac AppFirewall log file parser.""" import unittest # pylint: disable=unused-import from plaso.formatters import mac_appfirewall as mac_appfirewall_formatter from plaso.lib import timelib from plaso.parsers import mac_appfirewall from tests.parsers import test_l...
f0148135b7890c0e3aa022d70d08522b3a367bec
c49a6e67a63a541f8d420e725af155505d1e7f84
/Tree/unique-binary-search-trees-ii.py
edd7063cc4f05e9ecfc78755a5d57aa38199fcdf
[]
no_license
wttttt-wang/leetcode_withTopics
b41ed0f8a036fd00f3b457e5b56efe32f872ca13
e2837f3d6c23f012148a2d1f9d0ef6d34d4e6912
refs/heads/master
2021-09-05T05:03:47.519344
2018-01-24T08:28:58
2018-01-24T08:28:58
112,893,345
0
0
null
null
null
null
UTF-8
Python
false
false
688
py
""" Unique Binary Search Trees II @ Tree + Recursion """ class Solution(object): def generateTrees(self, n): """ :type n: int :rtype: List[TreeNode] """ if n < 1: return [] return self.helper(1, n) def helper(self, start, end): if start > en...