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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
880fcd0c207f5c5cc5664e89ff0c6d94f5842e7d | 583194153161233874ae069adb9e8ffeb8442262 | /authentication/admin.py | 1c2e0b497ed34ed5189d522420a782a2780214dc | [] | no_license | AlekseiChirkov/meso | 75faa7f9f83b9c9a88b9cf180a8bd140244af086 | 1a1c544d0533736c68b3c21706534f6f8a6d2505 | refs/heads/main | 2023-02-17T18:59:08.756122 | 2021-01-12T09:57:08 | 2021-01-12T09:57:08 | 325,181,058 | 0 | 1 | null | 2021-01-12T09:57:09 | 2020-12-29T03:57:28 | Python | UTF-8 | Python | false | false | 230 | py | from django.contrib import admin
# Register your models here.
from .models import User
class UserAdmin(admin.ModelAdmin):
list_display = ['id', 'email', 'auth_provider', 'created_at']
admin.site.register(User, UserAdmin)
| [
"[email protected]"
] | |
227ede342f7bfe595de25dfa2cc02ac4fb1a043f | d4889901b6337ede68d2dee42d50c76f184ffe98 | /generate_figures/fig2/vs.py | 7fd5419900eb79905720c168d7913082dae4f6fc | [] | no_license | ModelDBRepository/231105 | 41b473ed06f46d7b8d7772984ffeb65c7c4d36da | c7c1697acb810bb6d55c6f7b97804b9c671ed9fb | refs/heads/master | 2020-05-29T18:28:50.083115 | 2019-05-31T02:07:48 | 2019-05-31T02:07:48 | 189,299,894 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,030 | py | #!/usr/bin/python
# This program plots the firing rate nu_I vs. Isyn_E-I_syn_I .
import sys
import os
import math
def read_fr(frI, cvI, ffrIx):
for line_read in ffrIx:
line_list = line_read.split()
fr_val = float(line_list[1])
cv_val = float(line_list[7])
frI.append(fr_val)
... | [
"[email protected]"
] | |
211a480a8f12fd78e6c18298b4314762a0b8ea65 | 3327a87cefa2275bd0ba90a500444f3494b14fdf | /captainhcg/py/222-count-complete-tree-nodes.py | c63c98539d7003e40cab6734a601b99ef068043e | [] | no_license | captainhcg/leetcode-in-py-and-go | e1b56f4228e0d60feff8f36eb3d457052a0c8d61 | 88a822c48ef50187507d0f75ce65ecc39e849839 | refs/heads/master | 2021-06-09T07:27:20.358074 | 2017-01-07T00:23:10 | 2017-01-07T00:23:10 | 61,697,502 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 506 | py | class Solution(object):
def countNodes(self, root):
"""
:type root: TreeNode
:rtype: int
"""
left_h = right_h = 0
lnd = rnd = root
while lnd:
left_h += 1
lnd = lnd.left
while rnd:
right_h += 1
rnd = rnd.r... | [
"[email protected]"
] | |
510a31c918cf293f006bfecde11e6d76c5d2aa37 | 08a0a5603acb4711fa25acfc3b7034f104d993b0 | /jump-game-ii/Solution.8415759.py | d7202d95ee0c24d813579f558af5a02543841586 | [
"MIT"
] | permissive | rahul-ramadas/leetcode | 401fe2df2f710c824264cc0538f5f2aa8bbe383e | 6c84c2333a613729361c5cdb63dc3fc80203b340 | refs/heads/master | 2020-05-30T07:17:07.311215 | 2016-11-01T05:27:34 | 2016-11-01T05:27:34 | 22,866,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 488 | py | class Solution:
def jump(self, A):
if len(A) == 1:
return 0
steps = 0
farthest = 0
next_farthest = 0
for current in xrange(len(A)):
if current > farthest:
farthest = next_farthest
steps += 1
... | [
"[email protected]"
] | |
f9eb340e62736e865ce4d10ba52f23207a4e491d | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2927/60608/259827.py | 2edeb3c30f2fdf138f74e200b06069554769cd62 | [] | 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 | 810 | py | import math
def isInside(a1, b1, a2, b2, x, y):
if a1 <= x <= a2 and b2 <= y <= b1:
return True
else:
return False
def func31():
arr = list(map(int, input().split()))
a1 = math.sin(math.pi / 4) * arr[1]
b1 = math.cos(math.pi / 4) * arr[1]
a2 = math.cos(math.pi / 4) * arr[0] + m... | [
"[email protected]"
] | |
eebd75b28665ca91cb500de5634618a87885eacc | 5b771c11e8967038025376c6ec31962ca90748dd | /resturant/Resturant/src/blog/migrations/0004_comment.py | f07e3f8d6a9a53ea6011d24313d8a9f81336e5e0 | [] | no_license | AsemAntar/Django_Projects | 7135eca3b4bcb656fc88e0838483c97d7f1746e1 | 4141c2c7e91845eec307f6dd6c69199302eabb16 | refs/heads/master | 2022-12-10T06:32:35.787504 | 2020-05-26T14:43:01 | 2020-05-26T14:43:01 | 216,863,494 | 0 | 0 | null | 2022-12-05T13:31:53 | 2019-10-22T16:47:28 | Python | UTF-8 | Python | false | false | 965 | py | # Generated by Django 3.0.5 on 2020-05-17 09:14
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
... | [
"[email protected]"
] | |
45a6c789ab4c46a1a8e9f75786bd68dbf3e2c43e | 7769cb512623c8d3ba96c68556b2cea5547df5fd | /mmdet/models/losses/smooth_l1_loss.py | bc340730b2ec0db938508dfc94e71369484d1918 | [
"MIT"
] | permissive | JialeCao001/D2Det | 0e49f4c76e539d574e46b02f278242ca912c31ea | a76781ab624a1304f9c15679852a73b4b6770950 | refs/heads/master | 2022-12-05T01:00:08.498629 | 2020-09-04T11:33:26 | 2020-09-04T11:33:26 | 270,723,372 | 312 | 88 | MIT | 2020-07-08T23:53:23 | 2020-06-08T15:37:35 | Python | UTF-8 | Python | false | false | 1,288 | py | import torch
import torch.nn as nn
from ..registry import LOSSES
from .utils import weighted_loss
@weighted_loss
def smooth_l1_loss(pred, target, beta=1.0):
assert beta > 0
assert pred.size() == target.size() and target.numel() > 0
diff = torch.abs(pred - target)
loss = torch.where(diff < beta, 0.5 *... | [
"[email protected]"
] | |
130e3ec189c725c6c0fbbcedda199db9b4d2f77a | d364123a0655bff7e9d725382934fe2c15b5bfc4 | /Crawler/two/xingneng.py | ae3a6428bc0601f76f83c19217cd42d06832e0f5 | [] | no_license | yuan1093040152/SeleniumTest | 88d75361c8419354f56856c326f843a0a89d7ca6 | d155b98702bc46c174499042b43257696b861b5e | refs/heads/master | 2023-08-31T15:00:25.415642 | 2023-08-30T09:26:42 | 2023-08-30T09:26:42 | 227,269,300 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,741 | py | #coding=utf-8
'''
Created on 2018年3月15日
@author: 唐路
'''
fields = ('area','population','iso','country' ,'capital', 'continent','tld','currency_code','currency_name','phone','postal_code_format','postal_code_regex','languages','neighbours')
import re,time
import lxml.html
import lxml.cssselect
from re_grab import dow... | [
"[email protected]"
] | |
c8654d745ab7e9b8739b049d093a243c901b2dec | 778d942f39abfb74b395d521af1cabfa1487c91c | /Greedy/JobSequencingProblem.py | aec789872cc841135a035f34f279a4553e9cc587 | [] | no_license | yashwanthguguloth24/Algorithms | ff80f47ef20be23da245c737640df0799151fdd1 | 0b9c7540f09f9d5792f5058ef901d588418f4f27 | refs/heads/master | 2023-07-09T16:51:17.174314 | 2021-08-08T18:47:43 | 2021-08-08T18:47:43 | 279,512,532 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,494 | py | '''
Given a set of N jobs where each job i has a deadline and profit associated to it. Each job takes 1 unit of time to complete and only one job can be scheduled at a time. We earn the profit if and only if the job is completed by its deadline. The task is to find the maximum profit and the number of jobs done.
Input... | [
"[email protected]"
] | |
09d31f3cfb420681b24d39ce5b6d98b82b443b5b | c3082eb2adc43b311dd3c9ff16fd3ed9df85f266 | /python/examples/advanced/slow.py | f2e6b6f91e806518083d6f82e06462b77c31f239 | [] | 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 | 734 | py | import random
def f():
n = 0
for i in range(30):
n += random.random()
return n
def g():
return random.random() * 30
def main(n):
text = get_str(n)
#print(str)
text_sorted = sort(text)
return text_sorted
def sort(s):
chars = list(s)
for i in reversed(range(len(chars)... | [
"[email protected]"
] | |
d4fc9bc42d28a4ae8358c51ca58861c999d614ed | c42672aeac984ab3f57d840710e145f4e918ba01 | /nasws/cnn/policy/darts_policy/train.py | f9bbbe1987129dcdc49a1d3205830cfc4856a047 | [
"MIT"
] | permissive | kcyu2014/nas-landmarkreg | 00212b6015d1fef3e7198bfa596fa69a898167c2 | a00c3619bf4042e446e1919087f0b09fe9fa3a65 | refs/heads/main | 2023-07-21T19:52:19.392719 | 2021-08-24T09:37:24 | 2021-08-24T09:37:24 | 350,368,390 | 10 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,295 | py | import os
import sys
import time
import glob
import numpy as np
import torch
# import nasws.cnn.utils
import utils
import logging
import argparse
import torch.nn as nn
import genotypes
import torch.utils
import torchvision.datasets as dset
import torch.backends.cudnn as cudnn
from torch.autograd import Variable
from ... | [
"[email protected]"
] | |
1ce1feb6bf75a790c18144cc6885d7f674924843 | 2c3da6e0bddf55d64d650040bbf286c47b31811a | /c语言中文网python教程/Python itertools模块:生成迭代器(实例分析).py | 24c70c2923eb597f7aa59b8fc68122a78a8ba190 | [
"MIT"
] | permissive | Bngzifei/PythonNotes | 76bd53db3033a9c51ab4bdd727842cd89607b584 | 01590e1b6c1bc0f04aa2d355fa2553c04cce27f2 | refs/heads/master | 2023-02-04T06:49:00.725463 | 2020-12-15T09:26:40 | 2020-12-15T09:26:40 | 155,154,662 | 1 | 2 | MIT | 2020-09-08T01:30:19 | 2018-10-29T05:02:48 | Python | UTF-8 | Python | false | false | 7,147 | py | # Python itertools模块:生成迭代器(实例分析)
"""
itertools模块主要包含了一些用于生成迭代器的函数.在在 Python 的交互式解释器中先导入
itertools 模块,然后输入 [e for e in dir(itertools) if not e.startswith('_')] 命令,
即可看到该模块所包含的全部属性和函数:
>>> [e for e in dir(itertools) if not e.startswith('_')]
['accumulate', 'chain', 'combinations', 'combinations_with_replacement',
'comp... | [
"[email protected]"
] | |
52920abfc6f261e127be3ca99e74ed82138ce10e | 5761eca23af5ad071a9b15e2052958f2c9de60c0 | /generated-stubs/allauth/socialaccount/providers/bitbucket_oauth2/provider.pyi | 100feb2b8afd2da0c647bb49cce0b3e58fab5d68 | [] | no_license | d-kimuson/drf-iframe-token-example | 3ed68aa4463531f0bc416fa66d22ee2aaf72b199 | dd4a1ce8e38de9e2bf90455e3d0842a6760ce05b | refs/heads/master | 2023-03-16T13:52:45.596818 | 2021-03-09T22:09:49 | 2021-03-09T22:09:49 | 346,156,450 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 575 | pyi | from allauth.socialaccount.providers.base import ProviderAccount as ProviderAccount
from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider as OAuth2Provider
from typing import Any
class BitbucketOAuth2Account(ProviderAccount):
def get_profile_url(self): ...
def get_avatar_url(self): ...
... | [
"[email protected]"
] | |
3cd8b6972a27fcb26f2dea995651f24fa971773a | e2d23d749779ed79472a961d2ab529eeffa0b5b0 | /gcloud/contrib/function/permissions.py | 7c2a108a18154b28e3751cac04a29072152ab26b | [
"MIT",
"BSD-3-Clause",
"BSL-1.0",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | manlucas/atom | 9fa026b3f914e53cd2d34aecdae580bda09adda7 | 94963fc6fdfd0568473ee68e9d1631f421265359 | refs/heads/master | 2022-09-30T06:19:53.828308 | 2020-01-21T14:08:36 | 2020-01-21T14:08:36 | 235,356,376 | 0 | 0 | NOASSERTION | 2022-09-16T18:17:08 | 2020-01-21T14:04:51 | Python | UTF-8 | Python | false | false | 1,234 | py | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | [
"[email protected]"
] | |
3fd1171ad91a14ad977ace1eb611c02b31a71019 | ddb185b0cf581d85a1dd733a6d1e5d027ba3e0ca | /phase2/387.py | 4ab3425dbedcd713562ef34c92f76e379fea962a | [] | no_license | GavinPHR/code | 8a319e1223a307e755211b7e9b34c5abb00b556b | b1d8d49633db362bbab246c0cd4bd28305964b57 | refs/heads/master | 2020-05-16T04:09:19.026207 | 2020-04-30T10:00:06 | 2020-04-30T10:00:06 | 182,766,600 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 382 | py | # First Unique Character in a String
import collections
class Solution:
def firstUniqChar(self, s: str) -> int:
if not s: return -1
d = collections.Counter(s)
i = 0
for c in s:
if d[c] == 1:
return i
else:
i += 1
return... | [
"[email protected]"
] | |
2f10e9f21d71eb1536fb53c92e38822aa53b0480 | a8750439f200e4efc11715df797489f30e9828c6 | /csAcademy/binary_array.py | 40c9693298764e851e76be4a163f8a7a254efb4e | [] | no_license | rajlath/rkl_codes | f657174305dc85c3fa07a6fff1c7c31cfe6e2f89 | d4bcee3df2f501349feed7a26ef9828573aff873 | refs/heads/master | 2023-02-21T10:16:35.800612 | 2021-01-27T11:43:34 | 2021-01-27T11:43:34 | 110,989,354 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,298 | py | '''
Find Binary Array
Time limit: 1000 ms
Memory limit: 256 MB
You have a binary array of length NN. For each index i (1 \leq i \leq N)i(1≤i≤N) you know the number of zeroes among the positions on the left side of ii and on the right side of ii, respectively. Find the array!
Standard input
The first line contains an ... | [
"[email protected]"
] | |
a561f92c4f4333b5258bc33ef7c64c6f1d3acb28 | 4cdd5813d20f40d525b4d418df2788fa72a394bf | /Leetcode/easy/invert-a-binary-tree.py | a00b8eb4764600bf5c8bc9a376fe2119c0737828 | [
"MIT"
] | permissive | das-jishu/data-structures-basics-leetcode | 9baa78b49cfc1b0f5c48ef961b85b4fa9ffaf0dd | 9f877ba8ed1968c21c39ebeae611ba3c448a083a | refs/heads/master | 2023-08-21T06:54:57.380306 | 2021-10-01T02:59:51 | 2021-10-01T02:59:51 | 298,940,500 | 23 | 21 | MIT | 2021-10-01T02:59:52 | 2020-09-27T02:52:50 | Python | UTF-8 | Python | false | false | 916 | py | """
# INVERT A BINARY TREE
Invert a binary tree.
Example:
Input:
4
- -
2 7
- - - -
1 3 6 9
Output:
4
- -
7 2
- - - -
9 6 3 1
Trivia:
This problem was inspired by this original tweet by Max Howell:
Google: 90% of our engineers use the software you wrote (Homebrew), b... | [
"[email protected]"
] | |
ae36ea6b3ea5163238fb1b53cb7a789fac529f36 | ebd24e400986c57b4bb1b9578ebd8807a6db62e8 | /InstaGrade-FormBuilder/xlsxwriter/test/sharedstrings/test_initialisation.py | 053c1388226206274fb0df70e2a7a9877a33525b | [] | no_license | nate-parrott/ig | 6abed952bf32119a536a524422037ede9b431926 | 6e0b6ac0fb4b59846680567150ce69a620e7f15d | refs/heads/master | 2021-01-12T10:15:15.825004 | 2016-12-13T21:23:17 | 2016-12-13T21:23:17 | 76,399,529 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 835 | py | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2014, John McNamara, [email protected]
#
import unittest
from ...compatibility import StringIO
from ...sharedstrings import SharedStrings
class TestInitialisation(unittest.TestCase):
... | [
"[email protected]"
] | |
e0b11893d0de06d4b3be2aaa5725db913e41379e | 6ddcb131e5f2806acde46a525ff8d46bfbe0990e | /enaml/backends/qt/noncomponents/toolkit_items.py | a72749e2ac1d15a5b2158138eef276a442329617 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | agrawalprash/enaml | 5ce1823188eb51e5b83117ebee6c3655f53e5157 | 96828b254ac9fdfa2e5b6b31eff93a4933cbc0aa | refs/heads/master | 2021-01-15T23:35:21.351626 | 2012-09-05T03:40:07 | 2012-09-05T03:40:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 423 | py | #------------------------------------------------------------------------------
# Copyright (c) 2012, Enthought, Inc.
# All rights reserved.
#------------------------------------------------------------------------------
from .qt_dock_manager import QtDockManager
from .qt_icon import QtIcon
from .qt_image import QtIm... | [
"[email protected]"
] | |
8be1d1310a0658b39cd9f615911d05de1415385e | 0444c96c6c428f75c72696159fb89633ec3ea34f | /backend/driver/migrations/0001_initial.py | c44b338ce03abd20124f390fc8f16f011c02b766 | [] | no_license | crowdbotics-apps/juice-and-eatery-21638 | 03a690239baf56065ee44986dc845f8768f1d999 | 136357629b22a48ad06731a5a5f14f648052a93f | refs/heads/master | 2022-12-27T14:03:23.949577 | 2020-10-17T21:57:34 | 2020-10-17T21:57:34 | 304,975,789 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,540 | py | # Generated by Django 2.2.16 on 2020-10-17 21:55
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("del... | [
"[email protected]"
] | |
73ac9438958d2800fff63c4333e4bceb2498904c | afe04cd22c2a839668dd0f29c314cc4b35bc7345 | /mayidaili_tool.py | 9aecca25ec13ff9c9429250376ae07b45bfdebb6 | [
"Apache-2.0"
] | permissive | 343829084/base_function | 1bded81816dcc9e18cbd36d1484be782931bec55 | 296aaf84bbfc084f9d27d84d4b300823a356e484 | refs/heads/master | 2020-03-23T16:00:48.610252 | 2018-07-21T03:06:15 | 2018-07-21T03:06:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,402 | py | # coding: utf-8
import hashlib
import time
import urllib2
# 请替换appkey和secret
import requests
def useproxy(url,headers,postdata=None,post=False):
appkey = ""
secret = "c978952ede1661bd5342b34ca0bf561e"
paramMap = {
"app_key": appkey,
"timestamp": time.strftime("%Y-%m-%d %H:%M:%S") # 如果你的程序在... | [
"[email protected]"
] | |
8b11a20af2cab0011ea4d1e067cbf96c6d2c6c41 | 71e70eb343584d249b6f7d0e366ad5ac91f90723 | /common/utils.py | 20f12cc78e03a9bc3f6881ff306966a4b146e17e | [] | no_license | ljarufe/giant | bf1d081aec8afbddfc0162f79d38f53da1624255 | 8f3db1365a8b862b07fae8920a249bf1a532980f | refs/heads/master | 2021-01-23T16:30:37.654917 | 2013-10-21T15:58:12 | 2013-10-21T15:58:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,299 | py | # -*- coding: utf-8 -*-
import codecs
from django.conf import settings
from django.core.mail import EmailMessage, BadHeaderError
from django.http import HttpResponse
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.utils import simplejson
# models
from proyectos.mo... | [
"[email protected]"
] | |
18c382fddeb7fa8c62d83f435d9993cefc3c8fb6 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_looniest.py | 7e8f7a11b5de3a81edeb8fc566e9cba6c7fc74ea | [
"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 | 235 | py |
from xai.brain.wordbase.nouns._loony import _LOONY
#calss header
class _LOONIEST(_LOONY, ):
def __init__(self,):
_LOONY.__init__(self)
self.name = "LOONIEST"
self.specie = 'nouns'
self.basic = "loony"
self.jsondata = {}
| [
"[email protected]"
] | |
7849b3485cdb443da03ffcc1456b6ced0e6ac0a0 | 01a9e501d60ee5a5d660886a622618bf95eb46d8 | /user/forms/__init__.py | 52859f22d79b30285d8f8c07c9a2b372ff875791 | [] | no_license | tuantran37/UniRanking | 1938252a034b3ce3b8ee7f1a797b3d42c2eb9ecb | be8778fa004207bb0fea6e83e8e108347a3693c6 | refs/heads/master | 2023-08-05T06:31:52.868483 | 2018-08-27T18:26:04 | 2018-08-27T18:26:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 171 | py | from .sector_form import AddSectorForm, UpdateSectorForm, RemoveSectorForm
from .favoutite_university_form import AddFavouriteUniversityForm, RemoveFavouriteUniversityForm | [
"[email protected]"
] | |
38d4d461845d0243da88843ecba563340d11b19b | 75c1ac9405911ff3490d0de854650ade12b95e63 | /random_exercises/prework_2-5_consecutive.py | 817d7f583ceaa15f75391025c592d7edc2f96701 | [] | no_license | PropeReferio/practice-exercises | df6063b859da7f5966fc972ad44e74288054bc16 | 571856e452ef60d5bac7adebb49f6a6654e96733 | refs/heads/master | 2020-09-23T13:28:55.020969 | 2020-04-28T16:51:16 | 2020-04-28T16:51:16 | 225,511,686 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 596 | py | #Write a function to check to see if all numbers in list are consecutive
#numbers. For example, [2,3,4,5,6,7] are consecutive numbers, but [1,2,4,5]
#are not consecutive numbers. The return should be boolean Type.
check = [1,2,4,6]
check2 =[2,3,4,5,6,7]
def is_consecutive(a_list):
"""Checks to see if the numbers ... | [
"[email protected]"
] | |
82488481c998675c7f0e1ce4c13fbfc98fb02f5e | 90ae1f7729920be498f04faef7efb2195cfc5ab7 | /engine/_gevent.py | 5cbcd6b17a1f7664ede7170045eae2067053d843 | [] | no_license | jrecuero/pyengine | 297a65dab16bf2a24d8b9f8a3385db21e5725502 | e5de88a0053b2690230c04d7c9183d619ece32cf | refs/heads/master | 2022-12-27T01:15:09.302018 | 2020-10-16T02:53:03 | 2020-10-16T02:53:03 | 304,499,208 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,749 | py | import pygame
from ._loggar import Log
class GEvent:
"""GEvent implements all codes related with user events used in the
application via pygame events.
"""
NONE = 0
# GEvent type. Used by pygame events.
# pygame.USEREVENT = 24
USER = pygame.USEREVENT
ENGINE = pygame.USEREVENT + 1
... | [
"[email protected]"
] | |
6dd36fb253ed73f381095bd750e21c9931ab3833 | 5fdcf15f818eb2d0c7b5dd39443064d5bc42aff9 | /lc_valid_parantheses.py | 18bb3778b9edc3c6721301f71f978ca4a87a32cb | [] | no_license | vincentt117/coding_challenge | acf3664034a71ffd70c5f1ac0f6a66768e097a6e | 5deff070bb9f6b19a1cfc0a6086ac155496fbb78 | refs/heads/master | 2021-07-02T05:43:08.007851 | 2020-08-27T02:16:19 | 2020-08-27T02:16:19 | 146,027,883 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 570 | py | # https://leetcode.com/problems/valid-parentheses/description/
def isValid(self, s):
"""
:type s: str
:rtype: bool
"""
if not s:
return True
checkStack = []
for i in s:
if i == "(":
checkStack.append(")")
elif i == "[":
checkStack.append("]")
... | [
"[email protected]"
] | |
861a4a235ebe5bbe9d3f3015fffc82b10f920ddd | c1ea75db1da4eaa485d39e9d8de480b6ed0ef40f | /helper/conf/__init__.py | 0f8d87b95106d30140f7ae12f00266728f66965c | [
"Apache-2.0"
] | permissive | gasbarroni8/VideoCrawlerEngine | a4f092b0a851dc0487e4dcf4c98b62d6282a6180 | 994933d91d85bb87ae8dfba1295f7a69f6d50097 | refs/heads/master | 2023-04-06T07:59:29.269894 | 2021-02-10T16:09:15 | 2021-02-10T16:09:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 390 | py |
from .base import get_conf as __get_conf, ConfMeta, iter_conf
from typing import ClassVar
import importlib
import sys
DEBUG = True
def get_conf(__name: str, **kwargs) -> ClassVar[ConfMeta]:
package = f'{get_conf.__module__}.{__name}'
if not sys.modules.get(package, None):
importlib.import_module(pac... | [
"[email protected]"
] | |
bf18c68b958da2b5499bf7ff92df74368e1f21ef | db552a9fa9d1a3f45ff3a8fb668ad47998084aa1 | /ROS_projects_study/service_use/devel/lib/python2.7/dist-packages/my_service/srv/_AddInts.py | 73e64b34dc3500768888b91c9ba4926e7d1f796a | [] | no_license | gdamion/ROS_projects | 026529e99898152de0facfa854b01e1b2af55319 | a3e9c8d199fd7577ce183689428f159bf29acd41 | refs/heads/master | 2020-05-01T15:20:46.689036 | 2019-08-18T09:52:58 | 2019-08-18T09:52:58 | 177,544,163 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,402 | py | # This Python file uses the following encoding: utf-8
"""autogenerated by genpy from my_service/AddIntsRequest.msg. Do not edit."""
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
class AddIntsRequest(genpy.Message):
_md5sum = "05577f62131ad26921bff0de6b2cb722"
_type... | [
"[email protected]"
] | |
221cec3f4089608568eafe559900dd873f9954db | ce7cd2b2f9709dbadf613583d9816c862003b38b | /oof3dtest | 8aa978a57bd7edb034f399937ceef705b49f9323 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | usnistgov/OOF3D | 32b01a25154443d29d0c44d5892387e8ef6146fa | 7614f8ea98a095e78c62c59e8952c0eb494aacfc | refs/heads/master | 2023-05-25T13:01:20.604025 | 2022-02-18T20:24:54 | 2022-02-18T20:24:54 | 29,606,158 | 34 | 7 | null | 2015-02-06T19:56:26 | 2015-01-21T19:04:14 | Python | UTF-8 | Python | false | false | 1,089 | #!python
# -*- python -*-
# This software was produced by NIST, an agency of the U.S. government,
# and by statute is not subject to copyright in the United States.
# Recipients of this software assume all responsibilities associated
# with its operation, modification and maintenance. However, to
# facilitate maintena... | [
"[email protected]"
] | ||
792392790e9fed19536acbe1906d318837c248c1 | 9b64f0f04707a3a18968fd8f8a3ace718cd597bc | /huaweicloud-sdk-mpc/huaweicloudsdkmpc/v1/model/video_extend_settings.py | 3ac0cb8875d30324610815939b561555434a26ff | [
"Apache-2.0"
] | permissive | jaminGH/huaweicloud-sdk-python-v3 | eeecb3fb0f3396a475995df36d17095038615fba | 83ee0e4543c6b74eb0898079c3d8dd1c52c3e16b | refs/heads/master | 2023-06-18T11:49:13.958677 | 2021-07-16T07:57:47 | 2021-07-16T07:57:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,866 | py | # coding: utf-8
import re
import six
class VideoExtendSettings:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key i... | [
"[email protected]"
] | |
84ea987a1929e5afa62a6584aa35866c79086874 | 12e78946542250f64792bc6c1d8c8ff1ffecdaf7 | /Python/Django/ninja_gold/apps/dojo_ninjas/views.py | 10a05c9d6389bbd63f012c7f6704b9a636a3e904 | [] | no_license | mkrabacher/CodingDojoAssignments | 0fde5adf7223a9eac07a4867499a243e230a300e | 4afef4aaf4f129fb56376e57d8be437d1f124521 | refs/heads/master | 2021-05-14T13:38:03.570533 | 2018-02-23T00:09:24 | 2018-02-23T00:09:24 | 113,722,808 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 166 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.shortcuts import render, HttpResponse
def index(request):
return HttpResponse('hello')
| [
"[email protected]"
] | |
8f4884fe12de96cea161db86521397a440b8eef1 | 732536468e61932e7c0829934262b645effbd6d4 | /python_stack/django/django_intro/for_test/form_app/urls.py | d4277500dd0fc48dfbaa91957221c89bff1c4ca0 | [] | no_license | jignacioa/Coding-Dojo | 7a83919d09fb6ad714379dc58b1ce8e706ccc7b6 | 0e1f0d4fc528439bf34d866f4c409994741e870b | refs/heads/master | 2023-01-21T06:48:15.880635 | 2021-02-08T01:36:17 | 2021-02-08T01:36:17 | 251,421,342 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 168 | py | from django.urls import path
from . import views
urlpatterns = [
path('', views.index),
path('users', views.create_user),
path('success', views.success)
] | [
"[email protected]"
] | |
d98b243efb145b61bf43a079eb3c779f1d21840e | 4b72cfb730e9d967ecc9ece7a5dcdff03242ce7a | /7 კლასი/7_1/ბეგიაშვილი სანდრო/რიცხვის კვადრატები-.py | 6216a18d50bc1c6d313d3539b3c0b3b1d88a0031 | [] | no_license | sc-199/2018-2019 | 20945a0aaf7a998e6038e3fd3310c8be2296e54f | 578d7aad254dc566cf5f8502f1a82c1eb267cbc2 | refs/heads/master | 2020-04-26T02:59:26.560166 | 2019-05-03T13:32:30 | 2019-05-03T13:32:30 | 168,499,541 | 4 | 0 | null | 2019-02-14T17:17:25 | 2019-01-31T09:36:13 | Python | UTF-8 | Python | false | false | 128 | py | for i in range(1,10):
print(i**2)
print( 'kenti ricxvebi:')
for i in range(1,10):
if i % 2 != 0:
print(i**2)
| [
"[email protected]"
] | |
72edaccc4f12c2a7a357dd545d3b19e07e1e876b | ac1bbabc7c1b3149711c416dd8b5f5969a0dbd04 | /Python OOP/exams/shop/deliveries/drink.py | e8ab76ba18a1bb5a6342eb4daaa653a29d11c4be | [] | no_license | AssiaHristova/SoftUni-Software-Engineering | 9e904221e50cad5b6c7953c81bc8b3b23c1e8d24 | d4910098ed5aa19770d30a7d9cdf49f9aeaea165 | refs/heads/main | 2023-07-04T04:47:00.524677 | 2021-08-08T23:31:51 | 2021-08-08T23:31:51 | 324,847,727 | 1 | 0 | null | 2021-08-08T23:31:52 | 2020-12-27T20:58:01 | Python | UTF-8 | Python | false | false | 163 | py | from shop.deliveries.product import Product
class Drink(Product):
quantity = 10
def __init__(self, name):
super().__init__(name, Drink.quantity) | [
"[email protected]"
] | |
853de356187a49bd486d2e2290adba638ee294a9 | 8f6cc0e8bd15067f1d9161a4b178383e62377bc7 | /__OLD_CODE_STORAGE/openGL_NAME/textbook/5-12.py | f132d16dda9bf39c1a4c61c443e44627b68fb309 | [] | no_license | humorbeing/python_github | 9c4dfc61a3cefbb266fefff335f6b28d05797e5e | e4b4b49bee7e7e3843c6874717779ce8d619bd02 | refs/heads/master | 2023-01-22T21:51:20.193131 | 2020-01-26T21:47:23 | 2020-01-26T21:47:23 | 163,707,778 | 0 | 0 | null | 2022-12-27T15:37:48 | 2019-01-01T01:58:18 | Python | UTF-8 | Python | false | false | 1,751 | py | from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GLUT import *
PALETTE = ((255, 255, 255),
(0, 255, 255),
(255, 0, 255),
(0, 0, 255),
(192, 192, 192),
(128, 128, 128),
(0, 128, 128),
(128, 0, 128),
(0, 0... | [
"[email protected]"
] | |
2fed7108c460e6c23e9fe55b399f1701ac0aeeeb | d9a633b01da49ed38ca7c9c736b271ba671d9c4f | /pygameTest/pygame_test_01.py | 83fc17e7c9fa2f2a2183dcbddc176324564775b4 | [] | no_license | chmberl/sys | 4b90263f86d070f3bb15de4bd788c32f56ee17d0 | 7b7258796157d1b4417715ababc1d1cc5b7dbc1b | refs/heads/master | 2021-01-22T02:58:53.055702 | 2018-01-08T06:41:47 | 2018-01-08T06:41:47 | 22,147,604 | 0 | 0 | null | 2018-01-08T06:41:48 | 2014-07-23T12:54:34 | Python | UTF-8 | Python | false | false | 658 | py | import pygame
from pygame.locals import *
from sys import exit
pygame.init()
SCREEN_SIZE = (640, 480)
screen = pygame.display.set_mode(SCREEN_SIZE, 0, 32)
font = pygame.font.SysFont("arial", 16)
font_height = font.get_linesize()
event_text = []
while True:
event = pygame.event.wait()
event_text.append(str(e... | [
"[email protected]"
] | |
cc2bb833560bf80beae9e1a7cf4d46f75bf7a75b | 54f352a242a8ad6ff5516703e91da61e08d9a9e6 | /Source Codes/AtCoder/arc053/C/1254642.py | b4ebd66ee9b1032de9f913be200469beb2744bab | [] | 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 | 1,034 | py | import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return ... | [
"[email protected]"
] | |
c7add1aab765b5b612d8ba38cb651a1359bd3b53 | 24c5c46f1d281fc15de7f6b72a5148ae85f89fb4 | /script/runTest.py | 3256953f3be202d7068f5dbf6030c76716de72c7 | [] | no_license | enterpriseih/easyTest | 22d87c7ffe40fb10a07f7c5cdd505f63dd45adc0 | 43b8d294e898f25055c78313cfece2753352c250 | refs/heads/master | 2023-08-23T22:55:14.798341 | 2020-02-11T09:13:43 | 2020-02-11T09:13:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 279 | py | # coding:utf-8
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from script import addPathToPython, initSettings, selectModel
addPathToPython()
initSettings()
selectModel()
from SRC.main import Main
Main('login.xml').run() | [
"yaolihui0506"
] | yaolihui0506 |
29d0252de36655292ca9eb8a181601dcd56492fb | 545306d8368bbe6a369e462127ba5a9389f3f0e1 | /page/migrations/0003_postcategory_link.py | 4e121a8e4cbc0adbc6329f148a2ea7fbc3d7d7c3 | [
"MIT"
] | permissive | euskate/django-page | d86c45644508af635b828cbde764cdd7fd721d66 | f7d12f16a56545ace0e09e03727aa56416b538a2 | refs/heads/master | 2020-12-07T19:37:45.250776 | 2020-01-01T15:52:18 | 2020-01-01T15:52:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 456 | py | # Generated by Django 2.0.5 on 2018-11-14 16:30
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('page', '0002_auto_20181114_0429'),
]
operations = [
migrations.AddField(
model_name='postcategory',
name='link',
... | [
"[email protected]"
] | |
1b5b6be1567e3fe383b9568a3a0e8ea969def7c4 | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/exercism_data/python/anagram/d8df0609726548d9a6083d84700d3f3e.py | 708559896080d2883ad2f51a3acf1faf0d9d44f1 | [] | 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 | 409 | py | from collections import Counter
def detect_anagrams(word, options):
word = word.lower() #ignore case
word_char_count = Counter(char for char in word)
res = []
for option in options:
if option.lower() != word:
option_char_count = Counter(c for c in option.lower())
if... | [
"[email protected]"
] | |
c1e12dad4fdd03f0ad5fadb0a2918fe560bb2501 | c237dfae82e07e606ba9385b336af8173d01b251 | /lib/python/Products/ZGadflyDA/db.py | 409dcc6774b9ca8d71c9382f168eeff4d9eb2e18 | [
"ZPL-2.0"
] | permissive | OS2World/APP-SERVER-Zope | 242e0eec294bfb1ac4e6fa715ed423dd2b3ea6ff | dedc799bd7eda913ffc45da43507abe2fa5113be | refs/heads/master | 2020-05-09T18:29:47.818789 | 2014-11-07T01:48:29 | 2014-11-07T01:48:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,563 | py | ##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFT... | [
"[email protected]"
] | |
7aa5681a1475a9d4efeaf93110d2d95cf57166aa | 528f910908885c3ded4ecc6380b9603c8dcacbd6 | /tbapi/top/api/rest/WlbTmsorderQueryRequest.py | bcac48c2b08a01a46b9956084883246e889adc8d | [] | no_license | Monica-ckd/data007 | 15fe9c4c898a51a58100138b6b064211199d2ed1 | 0e54ae57eb719b86ec14ce9f77b027882a3398a8 | refs/heads/master | 2023-03-16T05:26:14.257318 | 2016-05-25T06:57:05 | 2016-05-25T06:57:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 363 | py | '''
Created by auto_sdk on 2013-04-01 16:44:41
'''
from top.api.base import RestApi
class WlbTmsorderQueryRequest(RestApi):
def __init__(self,domain='gw.api.taobao.com',port=80):
RestApi.__init__(self,domain, port)
self.order_code = None
self.page_no = None
self.page_size = None
def getapiname(sel... | [
"[email protected]"
] | |
1330a1d78ccbfcb3b204dddbc5a7a1770d985167 | 9e3d8cca75de767f948736c7cde601221c4ef8ab | /core/migrations/0006_pontoturistico_enderecos.py | 7918f3e394208fee0d5e855cc4eed65f5a8b96d4 | [] | no_license | miradouro/pontosturisticos | b6d744c0b33f9ecdc8dca405615c7cc8a3ba202f | 4ea382281b8999eceab8add13ab2bd511319d58c | refs/heads/master | 2023-03-30T16:11:14.359286 | 2021-04-07T11:47:18 | 2021-04-07T11:47:18 | 354,115,695 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 454 | py | # Generated by Django 3.1.7 on 2021-04-03 11:40
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('enderecos', '0001_initial'),
('core', '0005_pontoturistico_avaliacoes'),
]
operations = [
migrations.AddField(
model_nam... | [
"[email protected]"
] | |
28b89f558948ad6bda3670a0422fe88aae42ce52 | c3113792bfe44d160b7cc9d79203d7f6da02aec5 | /news/migrations/0023_remove_post_thumbnail.py | e249ea056b565076d9b4e11801fb1189d4dae220 | [] | no_license | eyobofficial/sport-news-app | 9eb07afeeeae2bf7143405fbc0d1964292e5a11d | 2da74b1c458b34a7a8f9a306234f067436eda9da | refs/heads/master | 2020-03-18T20:08:18.213627 | 2018-06-04T19:07:16 | 2018-06-04T19:07:16 | 135,197,904 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 326 | py | # Generated by Django 2.0.5 on 2018-06-02 18:45
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('news', '0022_auto_20180602_1834'),
]
operations = [
migrations.RemoveField(
model_name='post',
name='thumbnail',
),
... | [
"[email protected]"
] | |
a74223ae54fe94a82e612222bbbeff4f6a24e933 | 8ef5a09d76a11c56963f18e6a08474a1a8bafe3c | /leet_code/331. Verify Preorder Serialization of a Binary Tree.py | 58f4b9c19280f69a0cbf987f798fba83c5888e2b | [] | no_license | roiei/algo | 32c4677649c7666db148f6183fbfbf66c8b1969f | ae8bb8bf4ae4026ccaf1dce323b4098547dd35ec | refs/heads/master | 2022-04-01T19:21:27.768675 | 2022-02-19T06:15:29 | 2022-02-19T06:15:29 | 169,021,154 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 678 | py | import time
from util_list import *
from util_tree import *
import copy
import collections
class Solution:
def isValidSerialization(self, preorder: str) -> bool:
stk = []
for val in preorder.split(','):
stk += val,
while len(stk) >= 2 and stk[-2] == '#' and stk[... | [
"[email protected]"
] | |
b2450cfef5fe4b41d70cd89869059ea22707ec59 | 437b1f6c3450a53e6e51eda62c85e3b4e098c8d2 | /operadores/Idades.py | ed6f27b28bdc85390c51fcbcd39dc168e5c6fbc8 | [] | no_license | pocceschi/aprendendo_git | 16d5194b2372970b469ff8db42290f7f152b538b | 704e4e40cd0e36b02e09bf411f42f23ab931d5fc | refs/heads/main | 2023-04-07T05:25:03.549470 | 2021-04-01T23:29:04 | 2021-04-01T23:29:04 | 353,849,682 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 286 | py | print("Dados da primeira pessoa: ")
nome1 = str(input("Nome: "))
idade1 = int(input("Idade: "))
print("Dados da segunda pessoa: ")
nome2 = str(input("Nome: "))
idade2 = int(input("Idade: "))
media = (idade1 + idade2) / 2
print(f"A idade média de {nome1} e {nome2} é de {media:.2f}")
| [
"[email protected]"
] | |
1d83c4355f9a26123159aa9e8e48d5b0fe6a3a75 | 37194bcee20e66e84360010d98a45adcced57963 | /Algorithem_my/IM_Motherboard/6190/6190.py | fc9d929b23a4e98d9078e6f893607835ebc2a934 | [] | no_license | dmdekf/algo | edcd1bbd067102a622ff1d55b2c3f6274126414a | 544a531799295f0f9879778a2d092f23a5afc4ce | refs/heads/master | 2022-09-13T14:53:31.593307 | 2020-06-05T07:06:03 | 2020-06-05T07:06:03 | 237,857,520 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 433 | py | import sys
sys.stdin = open('input.txt')
def p(num):
while num:
r = num % 10
num = num // 10
if r < num%10:
return False
return True
T = int(input())
for tc in range(1, T+1):
N = int(input())
d = list(map(int, input().split()))
d = sorted(d)
for i in range(N... | [
"[email protected]"
] | |
bc7c8910ea133c2a685757bc62f84d72cabcac8b | ffe4c155e228f1d3bcb3ff35265bb727c684ec1a | /UCL/Algorithms/Sorting & Searching/heap_sort.py | 9e3cb91645279c9eff8750c1ff7939fbd07e1d04 | [] | no_license | yuuee-www/Python-Learning | 848407aba39970e7e0058a4adb09dd35818c1d54 | 2964c9144844aed576ea527acedf1a465e9a8664 | refs/heads/master | 2023-03-12T00:55:06.034328 | 2021-02-28T13:43:14 | 2021-02-28T13:43:14 | 339,406,816 | 0 | 0 | null | 2021-02-28T11:27:40 | 2021-02-16T13:26:46 | Jupyter Notebook | UTF-8 | Python | false | false | 231 | py | from binary_heap import*
def heapSort(alist):
bh = BinHeap()
bh.buildHeap(alist)
lst = []
while not bh.isEmpty():
lst.append(bh.delMin())
return lst
alist = [1,2,3,4,5,8,7,6,6]
print(heapSort(alist))
| [
"[email protected]"
] | |
a3bb51288c892782c7b8c94d0503d2598d5cec18 | 05297c66b8881b734bd3d8cb01b69eb927157f53 | /src/ava/job/errors.py | 3fa89547c8404e6f5dfdf84142bd377e2814214a | [
"Apache-2.0"
] | permissive | nickchen-mitac/fork | 4b75c2204cede08e4c71d85261da2e826330ff9f | 64dab56012da47465b4923f30f26925476c87afc | refs/heads/master | 2021-01-10T06:27:57.701844 | 2015-11-03T09:01:31 | 2015-11-03T09:01:31 | 45,453,006 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 327 | py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
from ava.core import AvaError
class JobCancelledError(AvaError):
pass
class ScriptSyntaxError(AvaError):
def __init__(self, *args, **kwargs):
super(ScriptSyntaxError, self).__init__(*args, **k... | [
"[email protected]"
] | |
2dba634705e99a2bad5fca280fc4c0d56088c2d8 | 78456214246b3fca7636d9f91d15f1c25ae00f77 | /flowmeter/config/core/log.py | 9e79c6f0bb73290c74854b5ce5ec16488b7f6851 | [] | no_license | Zhuuhn/flowmeter | 4404bbead2c7e7804364623b612a89ec80a69fb9 | 9ea4f497fb2a4de64f7b2d8c453066df7ec8a483 | refs/heads/master | 2022-08-22T01:01:45.687526 | 2020-05-27T10:02:21 | 2020-05-27T10:02:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 763 | py | # coding=utf-8
from flowmeter.config.db.log_table import AlarmLog, OprLog, SystemLog
def add_alarm_log(log):
return AlarmLog.objects.create(alarm_type=log['alarm_type'], meter_id=log['meter_id'], opr_time=log['opr_time'])
def add_opr_log(log):
opr = OprLog.objects.create(**log)
return op... | [
"[email protected]"
] | |
8ffc68f6def3a710f9c3285915e486060990e051 | b0f2c47881f39ceb5a989b9638483f7439bfb5cf | /Problem77.py | 2d72d0b64c35bd5631ecaf1a7efff986981eaefb | [] | no_license | chrisvail/Project_Euler | 9ba264c8ec9d158b33ec677811e59d1e0e52fef2 | 41623c27b3e1344f9d8ebdfac4df297d0666cc07 | refs/heads/main | 2023-02-13T20:26:42.752780 | 2021-01-15T16:38:27 | 2021-01-15T16:38:27 | 329,964,440 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 392 | py | from StandardFunctions import genprimes
from itertools import count
primes = genprimes(1000)
for target in count():
ways = [0 for _ in range(target + 1)]
ways[0] = 1
for i in primes:
for j in range(i, target + 1):
ways[j] += ways[j - i]
print(ways[-1]... | [
"[email protected]"
] | |
cd211fae8a73579ec113ee9bc0d541ad3e3dd4b7 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /kjJWvK9XtdbEJ2EKe_22.py | 279d9872a60ea239f541d40214d2a846a569506d | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,014 | py | """
Python has a beautiful built-in function `sorted` that sorts an iterable,
usually an array of numbers, sorting them in ascending order, but using `key=`
you can sort the iterable in different ways.
Create a function that takes an array of integers as an argument and returns
the same array in ascending order. Us... | [
"[email protected]"
] | |
c1d7b781f24649f27e2a1e76543ce918281badf7 | 1113c8d5689685106fd77363e5561006d8ecef0d | /confbusterplusplus/aligner.py | 2ec09dc3fe54ecf09bc33b94b1e27766826602c5 | [
"MIT"
] | permissive | dsvatunek/ConfBusterPlusPlus | 238f73ab48e6d1d1491cbf4406acf828d76a56f9 | 2de751f409ffdb791d8b04fd4b3d08645beebaa6 | refs/heads/master | 2022-11-09T18:28:26.880541 | 2020-06-24T05:50:35 | 2020-06-24T05:50:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 448 | py |
from rdkit.Chem import AllChem
class MolAligner:
def __init__(self, max_iters):
self.max_iters = max_iters
def align_global(self, mol):
rmsd = []
AllChem.AlignMolConformers(mol, maxIters=self.max_iters, RMSlist=rmsd)
return rmsd
def align_atoms(self, mol, atoms):
... | [
"[email protected]"
] | |
b4e86b17979bb6357a4ba72329709913ee08d6b1 | 05e2277cf1af409123f43fc0a3226014dd170556 | /11286.py | bda540ef1205168f0af5aa383953c4a6c163a4e4 | [] | no_license | 2021-01-06/baekjoon | 4dec386574ce9f51f589a944b71436ce1eb2521e | ca8f02ecbed11fe98adfd1c18ce265b10f1298bc | refs/heads/main | 2023-05-06T08:19:53.943479 | 2021-05-14T03:25:55 | 2021-05-14T03:25:55 | 327,730,237 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 279 | py | import heapq
import sys
h=[]
n=int(sys.stdin.readline())
for _ in range(n):
o=int(sys.stdin.readline())
if o==0:
if len(h)==0:
print(0)
else:
print(heapq.heappop(h)[1])
else:
heapq.heappush(h,(abs(o),o)) | [
"[email protected]"
] | |
07b1e3108279514ee49174b1f35c9e3067165c51 | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/CodeJamCrawler/16_0_2/cherry.su/b.py | 41f0dc05a41ed75223d02f95d2bd1c67fc0af7a0 | [] | no_license | DaHuO/Supergraph | 9cd26d8c5a081803015d93cf5f2674009e92ef7e | c88059dc66297af577ad2b8afa4e0ac0ad622915 | refs/heads/master | 2021-06-14T16:07:52.405091 | 2016-08-21T13:39:13 | 2016-08-21T13:39:13 | 49,829,508 | 2 | 0 | null | 2021-03-19T21:55:46 | 2016-01-17T18:23:00 | Python | UTF-8 | Python | false | false | 1,190 | py | def flip(S, n):
for i in range((n+1)//2):
tmp = S[n-1-i]
S[n-1-i] = not S[i]
S[i] = not tmp
def num_upright_bottom(S):
c = 0
for p in reversed(S):
if p:
c += 1
else:
break
return c
def num_down_top(S):
c = 0
for p in S:
if... | [
"[[email protected]]"
] | |
4d1ec5bf8d2d82b6cf5987de69f24df3b6806f4f | 1c2ed80f77782ebee5b90480dbfc74a2d145d53f | /python-base/src/learn/function/func_param.py | d44d060af6242c40aa3893ff506a424f0c5fc7fd | [] | no_license | icesx/IPython | 970dfe7260906d85706b7117044510b5929e9098 | 452c63e17c6f05cb0540974f7c01c1e73f9836fe | refs/heads/master | 2021-07-05T02:30:29.956369 | 2021-02-02T07:09:58 | 2021-02-02T07:09:58 | 220,771,536 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 255 | py | #!/usr/bin/python
# Filename: func_param.py
def printMax(a,b):
if a > b:
print(a,'is maximum')
else:
print(b,'is maximum')
printMax(3,4) # directly give literal values
x = 5
y = 7
printMax(x,y) # give variables as arguments
| [
"[email protected]"
] | |
b4cc2afa134e8d011f1cf4f1848b20a0d3abc505 | 5c9b70a21636cd64a3d9ccfd224740d4ca049e19 | /rest/app.py | fb43feb693bc0233c6893c8bd082e3a9cc4b1e94 | [
"MIT"
] | permissive | shaneramey/wq.db | 14d8c711796ab29b6d84cca6c2d52db8e3ebb2b6 | bc14412e5a7be7964d6d0fcddca931c348120b82 | refs/heads/master | 2021-01-15T19:13:14.601893 | 2015-08-11T19:53:44 | 2015-08-11T19:53:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 256 | py | import warnings
warnings.warn(
"The wq.db.rest.app API has been moved to wq.db.rest. "
"The actual Router implementation has moved to wq.db.rest.routers",
DeprecationWarning
)
from . import ModelRouter as Router, router, autodiscover # NOQA
| [
"[email protected]"
] | |
c36022c620246c3970cc742c543e4e7be05fb805 | 92b9a9253c63ba56ff4bd58af268c1e304634841 | /backend/chat/chat/settings.py | fdd9a88f6827828de5a2564632bedf1457f7533d | [] | no_license | alisamadzadeh46/ChatApplication | 264a48a3747235d5f30c254f6fcd7cd145b595ac | 77bb86ccc26685a6e4dbf9a84d9d950bd1574549 | refs/heads/main | 2023-05-10T23:07:00.337906 | 2021-05-28T16:23:28 | 2021-05-28T16:23:28 | 364,041,128 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,226 | py | """
Django settings for chat project.
Generated by 'django-admin startproject' using Django 3.2.
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 pathlib impo... | [
"[email protected]"
] | |
66234f05a7f6f820e92d03a4479a6148be56e6a3 | 1fe56144905244643dbbab69819720bc16031657 | /.history/books/models_20210422134752.py | 92cb170912298100d4da3d6feccd653ccf98d187 | [] | no_license | RaghdaMadiane/django | 2052fcdd532f9678fefb034bd60e44f466bd9759 | 6ca3f87f0b72880f071d90968f0a63ea5badcca8 | refs/heads/master | 2023-04-15T17:28:25.939823 | 2021-04-24T22:33:21 | 2021-04-24T22:33:21 | 361,279,372 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,146 | py | from django.db import models
from django.contrib.auth.models import User
import uuid
class Category(models.Model):
class Meta:
verbose_name_plural="categories"
name = models.CharField(max_length=50)
created_at = models.DateTimeField(auto_now_add=True)
def __str__(self):
return self.name... | [
"[email protected]"
] | |
2cb94f2886fd17bfec48f28e55cc1d7bdcaa1b10 | a6e4a6f0a73d24a6ba957277899adbd9b84bd594 | /sdk/python/pulumi_azure_native/apimanagement/v20200601preview/get_api_operation_policy.py | 8bd64155864e351bfc26b33f84d54382ac902c40 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | MisinformedDNA/pulumi-azure-native | 9cbd75306e9c8f92abc25be3f73c113cb93865e9 | de974fd984f7e98649951dbe80b4fc0603d03356 | refs/heads/master | 2023-03-24T22:02:03.842935 | 2021-03-08T21:16:19 | 2021-03-08T21:16:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,468 | 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
from ... import _utilities, _tables
__a... | [
"[email protected]"
] | |
ad4ec0230be02dee98e2add102f733659a731918 | e71b6d14fbdbc57c7234ca45a47329d7d02fc6f7 | /flask_api/venv/lib/python3.7/site-packages/vsts/git/v4_1/models/git_commit_changes.py | 5986784ad2ae58eca95cc064936a557c15a18a50 | [] | no_license | u-blavins/secret_sasquatch_society | c36993c738ab29a6a4879bfbeb78a5803f4f2a57 | 0214eadcdfa9b40254e331a6617c50b422212f4c | refs/heads/master | 2020-08-14T00:39:52.948272 | 2020-01-22T13:54:58 | 2020-01-22T13:54:58 | 215,058,646 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,171 | py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -----------------------------------------------------------------... | [
"[email protected]"
] | |
2362371a28d13cb9cafaadbc182329e9fbd924c5 | 679fc3c015f31859899543c6844c76da44941a28 | /main/migrations/0003_auto_20151024_1811.py | d9fd8c07a24c7e40590184cead52757839f2608c | [] | no_license | swheatley/twitter | 2323a2c0270b4cd13795e8f0bf342aa428fd5274 | ce118d22368d958696710baf44dcd07115e1ce66 | refs/heads/master | 2021-01-10T03:12:42.113952 | 2015-11-18T05:18:13 | 2015-11-18T05:18:13 | 46,396,954 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,576 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0002_auto_20151023_1738'),
]
operations = [
migrations.DeleteModel(
name='Place',
),
mig... | [
"[email protected]"
] | |
afea4008f8c4c5c9538d98a64af56f9314244cb0 | 2e8f0de7a1526ef511927783235edc93f7c90036 | /communicare/core/migrations/0033_expense.py | bfde8cbaa2f90f3e72d5fa3cfcba4cecd9ac021e | [] | no_license | ConTTudOweb/CommunicareProject | 3d663578dfdeb455bc49419b3d103daec69c8fab | 211a1124c8c4549c609832ad71069a55c714a430 | refs/heads/master | 2022-12-21T12:59:35.424560 | 2021-05-10T22:16:15 | 2021-05-10T22:16:15 | 163,891,380 | 0 | 1 | null | 2022-12-08T07:43:22 | 2019-01-02T21:27:42 | HTML | UTF-8 | Python | false | false | 922 | py | # Generated by Django 2.1.8 on 2019-09-23 16:58
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0032_registration_net_value'),
]
operations = [
migrations.CreateModel(
name='Expense',... | [
"[email protected]"
] | |
70221007808c9d0fe7c30493eff55d871b67547e | 46279163a543cd8820bdc38133404d79e787c5d2 | /torch/distributed/rpc/rref_proxy.py | f087514d92a8deea48d50c6d77e6e353ff2fe889 | [
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"BSL-1.0",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | erwincoumans/pytorch | 31738b65e7b998bfdc28d0e8afa7dadeeda81a08 | ae9f39eb580c4d92157236d64548b055f71cf14b | refs/heads/master | 2023-01-23T10:27:33.628897 | 2020-12-06T01:22:00 | 2020-12-06T01:23:40 | 318,930,000 | 5 | 1 | NOASSERTION | 2020-12-06T01:58:57 | 2020-12-06T01:58:56 | null | UTF-8 | Python | false | false | 1,197 | py | from functools import partial
from . import functions
import torch
def _local_invoke(rref, func_name, args, kwargs):
return getattr(rref.local_value(), func_name)(*args, **kwargs)
@functions.async_execution
def _local_invoke_async_execution(rref, func_name, args, kwargs):
return getattr(rref.local_value(), ... | [
"[email protected]"
] | |
596324358e29714d198611478dfc5c42b15d24f5 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_136/185.py | 9299bc6923e7f47d089372fb9fc20d6aba78a70c | [] | 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 | 434 | py | file = open('input', 'r')
problems = int(file.readline())
for i in range(1, problems+1):
values = file.readline().split()
C = float(values[0])
F = float(values[1])
X = float(values[2])
F_t = 2 # total cookie production
T_t = 0.0 # total Time
while True:
if (X-C) / F_t < X / (F_t + F):
T_t = T_t + X / F_t
... | [
"[email protected]"
] | |
2ddbc6fa0cef023e1fcc6a98054552d1885b1d99 | e23a4f57ce5474d468258e5e63b9e23fb6011188 | /125_algorithms/_exercises/exercises/_algorithms_challenges/pybites/beginner/143_v2/test_merge.py | fea2b47c842e7412cac0de3aad7246451f21676d | [] | no_license | syurskyi/Python_Topics | 52851ecce000cb751a3b986408efe32f0b4c0835 | be331826b490b73f0a176e6abed86ef68ff2dd2b | refs/heads/master | 2023-06-08T19:29:16.214395 | 2023-05-29T17:09:11 | 2023-05-29T17:09:11 | 220,583,118 | 3 | 2 | null | 2023-02-16T03:08:10 | 2019-11-09T02:58:47 | Python | UTF-8 | Python | false | false | 438 | py | # ____ ? _______ ? ?
#
#
# ___ test_regular_name
# ... ? 'tim' __ 30
# ... ? 'helen' __ 26
# ... ? 'otto' __ 44
#
#
# ___ test_case_insensitive_lookup
# ... ? 'Tim' __ 30
# ... ? 'BOB' __ 17
# ... ? 'BrEnDa' __ 17
#
#
# ___ test_name_not_found
# ... ? 'timothy' __ ?
# ... ? N.. __ ?
# ... | [
"[email protected]"
] | |
47958a14553a0915ab6b56f000a447ea7dd84437 | 35bad5d9982b5d4f107fc39c41f16e99a5eae1f3 | /leaflet/views/admin/sitetext.py | 8b98796f1183721c1c59d37f075bbd3ea4447018 | [] | no_license | umeboshi2/leaflet | 17c502ce87076633e3b98c6c85efcb07cda2db6b | 63a60d43b93bd07d7d04165ebbe63cb97a44d537 | refs/heads/master | 2020-04-25T12:19:17.824626 | 2014-01-31T19:28:15 | 2014-01-31T19:28:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,338 | py | from cStringIO import StringIO
from datetime import datetime
import transaction
from pyramid.httpexceptions import HTTPFound, HTTPNotFound
from pyramid.security import authenticated_userid
from pyramid.renderers import render
from pyramid.response import Response
from trumpet.models.sitecontent import SiteText
fro... | [
"[email protected]"
] | |
dcba76ba54dce28cee2bc6891fc957ec5889ac55 | 1bed2f766620acf085ed2d7fd3e354a3482b8960 | /homeassistant/components/hassio/websocket_api.py | eb0d6c5407700eb07de2f6ea5f08199c18eccb70 | [
"Apache-2.0"
] | permissive | elupus/home-assistant | 5cbb79a2f25a2938a69f3988534486c269b77643 | 564150169bfc69efdfeda25a99d803441f3a4b10 | refs/heads/dev | 2023-08-28T16:36:04.304864 | 2022-09-16T06:35:12 | 2022-09-16T06:35:12 | 114,460,522 | 2 | 2 | Apache-2.0 | 2023-02-22T06:14:54 | 2017-12-16T12:50:55 | Python | UTF-8 | Python | false | false | 4,002 | py | """Websocekt API handlers for the hassio integration."""
import logging
from numbers import Number
import re
import voluptuous as vol
from homeassistant.components import websocket_api
from homeassistant.components.websocket_api.connection import ActiveConnection
from homeassistant.core import HomeAssistant, callback... | [
"[email protected]"
] | |
58d550ac0a1237bb4221e2f0f80bac28fda11a38 | 8d9318a33afc2c3b5ca8ac99fce0d8544478c94a | /Books/Casandra DB/opscenter-5.1.0/lib/py-unpure/twisted/cred/portal.py | 753b403a49430029b67597bf02961652837e848a | [] | no_license | tushar239/git-large-repo | e30aa7b1894454bf00546312a3fb595f6dad0ed6 | 9ee51112596e5fc3a7ab2ea97a86ec6adc677162 | refs/heads/master | 2021-01-12T13:48:43.280111 | 2016-11-01T22:14:51 | 2016-11-01T22:14:51 | 69,609,373 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 129 | py | version https://git-lfs.github.com/spec/v1
oid sha256:d41d59435554fcf0301c2274fa426aa4626a815369ad9324a386bc1b55e624a4
size 5349
| [
"[email protected]"
] | |
760d089693d1a60a72a09c0a91b878dd7725787c | 409cec0b3346bbb88fdaf1df9adbd38de842f6b6 | /UploadDataToES/test/testCovertStrToDatatime.py | 06098c1dc36750a7f7fe48522406cb6fdaaa567f | [] | no_license | parahaoer/pythoncode | 3276815d9cffbff768128ad83db1e344702f7bd8 | 7cbf7c4e0df7678335e6fbbb48115373c6a8a0df | refs/heads/master | 2020-11-26T06:55:07.685666 | 2020-05-05T02:20:33 | 2020-05-05T02:20:33 | 228,995,890 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 548 | py | '''
需要用大的时间减去小的时间,才能得到以秒为单位的时间差
如果用小的时间减去大的时间,结果为86399
'''
import datetime
str_p = "2019-05-14T23:16:11.010Z"
str_q = "2019-05-14T23:16:11.011Z"
str_r = "2019-05-14T23:16:09.819Z"
dateTime_p = datetime.datetime.strptime(str_r,'%Y-%m-%dT%H:%M:%S.%fZ')
dateTime_q = datetime.datetime.strptime(str_q,'%Y-%m-%dT%H:%M:... | [
"[email protected]"
] | |
9d5335f025da0b78549226cfe60197b70b82deec | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_81/295.py | 320b05162c6c66e77f1bf427cf3bcdffd862d6cf | [] | 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 | 1,758 | py | #
# Google Code Jam 2011
# Roaund 1B: A. RPI
# submission by EnTerr
#
'''
Input
2
3
.10
0.1
10.
4
.11.
0.00
01.1
.10.
Output
Case #1:
0.5
0.5
0.5
Case #2:
0.645833333333
0.368055555556
0.604166666667
0.395833333333
'''
import sys
import psyco
psyco.full()
inf = open(sys.a... | [
"[email protected]"
] | |
448549db9aca16d831fdea6643397e4b1a98a416 | 0facb323be8a76bb4c168641309972fa77cbecf2 | /Configurations/HWWSemiLepHighMass/nanoAODv5/v6_production/2016/SKIM10/HMVAR10_Full_SBI/FilterMelaReweights.py | 43c5460e94e2d470c6b9a5fb095fd1194f74e2d1 | [] | no_license | bhoh/SNuAnalytics | ef0a1ba9fa0d682834672a831739dfcfa1e7486b | 34d1fc062e212da152faa83be50561600819df0e | refs/heads/master | 2023-07-06T03:23:45.343449 | 2023-06-26T12:18:28 | 2023-06-26T12:18:28 | 242,880,298 | 0 | 1 | null | 2020-02-25T01:17:50 | 2020-02-25T01:17:49 | null | UTF-8 | Python | false | false | 5,858 | py | import ROOT
from math import sqrt
from LatinoAnalysis.Tools.commonTools import *
def GetMinMaxCut(filelist,model,mode,nsigma=2):
#Root.gROOT.SetBatch(True)
Sum=0
Sum2=0
Nentry=0
print "===="+model+mode+"====="
print filelist[0]
for f in filelist:
if '###' in f:
f=f... | [
"[email protected]"
] | |
0d4b7775ac08f9045cc81bf06fee576d22c7ee4d | 3fc4cac282465350d9b2983527140fc735a0d273 | /venv/bin/list_instances | e632e65514a792427c742a744945098751afb9b4 | [] | no_license | Orderlee/SBA_STUDY | 2cfeea54d4a9cbfd0c425e1de56324afcc547b81 | 4642546e7546f896fc8b06e9daba25d27c29e154 | refs/heads/master | 2022-12-25T01:08:05.168970 | 2020-09-27T14:57:23 | 2020-09-27T14:57:23 | 299,050,168 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,140 | #!/Users/YoungWoo/PycharmProjects/ClassProject/venv/bin/python
import sys
from operator import attrgetter
from optparse import OptionParser
import boto
from boto.ec2 import regions
HEADERS = {
'ID': {'get': attrgetter('id'), 'length':15},
'Zone': {'get': attrgetter('placement'), 'length':15},
'Groups': ... | [
"[email protected]"
] | ||
97c3b121be36f09c69f51581c20a82d254464bc0 | 751d837b8a4445877bb2f0d1e97ce41cd39ce1bd | /codegolf/szekeress-sequence.py | 9da4b302795111ca6d2dc7d80a80fcc565d91a39 | [
"MIT"
] | permissive | qeedquan/challenges | d55146f784a3619caa4541ac6f2b670b0a3dd8ba | 56823e77cf502bdea68cce0e1221f5add3d64d6a | refs/heads/master | 2023-08-11T20:35:09.726571 | 2023-08-11T13:02:43 | 2023-08-11T13:02:43 | 115,886,967 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,751 | py | #!/usr/bin/env python
"""
Definition
a(1)=1
a(2)=2
a(n) is smallest number k>a(n−1) which avoids any 3-term arithmetic progression in a(1),a(2),...,a(n−1),k.
In other words, a(n) is the smallest number k>a(n−1) such that there does not exist x,y where 0<x<y<n and a(y)−a(x)=k−a(y).
Worked out example
For n=5:
We hav... | [
"[email protected]"
] | |
422351a1ca13fdc6b9b94e29d06c8ce38f33fc91 | 202bfd3bc23b4aa4e7477c9ba3685517dbad592b | /geo/geo_map.py | 5b621b60069c22a66140d968fe2dca1a2c72fb1a | [] | no_license | yan7509/python_get_cityDistance | 3b493cd9c53ba3543c6febe5d95096b5175ef6f4 | ee51faa2f091352e41511749893bd6c4a74d5596 | refs/heads/master | 2022-03-27T06:59:37.566494 | 2019-12-24T14:42:15 | 2019-12-24T14:42:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,916 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#__author__: stray_camel
import urllib.request #发送请求
from urllib import parse #URL编码
import json,logging,jsonpath,sys,os
absPath = os.path.abspath(__file__) #返回代码段所在的位置,肯定是在某个.py文件中
temPath = os.path.dirname(absPath) #往上返回一级目录,得到文件所在的路径
temPath = os.path.dirname(temPath) ... | [
"[email protected]"
] | |
8d4383b237d5d13addbf71367b1be45c842b7824 | 41c824ce983c2a400ca6484b365d6f7ee077c8a3 | /tools/dlrobot/robot/adhoc/__init__.py | 3c6b21535cd0135398559ace340e20caf1bf521f | [] | no_license | TI-Russia/smart_parser | 2c84c12906e308229037c2bc75299a4b227e795e | 7428904975b2cf88cb329b8da11017cdebe8fa03 | refs/heads/master | 2022-12-10T06:40:43.852974 | 2022-08-05T11:06:18 | 2022-08-05T11:06:18 | 129,266,366 | 16 | 4 | null | 2022-12-08T11:18:29 | 2018-04-12T14:44:23 | HTML | UTF-8 | Python | false | false | 558 | py | from .tomsk import tomsk_gov_ru
from .gossov_tatarstan_ru import gossov_tatarstan_ru
from .tgl_ru import tgl_ru
def process_adhoc(project):
domain_name = project.web_site_snapshots[0].get_site_url()
if domain_name == "tomsk.gov.ru":
tomsk_gov_ru(project.web_site_snapshots[0])
return True
e... | [
"[email protected]"
] | |
58cc6821d162a7e585a143940bbcfeae923b3ce5 | 8d35b8aa63f3cae4e885e3c081f41235d2a8f61f | /discord/ext/dl/extractor/outsidetv.py | a51556678bbcace6900d5b695026f00117f88f0c | [
"MIT"
] | permissive | alexyy802/Texus | 1255f4e54c8d3cc067f0d30daff1cf24932ea0c9 | c282a836f43dfd588d89d5c13f432896aebb540f | refs/heads/master | 2023-09-05T06:14:36.217601 | 2021-11-21T03:39:55 | 2021-11-21T03:39:55 | 429,390,575 | 0 | 0 | MIT | 2021-11-19T09:22:22 | 2021-11-18T10:43:11 | Python | UTF-8 | Python | false | false | 1,062 | py | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class OutsideTVIE(InfoExtractor):
_VALID_URL = r"https?://(?:www\.)?outsidetv\.com/(?:[^/]+/)*?play/[a-zA-Z0-9]{8}/\d+/\d+/(?P<id>[a-zA-Z0-9]{8})"
_TESTS = [
{
"url": "http://www.outsidetv.com/catego... | [
"[email protected]"
] | |
89597cd37a0ca9703e1d6b442608c30d8f3ba662 | 6c95a0cebf78c27b93d15c17631d208d3d4715b1 | /plotApCorr1runMany.py | e4706f6b5032da6193f965dc1c4365fc7b832ef7 | [] | no_license | standardgalactic/hipe-code | 3a7f9d4a7c4877564de1f6468a9783d1de3e90c5 | 600bb3fce7cdf2bc1e6120b3cfe4ffc1bb154d55 | refs/heads/master | 2022-02-11T02:16:35.558135 | 2014-02-26T10:26:13 | 2014-02-26T10:26:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,468 | py | import sys
from herschel.ia.gui.plot.renderer.PComponentEngine import HAlign
from herschel.ia.gui.plot.renderer.PComponentEngine import VAlign
from herschel.ia.numeric.toolbox.basic import Histogram
from herschel.ia.numeric.toolbox.basic import BinCentres
## Plot aperture photometry stuff
pc=False
pf=False
#radiusA... | [
"[email protected]"
] | |
98427273cabbe338ee47cfa39fde2c69ec153cca | 47bd686ab04d8f6daba2097875dfefdba967d598 | /04_30days_codechallenge/23_bst_level_order_traversal.py | 37aa0c48d678a98f9e83a481962778e43456ddd1 | [] | no_license | EmjayAhn/DailyAlgorithm | 9633638c7cb7064baf26126cbabafd658fec3ca8 | acda1917fa1a290fe740e1bccb237d83b00d1ea4 | refs/heads/master | 2023-02-16T17:04:35.245512 | 2023-02-08T16:29:51 | 2023-02-08T16:29:51 | 165,942,743 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,016 | py | # https://www.hackerrank.com/challenges/30-binary-trees/tutorial
import sys
class Node:
def __init__(self,data):
self.right=self.left=None
self.data = data
class Solution:
def insert(self,root,data):
if root==None:
return Node(data)
else:
if data <= roo... | [
"[email protected]"
] | |
5e5c6c67ed787564c6fcddba3284c101b5e1b8b2 | 2b255d07420114c40f6c8aeb0fb25228588282ed | /sitecomber/apps/config/management/commands/init_site_config.py | dcea81441583eabd41af10a706aab0aa348125a0 | [] | no_license | ninapavlich/sitecomber | b48b3ee055dac1f419c98f08fffe5e9dc44bd6e3 | 6f34e5bb96ca4c119f98ee90c88881e8ca3f6f06 | refs/heads/master | 2022-12-11T20:55:07.215804 | 2020-03-13T07:58:28 | 2020-03-13T07:58:28 | 197,045,165 | 1 | 0 | null | 2022-12-08T01:47:52 | 2019-07-15T17:42:31 | JavaScript | UTF-8 | Python | false | false | 1,900 | py | import logging
from django.core.management.base import BaseCommand
from django.conf import settings
from django.contrib.auth import get_user_model
from django.core.validators import URLValidator
from django.core.exceptions import ValidationError
from sitecomber.apps.config.models import Site, SiteDomain, SiteTestSett... | [
"[email protected]"
] | |
eaff999078aae74c52b25f7fa8882f8922f8eacf | 1cc59b6493c7579a81ddec76ea96621b934f510a | /venv/bin/jupyter-serverextension | d1da24e349738bd3a6f0e676f039527d9fb937a1 | [] | no_license | miraclemaster11/Corona_Cases | 4097c3f317c66ca6c9f31ed3bfd18af678859b6a | 804c8165dbd8f631e1b30281fb03ae133976de1c | refs/heads/master | 2022-12-10T17:40:03.304722 | 2020-09-05T05:53:51 | 2020-09-05T05:53:51 | 293,014,030 | 0 | 0 | null | 2020-09-05T06:03:48 | 2020-09-05T06:03:47 | null | UTF-8 | Python | false | false | 263 | #!/home/aman/PycharmProjects/Corona_Cases/venv/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from notebook.serverextensions import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"[email protected]"
] | ||
0bbbdfcd49815d6b3e6e70f9b0dea685968749ae | c130a094e04eb448201ca2ab8ed4fe56cd1d80bc | /samples/server/petstore/python-fastapi/src/openapi_server/models/tag.py | 3e0b45cd787b066a6baa3cf8dd7fe960eb9dfa00 | [
"Apache-2.0"
] | permissive | janweinschenker/openapi-generator | 83fb57f9a5a94e548e9353cbf289f4b4172a724e | 2d927a738b1758c2213464e10985ee5124a091c6 | refs/heads/master | 2022-02-01T17:22:05.604745 | 2022-01-19T10:43:39 | 2022-01-19T10:43:39 | 221,860,152 | 1 | 0 | Apache-2.0 | 2019-11-15T06:36:25 | 2019-11-15T06:36:24 | null | UTF-8 | Python | false | false | 644 | py | # coding: utf-8
from __future__ import annotations
from datetime import date, datetime # noqa: F401
import re # noqa: F401
from typing import Any, Dict, List, Optional # noqa: F401
from pydantic import AnyUrl, BaseModel, EmailStr, validator # noqa: F401
class Tag(BaseModel):
"""NOTE: This class is auto gen... | [
"[email protected]"
] | |
f4f2545d2a5100feb14734611ceb4e35981e5375 | a8a1bc1c2223c4931aa451b7930cc838dae44b80 | /eagle_theme_ecomm/models/ks_mega_menu.py | 1e9e8c1a6965c6f2f244a275a01a651418d85fc0 | [] | no_license | ShaheenHossain/eagle_theme_ecomm | 195db37d37896e1c8f9151cfd0b47402d55aa19f | 32a290d5386782b74cf670cef13802ac7c8e4318 | refs/heads/master | 2022-09-18T22:05:03.741941 | 2020-06-01T21:05:33 | 2020-06-01T21:05:33 | 268,632,294 | 0 | 3 | null | null | null | null | UTF-8 | Python | false | false | 5,119 | py | # # -*- coding: utf-8 -*-
from eagle import models, fields, api
class Ks_WebsiteMegaMenu(models.Model):
_inherit = "website.menu"
_description = "This model will add mega menu option to the website menu"
ks_is_mega_menu = fields.Boolean("Is Dynamic Mega Menu")
ks_display_img = fields.Boolean("Display... | [
"[email protected]"
] | |
c3d5cf62488778f4d8d76cb907368279058fb85c | 15788d9ce41189864b228494a66c7409afe3b90c | /ice_addresses/importers/csv.py | 8a66fb306f1a349acf791c64a451bf7dd6c266ac | [] | no_license | StefanKjartansson/django-icelandic-addresses | 99133e378acce66825ad8a63f1dfd9c3640a4bd3 | d602f288c031d60e8404e0b97a96602accc1024d | refs/heads/master | 2020-05-30T13:20:55.583308 | 2014-12-23T14:14:06 | 2014-12-23T14:14:06 | 12,543,305 | 0 | 1 | null | 2015-03-28T22:25:38 | 2013-09-02T15:33:55 | Python | UTF-8 | Python | false | false | 2,545 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
"""
from __future__ import unicode_literals, print_function, absolute_import
import codecs
import csv
import os
import sys
from ..models import PostCode, Street, Address
DATA_ROOT = os.path.join(
os.path.abspath(os.path.dirname(__file__)), os.pardir, 'data')
PY3... | [
"[email protected]"
] | |
458aec1ce5b13d09ab2c61afc987cbc21b0ee1ef | fcc88521f63a3c22c81a9242ae3b203f2ea888fd | /Python3/0347-Top-K-Frequent-Elements/soln-1.py | 58ddccc226cee1a0915ab31e3cfff1c5815c70b1 | [
"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 | 253 | py | class Solution:
def topKFrequent(self, nums, k):
"""
:type nums: List[int]
:type k: int
:rtype: List[int]
"""
counts = collections.Counter(nums)
return heapq.nlargest(k, counts, key=counts.get) | [
"[email protected]"
] | |
13fe0385f21e9b197be0b5372f8b164fe95f2a6a | a184444cce71e15a7d6789bdf9850e85a6c0e655 | /setup.py | 63d6745bb4e773a32ee654a8cd808b03b8d569fb | [] | no_license | huiwenzhang/gym-rearrangement | 916a3b0a4d3841e3b692be8258bfe0a942b85f36 | f9fa5036966fc56ad0b8c96f92ad81adaa77c875 | refs/heads/master | 2020-05-22T04:49:45.513917 | 2019-07-25T14:57:58 | 2019-07-25T14:57:58 | 186,222,793 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 151 | py | from setuptools import setup
setup(name='gym_rearrangement',
version='0.0.1',
install_requires=['gym', 'mujoco_py', 'numpy', 'interval']
) | [
"[email protected]"
] | |
3810c8f20221af86b7b4f992411c4e1d29134305 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /rbeuWab36FAiLj65m_22.py | be8d1be7052d2551f6d8fb8766a11133bad6bc76 | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 252 | py |
import re
def grouping(w):
group = {}
for word in w:
n = len(re.findall(r'[A-Z]',word))
if not n in group.keys():
group[n] = [word]
else:
group[n].append(word)
group[n].sort(key = lambda x: x.lower())
return group
| [
"[email protected]"
] | |
e06f22ec429ba76478781d135e74ba716c72403b | cc72013ede1b3bb02c32a3d0d199be4f7986c173 | /ch6/pizzacost2.py | 862eddfec218d0d2f770fe5b76b9d079962df5ba | [] | no_license | alextickle/zelle-exercises | b87d2a1476189954565f5cc97ee1448200eb00d4 | b784ff9ed9b2cb1c56e31c1c63f3e2b52fa37875 | refs/heads/master | 2021-01-19T00:33:19.132238 | 2017-09-14T23:35:35 | 2017-09-14T23:35:35 | 87,182,609 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 359 | py | # pizzacost2.py
import math
def pizzaarea(d):
return math.pi * (d/2.0)**2
def costperinch(area, p):
return area/p
def main():
price = input("Please enter the price of the pizza, in dollars: ")
diameter = input("Please enter the diameter, in inches: ")
print "The price per square inch is %0.2f." % (costperinc... | [
"[email protected]"
] | |
bc23a716f2508b19b5cce40ae33c07d4540e1ea0 | b76e39e535499704368eddc26237dc0016ef7d06 | /TCSPLC/readgeneral_v2.py | 121d8ae89a266ee83d5309e0e456fb504addffdc | [] | no_license | BUBAIMITRA2018/castersimulation | 0532e53df7d346c2824e577cc91cd0ac2ce4694c | eca5fddff5c0f33f785168f6b1e9f572c1622be0 | refs/heads/master | 2022-12-10T02:45:04.207196 | 2020-09-09T05:35:54 | 2020-09-09T05:35:54 | 260,110,682 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,549 | py | from snap7.snap7types import areas, S7WLBit, S7WLWord, S7WLReal, S7WLDWord
from clientcomm_v1 import *
__all__ = ['ReadGeneral']
class ReadGeneral():
def __init__(self, client):
self.client = client
self.mylock = threading.Lock()
def readsymbolvalue(self, address, datatype, dataclass):
... | [
"[email protected]"
] | |
216b5bec34fb1562d40bec74a6c32dfa1c426795 | dd31235062b1f66fcb7bf9e6d444242e0cdbc447 | /SVR/hebbe/run_sbatch.py | 16ecc4fbc2672aeb43471ebf9f056f0a37a6447f | [] | no_license | LiYanChalmers/AllstateClaimSeverity | a25b4ebaae767dc674d320b4b5c9de84a41dc539 | 819304e9dd44c1c12e6251ab84facc180fb484a7 | refs/heads/master | 2020-03-21T20:34:25.145931 | 2016-12-12T22:38:24 | 2016-12-12T22:38:24 | 139,015,605 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 229 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Dec 12 03:00:49 2016
@author: ly
"""
from subprocess import call
n_rounds = 400
for i in range(n_rounds):
dst = 'svr'+str(i)+'.sh'
call(['sbatch', dst]) | [
"[email protected]"
] | |
ffe970e02a5d956bd21d1ea08782d7edd77f9c66 | 8e92584fcbc7b5ed393ab778e45ca5aa67c781b8 | /generate_nullarbor_table.py | 6508e1db126553e0a78246f0adfacbff41facf05 | [
"MIT"
] | permissive | cdeitrick/gists | cd4261087deb7eadef19953efaa9be40630ba181 | ef0e1ee2b2b9de448e5aceef083b7027e4444317 | refs/heads/master | 2020-04-01T18:40:29.294645 | 2019-04-15T20:35:21 | 2019-04-15T20:35:21 | 153,507,538 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 668 | py | from pathlib import Path
from typing import Tuple
def get_sample_files(folder:Path)->Tuple[Path,Path]:
forward = [i for i in folder.iterdir() if 'R1' in i.name][0]
reverse = [i for i in folder.iterdir() if 'R2' in i.name][0]
return forward, reverse
if __name__ == "__main__":
folder = Path("/home/cld100/projects/... | [
"[email protected]"
] | |
3dbf7e36dfa28c5e7bf2dd870a8172ad1b4c905e | 711c11d0111a40055ba110e7089a231c2ba42b8e | /toontown/coderedemption/TTCodeRedemptionMgrAI.py | b67fb0f0528c12a748432e77f42d02ffe11814b4 | [
"Apache-2.0"
] | permissive | DeadMemez/ProjectAltis-OldAcornAcres | 03c8dc912ecccae8456d89790f6b332547b75cc3 | e8e0087389933795973e566782affcaec65a2980 | refs/heads/master | 2021-01-19T13:59:07.234192 | 2017-08-20T14:41:45 | 2017-08-20T14:41:45 | 100,869,782 | 0 | 2 | null | 2017-08-20T15:14:35 | 2017-08-20T15:14:35 | null | UTF-8 | Python | false | false | 7,236 | py | '''
Created on Mar 21, 2017
@author: Drew
'''
import time
from datetime import datetime
from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObjectAI import DistributedObjectAI
from toontown.catalog import CatalogItem
from toontown.catalog.CatalogInvalidItem import CatalogInvalidItem
... | [
"[email protected]"
] | |
d2fb3d6b96ef10ef390bf7df4126f75fab56c27e | f4afb7a16696803942a999b0687e08997defb114 | /build/rotors_simulator_demos/catkin_generated/generate_cached_setup.py | 5f65bc27f9863b023889c9944fb330469b9f3650 | [] | no_license | EmanueleAucone/ethz_ws | 8d4760109be3b1882d875aa28f7ecfe793b1b9e6 | 883efd2936e8f67e783790d7ac8f3a40e749d1b9 | refs/heads/main | 2023-01-22T04:03:45.341419 | 2020-11-25T10:30:49 | 2020-11-25T10:30:49 | 308,606,492 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,358 | py | # -*- coding: utf-8 -*-
from __future__ import print_function
import argparse
import os
import stat
import sys
# find the import for catkin's python package - either from source space or from an installed underlay
if os.path.exists(os.path.join('/opt/ros/kinetic/share/catkin/cmake', 'catkinConfig.cmake.in')):
sys.... | [
"[email protected]"
] | |
9d83a56dc0bb592784356093f88c7ba0707cd132 | 80ae9b5cfb45b6e9cf7873ef7c46e17e117e4019 | /data/CodeChef/NW1.py | 20f6b9480cad21ebfdc60ecc02a793fd70598c8b | [] | no_license | Ritvik19/CodeBook | ef7764d89b790e902ede5802f36d5ca910d8a50e | 2b4ed7938bbf156553d6ba5cba6216449528f0fc | refs/heads/master | 2021-07-04T08:25:52.478719 | 2020-08-08T06:54:14 | 2020-08-08T06:54:14 | 138,744,302 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 239 | py | days = [ "mon", "tues", "wed", "thurs", "fri", "sat", "sun"]
t = int(input())
for i in range(t):
n, d = input().split()
nw = [4, 4, 4, 4, 4, 4, 4]
for i in range(int(n)-28):
nw[(days.index(d)+i)%7] += 1
print(*nw)
| [
"[email protected]"
] | |
9b579abd1e2cbdcc1cbbbab8a3fc0bd6f4128332 | c7979f4f6435fe8d0d07fff7a430da55e3592aed | /ABC037/C.py | 6f2c9cd58755ef8a8c60865d3ae965e11ffd2c30 | [] | no_license | banboooo044/AtCoder | cee87d40bb98abafde19017f4f4e2f984544b9f8 | 7541d521cf0da848ecb5eb10ffea7d75a44cbbb6 | refs/heads/master | 2020-04-14T11:35:24.977457 | 2019-09-17T03:20:27 | 2019-09-17T03:20:27 | 163,818,272 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 195 | py | N,K = map(int,input().split(" "))
a = list(map(int,input().split(" ")))
val = sum(a[:K])
sumv = val
for i in range(N-K):
val += (sumv - a[i] + a[K+i])
sumv = (sumv - a[i] + a[K+i])
print(val) | [
"[email protected]"
] | |
9b4650366e2834047484b64cd106dbf11d26d0a2 | 4d42b57a4ab24b301c4503002ed1038ec12030ba | /satsearch/main.py | be03dccf9316dce990838bb91aa64ce34c60fa9d | [
"MIT"
] | permissive | cgore/sat-search | 53435155aee3f0f0dc687387aac68c1c01b48432 | 230af9b57ad06c1754de6ce97f6ae6893791d8b7 | refs/heads/master | 2020-03-17T15:38:15.935161 | 2018-03-19T03:24:52 | 2018-03-19T03:24:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,208 | py | import os
import sys
import json
import logging
from .version import __version__
from satsearch import Search, Scenes
from satsearch.parser import SatUtilsParser
def main(review=False, printsearch=False, printmd=None, printcal=False,
load=None, save=None, append=False, download=None, **kwargs):
""" Main ... | [
"[email protected]"
] | |
e84bacade8b32fd4e66d9b8f06b6668ab4d79cb4 | 13e91d812e7e0133f45273945ccca5523b1eefe5 | /task 3/spacex/migrations/0001_initial.py | fb8a9ca3ac5611143e838d992ff22a71d3619a63 | [] | no_license | Harshvartak/Unicode | 30d7298253f1feba4c47b89bdb8403e88b1707a1 | 2903d445fa5435b835f1543b8a67fb417749e1c3 | refs/heads/master | 2020-07-10T15:29:48.115326 | 2020-01-20T18:34:42 | 2020-01-20T18:34:42 | 204,299,112 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 716 | py | # Generated by Django 2.2.3 on 2019-08-22 11:45
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='spacex',
fields=[
('id', models.AutoField(a... | [
"[email protected]"
] | |
939cb1a21804f194fc568a0cb554bb20519a3adf | 61e98b0302a43ab685be4c255b4ecf2979db55b6 | /sdks/python/.tox/lint/lib/python2.7/site-packages/pylint/test/extensions/test_check_mccabe.py | 9d995891fd7893e6a664334889981216ab537d0c | [
"BSD-3-Clause",
"EPL-2.0",
"CDDL-1.0",
"Apache-2.0",
"WTFPL",
"GPL-2.0-only",
"BSD-2-Clause",
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"CDDL-1.1",
"Classpath-exception-2.0"
] | permissive | dzenyu/kafka | 5631c05a6de6e288baeb8955bdddf2ff60ec2a0e | d69a24bce8d108f43376271f89ecc3b81c7b6622 | refs/heads/master | 2021-07-16T12:31:09.623509 | 2021-06-28T18:22:16 | 2021-06-28T18:22:16 | 198,724,535 | 0 | 0 | Apache-2.0 | 2019-07-24T23:51:47 | 2019-07-24T23:51:46 | null | UTF-8 | Python | false | false | 2,593 | py | # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/master/COPYING
"""Tests for the pylint checker in :mod:`pylint.extensions.check_mccabe
"""
import os.path as osp
import unittest
from pylint import checkers
from pylint.extensions.mcca... | [
"[email protected]"
] | |
fc0535302e88c9a984876df5e89680510528d42a | 99799383b4e618061fe9261aa70cfe420e02a5aa | /gift/migrations/0001_initial.py | 90133582de0ce017c9343a8fc104570f32f46924 | [
"MIT"
] | permissive | openkamer/openkamer | f311a97d5c9e182eabd6602f42475e8e049912b0 | bb99963c00ad90299deccd44d977c27aee7eb16c | refs/heads/master | 2023-07-20T10:45:11.402427 | 2023-07-18T17:41:56 | 2023-07-18T17:41:56 | 57,322,204 | 62 | 7 | MIT | 2023-07-17T18:15:43 | 2016-04-28T17:43:23 | Python | UTF-8 | Python | false | false | 920 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-12-08 11:09
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('person', '0005_person_twitter_username... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.