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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
77089090d1f41eb8fbea8c0994b62a1eb8bad2e6 | 7e7e8fb08e00f235306b97908ae083d670c00062 | /Model/14.Admin model user - console/Adminuser/myapp/migrations/0001_initial.py | caff1d9a2124ffb2c08b92c9a22feb3c29f6fd69 | [] | no_license | Aadeshkale/Django-devlopment | b60fd8c846b7187ac7d464839055353e877479e3 | 445e6b65825fe03be34a13b30817adbb160bb608 | refs/heads/master | 2021-07-18T13:53:14.216350 | 2020-05-08T07:19:22 | 2020-05-08T07:19:22 | 146,633,868 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 600 | py | # Generated by Django 2.1 on 2018-09-28 17:15
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Emp',
fields=[
('id', models.AutoField(auto_c... | [
"aadeshkale0@gmail.com"
] | aadeshkale0@gmail.com |
cda1e79fe20c521c15a28bbf46c64679c91fe46f | 4c92d33de8db36c5f7b08cf01f98914523929065 | /main.py | c83b53117dccdb80427f70bcd88eb07c8d7db7d1 | [] | no_license | rramirez0202/YouTubeUploads | 231acc5daa82619b900fafeee365a39d689a0319 | 958598bed97972cac3422b799547a199e84482b5 | refs/heads/master | 2021-01-20T08:37:03.374370 | 2017-05-03T15:49:57 | 2017-05-03T15:49:57 | 90,164,685 | 0 | 0 | null | 2017-05-03T15:49:59 | 2017-05-03T15:29:52 | Python | UTF-8 | Python | false | false | 1,020 | py | from code.settings import getsettings
from code.main_process import process_files
from code.youtube import get_authenticated_service
from code.youtube import VALID_PRIVACY_STATUSES
from code.youtube import verify_oauth_file
from oauth2client.tools import argparser
if __name__ == '__main__':
settings = getsettings()
... | [
"rramirez@junkyard.mx"
] | rramirez@junkyard.mx |
794cda1493c0c94bc395f674e19e695428d06d8f | f6d528a8c93e80386334cacb0de365835bd4643d | /helpinghand/apps/users/apps.py | 71c02359e14df5d9a7c0440ec9a5108e3c5ae165 | [] | no_license | crownest/helping-hand-backend | 1dae6f08cbea51630dc8c5de41ad3056b7ca29ab | e21acea9a801d888e8202c4d891c8e7af6ce3ba5 | refs/heads/master | 2020-03-17T09:36:41.217378 | 2018-06-25T14:35:16 | 2018-06-25T14:35:16 | 133,481,634 | 0 | 0 | null | 2018-06-25T14:35:17 | 2018-05-15T08:02:44 | Python | UTF-8 | Python | false | false | 180 | py | # Django
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class UsersConfig(AppConfig):
name = 'users'
verbose_name = _('Users')
| [
"kenansubasiceng@gmail.com"
] | kenansubasiceng@gmail.com |
def6ef216599128ff8c90193cda8b0a195c15099 | 2f98aa7e5bfc2fc5ef25e4d5cfa1d7802e3a7fae | /python/python_12657.py | ef1e2b09f64753d7ec63427a2db8a2542c5a7098 | [] | no_license | AK-1121/code_extraction | cc812b6832b112e3ffcc2bb7eb4237fd85c88c01 | 5297a4a3aab3bb37efa24a89636935da04a1f8b6 | refs/heads/master | 2020-05-23T08:04:11.789141 | 2015-10-22T19:19:40 | 2015-10-22T19:19:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 149 | py | # How to convert a list of string to a list of int
a = [['1','2','3','4'],['1','2','3','4'],['1','2','3','4']]
b = [ [int(j) for j in i] for i in a]
| [
"ubuntu@ip-172-31-7-228.us-west-2.compute.internal"
] | ubuntu@ip-172-31-7-228.us-west-2.compute.internal |
fe66bf79f79838c0630592033effd98ad6668dcd | af3e249753fbf04ce10a01e4dbeab549cb4ae34d | /oscar/apps/payment/migrations/0001_initial.py | 74cbe514a99d2c7dc306bfd6f0231a03b0d6229a | [] | no_license | rwozniak72/sklep_oscar_test | 79588b57470c9245324cc5396aa472192953aeda | fb410dc542e6cb4deaf870b3e7d5d22ca794dc29 | refs/heads/master | 2020-08-12T04:55:25.084998 | 2019-10-16T21:14:08 | 2019-10-16T21:14:08 | 214,692,764 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,011 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import oscar.models.fields.autoslugfield
from django.conf import settings
from decimal import Decimal
class Migration(migrations.Migration):
dependencies = [
('order', '0001_initial'),
... | [
"rwozniak.esselte@gmail.com"
] | rwozniak.esselte@gmail.com |
2f1236e7cc8a5cdebc15106726e21d26bb8b90f2 | d70a2ce2b01bcf29852ea7e89a40dd4cbacff3bf | /bicycle/wheeltest.py | 6324e6057ae2bdc997095cfb26b2e7d14806a729 | [] | no_license | wmacevoy/oop-spring2020-public | 25db0273a00f2bc93817ac5a02a6a16baea05314 | 65719c1a672a012dc2c07586f58f676515fae5ee | refs/heads/master | 2020-12-14T02:37:08.217228 | 2020-04-21T19:41:10 | 2020-04-21T19:41:10 | 234,608,161 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,897 | py | import unittest
from wheel import Wheel
class WheelTest(unittest.TestCase):
def testDefaults(self):
wheel = Wheel()
self.assertEqual(wheel.pressure, Wheel.DEFAULT_PRESSURE)
self.assertEqual(wheel.diameter, Wheel.DEFAULT_DIAMETER)
self.assertEqual(wheel.burst, False)
self.... | [
"wmacevoy@gmail.com"
] | wmacevoy@gmail.com |
9efb3f93e9ee537a7297fca7ff58648f951ec5c8 | 936142752d97c392e374a6209cb3409fb96f6d87 | /globalCounter/client/counter_client.py | 582b765e77a69992ed8a9b249b9caa1ff18374fe | [
"MIT"
] | permissive | aratz-lasa/globalCounter | e45ea509c0f2b250b642c201ff9e7efc4b06eb1d | 9ac0841b0e7d1bc71cd6205649c1b07bcf77e01f | refs/heads/master | 2020-04-29T13:25:01.950207 | 2020-03-03T18:54:37 | 2020-03-03T18:54:37 | 176,168,422 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,561 | py | import socket
from typing import Any
from ..protocol.methods import build_message, parse_msg
from ..protocol.models import *
from ..various.exceptions import MessageDataType, CounterUDPConnection, CounterTCPConnection
SERVER_IP = "127.0.0.1"
SERVER_PORT = 5555
def count(topic: str = "default",
tcp: bool =... | [
"aratzml@opendeusto.es"
] | aratzml@opendeusto.es |
fab4b9fc74e759fcfdb8c2b8424ca4298102d1f6 | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /benchmark/startQiskit_Class2513.py | ae4c7acd886d21af9e7cfcba5f5b22d206edd3f4 | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/QDiff | ad53650034897abb5941e74539e3aee8edb600ab | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | refs/heads/main | 2023-08-05T04:52:24.961998 | 2021-09-19T02:56:16 | 2021-09-19T02:56:16 | 405,159,939 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,185 | py | # qubit number=4
# total number=38
import cirq
import qiskit
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from math import log2
import numpy as np
import networkx as nx
def bitwise_... | [
"wangjiyuan123@yeah.net"
] | wangjiyuan123@yeah.net |
40e13bd632c69702f42b22e15650fd126d5f3b1d | c3082eb2adc43b311dd3c9ff16fd3ed9df85f266 | /python/examples/oop/parser/parser_globals.py | 5e3d8103c50d85e2322e318074b4dfad33970419 | [] | no_license | szabgab/slides | 78818c7138331b3ba9e221c81da3678a46efe9b3 | 63bba06678554db737602f2fbcd6510c36037e8a | refs/heads/main | 2023-08-31T07:13:51.536711 | 2023-08-29T13:17:59 | 2023-08-29T13:17:59 | 122,212,527 | 87 | 69 | null | 2023-05-19T06:55:11 | 2018-02-20T14:57:03 | Python | UTF-8 | Python | false | false | 1,601 | py | import sys
import re
import json
def main():
if len(sys.argv) != 2:
exit(f'Usage: {sys.argv[0]} FILENAME')
dom = parse(sys.argv[1])
print(json.dumps(dom, sort_keys=True, indent=4, separators=(',', ': '), ensure_ascii=False))
def parse_verbatim(line):
global in_verbatim
global text
glo... | [
"gabor@szabgab.com"
] | gabor@szabgab.com |
2344d2dd4e805735383740a6bf84a7d7d8b277d3 | 1a5a9bfa6ee62c328fc6ab828ad743c555b0f23a | /catagory/DataStructure/LinkedList/0096-partition-list.py | 3bbf89fa391675d4de9fc9839516b97d89db1646 | [] | no_license | zzy1120716/my-nine-chapter | 04b3e4d43a0d8086e5c958b81a3dc4356622d65f | c7bf3eed366b91d6bdebb79d0f11680cf7c18344 | refs/heads/master | 2020-03-30T03:07:14.748145 | 2019-05-15T13:07:44 | 2019-05-15T13:07:44 | 150,670,072 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,258 | py | """
96. 链表划分
给定一个单链表和数值x,划分链表使得所有小于x的节点排在大于等于x的节点之前。
你应该保留两部分内链表节点原有的相对顺序。
样例
给定链表 1->4->3->2->5->2->null,并且 x=3
返回 1->2->2->4->3->5->null
"""
# Definition of ListNode
class ListNode(object):
def __init__(self, val, next=None):
self.val = val
self.next = next
# 小于x的节点,大于x的节点,分别组成一个链表
# 遍历完原始链... | [
"zzy1120716@126.com"
] | zzy1120716@126.com |
c9df605fd0e8da5e5196596ea0238cf371b7b134 | 6ceeb3adb08da8754f59a117f39d401948988f0a | /datadog_checks_dev/datadog_checks/dev/conditions.py | c7fb7f0fc750adbd941b35ac88c198a45ce5d3a0 | [
"BSD-3-Clause",
"BSD-3-Clause-Modification",
"MIT",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"LGPL-2.1-only",
"LGPL-3.0-only",
"CC0-1.0",
"Unlicense",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Smartling/integrations-core | 794c3822f05c772c7e36fdde8b68c8c3284e71e3 | 79088364600aa8f06ec38500800f3803db77feed | refs/heads/master | 2023-04-15T14:21:50.017308 | 2023-04-11T20:13:26 | 2023-04-11T20:13:26 | 159,552,127 | 0 | 1 | BSD-3-Clause | 2023-04-07T16:38:06 | 2018-11-28T19:14:55 | Python | UTF-8 | Python | false | false | 7,645 | py | # (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import re
import socket
import time
from contextlib import closing
from typing import Callable, Dict, List, Tuple, Union # noqa: F401
from six import string_types
from six.moves.urllib.request import url... | [
"noreply@github.com"
] | Smartling.noreply@github.com |
ed4753b2e8d9477c161312706d567f581f1e1655 | 632fc698a1c1a8aa24ec488273e6c26301dfeb37 | /main/tasks.py | 2924784f8b2fbb0cf9923ea29ba3a0cddd6dbb3d | [
"MIT"
] | permissive | sirodoht/martianpins | 8ffcb9bbb41062438ae7e6114c1b68ead7411c6a | 533c8ba38919f5121aa3de87d915d2e126b1ecd6 | refs/heads/master | 2022-01-25T16:48:07.422556 | 2022-01-18T00:08:38 | 2022-01-18T00:08:59 | 226,012,519 | 32 | 10 | null | 2020-05-08T17:05:43 | 2019-12-05T03:59:52 | Python | UTF-8 | Python | false | false | 1,901 | py | import requests
from background_task import background
from main import models
@background(schedule=1)
def ipfs_add(ipfs_file_name, ipfs_file_path, user_id):
with open(ipfs_file_path, "rb") as f:
response = requests.get(
f"http://localhost:5001/api/v0/add?arg=" + ipfs_file_path,
f... | [
"theodorekeloglou@gmail.com"
] | theodorekeloglou@gmail.com |
251f713b4d8605870ff005d271b25bfdcbef1648 | b8499374bb898dbf9afad0ade2ffd2b04ada45eb | /keygen/currencies/club_crypto_coin_service.py | 7699dfbd02bfe373c7d154428ecf83eb4d7c4842 | [] | no_license | ReardenMetals/csc-manager | 577544c78195bdf34052faa6c39e734a55bea056 | dfc5bcfa528cf0b58cf1fed347ad9710cd73a34f | refs/heads/master | 2023-06-05T04:07:57.094735 | 2021-06-24T10:07:51 | 2021-06-24T10:07:51 | 348,265,376 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,382 | py | from bip_utils.utils import CryptoUtils
from keygen.crypto_coin import CryptoCoin
from keygen.crypto_coin_service import CoinService
from bip_utils import Bip39MnemonicGenerator, Bip39SeedGenerator, Bip44, Bip44Coins, Bip44Changes, WifDecoder, DashConf, \
Base58Encoder, NetVersions, WifEncoder
from keygen.wif_va... | [
"bohdan.shlikhutka@gmail.com"
] | bohdan.shlikhutka@gmail.com |
000abffc03a4c5129268a71db52b1f4ff37e2041 | 8ef8e6818c977c26d937d09b46be0d748022ea09 | /cv/distiller/CWD/pytorch/mmrazor/configs/pruning/mmpose/dcff/dcff_topdown_heatmap_resnet50_coco.py | d18bccc02767e297a19a2ed84052b46f25db2e45 | [
"Apache-2.0"
] | permissive | Deep-Spark/DeepSparkHub | eb5996607e63ccd2c706789f64b3cc0070e7f8ef | 9d643e88946fc4a24f2d4d073c08b05ea693f4c5 | refs/heads/master | 2023-09-01T11:26:49.648759 | 2023-08-25T01:50:18 | 2023-08-25T01:50:18 | 534,133,249 | 7 | 6 | Apache-2.0 | 2023-03-28T02:54:59 | 2022-09-08T09:07:01 | Python | UTF-8 | Python | false | false | 6,551 | py | _base_ = [
'mmpose::_base_/default_runtime.py',
]
train_cfg = dict(max_epochs=300, val_interval=10)
optim_wrapper = dict(optimizer=dict(type='Adam', lr=5e-4), clip_grad=None)
# learning policy
param_scheduler = [
dict(
type='LinearLR', begin=0, end=500, start_factor=0.001,
by_epoch=False), # ... | [
"mingjiang.li@iluvatar.ai"
] | mingjiang.li@iluvatar.ai |
c7ea61f04b5f81a0b63eaf7ed43f0d83f1cbae4b | 15d6c85a63d9423e9de3c1f47ec5bf979d9ff321 | /qnow_client/migrations/0014_auto_20190820_1120.py | b0445732df6cfed809e1ad445d814e469efa19c0 | [] | no_license | lgerardlucas/quotation-now | 6916b8e5f7540ac8bfafedef87c2ede8e08a815c | c0d29261281d3dd44be3bc76b79a40acd160c098 | refs/heads/master | 2022-12-10T08:46:06.533049 | 2020-10-26T21:37:18 | 2020-10-26T21:37:18 | 227,605,156 | 1 | 0 | null | 2022-12-08T06:20:23 | 2019-12-12T12:45:30 | HTML | UTF-8 | Python | false | false | 730 | py | # Generated by Django 2.2.2 on 2019-08-20 14:20
import cloudinary.models
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('qnow_client', '0013_auto_20190820_1116'),
]
operations = [
migrations.AlterField(
model_name='quotation',
... | [
"lgerardlucas@gmail.com"
] | lgerardlucas@gmail.com |
d4c13d0ca0e606a0c5d97a63219cb48d14b2feef | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/413/usersdata/315/79997/submittedfiles/av1_programa1.py | ea9defb3f205bbae48e580f3735135094f029ccd | [] | 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 | 176 | py | # -*- coding: utf-8 -*-
n = int(input('Digite um numero inteiro: '))
if n%3==0 and n%7==0:
print('DIVISIVEL POR 3 E POR 7')
else:
print('NAO DIVISIVEL POR 3 E POR 7')
| [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
5e7ec944739c9b2275fb3ec7ed331f68c20d3479 | d1fb8bb087564052674cb33ac6d75daca4ae586a | /VMWare/588. Partition Equal Subset Sum.py | 4599873656faab59a59f4c881b49d1e9c7f8dbc3 | [] | no_license | YunsongZhang/lintcode-python | 7db4ca48430a05331e17f4b79d05da585b1611ca | ea6a0ff58170499c76e9569074cb77f6bcef447a | refs/heads/master | 2020-12-24T03:05:43.487532 | 2020-01-30T19:58:37 | 2020-01-30T19:58:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 702 | py | class Solution:
"""
@param nums: a non-empty array only positive integers
@return: true if can partition or false
"""
def canPartition(self, nums):
if not nums:
return False
target = sum(nums)
if target % 2 == 1:
return False
n, m = len(nums... | [
"haixiang6123@gmail.com"
] | haixiang6123@gmail.com |
280ff16861a44300de6dbf416336b3aad3af9289 | 31da199014d3fcbfa697c65743ceff554bd2bb75 | /cabinet/apps.py | 6afdf9dfc8a417c01aa08774c7f159db8fbf9e86 | [
"BSD-2-Clause"
] | permissive | barseghyanartur/django-cabinet | 59c12d7e3aab80f6dd44ad1c6b53ceb85dd5bc5f | 38b4732c9b00d21718216271a2572a19ea35d25c | refs/heads/master | 2021-08-28T07:49:56.394240 | 2017-12-11T15:21:17 | 2017-12-11T15:21:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 191 | py | from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class CabinetConfig(AppConfig):
name = 'cabinet'
verbose_name = _('Cabinet media library')
| [
"mk@feinheit.ch"
] | mk@feinheit.ch |
33f211f2dcff6b91fd7e6179fdab9b5e45d3e5f0 | 66fe6eb64afeb7313a4c7685a8748455325b6726 | /225-implement-stack-using-queues.py | 63b2b87c487644b2f3f603cb9693b5c2faaa14da | [] | no_license | anantkaushik/leetcode | b54eb27b17ed95b02ab426392208c346f2d87aaa | 06f0a6dbff2e2062fa4568efa5f01ad982d6ac94 | refs/heads/master | 2022-03-07T18:21:35.881943 | 2022-02-23T12:27:24 | 2022-02-23T12:27:24 | 120,501,367 | 40 | 13 | null | 2019-10-11T11:07:22 | 2018-02-06T18:05:51 | Python | UTF-8 | Python | false | false | 1,898 | py | """
Problem Link: https://leetcode.com/problems/implement-stack-using-queues/
Implement the following operations of a stack using queues.
push(x) -- Push element x onto stack.
pop() -- Removes the element on top of the stack.
top() -- Get the top element.
empty() -- Return whether the stack is empty.
Example:
MyStack... | [
"anant.kaushik2@gmail.com"
] | anant.kaushik2@gmail.com |
e91bf14192dfd5efae3b02a3358720ecce1feaa2 | 2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02 | /PyTorch/contrib/cv/detection/GFocalV2/configs/mask_rcnn/mask_rcnn_x101_32x8d_fpn_1x_coco.py | fd9d0be5945fb787f5cb595dcc00c38ba9d2d065 | [
"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 | 2,653 | py | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law or agreed to in ... | [
"wangjiangben@huawei.com"
] | wangjiangben@huawei.com |
44db075d599918fdcde16679abc2503b16991484 | 51b74a1aa27239664cfea20b36e37a0238af987f | /Practice/RRSTONE.py | 50227667c4e46b1393a150bdc704de5fd3166466 | [
"MIT"
] | permissive | anirudhkannanvp/CODECHEF | 2812c32caafe024bda6a167e5b5f57d9037ea8de | 6d108058c11207caa2e35e471ba88f84c0ea9774 | refs/heads/master | 2021-01-21T23:48:08.374678 | 2018-04-03T16:29:26 | 2018-04-03T16:29:26 | 102,181,572 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 276 | py | n,k=map(int,input().split())
arr=list(map(int,input().split()))
maxi=max(arr)
a=[]
b=[]
for i in range(n):
a.append(maxi-arr[i])
maxi=max(a)
for i in range(n):
b.append(maxi-a[i])
if(k==0):
print(*arr)
elif(k%2==0):
print(*b)
else:
print(*a) | [
"noreply@github.com"
] | anirudhkannanvp.noreply@github.com |
aac4bf34883f581836020c5b0c1a5e103469dc31 | 06d46994d64fd437e3f97a54a55afa284b84a30b | /tests_unfinished/put_item_populated_table_3f1i/setup.py | ef9147dfa8e988d934a388350b115e583729403a | [] | no_license | chjwang/magnetodb-test-bench | 8a61b1dadd174e9f8af5c2f84b6328556f43ec0d | 3fb793bed0ba50f0170803795b2a462cbf968fb6 | refs/heads/master | 2020-12-25T02:39:38.904795 | 2014-11-19T15:05:59 | 2014-11-19T15:05:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,979 | py | import random
import string
import sys
import json
import requests
import time
import queries as qry
import config as cfg
def get_token_project(keystone_url, user, password, domain_name, project_name):
body = qry.GET_TOKEN_RQ % (domain_name, user, password, domain_name, project_name)
resp = requests.post(keys... | [
"charles_wang@symantec.com"
] | charles_wang@symantec.com |
ea077e7fcf77397893ec77bcff99ae0e3251abf0 | 4ad178e48194ff513dc85b5e3527871bca9d3d91 | /introduction_course/lesson6/task4/tests.py | aaca8bf242a2465e711cef566ffd242774cbb350 | [] | no_license | ktisha/pycharm-courses | 63bfc079212b520de2d233a438702ad254d6697f | 6aeb465cc16e53a91a7cf7fa0d0bf4dff7b34698 | refs/heads/master | 2021-01-18T20:47:58.027576 | 2014-10-22T12:13:42 | 2014-10-22T12:13:42 | 25,579,506 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 349 | py | from test_helper import run_common_tests, passed, failed, get_task_windows
def test_window():
window = get_task_windows()[0]
if "elephant" in window and "animal" in window:
passed()
else:
failed("Use == to check that animal is equal to 'elephant'")
if __name__ == '__main__':
run_com... | [
"Ekaterina.Tuzova@jetbrains.com"
] | Ekaterina.Tuzova@jetbrains.com |
85e22ecd380cfa0fc928bb493af2ae7715181a48 | 68d164a41196919cd492040506b03e8037520fe5 | /coding140.py | 5a63b9118632594ac113e8063dc5bde2695105d5 | [] | no_license | sandipsinha/python_bits | 312a85860177fb896ebf8e37d538249240dfb7a9 | c8a0db8f69ba5c6d89fefcfd30f49170dd3290cf | refs/heads/master | 2016-09-13T14:48:04.808083 | 2016-05-06T04:56:21 | 2016-05-06T04:56:21 | 58,181,217 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 368 | py | from collections import defaultdict
from decimal import Decimal
import sys
n=int(raw_input())
k=defaultdict(dict)
for x in range(n):
m=sys.stdin.readline()
l=m.strip('\n').split(' ')
k[l[0]]=[int(item) for item in l[1:]]
name=raw_input()
if name in k:
print sum(k[name])*1.00
print len(k[name])
... | [
"amsandip@yahoo.com"
] | amsandip@yahoo.com |
44e6212adc8a139343421814cd5d2094e75ce5ff | af6e7f0927517375cb4af833f4c52e301bad0af5 | /corpus_processor/sogou_news_processor.py | a3aca8fd8ab3293f575de0eb3f274ebf67636207 | [] | no_license | wolfhu/DialogPretraining | 470334fd815e1299981b827fdc933d237a489efd | eeeada92146d652d81ca6e961d1298924ac8435d | refs/heads/main | 2023-06-25T15:22:54.728187 | 2021-07-21T01:40:23 | 2021-07-21T01:40:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 496 | py | # encoding: utf-8
import sys
import zhconv
from util import str_util
if __name__ == '__main__':
while True:
line = sys.stdin.readline()
if line:
line = line.strip()
line = zhconv.convert(line, 'zh-cn')
line = line.replace('<content>', '')
line = line.replace('</conten... | [
"yuwu1@microsoft.com"
] | yuwu1@microsoft.com |
238f6712252b9ebd395fdfbb46504e4062192104 | 1c5f4a13a5d67201b3a21c6e61392be2d9071f86 | /.VirtualEnv/Lib/site-packages/influxdb_client/domain/notification_rule_update.py | 6a174ea13e783b99a5222d4ad180762ff004ac7e | [] | no_license | ArmenFirman/FastAPI-InfluxDB | 19e3867c2ec5657a9428a05ca98818ca7fde5fd0 | b815509c89b5420f72abf514562e7f46dcd65436 | refs/heads/main | 2023-06-24T20:55:08.361089 | 2021-07-29T00:11:18 | 2021-07-29T00:11:18 | 390,462,832 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,336 | py | # coding: utf-8
"""
Influx OSS API Service.
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: 2.0.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class NotificationRul... | [
"42990136+ArmenFirman@users.noreply.github.com"
] | 42990136+ArmenFirman@users.noreply.github.com |
57768076e7a412527051858d4c6c9ce58faf8b9a | 3362c357f23e5896272b5d346ec4497d6e3fd3b2 | /c05/p159.py | 8a295a820c6847c4c45446bace554cb67e9397bc | [
"Apache-2.0"
] | permissive | HiAwesome/python-algorithm | 91a7999d73af56ff32e87a8930964b7939aae84d | eda61b52b4b25940caf58a40641122772b8c9203 | refs/heads/master | 2023-01-07T12:26:34.337735 | 2020-11-05T06:18:12 | 2020-11-05T06:18:12 | 261,923,454 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 507 | py | def orderedSequentialSearch(alist, item):
pos = 0
found = False
stop = False
while pos < len(alist) and not found and not stop:
if alist[pos] == item:
found = True
elif alist[pos] > item:
stop = True
else:
pos += 1
return found
if __nam... | [
"moqimoqidea@gmail.com"
] | moqimoqidea@gmail.com |
74a50ab25d3e8c8d0880e52efc29b68d7b5b7728 | 540fbe861329ee60ae3db45c1508cdfac404697c | /pythinkutils/aio/redis/AioRedisLock.py | 58986d8740f3ff5db7248ecbec9ed2248eb421c8 | [] | no_license | ThinkmanWang/Think-DJango-OAuth | 1a2420039a4054f6b4aac43dc45edde699bba1cf | 48222bf303e76273733de4f5bde5436aac93355f | refs/heads/master | 2020-07-28T02:40:55.792069 | 2019-09-20T08:49:32 | 2019-09-20T08:49:32 | 209,283,038 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,091 | py | # -*- coding: UTF-8 -*-
import sys
import os
import uuid
import time
import asyncio
from pythinkutils.common.datetime_utils import *
from pythinkutils.common.StringUtils import *
class AioRedisLock(object):
@classmethod
def mk_key(cls, szName):
return "lock:" + szName
@classmethod
async de... | [
"wangxf1985@gmail.com"
] | wangxf1985@gmail.com |
89a806193755c20012ad0037814dcffe9a9aec47 | 6f7ba68d9e2ba6cfc7f07367bcd34a643f863044 | /cms/gpower/gpower_users_disclosure.py | 75b134a1c3a915ea9ad853ff4ae3f3ef10e2df6b | [] | no_license | deepwebhacker/Dxscan | 2e803ee01005a1d0a7802290bfb553f99e8fcf2e | eace0872e1deb66d53ec7cfc62f4c793f9421901 | refs/heads/main | 2023-03-06T10:26:23.371926 | 2021-02-22T14:03:51 | 2021-02-22T14:03:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,298 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
name: 通元建站系统用户名泄露漏洞
referer: http://www.wooyun.org/bugs/wooyun-2010-059578
author: Lucifer
description: 未做权限过滤,可以显示所有用户的用户名
'''
import sys
import requests
import warnings
from termcolor import cprint
class gpower_users_disclosure_BaseVerify:
def __init__(self, url)... | [
"noreply@github.com"
] | deepwebhacker.noreply@github.com |
0ca7345656816e54181f44ac6cb972af09bdda72 | f2889a13368b59d8b82f7def1a31a6277b6518b7 | /148.py | ea8cd4ccbe38ed6cb2e5e79e2bd3910dd620881f | [] | no_license | htl1126/leetcode | dacde03de5c9c967e527c4c3b29a4547154e11b3 | c33559dc5e0bf6879bb3462ab65a9446a66d19f6 | refs/heads/master | 2023-09-01T14:57:57.302544 | 2023-08-25T15:50:56 | 2023-08-25T15:50:56 | 29,514,867 | 7 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,277 | py | # Definition for singly-linked list.
class ListNode(object):
def __init__(self, x):
self.val = x
self.next = None
class Solution(object):
def sortList(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
if not head:
return None
... | [
"b93902098@ntu.edu.tw"
] | b93902098@ntu.edu.tw |
2d528af3aceb5e622c751529b5c97dc08497fc96 | 948d84d2e3fc04e353a11384d8570308174242f5 | /22-Masaüstü Uygulaması Geliştirme PyQt5/_checkbox.py | 389ce85c8eab7d6b386a26184fd2e6410ebcff2a | [] | no_license | omerfarukcelenk/PythonMaster | a0084a800b8a41cd2ad538a7ca3687c26dc679ec | 0db8f8b0ea2e1c2d810c542068cfcf1a3615f581 | refs/heads/main | 2023-04-16T17:42:05.501904 | 2021-04-26T21:19:27 | 2021-04-26T21:19:27 | 361,896,109 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,389 | py | import sys
from PyQt5 import QtWidgets
from _checkboxForm import Ui_MainWindow
class myApp(QtWidgets.QMainWindow):
def __init__(self):
super(myApp, self).__init__()
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
self.ui.cbSinema.stateChanged.connect(self.show_state)
self.... | [
"omerfar0133@gmail.com"
] | omerfar0133@gmail.com |
8070af834af8a96b3e626c8d84de97b123cf2d07 | 329132ae16449417e959cd7bf5a638e9fd155067 | /爬虫5day/tencent/tencent/pipelines.py | 18498bd338771cb62a44ce432db655c3e431645e | [] | no_license | rj8928/Spider | c9e635d8b46dbc5d26a4b13128c277b3ff2f2f80 | 2e4fb691637a542452028fa92ac490129d0eebba | refs/heads/master | 2021-01-16T19:36:18.902753 | 2017-08-14T12:28:03 | 2017-08-14T12:28:03 | 100,179,329 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 578 | py | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
import json
class TencentPipeline(object):
def __init__(self):
self.filename = open('tencent.json','w')
def... | [
"rj8928@gmail.com"
] | rj8928@gmail.com |
edb009027737d9b8052b8624b4261bbcc5d78d26 | c184a05109156a6b7d4ea8bb7926a82c350817ed | /basedjango/settings.py | bbbc7cf6c03fd46f6d76ea852a46c1211cb7eab3 | [] | no_license | eng-olavo/basedjango | 451cffba5c1434e2bba9a9cb620f0ed3aef99cfe | 4b07b1dec596f4fc778f69b5349397bfd1165bdf | refs/heads/master | 2023-08-18T13:49:45.713423 | 2021-10-21T20:53:51 | 2021-10-21T20:53:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,539 | py | """
Django settings for basedjango project.
Generated by 'django-admin startproject' using Django 3.2.8.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from path... | [
"olavo.melo.br.DIO@gmail.com"
] | olavo.melo.br.DIO@gmail.com |
2daf17300bf86a857d30cf4dcc23bff496fc6b39 | 602424301ddf75431cdba5f0796cfef0ed1c408c | /authenticator/views.py | 92fca5f6856e2a22d3c25b2c8988098b43652200 | [] | no_license | Eternlyours/bem-store-v1 | a5a8e073a7c7d336f947257b2a3ee05dfc276f41 | 3fa3714f7d00210ee8c8f33dfe28f1958ecb7bfa | refs/heads/master | 2023-06-18T21:11:29.825655 | 2021-07-17T15:54:07 | 2021-07-17T15:54:07 | 386,764,979 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,255 | py | import requests
from django.contrib import messages
from django.contrib.auth import authenticate, login, update_session_auth_hash
from django.utils.decorators import method_decorator
from django.contrib.auth.forms import PasswordChangeForm, UserChangeForm
from django.contrib.auth.views import LoginView, LogoutView
from... | [
"Nazmetdinov2001@yandex.ru"
] | Nazmetdinov2001@yandex.ru |
1186090a872d623773bb31b7b2c5a524ba93edb5 | 2d5aa034c41176e094e03d54771eb606f9d77fd6 | /gameobjects/paddle.py | e1cd8b11015f998c279aa01c6dc555698b66f13f | [] | no_license | asimonia/Brickout | ece6fc8132d3a656ba2626660e7134ee2490d8ce | 727c252c3c06b4be91dd943df8fdf0d3a5c24928 | refs/heads/master | 2021-01-17T17:35:50.803884 | 2017-03-16T17:02:43 | 2017-03-16T17:02:43 | 64,889,308 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,015 | py | from .gameobject import GameObject
class Paddle(GameObject):
def __init__(self, canvas, x, y):
self.width = 80
self.height = 10
self.ball = None
item = canvas.create_rectangle(x - self.width / 2,
y - self.height / 2,
x + self.width / 2,
y + self.height / 2,
fil... | [
"alex.simonian@gmail.com"
] | alex.simonian@gmail.com |
b65abc89813d933027bdfca8a1594a01f36a52f3 | ecd630f54fefa0a8a4937ac5c6724f9a3bb215c3 | /projeto/avalista/migrations/0016_auto_20200909_1820.py | ef695b1a0056c64d8df7adfbcd385ddd26721c94 | [] | no_license | israelwerther/Esctop_Israel_Estoque | 49968751464a38c473298ed876da7641efedf8de | d6ab3e502f2a97a0d3036351e59c2faa267c0efd | refs/heads/master | 2023-01-07T20:21:38.381593 | 2020-11-12T17:35:14 | 2020-11-12T17:35:14 | 258,642,721 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 586 | py | # Generated by Django 3.0.7 on 2020-09-09 18:20
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0002_auto_20200909_1739'),
('avalista', '0015_remove_avalista_fiador_obs_bancaria'),
]
operations =... | [
"israelwerther48@outlook.com"
] | israelwerther48@outlook.com |
c185a646a6ab52153a8f23a02f0b1c89f95aafb1 | 83f9454342304d396910ce1230bfb3c61b535868 | /pygamestartercode-SpencerK72-master/01-MovingSmile/ExampleGameLoop.py | 1e63a5be728156565f691ce4664fc832291deef3 | [
"MIT"
] | permissive | rhit-catapult/2021-session2-individual-repos | ce3016549f6e80532c601318aeb3595cf8fa1a24 | f3afc0503c658737791794ad8506eaf13469f9ce | refs/heads/main | 2023-06-21T16:54:02.781289 | 2021-07-16T20:07:14 | 2021-07-16T20:07:14 | 386,750,928 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,094 | py | # The below two lines constitute what tools we will be using from the toolbox
# that python provides us with. We will be using the pygame tool as well as
# the sys tool. pygame is the big hammer we will use to build our game and
# capture our events (like key presses, mouse movements, etc.). sys is a small
# tool that ... | [
"fisherds@rose-hulman.edu"
] | fisherds@rose-hulman.edu |
bfd8e3490c097d798fd08e3002c05425fb04d388 | eab972d352af1907782abedd9b2a26263bba090a | /app/user/tests/test_views.py | 303921698e7db1cdddb653b30107711fac288891 | [] | no_license | luccasPh/django-challenge-001 | 58dca28d6d1b315f5b964151a67147116290c944 | 5bd29a725c4782b7ed555165800522c8ae3728e9 | refs/heads/main | 2023-05-03T04:01:16.482693 | 2021-05-23T14:17:58 | 2021-05-23T14:17:58 | 368,567,383 | 0 | 0 | null | 2021-05-18T14:48:42 | 2021-05-18T14:48:41 | null | UTF-8 | Python | false | false | 4,189 | py | from django.test import TestCase
from django.urls import reverse
from django.contrib.auth import get_user_model
from rest_framework.test import APIClient
from rest_framework import status
SIGNUP_USER_URL = reverse("sign-up")
LOGIN_USER_URL = reverse("login")
class UserViewTests(TestCase):
def setUp(self):
... | [
"lucas4pinheiro@gmail.com"
] | lucas4pinheiro@gmail.com |
2bd7954b1de681a8af2eae7058f81b8b5c5f7363 | bfe167281141fb3aee56566f3bdaea880dbc9fd6 | /docs/conf.py | 4dd6e615c9c1457dc0e3f3d876f1e191ade4e7af | [
"BSD-3-Clause"
] | permissive | FuzzyFrequency/django-blog-zinnia | b5ccddb977019b3ffa7ce361dcad1b62f206d87c | 9be78c2c434c907fdcc0f3a349260e604d4fcaca | refs/heads/master | 2021-01-18T10:44:30.963184 | 2012-10-04T16:35:04 | 2012-10-04T16:35:04 | 3,064,258 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,316 | py | # -*- coding: utf-8 -*-
#
# django-blog-zinnia documentation build configuration file, created by
# sphinx-quickstart on Thu Oct 21 17:44:20 2010.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated fi... | [
"fantomas42@gmail.com"
] | fantomas42@gmail.com |
45b8b63f06f2d53494c136d09105335e56246997 | 3fd3da4f11a251cc43d44d1d61ff2ffe5c82a4ce | /tensor_coderef/TfExercise/train07/3. 队列操作.py | 4a686dbefd6c27f3c9e41fead46d91f645b94b45 | [] | no_license | dumpinfo/TsBook | d95faded917bce3e024e77ff06afd30717ed9ef4 | 8fadfcd2ebf935cd49784fd27d66b2fd9f307fbd | refs/heads/master | 2023-05-27T07:56:24.149421 | 2019-07-31T20:51:52 | 2019-07-31T20:51:52 | 198,481,031 | 1 | 3 | null | 2023-05-22T21:13:31 | 2019-07-23T17:47:19 | Jupyter Notebook | UTF-8 | Python | false | false | 1,020 | py | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import tensorflow as tf
# #### 1. 创建队列,并操作里面的元素。
# In[2]:
q = tf.FIFOQueue(2, "int32")
init = q.enqueue_many(([0, 10],))
x = q.dequeue()
y = x + 1
q_inc = q.enqueue([y])
with tf.Session() as sess:
init.run()
for _ in range(5):
v, _ = sess.run([x, q_... | [
"twtravel@126.com"
] | twtravel@126.com |
a70cf0f11b49806b0384414e4e77461f1e9eca69 | b5cdfaccd2d1a96068be10e77fe051841e8ffbd5 | /ctrModels/layers/WideModule.py | 81e70c301ed3c8b5c01611e6621976f165bd0431 | [] | no_license | gctian/RecommendRelative | a56a18eb36e6deeeb093b6356ebd9c3e16a3f3c5 | 31ec4530ae8bbb21fb2b88559b649458c2336df1 | refs/heads/master | 2022-04-09T12:53:19.902132 | 2020-03-05T03:46:01 | 2020-03-05T03:46:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 783 | py | import torch
import torch.nn as nn
class LinearModule(nn.Module):
def __init__(self, wide_dim, output_dim=1):
super(LinearModule, self).__init__()
self.wider_linear = nn.Linear(wide_dim, output_dim)
def forward(self, X):
out = self.wider_linear(X.float())
return out
class FM... | [
"yangjieyu@zju.edu.cn"
] | yangjieyu@zju.edu.cn |
cbf9adcd661ef2aba736cdf6c6a5022a3ad61e79 | 4a691e384a95e725d39c8d77d1ae8dfd0d24b58d | /baconian/test/tests/test_core/test_core.py | c42c884f08ade2c8a03b54190c939ccaf284c61c | [
"MIT"
] | permissive | Shaluols/baconian-project | f51f16012dc360bcd754c5e162b1e462a4a27600 | 32aafd0895942435f5cebb051c5cd04f19665baf | refs/heads/master | 2022-02-15T03:10:37.295958 | 2019-07-29T05:09:58 | 2019-07-29T05:09:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,601 | py | from baconian.config.global_config import GlobalConfig
from baconian.test.tests.set_up.setup import BaseTestCase
from baconian.common.error import *
from baconian.algo.dynamics.reward_func.reward_func import RandomRewardFunc
from baconian.core.core import Basic
from baconian.common.error import *
class TestCore(BaseT... | [
"lukedong123@gmail.com"
] | lukedong123@gmail.com |
3e65844df80f6dc1013beca4f4932eb5adb1bc66 | a37dd35ca10458424bc694c3c1d82dc36397f7c4 | /tootieapp/admin.py | d58a0538820772090bd51e8cb73b312cdf8171a4 | [] | no_license | eileendwyer/faux_craigslist | 6675c5464d4dac9d6d2add1b19f86386fd5bf1ab | 9c17091927a06ca331bf66e7d6723e000a916369 | refs/heads/master | 2021-01-20T17:12:35.331043 | 2016-06-25T18:28:56 | 2016-06-25T18:28:56 | 61,836,608 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 219 | py | from django.contrib import admin
from tootieapp.models import Category, Posting, Village, Profile
admin.site.register (Category)
admin.site.register(Posting)
admin.site.register(Village)
admin.site.register(Profile)
| [
"eolson@smalltalku.com"
] | eolson@smalltalku.com |
c8bd2f05718bb63bf756b68980aee9da02629d32 | 99957191a9c3b571865a37cbef17acc9765f9082 | /vendor/packages/sphinx/sphinx/builders/texinfo.py | 39499e6666f99d05f758da68afdff9c929b41042 | [
"BSD-3-Clause",
"LicenseRef-scancode-secret-labs-2011",
"BSD-2-Clause",
"Python-2.0",
"MIT"
] | permissive | paulproteus/hackbright-django | 67bd794cd447e314228dc35d5b49b03fffe6154e | 955f38a66208f4362f558d2878088fbca16071ea | refs/heads/master | 2016-09-05T23:10:21.318602 | 2014-03-08T07:01:07 | 2014-03-08T07:01:07 | 17,501,687 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 7,881 | py | # -*- coding: utf-8 -*-
"""
sphinx.builders.texinfo
~~~~~~~~~~~~~~~~~~~~~~~
Texinfo builder.
:copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from os import path
from docutils import nodes
from docutils.io import FileOutput
from docutil... | [
"asheesh@asheesh.org"
] | asheesh@asheesh.org |
bddedf61e1c0d946411856fe03f60f3a6fb5a4b2 | 8232474409e13e68aa4459ac66781144ec17945f | /code06_String/main.py | 0ce3ab2316effe20549c22c8d438cae0cae88bcf | [] | no_license | arara90/Python-FastCampusWebPythonBasic | 0d9573950e493c584c3fb1a662b7e7e3ccfeb133 | 3ab4f8265120686c0d844fba829a440eab5c33ba | refs/heads/master | 2020-04-07T11:46:56.104887 | 2019-04-04T00:43:21 | 2019-04-04T00:43:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,031 | py | ################스트링##############
test1 = "Life is too short, %s"
result1 = test1 % "You need python."
print(result1)
test2 = "Life is too short, %s %s %s"
result2 = test2 % ("You", "need", "python.")
print(result2)
################정수##############
test3 = "Life is too short, %d"
result3 = test3 % 10
print(result3)... | [
"ararajo@gmail.com"
] | ararajo@gmail.com |
52564dfe364726e1e2a8f8aef185b313f5161ab6 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /oxf7b7vroXvWBJ9Nq_16.py | 93fe62714a69b8e2c5002e70c47e7ff7d7b71fa7 | [] | 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 | 994 | py | """
We all love a little bargain.
Your function will get a price, and a load of discounts. Your job is to write
the function so that it calculates the **maximum possible** discount.
* The price is a Number.
* The load of discounts is a string like: `15%, 8, 50%`.
* So, percentages, with `%`, and amounts, wit... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
9a1efcf5de583d8ba9041497e561f4f5063525f3 | 5883449aa14eb5e8b3fa6ad4d03d1dfacc40ccee | /Amazon_Framework/DentOsTestbedLib/test/test_dent_disk_free.py | 6bdde588152f0e8de814ec8e00be36806027f754 | [
"Apache-2.0"
] | permissive | tld3daniel/testing | 826183f30d65f696e8476d4a584c4668355e0cb3 | e4c8221e18cd94e7424c30e12eb0fb82f7767267 | refs/heads/master | 2023-09-01T12:39:26.845648 | 2021-08-11T15:53:16 | 2021-08-11T15:53:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,789 | py | # Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# generated using file ./gen/model/dent/system/os/disk.yaml
#
# DONOT EDIT - generated by diligent bots
import asyncio
from dent_os_testbed.lib.os.disk_free import DiskFree
from .utils import TestDevice
def test_that_disk_free_show(capfd):... | [
"muchetan@amazon.com"
] | muchetan@amazon.com |
9a25f55f54b6dc1401ec1e0549661d99bdc08fba | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/adjectives/_astounding.py | d08cb2430686d34bd21ff3be72793d9683b96112 | [
"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 | 395 | py |
#calss header
class _ASTOUNDING():
def __init__(self,):
self.name = "ASTOUNDING"
self.definitions = [u'very surprising or shocking: ']
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.specie = 'adjectives'
def run(self, obj1, obj2):
self.jsondata[obj2] = {}
se... | [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
deeb81b98cfda359015a846069ae9d08b48787ff | ebd9c249d446d809abc9a0f3e4593f34922a1b93 | /leetcode/149_max_points_on_a_line.py | 8fc02a86d421967c4bd1c18cb36123c907ba8336 | [] | no_license | jaychsu/algorithm | ac7a9dc7366f58c635a68bc46bf1640d2f5ff16d | 91892fd64281d96b8a9d5c0d57b938c314ae71be | refs/heads/master | 2023-05-11T00:40:39.237813 | 2022-09-14T07:43:12 | 2022-09-14T07:43:12 | 106,277,156 | 143 | 39 | null | 2022-09-14T07:43:13 | 2017-10-09T11:51:48 | Python | UTF-8 | Python | false | false | 1,130 | py | # Definition for a point.
# class Point:
# def __init__(self, a=0, b=0):
# self.x = a
# self.y = b
class Solution:
def maxPoints(self, P):
"""
:type P: List[Point]
:rtype: int
"""
ans = 0
if not P:
return ans
n = len(P)
... | [
"hi@jaych.su"
] | hi@jaych.su |
6f83ad3c6cc2186ceffac40a9215442ee1c08149 | e663909cec3c4eda12bb705fce9a6dc901bb7d88 | /爬虫/day 03 bs4 save mongoDB/homework/医疗器械_保存到MongoDB.py | d3013fbae56bb29e3f1a88114d20a4fbe9c3ad9c | [] | no_license | 1284753334/learning2 | a03f293965a652883503cae420d8b1ad11ae6661 | f2fcb3c856656cc8427768b41add3ee083487592 | refs/heads/master | 2023-01-30T23:18:26.951210 | 2020-12-20T15:57:18 | 2020-12-20T15:57:18 | 315,065,804 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,823 | py | '''
案例:医疗器械网爬虫(bs4):
http://www.chinamedevice.cn/
爬取大的分类
爬取产品名称,url,封面url,产品类别,批准文号,产品规格,产品说明,生产企业,联系人,联系电话,移动电话,手机,单位地址
数据保存到 mongodb 中
获取 标签中的 文本
.get_text()
'''
import re
#
import pymongo as pymongo
import requests
from bs4 import BeautifulSoup
#
# url = 'http://www.chinamedevice.cn/'
# def down(url):
# # ... | [
"huapenghui@git.com"
] | huapenghui@git.com |
443738b6045bbf3ca8e13196040e3acd125fec7f | de1d7a3d8f29f88cc81163daf13e689b6a40f059 | /Tasksmanager/migrations/0001_initial.py | 0a51c298edc9c805cbf038c70b688cbda349c681 | [] | no_license | kelechi2020/golivecomptask | 764c8be7cdb760b492bbd203cb1831fd47ba9e0c | 76c2d3c1ad4830399be0bf41bb63731bc50fe5e6 | refs/heads/master | 2022-12-10T14:34:28.809502 | 2017-08-06T12:36:45 | 2017-08-06T12:36:45 | 98,848,170 | 0 | 0 | null | 2022-12-08T00:42:51 | 2017-07-31T04:30:17 | CSS | UTF-8 | Python | false | false | 5,007 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('auth', '0006_require_contenttypes_0002'),
]
operations = [
migrations.CreateModel(
... | [
"egbosikelechi@gmail.com"
] | egbosikelechi@gmail.com |
1326b36776094999d6e28f59bdb592ef4e770a2c | 68c1cb7e2e7b7bb4174951c817a36b16cf1e9f83 | /pytype/tools/merge_pyi/test_data/parse_error.py | f1653191a16f8d9394e5bbe52f159495d55024e1 | [
"Apache-2.0",
"MIT"
] | permissive | priyansh19/pytype | f28f439943859f61e3ce5ff51d8a56a925ae5cb8 | 44b1f6f7cddccb326abac4c21b4f26688369764e | refs/heads/master | 2020-06-19T07:11:11.508597 | 2019-07-11T18:34:08 | 2019-07-11T18:34:08 | 196,610,656 | 2 | 0 | NOASSERTION | 2019-07-12T16:23:13 | 2019-07-12T16:23:13 | null | UTF-8 | Python | false | false | 359 | py | # Copyright (c) 2016 Google Inc. (under http://www.apache.org/licenses/LICENSE-2.0)
# syntax error doesn't get detected by 2to3
def f(*): pass
# Gets parsed as:
# Node(funcdef,
# [Leaf(1, 'def'), Leaf(1, 'f'),
# Node(parameters, [Leaf(7, '('), Leaf(16, '*'), Leaf(8, ')')]),
# Leaf(11, ':'),
# ... | [
"rechen@google.com"
] | rechen@google.com |
aeb662fed5cb7727d8b95773253f383f35cc40b6 | ec8dddd8e6f57af74def9d11f73f0c4aec055c2e | /freeswitch/otp_verify/outbound.py | 997415b24578eccffae91229628e17a9ad78aa29 | [] | no_license | tnaswin/TelephonyPractice | 825eb0f510076848624b8b0d5f939942c0b75da1 | b9cca7465e3eca26e7117282517f532fe92002c2 | refs/heads/master | 2020-06-11T09:13:52.848388 | 2019-06-26T13:44:36 | 2019-06-26T13:44:36 | 193,912,614 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,965 | py | import logging
import inbound
from twisted.internet import protocol, reactor
from pyswitch import outbound
from inbound import calls
logging.basicConfig(level=logging.DEBUG, filename="outbound-example.log")
class OutboundProtocol(outbound.OutboundProtocol):
def connectComplete(self, callinfo):
self.my... | [
"aswin@lintel.in"
] | aswin@lintel.in |
e8b510654bca7e2f6823850bc409910b4ca761f7 | 7fa07d7b6b3990345ee2cff28967a5557ab9c0a4 | /inform/migrations/0002_auto_20161226_1141.py | 36779a9d232b7b742f312e75d4ffccd8a45cc367 | [] | no_license | avpakh/StatForm | 67f5fb9f923266e48061e7cb4923daec1318e6c6 | 443637145262ae8ca7ff62bd22fa9ed9deb09584 | refs/heads/master | 2021-01-22T10:56:39.117594 | 2017-02-15T11:44:52 | 2017-02-15T11:44:52 | 82,054,412 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,749 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-12-26 11:41
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('inform', '0001_initial'),
]
operations = [
migrations.AddField(
... | [
"aliaksandr.pakhomau@gmail.com"
] | aliaksandr.pakhomau@gmail.com |
ad09cfb79dce706ea851c9b0acd13c4bfee74170 | 0722dfdb07d82ac6074869838f7aa9962d4439d0 | /blog/migrations/0003_auto_20190731_1416.py | 2c16ef46d942a3db344c3c7a4d68141d007ca281 | [] | no_license | AdamC66/Aug-6th-03---Authorization-Django-Blog- | 6375cda8508d5e610c885342a346e63f25fe8472 | 5bbf53ad631e5c41193441dc0201936324d97f49 | refs/heads/master | 2020-06-30T18:51:28.927511 | 2019-08-06T20:08:24 | 2019-08-06T20:08:24 | 200,917,374 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 352 | py | # Generated by Django 2.2.3 on 2019-07-31 14:16
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('blog', '0002_comment'),
]
operations = [
migrations.RenameField(
model_name='comment',
old_name='picture',
new_n... | [
"adam.cote66@gmail.com"
] | adam.cote66@gmail.com |
4b557cc05ac738f39ba6e31ecce488e01b6ff101 | a2fab78b021469748337bdbe46d60f4b2dccf6b9 | /day05/15.函数中可以包含多个return语句.py | 756ba88550c365b5b89823991edb37ab80503c37 | [] | no_license | yywecanwin/PythonLearning | 06175886b42f6ec6be5ee8fa379365779e8e14e6 | f59d381692f22b3c7cf605aec88500f6c0267ffc | refs/heads/master | 2020-08-01T13:03:17.458829 | 2020-02-11T02:53:33 | 2020-02-11T02:53:33 | 211,006,180 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 490 | py | # -*- coding: utf-8 -*-
# author:yaoyao time:2019/12/18
"""
一个函数中可以包含多个return语句,但是在执行函数时会根据条件判断的结果,选择其中一个
return语句执行,不能同时执行两个return语句
"""
def get_num(a,b):
"""
条件判断,根据两个值大小,返回不能值
:param a:
:param b:
:return: a+b or a-b
"""
if a > b:
return a + b
return a - b
print(get_num(1,2)... | [
"3216561314@qq.com"
] | 3216561314@qq.com |
d8111e64e048d575c569fcc113f85263e6c46082 | f25501e47aec1649cda9b034e4cb8020cddc3419 | /module_pose/pose_recognition_d3.py | 6c42630b3671ccb1ef4649dfa71f5dedaebc86eb | [
"Apache-2.0"
] | permissive | sugartom/tf-pose-estimation | 71b36e3cad5ad433fba5d2980e1bc9b8e9086b34 | 84d3d87bd6c5a757e3106245440f1582b9ae0d69 | refs/heads/master | 2021-08-07T02:50:03.681594 | 2021-06-26T23:21:16 | 2021-06-26T23:21:16 | 141,059,032 | 0 | 0 | Apache-2.0 | 2018-07-15T21:16:07 | 2018-07-15T21:16:07 | null | UTF-8 | Python | false | false | 7,055 | py | from tensorflow_serving.apis import predict_pb2
from tensorflow.python.framework import tensor_util
import tensorflow as tf
from multi_classifier import MultiPersonClassifier
import pickle
class PoseRecognition:
def remove_skeletons_with_few_joints(self, skeletons):
''' Remove bad skeletons before sending to t... | [
"sugartom.hu@gmail.com"
] | sugartom.hu@gmail.com |
975246e1deea727817e457ac37ee4ebca4290b3b | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/exercism_data/python/leap/af607d75c8d1468fa73cd411475bbb24.py | e73992b43d156dd981b6da62ebc11a6eac776f80 | [] | no_license | itsolutionscorp/AutoStyle-Clustering | 54bde86fe6dbad35b568b38cfcb14c5ffaab51b0 | be0e2f635a7558f56c61bc0b36c6146b01d1e6e6 | refs/heads/master | 2020-12-11T07:27:19.291038 | 2016-03-16T03:18:00 | 2016-03-16T03:18:42 | 59,454,921 | 4 | 0 | null | 2016-05-23T05:40:56 | 2016-05-23T05:40:56 | null | UTF-8 | Python | false | false | 266 | py | def is_divisible(x, y):
return x % y == 0
def is_leap_year(year):
if is_divisible(year, 100) and not is_divisible(year, 400):
return False
elif is_divisible(year, 4) or is_divisible(year, 400):
return True
else:
return False
| [
"rrc@berkeley.edu"
] | rrc@berkeley.edu |
13196b1701902f95f75ad5b74d0405099aca036e | 85da531c07efb72b88867b75bf22d7646e112833 | /slow_daily.py | 5cd8134a637bb2cfcb26f9225c9d89f0114045f8 | [] | no_license | n1k0din/lift-service-prot | d372efd270947ac228dc17bba9235c9136b40661 | f5fa57cf64faae12fd6315e152355273ff64c686 | refs/heads/master | 2023-01-24T13:34:15.242078 | 2020-06-03T07:42:29 | 2020-06-03T07:42:29 | 263,814,239 | 0 | 0 | null | 2020-05-24T12:19:11 | 2020-05-14T04:24:18 | Python | UTF-8 | Python | false | false | 3,422 | py | import csv
from collections import defaultdict, namedtuple
from datetime import datetime, timedelta
daylift = namedtuple('daylift', ['day', 'lift'])
numi = namedtuple('numi', ['num', 'i'])
#lst = [2, 3, 3, 3, 3, 3, 3, 5, 8, 12, 17, 21, 22, 22, None, 22, 22, 23, 25, 26, 26, 26, 26, 26, 26]
# мы хотим выяснить, двигал... | [
"nik726@gmail.com"
] | nik726@gmail.com |
8a028d09d06dfd71c8eacb01fd97e5fbdc0b61e0 | e96e9990ba26757b834eeff95e8bee9b720b72aa | /django/web07/blog/models.py | 6ca12ed2c59036e7befd9420057b66d1d32f234b | [] | no_license | cuiyanan89/Python | 475a0a2778d7be5b9f6aa87ba35c21569080e056 | f742684474730e3b032aabd0151d584167c3ed02 | refs/heads/master | 2016-09-06T05:31:48.956411 | 2013-09-06T08:13:09 | 2013-09-06T08:13:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 278 | py | from django.db import models
# Create your models here.
class new(models.Model):
title = models.CharField(max_length=30)
content = models.TextField(max_length=30000)
img = models.FileField(upload_to='./images')
def __unicode__(self):
return self.title
| [
"root@yanan-Rev-1-0.(none)"
] | root@yanan-Rev-1-0.(none) |
84b3b689daba9232e0565895ad941a7ee3e6ca4b | c071eb46184635818e8349ce9c2a78d6c6e460fc | /system/python_stubs/-745935208/_ast/Bytes.py | bb7bf74ad7c07d8a0e9f36911b2f33c7de2db5b4 | [] | no_license | sidbmw/PyCharm-Settings | a71bc594c83829a1522e215155686381b8ac5c6e | 083f9fe945ee5358346e5d86b17130d521d1b954 | refs/heads/master | 2020-04-05T14:24:03.216082 | 2018-12-28T02:29:29 | 2018-12-28T02:29:29 | 156,927,399 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 365 | py | # encoding: utf-8
# module _ast
# from C:\Users\siddh\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\core\_dummy.cp37-win_amd64.pyd
# by generator 1.146
# no doc
# no imports
from .expr import expr
class Bytes(expr):
# no doc
def __init__(self, *args, **kwargs): # real signature unknown
... | [
"siddharthnatamai@gmail.com"
] | siddharthnatamai@gmail.com |
779596bafed184415e15ef25f7349d3be520bc49 | 2990b0841b63f300a722107933c01c7237a7976b | /all_xuef/程序员练级+Never/课程+Python/dabeaz+coroutines/part1-code/pipeline.py | f762bb1d7a0b51ebb3dbea462d9e8e165cf71bc2 | [] | no_license | xuefengCrown/Files_01_xuef | 8ede04751689e0495e3691fc5d8682da4d382b4d | 677329b0189149cb07e7ba934612ad2b3e38ae35 | refs/heads/master | 2021-05-15T04:34:49.936001 | 2019-01-23T11:50:54 | 2019-01-23T11:50:54 | 118,802,861 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 497 | py | # pipeline.py
#
# An example of setting up a processing pipeline with generators
def grep(pattern,lines):
for line in lines:
if pattern in line:
yield line
if __name__ == '__main__':
from follow import follow
# Set up a processing pipe : tail -f | grep python
logfile = open("acc... | [
"643472092@qq.com"
] | 643472092@qq.com |
586bdcf661341569faaf431ddb0140cc4cecb67c | 28a462a28f443c285ca5efec181ebe36b147c167 | /tests/compile/basic/es2019/Canonicalize.spec | 6b381d5ad2508ebe6ba276989372e1ada0aec675 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | kaist-plrg/jstar | 63e71f9156860dc21cccc33a9f6c638dfee448ea | 1282919127ea18a7e40c7a55e63a1ddaaf7d9db4 | refs/heads/main | 2022-07-22T08:12:34.947712 | 2022-02-27T04:19:33 | 2022-02-27T11:06:14 | 384,045,526 | 6 | 4 | NOASSERTION | 2022-02-27T11:05:26 | 2021-07-08T07:53:21 | Python | UTF-8 | Python | false | false | 950 | spec | 1. If _IgnoreCase_ is *false*, return _ch_.
1. If _Unicode_ is *true*, then
1. If the file CaseFolding.txt of the Unicode Character Database provides a simple or common case folding mapping for _ch_, return the result of applying that mapping to _ch_.
1. Return _ch_.
... | [
"h2oche22@gmail.com"
] | h2oche22@gmail.com |
03684ad94bcb9ad9621611656ac6b4fa846ae03b | 795df757ef84073c3adaf552d5f4b79fcb111bad | /test_zero/brent.py | d9a5e1043dcd182a77682cb4710d086d80df75e8 | [] | no_license | tnakaicode/jburkardt-python | 02cb2f9ba817abf158fc93203eb17bf1cb3a5008 | 1a63f7664e47d6b81c07f2261b44f472adc4274d | refs/heads/master | 2022-05-21T04:41:37.611658 | 2022-04-09T03:31:00 | 2022-04-09T03:31:00 | 243,854,197 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,600 | py | #! /usr/bin/env python
#
def brent ( fatol, step_max, prob, xatol, xrtol, xa, xb, fxa, fxb ):
#*****************************************************************************80
#
## BRENT implements the Brent bisection-based zero finder.
#
# Licensing:
#
# This code is distributed under the GNU LGPL license.
#
# Mo... | [
"tnakaicode@gmail.com"
] | tnakaicode@gmail.com |
d88d561c0ba3e8ac378ddc12e96e69a76bcda7c4 | 7889f7f0532db6a7f81e6f8630e399c90438b2b9 | /3.7.0/_downloads/cf600c14334c7d04e8a2ef88c02c9d7c/legend_picking.py | a33b9ba2088add66635353342b57fec013f79ae8 | [] | no_license | matplotlib/matplotlib.github.com | ef5d23a5bf77cb5af675f1a8273d641e410b2560 | 2a60d39490941a524e5385670d488c86083a032c | refs/heads/main | 2023-08-16T18:46:58.934777 | 2023-08-10T05:07:57 | 2023-08-10T05:08:30 | 1,385,150 | 25 | 59 | null | 2023-08-30T15:59:50 | 2011-02-19T03:27:35 | null | UTF-8 | Python | false | false | 1,533 | py | """
==============
Legend picking
==============
Enable picking on the legend to toggle the original line on and off
.. note::
This example exercises the interactive capabilities of Matplotlib, and this
will not appear in the static documentation. Please run this code on your
machine to see the interactiv... | [
"quantum.analyst@gmail.com"
] | quantum.analyst@gmail.com |
8118c65d69a1edbda244d208474897bf9043c057 | aff88e0922ae5c75f18b624cb1c81c263d12f2af | /menu_toolar_statusbar/StatusBar.py | 5133679524aa2d05a249fb2577b12541241ceebe | [] | no_license | TianJin85/Qtwindow | 44f42c8972382bcdbde7bc26a4a7f5121736e0aa | 3af712d8528d825cb3cecd6bc21c8f836232e775 | refs/heads/master | 2020-10-01T23:05:30.271773 | 2020-02-09T14:39:12 | 2020-02-09T14:39:12 | 227,642,240 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,019 | py | # -*- encoding: utf-8 -*-
"""
@File : StatusBar.py
@Time : 2019/12/28 16:28
@Author : Tianjin
@Email : tianjincn@163.com
@Software: PyCharm
"""
import sys
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
class StatusBar(QMainWindow):
def __int__(self):
super(Sta... | [
"307440205@qq.com"
] | 307440205@qq.com |
7511cf58d7511352904bc699da5717781a338745 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2714/60593/260978.py | 134c283ff6b62a6115be4522e6e048571d2262e6 | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,108 | py | import sys
class node:
le,dp,pre=0,1,-1
hsh=[0]*26
s=''
def h(self):
self.le=len(self.s)
for i in range(self.le):
self.hsh[ord(s[i])-ord('a')]+=1
def oput(self):
print(self.s)
def dfs(s):
if(s==-1):
return
dfs(ch[s].pre)
ch[s].oput()
words=[]
c... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
3cb193a6acedc222867b90e202b163aa4820233e | 9f1b8a1ada57198e2a06d88ddcdc0eda0c683df7 | /submission - Homework3/set2/RACHEL A SMOAK_11091_assignsubmission_file_Homework 3/P5.py | 9413a59da0120be3d2eefeb22cd6b02f56688c72 | [] | no_license | sendurr/spring-grading | 90dfdced6327ddfb5c311ae8f42ae1a582768b63 | 2cc280ee3e0fba02e95b6e9f45ad7e13bc7fad54 | refs/heads/master | 2020-04-15T17:42:10.781884 | 2016-08-29T20:38:17 | 2016-08-29T20:38:17 | 50,084,068 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 263 | py | #Rachel Smoak
#Homework 3
#28 February 2016
#Question 5
import sys
t = float(sys.argv[2]) #define t as third item in list
v0 = float(sys.argv[1]) #define v0 as second item in list
g = 9.81
y = v0*t-0.5*g*t**2
print "Position at v0 = ", v0, "and t = ", t, "is", y | [
"sendurr@hotmail.com"
] | sendurr@hotmail.com |
04bc1622ada62f6849cb68e3d40045d12d3a67f6 | 2d78fbd04637e786d518eeafa9769bf49b2c65a1 | /backend/home/api/v1/viewsets.py | d8a2874cd5c59074a660cdd7ea2f49d491fae7e3 | [] | no_license | crowdbotics-apps/mobile-25-august-dev-9311 | b2c8343282cb360dd5877e598439e3e446fbea62 | cbd915f654a2b3be190814c37c900e4c3a7bfed4 | refs/heads/master | 2022-12-04T05:35:13.026023 | 2020-08-25T08:57:02 | 2020-08-25T08:57:02 | 290,115,660 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,229 | py | from rest_framework import viewsets
from rest_framework import authentication
from .serializers import CustomTextSerializer, GhfghjgkjhgSerializer, HomePageSerializer
from rest_framework.authentication import SessionAuthentication, TokenAuthentication
from rest_framework.authtoken.serializers import AuthTokenSerializer... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
8a02b5881dd85ba84eb03bd53a5ab21461e2d0fc | ad149f111c51cdc5bcae67005e64c5bd87e7eaa9 | /corehq/apps/api/resources/messaging_event/utils.py | 1dc3e802c5d99d5ec44c553c1732d3c8a4cdde42 | [
"BSD-3-Clause"
] | permissive | peg-leg/commcare-hq | c99114bd5fa0e80ef8c9391f0b440b015be2847d | 885a801b93aba05319864054a2b41bdb2894bb16 | refs/heads/master | 2023-03-10T07:36:12.429688 | 2022-06-17T13:37:02 | 2022-06-17T13:37:02 | 162,175,264 | 0 | 0 | BSD-3-Clause | 2023-02-28T11:22:14 | 2018-12-17T18:46:41 | Python | UTF-8 | Python | false | false | 2,350 | py | from base64 import b64decode
from attr import attrib, attrs
from django.http import QueryDict
from django.utils.translation import gettext_lazy as _
from tastypie.exceptions import BadRequest
LIMIT_PARAM_ERROR_MESSAGE = _("Invalid limit '{value}' provided. Please provide a positive integer.")
def get_limit_offset(... | [
"skelly@dimagi.com"
] | skelly@dimagi.com |
d23b3dea9ed4e9a2599224c578fa4c820beb35b9 | eb136fec7f6dfcb11834cc0cd4d3daec1d7a4dc6 | /fiasco_api/channels/migrations/0001_initial.py | 8dab8b6574bf6c04a97a22a56e8d7e2cbfa01842 | [
"MIT"
] | permissive | xelnod/fiasco_backend | 4635cff2fd220585c4433010e64208dfebbf2441 | edeca8cac8c7b1a1cc53051d4443cc2996eba37c | refs/heads/master | 2020-09-21T13:37:37.971952 | 2020-09-15T19:38:37 | 2020-09-15T19:38:37 | 224,804,463 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 701 | py | # Generated by Django 3.1.1 on 2020-09-13 21:03
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Channel',
fields=[
('id', models.AutoField(... | [
"s.zench@yandex.ru"
] | s.zench@yandex.ru |
f7c58733960e020eae947ec62df40c13f1d35141 | 7cb286916f5ccf52d4f371c79ad9bc0ef9fc7bf8 | /Modules/excelmacros.py | f454813f31c22a9d0abc97db5b607c151240f107 | [] | no_license | liekunyang/SciData | 4b16d1da17b525a315b4230e17521b1d66e8b899 | 8296639163f4f41588b8b635dc6843a0a5e13a08 | refs/heads/master | 2020-03-21T00:10:20.548065 | 2018-05-03T20:53:48 | 2018-05-03T20:53:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 751 | py | import win32com.client
import os
class Macros():
def __init__(self, MacroContainingExcelFilePath, VBAModule):
self.ExcelMarcoFilePath = MacroContainingExcelFilePath
excel_file = os.path.basename(MacroContainingExcelFilePath)
self.Macro_Prefix = excel_file + "!" + VBAModule + "."
self.xl = win32com.client.Dis... | [
"kenneth.kite@gmail.com"
] | kenneth.kite@gmail.com |
768b1b32810e0980b4c12dea127263f2c8e12e72 | 79e1a5ad019b261034bc6338e894679d3f5d54d9 | /Minimum Depth of Binary Tree.py | c2b09ec6bf9da4f521b6b119f473c1015420e961 | [
"MIT"
] | permissive | ngdeva99/Fulcrum | c615f457ec34c563199cc1dab243ecc62e23ad0b | 3a5c69005bbaf2a5aebe13d1907f13790210fb32 | refs/heads/master | 2022-12-15T19:35:46.508701 | 2020-09-09T06:47:48 | 2020-09-09T06:48:08 | 294,027,104 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 492 | py | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def minDepth(self, root: TreeNode) -> int:
if not root:
return 0
if not root.le... | [
"31466229+ngdeva99@users.noreply.github.com"
] | 31466229+ngdeva99@users.noreply.github.com |
d400b5a4a2f30fce5ae19eba7b5591f2868ffd61 | 1c4e2f66c0a0775f23e3534533c9257196601992 | /settings.py | ad7eb81ebf942e2372947b27cc4e12d73c65c8b4 | [] | no_license | essiKS/custom-waiting-page-for-mturk | 5faf0eef8216871d0769a2410dd9eeba8e6a9a07 | 6ee335603a7f8469a17e2fe271c9187b4b265e19 | refs/heads/master | 2021-07-20T06:29:52.507924 | 2017-10-27T13:48:20 | 2017-10-27T13:48:20 | 108,547,425 | 0 | 0 | null | 2017-10-27T13:08:18 | 2017-10-27T13:08:18 | null | UTF-8 | Python | false | false | 5,368 | py | import os
from os import environ
import dj_database_url
from boto.mturk import qualification
import otree.settings
CHANNEL_ROUTING = 'customwp.routing.channel_routing'
# settings.py
# ROOT_URLCONF = 'urls'
# CHANNEL_ROUTING = 'pggfg.routing.channel_routing'
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
# th... | [
"chapkovski@gmail.com"
] | chapkovski@gmail.com |
939d4194665bff13b1573016af88c3c54c47b3b4 | 4a7ede06edbe66f9d1eb485261f94cc3251a914b | /test/pyaz/deployment/operation/group/__init__.py | 6e669b81a5eb114fa845a2658f5b982e6848542c | [
"MIT"
] | permissive | bigdatamoore/py-az-cli | a9e924ec58f3a3067b655f242ca1b675b77fa1d5 | 54383a4ee7cc77556f6183e74e992eec95b28e01 | refs/heads/main | 2023-08-14T08:21:51.004926 | 2021-09-19T12:17:31 | 2021-09-19T12:17:31 | 360,809,341 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,035 | py | import json, subprocess
from .... pyaz_utils import get_cli_name, get_params
def list(resource_group, name):
params = get_params(locals())
command = "az deployment operation group list " + params
print(command)
output = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.P... | [
"“bigdatamoore@users.noreply.github.com”"
] | “bigdatamoore@users.noreply.github.com” |
661d735df4ce7371143ac56108dfaefe549a9502 | 88b667f671beb285e567f7648e92247d644a3abd | /sharpy/plans/tactics/zerg/__init__.py | 666cf002a3d23cc1be97de21340ab0ab57a1d6d1 | [
"MIT"
] | permissive | august-k/sharpy-paul | e7fbd6ac181d7e81e1f60eb34016063227590a64 | 6f4462208842db6dd32b30d5c1ebf90e79e975a0 | refs/heads/master | 2022-07-17T15:40:31.603339 | 2021-02-26T02:56:34 | 2021-02-26T02:56:34 | 257,317,358 | 1 | 1 | MIT | 2022-06-22T02:07:06 | 2020-04-20T15:05:13 | Python | UTF-8 | Python | false | false | 250 | py | from .inject_larva import InjectLarva
from .plan_heat_overseer import PlanHeatOverseer
from .spread_creep import SpreadCreep
from .counter_terran_tie import CounterTerranTie
from .overlord_scout import OverlordScout
from .ling_scout import LingScout
| [
"august.kaplan@gmail.com"
] | august.kaplan@gmail.com |
f8f8dba5b186c1d2c77f78613cab669086fe92b6 | 07c75f8717683b9c84864c446a460681150fb6a9 | /1.Django_cursor/days03_model/mypro/myblog/migrations/0001_initial.py | 37823058f887f8741bd1d85b0c4e18d51f445673 | [] | no_license | laomu/py_1709 | 987d9307d9025001bd4386381899eb3778f9ccd6 | 80630e6ac3ed348a2a6445e90754bb6198cfe65a | refs/heads/master | 2021-05-11T09:56:45.382526 | 2018-01-19T07:08:00 | 2018-01-19T07:08:00 | 118,088,974 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 567 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-11-29 06:45
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='User',... | [
"1007821300@qq.com"
] | 1007821300@qq.com |
693316f05ad7336dbe9f197a66240ed4f3040f18 | 0a2feb0fb7fe3c3a01921c43e63571d0a631dc15 | /Algorithms/BTree.py | f906885bd6abc3596b1fcf0c7418a91bc10a8aa5 | [] | no_license | shilpavijay/Algorithms-Problems-Techniques | 70233b251edb4c05a68924db2b9a2fd9de1e9b59 | 93bf2f5a09e6e7e342fd6fdf3e3a927a9283139f | refs/heads/master | 2022-04-26T13:56:37.495705 | 2022-04-04T06:19:52 | 2022-04-04T06:19:52 | 85,676,006 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,722 | py | class Node:
def __init__(self,key):
self.key = key
self.left = None
self.right = None
self.level = None
def __str__(self):
return(str(self.key))
class Btree:
def __init__(self):
self.root = None
def createTree(self,info):
if self.root == None:
self.root = Node(info)
else:
current = self.roo... | [
"shilpa.amberker@gmail.com"
] | shilpa.amberker@gmail.com |
f52ec51b0b20cf6f71efe6b70609739c36ba06bd | fc0eeed6956643539900d1de8c3f95798437122e | /cisco_questions/q1/q1.py | 0d6a2401b12a1a09022332b5db540fa08a3bc820 | [] | no_license | rajatsachdeva/Geeks_For_Geeks | 8e29f574029c299edd5d28badc0367a304c1961b | 0ba18247a97e1d2ad9aabaf3d08fe52d55c15b95 | refs/heads/master | 2021-07-04T02:33:36.012048 | 2017-09-24T10:49:56 | 2017-09-24T10:49:56 | 104,629,944 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 914 | py | '''
Given an array of size n-1 and given that there are numbers from 1 to n with
one missing, the missing number is to be found.
Input:
The first line of input contains an integer T denoting the number of test cases
The first line of each test case is N.
The second line of each test case contains N-1 input C[i],numb... | [
"rajat.sachdeva621@gmail.com"
] | rajat.sachdeva621@gmail.com |
bce8171379b0c12228aea53bf075b77396c7339a | 7159e9970ce2cc58482416392d1b489087b913c1 | /tests/template_tests/syntax_tests/test_regroup.py | d747c016f87677a2635da2a65f1bd6ad6f8d17d2 | [
"BSD-3-Clause"
] | permissive | ufgstores/django19 | d4a53f12aa6d89405e2332d0c53a29447e6f8650 | 644716493ecac37271610de0e9cf97fc1fe46f10 | refs/heads/master | 2020-09-20T13:54:04.608149 | 2019-11-28T14:07:07 | 2019-11-28T14:29:02 | 224,502,004 | 0 | 0 | BSD-3-Clause | 2019-11-28T14:08:25 | 2019-11-27T19:23:16 | Python | UTF-8 | Python | false | false | 3,984 | py | from datetime import date
from django.template import TemplateSyntaxError
from django.test import SimpleTestCase
from ..utils import setup
class RegroupTagTests(SimpleTestCase):
@setup({'regroup01': ''
'{% regroup data by bar as grouped %}'
'{% for group in gro... | [
"slenart@alefajnie.pl"
] | slenart@alefajnie.pl |
ce4ab2e632c8b591b02c2383a4403f32f1849344 | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /data/p4VQE/R2/benchmark/startQiskit_QC54.py | 8aa06570e8ea812020827b9e4ac039323bcfea10 | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/QDiff | ad53650034897abb5941e74539e3aee8edb600ab | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | refs/heads/main | 2023-08-05T04:52:24.961998 | 2021-09-19T02:56:16 | 2021-09-19T02:56:16 | 405,159,939 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,506 | py | # qubit number=3
# total number=10
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
import networkx as nx
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collectio... | [
"wangjiyuan123@yeah.net"
] | wangjiyuan123@yeah.net |
9eeb58d88bfe52c99bcdb85d7af7b42cfa61df13 | a130fd7c22f60ff70824331c9ad5bc7cb7c1f8bd | /back_end/emitter/object_file.py | 8a5be365cd46067a03075bd3f400f66300a738d5 | [] | no_license | samyvilar/c_compiler | a366421972ac0f9560538531cf965087ffd9bf9c | fde490814ec751aa052ecfdaa3ba1be1c6209db4 | refs/heads/master | 2020-04-30T00:17:23.463952 | 2014-02-27T23:13:28 | 2014-02-27T23:13:28 | 17,496,354 | 5 | 2 | null | null | null | null | UTF-8 | Python | false | false | 895 | py | __author__ = 'samyvilar'
from front_end.parser.ast.declarations import Static
from utils import get_attribute_func
class Symbol(object):
def __init__(self, name, binaries, size, storage_class, location):
self.binaries, self.storage_class, self.size = binaries, storage_class, size
self.location = ... | [
"samy.vilar@gmail.com"
] | samy.vilar@gmail.com |
da6c125ca2a1c6fe759b1a7cd007673da8e362aa | 1838f5da624e0da625ff0c00a642bbff10f9bde6 | /guild/serving_util.py | 585fb78a05be9c41004399bd719be4d7c4b23444 | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown"
] | permissive | Jim-Holmstroem/guildai | 75b57785654b98902aefcb50ace0f227ad95fd18 | ed80e307fca20c0d607c600180cdb0854f42021d | refs/heads/master | 2020-12-31T19:48:39.996994 | 2020-02-06T18:02:20 | 2020-02-06T18:02:20 | 239,023,692 | 0 | 0 | Apache-2.0 | 2020-02-07T21:13:39 | 2020-02-07T21:13:39 | null | UTF-8 | Python | false | false | 3,460 | py | # Copyright 2017-2020 TensorHub, 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
#
# Unless required by applicable law or agreed to in writ... | [
"g@rre.tt"
] | g@rre.tt |
f16c0a85afbdd8b95957d029d96cb5011408b515 | 0f830f97d0d75323134b2f9189a672acfd344746 | /0054isSymmetric.py | bb51c0ed82ebd8a2da2b03384de0cc784ac22cc5 | [] | no_license | AndongWen/leetcode | ba54cb929e6473c6ff533c9f5c0791e413fc97b0 | bb02714b312d5a8368d7e4f4c35bb66eaaff36b9 | refs/heads/master | 2021-06-19T15:32:33.835801 | 2021-03-11T23:37:49 | 2021-03-11T23:37:49 | 188,532,394 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,954 | py | '''101对称二叉树:判断一颗二叉树是不是镜像对称'''
'''思路1:递归:什么样的树是对称二叉树?两颗树的根节点数值一样,且任意一颗树的左孩子都和另一颗树
的右孩子一样(判断类似与子树)'''
class Solution(object):
def isSymmetric(self, root: TreeNode) -> bool:
if not root:
return True
return self.issymmetric(root.left, root.right)
def issymmetric(self, t1: TreeNode, t2: TreeNode) -> bool:
i... | [
"1303524991@qq.com"
] | 1303524991@qq.com |
2ce0a1843c0743038f4ae766991160c86c44c7fd | d24a6e0be809ae3af8bc8daa6dacfc1789d38a84 | /ABC/ABC151-200/ABC192/C.py | 87b21e6fa5ab734a99025b89d683ac550fda79fe | [] | no_license | k-harada/AtCoder | 5d8004ce41c5fc6ad6ef90480ef847eaddeea179 | 02b0a6c92a05c6858b87cb22623ce877c1039f8f | refs/heads/master | 2023-08-21T18:55:53.644331 | 2023-08-05T14:21:25 | 2023-08-05T14:21:25 | 184,904,794 | 9 | 0 | null | 2023-05-22T16:29:18 | 2019-05-04T14:24:18 | Python | UTF-8 | Python | false | false | 472 | py | def f(x):
g1 = int("".join(sorted(str(x), reverse=True)))
g2 = int("".join(sorted(str(x))))
return g1 - g2
def solve(n, k):
res = n
for _ in range(k):
res = f(res)
return res
def main():
n, k = map(int, input().split())
res = solve(n, k)
print(res)
def test():
asser... | [
"cashfeg@gmail.com"
] | cashfeg@gmail.com |
50688b9d5e79750127d7fd9fbfcbeb0b6e92d3e3 | 4c1da0c18482031ea650b32b1ee19cd8e16338fb | /exit_window.py | 71f99fb0f67a28a4aa6af81a03e9a16bb5b47ceb | [] | no_license | adamjaro/irview | 03dbb4c4a3e2a1082e246552b104602108bfd44a | a47c6a49af5411bc167e35fdee961e27243b49f3 | refs/heads/master | 2021-06-19T22:52:27.242434 | 2021-06-17T22:11:32 | 2021-06-17T22:11:32 | 211,398,012 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 623 | py |
import ROOT as rt
from vmagnet import vmagnet
#_____________________________________________________________________________
class exit_window(vmagnet):
#_____________________________________________________________________________
def __init__(self, name, zpos, xpos, l, dx, ang):
vmagnet.__init__(se... | [
"jaroslav.adam@cern.ch"
] | jaroslav.adam@cern.ch |
3a178450c04ba4f2eeab424c41daec0e5f5e871a | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02756/s212377903.py | fe85df1693c38b1428e5d762852ef6b0de96543d | [] | 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 | 519 | py | # D - String Formation
from collections import deque
S = input()
Q = int(input())
now = 1
tmp = [deque([]),deque([])]
for _ in range(Q):
t = list(input().split())
if t[0]=='1':
now = 1+(now==1)
else:
if int(t[1])==now:
tmp[0].append(t[2])
else:
tmp[1].append(t... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
e28af5e311bd9f3d84b8cf97868852a608dcf13a | 3fa98a128e019a84c1785a505992bd19615a5b2a | /Alphabet Rangoli.py | b278a3be87b4702c394139f936e3d83b74d8df3e | [] | no_license | Khushisomani/codes | 2c63628344db230093828b83fc5681fee4a603b8 | ccda28b24962807c0f96818bc784a05d92e8de2b | refs/heads/master | 2021-07-06T15:39:27.710291 | 2020-12-16T16:52:07 | 2020-12-16T16:52:07 | 214,611,035 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 360 | py | import string
def print_rangoli(size):
alpha=string.ascii_lowercase
l=[]
for i in range(size):
s="-".join(alpha[i:size])
l.append(s[::-1]+s[1:])
width=len(l[0])
for i in range(size-1,0,-1):
print(l[i].center(width,"-"))
for i in range(size):
print(l[i].center(widt... | [
"noreply@github.com"
] | Khushisomani.noreply@github.com |
25aea43fb4e4f72f5f9f61fc719038d19e4f4509 | b0c2f67b2878a312c6e6ffa5fe4158bd55dad69c | /chap4/exp4.10.py | d870c09c0d807b978acc1327874b2df8fdad28c1 | [] | no_license | loukey/pythonDemo | efda51be07beede0be2a8cdaae9b7e153bc790bc | 9e6f64908ccba64d32ffc58edbb8d6f8ab6bf68d | refs/heads/master | 2021-01-20T04:39:24.054749 | 2017-05-19T05:41:00 | 2017-05-19T05:41:00 | 89,711,134 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 196 | py | # -*- coding: utf-8 -*-
#例4.10For循环的执行
#python的range()为前闭后开,就是range(1,5)取到的是1-4
for count in range(5)[1:]:
print count
for count in range(1,5):
print count | [
"529768926@qq.com"
] | 529768926@qq.com |
1e57e80fa0914ca4db9a2484122f6f6d8bba30be | 1729af96e7dbe4ff824d61ad1d25ef61c4ff471e | /PyBites/IntroBites/Bite108/belts.py | ea48226cd2633202eabf6eefb09a5f9bd8bb2a80 | [] | no_license | CaptCorpMURICA/pythonExercises | ebc8fcfb32a974fe8a16ef073ee77054e190d030 | 8b257c23b471d3cf997275780a5e51565d4c65fa | refs/heads/master | 2020-05-31T20:55:02.343470 | 2020-03-09T20:30:08 | 2020-03-09T20:30:08 | 190,486,358 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 976 | py | from collections import namedtuple
BeltStats = namedtuple('BeltStats', 'score ninjas')
ninja_belts = {'yellow': BeltStats(50, 11),
'orange': BeltStats(100, 7),
'green': BeltStats(175, 1),
'blue': BeltStats(250, 5)}
def get_total_points(belts=ninja_belts):
"""Calculat... | [
"noreply@github.com"
] | CaptCorpMURICA.noreply@github.com |
5b4a1223388a2eca0ee37b61d9baad4ef43eac5a | 6550cc368f029b3955261085eebbddcfee0547e1 | /第1部分-python基础(颜涛老师)/day09/day09-code/04 函数的返回值.py | 2e44ef3047b8c3821a5c2c762c25e3a66aee97d4 | [] | no_license | vividyellow/oldboyeduPython14qi | d00c8f45326e16464c3d4e8df200d93779f68bd3 | de1e9f6efafa2846c068b3fe5ad6e1ca19f74a11 | refs/heads/master | 2022-09-17T21:03:17.898472 | 2020-01-31T10:55:01 | 2020-01-31T10:55:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 948 | py | # def yue():
# print("约你")
# print("约他")
# print("我不约")
# return "大妈" # return 返回值 当函数结束的时候. 给调用方一个结果
#
# ret = yue()
# print(ret)
#
# ret2 = yue()
# print(ret2)
# 只要函数执行到return 函数就会停止执行
# 1. 每个函数如果在函数中不写return, 默认返回None
# 2. 我们也可以只写一个return, 也是返回None, 停止函数的执行
# 3. return 一个返回值. 你在调用方能接受到一个返回值
# 4... | [
"524991368@qq.com"
] | 524991368@qq.com |
523125575f25c30720c836e75077325b6205e3cf | e6d791b0edd75464ceecbeded5f57d34682432ca | /teams/models.py | 7e320d477b488f752fb3d0f1c39dd72c2d51f787 | [] | no_license | NlIceD/OffsideReview | f8b66cd4cd1c90aac044bfa1fb7bdc8ca8e14e82 | fca18d6a47dd908c77d8b8deffd473e20566cf47 | refs/heads/master | 2020-06-21T19:35:09.225621 | 2018-09-03T02:38:02 | 2018-09-03T02:38:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,967 | py | from django.db import models
class Teams(models.Model):
team = models.CharField(max_length=3, default='')
game_id = models.IntegerField(null=True)
season = models.IntegerField(null=True)
date = models.DateField(null=True)
opponent = models.CharField(max_length=3, default='', null=True)
home =... | [
"Harryshomer@gmail.com"
] | Harryshomer@gmail.com |
be4176f073f602e33e6278e65eb1716782510f01 | af4edde514d5e4b1823ebd77b4df3d18c4165047 | /parsl/tests/test_scaling/configs/cooley.py | d640de03f9185e50f5b5965e9305acfd08968900 | [
"Apache-2.0"
] | permissive | kylechard/parsl | 5f48d51f06631248b7885cee165c1b11a5881cff | 1080cc17e0c42f877cab18d1452bb6a2bc4c40b7 | refs/heads/master | 2020-12-30T09:26:39.786962 | 2018-03-29T18:08:30 | 2018-03-29T18:08:30 | 100,407,921 | 0 | 0 | null | 2018-03-29T01:27:15 | 2017-08-15T18:40:47 | Python | UTF-8 | Python | false | false | 1,872 | py | import os
USERNAME = os.environ["COOLEY_USERNAME"]
singleNode = {
"sites": [{
"site": "ALCF_Cooley_Remote",
"auth": {
"channel": "ssh-il",
"hostname": "cooleylogin1.alcf.anl.gov",
"username": USERNAME,
"scriptDir": "/home/{}/parsl_scripts/".format(U... | [
"yadudoc1729@gmail.com"
] | yadudoc1729@gmail.com |
c98c7946a64d9c582e4850d85dd0bd10d31331dc | 61699048dc567cd3a814e5b987599dae175bed19 | /Python/month01/day16/review.py | ccdce3433ca84a3ba05c25bf3568651102a0b8f2 | [] | no_license | Courage-GL/FileCode | 1d4769556a0fe0b9ed0bd02485bb4b5a89c9830b | 2d0caf3a422472604f073325c5c716ddd5945845 | refs/heads/main | 2022-12-31T17:20:59.245753 | 2020-10-27T01:42:50 | 2020-10-27T01:42:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,032 | py | """
复习
1. Python程序结构
根目录
主模块(第一次执行的模块)
包
模块
类
方法
语句
2. 导入是否成功的唯一标准
导入路径 + sys.path = 真实路径
(系统路径中存在导入时写的根目录)
3. 导入方式
... | [
"1450030827@qq.com"
] | 1450030827@qq.com |
1397e9d0641880af7b1d2eab17c4ba7781983ba0 | cd63877cac79429599bf30b7ad916ff52b7df266 | /zvt/__init__.py | f71878e73c21b68b0399ad1046f13a20a42e5245 | [] | no_license | zfsamzfsam/zvt | 2f803c3d0f4e5a4729b38fa316c007192e0a464f | f77f27d1ccd199a1b860ead71d4e6738438f804a | refs/heads/master | 2020-05-30T22:43:22.894053 | 2019-05-31T03:16:55 | 2019-05-31T03:16:55 | 189,998,719 | 1 | 0 | null | 2019-06-03T12:15:05 | 2019-06-03T12:15:04 | null | UTF-8 | Python | false | false | 883 | py | # -*- coding: utf-8 -*-
import logging
import pandas as pd
from zvt.domain import init_schema
def init_log():
root_logger = logging.getLogger()
root_logger.setLevel(logging.INFO)
fh = logging.FileHandler('zvt.log')
fh.setLevel(logging.INFO)
ch = logging.StreamHandler()
ch.setLevel(logging.... | [
"5533061@qq.com"
] | 5533061@qq.com |
0cb33f6d65ebea11a01447e121a4953d77170a72 | 048f2002ed13503d50428c8949c95a2e4f9bd532 | /other/RangeSumQuery-Immutable.py | 451bb8ac7dd642ab8571399751cd2a212081b360 | [] | no_license | ZhengLiangliang1996/Leetcode_ML_Daily | 9c9330bd2c7bab5964fbd3827a27eeff5bd2c502 | 8cdb97bc7588b96b91b1c550afd84e976c1926e0 | refs/heads/master | 2023-04-06T19:52:23.524186 | 2023-03-30T21:08:57 | 2023-03-30T21:08:57 | 213,055,072 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 626 | py | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2021 liangliang <liangliang@Liangliangs-MacBook-Air.local>
#
# Distributed under terms of the MIT license.
class NumArray(object):
def __init__(self, nums):
"""
:type nums: List[int]
"""
self.nums = nu... | [
"zhengliangliang1996@gmail.com"
] | zhengliangliang1996@gmail.com |
b493aff0e27b04d1b8f6b5c1f4c400e093beecba | fcc88521f63a3c22c81a9242ae3b203f2ea888fd | /Python3/1128-Number-of-Equivalent-Domino-Pairs/soln.py | 4e88eab3f43e6aeb33e7ed5403849a8d610e23b2 | [
"MIT"
] | permissive | wyaadarsh/LeetCode-Solutions | b5963e3427aa547d485d3a2cb24e6cedc72804fd | 3719f5cb059eefd66b83eb8ae990652f4b7fd124 | refs/heads/master | 2022-12-06T15:50:37.930987 | 2020-08-30T15:49:27 | 2020-08-30T15:49:27 | 291,811,790 | 0 | 1 | MIT | 2020-08-31T19:57:35 | 2020-08-31T19:57:34 | null | UTF-8 | Python | false | false | 339 | py | class Solution:
def numEquivDominoPairs(self, dominoes: List[List[int]]) -> int:
counter = collections.defaultdict(int)
for lst in dominoes:
counter[tuple(sorted(lst))] += 1
ans = 0
for v in counter.values():
if v >= 2:
ans += v * (v - 1)
... | [
"zhang623@wisc.edu"
] | zhang623@wisc.edu |
86b032484d370a08bfb2fb9f3e45750b90f34418 | 5be29c3b055a335120186de58d8d08bab6a4de7a | /books/mydjango-master/orm/app01/models.py | 1d4d7242fde64b3901c08727480ce000ab3d2ec0 | [] | no_license | wangredfei/projects | aabb68f45c661db4d60dc13e34d069c4fa77e423 | 3dfbf4467a10e43296a6397cebbfb2e6d78e684b | refs/heads/master | 2022-12-09T07:19:07.538950 | 2019-03-18T06:57:12 | 2019-03-18T06:57:12 | 176,221,820 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 342 | py | from django.db import models
# Create your models here.
class Book(models.Model):
id=models.AutoField(primary_key=True)
title=models.CharField(max_length=32)
state=models.BooleanField()
pub_date=models.DateField()
price=models.DecimalField(max_digits=8,decimal_places=2)
publish=models.Ch... | [
"1538629795@qq.com"
] | 1538629795@qq.com |
a40912e3e39811296c999f9945c456c8fd9de779 | 0bbf35091b8b9ea10ce65ccdd0b9dbf459dc64ed | /platform/hwconf_data/efr32fg12p/modules/I2CSENSOR/I2CSENSOR_model.py | 0ac76a46893601a52e49f5cee88475a8707b7c45 | [
"Zlib"
] | permissive | silabs-DavidS/sdk_support | c833d95bef26c1a2e070a89b2d80c7c2bb8da3e5 | d394d99c9d8f36c128085c5a8115b70b2cd8685e | refs/heads/master | 2022-12-05T08:38:10.266469 | 2020-08-25T02:35:31 | 2020-08-25T02:35:31 | 290,084,030 | 0 | 1 | NOASSERTION | 2020-08-25T02:36:23 | 2020-08-25T01:45:52 | C | UTF-8 | Python | false | false | 1,074 | py | from . import halconfig_types as types
from . import halconfig_dependency as dep
name = "I2CSENSOR"
displayname = "I2C Sensor"
description = "I2C sensor configuration. Can be used with I2C sensors on starter kits."
compatibility = dep.Dependency() # = all
studio_module = {
"basename": "SDK.HAL.I2CSENSOR",
"mo... | [
"jean-francois.penven@silabs.com"
] | jean-francois.penven@silabs.com |
038c8b1f9c313b53de64748e9c26cc037b1a31ea | 82b946da326148a3c1c1f687f96c0da165bb2c15 | /sdk/python/pulumi_azure_native/logic/v20150201preview/get_workflow_access_key.py | 3b3e422d7f4a94cd228396a14924754db2159f8f | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | morrell/pulumi-azure-native | 3916e978382366607f3df0a669f24cb16293ff5e | cd3ba4b9cb08c5e1df7674c1c71695b80e443f08 | refs/heads/master | 2023-06-20T19:37:05.414924 | 2021-07-19T20:57:53 | 2021-07-19T20:57:53 | 387,815,163 | 0 | 0 | Apache-2.0 | 2021-07-20T14:18:29 | 2021-07-20T14:18:28 | null | UTF-8 | Python | false | false | 3,965 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__... | [
"noreply@github.com"
] | morrell.noreply@github.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.