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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
135a875898921530dc0d9ed13b5bd02d13a96cbc | ee2af8c0fdc65f44ed9a4295806d75fb09257b58 | /saif/google_api_integreation/__manifest__.py | db20488330aedd7f71c7ecfb68f2ce9990548508 | [] | no_license | sc4you/odoo-project | 02b81ff4920a69d3e79c5dcc605a794779c5a77c | 2ef439ef54f1165c3569a1047cd5cb6a0b50572e | refs/heads/master | 2020-03-21T13:34:52.555402 | 2018-03-19T12:26:39 | 2018-03-19T12:26:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 452 | py | # -*- coding: utf-8 -*-
{
'name': 'Google Docs Integration',
'category': 'Extra Tools',
'summary': 'Spreadsheet, Document, Presentation',
'description': 'Google Docs Integration: This Module lets you to develop,'\
'read and modify Spreadsheet, Document, Presentation',
'author': 'Muhammad Awais',
'depends':['base... | [
"ta.awaisajaz@gmail.com"
] | ta.awaisajaz@gmail.com |
1b8bf4767e7e81816c259accadb336a80b752300 | 1a13cf55de87bf9fd7cd5911ab7bd9d9c1f88241 | /tests/programscache.py | 2382802032fded66be7aa14c186b0adc155ddd14 | [
"Apache-2.0"
] | permissive | jeperez/winreg-kb | c59ead2d593b4ec375b77d7a9c49fbec35b9f156 | a50fcfc89e3fac282f276b12fb67807ddb56ef10 | refs/heads/master | 2021-01-19T11:34:33.293074 | 2017-04-03T06:28:00 | 2017-04-03T06:28:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,086 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Tests for the Programs Cache information collector."""
import unittest
from dfwinreg import registry as dfwinreg_registry
from winregrc import collector
from winregrc import output_writer
from winregrc import programscache
from tests import test_lib as shared_test_lib
... | [
"joachim.metz@gmail.com"
] | joachim.metz@gmail.com |
fa05b68b68103da6eba41cb3eace31abf9f4ba74 | 4a5a39858bab54d9fe06364ecfe8edc2747b87f6 | /Code Jam 2018/Round 1C/ant-stack.py | ddc1e8535674f7ccbaa880e66e31d6b637f53b28 | [] | no_license | gsakkas/code-jam | d85a63c11d13ba405b9df4be1e6739ef5c5394ae | 8e81a4d9b2ea11d9bbb9b3e206951a2261798458 | refs/heads/master | 2021-01-22T19:54:24.732574 | 2018-05-17T12:14:06 | 2018-05-17T12:14:06 | 85,257,349 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 888 | py | def read_int():
return int(raw_input())
def read_many_ints():
return map(int, raw_input().split())
def solve(n):
ws = read_many_ints()
large = 10 ** 100
sums = [[large] * min(139, n) for _ in xrange(n)]
for i in xrange(n):
sums[i][0] = ws[i]
# sums = {}
# sums[0] = ws[0]
... | [
"george.p.sakkas@gmail.com"
] | george.p.sakkas@gmail.com |
af7343241d25adfa0239fc48d6b1c29e0fd2cfcf | 360ae1188ad79e71ccc72da0b9ae709bda678f91 | /ryu/services/protocols/__init__.py | 340a42305b81a40727ffe472e0a96ccaa638aed4 | [
"Apache-2.0"
] | permissive | faucetsdn/ryu | 47b3523e7ccb381f3bdf2877a3f9f01cb1876054 | d6cda4f427ff8de82b94c58aa826824a106014c2 | refs/heads/master | 2023-09-05T06:37:21.991029 | 2022-06-09T23:09:40 | 2022-06-09T23:09:40 | 2,945,007 | 385 | 215 | Apache-2.0 | 2022-11-13T10:50:25 | 2011-12-09T03:43:50 | Python | UTF-8 | Python | false | false | 682 | py | # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2013 Isaku Yamahata <yamahata at private email ne jp>
#
# 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
#
# h... | [
"fujita.tomonori@lab.ntt.co.jp"
] | fujita.tomonori@lab.ntt.co.jp |
b96de974ca34505ea68a7002e1eaca1fdf7e1661 | 076e0ebd618ed406808e9009a70d886e8bdb1bbf | /grafeas/grafeas_v1/__init__.py | 98e1ad1c8c28a4c25705f3c56a2ad03ad7d539b0 | [
"Apache-2.0"
] | permissive | isabella232/python-grafeas | 8edb1c3b79e51292f1612489775b51a96033049c | a806330d0f344eb0b97e351d7e5ba34b8ae9b740 | refs/heads/master | 2022-12-15T09:53:51.979968 | 2020-09-22T22:15:19 | 2020-09-22T22:15:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,916 | py | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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 o... | [
"noreply@github.com"
] | isabella232.noreply@github.com |
6592fd4e7614f3aa792b9305227977f7af952754 | 6994917b9d22e9e15e578a0e5c75dcf4ce3cb022 | /perfil/migrations/0025_auto_20200724_2157.py | e5dd79e636927224e5bd7b39a7907b3d99b39094 | [] | no_license | linikerunk/rh-ticket | 59ad6411a3d08c90c2704b37ba9bba67ea7f7754 | bd8edd3eb1ea6cfe04fee03a4f41049a84c1e14a | refs/heads/master | 2023-01-06T21:25:06.851369 | 2020-10-29T20:32:53 | 2020-10-29T20:32:53 | 250,346,547 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 543 | py | # Generated by Django 2.2.9 on 2020-07-25 00:57
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('perfil', '0024_auto_20200724_2049'),
]
operations = [
migrations.AlterField(
model_name='funcio... | [
"linikerenem@gmail.com"
] | linikerenem@gmail.com |
b2e93044857996da4f7864f49e1ad69a6546cb0b | 7c15f211adc9e9eb9f66ccdd570c9f38dff7ea8d | /packages/autorest.python/test/vanilla/version-tolerant/Expected/AcceptanceTests/HttpVersionTolerant/httpinfrastructureversiontolerant/aio/__init__.py | 154a90083e55b0b0e6ba806098e8782f6d24a683 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | Azure/autorest.python | cc4bfbf91ae11535731cad37cedd6b733edf1ebd | a00d7aaa3753ef05cb5a0d38c664a90869478d44 | refs/heads/main | 2023-09-03T06:58:44.246200 | 2023-08-31T20:11:51 | 2023-08-31T20:11:51 | 100,315,955 | 47 | 40 | MIT | 2023-09-14T21:00:21 | 2017-08-14T22:58:33 | Python | UTF-8 | Python | false | false | 865 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | [
"noreply@github.com"
] | Azure.noreply@github.com |
457b3c5c3ef7b6c87f2a2cb3e30e182a396b8713 | 7eadfc1711278719d4f02cb506f1d1df88cc66af | /model/supervised/cnn.py | 4110058df864f680190dd1ee7dbbb410a1114a2a | [] | no_license | fagan2888/Trading_by_Imitation_Learning | 33a88060e45e38d83b9b0972072cc1bcddcf0bdc | 0f6820609c64dd0a1e697ec2ac4566b60478025d | refs/heads/master | 2020-11-30T23:06:21.280800 | 2019-05-16T06:27:01 | 2019-05-16T06:27:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,477 | py | """
Train a supervised CNN model using optimal stock as label
"""
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten
from keras.layers import Conv2D
from keras.models import load_model
from keras.optimizers import Adam
from ..base_model import BaseModel
from utils.data impor... | [
"noreply@github.com"
] | fagan2888.noreply@github.com |
8e962c66a9d91dae37bddea35a9bff26c992c521 | 7a550d2268bc4bc7e2fec608ffb1db4b2e5e94a0 | /1101-1200/1110-Delete Nodes And Return Forest/1110-Delete Nodes And Return Forest.py | 3219a3ad56f0c557fe3ebbf9025c4afa1c801801 | [
"MIT"
] | permissive | jiadaizhao/LeetCode | be31bd0db50cc6835d9c9eff8e0175747098afc6 | 4ddea0a532fe7c5d053ffbd6870174ec99fc2d60 | refs/heads/master | 2021-11-05T04:38:47.252590 | 2021-10-31T09:54:53 | 2021-10-31T09:54:53 | 99,655,604 | 52 | 28 | MIT | 2020-10-02T12:47:47 | 2017-08-08T05:57:26 | C++ | UTF-8 | Python | false | false | 803 | py | # Definition for a binary tree node.
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def delNodes(self, root: TreeNode, to_delete: List[int]) -> List[TreeNode]:
td = set(to_delete)
result = []
def dfs(root, p... | [
"jiadaizhao@gmail.com"
] | jiadaizhao@gmail.com |
4db824ca06fcb183b3cdd4afb8c1407541610ba5 | d8c1f119d1349dd8ad2e48619a8c258967cd9a31 | /Baekjun/Dijkstra/10282. 해킹.py | 57994f6df0e2f7d52580d8b02723c1259ebd1a75 | [] | no_license | Seonghyeony/DataStructure-Algorithm | c7c006ee705b68fc4d2d04dc6baaf0aeb80fc83e | 4121289cafd0050bda408934fcb14d88052c956f | refs/heads/master | 2023-04-12T16:30:17.039109 | 2021-05-08T10:31:05 | 2021-05-08T10:31:05 | 286,371,604 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,060 | py | import heapq
def dijkstra(graph, n, start):
distances = [float('inf') for _ in range(n + 1)]
distances[start] = 0
queue = []
heapq.heappush(queue, [0, start])
while queue:
current_distance, current_node = heapq.heappop(queue)
if distances[current_node] < current_distance:
... | [
"sunghyun7949@naver.com"
] | sunghyun7949@naver.com |
a467cc78728963d989a66e2ae338212b606e652f | 037d5d18b9b81205305e158d7d9fdad131d318cb | /tests/test_custom_version_base_class.py | cc5e981dbda96d06ba8914b794c8350a37b1e0a2 | [] | permissive | kvesteri/sqlalchemy-continuum | ee7acf2c961b27eab3dd8f61598d9159d801ee21 | a7a6bd7952185b1f82af985c0271834d886a617c | refs/heads/master | 2023-08-24T09:14:33.515416 | 2022-11-17T05:41:09 | 2023-07-24T23:37:12 | 10,312,759 | 479 | 134 | BSD-3-Clause | 2023-09-12T20:07:04 | 2013-05-27T10:30:55 | Python | UTF-8 | Python | false | false | 1,114 | py | import sqlalchemy as sa
from sqlalchemy_continuum import version_class
from tests import TestCase
class TestCommonBaseClass(TestCase):
def create_models(self):
class TextItem(self.Model):
__tablename__ = 'text_item'
__versioned__ = {}
id = sa.Column(sa.Integer, autoinc... | [
"konsta.vesterinen@gmail.com"
] | konsta.vesterinen@gmail.com |
5e14ac1175f45b85ceb256c7a8522a73237bc1f4 | 2aa84f9553a0593593afff720f7dfd8c6df3adde | /tests/test_query_parser.py | 3c2d26f25e088261c212386f85d9a8ce25602370 | [] | no_license | Pavel-Guseynov/sqlalchemy-searchable | c492f37e10e0e9054914af1f20cf799a58b9e8aa | 6baa13193f2f2a39ba96b231ee7f88843bdd6fd0 | refs/heads/master | 2021-07-25T14:02:07.876195 | 2017-11-06T16:17:05 | 2017-11-06T16:17:05 | 109,388,493 | 0 | 0 | null | 2017-11-03T11:35:01 | 2017-11-03T11:35:01 | null | UTF-8 | Python | false | false | 1,746 | py | # -*- coding: utf-8 -*-
from pyparsing import ParseException
from pytest import raises
from sqlalchemy_searchable.parser import SearchQueryParser
class TestSearchQueryParser(object):
def setup_method(self, method):
self.parser = SearchQueryParser()
def test_unicode(self):
assert self.parser.... | [
"konsta.vesterinen@gmail.com"
] | konsta.vesterinen@gmail.com |
65cc4b40f81149e478236ca1e329f99ffc8fcb82 | e63c1e59b2d1bfb5c03d7bf9178cf3b8302ce551 | /uri/uri_python/ad_hoc/p2456.py | fd6b70e0c37682c826aa6690b0340d8b59f32ede | [] | no_license | GabrielEstevam/icpc_contest_training | b8d97184ace8a0e13e1c0bf442baa36c853a6837 | 012796c2ceb901cf7aa25d44a93614696a7d9c58 | refs/heads/master | 2020-04-24T06:15:16.826669 | 2019-10-08T23:13:15 | 2019-10-08T23:13:15 | 171,758,893 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 241 | py | entry = input().split(" ")
a = int(entry[0])
b = int(entry[1])
c = int(entry[2])
d = int(entry[3])
e = int(entry[4])
if a < b and b < c and c < d and d < e:
print('C')
elif a > b and b > c and c > d and d > e:
print('D')
else:
print('N') | [
"gabrielestevam@hotmail.com"
] | gabrielestevam@hotmail.com |
2555d67c9356f76316ca075fb7052e0bc3678ccc | 0c43ae8365998144ebc23156c12768711114e6f9 | /web_flask/4-number_route.py | 1aa7ec504db5b6beaf7e14f834086abdbf92165a | [] | no_license | Nesgomez9/AirBnB_clone_v2 | 74e343ade1c418b49c8ebaee79f6319f8e971ff6 | 055c4e92c819fd0e9dec369e687c1601f243f02c | refs/heads/master | 2021-05-19T12:50:35.656686 | 2020-04-23T03:33:41 | 2020-04-23T03:33:41 | 251,707,487 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 746 | py | #!/usr/bin/python3
from flask import Flask
app = Flask(__name__)
@app.route("/", strict_slashes=False)
def hello_route():
return "Hello HBNB!"
@app.route("/hbnb", strict_slashes=False)
def hbnb_route():
return "HBNB"
@app.route("/c/<text>", strict_slashes=False)
def c_route(text):
text = text.replace(... | [
"nicolico99@hotmail.com"
] | nicolico99@hotmail.com |
e1fee3842a2ba41bf122a82af2236ea8f8fad717 | 6fcfb638fa725b6d21083ec54e3609fc1b287d9e | /python/v_sniper/sniper-master/cron.py | 39485faf71647c6676d5605dd32b483c4befdc2b | [] | no_license | LiuFang816/SALSTM_py_data | 6db258e51858aeff14af38898fef715b46980ac1 | d494b3041069d377d6a7a9c296a14334f2fa5acc | refs/heads/master | 2022-12-25T06:39:52.222097 | 2019-12-12T08:49:07 | 2019-12-12T08:49:07 | 227,546,525 | 10 | 7 | null | 2022-12-19T02:53:01 | 2019-12-12T07:29:39 | Python | UTF-8 | Python | false | false | 3,777 | py | #!/usr/bin/env python
""" This represents the cronjob that runs to check for course openings"""
from flaskext.mail import Message
import urllib
from models import db, Snipe
from soc import Soc
from app import mail, app
import datetime
from collections import namedtuple
soc = Soc()
EMAIL_SENDER = "Course Sniper <snip... | [
"659338505@qq.com"
] | 659338505@qq.com |
3119ea6af239d63712279b5d9972ab77083b0507 | d906b38849fcb8eb26dc584dfb03d9ed5a133abb | /pendulum.py | cdc8f0dcaa2b2591c1eb4e512b073da368453a54 | [] | no_license | basicmachines/sim-dynamics | dd5213f10b7a8bbc325e492b41714ceee45e0c1c | 3430651a5b684ecca4a0ceb282213070f379c2fd | refs/heads/master | 2020-03-08T14:11:40.689788 | 2018-04-10T05:53:21 | 2018-04-10T05:53:21 | 128,178,397 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,355 | py | #!/usr/bin/env python
"""Dynamic simulation of a pendulum.
"""
from pygame.locals import K_z, K_x, K_c, K_b, K_n, K_m
from simulator import Simulator
# Import the model you want to simulate
from models import Pendulum
# Import the controller(s) you want to simulate
from controllers import PIDController, KeyboardInp... | [
"bill.tubbs@me.com"
] | bill.tubbs@me.com |
16eb4f0e51d45f39b17d70bcf2a407765c928ad8 | 5bd4893a793ed739127f15becd9558cacf461540 | /scripts/hit_endpoint.py | b86fbea7d7419186ef9c482e8f1b00b6d7f17c8a | [] | no_license | hauensteina/ahn-repo | d3aa665eeef846e426b866d587e8649c8283e74c | 93bd7c54548a083f39510fc562c9e7540c4f672a | refs/heads/master | 2023-07-24T05:34:51.289699 | 2023-07-13T16:10:25 | 2023-07-13T16:10:25 | 99,860,476 | 0 | 1 | null | 2023-07-15T01:33:35 | 2017-08-09T23:20:28 | Python | UTF-8 | Python | false | false | 739 | py | #!/usr/bin/env python
# Python 3 script hitting a REST endpoint
# AHN, Jun 2019
import requests
from pdb import set_trace as BP
URL = 'https://ahaux.com/leela_server/select-move/leela_gtp_bot?tt=1234'
ARGS = {'board_size':19,'moves':[],'config':{'randomness':0.5,'request_id':'0.6834311059880898'}}
#-------------
de... | [
"hauensteina@gmail.com"
] | hauensteina@gmail.com |
552ac5116d0dbc29272076004d4a9b916cb2a96e | a9fc496e0724866093dbb9cba70a8fdce12b67a9 | /scripts/field/q59000_tuto.py | 5925ba6e70b43edd7737755c40baf93619dad4ae | [
"MIT"
] | permissive | ryantpayton/Swordie | b2cd6b605f7f08f725f5e35d23ba3c22ef2ae7c0 | ca6f42dd43f63b1d2e6bb5cdc8fc051c277f326e | refs/heads/master | 2022-12-01T09:46:47.138072 | 2020-03-24T10:32:20 | 2020-03-24T10:32:20 | 253,997,319 | 2 | 0 | MIT | 2022-11-24T08:17:54 | 2020-04-08T05:50:22 | Java | UTF-8 | Python | false | false | 1,222 | py | # Arboren : Stump Town
if not sm.hasQuest(59000): # The Town Prankster
if not sm.hasQuestCompleted(59000): # The Town Prankster
sm.removeEscapeButton()
if sm.sendAskYesNo("Would you like to skip the tutorial cutscenes?"):
#todo add after skipping tutorial
sm.dispose()
... | [
"thijsenellen@outlook.com"
] | thijsenellen@outlook.com |
ec7fa1f86c2a000110ed3e35ad2f81201ff443b7 | cb062c48280311134fe22573a41f9c4d6631b795 | /src/xm/core/txs/multisig/MultiSigVote.py | a05b6202d10dcb74e58f0c5ec2605ebb1c0396e9 | [
"MIT"
] | permissive | xm-blockchain/xm-core | da1e6bb4ceb8ab642e5d507796e2cc630ed23e0f | 2282b435a02f061424d656155756d8f50238bcfd | refs/heads/main | 2023-01-15T19:08:31.399219 | 2020-11-19T03:54:19 | 2020-11-19T03:54:19 | 314,127,428 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,528 | py | from pyxmlib.pyxmlib import bin2hstr
from xm.core.State import State
from xm.core.StateContainer import StateContainer
from xm.core.misc import logger
from xm.core.txs.Transaction import Transaction
from xm.crypto.misc import sha256
class MultiSigVote(Transaction):
"""
MultiSigSpend for the transaction of xm... | [
"74695206+xm-blockchain@users.noreply.github.com"
] | 74695206+xm-blockchain@users.noreply.github.com |
75528b21f1eac2877ca966946d1370e81593004b | 05c6b9f1f769ff359b757a913e0d43aeb1dfb9c6 | /hcf.py | f5cd7c9c45512a220634fefb6a6049cfbdbaad6c | [] | no_license | samarthchadda/pypi | bc92c0f7086ead65cb7242f7ea827470817a3b55 | 0c3308be995c8952c8db6b56aae46e58722d4d82 | refs/heads/master | 2020-04-01T16:48:13.337978 | 2018-11-04T10:17:59 | 2018-11-04T10:17:59 | 153,399,057 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 323 | py | def computeHCF(x,y):
if x>y:
smaller=y
else:
smaller=x
for i in range(1,smaller+1):
if((x%i==0) and (y%i==0)):
hcf=i
return hcf
num1=int(input("Enter first number:"))
num2=int(input("Enter second nunber:"))
print("H.C.F of",num1,"and",num2,"is",computeHCF(num1,num2... | [
"samarthchadda@gmail.com"
] | samarthchadda@gmail.com |
74642e8877743f8591bc0e8ec061ab3c92d67f5a | 6a803f0be359651a68107ccc2452be58e178d54b | /test/test_tojson.py | ba97f228529b58dca993c52a07690caadab47f87 | [
"MIT"
] | permissive | pombredanne/javaproperties-cli | 14c8a067ec8a4af6bb8ac25e64117fafb7e0238e | 192f96a9ffa504ed3c0fd9636f7a321b65f8cad4 | refs/heads/master | 2020-12-25T18:42:39.656917 | 2017-05-17T13:10:48 | 2017-05-17T13:10:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,347 | py | from click.testing import CliRunner
from javaproperties_cli.tojson import properties2json
def test_properties2json_empty():
r = CliRunner().invoke(properties2json, input=b'')
assert r.exit_code == 0
assert r.output_bytes == b'{}\n'
def test_properties2json_comment_only():
r = CliRunner... | [
"git@varonathe.org"
] | git@varonathe.org |
5f7c0cdac07becdf70d55f1915794e2a91b1e177 | 8c51aff248eb6f463d62e934213660437c3a107b | /django_project/users/views.py | fe5316a90de09acd0372252d67941f52e802b19c | [] | no_license | wonjun0901/WJ_Develop_Individually | 5f839932c189adf2b2b34f7dadbdeaa8744f8d0e | e0402f5dbdda8ae8292cace124d381e29f707183 | refs/heads/master | 2021-01-02T00:13:38.851832 | 2020-02-18T01:10:15 | 2020-02-18T01:10:15 | 239,406,395 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 613 | py | from django.shortcuts import render, redirect
#from django.contrib.auth.forms import UserCreationForm
from django.contrib import messages
from .forms import UserRegisterForm
def register(request):
if request.method == 'POST':
form = UserRegisterForm(request.POST)
if form.is_valid():
fo... | [
"wonjun0901@gmail.com"
] | wonjun0901@gmail.com |
e82585fce52c800d045ff51b94242a83f0126930 | 653a3d9d66f3d359083cb588fc7c9ece8bb48417 | /test/runtime/frontend_test/onnx_test/defs_test/math_test/max_test.py | 8aaf5db7ac2b8cfd0529aa58330acb3221cbd3dc | [
"Zlib",
"MIT"
] | permissive | leonskim/webdnn | fec510254b15f3dec00f5bed8f498737b372e470 | f97c798c9a659fe953f9dc8c8537b8917e4be7a2 | refs/heads/master | 2020-04-15T18:42:43.632244 | 2019-01-10T10:07:18 | 2019-01-10T10:07:18 | 164,921,764 | 0 | 0 | NOASSERTION | 2019-01-09T19:07:35 | 2019-01-09T19:07:30 | Python | UTF-8 | Python | false | false | 1,306 | py | import numpy as np
from test.runtime.frontend_test.onnx_test.util import make_node, make_tensor_value_info, make_model
from test.util import wrap_template, generate_kernel_test_case
from webdnn.frontend.onnx import ONNXConverter
@wrap_template
def template(n_x, x_shape, description: str = ""):
vxs = [np.random.r... | [
"y.kikura@gmail.com"
] | y.kikura@gmail.com |
ce84cfc7e6a9774842cef1a393e8ef625284ae06 | 7f189b1d917785da079276674276f68baa30df7f | /kmmall/pipelines.py | 1d30292b0e08e1835ac775ee2d640e6b34c9e8bb | [] | no_license | eninem123/kangmeimallspider | b79ed43781328d67e893652433e59ed094ec941a | b2bcca0efe0b634ca97f331242351e9cfd52c2f7 | refs/heads/master | 2022-12-24T04:31:31.169097 | 2018-09-20T09:58:41 | 2018-09-20T09:58:41 | 149,369,473 | 1 | 0 | null | 2022-12-08T00:45:48 | 2018-09-19T00:38:33 | Python | UTF-8 | Python | false | false | 2,637 | py | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html
# import json
# from scrapy.exporters import CsvItemExporter
import csv
# class KmmallPipeline(object):
# def process_item... | [
"xwp_fullstack@163.com"
] | xwp_fullstack@163.com |
70a5a2a8d97d47e4470a414ce3590f34bca83b74 | 22e076588057d200c7119f87d330678e7ed7d168 | /posts/forms.py | 8094a686d31545ae191391fd805ca09373a1291f | [] | no_license | DylanMsK/Insta_clone_project | 16088926bda8f66fe412016f1764076dd46a7629 | 7921bef90aad1128021bd4e2bb60f96fd0efab01 | refs/heads/master | 2020-05-05T13:03:29.896332 | 2019-04-18T09:01:33 | 2019-04-18T09:01:33 | 180,057,187 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 621 | py | from django import forms
from .models import Post, Comment
class PostModelForm(forms.ModelForm):
content = forms.CharField(
label='content',
widget=forms.Textarea(
attrs={
'class': '',
'rows': 5,
'cols': 50,
'placeholder': '지금 뭘 하고 계신가요?'... | [
"kms920612@gmail.com"
] | kms920612@gmail.com |
18e350c9f21878bc1409a1ec2b3304e103c6c660 | 528c811306faa4a34bf51fca7955b7a24ac2e30c | /Python/Triangle.py | da2d8206529278895eea530d8c2d8f3d4bc40ef4 | [] | no_license | ganjingcatherine/LeetCode-1 | 1addbd7e4d9254a146601f9d5e28b8becb8235a6 | 488782d3f1e759da2d32b4e82dbf55b96c431244 | refs/heads/master | 2021-05-11T03:15:16.810035 | 2016-02-06T06:19:18 | 2016-02-06T06:19:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,529 | py | """
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.
For example, given the following triangle
[
[2],
[3,4],
[6,5,7],
[4,1,8,3]
]
The minimum path sum from top to bottom is 11 (i.e., 2 + 3 + 5 + 1 = 11).
Note:
Bonus point if you... | [
"anthonyjin0619@gmail.com"
] | anthonyjin0619@gmail.com |
c0d01549392c14b63f25cf3ca994a4bb47d47047 | 770537437474c63f6878c26a10a5853a9687c649 | /Service/app/subscriber.py | fc7c5667b54bc22b29bbde8c6796ec4cd403f98a | [] | no_license | Makalolu/BRKACI-2945-CLUS | 89013da0a2c828abe43b2ab39f8bb85587c625ff | 197702202ca146e6c82cb39ad48fad8569d1393d | refs/heads/master | 2022-02-22T19:00:47.438095 | 2018-06-17T17:27:52 | 2018-06-17T17:27:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,783 | py |
import logging, sys
from .utils import (setup_logger, get_app, pretty_print, db_is_alive, init_db,
get_apic_session, get_class, subscribe,
)
# module level logging
logger = logging.getLogger(__name__)
def dns_subscriptions(db):
""" build subscription to APIC dns objects and keep consistent values in
... | [
"agossett@cisco.com"
] | agossett@cisco.com |
b2a671dfca5e7fc447b993c10a529875dc54603f | c7061fb106b801c12fb40ff331d927a5bb24da80 | /BasicExerciseAndKnowledge/w3cschool/n16_format_datetime.py | b0f4e62a46fdd8c480a544be789ecdafb00a1d3a | [
"MIT"
] | permissive | Jonathan1214/learn-python | 34e6b5612beeb1a46b5964b0a4e306656355fe84 | 19d0299b30e953069f19402bff5c464c4d5580be | refs/heads/master | 2020-03-27T09:03:16.785034 | 2018-08-31T02:48:34 | 2018-08-31T02:48:34 | 146,310,191 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 377 | py | #coding:utf-8
# 题目:输出指定格式的日期
import time
import datetime
# 目的在于熟悉这个模块
print time.ctime() # localtime
print time.asctime(time.localtime())
print time.asctime(time.gmtime()) # gmt
print datetime.datetime(2018, 8, 12)
# print datetime.tzinfo
print datetime.date.today()
print datetime.date.fromtime... | [
"jonathan1214@foxmail.com"
] | jonathan1214@foxmail.com |
49f0bec871aede1626dd9b0823050f24018b7413 | c703b8ac3b5545857f6c95efa2d61eaf7a664021 | /iPERCore/tools/human_digitalizer/deformers/__init__.py | e0d6c7b177b6946f7ec4806e5c0de347eece34a1 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-proprietary-license",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | iPERDance/iPERCore | d29681d229b3098b3517b1abf4f7ea65f579de73 | fcf9a18ffd66bf3fdd3eea4153a3bc4785131848 | refs/heads/main | 2023-07-30T15:04:15.835396 | 2023-04-12T14:21:23 | 2023-04-12T14:21:23 | 313,664,064 | 2,520 | 339 | Apache-2.0 | 2023-05-12T03:26:52 | 2020-11-17T15:36:25 | Python | UTF-8 | Python | false | false | 1,117 | py | # Copyright (c) 2020-2021 impersonator.org authors (Wen Liu and Zhixin Piao). All rights reserved.
import torch
from .sil_deformer import SilhouetteDeformer
from .clothlinks_deformer import ClothSmplLinkDeformer
def run_sil2smpl_offsets(obs_sils, init_smpls, image_size, device=torch.device("cuda:0"),
... | [
"liuwen@shanghaitech.edu.cn"
] | liuwen@shanghaitech.edu.cn |
46f4c190ec307f397e873c46ac6abca7c00b6cba | e616ea35ead674ebb4e67cae54768aaaeb7d89c9 | /project/alma/disciplines/migrations/0001_initial.py | cd2f83a805a6561b60a83706fe7cba9576acbc37 | [] | no_license | VWApplications/VWAlmaAPI | 12bb1888533cf987739b0e069737afa6337141e1 | 3a8009b17518384c269dfee3c8fe44cbe2567cc0 | refs/heads/master | 2022-04-02T10:26:49.832202 | 2020-02-12T04:46:31 | 2020-02-12T04:46:31 | 161,098,215 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,490 | py | # Generated by Django 2.1.4 on 2019-09-21 20:17
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import re
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(s... | [
"victorhad@gmail.com"
] | victorhad@gmail.com |
322b370d6d03d1c9bfafe46a87d7b9c8a55eaae6 | ce0f8956c4c308c67bd700d31fe8d5a17b16ac08 | /Python3/src/23 Miscellaneous Topics/PDF Manipulation/02_createWatermark.py | b055027b0fc51eb03efc7fb7e50e4af5484af4a7 | [] | no_license | seddon-software/python3 | 795ae8d22a172eea074b71d6cd49d79e388d8cc6 | d5e6db1509a25c1a3040d5ae82d757539a2ff730 | refs/heads/master | 2021-07-10T15:48:31.893757 | 2020-07-16T20:29:22 | 2020-07-16T20:29:22 | 175,872,757 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 554 | py | from reportlab.pdfgen import canvas
point = 10
inch = 72
TEXT = "watermark"
def make_pdf_file(output_filename):
title = output_filename
h = 8.5 * inch
v = 11 * inch
grey = 0.9
c = canvas.Canvas(output_filename, pagesize=(h, v))
c.setStrokeColorRGB(0,0,0)
c.setFillColorRGB(grey, grey, grey... | [
"seddon-software@keme.co.uk"
] | seddon-software@keme.co.uk |
dd1d15c77bbed78ecbb276388312c71711b89b76 | 20bb1ae805cd796a7c377e55966633441d1d9fd5 | /CodeForces/Problems/887B Cubes for Masha/cubes.py | 7e511bea378f4a51b6295ec6b24c35eb89ef6910 | [] | no_license | nathantheinventor/solved-problems | 1791c9588aefe2ebdc9293eb3d58317346d88e83 | c738e203fa77ae931b0ec613e5a00f9a8f7ff845 | refs/heads/master | 2022-10-27T08:58:23.860159 | 2022-10-13T20:18:43 | 2022-10-13T20:18:43 | 122,110,149 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 972 | py | cubes = [input().split() for _ in range(int(input()))]
def canMake(s):
if len(s) == 1:
for cube in cubes:
if s in cube:
return True
return False
elif len(s) == 2:
for i, cube1 in enumerate(cubes):
if s[0] in cube1:
for j, cube2 in ... | [
"nathantheinventor@gmail.com"
] | nathantheinventor@gmail.com |
564e7ae6d142c78bcd5de942b9a6a69facdfb9d0 | 8e0cdf235cd82e422c62fee3e6d044e4f4ee7614 | /feedback/migrations/0004_remove_translation.py | f0d087297b5ccce43ab6fa90c2ef41ed6fab4ac5 | [
"BSD-3-Clause"
] | permissive | stevecassidy/signbank-feedback | 4ae1c58a95a27428d11ef4a692c52738e9a4fb6f | d4cb8a7f445ca42c90a69d565d43875f50251aa8 | refs/heads/master | 2022-01-14T05:07:31.474605 | 2022-01-12T04:18:42 | 2022-01-12T04:18:42 | 78,930,468 | 1 | 1 | null | 2017-01-14T09:10:43 | 2017-01-14T09:10:43 | null | UTF-8 | Python | false | false | 407 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-09-17 13:44
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('feedback', '0003_map_translation'),
]
operations = [
migrations.RemoveField(
... | [
"steve.cassidy@mq.edu.au"
] | steve.cassidy@mq.edu.au |
69cc105ffb1b88b37b4962ce32f29a3d2366625d | 1af1f89eb9a178b95d1ba023b209b7538fb151f0 | /Algorithms/498. Diagonal Traverse.py | a78694dcbb277726c2c4bc88dabf90747eadcb45 | [] | no_license | 0xtinyuk/LeetCode | 77d690161cc52738e63a4c4b6595a6012fa5c21e | 08bc96a0fc2b672282cda348c833c02218c356f1 | refs/heads/master | 2023-02-21T16:58:39.881908 | 2021-01-25T08:00:13 | 2021-01-25T08:00:13 | 292,037,842 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 712 | py | class Solution:
def findDiagonalOrder(self, matrix: List[List[int]]) -> List[int]:
sx = 0
sy = 0
m = len(matrix)
if m==0:
return []
n = len(matrix[0])
if n==0:
return []
ans = []
reverse = False
while sx<m and sy<n:
... | [
"xliu301@uottawa.ca"
] | xliu301@uottawa.ca |
67142483d36d0db80900abc7955171ba9822c98b | 68cd659b44f57adf266dd37789bd1da31f61670d | /swea/덧셈.py | e5b8ab0ac443bc65fe5936e0ac9141aab0492675 | [] | no_license | 01090841589/solved_problem | c0c6f5a46e4d48860dccb3b0288aa5b56868fbca | bbea2f31e5fe36cad100bc514eacd83545fb25b1 | refs/heads/master | 2023-07-02T23:55:51.631478 | 2021-08-04T13:57:00 | 2021-08-04T13:57:00 | 197,157,830 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 425 | py |
def summ(k, scr):
if scr == num:
result = []
for j in range(N):
if visited[j]:
result.append(j+1)
print(result)
return
if scr > num:
return
if k >= N:
return
visited[k] = arr[k]
summ(k+1, scr+arr[k])
visited[k] = 0
... | [
"chanchanhwan@naver.com"
] | chanchanhwan@naver.com |
df6d16af59ecc459d304d7406ac8442ed9b48f06 | 26771494974942f4ab18d2cd8247506c344e1d14 | /117-populatingNextRightPointersinEachNodeII.py | 9b9e705cd655c6bfec49ca57ca65aa58890158d4 | [] | no_license | wangyunpengbio/LeetCode | 9f4c6076e067c5e847d662679483f737d40e8ca5 | cec1fd11fe43177abb2d4236782c0f116e6e8bce | refs/heads/master | 2020-04-29T22:28:25.899420 | 2020-04-03T07:37:26 | 2020-04-03T07:37:26 | 176,448,957 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,312 | py | """
# Definition for a Node.
class Node:
def __init__(self, val, left, right, next):
self.val = val
self.left = left
self.right = right
self.next = next
"""
class Solution:
def connect(self, root: 'Node') -> 'Node':
if root == None:
return None
queue =... | [
"wangyunpeng_bio@qq.com"
] | wangyunpeng_bio@qq.com |
c37e90516146a963e73064dbae83398fa95b20e3 | 1d48ddd72477de7d9ad98eef61bdfb406859b31c | /04. asyncio/web_scraping/test_pg.py | 31752e74e37bf55d125a66ca1feeb9777c26d7ae | [] | no_license | alexshchegretsov/async_techniques | b68d27de58bc2393520eb080838b2c72d356d2f3 | 42118504a39ccbd0bebad4ed41eba4b5c2e3d5dd | refs/heads/master | 2020-12-04T06:40:34.712114 | 2020-01-06T20:59:58 | 2020-01-06T20:59:58 | 231,661,735 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 450 | py | # -*- coding: utf-8 -*-
import asyncio
import asyncpg
async def run():
# conn = await asyncpg.connect(user="async", password="Dexter89!", database="async_db", host="127.0.0.1", port="5432")
conn = await asyncpg.connect("postgresql://async:Dexter89!@localhost/async_db")
values = await conn.fetch("""select ... | [
"nydollz77@gmail.com"
] | nydollz77@gmail.com |
6c1bf8a8173f069af524c50af7366e3150d5b5a6 | 5adb0e3bce712efb68b241421cd12e71d0401d98 | /tasks/ehco.py | acf54d41b71c3edc251e2ea7866628ff0119bf2b | [
"MIT"
] | permissive | librestar/backend | 8e945c3953ec59b4717704a5ebfc613ed756cba1 | 9060453d140d4c1785b370fd548be519d04047d4 | refs/heads/main | 2023-02-11T03:36:33.584588 | 2021-01-14T07:34:08 | 2021-01-14T07:34:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,372 | py | import json
import typing as t
import ansible_runner
from uuid import uuid4
from app.db.session import SessionLocal
from app.db.models.port import Port
from app.db.models.user import User
from app.db.models.server import Server
from app.db.models.port_forward import PortForwardRule
from app.db.crud.server import get_s... | [
"me@leishi.io"
] | me@leishi.io |
63406186486569e40cecf5de8a6cae1dc00ae400 | f54070cd3048a3645cb25f301592a904d387a1c9 | /python_prgrams/testpython/class.py | d90814e0b94bcc93934d6f3342591b4b93ec4eaa | [] | no_license | mak705/Python_interview | 02bded60417f1e6e2d81e1f6cde6961d95da2a8e | aff2d6018fd539dbcde9e3a6b3f8a69167ffca0d | refs/heads/master | 2020-03-22T21:03:34.018919 | 2019-11-15T08:51:34 | 2019-11-15T08:51:34 | 140,653,056 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 220 | py | class PartyAnimal:
x = 0
def party(self):
self.x = self.x + 1
print "so far ", self.x
an = PartyAnimal()
an.party()
an.party()
an.party()
print "Type", type(an)
print "Dir", dir(an)
#PartyAnimal.party(an)
| [
"mak705@gmail.com"
] | mak705@gmail.com |
dace21adfb00aaf1f2863a3e40f9256a2a67b538 | 2d6d24c0bfee13fc4682dee52075e78a552a8d1c | /tests/io/test_scanners.py | 88b4c30ae125ae42fe97d5aa7678fd851b13a7be | [
"MIT"
] | permissive | sbiradarctr/pyTenable | b890875c5df3a1da676cebd57af51bc49666a7d2 | 2a6930cd7b29036780c291581d89ab33c0fd6679 | refs/heads/master | 2023-05-06T09:20:43.580412 | 2021-05-31T09:05:11 | 2021-05-31T09:05:11 | 371,701,521 | 0 | 0 | MIT | 2021-05-28T12:58:52 | 2021-05-28T12:58:52 | null | UTF-8 | Python | false | false | 7,003 | py | from tenable.errors import *
from ..checker import check, single
import uuid, pytest
@pytest.mark.vcr()
def test_scanner_control_scans_scanner_id_typeerror(api):
with pytest.raises(TypeError):
api.scanners.control_scan('nope', str(uuid.uuid4()), 'stop')
@pytest.mark.vcr()
def test_scanner_control_scans_sc... | [
"steve@chigeek.com"
] | steve@chigeek.com |
ab6a077030d7e71350326b60b2622c761eac3670 | ca539b0df7ca5a91f80b2e2f64e7379e69243298 | /87.py | 219641b62a1f8827bc7e6a09e66208ccf7bb59c1 | [] | no_license | yorick76ee/leetcode | 9a9e5d696f3e32d9854c2ed9804bd0f98b03c228 | d9880892fe15f9bb2916beed3abb654869945468 | refs/heads/master | 2020-03-18T22:59:29.687669 | 2016-07-18T19:56:55 | 2016-07-18T19:56:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,452 | py | class Solution(object):
def lettercount(self,s1,s2):
dict1,dict2={},{}
for i in range(len(s1)):
if s1[i] not in dict1:
dict1[s1[i]] = 1
else:
dict1[s1[i]] += 1
if s2[i] not in dict2:
dict2[s2[i]] = 1
else... | [
"641614152@qq.com"
] | 641614152@qq.com |
365f848ad8dde1db19f683afd8439f0362e34fb7 | e3a674666de18e3b722bfd36e54d6a32e3f0b726 | /html/default.py | 6971548d1f71ed3f49da66c818ddae27850fbfbf | [] | no_license | sauloaldocker/lamp | 92d52c3105cd1d00d816138a64de66643fda67c3 | 9088f899e9a4e7e04941518041e10630cfdf71f1 | refs/heads/master | 2021-01-20T04:36:21.783064 | 2017-04-02T13:22:02 | 2017-04-02T13:22:02 | 21,629,683 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 536 | py | #!/usr/bin/python
# -*- coding: UTF-8 -*-# enable debugging
import cgitb
import os
import sys
cgitb.enable()
print "Content-Type: text/html;charset=utf-8"
print
print "<h1>argv</h1>"
print "<table>"
for k in sys.argv:
print "<tr><td>%s</td></tr>" % (k)
print "</table>"
print "<h1>environ</h1>"
print "<table>"
for... | [
"sauloal@gmail.com"
] | sauloal@gmail.com |
cd30dee9c2e39d4d74f5da68dd97c87656ac6d03 | ecd27923efba50703a7bfbfa2ba37a8cc78560ea | /automatic_scraper/config/bid/liriqing/shandong_taian_ggzy_config.py | bd234c5293803ff68ced61e5c97669fc19eb8d3a | [] | no_license | yougecn/work | fb691b072a736731083777e489712dee199e6c75 | 1b58525e5ee8a3bdecca87fdee35a80e93d89856 | refs/heads/master | 2022-03-03T19:14:17.234929 | 2018-04-17T12:29:19 | 2018-04-17T12:29:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,631 | py | # coding: utf-8
import time
import logging
import re
logger = logging.getLogger(__name__)
author = "liriqing"
web_title = u"泰安市公共资源交易网"
data_source = 'http://www.taggzyjy.com.cn'
start_urls = [
##政府
#招标
"http://www.taggzyjy.com.cn/Front/jyxx/075002/075002001/075002001001/",
"http://www.taggzyjy.com.cn... | [
"iwechen123@gmail.com"
] | iwechen123@gmail.com |
51b0ecc3f68e0a7f94297a54e5a5c33b9f699b5b | 658e2e3cb8a4d5343a125f7deed19c9ebf06fa68 | /course_DE/udacity-data-engineering-projects-master/Project 5 - Data Pipelines with Airflow/exercises/dags/3_ex3_subdags/subdag.py | 2751def0ecb6a5a10629e528018801bbdaf2210a | [] | no_license | yennanliu/analysis | 3f0018809cdc2403f4fbfe4b245df1ad73fa08a5 | 643ad3fed41961cddd006fadceb0e927f1db1f23 | refs/heads/master | 2021-01-23T21:48:58.572269 | 2020-10-13T22:47:12 | 2020-10-13T22:47:12 | 57,648,676 | 11 | 9 | null | null | null | null | UTF-8 | Python | false | false | 1,649 | py | # Instructions
# In this exercise, we’ll place our S3 to RedShift Copy operations into a SubDag.
# 1 - Consolidate HasRowsOperator into the SubDag
# 2 - Reorder the tasks to take advantage of the SubDag Operators
import datetime
from airflow import DAG
from airflow.operators.postgres_operator import PostgresOperator
... | [
"f339339@gmail.com"
] | f339339@gmail.com |
36d6859f91412f1d9bc50c8d9093e25601f1b157 | 854b94d7be92582bd191a7cb63143a95e5b5c337 | /hyfetch/distros/postmarketos_small.py | 4dc2bd42a651c2a3c7f18c7ef7c07c17cd241449 | [
"MIT"
] | permissive | hykilpikonna/hyfetch | 673c0c999d0f3f542349824495ad6004f450ebac | 98863df16d70b030696f4b94080d114396320f35 | refs/heads/master | 2023-08-17T10:41:10.289997 | 2023-08-17T03:37:23 | 2023-08-17T03:37:23 | 479,913,941 | 447 | 78 | MIT | 2023-09-14T14:39:18 | 2022-04-10T04:38:15 | Shell | UTF-8 | Python | false | false | 325 | py | # This file is automatically generated. Please do not modify.
from . import AsciiArt
postmarketos_small = AsciiArt(match=r'''"postmarketos_small"''', color='2 7', ascii=r"""
${c1} /\
/ \
/ \
\__ \
/\__ \ _\
/ / \/ __
/ / ____/ \
/ \ \ \
/_____/ /________\
""")... | [
"me@hydev.org"
] | me@hydev.org |
4998d14e229e37f835bbecc90cd2f99ce4d68860 | 78efa54b2b253f99ea7e073f783e6121c20cdb52 | /Codechef/Maximize The Sum.py | 6c263f96896aaeb642979ffca927fdf582635a67 | [] | no_license | NishchaySharma/Competitve-Programming | 32a93581ab17f05d20129471f7450f34ec68cc53 | 1ec44324d64c116098eb0beb74baac7f1c3395bb | refs/heads/master | 2020-04-08T04:02:46.599398 | 2020-01-01T15:51:39 | 2020-01-01T15:51:39 | 159,000,529 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 190 | py | for _ in range(int(input())):
n=int(input())
arr=sorted(list(map(int,input().split())))
res=0
for i in range(n//2):
res+=abs(arr[i]-arr[n-i-1])
print(res)
| [
"noreply@github.com"
] | NishchaySharma.noreply@github.com |
3f59c6edd6e5a5576e24f61b7997b031a064e4d7 | a62c3f0f641c930d74aa4a43e14b0f1e8de71b5f | /pages/views.py | d3ee28ea642f9016e0fb679d2d6d97a165b998b5 | [
"MIT"
] | permissive | ticotheps/scenic-realty-app | b2b02f509cff51d40d88c07fe5afff7c65c73c0c | c91caaee019d4790d444d02067a1a8e83ed554ba | refs/heads/develop | 2020-12-02T09:37:58.467839 | 2020-02-10T18:15:58 | 2020-02-10T18:15:58 | 230,966,666 | 0 | 0 | MIT | 2020-02-10T18:15:59 | 2019-12-30T19:10:19 | CSS | UTF-8 | Python | false | false | 204 | py | from django.shortcuts import render
from django.http import HttpResponse
def index(request):
return render(request, 'pages/index.html')
def about(request):
return render(request, 'pages/about.html') | [
"ticotheps@gmail.com"
] | ticotheps@gmail.com |
85115d1212270dde95742797c7074e489bb195c8 | e9c0b70cab39fa771db383fa882436c14ae9aec7 | /pizza_app/migrations/0001_initial.py | ece9b436685209c0100e8865b75f0d5b8d49abde | [
"MIT"
] | permissive | rusrom/django_pizza_project | f4b67b558a6238b58e285f1b9eb38bf1c8cbadf5 | 350862ca49b91f5d5d4e12105846ecc9e4fc15c0 | refs/heads/master | 2020-07-16T05:45:07.229049 | 2019-09-02T14:14:21 | 2019-09-02T14:14:21 | 205,732,229 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,024 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2019-09-02 12:28
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migratio... | [
"rusrom@guyfawkes.33mail.com"
] | rusrom@guyfawkes.33mail.com |
5858339fb5fa9dbe8b8188ff43641fdd371396b9 | 1ee10e1d42b59a95a64d860f0477a69b016d1781 | /Lecture_03/Lecture Code/10_Matcher_3_Lexical_Attibutes.py | 00f1d77a02bad808777d7d520f42ccb07444ce0b | [] | no_license | KushalIsmael/NLP | 5564070a573d251d7222dda85b8025ae1f9c3c6f | d4ce567a009e149b0cb1781d3a341d25aa438916 | refs/heads/master | 2023-08-18T14:07:48.646386 | 2021-10-28T19:09:25 | 2021-10-28T19:09:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 432 | py | import spacy
from spacy.matcher import Matcher
nlp = spacy.load("en_core_web_sm")
matcher = Matcher(nlp.vocab)
pattern = [{"IS_DIGIT": True}, {"LOWER": "fifa"}, {"LOWER": "world"},
{"LOWER": "cup"}, {"IS_PUNCT": True}]
matcher.add("FIFA", [pattern])
doc = nlp("2018 FIFA World Cup: France won!")
matches = m... | [
"amir.h.jafari@okstate.edu"
] | amir.h.jafari@okstate.edu |
23de31fa7213263f9a98e2bd707d3c2d771dd3be | eda36d24a1e6d4f30597ab1e1b2d8e17694f93bd | /weio/tests/test_turbsim.py | 2afe6ac46c1e982c0352cf1e40abbc37dad84357 | [
"MIT"
] | permissive | ebranlard/weio | 31fdab7a8afde9919f66fab942dad309f8d8d0e2 | 50fab087c5dc3e0248bcce578de6e713fa3e9b5f | refs/heads/main | 2023-07-23T19:32:42.548855 | 2022-12-19T08:13:06 | 2022-12-19T08:13:06 | 152,828,434 | 25 | 20 | MIT | 2023-01-13T20:37:29 | 2018-10-13T02:44:25 | Python | UTF-8 | Python | false | false | 1,734 | py | import unittest
import os
import numpy as np
from .helpers_for_test import MyDir, reading_test
try:
from weio.turbsim_file import TurbSimFile
except:
from weio.weio.turbsim_file import TurbSimFile
class Test(unittest.TestCase):
def test_001_read_all(self, DEBUG=True):
reading_test('TurbSim_*.*', ... | [
"emmanuel.branlard@nrel.gov"
] | emmanuel.branlard@nrel.gov |
b1c10929ca27cebfc8f32d5fa3e33f13d3744bd3 | c251401a04faee549a5255745dc976c2be8e24b9 | /work_orders/permissions.py | 15b4821acb2a82a375b098f4d93f2ef74b862691 | [] | no_license | fengo4142/aero-django-backend | a43a3526b570730fd9d519b8e890e550ff9f9f3c | 53167b52b68b30eef6a10edea47888ba0ad71a4e | refs/heads/master | 2022-11-11T10:01:50.534513 | 2020-06-24T15:40:11 | 2020-06-24T15:40:11 | 274,699,313 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,948 | py | import logging
from rest_framework.permissions import BasePermission
from work_orders.models import WorkOrderForm
logger = logging.getLogger('backend')
# *****************************************************************************
# ***************************** WORK ORDERS *******************************
# **... | [
"fengo4142@gmail.com"
] | fengo4142@gmail.com |
e41d486baf0f584817240d5dfb4283ad35235fff | a80884040ce1c178274a3068d216f440dd541844 | /tests/operators/test_group_by.py | 148a994d874624aae29cd6aea6bd533dc90abce8 | [
"MIT"
] | permissive | maki-nage/rxsci | a4aae51edc1ef684b55df22e34c11aa1d54ef740 | 915e59ebf593c4b313265bb87cf0e1209ec2ee0f | refs/heads/master | 2023-01-19T14:32:11.638497 | 2023-01-17T08:06:35 | 2023-01-17T08:06:35 | 242,592,973 | 9 | 2 | MIT | 2022-11-08T21:54:16 | 2020-02-23T21:23:56 | Python | UTF-8 | Python | false | false | 4,013 | py | import rx
import rx.operators as ops
import rxsci as rs
from ..utils import on_probe_state_topology
def test_group_by_obs():
source = [1, 2, 2, 1]
actual_error = []
actual_completed = []
actual_result = []
mux_actual_result = []
def on_completed():
actual_completed.append(True)
s... | [
"romain.picard@oakbits.com"
] | romain.picard@oakbits.com |
ef4f31488ff1d5936c39d77fc37b29c55734102e | 4500003dcaa3eb92e2b9c6bca8987ec473fb5ec3 | /core/migrations/0006_post_slug.py | db41286dfce7136c7c34e38796bac248d7291c36 | [] | no_license | alikhundmiri/simpleweddingdjango | 0bb2bfc069bac075d759efa96eede55c68595cf4 | 57aa6576df368fde651f7f2b6863f693bbb57756 | refs/heads/master | 2022-12-17T22:36:18.674974 | 2020-06-14T08:10:09 | 2020-06-14T08:10:09 | 239,115,495 | 0 | 0 | null | 2022-12-08T03:51:09 | 2020-02-08T11:01:00 | HTML | UTF-8 | Python | false | false | 866 | py | # Generated by Django 3.0.3 on 2020-03-29 16:37
from django.db import migrations, models
from core.utils import random_string_generator
from django.utils.text import Truncator
from django.utils.text import slugify
def gen_slug(apps, schema_editor):
MyModel = apps.get_model('core', 'Post')
for row in MyModel.... | [
"salikhundmiri@gmail.com"
] | salikhundmiri@gmail.com |
b5450b3f9c338676f9ab05092e450396a19672b0 | 5d5f6ba3bdcb52b4750a5f28afa8a1a1019bfc9e | /django/extras/djangoForms/djangoFormApp/models.py | 464d6d00fd8196fb2c75dbf55badc599443656b0 | [] | no_license | eDiazGtz/pythonLearning | 06e96f2f5a6e48ac314cb815cf9fbf65d0b7c2c8 | 57d7b2292cf5d9769cce9adf765962c3c0930d6c | refs/heads/master | 2023-06-18T02:16:09.293375 | 2021-05-03T18:09:52 | 2021-05-03T18:09:52 | 335,090,531 | 0 | 0 | null | 2021-05-03T18:09:53 | 2021-02-01T21:35:24 | Python | UTF-8 | Python | false | false | 758 | py | from django.db import models
# Create your models here.
class UserManager(models.Manager):
def createValidator(self, postData):
errors = {}
if len(postData['firstName']) < 1:
errors["firstName"] = "First Name should be at least 1 character"
if len(postData['lastName']) < 1:
... | [
"ediaz-gutierrez@hotmail.com"
] | ediaz-gutierrez@hotmail.com |
1d1e5c80adae2a85e36764be6c6786ca13998bc7 | 3a771b72dae1aae406b94726bcbcf73915577b18 | /q38.py | 0a85a5450c76b409276bf18b448122f28c6bc171 | [] | no_license | SHANK885/Python-Basic-Programs | 4fcb29280412baa63ffd33efba56d9f59770c9dc | 157f0f871b31c4523b6873ce5dfe0d6e26a6dc61 | refs/heads/master | 2021-07-18T18:24:10.455282 | 2018-11-19T07:02:27 | 2018-11-19T07:02:27 | 138,009,231 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 294 | py | '''
Define a function which can generate a list where the values are square of numbers between 1 and 20 (both included).
Then the function needs to print the last 5 elements in the list.
'''
def lis(lower,upper):
l = []
for i in range(lower,upper+1):
l.append(i)
print(l[-5:])
lis(1,20) | [
"shashankshekhar885@gmail.com"
] | shashankshekhar885@gmail.com |
b42d376714e61221c9b1932afe6a308354078de5 | 523fb785bda41e33546c929a5c2de6c93f98b434 | /专题学习/链表/mergeKLists.py | 89db71c8897b4a8abf67d8c47ea987374e83a389 | [] | no_license | lizhe960118/TowardOffer | afd2029f8f9a1e782fe56ca0ff1fa8fb37892d0e | a0608d34c6ed96c9071cc3b9bdf70c95cef8fcbd | refs/heads/master | 2020-04-27T10:33:21.452707 | 2019-05-02T10:47:01 | 2019-05-02T10:47:01 | 174,259,297 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 700 | py | # Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution(object):
def mergeKLists(self, lists):
"""
:type lists: List[ListNode]
:rtype: ListNode
"""
#把所有链表放入数组,排序后建立新链表返回
... | [
"2957308424@qq.com"
] | 2957308424@qq.com |
89e4b0cc8cc580454793178a3e90e399b693f848 | 1cd853babf022779f3392eb9e1781f952d4f2c07 | /proposal.py | 45a17c9f760c1ab2575741bea87304eb7b516340 | [
"Apache-2.0"
] | permissive | ksrhamdi/proCon3 | 84b53027305f609267393701b49f3e7efade9097 | f0d214651dae5cbdbd4f7ff881269fb1cc5501ad | refs/heads/master | 2022-11-10T06:58:07.931219 | 2020-06-03T18:01:10 | 2020-06-03T18:01:10 | 276,995,886 | 0 | 0 | Apache-2.0 | 2020-07-03T22:15:11 | 2020-07-03T22:15:10 | null | UTF-8 | Python | false | false | 5,885 | py | # Import external modules.
from google.appengine.api import memcache
from google.appengine.ext import ndb
import logging
import random
import time
# Import local modules.
from configuration import const as conf
from constants import Constants
const = Constants()
const.MAX_RETRY = 3
const.MIN_REAGGREGATE_DELAY_SEC = 6... | [
"you@example.com"
] | you@example.com |
ad8bc92067a56e68d2d6a41e02f85a5fc6f954e0 | 1d9a6406c859fda186f520bb4472c551fc572c7b | /src/hopla/cli/groupcmds/hatch.py | e3c85019653f241bbc5b6a5ab861095a0e1e838d | [
"Apache-2.0"
] | permissive | rickie/hopla | af21b794ce6719d402721550e1ee4091790410b6 | 24a422194e42c03d5877dc167b2b07147326a595 | refs/heads/main | 2023-08-13T17:33:03.612293 | 2021-10-12T12:13:25 | 2021-10-12T12:13:25 | 408,538,704 | 0 | 0 | Apache-2.0 | 2021-09-20T17:30:15 | 2021-09-20T17:30:15 | null | UTF-8 | Python | false | false | 873 | py | #!/usr/bin/env python3
"""
The module with CLI code that handles the `hopla hatch` GROUP command.
"""
import sys
from typing import NoReturn
import click
import requests
from hopla.hoplalib.hatchery.hatchcontroller import HatchRequester
@click.group()
def hatch():
"""GROUP for hatching eggs."""
def hatch_egg... | [
"31448155+melvio@users.noreply.github.com"
] | 31448155+melvio@users.noreply.github.com |
6af9434c46be76fce9d56f3ea60f2fca581ad793 | bc0dd74217258c8bdd30e6095dfd7a3edca2dd09 | /assignments/CarND-Vehicle-Detection-P5/f2f.py | c7ddcf21d773d672880881636ee6f76213c48ccd | [] | no_license | akamlani/selfdrivingcar | d645872f4129fcd4c68c3d4967fdd9c784086cc8 | eadd43b4c6d60c71e283b7c43cba61030377eb47 | refs/heads/master | 2020-06-12T10:19:55.748107 | 2017-05-02T18:44:52 | 2017-05-02T18:44:52 | 75,585,494 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,461 | py | import numpy as np
import cv2
from scipy.ndimage.measurements import label
import viz_utils as viz
class Vehicle(object):
def __init__(self):
self.detected = False # was vehicle detected in last iteration
self.n_detections = 0 # number of times this vehicle has been seen
... | [
"akamlani@gmail.com"
] | akamlani@gmail.com |
555ab84accb35fdd7a4be6c3279a0dfd0fda301b | 71acb7214efd91c0d327f6d8958e1798eadb4401 | /locations/spiders/lidl_be.py | 82d333e830b64a9538b85a87b7b5987b418fa8c1 | [
"CC0-1.0",
"MIT"
] | permissive | alltheplaces/alltheplaces | 21b9f8b4ace1352e52ae7b8f8825a930d2cb033e | 1bcbb55cfcf06f2c714465570711f6e83f205c22 | refs/heads/master | 2023-08-30T19:45:35.098658 | 2023-08-30T17:51:54 | 2023-08-30T17:51:54 | 61,166,935 | 453 | 176 | NOASSERTION | 2023-09-14T17:16:40 | 2016-06-15T01:09:18 | Python | UTF-8 | Python | false | false | 1,410 | py | import re
from locations.hours import DAYS_FR, OpeningHours, day_range, sanitise_day
from locations.spiders.lidl_gb import LidlGBSpider
from locations.storefinders.virtualearth import VirtualEarthSpider
class LidlBESpider(VirtualEarthSpider):
name = "lidl_be"
item_attributes = LidlGBSpider.item_attributes
... | [
"noreply@github.com"
] | alltheplaces.noreply@github.com |
149a32f41cf34c3a51f8d317601177f0d4f27b59 | 067573d864754a7ce73014086cd6c9165e2b5ea0 | /scripts/pMSSMtree.cfg.py | a99460e708046205f3dac742f4ace7e7d0d8f716 | [] | no_license | UhhCmsAnalysis/Run2pMSSM | 3f586d8dcbaacd4de2ed908062fe9875b43fef4c | bb6c7c7309108b26ff1d8f2062f712d9b848555a | refs/heads/master | 2020-12-21T08:53:50.884254 | 2020-02-09T20:33:58 | 2020-02-09T20:33:58 | 236,379,543 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,020 | py | FILE = open("scripts/analyses.cfg.py")
exec(FILE)
FILE.close()
#################################
# parameters, masses, etc
#################################
treeCfg = [
[ "params",
{"files":"idata/parameters/params_batch*.txt","base":""}],
[ "moreparams",
{"files":"idata/moreparams/moreparams.txt",... | [
"samuel.bein@gmail.com"
] | samuel.bein@gmail.com |
6bacb134a528804dff45b812c5ea7e73e151f3ac | 0add7953d3e3ce2df9e8265102be39b758579753 | /built-in/TensorFlow/Research/cv/image_classification/Cars_for_TensorFlow/automl/vega/model_zoo/model_zoo.py | 5deb87cd07e7947c8ec193b4da018690b923ef91 | [
"Apache-2.0",
"MIT"
] | permissive | Huawei-Ascend/modelzoo | ae161c0b4e581f8b62c77251e9204d958c4cf6c4 | df51ed9c1d6dbde1deef63f2a037a369f8554406 | refs/heads/master | 2023-04-08T08:17:40.058206 | 2020-12-07T08:04:57 | 2020-12-07T08:04:57 | 319,219,518 | 1 | 1 | Apache-2.0 | 2023-03-24T22:22:00 | 2020-12-07T06:01:32 | Python | UTF-8 | Python | false | false | 3,377 | py | # -*- coding: utf-8 -*-
# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the MIT License.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the... | [
"1571856591@qq.com"
] | 1571856591@qq.com |
cb1c16ee59fe20890a221136d81fcc1734dc8a2d | 940bdfb1d2014e0fdf8c1d138efb43935446864a | /ayush_crowdbotics_347/settings.py | 24c34f26d61c779f77db6396b510cd90b427c8e0 | [] | no_license | payush/ayush-crowdbotics-347 | f8568a28c0fd328161e9961d1f4ffc73ed1ff3de | 08b235df039628147296a723f18dc976317479db | refs/heads/master | 2020-03-23T19:49:01.171461 | 2018-07-23T11:14:46 | 2018-07-23T11:14:46 | 142,003,672 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,130 | py | """
Django settings for ayush_crowdbotics_347 project.
Generated by 'django-admin startproject' using Django 1.11.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
... | [
"ayushpuroheet@gmail.com"
] | ayushpuroheet@gmail.com |
0343a12712af23f99051af1d1eb45efc8aa04b53 | 5dfa9dfb2d2d604f54de7020aed11642f03f1186 | /SLAC/dark_defects_offline/v0/validator_dark_defects_offline.py | 30eb49152670cb1873fc87d6cdb693baf4218fea | [
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | lsst-camera-dh/harnessed-jobs | 49a9a65f3368771ff7b7b22caa94fc8f384681f4 | 352f48b70633b0f0e3faf941198edf1de85f4989 | refs/heads/master | 2021-03-19T16:57:36.199351 | 2019-03-10T21:18:46 | 2019-03-10T21:18:46 | 34,645,042 | 0 | 1 | null | 2018-04-03T23:37:34 | 2015-04-27T03:59:33 | Python | UTF-8 | Python | false | false | 1,050 | py | #!/usr/bin/env python
import lsst.eotest.sensor as sensorTest
import lcatr.schema
import siteUtils
import eotestUtils
sensor_id = siteUtils.getUnitId()
mask_file = '%s_dark_pixel_mask.fits' % sensor_id
eotestUtils.addHeaderData(mask_file, LSST_NUM=sensor_id, TESTTYPE='SFLAT_500',
DATE=eotest... | [
"jchiang@slac.stanford.edu"
] | jchiang@slac.stanford.edu |
46747fbc3c33b336048baf27aad12d4a044b8473 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /yfooETHj3sHoHTJsv_11.py | 3b80e0b8989222b1ece889e3f7396b901396c028 | [] | 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 | 366 | py | """
Create a function that returns `True` when `num1` is equal to `num2`;
otherwise return `False`.
### Examples
is_same_num(4, 8) ➞ False
is_same_num(2, 2) ➞ True
is_same_num(2, "2") ➞ False
### Notes
Don't forget to `return` the result.
"""
def is_same_num(num1, num2):
if num1==num2... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
be8933396f92ba4e0bbc0f721914a0ef71410726 | 20cf2cb73adfed63cf182fc12a09aa3aadc033c6 | /filter.py | ba1f301e7c35530bd36538e7e6db9a0ebf49052c | [] | no_license | arunkumar27-ank-tech/Python-Programs | 678ae558e8c141a6302e2705849c97258974c4eb | a56788057d1bf8848681e38eb569874d84db7337 | refs/heads/master | 2023-06-16T14:50:36.146381 | 2021-07-15T13:57:54 | 2021-07-15T13:57:54 | 386,305,015 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 238 | py | from functools import reduce
lst = [1, 2, 3, 4, 5, 6, 7, 8, 9]
evens = list(filter(lambda n: n % 2 == 0, lst))
doubles = list(map(lambda n: n+2, evens))
sum1 = reduce(lambda a, b: a+b, doubles)
print(evens)
print(doubles)
print(sum1)
| [
"arunkumar834428@gmail.com"
] | arunkumar834428@gmail.com |
bf77466fc9d42438623ab91fe345fb7f007eef5d | cca70e45645d5b96f98b1328833d5b4ebb1c882e | /P20/P06.py | cf4525656b07a2c7601c33937201708a72cf69c6 | [] | no_license | webturing/Python3Programming_19DS12 | 9613a9808407b6abef0bc89ad8f74fc3920e789f | 5bbc1e10cec0ebf7d5dfb415a9d4bb07ce0b32ca | refs/heads/master | 2020-08-01T10:23:09.474316 | 2019-12-27T11:52:34 | 2019-12-27T11:52:34 | 210,964,665 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 951 | py | '''
赵、钱、孙、李、周五人围着一张圆桌吃饭。饭后,周回忆说:“吃饭时,赵坐在钱旁边,钱的左边是孙或李”;李回忆说:“钱坐在孙左边,我挨着孙坐”。
结果他们一句也没有说对。请问,他们在怎样坐的?
'''
def left(a, b):
return a + 1 == b or a == 5 and b == 1
def right(a, b):
return left(b, a)
def adj(a, b):
return right(a, b) or left(a, b)
zhao, qian, sun, li, zhou = 1, 1, 1, 1, 1
for qian in range... | [
"zj@webturing.com"
] | zj@webturing.com |
c433d7fe29d312b80fbac7fc3888a4c7c7dd2223 | 39c861da8f362874baac3f7e4aab089b18125dab | /ghostwriter/modules/exceptions.py | be1d30a317dbe958adf73cba0a39823fd06cbd43 | [
"BSD-3-Clause"
] | permissive | chrismaddalena/Ghostwriter | 47cdc2111695e19335430326cdf4f880b728be22 | f197be35497ae97c6b90ba17a820ec04e4254c53 | refs/heads/master | 2022-07-09T02:14:12.382165 | 2022-06-07T23:19:15 | 2022-06-07T23:19:15 | 202,816,974 | 3 | 0 | BSD-3-Clause | 2022-03-09T21:07:37 | 2019-08-17T00:37:18 | Python | UTF-8 | Python | false | false | 761 | py | """This contains all of the custom exceptions for the Ghostwriter application."""
class MissingTemplate(Exception):
"""
Exception raised when a report template is missing for a report.
**Attributes**
``message``
Error message to be displayed
"""
def __init__(self, message="No report ... | [
"chris.maddalena@protonmail.com"
] | chris.maddalena@protonmail.com |
2c6f44399105c6eaf015fa79e82a8722f392705f | e13c98f36c362717fdf22468b300321802346ef5 | /home/migrations/0005_auto_20161130_1514.py | a8eda78bd3708cdb4cd0d223a5be51a7bbc35b45 | [] | no_license | alexmon1989/libraries_portal | 2415cc49de33459266a9f18ed8bb34ac99d3eb7c | 277081e09f6347c175775337bffba074a35f3b92 | refs/heads/master | 2021-01-23T07:25:53.884795 | 2018-12-25T14:29:29 | 2018-12-25T14:29:29 | 80,501,603 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 577 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-30 13:14
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('home', '0004_auto_20161130_1402'),
]
operations = ... | [
"alex.mon1989@gmail.com"
] | alex.mon1989@gmail.com |
c1ecba608b38e7e151190d9428b136119b3a8902 | 3b9b4049a8e7d38b49e07bb752780b2f1d792851 | /src/third_party/skia/gyp/icu.gyp | 4a985032c26d61b2145ef092b2b838626d4a11de | [
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"MIT",
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-public-domain"
] | permissive | webosce/chromium53 | f8e745e91363586aee9620c609aacf15b3261540 | 9171447efcf0bb393d41d1dc877c7c13c46d8e38 | refs/heads/webosce | 2020-03-26T23:08:14.416858 | 2018-08-23T08:35:17 | 2018-09-20T14:25:18 | 145,513,343 | 0 | 2 | Apache-2.0 | 2019-08-21T22:44:55 | 2018-08-21T05:52:31 | null | UTF-8 | Python | false | false | 3,713 | gyp | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'includes': [
'common_variables.gypi',
],
'variables': {
'component%': 'static_library',
'icu_directory': '../third_party/externals/i... | [
"changhyeok.bae@lge.com"
] | changhyeok.bae@lge.com |
1e1d5ccfdb2caa614c32a09ee07729393624758c | 4c672231bd8b7c23bd5773ef990404cc3146712a | /shipmaster/server/celery.py | 8e24f72855c7e156d14e3e37290140aeabcf16b0 | [
"BSD-3-Clause"
] | permissive | AzureCloudMonk/shipmaster | b0e82f93308ecc829e6f6b3cb3156f11dcfbadd4 | cf596be7ea689c26c4bf47acb67dfd15169d3c46 | refs/heads/master | 2020-11-30T01:51:32.010852 | 2018-03-03T21:47:17 | 2018-03-03T21:47:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 270 | py | import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'shipmaster.server.settings')
from celery import Celery
from django.conf import settings
app = Celery('shipmaster.server')
app.config_from_object(settings)
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
| [
"lex@damoti.com"
] | lex@damoti.com |
60a9319cb5e51a72ea6172acb56753d27d908782 | 9aa52f7e5902ea8f4a2810809218d9631446345d | /backend/course/api/v1/serializers.py | 94b376e43c63bba2216fc46a5939adf50d3f51d9 | [] | no_license | crowdbotics-apps/merchandising-plays-21542 | e662e42b8766a2fc24d6e0ab926580de0b580461 | c0298b28a45a617b88984d074af4a69f4ea00700 | refs/heads/master | 2022-12-29T10:31:41.304017 | 2020-10-15T18:39:00 | 2020-10-15T18:39:00 | 304,412,965 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,622 | py | from rest_framework import serializers
from course.models import (
Recording,
Event,
Subscription,
Course,
Group,
Module,
PaymentMethod,
SubscriptionType,
Enrollment,
Lesson,
Category,
)
class GroupSerializer(serializers.ModelSerializer):
class Meta:
model = Gro... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
462ff12ed72a87b6f46032cc0eeb6fd1d11f6baf | af669dbef653dd69474f4c0836582bf14262c80f | /price-test/frame/lib/commonlib/configure/configunit.py | d59369edd113378ff64e2167f6f76406ff180d06 | [] | no_license | siki320/fishtest | 7a3f91639d8d4cee624adc1d4d05563611b435e9 | 7c3f024192e1c48214b53bc45105bdf9e746a013 | refs/heads/master | 2021-01-19T21:58:36.807126 | 2017-04-19T09:56:37 | 2017-04-19T09:56:37 | 88,729,049 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 745 | py | #!/usr/bin/env python
# -*- coding: GB18030 -*-
'''
Created on 2012-3-10
@author: tongdangdang
'''
class ConfigUnit(object):
'''
@author: tongdangdang
@summary: ub conf configure unit
'''
def __init__(self,key,value,father,note = ""):
self.key = key
self.value = value
self.... | [
"lisiqi_i@didichuxing.com"
] | lisiqi_i@didichuxing.com |
8bc1f3af1ca811d884a225dbd76851c0ad13c46a | 1da15a0ec8eb771d4584b3997d44d2af23d53484 | /D3/1220.Magnetic.py | 2da7b7c711faaafaf1586b556cbc79aeea42fe62 | [] | no_license | cdh3261/Algorithm_Problems | 1e9ad0310490ffe5396f8cef3205885d62ebefb7 | d9ad791e9a0bcdd1c13b8e18fa993b784a53b064 | refs/heads/master | 2020-08-29T07:27:04.331917 | 2020-03-06T11:33:57 | 2020-03-06T11:33:57 | 217,966,844 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 517 | py | ####### N극 #######
####### S극 #######
for t in range(1, 11):
n = int(input())
arr = [list(map(int, input().split())) for i in range(n)]
col = []
for i in range(n):
a = []
for j in range(n):
if arr[j][i] != 0:
a.append(arr[j][i])
col.appe... | [
"cdh3261@naver.com"
] | cdh3261@naver.com |
91efd913c270d343c4b45b6d1eb44d4aa58f912c | 35a6b6b5cabcf9fb39527bab020ef7c96265a026 | /p3.py | 5911e61bf240cc3e917c3377949ca16c9c46851d | [] | no_license | mepky/data-structure-and-algorithm | 9a1324142276e6966692c51734613f15234f5300 | 96f64e657f97e46fc2d32cca5294fa0f104d5d01 | refs/heads/master | 2020-03-24T08:57:41.692564 | 2020-02-10T12:40:13 | 2020-02-10T12:40:13 | 142,614,071 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 476 | py | from collections import defaultdict
t=int(input())
for _ in range(t):
l=defaultdict(int)
n=int(input())
d=2**20
t=0
s=input()
a=[-1]*27
for i in range(n):
if a[ord(s[i])-97]==-1:
a[ord(s[i])-97]=i
else:
d=min(d,i-a[ord(s[i])-97])
t=1
... | [
"noreply@github.com"
] | mepky.noreply@github.com |
f4cc030b9c8573c816c10160ff087a8c68c9d808 | e00cf0bf72421ec31e4d3608c615aeeba5064731 | /wows/move.py | 3165d0d74b85208a58ea1b2ed7ee70fd489a053c | [] | no_license | lorne-luo/auto-wows | b4a84c7d99585c84a635fb5be11fd0f03a5f37fd | 992ad473f1d5a78686e1c4c939c6c218e72373d7 | refs/heads/master | 2020-12-30T00:52:17.497039 | 2020-02-25T11:10:30 | 2020-02-25T11:10:30 | 238,803,938 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,190 | py | import time
from random import randint
import pyautogui as pag
import settings as settings
from helper import search_template, get_map_image
class WOWS_Move(object):
def move_ship(self):
global MOVE_TO
pag.press('m', presses=1, interval=0.25)
pag.sleep(1.5)
if not MOVE_TO:
... | [
"dev@luotao.net"
] | dev@luotao.net |
12e05ceaac7c5c4174fb21ada9bdbb1e70c90c54 | ffb05b145989e01da075e2a607fb291955251f46 | /pypers/oxford/non_cooperative.py | 6c7b293967ae50f89ebf7f90ccccdc8e62ba6d40 | [] | no_license | micheles/papers | a5e7f2fa0cf305cd3f8face7c7ecc0db70ce7cc7 | be9070f8b7e8192b84a102444b1238266bdc55a0 | refs/heads/master | 2023-06-07T16:46:46.306040 | 2018-07-14T04:17:51 | 2018-07-14T04:17:51 | 32,264,461 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 255 | py | # non_cooperative.py
class B1(object):
def __init__(self, **kw):
print "B1.__init__"
super(B1, self).__init__(**kw)
class B2(object):
def __init__(self, **kw):
print "B2.__init__"
super(B2, self).__init__(**kw)
| [
"michele.simionato@gmail.com"
] | michele.simionato@gmail.com |
94f2093636ae67fdc8ec2d5431c2b52cbd51d7c2 | ac5e52a3fc52dde58d208746cddabef2e378119e | /exps-gsn-edf/gsn-edf_ut=3.0_rd=0.5_rw=0.06_rn=4_u=0.075-0.35_p=harmonic-2/sched=RUN_trial=25/params.py | 1e06a0ee411f4cd8e4e96c1df8f010d7336d6730 | [] | no_license | ricardobtxr/experiment-scripts | 1e2abfcd94fb0ef5a56c5d7dffddfe814752eef1 | 7bcebff7ac2f2822423f211f1162cd017a18babb | refs/heads/master | 2023-04-09T02:37:41.466794 | 2021-04-25T03:27:16 | 2021-04-25T03:27:16 | 358,926,457 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 254 | py | {'cpus': 4,
'duration': 30,
'final_util': '3.041500',
'max_util': '3.0',
'periods': 'harmonic-2',
'release_master': False,
'res_distr': '0.5',
'res_nmb': '4',
'res_weight': '0.06',
'scheduler': 'GSN-EDF',
'trial': 25,
'utils': 'uni-medium-3'}
| [
"ricardo.btxr@gmail.com"
] | ricardo.btxr@gmail.com |
f3467f1043b80a0ea9337c61aa83eb37180e440c | 98c6ea9c884152e8340605a706efefbea6170be5 | /examples/data/Assignment_2/mphnok005/question3.py | 8ab32014734be33c45000ec60015c87758483dae | [] | no_license | MrHamdulay/csc3-capstone | 479d659e1dcd28040e83ebd9e3374d0ccc0c6817 | 6f0fa0fa1555ceb1b0fb33f25e9694e68b6a53d2 | refs/heads/master | 2021-03-12T21:55:57.781339 | 2014-09-22T02:22:22 | 2014-09-22T02:22:22 | 22,372,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 207 | py | from math import*
x=sqrt(2)
a=2
pi=2*(a/x)
while x<2:
x=(sqrt(2+x))
pi=(pi*a/x)
print("Approximation of pi:",round(pi,3))
c=eval(input("Enter the radius:\n"))
print("Area:",round(c**2*pi,3)) | [
"jarr2000@gmail.com"
] | jarr2000@gmail.com |
3da3e17495525b485fd627a5d52d55b261e728ec | 8d50cc4f37c153fcb51de4501f3fa50c00394d9b | /test/benchmark/resnet_tl_benchmark.py | 0273e724c53f6d0c0598924637c84431b5b3fe0c | [
"MIT"
] | permissive | liujuanLT/InsightFace_TF | dbd239dfdda1866c348e82211932884f73cb3067 | 257b6e0dcf7e7c3523dc7e1c08ba529fab1bf75b | refs/heads/master | 2022-04-27T21:24:01.458277 | 2022-03-17T12:28:15 | 2022-03-17T12:28:15 | 463,040,192 | 0 | 0 | MIT | 2022-02-24T06:51:16 | 2022-02-24T06:51:15 | null | UTF-8 | Python | false | false | 1,255 | py | import tensorflow as tf
import tensorflow.contrib.slim.nets as nets
import numpy as np
from nets.resnet import get_resnet
slim = tf.contrib.slim
resnet = nets.resnet_v1
if __name__ == '__main__':
output_shape = 85164
batch_size = 128
image = tf.placeholder(name='input_x', shape=[None, 224, 224, 3], dtype... | [
"auroua@yeah.net"
] | auroua@yeah.net |
51d5ae1fa2d5ae73a65d826bd1113e9b57cef767 | 03383b657ad6d526e7e6aa6639fe41019cd39ea2 | /recursion/palandrome.py | 985c2d63e7528bf16d0978634606988d462fbf30 | [] | no_license | ahmedmeshref/Leetcode-Solutions | 1c5f908cb2f6487c9dfadcc8f91192dedbb5a17e | 28f848cb25e4aa22e6d8c9d715488f191ed15137 | refs/heads/main | 2023-05-26T14:33:11.246122 | 2021-06-07T21:32:13 | 2021-06-07T21:32:13 | 356,045,965 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 402 | py | def isPalindrome(s: str) -> bool:
l = 0
r = len(s) - 1
while l != r:
if not s[l].isalpha():
l += 1
elif not s[r].isalpha():
r -= 1
elif s[l].lower() != s[r].lower():
return False
else:
l += 1
r -= 1
... | [
"a.meshref@alustudent.com"
] | a.meshref@alustudent.com |
e49952bb3039c47341a3a2001f153c1fcea8521c | 05169e203974411667ab947298a74575b8a179e0 | /packages/jet_bridge_base/jet_bridge_base/serializers/relationship_override.py | c985788ccf2e5eeaf886f08eb8bb093846f356d8 | [
"MIT"
] | permissive | jet-admin/jet-bridge | f6b563e1801985063483ddb02e9e1c3301dc0612 | c53d30fb308eed5822083eaf71f641c4098610cc | refs/heads/master | 2023-09-01T14:31:42.261427 | 2023-08-24T13:54:34 | 2023-08-24T13:54:34 | 163,167,532 | 1,564 | 166 | MIT | 2023-03-18T03:20:04 | 2018-12-26T10:27:33 | Python | UTF-8 | Python | false | false | 4,873 | py | from jet_bridge_base.models.model_relation_override import ModelRelationOverrideModel
from jet_bridge_base.store import store
from sqlalchemy import inspect
from jet_bridge_base import fields
from jet_bridge_base.db import get_mapped_base, reload_request_graphql_schema, get_request_connection
from jet_bridge_base.exce... | [
"f1nal@cgaming.org"
] | f1nal@cgaming.org |
8ba80ac4b037dde92443141d60bd35bf1f98031e | e4414bd8152e52855db7ab9065ae12b7329143e0 | /python/src/hangman.py | 0dd38bbfdc6501bc39f632a253400dd40bbf2d07 | [] | no_license | catalinc/programmingpraxis-solutions | 39cb847877ec46d2fb85740791c24889ab5654a8 | c0b13906aa76ffac705bf108db138fb9a38bc16a | refs/heads/master | 2021-03-27T16:46:47.781839 | 2017-09-09T15:17:38 | 2017-09-09T15:17:38 | 53,532,233 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,889 | py | #!/usr/bin/env python
# See http://programmingpraxis.com/2011/12/20/hangman/
import random
import sys
HANGMAN = [
"",
"""
O
""",
"""
O
|
""",
"""
_O
|
""",
"""
_O_
|
""",
"""
_O_
|
/
""",
"""
_O_
|
/ \\
"""
]
def play_game():
secret_word = random_word().upper()
guessed_letters = set()
failed_at... | [
"catalin.cristu@gmail.com"
] | catalin.cristu@gmail.com |
99023c5533e743afb8349cd031816969f2e0f52e | 6527b66fd08d9e7f833973adf421faccd8b765f5 | /yuancloud/recicler/event/tests/test_mail_schedule.py | 7b92308e184f89e0d7bc6436545f7d9324c6b05d | [] | no_license | cash2one/yuancloud | 9a41933514e57167afb70cb5daba7f352673fb4d | 5a4fd72991c846d5cb7c5082f6bdfef5b2bca572 | refs/heads/master | 2021-06-19T22:11:08.260079 | 2017-06-29T06:26:15 | 2017-06-29T06:26:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,952 | py | # -*- coding: utf-8 -*-
import datetime
from dateutil.relativedelta import relativedelta
from yuancloud import fields, tools
from yuancloud.addons.event.tests.common import TestEventCommon
from yuancloud.tools import mute_logger
class TestMailSchedule(TestEventCommon):
@mute_logger('yuancloud.addons.base.ir.ir... | [
"liuganghao@lztogether.com"
] | liuganghao@lztogether.com |
7d82abc23d5e3d4bf5e54cd6ec2da4a4d1a8768f | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02631/s475540632.py | 3a87c44b29ca2411c0463a78d1676b61c5e7616c | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 267 | py | N = int(input())
a = list(map(int, input().split()))
# XOR演算子 ^
# aの要素全てのXORを計算、それをSとする
S = 0
for aa in a:
S ^= aa
# i番目の番号はaiとSのXORで表される
ans = []
for ai in a:
ans.append(S ^ ai)
print(*ans) | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
8319e02dd8e51c0f3c972288a559d15a0f3bb1c5 | acd41dc7e684eb2e58b6bef2b3e86950b8064945 | /res/packages/scripts/scripts/common/Lib/plat-mac/Carbon/Cm.py | 81888a1e6189f6251d73285153430da7c7720a3a | [] | no_license | webiumsk/WoT-0.9.18.0 | e07acd08b33bfe7c73c910f5cb2a054a58a9beea | 89979c1ad547f1a1bbb2189f5ee3b10685e9a216 | refs/heads/master | 2021-01-20T09:37:10.323406 | 2017-05-04T13:51:43 | 2017-05-04T13:51:43 | 90,268,530 | 0 | 0 | null | null | null | null | WINDOWS-1250 | Python | false | false | 362 | py | # 2017.05.04 15:34:09 Střední Evropa (letní čas)
# Embedded file name: scripts/common/Lib/plat-mac/Carbon/Cm.py
from _Cm import *
# okay decompyling C:\Users\PC\wotmods\files\originals\res\packages\scripts\scripts\common\Lib\plat-mac\Carbon\Cm.pyc
# decompiled 1 files: 1 okay, 0 failed, 0 verify failed
# 2017.05.04 15... | [
"info@webium.sk"
] | info@webium.sk |
b3df535e0bf14619764330e153f9691f97ebfe7a | ae3df32afc258c80cb2ce504ce87fa5bb7740ea7 | /main/apps.py | a1c166fbd7a6ef9873d13d2341e00132f5d8b9dd | [] | no_license | chensandiego/elast-python | 622251d806b947899d74dc064c19193b418ac505 | 8c28a47acfc5ef540a017abcd786cf815591b163 | refs/heads/master | 2020-12-24T05:40:38.917432 | 2016-08-08T09:16:39 | 2016-08-08T09:16:39 | 65,190,208 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 240 | py | from __future__ import unicode_literals
from django.apps import AppConfig
from elasticsearch_dsl.connections import connections
class MainConfig(AppConfig):
name = 'main'
def ready(self):
connections.create_connection() | [
"chensandiego@gmail.com"
] | chensandiego@gmail.com |
03077baac22100638f1f73d6914d61d5790e636d | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03804/s359892659.py | cf5a2561cd5c03f89d2bfa0dc2d375e6139544c1 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 477 | py | n, m = map(int, input().split())
a = [""] * n
b = [""] * m
for i in range(n):
a[i] = input()
for i in range(m):
b[i] = input()
for i in range(n):
for j in range(n):
if i + m > n or j + m > n:
continue
flag = True
for k in range(m):
for l in range(m):
... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
d5ca2bcbd5de3c1b9c9bac46eab8058ddbdaa268 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_200/1005.py | d1785f14535df9f9f8739a47a08da1ea17308063 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 405 | py | import numpy as np
def solve(n, j):
front = 0
for i in range(1, len(n)):
if n[-i-1] > n[-i]:
n[-i-1] -= 1
front = i
if front:
n[-front:] = 9
if not n[0]:
n = n[1:]
print('Case #{}: {}'.format(j+1, ''.join(map(str, n))))
def main():
T = int(input())
for i in range(T):
solv... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
4b4fb06a5c7779a15bbde10c3ca456691d7aa16b | 2ed6ad4a736879a47d192159da45ca56610c089a | /tests/test_utils.py | 5322f50e74f0e19c141fd1adbdd2a5b05e92fb39 | [
"MIT"
] | permissive | poonyisaTH/gsheets-db-api | a82bd35984766697757cc96aa74a1281d948f019 | f023b32986d4da9a501fca8d435f2b6edc153353 | refs/heads/master | 2023-05-29T15:01:10.604324 | 2021-02-17T20:59:41 | 2021-02-17T20:59:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,952 | py | # -*- coding: utf-8 -*-
import unittest
from moz_sql_parser import parse
import pyparsing
from .context import format_gsheet_error, format_moz_error
class UtilsTestSuite(unittest.TestCase):
def test_format_moz_error(self):
query = 'SELECT ))) FROM table'
with self.assertRaises(pyparsing.ParseE... | [
"roberto@dealmeida.net"
] | roberto@dealmeida.net |
26c3ed7037c5e7c99c281a9602db0848de390886 | ce55c319f5a78b69fefc63595d433864a2e531b5 | /前后端分离-vue-DRF/houfen_DRF-projects/15day周末作业/booklogin/user/views.py | ea76a3b29e6788ab22cbcb4e135039d76dd5f722 | [] | no_license | Suijng/1809_data | a072c875e8746190e3b715e53f1afe3323f4666b | 45f8a57089f5c30ccc1a3cddb03b76dc95355417 | refs/heads/master | 2022-12-21T12:38:30.458291 | 2019-09-27T01:14:41 | 2019-09-27T01:14:41 | 211,207,071 | 0 | 0 | null | 2022-11-22T03:16:18 | 2019-09-27T00:55:21 | HTML | UTF-8 | Python | false | false | 7,016 | py | from django.shortcuts import render
# Create your views here.
from rest_framework.views import APIView
from rest_framework.response import Response
from user.serializers import ResgsterUserSerializer,CategorySerializer,\
BookDetailSerializer,BookSerializer,\
ChpaterListSerializer,ChpaterDetailSerializer
from ... | [
"1627765913@qq.com"
] | 1627765913@qq.com |
bcf4694b4be4de84974a88f8c1e0c68664a56527 | 4913fb7fd32c3dd0da53af7a012569ec2254b35a | /59.集合数据的操作.py | 75c83dbf6875876bad10856772cd2746191883a6 | [] | no_license | puhaoran12/python_note | 8a21954050ba3126f2ef6d5d1e4a2904df954b9b | b807e7b7dd90c87cee606f50421400c8f3d0ba03 | refs/heads/master | 2023-07-07T20:20:04.546541 | 2021-08-21T02:17:12 | 2021-08-21T02:17:12 | 398,439,725 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 325 | py | #交集intersection() 或者 &
s1={10,20,30}
s2={30,40,50}
print(s1.intersection(s2))
print(s1 & s2)
#并集union() 或者 |
print(s1.union(s2))
print(s1 | s2)
#差集difference() 或者 -
print(s1.difference(s2))
print(s1 - s2)
#对称差集symmetric_difference() 或者 ^
print(s1.symmetric_difference(s2))
print(s1 ^ s2)
| [
"276191374@qq.com"
] | 276191374@qq.com |
1265bb8736bd9b11afc120fcc3bdcb77428869ec | 29a4c1e436bc90deaaf7711e468154597fc379b7 | /modules/ieee/doc2/nextpow2.py | 7c5fcf15c55e96875561be4f21550ed813ecbc7a | [
"BSL-1.0"
] | permissive | brycelelbach/nt2 | 31bdde2338ebcaa24bb76f542bd0778a620f8e7c | 73d7e8dd390fa4c8d251c6451acdae65def70e0b | refs/heads/master | 2021-01-17T12:41:35.021457 | 2011-04-03T17:37:15 | 2011-04-03T17:37:15 | 1,263,345 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,923 | py | [{'functor': {'arity': '1',
'call_types': [],
'ret_arity': '0',
'rturn': {'default': 'typename nt2::meta::as_integer<typename boost::result_of<nt2::meta::floating(T)>::type, signed>::type'},
'type_defs': [],
'types': ['real_', 'unsigned_int_', 'signe... | [
"jtlapreste@gmail.com"
] | jtlapreste@gmail.com |
969ff18c3b0c3ebd06ccfc2dc0dfe97216e6a725 | 6a47ec6800610ea93479f91505e73a3eb4f34ae0 | /user/serviced.py | 74e25a9df84b86e320e670d436afb861e42769b5 | [] | no_license | risification/queue_project | 1158aac7bae3b04f98c106c23c27281c96bcaf41 | e85f9f2d1835f10a0247a569f88d4cb29803538a | refs/heads/master | 2023-04-26T08:05:25.573243 | 2021-06-07T21:03:47 | 2021-06-07T21:03:47 | 374,119,444 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 579 | py | from django.contrib.auth.models import User
from django.core.mail import EmailMessage
def mailing(username):
email_list = []
obj = User.objects.filter(is_superuser=True)
for user in obj:
email_list.append(user.email)
subjects = 'hi'
body = f'User with {username} register in database, pls c... | [
"sultangaziev01@bk.ru"
] | sultangaziev01@bk.ru |
5a4d8c674b599a2c01fdc8fd795bf0ea39b3d9b4 | 0ddcfcbfc3faa81c79e320c34c35a972dab86498 | /puzzles/orderly_queue.py | a373cf1f75c26e6261bdd30af8d0855a2660bb45 | [] | no_license | IvanWoo/coding-interview-questions | 3311da45895ac4f3c394b22530079c79a9215a1c | 1312305b199b65a11804a000432ebe28d1fba87e | refs/heads/master | 2023-08-09T19:46:28.278111 | 2023-06-21T01:47:07 | 2023-06-21T01:47:07 | 135,307,912 | 0 | 0 | null | 2023-07-20T12:14:38 | 2018-05-29T14:24:43 | Python | UTF-8 | Python | false | false | 1,048 | py | # https://leetcode.com/problems/orderly-queue/
"""
ou are given a string s and an integer k. You can choose one of the first k letters of s and append it at the end of the string..
Return the lexicographically smallest string you could have after applying the mentioned step any number of moves.
Example 1:
Input: s = ... | [
"tyivanwu@gmail.com"
] | tyivanwu@gmail.com |
7267956f1f7b465699fb043dc755525ce97b5ccf | 2c73882fc59ca85f4854a43bcda8cc9edd282b8d | /polls_api/views.py | 2664dfc220c7e377fed156deed7d18e979f75115 | [] | no_license | mjstealth/guide-to-backbonejs-with-django | 540236f3535ee171c3aa4c43a1be9394a8a7e4bc | e7d5016c800e1e0e282da0386cc6112d4eed63c1 | refs/heads/master | 2021-01-17T22:40:28.191509 | 2012-09-04T22:17:12 | 2012-09-04T22:17:12 | 5,679,419 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 990 | py | from django.shortcuts import get_object_or_404
from django.core.urlresolvers import reverse
from djangorestframework import views
from djangorestframework.response import Response
from polls.forms import PollForm
from polls.models import Poll
from .resources import PollResource
class PollResults (views.View):
def... | [
"mjumbewu@gmail.com"
] | mjumbewu@gmail.com |
42a8dac1509c16a1f9ee4746a23db2e89449bf64 | 11d265eba2ced9de43c339e4014c779b521320cd | /accounts/migrations/0004_auto_20200423_2253.py | eccb31bc3dd7e0a1872e9574429fc5cdc2edd129 | [] | no_license | Sloshpit/budget_old | d9271de625cd7e3aa66ccbec501b005e50cd2812 | a5603996b026542adb3bc8c578c03bcb843bea01 | refs/heads/master | 2022-04-23T08:42:43.377827 | 2020-04-25T14:40:39 | 2020-04-25T14:40:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 606 | py | # Generated by Django 3.0.5 on 2020-04-24 02:53
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('accounts', '0003_auto_20200423_2251'),
]
operations = [
migrations.RenameField(
model_name='account',
old_name='transaction_... | [
"neel.maheshwari@gmail.com"
] | neel.maheshwari@gmail.com |
f71387df36af9f3c0cb4897aa762c93b0ccbdb5f | 3f60b999ea7bda83c9586f75f52463dc20337f24 | /sensitive_user_portrait/weibo_rank/Offline_task.py | de919db3a2449e8b9e35b521386aa9943040a4ae | [] | no_license | jianjian0dandan/sensitive_user_portrait | 629e49ce71db92b50634bac9c828811cdb5381e9 | cacc30267ebc0e621b1d48d4f1206277a0f48123 | refs/heads/master | 2021-01-20T23:18:07.138057 | 2016-05-22T12:09:40 | 2016-05-22T12:09:40 | 42,869,287 | 0 | 0 | null | 2015-09-21T13:55:12 | 2015-09-21T13:55:11 | null | UTF-8 | Python | false | false | 6,454 | py | #-*-coding: utf-8 -*-
import datetime
import json
import time as TIME
from elasticsearch import Elasticsearch
from time_utils import ts2datetime, datetime2ts, ts2date
from global_utils import es_user_portrait as es
WEIBO_RANK_KEYWORD_TASK_INDEX = 'weibo_rank_keyword_task'
WEIBO_RANK_KEYWORD_TASK_TYPE = 'weibo_rank_ta... | [
"1257819385@qq.com"
] | 1257819385@qq.com |
43bf411f069beff4b058247c875c82e5f19f01bc | 4b1965b3d831ab54998973afb26f4327ed010336 | /info/user/views.py | 4edbf7fa25d4329141c2449cb244798b16174185 | [] | no_license | yc12192057/information11_mm | 7d353dfe61962eb0bd2c29b7f0b54a2a62953262 | 2e4052d130b200797aa8a57a0d37f8267d523a8b | refs/heads/master | 2020-03-21T10:22:23.558714 | 2018-06-24T02:34:25 | 2018-06-24T02:34:25 | 138,447,718 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,383 | py | from flask import current_app
from flask import g
from flask import request
from flask import session
from info.utils.image_storage import storage
from info import constants
from info import db
from info.models import Category, News
from info.utils.response_code import RET
from . import profile_blue
from flask import r... | [
"xwp_fullstack@163.com"
] | xwp_fullstack@163.com |
1fcb9a5bc116b70cacd5ddbd3646b35b3f6e0d8c | e0527bce5c53a196752d3a16adf50cb60754de5f | /05-How to Repeat Actions demos/02-dotty_dots.py | 47bb00a38d29385492c81d3cb4b98ea027472cab | [] | no_license | ARWA-ALraddadi/python-tutorial-for-beginners | ddeb657f419fbc176bea273bc9fb6b88d1894191 | 21cedfc47871ca4d25c2382464c60ab0a2121205 | refs/heads/master | 2023-06-30T20:24:30.688800 | 2021-08-08T08:22:29 | 2021-08-08T08:22:29 | 193,094,651 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,825 | py | #---------------------------------------------------------------------
#
# Dotty dots - Repeating actions with minor variations
#
# Up until now the only repetition we've seen has been the same action
# done many times. This simple demonstration shows how actions can
# be repeated with minor variations for each differ... | [
"noreply@github.com"
] | ARWA-ALraddadi.noreply@github.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.