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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
061aebdb29e7c6907a3a9ac112f56e81483271f8 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_156/832.py | 6c50802fc3b768a580b91d24aaf771150f9157d8 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,650 | py | #!/usr/bin/env python
import sys
from math import ceil, floor
def solve_naive_test(pancakes_per_plate, minute=0):
if not any(pancakes_per_plate):
return minute
else:
splits = xrange(len(pancakes_per_plate))
eaten_one = [(x - 1) if x > 0 else 0 for x in pancakes_per_plate]
sol... | [
"[email protected]"
] | |
db6b50f1fb9d0dd10bd09ef05b6d826b4e4dc87e | 91d1a6968b90d9d461e9a2ece12b465486e3ccc2 | /elbv2_read/ssl-policy_list_custom.py | 03504aaa68bf723809ae33af5c520e79b7bfbca0 | [] | no_license | lxtxl/aws_cli | c31fc994c9a4296d6bac851e680d5adbf7e93481 | aaf35df1b7509abf5601d3f09ff1fece482facda | refs/heads/master | 2023-02-06T09:00:33.088379 | 2020-12-27T13:38:45 | 2020-12-27T13:38:45 | 318,686,394 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,992 | py | #!/usr/bin/python
# -*- codding: utf-8 -*-
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
from common.execute_command import read_no_parameter_custom
# url : https://awscli.amazonaws.com/v2/documentation/api/latest/reference/elbv2/describe-ssl-policies.html
if __name_... | [
"[email protected]"
] | |
c7a70ffaa62499a456c09c3f1f3ef7cd0b05a611 | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /data/p2DJ/New/program/pyquil/startPyquil387.py | 06eb003d185853b93d56f5429d08368942bce8d7 | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/QDiff | ad53650034897abb5941e74539e3aee8edb600ab | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | refs/heads/main | 2023-08-05T04:52:24.961998 | 2021-09-19T02:56:16 | 2021-09-19T02:56:16 | 405,159,939 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,341 | py | # qubit number=2
# total number=20
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += H(0) # number=1
pr... | [
"[email protected]"
] | |
1c84b99c1dbcc510063d63711b2450fd162f9f19 | 4f408d65db60911f56110c351cb3b64835e0c5fb | /caffe2/python/predictor/predictor_exporter_test.py | 61e3fb0a5ad87ad8bfa994bb3bffe2727df0a74f | [
"Apache-2.0",
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"BSD-2-Clause"
] | permissive | KeyKy/caffe2_SSD | a02c065aef2dbcfd00faae8be0440d7a4ff0fb76 | 7235688ea5e212dbe8609d780dd94c8c7d9fef54 | refs/heads/master | 2021-09-18T14:36:11.247427 | 2018-07-10T09:59:35 | 2018-07-10T09:59:35 | 89,928,918 | 8 | 5 | null | 2018-07-27T02:14:38 | 2017-05-01T14:04:20 | Jupyter Notebook | UTF-8 | Python | false | false | 4,555 | py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import tempfile
import unittest
import numpy as np
from caffe2.python import cnn, workspace, core
from caffe2.python.predictor_constants import predictor_constants as pc... | [
"[email protected]"
] | |
e79c9f4bec7946370a9fb9d8c7ec083d5df103b7 | f02485de5a101f3b69a45b2c4e71bd950ee55eba | /Z_other/del/ncPreprocessNew.py | f15f0e79cda38afbbe7ca272efe385042833c0f5 | [] | no_license | newjokker/PyUtil | ef4266b0ca32157f9de6e2cac1b1a10647190d99 | 32e64be10a6cd2856850f6720d70b4c6e7033f4e | refs/heads/master | 2020-11-28T00:19:02.073391 | 2019-12-23T02:07:40 | 2019-12-23T02:07:40 | 229,654,616 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,221 | py | # -*-coding:utf-8 -*-
import os
import sys
import datetime
import xml.dom.minidom
from xml.dom.minidom import Document
import datetime
# from Decorator.time_it import time_this
class NcFileToTiff(object):
"""传入 nc 文件,输出 tiff 文件"""
def __init__(self):
# 需要处理的文件
self.files_to_transform = []
... | [
"[email protected]"
] | |
a3b82adff7f91cff3f104899144e29691bc4658b | cd40b7cc395f36740000ed4a4144b1c0666ab0fd | /tests/test_hstrat/test_auxiliary_lib/test_parse_from_numeral_system.py | 16155f656f410b5cdd20c314308e9e350596ab27 | [
"MIT"
] | permissive | mmore500/hstrat | 94fd22c86a87a5707590b9398ef679444ed82d6d | b2d2caded1db5e2dc681d9f171d7c74b322c55c3 | refs/heads/master | 2023-08-31T03:36:44.457576 | 2023-08-25T14:39:29 | 2023-08-25T14:39:29 | 464,531,144 | 5 | 2 | NOASSERTION | 2023-08-25T13:07:52 | 2022-02-28T15:11:45 | Python | UTF-8 | Python | false | false | 2,824 | py | import random
import string
import pytest
from hstrat._auxiliary_lib import (
parse_from_numeral_system,
render_to_numeral_system,
)
@pytest.fixture
def alphabet():
return string.digits + string.ascii_lowercase
def test_parse_from_numeral_system(alphabet):
assert parse_from_numeral_system("0", alp... | [
"[email protected]"
] | |
04d2d4b1fd96ad5507c4890234ccd8f5a3e0cd22 | 4d2a007fb3810d0b1de676d0193eb24cb0134180 | /site.py | 3d10e3e877d02cd1ca4193ab1643d66aed39797e | [] | no_license | Rossonero/qlin | 241a822402beb4b05fe69f024978148a5758a765 | 02cc017daf3e540cfd9b5bfe7e021c176d5e90e1 | refs/heads/master | 2021-01-18T00:26:45.747983 | 2012-02-13T01:43:12 | 2012-02-13T01:43:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 446 | py | # -*- coding: utf-8 -*-
def Site_infor(request):
'''
站点信息展示前台
将所有信息展示开来
'''
t = get_template('site_infor.html')
#从数据库中将信息进行展示
cx = sq.connect('store/site.sqlite')
cu = self.cx.cursor()
#开始查找信息
strr = "select * from site"
cu.execute(strr)
print cu.fetchone()
html = t.... | [
"[email protected]"
] | |
aa3b3557c2779676f7b441397483f7569c7d4901 | 9ca6885d197aaf6869e2080901b361b034e4cc37 | /ElectroWeakAnalysis/ZReco/python/zToTauTau_ETau_EventContent_AODSIM_cff.py | ff21d1bbfb2a6f565db5f6386bf52e4f0df33be0 | [] | no_license | ktf/cmssw-migration | 153ff14346b20086f908a370029aa96575a2c51a | 583340dd03481dff673a52a2075c8bb46fa22ac6 | refs/heads/master | 2020-07-25T15:37:45.528173 | 2013-07-11T04:54:56 | 2013-07-11T04:54:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 449 | py | import FWCore.ParameterSet.Config as cms
from Configuration.EventContent.EventContent_cff import *
from ElectroWeakAnalysis.ZReco.zToTauTau_ETau_EventContent_cff import *
AODSIMZToTauTauETauEventContent = cms.PSet(
outputCommands = cms.untracked.vstring()
)
AODSIMZToTauTauETauEventContent.outputCommands.extend(AOD... | [
"[email protected]"
] | |
3a2079455f632c92b4b8d209389e7bd7bd73ee00 | b4a4fa30ae3f857e209356d1a28273b3cbbdc3e3 | /api_basic/views.py | 3b09cd7401a291568f6dc1dda8cbc8a97862ad2f | [] | no_license | sahin88/Django_Rest_Framework_Account_Article_RestAPI | c0fd4b97eb5629c3b65781663dd82edc6f0de384 | f5d7d12c04852392583f881f1e334d71c4582c4d | refs/heads/master | 2023-03-25T19:02:17.427294 | 2020-04-21T09:26:51 | 2020-04-21T09:26:51 | 257,544,520 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,326 | py | from django.shortcuts import render
from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponse ,JsonResponse
from rest_framework.parsers import JSONParser
from .models import Article
from .serializers import ArticleSerializer
from rest_framework.decorators import api_view
from rest_fram... | [
"[email protected]"
] | |
141fb7da59e137862d2a34b048d6dee9113a4465 | 6e601105760f09d3c9f5306e18e4cf085f0bb4a2 | /10000-99999/10868.py | f86c7f9e367022589178de78365c22587a18d80c | [] | no_license | WSJI0/BOJ | 6412f69fddd46c4bcc96377e2b6e013f3bb1b524 | 160d8c13f72d7da835d938686f433e7b245be682 | refs/heads/master | 2023-07-06T15:35:50.815021 | 2023-07-04T01:39:48 | 2023-07-04T01:39:48 | 199,650,520 | 2 | 0 | null | 2020-04-20T09:03:03 | 2019-07-30T12:48:37 | Python | UTF-8 | Python | false | false | 768 | py | '''
10868번
최솟값
'''
import sys
input=sys.stdin.readline
def init(start, end, node):
if start==end:
tree[node]=a[start]
return tree[node]
mid=(start+end)//2
tree[node]=min(init(start, mid, node*2),init(mid+1, end, node*2+1))
return tree[node]
def findMin(start, end, node, left, right):... | [
"[email protected]"
] | |
451f6e60c661a8a37b1823007d8f99a173a8ec2a | 60139399c13b87c150573808d23c8f00542672a2 | /admux/mixins/websites.py | 4d3b238caf36bfa27f567f0d7fc5337f55b466db | [] | no_license | adverserve/admux_client | d4781501b5e8486a072eb3dc6c19580292c517f8 | 1c633072e75d2f3be660565825a5f77c9699e68c | refs/heads/master | 2021-01-10T20:29:45.695490 | 2013-10-24T14:52:21 | 2013-10-24T14:52:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 955 | py | # coding: utf-8
from admux import helpers
class WebsitesClientMixin(object):
def websites(self, links=None, expand=None):
"""
http://admux-demo.trust-box.at/developer/api/v1/get/websites/
links: Boolean
expand: array of strings
"""
url = '/websites'
params... | [
"[email protected]"
] | |
d3a372d9cda192f974f6edac19afaf207d458e26 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02785/s474912270.py | 3746381a7a22f2e9f041861db8ba3b5bb71bc13a | [] | 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 | 378 | py | import sys
input = sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def main():
mod=10**9+7
N,K=MI()
h=LI()
h.sort()
if K>=N:
print(0)
exit()
for i in range(K):
... | [
"[email protected]"
] | |
34e433c211df58f96eb9e335278588ea0f8e6417 | 5ddb3d3095ae782671d4592549e1fec38b73eb84 | /spacy/tests/pipeline/test_functions.py | fbb88ade26a6127552ab9bcb9f6ab40c4e39d3ef | [
"MIT"
] | permissive | Ali-Tahir/spaCy | c1ea9c5389044bc1e1f0e30f176b9b6e60a10690 | 9e210fa7fdb8e376655e7a7ab7debd3ffd718a63 | refs/heads/master | 2020-08-30T02:27:16.538275 | 2019-10-28T22:59:03 | 2019-10-28T22:59:03 | 218,234,283 | 0 | 0 | MIT | 2020-02-09T06:47:46 | 2019-10-29T08:05:03 | null | UTF-8 | Python | false | false | 882 | py | # coding: utf-8
from __future__ import unicode_literals
import pytest
from spacy.pipeline.functions import merge_subtokens
from ..util import get_doc
@pytest.fixture
def doc(en_tokenizer):
# fmt: off
text = "This is a sentence. This is another sentence. And a third."
heads = [1, 0, 1, -2, -3, 1, 0, 1, -2... | [
"[email protected]"
] | |
eff19506d086bf10caf3a7ff7cc64b66606e87dd | 888899f0cb3e6e7b28a9de39001a1fd1c177cd35 | /COMPLETE PYTHON-3 COURSE/Chapter-19-READ_WRITE_CSV_FILES/read_write_csv_simultanously.py | 4d67f080dfecfeb586057bc4ec3209854e177e35 | [] | no_license | VivakaNand/COMPLETE_PYTHON_3 | ef162d71d3a44bf661fcc1a8aacce31e7953cd7c | b3b835afe7671fdc3d29d912650fd4ccd3bc83f6 | refs/heads/master | 2023-02-04T10:13:41.881939 | 2020-12-23T08:30:51 | 2020-12-23T08:30:51 | 323,839,528 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 583 | py | # reader, DictReader
# writer, DictWriter
from csv import DictWriter, DictReader
with open('final.csv', 'r') as rf:
with open('file2.csv', 'w',newline='') as wf:
csv_reader = DictReader(rf)
csv_writer = DictWriter(wf, fieldnames=['first_name','last_name','age'])
csv_writer.writeheader()
... | [
"[email protected]"
] | |
1a7330518eff453cd30004ae2fb01e90bfe63fbe | 80616a1bfacc2081d983c3d8ec5b3f55295a323b | /serial_coms_list.py | 2bee4f29591ba132b7218896bc837498d8e321c6 | [] | no_license | choyai/kis-personal-space-bot | 47a681b679b7b6caf2c3b10124603e4475e3b73b | 8dbce0b6cd88a1b326a2e9e4c9b3cf5120a083ee | refs/heads/master | 2020-06-07T11:19:19.921167 | 2019-06-24T07:14:15 | 2019-06-24T07:14:15 | 193,010,563 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,085 | py | # from scipy.spatial import distance as dist
# from imutils import perspective
# from imutils import contours
import numpy as np
# import argparse
# import imutils
# import cv2
import serial
import time
import struct
# from InverseKinematics import *
# from Graph import astar
import pickle
from math import pi
from rand... | [
"[email protected]"
] | |
1de6c30ae80ba4c72a4ba8bcee65ddbea304c734 | 747142c31420254647caf85cc8532f4d13b00146 | /django-web/bare-bones-web/adoptions/adoptions/models.py | 96eccf0f66d1489ffac826247486abafdc94a5ca | [] | no_license | jankidepala/machine-learning-IOT | fdf5f9b9c767405a940b1963d5f68b219e437c51 | 125bac2a3a023779e79f89dcf4b7304e6e2601ae | refs/heads/master | 2022-11-19T05:35:50.180173 | 2020-07-25T08:15:28 | 2020-07-25T08:15:28 | 107,033,248 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 506 | py | from django.db import models
# Create your models here.
class Pet(models.Model):
name = models.CharField(max_length=101)
submitter = models.CharField(max_length=101)
species = models.CharField(max_length=30)
breed = models.CharField(max_length=30, blank=True)
name = models.CharField(max_length=101)... | [
"[email protected]"
] | |
140216cf494403c143fccbc18bd45cf02c208cdb | 789a540bbb79c334cbeaf3687876bfd939e4290b | /app/handlers/private/admin/message/menu/message_distribution/distribution_options/wait_confirm_activate_schedule.py | d89fe3846c47add5b6d184ed3e7278c4db191b2a | [] | no_license | ExissBrr/TRIGON-GARANT-BOT | 2cc96f5f6f195f4e76c164db4f8acafbfa5b7662 | 812acf060eb92e6fad21568a75e6dba7ce0da4d9 | refs/heads/main | 2023-07-04T18:22:43.507453 | 2021-08-17T14:51:30 | 2021-08-17T14:51:30 | 392,725,437 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 813 | py | from aiogram.dispatcher import FSMContext
from aiogram.types import Message
from app.data import text
from app.loader import dp
from app.states.private.message_distribution import MessageSendingStates
from app.utils.bot import send_main_keyboard
from app.utils.db_api.models.messages_for_sending import MessageForSendin... | [
"[email protected]"
] | |
faded2f996b520e49df380a399e225a2a20919d5 | f34219ce57fbe6b446fb4f1aa966f136a9b3bf42 | /ex26.py | 6dc076019fe108fa44d2e7b17af7da7080d86319 | [] | no_license | DikranHachikyan/python-programming-20200323 | 467f60c07ac47e4146e63967eeb1acb76b8dd21c | e6d6185561969fc478caaedcd0981476d56d5c5b | refs/heads/master | 2021-04-20T09:52:25.151484 | 2020-04-09T07:24:33 | 2020-04-09T07:24:33 | 249,673,012 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 370 | py |
# 1. декларация
def addNumbers(a, b, c = None):
res = 0
if c:
res = a + b + c
else:
res = a + b
return res
if __name__ == '__main__':
# 2. извикване
x, y = 7, 8
r = addNumbers(x,y)
print(f'{x} + {y} = {r}')
z = 10
r = addNumbers(x, y, z)
print(f... | [
"[email protected]"
] | |
01987f0ad902f03e4f8143a9902372ec5a23fdac | 100802fd56febbe28e11d45802e0ad661a9b98c4 | /Community/migrations/0025_auto_20170917_1324.py | b00847fda82521674abe2ec4ce8c57358fab7431 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | ByrdOfAFeather/AlphaTrion | efc4cfcfa246adde5a0ce84eb5e295c0c61722f5 | 90b00b8f4e4c7fe3c495a5ded14b47c3210119ea | refs/heads/master | 2021-01-22T07:35:43.403968 | 2017-12-03T15:50:41 | 2017-12-03T15:50:41 | 102,306,857 | 0 | 2 | null | 2017-11-12T18:32:35 | 2017-09-04T01:39:45 | Python | UTF-8 | Python | false | false | 502 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-09-17 17:24
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('Community', '0024_merge_20170906_2028'),
]
operations = [
migrations.AlterModelOpti... | [
"[email protected]"
] | |
8f4684429d545ecf7164585be6213989c7b40f50 | 15581a76b36eab6062e71d4e5641cdfaf768b697 | /Topics/Bit Manipulation/Hamming Distance.py | 0f20d3169bb1b5a3f103505b9745db2a91f036ec | [] | no_license | MarianDanaila/Competitive-Programming | dd61298cc02ca3556ebc3394e8d635b57f58b4d2 | 3c5a662e931a5aa1934fba74b249bce65a5d75e2 | refs/heads/master | 2023-05-25T20:03:18.468713 | 2023-05-16T21:45:08 | 2023-05-16T21:45:08 | 254,296,597 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,147 | py | # Approach 1: Just check every bit in both numbers and increment when they are different
class Solution:
def hammingDistance(self, x: int, y: int) -> int:
hamming_distance = 0
while x != 0 or y != 0:
if x % 2 != y % 2:
hamming_distance += 1
x = x >> 1
... | [
"[email protected]"
] | |
81043998a660fac47d3cc846d5dcfef5ca7aba85 | 1ef56dcfef70ee14df8956eedd171f74406594af | /cms/dal/content_dal.py | 6377504eafc1dd0140adba7c9c999684394a5e50 | [] | no_license | journeyends/webtest | 6c54ff19e01cd0cd99a34bcae55dd5701abf132f | 2a24c6d7c52aa627edfbba3dd5eb9ccc16abe9fb | refs/heads/master | 2020-04-17T07:38:52.873722 | 2019-03-21T09:36:50 | 2019-03-21T09:36:50 | 166,378,280 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 665 | py | from cms.entity.content_entity import ContentModel
class ContentDal:
def getListByCondition(self, channelId, categoryId):
search_dict = dict()
search_dict['is_on'] = 1
if channelId is not None and int(channelId) > 0:
search_dict['channel_id'] = int(channelId)
if categor... | [
"[email protected]"
] | |
995de2292dda0406dc843356accff4f284d58da4 | 5ade44090b99ba19edd5cc0b07e4ebf1f8cc416e | /introduction.to.programming.with.turtle/5-1-1.45Tree.py | f06665fd7736a2cfefeee5d89c8d7619611ac0e3 | [
"MIT"
] | permissive | Mito445/programming_with_python | af2f201fc3f13cab88fdaa708ecda6da05ad1b46 | 1114eaa7432ea8581d880bcebd1813a9fb873cce | refs/heads/master | 2020-05-27T13:00:53.085344 | 2019-05-21T07:59:18 | 2019-05-21T07:59:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 311 | py | from easygraphics.turtle import *
def branch(len, level):
if level == 0:
return
fd(len)
lt(45)
branch(len / 2, level - 1)
rt(90)
branch(len / 2, level - 1)
lt(45)
bk(len)
create_world(800, 600)
set_speed(100)
pu()
bk(200)
pd()
branch(200, 5)
pause()
close_world()
| [
"[email protected]"
] | |
f063629eadd4d9ceba806ccfa8b53d59a11e2640 | 1a639d185f9c883b7bebf33c577c58b22ac93c7e | /tkinter_learn/54_bind_multiple.py | bfd735893e6af94287c8c1d035feacf70951cf2d | [] | no_license | gofr1/python-learning | bd09da5b5850b1533a88b858690ed4380b55d33e | 19343c985f368770dc01ce415506506d62a23285 | refs/heads/master | 2023-09-02T15:42:27.442735 | 2021-11-12T10:17:13 | 2021-11-12T10:17:13 | 237,828,887 | 0 | 0 | null | 2021-11-12T10:17:14 | 2020-02-02T20:03:42 | Python | UTF-8 | Python | false | false | 696 | py | from tkinter import Tk, mainloop
from tkinter import ttk
root = Tk()
label0 = ttk.Label(root, text='Label 0')
label1 = ttk.Label(root, text='Label 1')
label0.pack()
label1.pack()
label0.bind('<ButtonPress>', lambda e: print('<ButtonPress> Label'))
label0.bind('<1>', lambda e: print('<1> Label'))
root.bind('<1>', l... | [
"[email protected]"
] | |
22c0cf9ad666b05c4b4de4efde05cbcbc5637ef7 | 32cb84dd41e4be24c065bb205f226f9b121a6db2 | /swimmingpool/apps.py | 858653df0fdd5d3f7907fc3a24965f943afd53a9 | [] | no_license | InformatykaNaStart/staszic-sio2 | b38fda84bd8908472edb2097774838ceed08fcfa | 60a127e687ef8216d2ba53f9f03cfaa201c59e26 | refs/heads/master | 2022-06-29T11:09:28.765166 | 2022-06-13T21:56:19 | 2022-06-13T21:56:19 | 115,637,960 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 140 | py | from __future__ import unicode_literals
from django.apps import AppConfig
class SwimmingpoolConfig(AppConfig):
name = 'swimmingpool'
| [
"[email protected]"
] | |
4791c02757534b823afff98e8e1f831eef411ee8 | 0cad32e2abd77ba43150b6e6a5f3a056f5d0cb13 | /rec_test/spark_test2.py | 93e887aa7a7d7ee6e6a5cb6a88eb79beec3a727a | [] | no_license | luohuayong/spark | 73cf3720e588cf0c6a1d2f9f6c05387ac8d45295 | 1ff2180ac132405796daa8e5664ec4272f64a2f6 | refs/heads/master | 2020-04-06T06:53:58.201572 | 2016-08-24T11:21:24 | 2016-08-24T11:21:24 | 63,468,310 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 734 | py | from pyspark.mllib.recommendation import ALS,Rating
from pyspark import SparkContext
from pyspark.sql import SQLContext,Row
import os
os.environ['SPARK_CLASSPATH'] = "/home/leo/spark/lib/postgresql-9.3-1103.jdbc41.jar"
sc = SparkContext("local[2]","first spark app")
sqlContext = SQLContext(sc)
url = "jdbc:postgresql... | [
"[email protected]"
] | |
2f45c288c1a0d41d6ff5a1c1d40c94d3c9c32698 | 2e86ab87cb86ae4ffed162bc3e1109da7b362915 | /supervisor/dbus/rauc.py | 0a29112edaff028d4afed4370813fd5ff60e637c | [
"Apache-2.0"
] | permissive | swipswaps/supervisor | c5cae4ecad4d9bc53191c3882f4337d3edc5219a | 2d294f68418fbbcdbad776cdd9c614ef952074c4 | refs/heads/main | 2023-01-24T13:18:51.463358 | 2020-11-30T17:00:12 | 2020-11-30T17:00:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,321 | py | """D-Bus interface for rauc."""
import logging
from typing import Optional
from ..exceptions import DBusError, DBusInterfaceError
from ..utils.gdbus import DBus
from .const import (
DBUS_ATTR_BOOT_SLOT,
DBUS_ATTR_COMPATIBLE,
DBUS_ATTR_LAST_ERROR,
DBUS_ATTR_OPERATION,
DBUS_ATTR_VARIANT,
DBUS_NAM... | [
"[email protected]"
] | |
8882c1a68a42f5b8e201b5424ed071c14c1c054b | 255e19ddc1bcde0d3d4fe70e01cec9bb724979c9 | /dockerized-gists/6737282/snippet.py | 5c2d162fb0a8a82270d9ca2decf243da38c25c92 | [
"MIT"
] | permissive | gistable/gistable | 26c1e909928ec463026811f69b61619b62f14721 | 665d39a2bd82543d5196555f0801ef8fd4a3ee48 | refs/heads/master | 2023-02-17T21:33:55.558398 | 2023-02-11T18:20:10 | 2023-02-11T18:20:10 | 119,861,038 | 76 | 19 | null | 2020-07-26T03:14:55 | 2018-02-01T16:19:24 | Python | UTF-8 | Python | false | false | 638 | py | """
Installs your SSH key on other hosts. A fabfile for lazy people.
"""
from fabric.api import task, run, put, env, cd
# Use sh instead of bash.
env.shell = '/bin/sh -l -c'
@task
def add_ssh_key(identity='~/.ssh/id_rsa.pub'):
# Copy the key over.
REMOTE_PATH = '~/id.pub'
put(identity, REMOTE_PATH)
... | [
"[email protected]"
] | |
a13e095a11f32454452ddb7811aeced0983a69bb | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /data/p3BR/R2/benchmark/startQiskit269.py | 0d004daf589a46c1043373aa682a4e2930b9c167 | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/QDiff | ad53650034897abb5941e74539e3aee8edb600ab | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | refs/heads/main | 2023-08-05T04:52:24.961998 | 2021-09-19T02:56:16 | 2021-09-19T02:56:16 | 405,159,939 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,721 | py | # qubit number=3
# total number=54
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collections import Counter
from... | [
"[email protected]"
] | |
c93c551d735e66aaea519dea5549a52276049c22 | cba54fcdf5333aec90a70a6495f962f1c34818e9 | /Data/ColorLUT/GenerateDefault.py | f2b8d3b2f8c34cee19657f30bf1e1ade794f1c65 | [
"WTFPL"
] | permissive | 2lost4u/RenderPipeline | f89fcb1b40e6fd5e5d001b311c8d6c8048a05c13 | 12131b115775f97927633d71832af65b99eebd09 | refs/heads/master | 2020-04-30T12:36:43.617264 | 2015-10-03T15:39:22 | 2015-10-03T15:39:22 | 44,781,091 | 1 | 0 | null | 2015-10-23T00:23:48 | 2015-10-23T00:23:47 | null | UTF-8 | Python | false | false | 340 | py |
from panda3d.core import PNMImage, Vec3
lutSize = 32
image = PNMImage(lutSize * lutSize, lutSize, 3, 2**16 - 1)
for r in xrange(lutSize):
for g in xrange(lutSize):
for b in xrange(lutSize):
image.setXel(r + b * lutSize, g, r / float(lutSize), g / float(lutSize), b / float(lutSize))
image.... | [
"[email protected]"
] | |
b812bca292f39c58ce9c994d00b04ae5e4ff59e6 | 4a2aed648b3890e51732ac7d9ceaaeabfd985f99 | /Linked list/Link2Doubly..py | aca4d43528d5c3464374a148787f7ce4e5e42eb1 | [] | no_license | bhatnagaranshika02/Data-Structures-Python | f544adeebc8af3b313354699dddd85af59889f4c | 74de8a1c895b6ce18094d6c50beaee15a2715404 | refs/heads/master | 2023-03-13T06:47:20.247213 | 2021-03-01T13:58:53 | 2021-03-01T13:58:53 | 258,513,920 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,565 | py | class Node:
def __init__(self,data,prev=0,next=0):
self.data=data
self.prev=prev
self.next=next
class linked_list:
def __init__ (self):
self.start=None
def addfront(self,data):
new_node=Node(data)
new_node.prev=None
new_node.next=self.start
... | [
"[email protected]"
] | |
52373f03597ca24ce183d53200144aa87abed7a4 | 9cda2257468d0ef2f7706d4d07099a7b6d897f02 | /letecode/121-240/121-144/139.py | 356b9d3a4011116e168da519c86020449cab5cc9 | [] | no_license | hshrimp/letecode_for_me | 4ba4031803687d7a309da9af4f003a328b48e53e | 6dc5b8968b6bef0186d3806e4aa35ee7b5d75ff2 | refs/heads/master | 2021-12-11T07:37:22.323713 | 2021-08-23T08:16:00 | 2021-08-23T08:16:00 | 204,437,378 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,962 | py | #!/usr/bin/env python
# encoding: utf-8
"""
@author: wushaohong
@time: 2020-05-27 11:25
"""
"""139. 单词拆分
给定一个非空字符串 s 和一个包含非空单词列表的字典 wordDict,判定 s 是否可以被空格拆分为一个或多个在字典中出现的单词。
说明:
拆分时可以重复使用字典中的单词。
你可以假设字典中没有重复的单词。
示例 1:
输入: s = "leetcode", wordDict = ["leet", "code"]
输出: true
解释: 返回 true 因为 "leetcode" 可以被拆分成 "leet code"... | [
"[email protected]"
] | |
b04bd6e4fc179a3156752e3180ad68f515dc2426 | d52cb4c2e880875944b14da0b8a9542235942ac8 | /geeksforgeeks/strings/13_remove_common_characters_and_concatenate.py | f25b216069ea2a31f0095869d2573c87de6a3fb4 | [] | no_license | saparia-data/data_structure | fbd61535b68f92143b2cb2679377c0f56f424670 | 2e8700cfdaeefe0093e5b4fb2704b1abcd300d02 | refs/heads/master | 2023-05-08T18:54:52.250941 | 2021-06-04T05:44:29 | 2021-06-04T05:44:29 | 296,071,146 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,919 | py | '''
Given two strings s1 and s2. Modify string s1 such that all the common characters of s1 and s2 is to be removed
and the uncommon characters of s1 and s2 is to be concatenated.
Note: If no modification is possible print -1.
Input:
The first line consists of an integer T i.e number of test cases.
The first line of... | [
"[email protected]"
] | |
2706d20d8b42846ef0a92769ab0e1862cc9f67d6 | 7a11b6d4063685cb08b074ac8d08ab6e1d045ff5 | /src/11_list_filter_map.py | fe22c07e7451ee77e9be1a6eb40d958c54a0fd5e | [] | no_license | slavaider/python | 8a9f5769bd519e0e270c5814ef46ec5c653ab7c1 | f98896b8e9dd93fe7d2b4a495b67704ef5f08373 | refs/heads/master | 2023-03-02T15:12:56.218871 | 2021-02-07T16:20:08 | 2021-02-07T16:20:32 | 301,493,207 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 329 | py | def square(number):
return number * number
def is_a(age): return age > 18
if __name__ == '__main__':
list1 = [1, 2, 3, 4, 5]
list2 = list(map(square, list1))
print(list2)
l1 = [10, 12, 19, 20]
l2 = list(filter(lambda age: age > 18, l1))
print(l2)
l2 = [i for i in l1 if is_a(i)]
p... | [
"[email protected]"
] | |
230d7556304b6d1e9e84253b384f89a7032e7e7c | 04ea3d2a060151fc21179ca28373bfa516adcbfe | /deadly_corridor_scenario/data_preprocess.py | 80aad30a1cf5cd87fb70ff51165b4c1f57794052 | [] | no_license | zhouziqunzzq/vizdoom-naive-agent | 394bdea6f88272603a5e6bf8b012e719d6f24701 | 4406b280567eef169d448fa77266812094aea736 | refs/heads/main | 2023-03-04T19:21:13.129770 | 2021-02-06T11:27:21 | 2021-02-06T11:27:21 | 333,699,839 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,593 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @File : data_preprocess.py
# @Author: harry
# @Date : 1/27/21 7:05 PM
# @Desc : Data preprocessor of raw play data
import numpy as np
import glob
import os
import pickle
import matplotlib.pyplot as plt
import matplotlib.colors as colors
from constants import *
from t... | [
"[email protected]"
] | |
cd0710aad9c6efbdf3cb3e9dcc4e8904d93f7c7a | 0754e2e7aa1ffb90b54d563ce5a9317e41cfebf9 | /Algorithm/Programmers/예선문제_0912_1.py | bf343580cadc687be1aa13eba4c93677632489b6 | [] | no_license | ChaeMyungSeock/Study | 62dcf4b13696b1f483c816af576ea8883c57e531 | 6f726a6ecb43387e4a3b9d068a9c491b115c74c0 | refs/heads/master | 2023-01-24T20:59:52.053394 | 2020-12-07T14:54:34 | 2020-12-07T14:54:34 | 263,255,793 | 2 | 3 | null | null | null | null | UTF-8 | Python | false | false | 1,832 | py | import re
def solution(new_id):
new_id = new_id.lower()
new_id = re.sub('[^[a-z0-9-_.]','',new_id)
c = 0
while 1:
if len(new_id) >=2 and new_id[c]=='[':
new_id = new_id[:c] + new_id[c+1:]
c -=1
elif len(new_id) == 1 and new_id[c] == '[':
... | [
"[email protected]"
] | |
24ea2a5d3090b4d31a336fddafb320974492ea58 | f13acd0d707ea9ab0d2f2f010717b35adcee142f | /ABC/abc151-abc200/abc154/a.py | 89362b6b10c2cd6de4bd06bbc15544c91d7f434a | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | KATO-Hiro/AtCoder | 126b9fe89fa3a7cffcbd1c29d42394e7d02fa7c7 | bf43320bc1af606bfbd23c610b3432cddd1806b9 | refs/heads/master | 2023-08-18T20:06:42.876863 | 2023-08-17T23:45:21 | 2023-08-17T23:45:21 | 121,067,516 | 4 | 0 | CC0-1.0 | 2023-09-14T21:59:38 | 2018-02-11T00:32:45 | Python | UTF-8 | Python | false | false | 248 | py | # -*- coding: utf-8 -*-
def main():
s, t = input().split()
a, b = map(int, input().split())
u = input()
if s == u:
print(a - 1, b)
else:
print(a, b - 1)
if __name__ == '__main__':
main()
| [
"[email protected]"
] | |
e523c17f61fc2ea477066fd4d887bc7191e705e5 | d78309688232cf5f411af4eff6b466c8cd30846b | /xutils/examples/tushare_live_feed.py | c9ef42c14431ca68089a602f29c006cfe727850f | [
"Apache-2.0"
] | permissive | huangzhangfeng/x-utils | 5f8c1148789cf3dbbe6dff149562e3fd50c17c7a | 291d92832ee0e0c89bc22e10ecf2f44445e0d300 | refs/heads/master | 2020-06-15T03:31:33.613290 | 2018-04-16T05:43:06 | 2018-04-16T05:43:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 520 | py | # -*- coding: utf-8 -*-
from xutils.bar_builder import (LiveFeed,
BarFrequency)
import tushare as ts
if __name__ == '__main__':
live_feed = LiveFeed(tickers=['zh500'],
frequency=BarFrequency.MINUTE,
live_quote_arg_func=ts.get_real... | [
"[email protected]"
] | |
61a35ed86f7dcce431d0db4afc8fc306fcacbf12 | c430b5b5b45f2fe94f7110fd56922bcf55c61269 | /ixia/hlapi/4.98.122.39/library/common/ixiangpf/python/ixiangpf_commands/emulation_lacp_info.py | 81a80b9fc2ad01c12e3b5d986294a671fe9f9876 | [] | no_license | rayjiang2013/RF | 08189671398095d864d41ea5a3af1958e8eb6252 | 936d32629061c4685d8e18b5cf9f001255514ec1 | refs/heads/master | 2016-08-09T11:38:51.990559 | 2016-01-06T20:20:02 | 2016-01-06T20:20:02 | 47,857,352 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,096 | py | # -*- coding: utf-8 -*-
import sys
from ixiaerror import IxiaError
from ixiangpf import IxiaNgpf
from ixiautil import PartialClass, make_hltapi_fail
class IxiaNgpf(PartialClass, IxiaNgpf):
def emulation_lacp_info(self, mode, **kwargs):
r'''
#Procedure Header
Name:
emulation_lacp_info
Description:
... | [
"[email protected]"
] | |
bfd39877647de6747a51adede1939f0ff10c6d7c | 871e1b0295c0fbbfca8191236d674866cf62ff01 | /TrainEffNetB5_5FP_crossentropyloss_Block5_2FC_nonCrop_3.py | a4f1aba22a0059253ac6987c0239cd90c9ad026d | [] | no_license | Peckkie/USAI_ABnormal_Screening | ce31a813e9303a7d43def912ab731cc633268cb7 | 82cd63ac9ab72fbe68eae254c15c7bf7ef906022 | refs/heads/master | 2023-02-16T13:32:33.678500 | 2021-01-07T02:36:35 | 2021-01-07T02:36:35 | 277,981,638 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,871 | py | import PIL
from keras import models
from keras import layers
from tensorflow.keras import optimizers
import os
import glob
import shutil
import sys
import numpy as np
from skimage.io import imread
import matplotlib.pyplot as plt
import os
from tensorflow.keras import callbacks
import pandas as pd
os.environ["CUDA_VISI... | [
"[email protected]"
] | |
51c6159b731d8e3312ebfcff8878205082045ed9 | f921ba30c773da9772293f69aa88c87b23929cc6 | /src/main.py | 80b5bb6dcf36d3ae1797299e1f62a20284465be6 | [
"MIT"
] | permissive | R-Mielamud/Telegram_BooksDelivery | 56349673b0bdb87204c35d4bce2cdb01d6d18722 | 0745e60a4541f38fba8ac378185aff558ec95147 | refs/heads/master | 2023-03-01T03:26:42.038174 | 2021-02-11T17:52:52 | 2021-02-11T17:52:52 | 326,045,333 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,056 | py | from telebot import TeleBot as Bot
from helpers.conversation import ConversationsStorage, Conversation
from helpers.messaging import parse_manifest, send_until_question
from api import UsersAPI, OrdersAPI, RequisitesAPI, BillsAPI
from constants import BOT_TOKEN
bot = Bot(BOT_TOKEN)
welcome, manifest = parse_manifest()... | [
"[email protected]"
] | |
47ba284a792b5f983cbaf547bb02cc9069dde73b | 4195cfc592b8c6ee42c5ea7b7d7d08b9899dd7c0 | /spektral/datasets/qm7.py | 0b226669c663f48b60d05bc6e3885431fd6d6681 | [
"MIT"
] | permissive | mbrukman/spektral | 4f5cc708a2996469ebbf2b6133acca42c6a869bc | d720de476d04a8d9ed23570336eddfedb97dd7de | refs/heads/master | 2023-02-03T09:16:32.579795 | 2020-12-15T18:00:24 | 2020-12-15T18:00:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,404 | py | import os.path as osp
import numpy as np
import scipy.sparse as sp
from scipy.io import loadmat
from tensorflow.keras.utils import get_file
from spektral.data import Dataset, Graph
class QM7(Dataset):
"""
The QM7b dataset of molecules from the paper:
> [MoleculeNet: A Benchmark for Molecular Machine Le... | [
"[email protected]"
] | |
3ec8a31d0882655804f8b5f2cb27daca6abfd5e7 | 2e8f0de7a1526ef511927783235edc93f7c90036 | /communicare/core/migrations/0043_event_external_subscriptions.py | f59f64eaec3ff4408f9560c7e05cd7fcea47da6d | [] | 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 | 439 | py | # Generated by Django 2.1.8 on 2020-03-02 17:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0042_auto_20191104_0945'),
]
operations = [
migrations.AddField(
model_name='event',
name='external_subscrip... | [
"[email protected]"
] | |
2ac85d35e477f5d3e3fe61212bc2ef57463c03a6 | 637ab3853b560485d1b3c3ecbb469ff48114f3fb | /RepublicHyundai/taxapp/admin.py | 66f846da14758850dcc5f7d4b76283e1f2e96d62 | [] | no_license | vishalrathodgithub/republic_hyundai | 19b7af4f84cec5cec037f2ed3a77ec5dfd4be8b9 | cb1241f7c696a5b067a6b1ad1ce27dd371b41e2e | refs/heads/master | 2020-11-24T13:09:21.491228 | 2019-12-15T09:29:16 | 2019-12-15T09:29:16 | 228,159,070 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 297 | py | from django.contrib import admin
from taxapp.models import *
# Register your models here.
class TaxMasterAdmin(admin.ModelAdmin):
list_display =['tax_product_category','tax_hsn','tax_sgst','tax_cgst','tax_igst']
admin.site.register(TaxMaster,TaxMasterAdmin)
admin.site.register(FinancialYear)
| [
"[email protected]"
] | |
8dc37cc18c0c38e4156e6ad424ef221774f15007 | 5a394c53a7099bc871401e32cf3fc782546f9f7d | /.history/lab1/Graph_20210130222041.py | a941a151506209424208f45209345b15f8b3979d | [] | no_license | ajaygc95/advPy | fe32d67ee7910a1421d759c4f07e183cb7ba295b | 87d38a24ef02bcfe0f050840179c6206a61384bd | refs/heads/master | 2023-03-27T10:10:25.668371 | 2021-03-23T08:28:44 | 2021-03-23T08:28:44 | 334,614,292 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 436 | py | from matplotlib import pyplot as plt
import numpy as np
import sklearn as sk
class Graph:
def __init__(self) -> None:
self.plot = plt
def plotGraph(self, x, y):
plt.plot(x,y)
plt.xlabel('Year')
plt.ylabel('Change in Temperature')
plt.title('Temperature change by year... | [
"[email protected]"
] | |
e8c4bb6b0a28096de4b86e45d42f7d4cf7c240ff | e837db39c9609830ab8e77dac2077ea30cadc5b3 | /core/migrations/0003_auto_20190915_1905.py | 368d065348ec67a18de5829c24f80f2c257f1185 | [] | no_license | windundschnee/accountneu | 9c8ff1507f725a5179604be2640d76b5302a0299 | da9066840a312a95bc628556c94738010787a01f | refs/heads/master | 2022-12-10T06:00:42.449898 | 2019-10-25T18:29:23 | 2019-10-25T18:29:23 | 211,513,631 | 0 | 0 | null | 2022-12-08T05:22:15 | 2019-09-28T14:34:00 | Python | UTF-8 | Python | false | false | 868 | py | # Generated by Django 2.2 on 2019-09-15 17:05
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0002_auto_20190915_1758'),
]
operations = [
migrations.AddField(
model_name='allgeingaben',
... | [
"[email protected]"
] | |
9c1dec43e89521c2bace3fda5c4a36ee10c09131 | 320280bfce76713436b76ffc3125ccf37e65a324 | /AnalyzeMiniPlusSubstructure/test/ttbar/ttbar_82.py | 439df1a9e7ad24d35f3968ac9303d4353832a0cf | [] | no_license | skhalil/MiniValidation | 75ea5c0d7cde17bf99c7d31501f8384560ee7b99 | 1a7fb8377e29172483ea6d3c7b3e427ff87e7e37 | refs/heads/master | 2016-09-05T10:31:38.562365 | 2015-01-29T05:30:32 | 2015-01-29T05:30:32 | 29,898,162 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,860 | py | import FWCore.ParameterSet.Config as cms
###############################################
useMiniAOD = True
# AOD
pfcandidates = 'particleFlow'
chsstring = 'pfNoPileUpJME'
genjetparticles = 'genParticles'
importantgenparticles = 'genParticles'
tracks = 'generalTracks'
vertices... | [
"[email protected]"
] | |
ef32a3e70644ccee481a6bb2836324e2d3e9e4bf | b7f45072d056b80ed49e6bcde91877d8576e970d | /SQL/inc/py/all-names.py | b16948d631042a84c093b9e28cfe892992ea0f3f | [] | no_license | jrminter/tips | 128a18ee55655a13085c174d532c77bcea412754 | f48f8b202f8bf9e36cb6d487a23208371c79718e | refs/heads/master | 2022-06-14T08:46:28.972743 | 2022-05-30T19:29:28 | 2022-05-30T19:29:28 | 11,463,325 | 5 | 8 | null | 2019-12-18T16:24:02 | 2013-07-17T00:16:43 | Jupyter Notebook | UTF-8 | Python | false | false | 294 | py | from sqlite3 import dbapi2 as sqlite
connection = sqlite.connect("experiments.db")
cursor = connection.cursor()
cursor.execute("SELECT FirstName, Lastname FROM Person ORDER BY LastName;")
results = cursor.fetchall();
for r in results:
print(r[0], r[1])
cursor.close();
connection.close();
| [
"[email protected]"
] | |
b3068976266831d415316817e2e3f7e468c472bc | e85b47c61947b13afd2d8855acff6c3fd0acd3e5 | /accounts/models.py | 2e83c57c385b45f7da7d1acf0d87954f0e2f8239 | [] | no_license | Zhoroev/django_exam5 | e2c2c5165d1dc5eeff87708de47267ec35135034 | af5646b16732f8dc5bf0068ce34467cb29d70541 | refs/heads/main | 2023-06-30T16:49:25.077947 | 2021-08-07T17:33:19 | 2021-08-07T17:33:19 | 393,749,728 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 476 | py | from django.db import models
from django.contrib.auth.models import AbstractUser
from django.db import models
class User(AbstractUser):
class TypeUserChoice(models.TextChoices):
ADMIN = 'admin'
SPECIALIST = 'specialist'
PERSONAL_CABINET = 'personal_cabinet'
type_user = models.CharField... | [
"[email protected]"
] | |
c20262a0f63933cce6ec99765eb0929fd4f684d8 | ed21823488a1cca51009793efa0b124e40d224a4 | /neurobioseg/161207_multiple_training_segmentations/p161207_03_compute_paths.py | c8d1a821dce33c10b72ca127676a412318bedebd | [] | no_license | jhennies/py_devel | 4a41e13ec8cd9b834c3d5acf64becc0fa8ffc479 | 9fc860be95ae91064a40f25e26d4024fbae6eb1f | refs/heads/master | 2021-01-16T23:25:56.716283 | 2017-03-10T17:49:55 | 2017-03-10T17:49:55 | 45,381,183 | 1 | 0 | null | 2017-03-10T17:49:56 | 2015-11-02T08:21:35 | Python | UTF-8 | Python | false | false | 3,955 | py |
import os
import inspect
from hdf5_image_processing import Hdf5ImageProcessing as IP, Hdf5ImageProcessingLib as ipl
from hdf5_processing import RecursiveDict as rdict
from shutil import copy, copyfile
import numpy as np
import matplotlib.pyplot as plt
import processing_libip as libip
import sys
from yaml_parameters im... | [
"[email protected]"
] | |
0d4208c30ec0aab0cdd5a4405a79fedd5cf74c17 | ffe555768c86e03e8528e1d77a3b763ef8decea1 | /pygcn/smtest.py | 91378e0c2848cc9a91f55cfdda709108851373b0 | [] | no_license | LittleQili/Toy-GCN | f4ba7dfa94468b44ef4687262d625678eea25007 | 2eb4ed0453b6acdff543aed7e965c80d424abc50 | refs/heads/main | 2023-03-25T17:41:04.459508 | 2020-12-27T07:40:02 | 2020-12-27T07:40:02 | 324,107,780 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,170 | py | import time
import argparse
import numpy as np
import torch
import torch.nn.functional as F
import torch.optim as optim
import torch.utils as tutil
# from utils import accuracy
from smmodel import GCN
from smdata import load_test_data
# Training settings
parser = argparse.ArgumentParser()
parser.add_argument('--no-c... | [
"[email protected]"
] | |
67e65a797c551dbb3fbd1cc8e37359c580ca3a81 | 46225b4cd6234b3aeb31b0e88f85df44fddd3d53 | /common_crawlers/common_crawlers/spiders/job_bole3.py | ed2a90fc2506289e2de9890670e8270d0ed127db | [] | no_license | git-wsf/crawler_project | cdbd8aaa0e4f232ffb07cdc5d4db90fc858e1d40 | 665945214036da1d312d16de83b13430d2e529c6 | refs/heads/master | 2020-07-27T15:14:16.152390 | 2018-10-30T13:46:34 | 2018-10-30T13:46:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,267 | py | # -*- coding: utf-8 -*-
import scrapy
from scrapy.http import Request
from common_crawlers.utils.common import get_md5
from common_crawlers.items import JobBoleItem, CustomItemLoader
from urllib import parse
class JobBole3Spider(scrapy.Spider):
name = 'job_bole3'
allowed_domains = ['jobbole.com']
start_ur... | [
"[email protected]"
] | |
7d0ebc005536be7a6d2ce1733d115bea7b53644b | 0d0263ab9a24fc1bea785bcd913a8a113c571444 | /03.02.object_detection_predict/SSD_detect.py | 4df5bb9df70b4346ead58a4d2a3f46116c1d060b | [] | no_license | chenbobaoge/BeginnerDL | 3b4f393802c230a7a9ed60828af96573fb340282 | e038334880ee521fcf2d92953b530a5518346c35 | refs/heads/master | 2021-04-28T17:15:48.345072 | 2018-01-20T06:41:36 | 2018-01-20T06:41:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,693 | py | from keras.preprocessing import image
from scipy.misc import imread
from keras.applications.imagenet_utils import preprocess_input
import numpy as np
from keras.models import load_model
from keras_layers.SSD import PriorBox,Normalize, BBoxUtility
import pickle
import matplotlib.pyplot as plt
from keras_config.SSDConfig... | [
"[email protected]"
] | |
85e4240770dd910e3b1334465f3b688842fb6c4e | 8fa9174a6136c3f27c9090c2528e8d69835656a2 | /app/mutant/tests/test_mutant_viewsets.py | dace4ccaf1ab5573dfd3bb347b3d654029504e2f | [] | no_license | hugoseabra/xmen-magneto-ambition | 61336a8ce0eec7425f747c548dba87cb1bf8e88e | 36caec2ae9102fc31ec502fe23d080b4625325b4 | refs/heads/master | 2023-07-08T05:57:36.007412 | 2021-08-18T00:36:47 | 2021-08-18T00:36:47 | 397,329,902 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,929 | py | from django.test import TestCase
from django.urls import reverse
class MutantEndpointTests(TestCase):
def _get_url(self):
return reverse('mutant:mutant-list')
def test_validation_of_how_many_items(self):
"""Tests error when less than 6 sequences is sent """
data = {
'dna':... | [
"[email protected]"
] | |
dcd2341b9a1ca25f9d958de48d6f57195b81b110 | 114372880a520f30f2d07b1b13a146f96454fd2e | /backend/channel_plugin/channel_plugin/contrib/sites/migrations/0003_set_site_domain_and_name.py | ff7bbcef9c5f692431794448bd76e7cd3743344e | [
"MIT"
] | permissive | wenotch/zc_plugin_channels | 0ddb92064e6013a3f65d6ee65c526e0e605df25a | 4e88aa4a3a1a140848c22a0fd90c6486560c3deb | refs/heads/main | 2023-07-19T04:24:40.479183 | 2021-09-03T14:31:28 | 2021-09-03T14:31:28 | 401,643,447 | 1 | 0 | null | 2021-08-31T09:20:54 | 2021-08-31T09:20:53 | null | UTF-8 | Python | false | false | 1,012 | py | """
To understand why this file is here, please read:
http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
"""
from django.conf import settings
from django.db import migrations
def update_site_forward(apps, schema_editor):
"""Set site d... | [
"[email protected]"
] | |
e237d04b87dc293db59d1d7946558444d2c591d0 | ce76b3ef70b885d7c354b6ddb8447d111548e0f1 | /know_first_place_about_other_year/think_fact.py | 5ccb9491f21faeaab2c0396088561a505e242764 | [] | no_license | JingkaiTang/github-play | 9bdca4115eee94a7b5e4ae9d3d6052514729ff21 | 51b550425a91a97480714fe9bc63cb5112f6f729 | refs/heads/master | 2021-01-20T20:18:21.249162 | 2016-08-19T07:20:12 | 2016-08-19T07:20:12 | 60,834,519 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 219 | py |
#! /usr/bin/env python
def world(str_arg):
part_or_different_eye(str_arg)
print('early_work')
def part_or_different_eye(str_arg):
print(str_arg)
if __name__ == '__main__':
world('new_place_and_way')
| [
"[email protected]"
] | |
5640887551d1f6accdd6e95361bd131529b00b45 | 3899dd3debab668ef0c4b91c12127e714bdf3d6d | /venv/Lib/site-packages/tensorflow/_api/v1/keras/initializers/__init__.py | aeaecd1674940e94d41121da513763e784bc99ac | [] | no_license | SphericalPotatoInVacuum/CNNDDDD | b2f79521581a15d522d8bb52f81b731a3c6a4db4 | 03c5c0e7cb922f53f31025b7dd78287a19392824 | refs/heads/master | 2020-04-21T16:10:25.909319 | 2019-02-08T06:04:42 | 2019-02-08T06:04:42 | 169,691,960 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,855 | py | # This file is MACHINE GENERATED! Do not edit.
# Generated by: tensorflow/python/tools/api/generator/create_python_api.py script.
"""Keras initializer serialization / deserialization.
"""
from __future__ import print_function
from tensorflow.python import Constant
from tensorflow.python import Constant as c... | [
"[email protected]"
] | |
4bbc91ad36755f133c5b473d3e59491f7d00cb10 | 8329282a8fda056d705c1af6dbcd0de1ed7ca25e | /.history/textutiles/textutiles/views_20210522204110.py | 615e455ae34300f081f062b014e9c40135cf0c9b | [] | no_license | ritikalohia/Django-beginners- | c069b16867407ef883bb00c6faf4f601921c118a | 829e28ab25201853de5c71a10ceff30496afea52 | refs/heads/main | 2023-05-04T03:34:29.082656 | 2021-05-22T17:38:21 | 2021-05-22T17:38:21 | 369,869,599 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,455 | py | #created
from django.http import HttpResponse
from django.shortcuts import render
def index(request):
#params = {'name' : 'Ritika', 'place' : 'Mars'}
return render(request, 'index.html')
#return HttpResponse("Home")
def contact(request):
return render(request, 'contact')
def analyze(request):
#g... | [
"[email protected]"
] | |
e0d37014e4b7a9b35335efd96f0808e2c0f5f6ac | 48c07006c95631ccba60bf08942a0ad5f458b453 | /backend/wallet/admin.py | fd30a9aae90dd41aa5ec089a0797784423b75c71 | [] | no_license | crowdbotics-apps/irmflorida-21805 | 80359102e4cb3f949cbc4261f3345338d4ca5e31 | 6cca6ab134dc423a0dfe6c5180a3310471f44392 | refs/heads/master | 2022-12-31T22:17:17.827396 | 2020-10-22T13:09:20 | 2020-10-22T13:09:20 | 306,148,773 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 382 | py | from django.contrib import admin
from .models import (
CustomerWallet,
PaymentMethod,
PaymentTransaction,
TaskerPaymentAccount,
TaskerWallet,
)
admin.site.register(CustomerWallet)
admin.site.register(PaymentTransaction)
admin.site.register(PaymentMethod)
admin.site.register(TaskerWallet)
admin.site... | [
"[email protected]"
] | |
e1a146982bf9b581fb39ab7883f2b8bc9180d00d | 287e70a3b2382d1b4c3dd4bc3454ec66a7af1ac5 | /tsuanlo/thongke.py | c8719e935443b954dc81c57ceb57dc9dc94cc2cb | [] | no_license | twgo/su5pio2 | 9b7c070bf3483312628d3c338949703147189a8a | 24a567604aec090fdbce11335bbfef56c71f6888 | refs/heads/master | 2020-03-11T14:19:23.606168 | 2018-10-16T12:22:26 | 2018-10-16T12:22:26 | 130,050,110 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,321 | py | from 臺灣言語工具.解析整理.拆文分析器 import 拆文分析器
from builtins import set
import json
from 臺灣言語工具.音標系統.台語 import 新白話字
from 臺灣言語工具.音標系統.閩南語.臺灣閩南語羅馬字拼音 import 臺灣閩南語羅馬字拼音通行韻母表
def su():
imchiat = 0
su = 0
tsuanpooji = set()
tsuanpoojitiau = set()
tsuanpoosu = set()
for liong, 句物件 in enumerate(tsuliau()):
... | [
"[email protected]"
] | |
50602a2a258c39fa894476cd9a9cbbc0de1e795a | e27509d78f9bc9746c535b4ed7adec6370741af6 | /bwdesignworld/magazineisuue/views.py | 732a1d7f95c369a29873e8f7c6a683ee1d397957 | [] | no_license | bopopescu/bw | deae2323039d70b32a35043361f8562b09bea630 | 1ddb78a280388548ef7dd201a361db710e271791 | refs/heads/master | 2022-11-22T18:29:05.581667 | 2019-10-01T03:30:48 | 2019-10-01T03:30:48 | 282,542,998 | 0 | 0 | null | 2020-07-25T23:41:43 | 2020-07-25T23:41:42 | null | UTF-8 | Python | false | false | 2,009 | py | # -*- coding: utf-8 -*-
from django.shortcuts import render
from django.http import HttpResponse
import datetime
from django.utils import timezone
from django.http import HttpResponseRedirect
from django.http import HttpResponse
import json
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger,Invali... | [
"[email protected]"
] | |
84d900bd249dc56e022df49fe1adc11d8e94cc33 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03106/s203963496.py | 3326c7676c3537cc9fbbf30aabd9f17c4dbc711a | [] | 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 | 172 | py | A, B, K = map(int, input().split())
I = []
if A < B:
C = A
else:
C = B
for i in range(1, C+1):
if (A % i == 0) & (B % i == 0):
I.append(i)
print(I[-K])
| [
"[email protected]"
] | |
031beb90b4f484126de2a0aa9d25895b63eba864 | 716abd9e5ba4b72b72cc5f724a6cc0a6ad4390d1 | /8-Working with Python Modules/35-Introduction-to-Python-Modules.py | d82b80c881be39c2f7329e85993ccf5267b6067f | [] | no_license | devopstasks/PythonScripting | ac45edd72dc134ec3539b962f02dfc866f365ecf | 48bc37733ae6b3be4e2d64909ffe0962b6908518 | refs/heads/master | 2023-03-29T11:18:01.329452 | 2021-04-07T03:25:20 | 2021-04-07T03:25:20 | 350,388,744 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,505 | py | '''
======================================================
What is a module?
=> A module is a file containing python definitions and statements.That means module containing
python functions,classes and variables.
What is the use of module?
=> Reusability
ex: If script name is mymodule.py then module name is mymodule
... | [
"[email protected]"
] | |
09fd87d07d10fa12b78b49a16a161ae0c05646ac | 3b7a07ad2d78e8526ad8ae0767530d98aaff9f3e | /backend/core/settings/dev.py | 5e31a25b6b87f5c7ce7ba9c4302df39b89fc9375 | [] | no_license | ImmortalViolet/one-oms | ba2281acdd63f35eb907651e5aae240c97c16e8b | 9b89e2773511cb4f9fe37c4cde79e9e3e47464fe | refs/heads/master | 2022-04-12T17:38:59.052337 | 2020-02-28T04:29:34 | 2020-02-28T04:29:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 269 | py | # -*- coding: utf-8 -*-
# author: timor
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# db
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, '../core.db'),
}
} | [
"[email protected]"
] | |
6ee9e09c43f596747e6f734706f13995d405a1f5 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/verbs/_overruns.py | b104b69597f068db56d3556bd4709eb128fbc11a | [
"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 | 245 | py |
from xai.brain.wordbase.verbs._overrun import _OVERRUN
#calss header
class _OVERRUNS(_OVERRUN, ):
def __init__(self,):
_OVERRUN.__init__(self)
self.name = "OVERRUNS"
self.specie = 'verbs'
self.basic = "overrun"
self.jsondata = {}
| [
"[email protected]"
] | |
c51305ba5e4d56ee36a2a1cdb829f4a76038d5d3 | 59166105545cdd87626d15bf42e60a9ee1ef2413 | /test/test_human_gene_location.py | ed2c5bf611870f00b36c70bc931cf84d6aa20bd0 | [] | no_license | mosoriob/dbpedia_api_client | 8c594fc115ce75235315e890d55fbf6bd555fa85 | 8d6f0d04a3a30a82ce0e9277e4c9ce00ecd0c0cc | refs/heads/master | 2022-11-20T01:42:33.481024 | 2020-05-12T23:22:54 | 2020-05-12T23:22:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,901 | py | # coding: utf-8
"""
DBpedia
This is the API of the DBpedia Ontology # noqa: E501
The version of the OpenAPI document: v0.0.1
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import datetime
import dbpedia
from dbpedia.models.human_gene_locat... | [
"[email protected]"
] | |
f81a63c4262b48497bf3b90fc7acc5c04f3469e4 | 54f57cf661423b4cb4375ec86557a934ac94a497 | /proj/run.py | c4f36b79ea5076151cfdfb10f7a6911a3fd8a76e | [
"MIT"
] | permissive | 0xangelo/deep-rl | dd87520120e70a5d2325fcd25cdf004ce67f1453 | 9f0c1aafe71852c8973bf1ab732114a3cdbe23ad | refs/heads/master | 2022-02-24T00:21:47.248660 | 2019-06-22T20:51:44 | 2019-06-22T20:51:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,549 | py | """
The MIT License
Copyright (c) 2018 OpenAI (http://openai.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify... | [
"[email protected]"
] | |
d5c530b751dafafc0517165d510d97d4829e610b | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02860/s022291938.py | d07ef112fa467f50552ffd2851692df5d30addee | [] | 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 | 149 | py | N = int(input())
S = str(input())
flag = False
half = (N+1) // 2
if S[:half] == S[half:N]:
flag = True
if flag:
print("Yes")
else:
print("No") | [
"[email protected]"
] | |
f1d0157b2ab380f994197bcf15eb45900e508175 | db9ff8accaa4d8d4a96d3f9122c0fdc5e83ea2a5 | /test/test_inventory_location_full.py | 45ffb25097659f31398e3148e7d153ea0d03eafd | [] | no_license | agtt/ebay-openapi-inventory | 4754cdc8b6765acdb34f6b8f89b017ccbc6b1d2b | d990c26f16e811431892ac6401c73c4599c2d414 | refs/heads/master | 2023-06-17T10:53:43.204075 | 2021-07-14T18:32:38 | 2021-07-14T18:32:38 | 386,039,734 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,295 | py | """
Inventory API
The Inventory API is used to create and manage inventory, and then to publish and manage this inventory on an eBay marketplace. There are also methods in this API that will convert eligible, active eBay listings into the Inventory API model. # noqa: E501
The version of the OpenAPI docum... | [
"[email protected]"
] | |
aeeeb349ebfd16e04ca2e0194f5292de498ea198 | bb465b891e5bd14b2be2c6ae008417106cc1d9bb | /pycozmo/audiokinetic/soundbanksinfo.py | bdebf47c9b23d44c2f5aa0606371bf4afe2ea978 | [
"Apache-2.0",
"MIT"
] | permissive | ReidsTech/pycozmo | 4393b157e7a8fba13bc3452226ec45cac5c5b80b | 1b6dcd9b869a3784f1d8b02e820bb033f95fd13a | refs/heads/master | 2023-02-10T22:45:43.789691 | 2020-11-12T14:39:52 | 2020-11-12T14:39:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,733 | py | """
AudioKinetic WWise SoundbanksInfo.xml representation and reading.
See assets/cozmo_resources/sound/SoundbanksInfo.xml
"""
from typing import Dict, Any, Union, TextIO
import xml.etree.ElementTree as et # noqa
from . import exception
__all__ = [
"EventInfo",
"FileInfo",
"SoundBankInfo",
"load... | [
"[email protected]"
] | |
0ed43fd97bc1aaa0a8dd69685412961f634b5081 | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/twosum_20200716164442.py | d7b038af3c1ba2d0728e86c4a678d19d439a0ad0 | [] | no_license | MaryanneNjeri/pythonModules | 56f54bf098ae58ea069bf33f11ae94fa8eedcabc | f4e56b1e4dda2349267af634a46f6b9df6686020 | refs/heads/master | 2022-12-16T02:59:19.896129 | 2020-09-11T12:05:22 | 2020-09-11T12:05:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 606 | py | def twoSum(nums,target):
# loop through the array
# add the two nums checking whethere they are equal to the target
# when you get one that is equal to the target append the indices...
index = []
for i in range(len(nums)-1):
for j in range(i+1,len(nums)):
if nums[i... | [
"[email protected]"
] | |
250a4f07e7a707025c6c2dca69887c9dd8db0074 | 8048d04a51cd8b14b9de52c1ab4c0b670a8d8cc9 | /blog/models.py | bda80cb88c8d0a1f1c39f18ba8f6672b578e0796 | [] | no_license | earvingemenez/myblog | 2520bb08278272cdb1d3916b07c1b5167d6f5245 | 18b560efc0c0e20ecca0d0383b727785d713f776 | refs/heads/master | 2021-01-19T22:43:21.359989 | 2017-04-20T10:14:37 | 2017-04-20T10:14:37 | 88,848,933 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 299 | py | from __future__ import unicode_literals
from django.db import models
class Blog(models.Model):
title = models.CharField(max_length=250)
content = models.TextField()
date_created = models.DateTimeField(auto_now_add=True)
def __str__(self):
return "{}".format(self.title) | [
"[email protected]"
] | |
31583fc5b7d6736e1fd571f3c2c2951d935d9380 | 1825283527f5a479204708feeaf55f4ab6d1290b | /leetcode/python/248/original/248.strobogrammatic-number-iii.py | f15a21644c1adb868cb39614cde884e402e9deb3 | [] | no_license | frankieliu/problems | b82c61d3328ffcc1da2cbc95712563355f5d44b5 | 911c6622448a4be041834bcab25051dd0f9209b2 | refs/heads/master | 2023-01-06T14:41:58.044871 | 2019-11-24T03:47:22 | 2019-11-24T03:47:22 | 115,065,956 | 1 | 0 | null | 2023-01-04T07:25:52 | 2017-12-22T02:06:57 | HTML | UTF-8 | Python | false | false | 837 | py | #
# @lc app=leetcode id=248 lang=python3
#
# [248] Strobogrammatic Number III
#
# https://leetcode.com/problems/strobogrammatic-number-iii/description/
#
# algorithms
# Hard (35.88%)
# Total Accepted: 18.6K
# Total Submissions: 51.7K
# Testcase Example: '"50"\n"100"'
#
# A strobogrammatic number is a number that lo... | [
"[email protected]"
] | |
a508f7fff35fe197202d0930f5a4a128153dafe8 | 5d1c43bb4881039f198eedcee2ceb101b406e0a0 | /Django/myvenv/Scripts/rst2pseudoxml.py | 14b4d31f246fab38616c63e1ebada18b21f34d47 | [] | no_license | MunSeoHee/Likelion_Gachon_2020 | 46155b1686a245a59c5664f7726ac754b7079e4b | e0e48845fdb0e4aa2365e7c47e29880a27f0f261 | refs/heads/master | 2021-04-10T09:51:06.618980 | 2020-12-07T10:06:43 | 2020-12-07T10:06:43 | 248,927,668 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 665 | py | #!c:\users\munseohee\desktop\likelion_gachon_2020\django\myvenv\scripts\python.exe
# $Id: rst2pseudoxml.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: David Goodger <[email protected]>
# Copyright: This module has been placed in the public domain.
"""
A minimal front end to the Docutils Publisher, producing pseudo... | [
"[email protected]"
] | |
0358c0a7d390749d6a438898355cb946deba8891 | 6b9b032a5516c8d7dbb26deeb1b189022f8f9411 | /LeetCode/math/326.3的幂.py | c748ea5a012df0e8d72d3e38e176aa8eefb1eadb | [] | no_license | mrmenand/Py_transaction | 84db99a0010ae90f43fba6b737d7035e48af55fb | 7e82422c84ad699805cc12568b8d3d969f66a419 | refs/heads/master | 2021-07-13T21:15:03.714689 | 2020-06-21T11:49:31 | 2020-06-21T11:49:31 | 176,281,954 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 163 | py | # 326. 3的幂
class Solution:
def isPowerOfThree(self, n: int) -> bool:
ret = 1
while ret < n:
ret *= 3
return ret == n
| [
"[email protected]"
] | |
5cdc9a19af934f9266f1825c6652b217388655ed | 111b4a8e40afb25fe9c906e89b3d31ccde18447b | /07b - Iteraties-WhileLus/Kassa.py | 4a0ca6b9223b11b1bd5165e99b762bf2937f5301 | [] | no_license | astilleman/Informatica5 | 722276619b5c2a80e03ad97a6c67bdb25f12bda2 | 9cbd82055c621c25ec372547c179bcf045f6629f | refs/heads/master | 2020-03-28T03:19:12.206052 | 2019-05-16T08:05:54 | 2019-05-16T08:05:54 | 147,637,244 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 252 | py | #bewerking
totale_prijs = 0
prijs = float(input('Prijs van het product: '))
while prijs > 0:
totale_prijs += prijs
prijs = float(input('Prijs van het product: '))
mes = 'De totale prijs is € {:.2f}'.format(totale_prijs)
#uitvoer
print(mes)
| [
"[email protected]"
] | |
a77d9836bd428d402dfa9f88a23deaf8f561556e | 067f015c6b70c18c78dc9c6976c10d77b2f6bb03 | /tests/test_extension.py | ef0f38593557e3ffde9f7323b34d1e17c8252893 | [
"Apache-2.0"
] | permissive | SolarisYan/jupyterlab_autoversion | d146a99f8e975def441a2a22ceb89c27f1510123 | f16a1f0833cd278df390e7cc3c72aa4569dd4b8e | refs/heads/master | 2020-04-26T12:17:01.191856 | 2019-02-14T14:07:01 | 2019-02-14T14:07:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 737 | py | # for Coverage
from mock import patch, MagicMock
from jupyterlab_autoversion.extension import load_jupyter_server_extension
class TestExtension:
def setup(self):
pass
# setup() before each test method
def teardown(self):
pass
# teardown() after each test method
@classmeth... | [
"[email protected]"
] | |
59179e3611dfd909c95ac81a1ccb88b8d87bd48d | aec6d287856a06e8b366216b5562b76d46978dc6 | /specialelaven.py | d85f1f38564a80b40e58bd012bb94922693c77aa | [] | no_license | subbuinti/python_practice | b724a4e562b63c66d23b67093219d5a4bf1e1f0f | ffdab933586609b3760681effccdfead0b90033f | refs/heads/master | 2023-07-12T17:47:00.773554 | 2021-08-31T14:26:51 | 2021-08-31T14:26:51 | 395,187,797 | 0 | 0 | null | 2021-08-31T14:22:56 | 2021-08-12T03:54:58 | Python | UTF-8 | Python | false | false | 219 | py | number = int(input())
is_multiply_by_11 = ((number % 11) == 0)
is_multiple_times_by_11 =((number % 11) == 1)
if is_multiply_by_11 or is_multiple_times_by_11:
print("Special Eleven")
else:
print("Normal Number") | [
"[email protected]"
] | |
e3fbaa41424466c1205d5c08baabfd0e8be8d179 | 45467e07e77131f631d0865046dcc4d18f483601 | /src/Codeforces/manthan_codefest18/B.py | d3ed1ae6fd8350c021bcad1b6d526a63371793da | [] | no_license | bvsbrk/Algos | 98374e094bd3811579276d25a82bbf2c0f046d96 | cbb18bce92054d57c0e825069ef7f2120a9cc622 | refs/heads/master | 2021-09-25T10:01:59.323857 | 2018-10-20T16:07:07 | 2018-10-20T16:07:07 | 98,708,839 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 478 | py | if __name__ == '__main__':
n, s = [int(__) for __ in input().strip().split()]
arr = [int(__) for __ in input().strip().split()]
arr.sort()
mid = n // 2
ans = 0
if s == arr[mid]:
print(ans)
elif s > arr[mid]:
while mid < n and arr[mid] < s:
ans += s - arr[mid]
... | [
"[email protected]"
] | |
0e2d85e036627e1e34c67e17618b48e652a18d05 | e3a6939a2faaf9bfd7ed21e7a877d2bd2125b130 | /projects/migrations/0006_alter_portfolio_main_image.py | 802a68ae6f98fe2b1e907debaaf8c9c2427ecd06 | [] | no_license | furkalokbu/PortfolioTime | b133a64ec1472a12b878b87cf8e0706fdf39a16a | c4233930cd0988a80c65edf2079d4a560987d225 | refs/heads/main | 2023-04-29T21:24:30.629206 | 2021-05-14T15:49:14 | 2021-05-14T15:49:14 | 367,320,283 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 624 | py | # Generated by Django 3.2.2 on 2021-05-13 18:23
from django.db import migrations, models
import djlime.utils
class Migration(migrations.Migration):
dependencies = [
("projects", "0005_portfolio_main_image"),
]
operations = [
migrations.AlterField(
model_name="portfolio",
... | [
"[email protected]"
] | |
c11b62bf5d9810407247cd30ec391cedacc33a4b | 8780bc7f252f14ff5406ce965733c099034920b7 | /pyCode/python3.6网络爬虫实战/16-使用Selenium模拟浏览器抓取淘宝商品美食信息/16-使用Selenium模拟浏览器抓取淘宝商品美食信息.py | 31abbc0c226bf81b218662c13dc366640a3d2005 | [] | no_license | 13661892653/workspace | 5e4e458d31b9355c67d67ba7d9faccbcc1ac9f6b | 17960becabb3b4f0fc30009c71a11c4f7a5f8330 | refs/heads/master | 2020-12-24T20:00:15.541432 | 2018-08-14T13:56:15 | 2018-08-14T13:56:15 | 86,225,975 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,070 | py | #coding=utf-8
#Version:Python-3.6.0
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from pyquery import PyQuery
impo... | [
"[email protected]"
] | |
734c3ae12014f9b1251ed08b02aa2812c6836d5a | f159aeec3408fe36a9376c50ebb42a9174d89959 | /1094.Car-Pooling.py | ca906b5c2ebfe85078f842d56167aa7405bbd8e4 | [
"MIT"
] | permissive | mickey0524/leetcode | 83b2d11ab226fad5da7198bb37eeedcd8d17635a | fc5b1744af7be93f4dd01d6ad58d2bd12f7ed33f | refs/heads/master | 2023-09-04T00:01:13.138858 | 2023-08-27T07:43:53 | 2023-08-27T07:43:53 | 140,945,128 | 27 | 9 | null | null | null | null | UTF-8 | Python | false | false | 698 | py | # https://leetcode.com/problems/car-pooling/
# Easy (56.22%)
# Total Accepted: 3,367
# Total Submissions: 5,989
class Solution(object):
def carPooling(self, trips, capacity):
"""
:type trips: List[List[int]]
:type capacity: int
:rtype: bool
"""
trips.sort(key=lam... | [
"[email protected]"
] | |
ec09c23ed955776b9848aa5c94f2f4b1c92574bf | 3f7e2c4e9a4dcee8f788150e1ead8fea1ea29b9d | /src/spaceone/statistics/service/schedule_service.py | 90d817258de4d4e8093583d0e0619f546f8f4ec0 | [
"Apache-2.0"
] | permissive | choonho/statistics | 8fd5d5cb88c7b1d028cc1074cbafebfcd38e1371 | 31fbae2d0772a2e8b717ac12c8de9edd9d8f1734 | refs/heads/master | 2023-03-04T04:16:21.121928 | 2020-08-18T12:54:26 | 2020-08-18T12:54:26 | 289,881,803 | 0 | 0 | null | 2020-08-24T09:17:07 | 2020-08-24T09:17:07 | null | UTF-8 | Python | false | false | 7,013 | py | import logging
import copy
from spaceone.core.service import *
from spaceone.statistics.error import *
from spaceone.statistics.manager.resource_manager import ResourceManager
from spaceone.statistics.manager.schedule_manager import ScheduleManager
_LOGGER = logging.getLogger(__name__)
@authentication_handler
@aut... | [
"[email protected]"
] | |
d129e4c0812fa19f8e5a6c71e7e94860e1283e5f | c1f1900d0f1522cfb6c0148ccd1138e3a3503ba8 | /generativeopenset/options.py | 1ccde89c0051407dab95ba2371390693424f4dd0 | [] | no_license | yunruiguo/counterfactual-openset | 4252c79bc799de0856cf019b4f13308e737a137c | fdba67466a877ed81de645b6c856d6f0a36006db | refs/heads/master | 2023-02-28T21:54:44.175036 | 2021-02-02T14:02:00 | 2021-02-02T14:02:00 | 335,285,749 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,386 | py | import os
import subprocess
import json
from pprint import pprint
def save_options(options):
# Include the version of the code that saved the options
# (in case the meaning of an option changes in the future)
if 'version' not in options:
options['version'] = get_code_version()
if not os.path.e... | [
"[email protected]"
] | |
42e89f451bbe4d4030bb30fcf32c0531c44d827a | 147d6678b8c99bd1e18b20814f259dc25a395ca6 | /python daily coding/2020.4.16 (문자열)/2675번 (문자열 반복).py | fd8d8f2aec4445d09f7e86b6a80d085465055c18 | [] | no_license | omy5123/Oh-min-young | 7759cf869720d58fb07edc0e8f5a9b013afacc95 | 7db08ab828cc28cb9f477ea5410a48245a156fef | refs/heads/master | 2021-05-19T07:08:01.379930 | 2021-01-17T07:51:49 | 2021-01-17T07:51:49 | 251,577,901 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,023 | py | """
문제
문자열 S를 입력받은 후에, 각 문자를 R번 반복해 새 문자열 P를 만든 후 출력하는 프로그램을 작성하시오. 즉, 첫 번째 문자를 R번 반복하고, 두 번째 문자를 R번 반복하는 식으로 P를 만들면 된다. S에는 QR Code "alphanumeric" 문자만 들어있다.
QR Code "alphanumeric" 문자는 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\$%*+-./: 이다.
입력
첫째 줄에 테스트 케이스의 개수 T(1 ≤ T ≤ 1,000)가 주어진다. 각 테스트 케이스는 반복 횟수 R(1 ≤ R ≤ 8), 문자열 S가 ... | [
"[email protected]"
] | |
72a5fad825c61fa86d5ef8ed291f73492c1c0c5f | df2cbe914f463ad050d7ed26194424afbe3a0a52 | /addons/website_sale_delivery/models/sale_order.py | 8348b35afb5921f18f137f6b7cf52a75f79e7da7 | [
"Apache-2.0"
] | permissive | SHIVJITH/Odoo_Machine_Test | 019ed339e995be980606a2d87a63312ddc18e706 | 310497a9872db7844b521e6dab5f7a9f61d365a4 | refs/heads/main | 2023-07-16T16:23:14.300656 | 2021-08-29T11:48:36 | 2021-08-29T11:48:36 | 401,010,175 | 0 | 0 | Apache-2.0 | 2021-08-29T10:13:58 | 2021-08-29T10:13:58 | null | UTF-8 | Python | false | false | 4,297 | py | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
from odoo import api, fields, models
_logger = logging.getLogger(__name__)
class SaleOrder(models.Model):
_inherit = 'sale.order'
amount_delivery = fields.Monetary(
compute='_compute_am... | [
"[email protected]"
] | |
2f7faf8cb1215010b6f4f201ca1e2084f22cdd66 | 09de981a1b1591f85e41147a299885e60f7cea93 | /ivona_api/__init__.py | 12d2e343b511d0b5f83847e836f1f82e3f4ebef5 | [
"MIT",
"Python-2.0"
] | permissive | Pythonity/python-ivona-api | c95951509f7dda90812c2d325beb82ad34560d1f | 490a2e502d4aa769b9f41603eb5d5e5ebf1ea912 | refs/heads/master | 2020-12-18T16:00:19.157330 | 2017-06-15T21:02:07 | 2017-06-15T21:02:07 | 60,565,253 | 10 | 3 | null | 2017-01-20T23:15:10 | 2016-06-06T22:33:22 | Python | UTF-8 | Python | false | false | 416 | py | # -*- coding: utf-8 -*-
"""
ivona_api - Python library that helps you connect to Amazon's IVONA Speech
Cloud from within your Python project.
"""
from __future__ import absolute_import, unicode_literals
from ivona_api.ivona_api import IvonaAPI # noqa
__title__ = 'ivona_api'
__version__ = '0.3.0'
__autho... | [
"[email protected]"
] | |
f9ca580abef29cccb94846ae9d25defc6a9972cc | a8828f1b8d443e44be8521d63b212e33c6bd7cbb | /app/sprites/tile_map.py | 16b23e9fc61336084860a295778fd5c873d0a668 | [] | no_license | JordanSlaman/pygame-cc | ab8e156ee7b27296996efc212ab23a18de122325 | fe2ac5ceb2c8f2cdb37dd1efa657723b4a45d1b9 | refs/heads/main | 2023-03-13T05:49:21.705879 | 2021-03-07T01:22:39 | 2021-03-07T01:22:39 | 345,232,003 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,538 | py | from pathlib import Path
tile_sprite_filepath = Path('./sprites/tiles.png')
tile_size = 34
column = [0, 34, 68, 102, 136, 170, 204, 238]
row = [14, 48, 82, 116, 150, 184, 218, 252, 286, 320, 354, 388, 422, 456, 490, 524]
tiles = {
"player_down": (column[0], row[0]),
"player_left": (column[1], row[0]),
"... | [
"[email protected]"
] | |
73873758c4fae5b30bbd029eb70045763949697f | bc758176773f988876d408880b2288de0a1a1532 | /manage.py | 2786e300b207f85a923c4a6d888b9f6294bb6853 | [] | no_license | 15101538237ren/traffic_prediction | 171e8ed66d5d0462e18d635e4380cbac566c5123 | 5e463a098cd4f6439cd5fcf6d7ae6bb36a6536de | refs/heads/master | 2021-03-19T16:35:13.074763 | 2018-04-11T03:31:01 | 2018-04-11T03:31:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 261 | py | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "traffic_prediction.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| [
"[email protected]"
] | |
fd33cdef41235e78f40026197c9486d4bb1b798e | 0fccee4c738449f5e0a8f52ea5acabf51db0e910 | /genfragments/ThirteenTeV/PythiaChargedResonance_WG/PythiaChargedResonance_WGToLNuG_M2600_width5_13TeV-pythia8_cff.py | 83509f85ddff909d3050b28a383fc39e126a530a | [] | no_license | cms-sw/genproductions | f308ffaf3586c19b29853db40e6d662e937940ff | dd3d3a3826343d4f75ec36b4662b6e9ff1f270f4 | refs/heads/master | 2023-08-30T17:26:02.581596 | 2023-08-29T14:53:43 | 2023-08-29T14:53:43 | 11,424,867 | 69 | 987 | null | 2023-09-14T12:41:28 | 2013-07-15T14:18:33 | Python | UTF-8 | Python | false | false | 1,133 | py | import FWCore.ParameterSet.Config as cms
from Configuration.Generator.Pythia8CommonSettings_cfi import *
from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import *
generator = cms.EDFilter("Pythia8GeneratorFilter",
comEnergy = cms.double(13000.0),
filterEfficiency = cms.untracked.double(1),
maxEvent... | [
"shubhanshu.chauhan.cern.ch"
] | shubhanshu.chauhan.cern.ch |
19ff523329804f16e2b6d3094c39cb90e0bf0d56 | 9ed4d46aedd4d4acadb48d610e940594b5b7b3fd | /electronics/resistor_equivalence.py | 55e7f2d6b5d2bd87baae998228830e13073f1456 | [
"MIT"
] | permissive | TheAlgorithms/Python | 7596a0e236ed12a61f9db19a7ea68309779cc85b | 421ace81edb0d9af3a173f4ca7e66cc900078c1d | refs/heads/master | 2023-09-01T17:32:20.190949 | 2023-08-29T13:18:10 | 2023-08-29T13:18:10 | 63,476,337 | 184,217 | 48,615 | MIT | 2023-09-14T02:05:29 | 2016-07-16T09:44:01 | Python | UTF-8 | Python | false | false | 1,593 | py | # https://byjus.com/equivalent-resistance-formula/
from __future__ import annotations
def resistor_parallel(resistors: list[float]) -> float:
"""
Req = 1/ (1/R1 + 1/R2 + ... + 1/Rn)
>>> resistor_parallel([3.21389, 2, 3])
0.8737571620498019
>>> resistor_parallel([3.21389, 2, -3])
Traceback (m... | [
"[email protected]"
] | |
b8f2f746520ef84dcec1b5ea9dbfb14196e27a81 | 37efda4646f478b66674e384e1bc139e7874d972 | /practice/String.py | ee6e9b1a4544ded7ff46560e1f056471c96e2855 | [] | no_license | siberian122/kyoupuro | 02c1c40f7c09ff0c07a1d50b727f860ad269d8b1 | 8bf5e5b354d82f44f54c80f1fc014c9519de3ca4 | refs/heads/master | 2023-04-04T02:45:29.445107 | 2021-04-20T07:37:47 | 2021-04-20T07:37:47 | 299,248,378 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 152 | py | s=input()
t=input()
Flag=False
for _ in range(len(s)):
s=s[-1]+s[:-1]
if s==t:
Flag=True
if Flag:
print('Yes')
else:
print('No') | [
"[email protected]"
] | |
a44ec4ba2cddc599611798c656eaece5002be537 | 4da66858f5278af1b1c9e1d0099a9e422400dcfa | /python_spider/test_spider/test_spider.py | f00b98fe900c4783aa078041a49e1ee89314edce | [] | no_license | hi-noikiy/TestProject | 62eb719a113b15be98a099e099afbb20f99d7062 | e37617c9f1bee058c196f776451c1d81d9fd5f86 | refs/heads/master | 2022-01-05T03:00:05.498931 | 2018-09-26T09:28:10 | 2018-09-26T09:28:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 306 | py | import requests
from lxml import etree
html = etree.parse('hello.html')
print(type(html))
result = html.xpath('//li')
print(result)
print(len(result))
print(type(result))
print(type(result[0]))
result1 = html.xpath('//li/@class')
print(result1)
# res = etree.tostring(html)
# print(res) | [
"[email protected]"
] | |
6ca0aacda5d9852d4c3a3174f5af3c2e3a61a37f | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_5686275109552128_0/Python/SozoS/B.py | c5247b1e1c0f2a3ec047c25e3d0c6464b0df70d0 | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | Python | false | false | 1,305 | py | # Author: Davin Choo
# Email: [email protected]
# Observations:
# Doing all the splits before eating cannot make the solution worse
# Always splitting to an empty plate cannot make the solution worse
# So, we always split first, and split to empty plate
# (Exploit fact that we have infinite customers)
# Approach: Br... | [
"[email protected]"
] | |
f865d11508ed722439228027809b46b8c7a88b52 | a25b18e3fd20e0b14f4c852a956b7471c0fb11c9 | /7_14_longest_public_prefix.py | 411f468a7c368a845760dd4a1bcf2458766d644a | [] | no_license | Kiriyamaku/learning_algorithm | efd8bc18b9cce978e30dfd4cd2e48d451a3e8429 | 6a1886477c0cccf24b077d175804866f2c76028a | refs/heads/master | 2022-12-11T11:13:44.736019 | 2020-08-22T03:36:49 | 2020-08-22T03:36:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 649 | py | class Solution(object):
def longestCommonPrefix(self, strs):
"""
:type strs: List[str]
:rtype: str
"""
result=[]
for index,letter in enumerate(strs[0]):
print(strs[1:])
for word in strs[1:]:
print(word)
print(ind... | [
"[email protected]"
] | |
6892bb43785b7888d4248352098f68fab19ad9bd | 3879d1ca43c573c209f962182cd1e7f7fe978fbf | /leetcode/2011. Final Value of Variable After Performing Operations/2011.py | 0af1a0518557b593bab1bfbcfcc10daf5e12eebf | [] | no_license | DoctorLai/ACM | 34a5600a5adf22660c5d81b2d8b7a358be537ecf | aefa170f74c55c1230eb6f352770512b1e3f469e | refs/heads/master | 2023-09-01T02:13:01.604508 | 2023-08-31T15:42:07 | 2023-08-31T15:42:07 | 146,173,024 | 62 | 18 | null | 2020-10-11T13:19:57 | 2018-08-26T11:00:36 | C++ | UTF-8 | Python | false | false | 393 | py | # https://helloacm.com/teaching-kids-programming-final-value-of-variable-after-performing-operations-via-reduce-function/
# https://leetcode.com/problems/final-value-of-variable-after-performing-operations/
# EASY, LAMBDA
class Solution:
def finalValueAfterOperations(self, operations: List[str]) -> int:
re... | [
"[email protected]"
] | |
d9ff25c429389600a7664368ae7dfe218df68cf7 | bc02e2c69f425e03b609f466b0a2d52a455765dc | /0524/정수 삼각형_김현성.py | aecf9418b3d76d01db1b968653c3924d5a3df0dd | [] | no_license | gaberani/AlgorithmStudy | d795f449fe185c3993df90173f27b7eb74e02366 | 6d9d20ac29446d22f2e0ef7037f131c4a2f48762 | refs/heads/master | 2023-02-03T03:24:45.039238 | 2020-12-22T12:53:52 | 2020-12-22T12:53:52 | 287,101,596 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 428 | py | n = int(input())
tri = [list(map(int, input().split())) for _ in range(n)]
# print(tri)
# 맨 왼쪽이면 무조건 자신 오른쪽 위를 더함
for i in range(1, n): # 첫번째 줄은 뺌
for j in range(i+1):
if j == 0:
tri[i][j] += tri[i-1][j]
elif j == i:
tri[i][j] += tri[i-1][j-1]
else:
tri... | [
"[email protected]"
] | |
4d73d8011aa6a57fb0f1a14eb63edbfd1dc93fdd | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /5WvxKLK55JvT8NLfR_12.py | 93e7a18be50b5ea02c4e61e23f3ac3de275208a6 | [] | 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,833 | py | """
A square matrix (same number of rows as columns) is called _row diagonally
dominant_ if "the absolute value of each entry in the main diagonal is
strictly larger than the sum of the absolute values of the other entries in
that row".
To illustrate ...
[
[10, 3, 6],
[2, -9, -6],
[1, -1, 4]
... | [
"[email protected]"
] | |
0427134f48809a05a4591c82d7d171b9583a9c2a | dd72348fc25e5a844e18f4fd6eff326a143f5852 | /Chapter 02/nn_architecture/mnist.py | c7fbf893f7d04056d47b9044f7316181168b8617 | [
"MIT"
] | permissive | bpbpublications/Time-Series-Forecasting-using-Deep-Learning | 3d76a74b0106decefa8a6fb27e3379211416d928 | fd84553d33e912edb4a1400af0f9374e72747457 | refs/heads/main | 2023-09-02T23:42:19.707131 | 2021-10-19T16:45:28 | 2021-10-19T16:45:28 | 409,091,964 | 20 | 13 | null | null | null | null | UTF-8 | Python | false | false | 763 | py | import torch.nn as nn
import torch.nn.functional as F
class MnistModel(nn.Module):
def __init__(self):
super(MnistModel, self).__init__()
self.conv1 = nn.Conv2d(1, 10, kernel_size = 5)
self.conv2 = nn.Conv2d(10, 20, kernel_size = 5)
self.conv2_drop = nn.Dropout2d()
self.fc... | [
"[email protected]"
] | |
ad11f693f8998e904ba57a59f2b2a3e5b9cbdab4 | e82b761f53d6a3ae023ee65a219eea38e66946a0 | /All_In_One/addons/InteractionOps/operators/iops.py | 414d2054a0fa5bc9c908cc9342fe8a541f7004ff | [] | no_license | 2434325680/Learnbgame | f3a050c28df588cbb3b14e1067a58221252e2e40 | 7b796d30dfd22b7706a93e4419ed913d18d29a44 | refs/heads/master | 2023-08-22T23:59:55.711050 | 2021-10-17T07:26:07 | 2021-10-17T07:26:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,756 | py | import bpy
class IOPS(bpy.types.Operator):
bl_idname = "iops.main"
bl_label = "IOPS"
bl_options = {"REGISTER", "UNDO"}
modes_3d = {0: "VERT", 1: "EDGE", 2: "FACE"}
modes_uv = {0: "VERTEX", 1: "EDGE", 2: "FACE", 3: "ISLAND"}
modes_gpen = {0: "EDIT_GPENCIL", 1: "PAINT_GPENCIL", 2: "SCULPT_GPENC... | [
"[email protected]"
] | |
7ff23331c1eb0d2eebc99527903657b00726812c | 496a63f41fa32e2bb3ecce0d35ff4374f1c02ad5 | /src/scripting/parser/combinator/phrase.py | 5ea68e0c555f1e424e15a43ff0aa9d39dd4eee26 | [
"BSD-3-Clause"
] | permissive | vincent-lg/avenew.one | bbfa8d44e68db943b8825e9d4a32a43e985778fe | fb7f98d331e47e2032ee1e51bf3e4b2592807fdf | refs/heads/main | 2023-02-14T00:28:53.511552 | 2021-01-13T11:13:07 | 2021-01-13T11:13:07 | 330,207,053 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,428 | py | # Copyright (c) 2020-20201, LE GOFF Vincent
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.