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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e1e61cd4ef9166e1611b2c6ef5f6fb8843d4461f | 9bad4a99448df1957981d8c2fbd3ef4001d71fea | /a-3-6-1-take pictures.py | fddd724f0c4b653eb41e5300cdf2080766f8d2fd | [] | no_license | paulcwlin/raspi-AIoT-test | a991cac81335c4036cf34d48a9824a8fa077e1c7 | ada56e0668c07a9575a82023dff38e02c0b9220e | refs/heads/master | 2023-04-19T06:23:26.122336 | 2021-04-29T10:00:25 | 2021-04-29T10:00:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,226 | py | import cv2
ESC = 27
n = 1
index = 0
total = 100
def saveImage(face_image, index):
filename = '/home/pi/Documents/raspi-AIoT-test/images/h1/{:03d}.jpg'.format(index)
cv2.imwrite(filename, face_image)
print(filename)
faceCascade = cv2.CascadeClassifier('/home/pi/opencv/opencv-master/data/haarcascades/haa... | [
"bauroad@gmail.com"
] | bauroad@gmail.com |
d9490cc769b627d539016c7c03a8e2e7f239b62d | 2d925dda36ff0eefcaf5c90e458c2b22535aa4f7 | /anagram/anagram.py | 8fb6d872752ab60846d7c0c059105a30579f40cd | [] | no_license | butterflylady/exercism | 0e06fd1a037cebf9e5557007a1bca9f7fc8cb55a | db269c86f5bea138cd9754a9598803f9db28958a | refs/heads/master | 2023-02-21T14:08:14.031962 | 2021-01-31T15:28:40 | 2021-01-31T15:28:40 | 334,437,701 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 241 | py | def find_anagrams(word, candidates):
output = []
for candidate in candidates:
if sorted(candidate.lower()) == sorted(word.lower()) and candidate.lower() != word.lower():
output.append(candidate)
return output
| [
"mpaluyanava@gmail.com"
] | mpaluyanava@gmail.com |
c417b65d88af2a41f1a6f2a8abc0ebe574230c12 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /tbz5ji3ocwzAeLQNa_17.py | e50d572a8bfe14ab16d76f9f91ad29fc1f351a4f | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 698 | py |
def exit_maze(maze, directions):
l = len(maze)
w = len(maze[0])
for y in range(l):
for x in range(w):
if maze[y][x] == 2:
sx = x
sy = y
for i in directions:
if i == 'N':
sy -= 1
elif i == 'E':
sx += 1
... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
972e96e0720ba97f5e6daa01c0c6ae41da58743c | 40195e6f86bf8620850f0c56e98eae5693e88277 | /coremltools/converters/mil/frontend/tensorflow2/ssa_passes/test_v2_passes.py | 8b9ec829878c1c138997390b2bd3ce30180b7664 | [
"MIT",
"BSD-3-Clause"
] | permissive | apple/coremltools | 009dfa7154d34cab8edcafa618e689e407521f50 | feed174188f7773631a3d574e1ff9889a135c986 | refs/heads/main | 2023-09-01T23:26:13.491955 | 2023-08-31T18:44:31 | 2023-08-31T18:44:31 | 95,862,535 | 3,742 | 705 | BSD-3-Clause | 2023-09-14T17:33:58 | 2017-06-30T07:39:02 | Python | UTF-8 | Python | false | false | 1,850 | py | # Copyright (c) 2020, Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can be
# found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
import copy
import numpy as np
from coremltools.converters.mil.mil import Builder as mb
from coreml... | [
"noreply@github.com"
] | apple.noreply@github.com |
de17d29ef0e4c7870bf659be6303286e52e36dff | eb6a65c8eaa9d430d9b30240dccbfb4f99c34115 | /server/core/migrations/0006_deposit.py | c6c140460f87e2edff97534af98ed66cb9d832d8 | [] | no_license | dopeboy/underline | 17c2658b95cada089325cf28ad23211b4622e480 | 9028c444771f0ac8bd7d0f2c7ed326d338bf80ab | refs/heads/main | 2023-06-17T15:49:49.511694 | 2021-07-14T21:48:38 | 2021-07-14T21:48:38 | 335,760,303 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 908 | py | # Generated by Django 3.1.6 on 2021-02-25 22:31
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('core', '0005_slip_entry_... | [
"arithmetic@gmail.com"
] | arithmetic@gmail.com |
1d6ab9387bb79ad61478237022abe9051420f9df | e523770b755a43accfa02ee3ea86af4aeac438e7 | /0_startcamp/day1/list1.py | fe1002030eee81ac5ee114d5bc0f89f22c828945 | [] | no_license | AhnDogeon/TIL | a21f8e70bdd917fd1ec58d55955fa6b3e70c4ca4 | b4ae78b7c6c08ab6076312ba3b44493248ab5195 | refs/heads/master | 2022-11-30T10:14:32.880643 | 2021-02-11T16:09:27 | 2021-02-11T16:09:27 | 162,255,917 | 1 | 1 | null | 2022-11-22T03:46:04 | 2018-12-18T08:32:42 | Jupyter Notebook | UTF-8 | Python | false | false | 201 | py | numbers = [1, 2, 3] # 변수 이름은 뜻을 담아서 짓자!
family =['mom', 1.64, 'dad', 1.75, 'sister', 1.78, True]
mcu = [
['ironman', 'captain'],
['xmen','deadpool'],
['spiderman']
] | [
"qltiqlti@gmail.com"
] | qltiqlti@gmail.com |
3da2c220a49a54cea7eca6b1aa7aff30b2b7c283 | 99dcb18a9e3ea367272f740b8cbf3c34285a0c08 | /samples/generated_samples/aiplatform_generated_aiplatform_v1_tensorboard_service_write_tensorboard_run_data_sync.py | b29147d3fc8c9dc447b2e378c7ab7777942fd231 | [
"Apache-2.0"
] | permissive | googleapis/python-aiplatform | 926a4873f35dbea15b2fd86c0e16b5e6556d803e | 76b95b92c1d3b87c72d754d8c02b1bca652b9a27 | refs/heads/main | 2023-08-19T23:49:02.180075 | 2023-08-19T13:25:59 | 2023-08-19T13:27:27 | 298,017,988 | 418 | 240 | Apache-2.0 | 2023-09-14T21:08:33 | 2020-09-23T15:43:39 | Python | UTF-8 | Python | false | false | 1,814 | 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 or... | [
"noreply@github.com"
] | googleapis.noreply@github.com |
56d35c8be025ff1d54f1f4ad818ab5e623008fe1 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/otherforms/_herding.py | 2aa0cb990f8008f89f85be0e917a16355fd6d51e | [
"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 | 218 | py |
#calss header
class _HERDING():
def __init__(self,):
self.name = "HERDING"
self.definitions = herd
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.basic = ['herd']
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
ab6114c3cbc6fcae25a05ce741d018a20a657aba | eaf319e5d25a9bbf9ce9bb9ff596efda7e0b1ac5 | /deviceselectwidget.py | ca3592aeca69218454512895becb6d9b83e840af | [] | no_license | igrekus/mult_i1_measure | 4a3e43b99c66e0288bb042ecb47907c60aa3c224 | bcee674c0cfcb5f7de02dcf5d804b7a5be3449aa | refs/heads/master | 2020-05-24T01:04:14.936612 | 2019-08-19T10:38:51 | 2019-08-19T10:38:51 | 187,028,327 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,157 | py | from PyQt5.QtCore import pyqtSignal, pyqtSlot
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QRadioButton, QButtonGroup, QLabel, QComboBox
class DeviceSelectWidget(QWidget):
selectedChanged = pyqtSignal(str)
def __init__(self, parent=None, params=None):
super().__init__(parent=parent)
se... | [
"upload234@mail.ru"
] | upload234@mail.ru |
b195df519818411291df92af9e17a1398789bfd5 | c155d27bf74255b8315603518c5ab76d0638dfea | /uv/serpens/flux_correlation_CN_HCN_log_Jy_v2.py | 749360d463819d4bdba2436ddab099aedfe9d64d | [] | no_license | amirocha/doktorat | 406c2e4476a5a22c863c37eb5f581a369800e936 | 22c90228f6bca9d0b116c73457b7e86ae4462167 | refs/heads/master | 2021-07-05T14:18:26.324886 | 2020-08-03T19:28:50 | 2020-08-03T19:28:50 | 152,316,686 | 0 | 0 | null | 2020-04-03T20:22:37 | 2018-10-09T20:28:29 | Python | UTF-8 | Python | false | false | 4,578 | py | """Flux correlation"""
import matplotlib.pyplot as plt
import numpy as np
import scipy.stats as stat
import math as m
from scipy.stats import linregress as regr
DIST=436. #Ortiz-Leon 2017
L_sun = 3.86e26 #W
freq = {'CN': 113490985000, 'HCN': }
c = 299792458 # m/s
k = 1.38e-23 #Boltzmann constant [J/K]
conversion_... | [
"mirochagnieszka@gmail.com"
] | mirochagnieszka@gmail.com |
0b3748a7100aa612a78fc96bc481e5e90e940cf3 | 78518b65b6823ac42b20515ae7716ada4b59db3d | /手写代码/第17章 智能算法/17_3.py | 33d3e08f23e41d7ca1f5669656876126df991ba9 | [] | no_license | YunHao-Von/Mathematical-Modeling | 70d6ad8f2f543751883afdc85aa19b1c80a106a0 | 4fe153453cccb4b474166c104e08d13ed72bc5ac | refs/heads/master | 2023-03-02T23:16:40.839865 | 2021-02-15T09:52:24 | 2021-02-15T09:52:24 | 339,029,227 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 326 | py | from sklearn.linear_model import Perceptron
import numpy as np
x0 = np.array([
[-0.5, -0.5, 0.3, 0.3],
[-0.5, 0.5, -0.5, 1.0]
]).T
y0 = np.array([1, 1, 0, 0])
md = Perceptron(tol=1e-3)
md.fit(x0, y0)
print(md.coef_, md.intercept_)
print(md.score(x0, y0))
print("预测值为:\n", md.predict(np.array([[-0.5, 0.2]])))
| [
"Alctrain@163.com"
] | Alctrain@163.com |
6d92a891992f6af7b4de9006ce4e62ea9be8b1ea | c828f5c86e8ae7a157bd3f212c4bd754ee04e5e7 | /exercise_coding_test_6.py | ed190e91d5b9b242bf252dd4909b7e95c6804591 | [] | no_license | SeungHune/beakjun | c319e33f10a3dfd3acb090a7872b900ed92c5419 | 5d4610557aa56efc41053954299924ab890812f2 | refs/heads/master | 2020-12-03T04:37:48.054739 | 2020-11-10T10:50:17 | 2020-11-10T10:50:17 | 231,204,761 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 714 | py | # 정렬 - 가장 큰 수
def solution(numbers):
if sum(numbers) == 0:
return "0"
new_numbers = []
for num in numbers:
new_numbers.append(str(num) * 3)
new_numbers.sort(reverse=True)
# print(new_numbers)
answer = ""
for num in new_numbers:
if len(num) == 3:
answer +... | [
"xyz9080@naver.com"
] | xyz9080@naver.com |
7917887add58e4ea0bcdad9defeb3a862053a299 | 53aaac91271841228909dd58ba85ef724d00bbb6 | /animatedsprite.py | 4ce1180450629887c0935e7d45eb942faeb926fd | [] | no_license | ateoto/pysfmltest | 87f718894ade45132074a66876e42fb3703ccff5 | 2178bb3c38ac84f7106a8c0006ed671306fe41a7 | refs/heads/master | 2021-01-15T23:40:09.112780 | 2012-08-29T05:50:15 | 2012-08-29T05:50:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,819 | py | import sfml as sf
from collections import deque
"""
texture = sf.Texture.load_from_file('data/art/male_walkcycle.png')
frames = deque()
for f in range(0, texture.width, 64):
frames.append(AnimationFrame(texture, sf.IntRect(0,f,64,64), 0.1)
walkcycle_north = Animation([
AnimationFrame(tex... | [
"mattmccants@gmail.com"
] | mattmccants@gmail.com |
215616e2ea755088fa21f32a70300b14cf208f9c | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2140/60829/285720.py | 898bdad05e5dd21e0d4d2646299d9c486b4d186d | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 426 | py | nn=int(input())
for p in range(nn):
a=int(input())
n=1
res=""
kk=a
while a>0:
if n%2==0:
a=a-1
res=res+str(n//2)+" "
else:
a=a-n//2-1
for s in range(n//2+1):
res=res+str(kk)+" "
kk -= 1
n=n+1
... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
3dd7c3f65e14b78958e8369738bb17b7439df1b5 | c4a57dced2f1ed5fd5bac6de620e993a6250ca97 | /huaxin/huaxin_restful_service/restful_xjb_service/v1_services_fund_findhotsearchproduct_entity.py | 937e9b0575a6717a572f56f3bd8ef4aa2b8546be | [] | no_license | wanglili1703/firewill | f1b287b90afddfe4f31ec063ff0bd5802068be4f | 1996f4c01b22b9aec3ae1e243d683af626eb76b8 | refs/heads/master | 2020-05-24T07:51:12.612678 | 2019-05-17T07:38:08 | 2019-05-17T07:38:08 | 187,169,391 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,811 | py | import json
from code_gen.lib.basic_troop_service_entity_handler import BasicTroopServiceEntityHandler
DOMAIN_NAME = u'10.199.111.2'
URL = u'http://%s/V1/services/fund/findHotSearchProduct?'
BODY_DATA = ''
_BODY_DATA = ''
if BODY_DATA:
_BODY_DATA = json.loads(BODY_DATA)
QUERY_DATA = u'timestamp=1495434109309&nonce... | [
"wanglili@shhxzq.com"
] | wanglili@shhxzq.com |
f98452e0f21a9c1056e0c1d3c53317f9bf629ff5 | 76c14138689216634ca12b5e1bc0947a9866b1b0 | /aa/PYT/file_han/aa.py | 0459b8ea210dea61036e1e28d403896cd6d919c4 | [] | no_license | KSrinuvas/ALL | 4b0c339bfeb8780232f3853e5fc53c40b84c9cb7 | 9251464a27a98f98e1055ebf129d6934a02e8ffc | refs/heads/master | 2020-12-06T21:59:33.449669 | 2020-03-15T17:05:42 | 2020-03-15T17:05:42 | 232,560,914 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 900 | py | #!/usr/bin/python3
import re
import os
## write a file
fobj = open("aa.txt","w")
print (fobj.mode)
fobj.write("this is srinu\n")
fobj.write("this is my email address ss123@gmail.com\n")
fobj.write("good bye\n")
## close file handler
fobj.close()
## read file
fh = open("aa.txt","r")
print (fh.name)
prin... | [
"Srinuvas935@gmail.com"
] | Srinuvas935@gmail.com |
e0c984afcd1f4fccb80e153c90f1627ada1af52a | fe15d678aeece784bb9fdd5e7211bedab98f79ea | /sib_api_v3_sdk/models/send_smtp_email_sender.py | fa3c3f0de73ba8dcd2e349ffefac9f341ff96cb2 | [
"MIT"
] | permissive | Edraak/APIv3-python-library | bec8014814ca5a3eaa98dad0f9a3b71acc71316c | 4a97bf479d92ca08d5a2881ac37e397d3a1846b4 | refs/heads/master | 2022-04-16T18:18:37.406313 | 2020-04-10T19:02:09 | 2020-04-10T19:02:09 | 254,713,617 | 0 | 0 | MIT | 2020-04-10T19:00:58 | 2020-04-10T19:00:57 | null | UTF-8 | Python | false | false | 4,935 | py | # coding: utf-8
"""
SendinBlue API
SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at h... | [
"aakanksha@sendinblue.com"
] | aakanksha@sendinblue.com |
fe52028f642c5e303add875b04d4a7db496a04c2 | 3a458d9efb62c055542beb6685c7250910bc4fdc | /awx/main/tests/functional/models/test_job_options.py | 65add96de980233a1f7b8f1793bc264e384e6cea | [
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"Python-2.0",
"Apache-2.0"
] | permissive | aperigault/awx | 2e1b8c56592fdc20812b0c3841fb836d1a7a61a8 | 2ef840ce128a8028fe63b01b47bc5be5304062b2 | refs/heads/devel | 2021-11-21T03:28:31.346758 | 2021-10-12T18:19:40 | 2021-11-16T15:27:27 | 125,395,064 | 0 | 0 | Apache-2.0 | 2018-07-13T13:37:14 | 2018-03-15T16:22:23 | Python | UTF-8 | Python | false | false | 759 | py | import pytest
from awx.main.models import Credential
@pytest.mark.django_db
def test_clean_credential_with_ssh_type(credentialtype_ssh, job_template):
credential = Credential(name='My Credential', credential_type=credentialtype_ssh)
credential.save()
job_template.credentials.add(credential)
job_temp... | [
"rpetrell@redhat.com"
] | rpetrell@redhat.com |
e518e98488120860bfe9a632e9bdb823a1476118 | 06c41f009777395c38a66abf639cb5717b240e15 | /test/_compat.py | 3e6293e1808f4260efe93824291b3bc82462764c | [
"MIT"
] | permissive | hibtc/madgui-old | 6c7a5f1ecd455f1814a01524446c751255c75052 | 18241115b6c3c3ec8ba76c0ec10a894937ffc3c7 | refs/heads/master | 2021-10-22T16:25:25.371717 | 2016-10-06T14:37:50 | 2016-10-06T14:37:50 | 14,426,207 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 511 | py | import unittest
class TestCase(object):
"""
Compatibility layer for unittest.TestCase
"""
try:
assertItemsEqual = unittest.TestCase.assertCountEqual
except AttributeError:
def assertItemsEqual(self, first, second):
"""Method missing in python2.6 and renamed in python3... | [
"t_glaessle@gmx.de"
] | t_glaessle@gmx.de |
9b922048184f18e43a4b6d17868455c9307961a0 | 73a8f5027f7bc1937d63cd54d07cd0d0652b6914 | /532_K-diff_Pairs_in_an_Array.py | 30a98a2d01df114fc7da58a6f7fac78a4c824066 | [] | no_license | jincurry/LeetCode_python | 0891cd4879c44cfb67df870de529c1bdd89c9954 | d9c1061fefc5f42474b7dd8e2d3854825eeff45f | refs/heads/master | 2021-06-18T01:50:46.551949 | 2019-05-07T14:00:11 | 2019-05-07T14:00:11 | 115,329,517 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,676 | py | # Given an array of integers and an integer k, you need to find the number of unique
# k-diff pairs in the array. Here a k-diff pair is defined as an integer pair (i, j),
# where i and j are both numbers in the array and their absolute difference is k.
#
# Example 1:
# Input: [3, 1, 4, 1, 5], k = 2
# Output: 2
# Explan... | [
"jintao422516@gmail.com"
] | jintao422516@gmail.com |
8ea5e884675f24b3efd9298b90c893e3ca4606c1 | c105797a5b6f5aca0b892ccdadbb2697f80fb3ab | /python_base/base9/base9_6/test_base9_6_8.py | 0f4b4c47bf83ee51ee523ad09b3439685b825c78 | [] | no_license | jj1165922611/SET_hogwarts | 6f987c4672bac88b021069c2f947ab5030c84982 | fbc8d7363af0a4ac732d603e2bead51c91b3f1f7 | refs/heads/master | 2023-01-31T19:41:27.525245 | 2020-12-15T13:43:45 | 2020-12-15T13:43:45 | 258,734,624 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 423 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2020-05-17
# @Author : Joey Jiang
# @File : test_9_6_8.py
# @Software : Pycharm
# @Description: 测试报告美化与定制
'''
通过allure.attach("xxxx",attachment_type,exntension)加入纯文本信息
'''
import pytest
import allure
def test_attach_text():
allure.attach("这... | [
"1165922611@qq.com"
] | 1165922611@qq.com |
8e410733b7c830155aaf12fbd8f8472e561c5cda | 8afb5afd38548c631f6f9536846039ef6cb297b9 | /MY_REPOS/misc-experiments/_FIREBFIRE/grpc/doc/python/sphinx/conf.py | 6e4bfab7d0edbc549c44c0323f157ca1c924de20 | [
"Apache-2.0",
"MIT"
] | permissive | bgoonz/UsefulResourceRepo2.0 | d87588ffd668bb498f7787b896cc7b20d83ce0ad | 2cb4b45dd14a230aa0e800042e893f8dfb23beda | refs/heads/master | 2023-03-17T01:22:05.254751 | 2022-08-11T03:18:22 | 2022-08-11T03:18:22 | 382,628,698 | 10 | 12 | MIT | 2022-10-10T14:13:54 | 2021-07-03T13:58:52 | null | UTF-8 | Python | false | false | 3,626 | py | # Copyright 2018 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
"bryan.guner@gmail.com"
] | bryan.guner@gmail.com |
03604ba84c2c5d0bebc993dcfe4c9ac30d9582d2 | e23a4f57ce5474d468258e5e63b9e23fb6011188 | /125_algorithms/_exercises/templates/LeetCode In Python/Section 13 INTERVIEW QUESTIONS Backtracking_Recursion/subsets/index.py | 4e46e6557bce57042cabb2c1408c1c12629276e2 | [] | no_license | syurskyi/Python_Topics | 52851ecce000cb751a3b986408efe32f0b4c0835 | be331826b490b73f0a176e6abed86ef68ff2dd2b | refs/heads/master | 2023-06-08T19:29:16.214395 | 2023-05-29T17:09:11 | 2023-05-29T17:09:11 | 220,583,118 | 3 | 2 | null | 2023-02-16T03:08:10 | 2019-11-09T02:58:47 | Python | UTF-8 | Python | false | false | 425 | py | # c_ Solution
# ___ solution nums ans cur index
# __ i.. > le. n..
# r_
# a__.ap.. c.. :
# ___ i __ ra.. i.. le. n..
# __ n.. ? no. __ c..
# c__.ap.. n.. ?
# .s.. ? ? ? ?
# c__.p..
# r_
# ___ subsets nums L..... | [
"sergejyurskyj@yahoo.com"
] | sergejyurskyj@yahoo.com |
30b534d409fdddb82db90e74490f1ffe75c06b86 | 337e04c14a975868229cd2cdda3bcacfdf016869 | /src/exp/dataset.py | c66040f5457d7c8309df38bd0087f1f5c646c178 | [] | no_license | esddse/IEN | 966ea827991b898900c5dc4cea9accf971d7e52c | 175d6be32e11135287c59c66c4d743b5c2782d52 | refs/heads/master | 2023-01-20T09:03:04.030694 | 2020-11-16T09:10:23 | 2020-11-16T09:10:23 | 300,647,427 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,306 | py | import os
import sys
import time
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..")))
import math
import random
import torch
import torch.autograd as autograd
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.utils.d... | [
"tjz427@sina.cn"
] | tjz427@sina.cn |
eab0ae860ce7d4455552dd826541ec4705c7b60c | b9a69d7de64b96623d519394d59286f774e92c1f | /mnist-classification/src/model/net.py | 834f07afb7480521e83b753958f8fc64e4e204b6 | [
"MIT"
] | permissive | Ronalmoo/DataScience | abb20320c7fe5b68192e1ceeb956eb199bb1aecb | 175f610acaa50898a3899bfaddfbb5530ef640a9 | refs/heads/main | 2023-05-02T23:44:40.824085 | 2021-05-26T08:01:31 | 2021-05-26T08:01:31 | 370,643,477 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,829 | py | import copy
from typing import Dict, List, Optional
import torch
import torch.nn as nn
from omegaconf import DictConfig, OmegaConf
from torchsummary import summary as torch_summary
class LinearBlock(nn.Module):
def __init__(
self,
in_features: int,
out_features: int,
bias: bool = ... | [
"ydaniel0826@gmail.com"
] | ydaniel0826@gmail.com |
bcf9d5165d2472f4481ea6adbbe98aeff68e9357 | 07cf86733b110a13224ef91e94ea5862a8f5d0d5 | /organizing_containers_of_balls/organizing_containers_of_balls.py | 2e9ae573293f4edce2c0ed2d9a2559bd066b30f0 | [] | no_license | karsevar/Code_Challenge_Practice | 2d96964ed2601b3beb324d08dd3692c3d566b223 | 88d4587041a76cfd539c0698771420974ffaf60b | refs/heads/master | 2023-01-23T17:20:33.967020 | 2020-12-14T18:29:49 | 2020-12-14T18:29:49 | 261,813,079 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,432 | py | def organizingContainers(container):
print(container)
# create an array that will carry the rows
# create an array that will carry the cols
# create a for loop that will iterate through the each row
# make sure to sum the total of all the values in the current
# row and append it t... | [
"masonkarsevar@gmail.com"
] | masonkarsevar@gmail.com |
f8fb7ecfc93e7df33edbc3b69d85e82ce8301512 | 0f9b6a33a5e2ce627db75d1bcc34bc3f3674335b | /hitconctf/2019/PoE/exploit-luna.py | 52b254aa88fc98903c1caff7fa1c9758dc87c315 | [] | no_license | hnoson/writeups | 359a33b03286bab19359ad9b089e6f3bfe4fb708 | 05550e3c462108f6c5ba0b69f65694e2eb1dc9b3 | refs/heads/master | 2021-10-07T18:21:26.041101 | 2021-10-03T10:22:31 | 2021-10-03T10:22:31 | 119,823,623 | 7 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,474 | py | #!/usr/bin/env python
from pwn import *
def proofofwork():
s.recvline()
s.sendline(process(['hashcash', '-mb25', s.recvline(False).split(' ')[2]]).recvline(False).split(': ')[1])
if len(sys.argv) == 1:
s = process('./run.sh')
else:
s = remote('13.230.132.4', 21700)
proofofwork()
elf = ELF('./luna... | [
"hiroki015@gmail.com"
] | hiroki015@gmail.com |
cea6cd25d2468ada9807bec6d45b481c79331e03 | 98895f2c4a11195495e4e94d7b1821d3ec229f17 | /blockchain-env/Lib/site-packages/pubnub/models/consumer/pubsub.py | 8c8e3eac97b429df2b278505652433e00885d04c | [
"MIT"
] | permissive | zarif007/Block-Chain-Web-App | 130a0e44fb84c622a6fbc496ead1a45b0caf6065 | 40bd4d8d8ce1f6de2840792290bf022d7dfacbb4 | refs/heads/main | 2023-02-20T01:32:41.974440 | 2021-01-23T20:04:01 | 2021-01-23T20:04:01 | 317,946,069 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,655 | py | import six
from pubnub.models.consumer.message_actions import PNMessageAction
class PNMessageResult(object):
def __init__(self, message, subscription, channel, timetoken, user_metadata=None, publisher=None):
assert message is not None
if subscription is not None:
assert isinstance(su... | [
"zarifhuq786@gmail.com"
] | zarifhuq786@gmail.com |
c195715efd133bb7dc0c497d1178122f5a11b55f | 5ae45b99eb9c590f64f3a7d3f1b26915bef87831 | /solutions/040/040.py | 14a25ca0a1cb4b5aab7c9e665966f2f5922edfd8 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | jwmcgettigan/project-euler-solutions | 5c4cb7fb32e9ba4f3d9b0edc89853275c302ee03 | f06b6551e713619d5fd1359ee2f96fcff61c425b | refs/heads/master | 2023-07-13T21:24:03.961946 | 2021-08-19T21:03:12 | 2021-08-19T21:03:12 | 289,103,259 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,121 | py | """
Project Euler - Problem Solution 040
Problem Title - Champernowne's constant
Copyright (c) Justin McGettigan. All rights reserved.
https://github.com/jwmcgettigan/project-euler-solutions
"""
#TODO: Come back and make this more readable.
def fractional_part(nth):
''' Finds the nth digit of Champernowne's constan... | [
"jwmcgettigan@gmail.com"
] | jwmcgettigan@gmail.com |
7be7ca5f44475ebbd989603850bd4eff428e5a08 | 6c704d6e8a3d0e2d170f9a7f16a290e4d0957f01 | /find_mode_in_bst_.py | 96e77b037fca4066f08f1a6725744988dcb2558d | [] | no_license | savourylie/leetcode | da68dbaabdf0041b3b2d0e59de7459e495fd1e53 | 41cd68d9be796b690063f81a57f120025abb4f96 | refs/heads/master | 2021-01-22T03:33:19.150030 | 2019-04-06T17:42:32 | 2019-04-06T17:42:32 | 92,387,135 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 825 | py | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def __init__(self):
self.counter = {}
def findMode(self, root):
"""
:type root: TreeNode
... | [
"calvin.j.ku@googlemail.com"
] | calvin.j.ku@googlemail.com |
e90603143ef5ac15c5d869fb9f19119e327fc612 | 4e02d5b0b1b0739553fd40bbbdfb0d02c9830350 | /1331_Rank_Transform_of_an_Array.py | 53736326481173dbf7a9c31efa601089bb5ce9d6 | [] | no_license | bingli8802/leetcode | b039ab6af62f0c8992463393f561caafd21056e6 | a509b383a42f54313970168d9faa11f088f18708 | refs/heads/master | 2023-03-29T03:11:45.801090 | 2021-03-23T22:55:16 | 2021-03-23T22:55:16 | 279,321,659 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 337 | py | def arrayRankTransform(self, arr):
"""
:type arr: List[int]
:rtype: List[int]
"""
a = sorted(set(arr))
dic = collections.defaultdict(int)
for k, v in enumerate(a):
dic[v] = k + 1
for i in range(len(arr)):
arr[i] = dic[arr[i]]
... | [
"noreply@github.com"
] | bingli8802.noreply@github.com |
09188c53652691e27604a50974d29388261f325f | 0876d217bd18a8a3dbf462a015b4b9b3b37fc0b9 | /plugins/user_quota/setup.py | 3aa30bdcb4df850f7b16b4a5f5af855fee95956f | [
"Apache-2.0"
] | permissive | mbrukman/girder | ec986802d952925d3f2c4196a152c13d331d602d | c4d8e9f9847f1d19079e32b9df31817ad4c0ddea | refs/heads/master | 2020-04-27T16:06:30.186083 | 2019-03-07T17:48:38 | 2019-03-07T17:48:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,933 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright 2013 Kitware Inc.
#
# Licensed under the Apache License, Version 2.0 ( the "License" );
# you may not use this file except in compliance with the License.
# You may obtain a cop... | [
"jonathan.beezley@kitware.com"
] | jonathan.beezley@kitware.com |
5a162275f2bc74d1096b788d6c83ff51e35a756b | 68b2e5981caadabd6a4ecec5dab69831979b33f2 | /home/views.py | 728ccaccb3505218a1d209609c9055bd4de840d2 | [] | no_license | linker10/jodep | a78b853743b701ef3a63ed6f8555e280e20f1048 | 7f533e9ee68e57eb19a874390e087ca19d786d60 | refs/heads/master | 2022-12-30T20:34:06.721603 | 2020-10-14T17:14:15 | 2020-10-14T17:14:15 | 292,902,953 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 752 | py | from django.shortcuts import render
from . import forms
# Create your views here.
def index(request):
return render(request, 'home/index.html', {})
def hire(request):
return render(request, 'home/embaucher.html', {})
def work(request):
return render(request, 'home/travailler.html', {})
def career_cente... | [
"bilalsharif4@gmail.com"
] | bilalsharif4@gmail.com |
8a5ea54f00eb6fdcb32e2b97441e82db4f04f4b1 | fe70774ff6898c5bdb0c941b4f335de576abfdb6 | /autotest/test_util_geometry.py | a727f7b5d9f5c8fac277633719c559ca1b644a4e | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | robinthibaut/flopy | 35af468415d1ba6e1de119a7cb335381304fada9 | 22ef330bcfb9259fc23735d6b174d27804b624a0 | refs/heads/develop | 2023-06-30T21:43:24.101593 | 2023-06-13T19:46:03 | 2023-06-13T19:46:03 | 255,560,877 | 0 | 0 | BSD-3-Clause | 2022-10-10T12:23:38 | 2020-04-14T09:05:42 | null | UTF-8 | Python | false | false | 734 | py | import numpy as np
import pytest
from flopy.utils.geometry import is_clockwise
def test_does_isclockwise_work():
# Create some points
verts = []
verts.append([0, 20.0000, 30.0000])
verts.append([1, 18.9394, 25.9806])
verts.append([2, 21.9192, 25.3013])
verts.append([3, 22.2834, 27.5068])
... | [
"noreply@github.com"
] | robinthibaut.noreply@github.com |
b20e25d270aa6a1dcda5f1c329255d156a3e6fcf | 71ec941712decba1f7326e83c02df998a55e8fb3 | /tensorflow_datasets/core/download/downloader.py | 15b4c7183010a59b1f0d3899105beb4329f1a6b4 | [
"Apache-2.0"
] | permissive | temiafeye/datasets | 6c79d30a948c4bdac577dd2fe004aed51e079beb | 4d8c05c471c710aaf3302046b73e222a70d663c1 | refs/heads/master | 2020-04-20T18:03:50.609952 | 2019-03-11T06:27:14 | 2019-03-11T06:27:14 | 169,007,422 | 0 | 0 | null | 2019-02-03T23:57:17 | 2019-02-03T23:57:17 | null | UTF-8 | Python | false | false | 5,204 | py | # coding=utf-8
# Copyright 2018 The TensorFlow Datasets Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | [
"copybara-piper@google.com"
] | copybara-piper@google.com |
0865d62dd0d7b3fc9a1aaedbe6cf6799240ddb8f | 274eb3a3c4202c86a40e13d2de7c2d6f2a982fcb | /altimeter/qj/api/base/endpoints/status.py | 3345752ca410d1b8e0fbd80b24d6b5ff39d934dc | [
"MIT",
"Python-2.0"
] | permissive | tableau/altimeter | 6199b8827d193946bb0d0d1e29e462fc8749d3e4 | eb7d5d18f3d177973c4105c21be9d251250ca8d6 | refs/heads/master | 2023-08-15T16:21:31.265590 | 2023-07-04T13:13:32 | 2023-07-04T13:13:32 | 212,153,766 | 75 | 25 | MIT | 2023-08-02T02:05:22 | 2019-10-01T17:10:16 | Python | UTF-8 | Python | false | false | 292 | py | """Endpoints for service status"""
from typing import Any
from fastapi import APIRouter
from altimeter.qj import schemas
ROUTER = APIRouter()
@ROUTER.get("", response_model=schemas.Status)
def read_status() -> Any:
"""Get application status"""
return schemas.Status(status="ok")
| [
"noreply@github.com"
] | tableau.noreply@github.com |
0097ed2047e2e481c74edb1a1535d6da760806ab | 8052aca2d072b1a0f04c1b310c188c7a26286395 | /simulator/animation.py | bb42e4d239583dff9acf9e91a4edbc626f1efac7 | [] | no_license | huangy10/VehicleDensityEstimation | 71aec734c0ef1fb2b685d902c4323e6db6a69095 | 3ca1ae84fa5336729f90b22416838aa84478caa7 | refs/heads/master | 2021-01-21T13:57:40.677699 | 2016-06-03T08:37:50 | 2016-06-03T08:37:50 | 44,721,127 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,296 | py | # -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import math, random
# 需要安装的库:Numpy和Matplotlib,推荐直接Anaconda
fig, axes1 = plt.subplots()
# 设置坐标轴长度
axes1.set_ylim(0, 1.4)
axes1.set_xlim(0, 1*np.pi/0.01)
# 设置初始x、y数值数组
xdata = np.arange(0, 2*np.pi, 0.01)
yd... | [
"woody1573@163.com"
] | woody1573@163.com |
162fe5cabb9af63b66ed3b9bf6a4cdbdfa142aa9 | 092dd56a1bf9357466c05d0f5aedf240cec1a27b | /examples/strikeslip-2d/createbc.jou | 64dd61ff4cf1944a7e4213c246c30eaedac46839 | [
"MIT"
] | permissive | rwalkerlewis/pylith | cef02d5543e99a3e778a1c530967e6b5f1d5dcba | c5f872c6afff004a06311d36ac078133a30abd99 | refs/heads/main | 2023-08-24T18:27:30.877550 | 2023-06-21T22:03:01 | 2023-06-21T22:03:01 | 154,047,591 | 0 | 0 | MIT | 2018-10-21T20:05:59 | 2018-10-21T20:05:59 | null | UTF-8 | Python | false | false | 2,282 | jou | # -*- Python -*- (syntax highlighting)
# ----------------------------------------------------------------------
#
# Brad T. Aagaard, U.S. Geological Survey
# Charles A. Williams, GNS Science
# Matthew G. Knepley, University at Buffalo
#
# This code was developed as part of the Computational Infrastructure
# for Geodyna... | [
"baagaard@usgs.gov"
] | baagaard@usgs.gov |
dfcc7f521f57ebf34370c87579f05a89740afff4 | 54f352a242a8ad6ff5516703e91da61e08d9a9e6 | /Source Codes/CodeJamData/08/02/12.py | 825210521622dc3272a540dba11a6d14fb26afff | [] | no_license | Kawser-nerd/CLCDSA | 5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb | aee32551795763b54acb26856ab239370cac4e75 | refs/heads/master | 2022-02-09T11:08:56.588303 | 2022-01-26T18:53:40 | 2022-01-26T18:53:40 | 211,783,197 | 23 | 9 | null | null | null | null | UTF-8 | Python | false | false | 1,194 | py | #!/usr/bin/env python2.5
import sys
infile = open(sys.argv[1], 'rb')
numcases = int(infile.readline())
def gettime(s):
t = s.split(":")
return int(t[0])*60 + int(t[1])
for case in xrange(1, numcases+1):
turnaround = int(infile.readline())
counts = [int(x) for x in infile.readline().split()]
a = [infile.readlin... | [
"kwnafi@yahoo.com"
] | kwnafi@yahoo.com |
120e5e404b9e11ba47a11aa081221fed40d87472 | 1012f61f46ff7aaf37cd3ce0ead64e035ec201dc | /coding-challange/leetcode/easy/~2021-10-08/2011-final-value-of-variable-after-performing-operations/2011-final-value-of-variable-after-performing-operations.py | bfef32246ea3da44b94703ca6e2e2ee38d453037 | [] | no_license | polyglotm/coding-dojo | 89efe22f5a34088e94c9e3a4e25cad510b04172a | 43da9c75e3125f5cb1ac317d275475f1c0ea6727 | refs/heads/develop | 2023-08-17T11:59:30.945061 | 2023-08-16T14:13:45 | 2023-08-16T14:13:45 | 188,733,115 | 2 | 0 | null | 2023-03-04T05:49:21 | 2019-05-26T21:26:25 | JavaScript | UTF-8 | Python | false | false | 825 | py | """
2011-final-value-of-variable-after-performing-operations
leetcode/easy/2011. Final Value of Variable After Performing Operations
Difficulty: easy
URL: https://leetcode.com/problems/final-value-of-variable-after-performing-operations/
"""
from typing import List
class Solution:
def finalValueAfterOperations(... | [
"polyglot.m@gmail.com"
] | polyglot.m@gmail.com |
4a32153afe9121aaf77c014e94ac46d3ee064db3 | 9c58a1f594e18cee20128f2c8dad8257429b10d1 | /purchase_more_details/__manifest__.py | bca04c1f1481d830a2cba364538dfa3ce000825b | [] | no_license | gastonfeng/Odoo-eBay-Amazon | e8919768b2a1500209f209ee3aecc7f2fb10cda7 | a9c4a8a7548b19027bc0fd904f8ae9249248a293 | refs/heads/master | 2022-04-05T00:23:50.483430 | 2020-02-19T04:58:56 | 2020-02-19T04:58:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 686 | py | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': "Purchase - More Details",
'summary': "Advanced purchase features",
'description': """
Advanced Purchase Features
=================================================================================
... | [
"yjm@mail.ru"
] | yjm@mail.ru |
c5a9fbc180fbf0b1cac50246ab69b0c60c57e2d1 | 9214a22c37f9751f66005d9033c68eadca43d6ee | /app/.history/datasets/spotify_fetch_20201212160646.py | c6e057311d1faed4b190317c09db9b7fc727b28e | [] | no_license | bsalgado98/lockdown-music | 0800922ea25c9b07ea4b034297e67725776de070 | a407265b7caa83667c92ee13c2adec1645acdafa | refs/heads/main | 2023-01-29T09:55:38.137972 | 2020-12-17T01:01:49 | 2020-12-17T01:01:49 | 322,133,071 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 718 | py | import spotipy
from spotipy.oauth2 import SpotifyClientCredentials
import json
import csv
auth_manager = SpotifyClientCredentials()
sp = spotipy.Spotify(auth_manager=auth_manager)
def get_artist_genre(artist):
results = sp.search(q='artist:' + artist, type='artist')
# print(json.dumps(results, indent=4, sort_... | [
"bsalgado@stevens.edu"
] | bsalgado@stevens.edu |
d46a2d15a60364610678fa75cf1804149b56db91 | a81a19b1e5fdb752227d81f89d0b01633958d958 | /lesson3/task6.py | ccea59a6bb299d837466ed47e49826ea4a079c1d | [] | no_license | Gwellir/gb_py_algo | 21cead3917c8ee09b08f306b252b87e8d4575a02 | c704c86e9bb3a56f79e28ee27058ec45c93a2341 | refs/heads/master | 2020-09-24T05:16:30.552674 | 2019-12-30T13:58:42 | 2019-12-30T13:58:42 | 225,671,705 | 1 | 0 | null | 2019-12-30T13:58:43 | 2019-12-03T16:55:48 | Python | UTF-8 | Python | false | false | 920 | py | # В одномерном массиве найти сумму элементов, находящихся между минимальным и
# максимальным элементами. Сами минимальный и максимальный элементы в сумму не включать.
import random
SIZE = 100
MIN_ITEM = 0
MAX_ITEM = 100
array = [random.randint(MIN_ITEM, MAX_ITEM) for _ in range(SIZE)]
print(array)
min_elem = (0, ar... | [
"gwellir@gmail.com"
] | gwellir@gmail.com |
589fcc650b3b19b399bb7e2c41f973eb0274a6f8 | 175e4e031471e5cdbc9bcaee2df10f5ec44871d3 | /LESSON2b/.history/backend/app_20200531171712.py | 30c8d98adb31d0f7ac9789f77fb261fe0e2390d0 | [] | no_license | hiyacins/uma_study | c329d29a9c3899ab4feca21b9c47ef546b69b0bd | 067e66f258a0c89f7670c645dd7c40feee8536fa | refs/heads/master | 2023-01-23T06:40:12.435047 | 2020-06-17T15:59:34 | 2020-06-17T15:59:34 | 239,077,726 | 0 | 0 | null | 2023-01-06T08:36:26 | 2020-02-08T05:56:52 | Python | UTF-8 | Python | false | false | 4,260 | py | from HiyaLib import *
import unittest
app = FlaskBuilder(__name__)
# ログイン成功後の画面(ホーム画面)
@app.route('/')
@login_required
def top():
flash('ログインを成功しました\(^o^)/')
with MySQLConnector() as db:
return render_template('index.html', entries=db.select(ToDoItem))
# ログイン前画面表示
@app.route('/login', methods=['... | [
"hiyacins@gmail.com"
] | hiyacins@gmail.com |
1caa8edc04da0c6565e11e0ecbe236dbe815fd18 | e73cf78346901f00193dbfda7098de32afa99091 | /solutions/video_similarity_search/quick_deploy/server/src/mysql_helpers.py | d70fcc9d00d115e0dacd97a1b06cf1ced239e934 | [
"Apache-2.0"
] | permissive | miia12/bootcamp | d690056ba5c2a538b8734cf7eacb23bf189683eb | cc42989537fac13882789ee40ec4a9b8834c425b | refs/heads/master | 2023-06-05T10:06:04.318263 | 2021-06-22T07:45:10 | 2021-06-22T07:45:10 | 373,466,228 | 0 | 2 | Apache-2.0 | 2021-06-23T00:17:15 | 2021-06-03T10:19:13 | Jupyter Notebook | UTF-8 | Python | false | false | 3,299 | py | import pymysql
import sys
from config import MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PWD, MYSQL_DB
from logs import LOGGER
class MySQLHelper():
def __init__(self):
self.conn = pymysql.connect(host=MYSQL_HOST, user=MYSQL_USER, port=MYSQL_PORT, password=MYSQL_PWD,
datab... | [
"shiyu.chen@zilliz.com"
] | shiyu.chen@zilliz.com |
a645d651077b0b787589e33ea9a914f8d5db6263 | 4846c0e7cf3cf1335c797106afe880d1b44d3e71 | /tests/test_expand_tsv.py | 4127d7b52b745181c146c72a5f9447d09e18a692 | [] | permissive | biolink/ontobio | 1f2825edab68d7e52f4e262c82b173e6cc978d9f | 3dd9050f1c53efd63003e4adfe9d9e27e4557b56 | refs/heads/master | 2023-08-31T13:43:01.545837 | 2023-08-30T16:56:10 | 2023-08-30T16:56:10 | 88,679,857 | 125 | 33 | BSD-3-Clause | 2023-09-13T23:50:27 | 2017-04-18T23:36:22 | Python | UTF-8 | Python | false | false | 719 | py | from ontobio import OntologyFactory
from ontobio.tsv_expander import expand_tsv
import csv
INPUT = "tests/resources/data_table.tsv"
OUTPUT = "tests/resources/data_table-expanded.tsv"
def test_expand():
factory = OntologyFactory()
ontobj = factory.create("tests/resources/goslim_pombe.json")
expand_tsv(INP... | [
"cjm@berkeleybop.org"
] | cjm@berkeleybop.org |
7ad8044f573bd3b0dbbfacd2793d91404ed7c16b | 1fddb12ae9b7db260b9161983a726f1528ece940 | /Part_01/Cap_11/test_survey.py | c8b1d834dc1b4be20cada692bde36442ea8a3ee2 | [] | no_license | davicosta12/python_work | aecf642bbbf2a007fba159f305b4ab21ff00503f | 5df62d3ced25b7e04cda71846fd07862dda39b4c | refs/heads/master | 2023-04-23T09:49:31.923211 | 2021-04-27T00:31:42 | 2021-04-27T00:31:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,028 | py | import unittest
from survey import AnonymousSurvey
class TestAnonymousSurvey(unittest.TestCase):
"""Testes para a classe AnonymousSurvey"""
def setUp(self):
"""
Cria uma pesquisa e um conjuntos de respostas que poderão ser usados em
todos os métodos de teste.
"""
question = "What la... | [
"deadspace24@hotmail.com"
] | deadspace24@hotmail.com |
dce0ea73309c79f5b5ff5c67b8dc08e0e37c9604 | 23556b966ee6a3abbe42ee5b66e13af3dce0cf71 | /u24_lymphocyte/third_party/treeano/sandbox/nodes/wta_sparisty.py | c398a9bda304d23a4746b232e91d460a3a11ec8f | [
"BSD-3-Clause"
] | permissive | SBU-BMI/quip_classification | 74dbf6d41e579755a952ba475f8a89bd82ac8530 | be61e5f047093243404f6f2dc8e837e27e8e1eb3 | refs/heads/master | 2022-07-30T20:29:48.459298 | 2022-07-17T16:59:15 | 2022-07-17T16:59:15 | 162,736,219 | 5 | 14 | BSD-3-Clause | 2022-02-11T02:53:02 | 2018-12-21T16:36:39 | Python | UTF-8 | Python | false | false | 3,184 | py | """
winner-take-all sparsity activations
from "Winner-Take-All Autoencoders"
http://arxiv.org/abs/1409.2752
"""
import numpy as np
import theano
import theano.tensor as T
import treeano
import treeano.nodes as tn
DEFAULT_POPULATION_SPARSITY_LEVEL = 0.05
@treeano.register_node("wta_spatial_sparsity")
class WTASpatia... | [
"sabousamra@cs.stonybrook.edu"
] | sabousamra@cs.stonybrook.edu |
1cf8d985c0faf8b5278b5a7b2389cbd800709754 | 4a5b49806d0dd4fd8bd38483b06da79515d1ad39 | /apps/apis/permissions.py | b634545aa3b4c8601b293db01ee3f5f4d490c08e | [] | no_license | madongliang11/dj_Book | 5ace757f7873d10e41d756be29050ee395f4bceb | c70e331e733a4431467d49dcb8514b58ef03715c | refs/heads/master | 2022-12-14T15:08:02.027194 | 2019-03-10T14:48:47 | 2019-03-10T14:48:47 | 174,836,847 | 1 | 0 | null | 2022-11-22T02:23:10 | 2019-03-10T14:44:17 | JavaScript | UTF-8 | Python | false | false | 406 | py | # -*- coding: utf-8 -*-
__author__ = 'zhougy'
__date__ = '2018/7/12 下午4:24'
from rest_framework import permissions
class IsOwnerOrReadOnly(permissions.BasePermission):
'''
自定义权限功能,只允许对象的所有者编辑它
'''
def has_object_permission(self, request, view, obj):
if request.method in permissions.SAFE_METHODS:
return T... | [
"15565608583@163.com"
] | 15565608583@163.com |
e32ddebb3bbd8d75e23cd2ff84cbce8b1473fba1 | 07eac224e2633aee3f606efcdb74d5e4b1e3e76e | /lib/functionfinder.py | 3b2da1af74eb50e3aec2d225f15e6c57db9551d6 | [
"MIT"
] | permissive | Ortus-Solutions/sublimetext-lucee | 5cbd8517b050a7b69d62874e185fc73cd3e84234 | a663c219f3eed60f72843a08592e28c8d9e5854f | refs/heads/master | 2021-01-16T18:49:51.372386 | 2015-08-18T00:55:40 | 2015-08-18T01:54:34 | 41,172,500 | 2 | 0 | null | 2015-08-21T19:02:51 | 2015-08-21T19:02:51 | null | UTF-8 | Python | false | false | 5,003 | py | # This module, via find_functions(), takes in a cfml/lucee source file string and
# returns a python list containing tuples of the function name and a map of data
# about the function.
# The structure looks like this:
# [
# ("function_name", {
# "access": "public/private/etc",
# "returntype": "any/st... | [
"jcberquist@outlook.com"
] | jcberquist@outlook.com |
056a503e59def2e468d0f077374750058c19d71d | 908d2154515d9f9d54a3a1fb5e3b9a388642ac07 | /eval/eval.py | 8b238104fa5e7c6dc93f768282b7e832d3dd4648 | [] | no_license | unix0000/Colorful-Image-Colorization | 122e33246844d95b5aa1fa77462c90569b3c4d3c | b53ea3fe3a213ad2a3eb92a183fd824409e037a9 | refs/heads/master | 2020-07-05T01:34:12.083707 | 2016-11-18T03:13:56 | 2016-11-18T03:13:56 | 74,130,602 | 1 | 0 | null | 2016-11-18T13:09:17 | 2016-11-18T13:09:17 | null | UTF-8 | Python | false | false | 2,373 | py | """
Cameron Fabbri
Evaluation by just looking at the original image and the resulting image from the network
"""
import os
import tensorflow as tf
import cv2
import sys
import numpy as np
import fnmatch
sys.path.insert(0, '../architecture/')
sys.path.insert(0, '../model/')
import architecture
def eval(checkpoint... | [
"cameronfabbri@gmail.com"
] | cameronfabbri@gmail.com |
1ee8f42708cdd52a258a57dabd3803e37076ae59 | 7f6958b47a47cea5926181ea5ca0377dcc0721cd | /apps/cms/models.py | 176c250e8b25c2c180b91bcac9d5aa88d8bbccbf | [] | no_license | LearnerCharlesYim/bbs_demo | 04afb8273548dc2bd2d386e6bece19c8e763ac80 | 8ffbacb7f114e479b322147fe5c9164664d0c479 | refs/heads/master | 2023-03-31T17:49:46.569650 | 2021-04-10T02:37:23 | 2021-04-10T02:37:23 | 354,493,306 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,634 | py | from exts import db
from datetime import datetime
from werkzeug.security import generate_password_hash,check_password_hash
#权限
class CMSPermission(object):
#255二进制表示 1111 1111
ALL_PERMISSION = 0b11111111
#1.访问者(无权限)
VISITOR = 0b00000001
#2.管理帖子
POSTER = 0b00000010
#3.管理评论
... | [
"yanchicharles@gmail.com"
] | yanchicharles@gmail.com |
96c16054cf31a37d84a372faeeb23be5d8cdd08e | 7a76057ad364bd82bb91c9fbf361df72eb49a2b0 | /api/v1/views/places_amenities.py | c29d2f2c2f335441f88fdfc9c806e26017504ae6 | [
"LicenseRef-scancode-public-domain"
] | permissive | hcheung01/AirBnB_clone_v3 | 2f351fd8840d6ffbc66b49d5e8549959ab5c887a | 91885a067d4011d3d58d3cecc55ad0a0d3789a3a | refs/heads/master | 2021-07-13T13:06:59.293804 | 2020-07-29T03:34:26 | 2020-07-29T03:34:26 | 169,111,974 | 1 | 1 | null | 2019-02-09T00:14:32 | 2019-02-04T16:45:03 | Python | UTF-8 | Python | false | false | 1,665 | py | #!/usr/bin/python3
"""view of State object"""
from api.v1.views import app_views
from models import storage
from flask import jsonify, abort
@app_views.route('/places/<place_id>/amenities', methods=["GET"])
def ame_ret(place_id=None):
"""return json Amenity objects"""
ame_list = []
place_obj = storage.get... | [
"kazucuong@yahoo.com"
] | kazucuong@yahoo.com |
e1f94ec28ab6bca97569e151132194b7d52dec20 | fa16b3626f9e383dc9ae2021c98232447bfcd7d6 | /find_object_doc.py | f8d4b09cf2b46b3e416590f9b4303a9b16ea8edb | [] | no_license | zlszhonglongshen/BitPythonCode | 5bd37ac917d2b065771f87375fc96f78a8743ef6 | cae504fed4f92a275dcdcf2802e3e4f00dfe1a60 | refs/heads/master | 2020-12-26T03:22:15.614046 | 2014-11-07T12:05:51 | 2014-11-07T12:05:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,987 | py | #!/usr/bin/env python
#coding:utf-8
#让开发人员在IDE中打印出对象的所有函数和它们的doc string
#接收任何含有函数或者方法的对象
#使用方法,
#from find_object_doc import info
#info(object)
#也可以增加参数。
def info(object,spacing=10,collapse=1): #声明函数,有三个变量,后面两个是可选参数
"""Print methods and doc strings. #多行doc string,介绍函数功能
Takes module,class,list,dictionar... | [
"qiwsir@gmail.com"
] | qiwsir@gmail.com |
bf7381c46d0b27c47798a737965b91e7a25453b4 | b385f39c5b701fb6f22796ab951872257ae8398a | /exercicios-secao08/exercicio40.py | cc298e6652cf528d91cc35374a1688460f8fbbbf | [
"MIT"
] | permissive | EhODavi/curso-python | 5c97a6913bad198ae590519287ed441c95399d80 | cf07e308be9d7516f2cfe7f21c539d214c836979 | refs/heads/main | 2023-08-07T13:44:46.608118 | 2021-06-14T21:40:50 | 2021-06-14T21:40:50 | 356,542,988 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 194 | py | from typing import List
def quantidade_par(vetor: List[int]) -> int:
contador: int = 0
for numero in vetor:
if numero % 2 == 0:
contador += 1
return contador
| [
"davi.miau@gmail.com"
] | davi.miau@gmail.com |
6889f412ecdbc3a394cdd2e61a0802c3c0a2fec9 | ec1af022ed6a0f42927fe671d2919a8bb5189b68 | /src/python/Agents/Stagers/FakeStager.py | 26570db7f33c25cdce375568a977d593dca4daa1 | [] | no_license | dmwm/StageManager | bac6711e1d6bc8e800fdf0f314f9fa69a92ced50 | 739656b3771b6369d296fb9426ed21f296ed7f0c | refs/heads/master | 2021-01-19T06:40:42.928014 | 2012-02-08T19:09:55 | 2012-02-08T19:09:55 | 4,423,799 | 0 | 1 | null | 2016-01-22T16:58:28 | 2012-05-23T18:33:45 | Python | UTF-8 | Python | false | false | 607 | py | from StageManager.Agents.Stagers.Stager import Stager
import random
class FakeStager(Stager):
def command(self, files):
"""
In this stager a random population is taken as being successfully staged
incomplete and the rest marked as a failure.
"""
staged = random.samp... | [
"metson@4525493e-7705-40b1-a816-d608a930855b"
] | metson@4525493e-7705-40b1-a816-d608a930855b |
2107e3e740454d344bed87f2246ff50aa4784999 | 9e988c0dfbea15cd23a3de860cb0c88c3dcdbd97 | /sdBs/AllRun/sdssj9-10_161143.03+122953.0/sdB_sdssj9-10_161143.03+122953.0_lc.py | 3bae2008e88647d867cbf8624a155c3a0503f76d | [] | no_license | tboudreaux/SummerSTScICode | 73b2e5839b10c0bf733808f4316d34be91c5a3bd | 4dd1ffbb09e0a599257d21872f9d62b5420028b0 | refs/heads/master | 2021-01-20T18:07:44.723496 | 2016-08-08T16:49:53 | 2016-08-08T16:49:53 | 65,221,159 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 379 | py | from gPhoton.gAperture import gAperture
def main():
gAperture(band="NUV", skypos=[242.929292,12.498056], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_sdssj9-10_161143.03+122953.0/sdB_sdssj9-10_161143.03+122953.0_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.... | [
"thomas@boudreauxmail.com"
] | thomas@boudreauxmail.com |
fb2f71f7f74173ce95d17e4bf2137d9cb471f1df | 1554b551ecf51d38efd27252b52fc722ee3869af | /tasks/relevance_transfer/rerank.py | b9c54d55ad59013fd130f1205c5eae9b4ad0b789 | [
"Apache-2.0"
] | permissive | castorini/hedwig | 540c231c98f19b576e575f9d8f0a5e937832d752 | 277814c401f4d17f5489e3c8c6deefc1af9eeffd | refs/heads/master | 2023-08-03T08:54:01.015424 | 2022-05-07T20:01:54 | 2022-05-07T20:01:54 | 174,762,036 | 603 | 140 | Apache-2.0 | 2023-07-21T16:23:09 | 2019-03-10T00:44:37 | Python | UTF-8 | Python | false | false | 2,601 | py | import os
import numpy as np
def load_ranks(rank_file):
score_dict = {}
with open(rank_file, 'r') as f:
for line in f:
topic, _, docid, _, score, _ = line.split()
if topic not in score_dict:
score_dict[topic] = dict()
score_dict[topic.strip()][docid... | [
"noreply@github.com"
] | castorini.noreply@github.com |
607043ecdf65065fb5ebc1408a1e34864ec3912c | 7443577408e36ce0f4b9c45e13c82597f5533738 | /Distributed_test/src/mnist_data.py | 583ae21570008b0b5957d8fafd3f3ee70c7bcd4e | [] | no_license | hwang595/distributed_tensorflow | 87c7349621a33e325a63dfb8f9c385fd12bc9baa | d726ebcc76b02ee7db0237e422b8d71b039db97d | refs/heads/master | 2021-01-21T17:32:06.641535 | 2017-10-15T21:49:53 | 2017-10-15T21:49:53 | 81,853,418 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 7,245 | py | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"hongyiwang@cs.wisc.edu"
] | hongyiwang@cs.wisc.edu |
e789af347a07d7eca625399ca8b4e60e44feb2f7 | d6815f4c7774d30c5d12d2205703427693294dec | /tests/unit/more/debian/security/test_apparmor.py | 24231dfd2d320ccbf533a061e9ced2b0493ad757 | [
"MIT"
] | permissive | python-provy/provy | 2579bbedc31f559992b7c007a4a2e75424d3507f | ca3d5e96a2210daf3c1fd4b96e047efff152db14 | refs/heads/master | 2021-12-30T12:03:28.083794 | 2019-02-20T16:55:32 | 2019-02-20T16:55:32 | 1,948,340 | 16 | 3 | MIT | 2021-12-26T06:30:37 | 2011-06-24T16:01:45 | Python | UTF-8 | Python | false | false | 3,560 | py | from nose.tools import istest
from provy.more.debian import AptitudeRole, AppArmorRole
from tests.unit.tools.helpers import ProvyTestCase
class AppArmorRoleTest(ProvyTestCase):
def setUp(self):
super(AppArmorRoleTest, self).setUp()
self.role = AppArmorRole(prov=None, context={'cleanup': []})
... | [
"diogobaeder@yahoo.com.br"
] | diogobaeder@yahoo.com.br |
2958debc837be49ad4a1c9137151045b42512f67 | 77311ad9622a7d8b88707d7cee3f44de7c8860cb | /res_bw/scripts/common/lib/plat-mac/lib-scriptpackages/finder/enumerations.py | 2d873810a8b4d06a88219350ce00dbd265275893 | [] | no_license | webiumsk/WOT-0.9.14-CT | 9b193191505a4560df4e872e022eebf59308057e | cfe0b03e511d02c36ce185f308eb48f13ecc05ca | refs/heads/master | 2021-01-10T02:14:10.830715 | 2016-02-14T11:59:59 | 2016-02-14T11:59:59 | 51,606,676 | 0 | 0 | null | null | null | null | WINDOWS-1250 | Python | false | false | 3,027 | py | # 2016.02.14 12:50:16 Střední Evropa (běžný čas)
# Embedded file name: scripts/common/Lib/plat-mac/lib-scriptpackages/Finder/Enumerations.py
"""Suite Enumerations: Enumerations for the Finder
Level 1, version 1
Generated from /System/Library/CoreServices/Finder.app
AETE/AEUT resource version 0/144, language 0, script ... | [
"info@webium.sk"
] | info@webium.sk |
e41211b2919ee8cc6517b8bf0ae266de80004e07 | 46f5281aa3a83f5b2335bf8131ca484875a0acb7 | /ambiente/views.py | 8d1c9c9decbb702ba2865de364b11c2507fec798 | [] | no_license | rauldosS/simulador | 1718b150043ea046823411ac93dd006c501ddd9e | 03bff4da57db570ac70e511f3c0700f19ff6c95e | refs/heads/main | 2023-01-23T04:52:07.285003 | 2020-12-08T09:18:43 | 2020-12-08T09:18:43 | 310,734,986 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,354 | py | from django.shortcuts import render, redirect
from django.urls import reverse
from .models import Ambiente, Atividade
from django.http import HttpResponseRedirect, JsonResponse
from django.db.models import Count
import json
# Create your views here.
def inicio(request):
ambientes = Ambiente.objects.all()
dado... | [
"48498755+rauldosS@users.noreply.github.com"
] | 48498755+rauldosS@users.noreply.github.com |
4291e2f4b3e1681a8d95c15fd5591191503146fc | 4a220323a6d4a86d690be43e10a31f306eb6d888 | /PF/Day_5/src/Assign37.py | 4c610098568031c1f0d3ca3a625f52c8f4a11ec0 | [] | no_license | vijayroykargwal/Infy-FP | 29e923f6756e73d72ebef9ed63ede0105929aae0 | 60ebd1514f7c9d3c77ec8c622091b1127e225c2c | refs/heads/master | 2023-02-02T02:14:46.870321 | 2023-01-30T14:43:16 | 2023-01-30T14:43:16 | 176,973,990 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,027 | py | #PF-Assgn-37
'''
Created on Feb 26, 2019
@author: vijay.pal01
'''
#Global variables
child_id=(10,20,30,40,50)
chocolates_received=[12,5,3,4,6]
child_id=(10,20,30,40,50)
child_id_list=list(child_id)
chocolates_received=[12,5,3,4,6]
def calculate_total_chocolates():
total_chocolates=sum(choc... | [
"noreply@github.com"
] | vijayroykargwal.noreply@github.com |
54568df6142694ca70bd7449d08abed925d2a91a | 4fdaa61e2fb2d320a0903e17024598c6a67ab0fb | /python/Faa/subsets1.py | 2d4ab086853db49941f02a5cbccf516c1690a0a5 | [] | no_license | khans/ProgrammingAndDataStructures | 10d5cd5f30f703298ba132be4dfba828f3a0e9e1 | 58c1d822fa5eab17485369bc40dd1376db389f44 | refs/heads/master | 2021-01-25T14:03:40.616633 | 2018-06-19T23:02:44 | 2018-06-19T23:02:44 | 123,643,607 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 747 | py | import sys
class Solution:
def print_set(self,res):
#sys.stdout.write('{')
print (res)
#for i in range(len(res)):
# if res[i] != None:
# sys.stdout.write(str(res[i]))
# if (i+1) <len(res):
#print (res[i+1])
#if i+1 <len(res) and res[i+1] != None:
... | [
"isafakhan@gmail.com"
] | isafakhan@gmail.com |
41aa6fb3432521bc84a6e5949a8ffbe5119f4254 | 55e7e516f5f814d3f7f8daa59708bb2fec3d4962 | /_lib/slash_running.py | 1d42bf00e6d109f65106566c2b1e7b6e9d535b70 | [
"BSD-3-Clause"
] | permissive | omergertel/backslash | 4c3c916a37f8ce00108e6274f61feb5c6395e460 | 9123b28f2717ec5653fc0c224b5adac0e738ff36 | refs/heads/master | 2021-01-21T03:02:40.872363 | 2015-10-20T18:43:55 | 2015-10-20T18:43:55 | 46,661,674 | 0 | 0 | null | 2015-11-22T13:25:54 | 2015-11-22T13:25:54 | null | UTF-8 | Python | false | false | 760 | py | import click
import logbook
from .bootstrapping import requires_env, from_project_root
_logger = logbook.Logger(__name__)
@click.command()
@click.argument('name')
@click.argument('args', nargs=-1)
@requires_env('app', 'develop')
def suite(name, args):
import slash
import gossip
from slash.frontend.slas... | [
"vmalloc@gmail.com"
] | vmalloc@gmail.com |
48b64edf5aab3ad08b5f31525b08d0272bf0171d | db49ac8279d82a28147f78518db5664eb5ebedc4 | /0x04-python-more_data_structures/100-weight_average.py | d5570d98a3e0e7b864f2ec12322f4b7bf1d2aeda | [] | no_license | DennisWanjeri/alx-higher_level_programming | 95129d46c111d63ea2eb6278daf0dff388f641c5 | 23b859646cbe3221f18c8523065c749c018e0fe0 | refs/heads/main | 2023-08-12T22:55:47.896613 | 2021-09-22T11:01:21 | 2021-09-22T11:01:21 | 361,633,867 | 0 | 4 | null | null | null | null | UTF-8 | Python | false | false | 218 | py | #!/usr/bin/python3
def weight_average(my_list=[]):
total = 0
i = 0
if len(my_list) == 0:
return total
for x in my_list:
total += (x[0] * x[1])
i += x[1]
return (total / i)
| [
"shikandadennis07@gmail.com"
] | shikandadennis07@gmail.com |
3a298e9f83d0dc848bafc398842d0494b9286a9d | 4bcc9806152542ab43fc2cf47c499424f200896c | /tensorflow/python/eager/polymorphic_function/autograph_util.py | 958dea68e694e1dae728effcb4d4521b0d17078e | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla",
"BSD-2-Clause"
] | permissive | tensorflow/tensorflow | 906276dbafcc70a941026aa5dc50425ef71ee282 | a7f3934a67900720af3d3b15389551483bee50b8 | refs/heads/master | 2023-08-25T04:24:41.611870 | 2023-08-25T04:06:24 | 2023-08-25T04:14:08 | 45,717,250 | 208,740 | 109,943 | Apache-2.0 | 2023-09-14T20:55:50 | 2015-11-07T01:19:20 | C++ | UTF-8 | Python | false | false | 2,212 | py | # Copyright 2023 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"gardener@tensorflow.org"
] | gardener@tensorflow.org |
4304bc826ba8b8db4567e9a1ccc5198a05eed509 | 4e3c976773526fd610d64ffb83589bccfaee5e68 | /sponge-integration-tests/examples/core/knowledge_base_on_run_returns_true.py | faaeaed89e135190880a933f1adad8fa886d0f6f | [
"Apache-2.0"
] | permissive | softelnet/sponge | 2313d2328953fcff49a002e727bb803757870627 | 7190f23ae888bbef49d0fbb85157444d6ea48bcd | refs/heads/master | 2022-10-28T16:19:55.619882 | 2021-09-16T19:50:08 | 2021-09-16T19:50:08 | 95,256,030 | 10 | 2 | Apache-2.0 | 2022-10-04T23:55:09 | 2017-06-23T20:58:49 | Java | UTF-8 | Python | false | false | 524 | py | """
Sponge Knowledge Base
Test - onRun
"""
from java.util.concurrent.atomic import AtomicBoolean
def onInit():
sponge.setVariable("onRun", AtomicBoolean(False))
sponge.setVariable("trigger", AtomicBoolean(False))
class AssertTrigger(Trigger):
def onConfigure(self):
self.withEvent("e")
def onR... | [
"marcin.pas@softelnet.com"
] | marcin.pas@softelnet.com |
71832eeb0cb42fb13ac05ebf89d0bbef2e48cc4f | e8f99a162207cba82d4e0f969d7bcdb2b9d8b522 | /pw_python/imooc/custom_exc.py | 3267a64d9854a914e33fd5f82f1908a3219d24f4 | [] | no_license | TesterCC/Python3Scripts | edb5446278ebf13edb64336001081941ca27d67d | 58be67e1ffc74ef50289a885aa4ad05f58e2c383 | refs/heads/master | 2023-08-30T21:16:38.328045 | 2023-08-17T11:23:08 | 2023-08-17T11:23:08 | 93,401,996 | 6 | 3 | null | null | null | null | UTF-8 | Python | false | false | 730 | py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
__author__ = 'MFC'
__time__ = '2020-01-09 14:46'
"""
3-4 Python异常机制
为什么自定义异常不是继承自BaseException?
捕获父类异常,其所有子类异常都在捕获范围之内。
根据Exception的层级,BaseException层级在KeyboradInterrupt之上(也在其它Excption之上),
如果自定义异常继承自BaseException,则会捕获BaseException,则其子类KeyboradInterrupt也会被捕获,导致ctrl+c失效。
"""
... | [
"testerlyx@foxmail.com"
] | testerlyx@foxmail.com |
1c9f123afbdeb467c98b1be90020de39923117ba | 03fef621b7f904bcbb717c6eef942a5e1e077b75 | /scrapers/EHA/councillors.py | c2d0257b083d75cd6e7dae66dcb7179f01b2ad43 | [
"MIT"
] | permissive | chris48s/LGSF | e2b387f0e8d694d13fc8c777bac3aaec1fdea114 | f5b8a5037b0237f811405c5df0aa20fa1c1624e6 | refs/heads/master | 2020-04-01T10:28:31.370990 | 2018-10-15T13:18:54 | 2018-10-15T13:20:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 154 | py | from lgsf.scrapers.councillors import ModGovCouncillorScraper
class Scraper(ModGovCouncillorScraper):
base_url = "http://easthants.moderngov.co.uk"
| [
"sym.roe@talusdesign.co.uk"
] | sym.roe@talusdesign.co.uk |
2ace5bd1f6c0001b4a6292159155a1e6ae99a6db | e82b761f53d6a3ae023ee65a219eea38e66946a0 | /All_In_One/addons/interactive-physics-editor/lib/preferences.py | 252964ba1743b1497599d381a3a988c877b3d7a9 | [] | 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 | 2,094 | py | # Copyright (C) 2018 Christopher Gearhart
# chris@bblanimation.com
# http://bblanimation.com/
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your opt... | [
"root@localhost.localdomain"
] | root@localhost.localdomain |
03e2bc03e1794dc68fda35fb95fc87697ffbe47a | fc3cc4d8036eaf800bccd3620002646954c7303f | /script_for_sentence_classification/python_read_file.py | bc31184d06c8ecf2149fbd70cdc6c6029acc04b5 | [] | no_license | dalinvip/pytorch_word2vec_process | 8e3e4c51d38455b15c4fe82fe8a0e0bff70abba5 | dda9450af525f24ce04773801ec6ebd453e27cd1 | refs/heads/master | 2023-02-23T15:41:31.832300 | 2018-03-07T11:25:05 | 2018-03-07T11:25:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 436 | py | # @Author : bamtercelboo
# @Datetime : 2018/1/24 8:24
# @File : python_read_file.py
# @Last Modify Time : 2018/1/24 8:24
# @Contact : bamtercelboo@{gmail.com, 163.com}
"""
FILE : python_read_file.py
FUNCTION : None
"""
file = open('test.log', 'r')
sizehint = 209715200 # 200M
position = 0
lines = file.readl... | [
"bamtercelboo@163.com"
] | bamtercelboo@163.com |
a156dbe0eca9288d42f2074eb2191f878740abe8 | 642526009a434c2a6e04fe0293279a151b216d0a | /dkube/sdk/internal/dkube_client/models/node_collection_devices.py | 98b17110c5a0ceb97da531b521436cc90475e2c5 | [] | no_license | mak-454/dkube-sdk | d4b8e7f7b1d8c0b0f64b10940ae42ab9d62f4654 | d2ba78a0abbda589efc0dbd957d9a8f6fd227464 | refs/heads/master | 2022-12-26T03:17:55.627379 | 2020-05-09T17:29:08 | 2020-05-09T17:29:08 | 262,622,772 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,164 | py | # coding: utf-8
"""
Dkube api server
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 0.2.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
impor... | [
"ahmed.khan@oneconvergence.com"
] | ahmed.khan@oneconvergence.com |
b9198967dff387b18975b414997fabb270e25c6f | 2359121ebcebba9db2cee20b4e8f8261c5b5116b | /configs/a5.py | 0f952458ead70ac6edeb0de1f88907727d28a7c3 | [] | no_license | EliasVansteenkiste/plnt | 79840bbc9f1518c6831705d5a363dcb3e2d2e5c2 | e15ea384fd0f798aabef04d036103fe7af3654e0 | refs/heads/master | 2021-01-20T00:34:37.275041 | 2017-07-20T18:03:08 | 2017-07-20T18:03:08 | 89,153,531 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,801 | py | import numpy as np
import lasagne as nn
from collections import namedtuple
from functools import partial
import lasagne.layers.dnn as dnn
import lasagne
import theano.tensor as T
import data_transforms
import data_iterators
import pathfinder
import utils
import app
restart_from_save = None
rng = np.random.RandomState... | [
"Elias.Vansteenkiste@gmail.com"
] | Elias.Vansteenkiste@gmail.com |
687729e3d0279aef38af3f7c56a7aa19bb9502f2 | 1e2516263e912fa00de3da3e703e06854b28b89c | /pdfbookmarker.py | a2a154d7c51a22e709d60f29ff994a9f72a1c2bc | [
"MIT"
] | permissive | Sandy4321/pdfbookmarker | 386ac4d8c3e2a3bca7fb35e2d9480350af606155 | a48cdde9ea859275dc4b2f40e85315edd2ed60eb | refs/heads/master | 2021-10-26T08:45:36.128822 | 2019-04-11T15:04:26 | 2019-04-11T15:13:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,698 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Add bookmarks to existing PDF files
Usage:
$ pdfbm [options] <FILE.pdf> [FILE.txt] [FILE-new.pdf]
Options:
-h, --help show this help
Examples:
$ pdfbm FILE.pdf # will read FILE.pdf as PDF, FILE.txt as a
bookmarks file and shall give the FILE-new.pdf as ou... | [
"luopeng.he@gmail.com"
] | luopeng.he@gmail.com |
c470af81c6a98182e6a16b77e437e26a93f59b53 | 4aa6b7c3a5ae3817007e09ad1289c1e9f7a355c0 | /dynamic_programming/paint-house.py | 3675aa848ae4ec987b213cd2c33c8e8475c5715b | [] | no_license | liuhuipy/Algorithm-python | 8f5143e06cf5fa2de2c178e3ba9e5fd12b9bcdf7 | 4e92a0b874f956d1df84d1493f870a5d1f06cde2 | refs/heads/master | 2021-06-03T04:19:01.946149 | 2021-01-08T07:44:40 | 2021-01-08T07:44:40 | 99,838,105 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,430 | py | """
粉刷房子:
假如有一排房子,共 n 个,每个房子可以被粉刷成红色、蓝色或者绿色这三种颜色中的一种,你需要粉刷所有的房子并且使其相邻的两个房子颜色不能相同。
当然,因为市场上不同颜色油漆的价格不同,所以房子粉刷成不同颜色的花费成本也是不同的。每个房子粉刷成不同颜色的花费是以一个 n x 3 的矩阵来表示的。
例如,costs[0][0] 表示第 0 号房子粉刷成红色的成本花费;costs[1][2] 表示第 1 号房子粉刷成绿色的花费,以此类推。请你计算出粉刷完所有房子最少的花费成本。
注意:
所有花费均为正整数。
示例:
输入: [[17,2,17],[16,16,5],[14,3... | [
"liuhui_py@163.com"
] | liuhui_py@163.com |
d4e943650769a10a79f79ee51653fef0e02051f1 | 59de7788673ade984b9c9fbc33664a7cbdba67d3 | /res/scripts/common/streamids.py | 1a871273ac2485bff37462280aa2973557aa8936 | [] | no_license | webiumsk/WOT-0.9.15-CT | 3fa24ab37a6c91b7073034afb2f355efa5b7fe36 | fbd194fbaa6bdece51c7a68fc35bbb5257948341 | refs/heads/master | 2020-12-24T21:27:23.175774 | 2016-05-01T13:47:44 | 2016-05-01T13:47:44 | 57,600,180 | 0 | 0 | null | null | null | null | WINDOWS-1250 | Python | false | false | 2,677 | py | # 2016.05.01 15:26:16 Střední Evropa (letní čas)
# Embedded file name: scripts/common/streamIDs.py
STREAM_ID_CHAT_MIN = 1
STREAM_ID_CHAT_MAX = 99
CHAT_INITIALIZATION_ID = 50
STREAM_ID_AVATAR_BATTLE_RESULS = 100
STREAM_ID_ACCOUNT_CMDS_MIN = 200
STREAM_ID_ACCOUNT_CMDS_MAX = 30000
class RangeStreamIDCallbacks(object):
... | [
"info@webium.sk"
] | info@webium.sk |
0b42a4d684a380df2464e36429ce13186d46c8d2 | f3bcda237fd7a77f6bbbaef1ec22f386cb9f6219 | /modoboa_demo/handlers.py | b626111a3c2a5b7f3d98d06380613a1ad377990c | [
"MIT"
] | permissive | c0ns0le/modoboa-demo | c3ad3d1f437dd75281c14efa1be1acb81f63ecd7 | d8a8fe4d2e3664484ae6e2e66bf3a4e6d543073d | refs/heads/master | 2020-04-02T20:48:51.155927 | 2017-03-03T13:28:37 | 2017-03-03T13:28:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,759 | py | """Demo handlers."""
from django.core.urlresolvers import reverse
from django.dispatch import receiver
from django.template.loader import render_to_string
from django.utils.translation import ugettext as _
from modoboa.core import signals as core_signals
from modoboa.lib.web_utils import static_url
@receiver(core_... | [
"tonio@ngyn.org"
] | tonio@ngyn.org |
c3584bec6a9c94b4290d5530c9eae1002bf8134e | 8140a910c709030d9c5394bc2c9ba5c30eda6063 | /26-day/2.自定义异常.py | f70e4a8888ec0e15c87dfa0ad703c15f2d034d71 | [] | no_license | liuruitao/2mouth | 417139ecfd58d0220a95b78967247c4795ebc022 | 854e9322cea73462bb2fe08b3bdf6c33b73a40cd | refs/heads/master | 2020-03-13T10:49:54.016344 | 2018-05-25T04:25:37 | 2018-05-25T04:25:37 | 131,090,951 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 345 | py | class ShowError(Exception):
def __init__(self,len,length):
self.len = len
self.length = length
def main():
try:
s = input('请输入:')
if len(s) < 3:
raise ShowError(len(3),3)
except ShowError as result:
print('ShowError:输入的长度是%d,长度至少是%d'%(result.len,result.length))
else:
print('没有异常')
main()
| [
"2590011467@qq.com"
] | 2590011467@qq.com |
34b2aa7dc114889c5b6d33d4d6b8d2791992bc33 | b2a72c68252a80764554ca2ba1e372f82f4fc2ad | /demo/test_bug_nodata.py | b98bb903de239c8947c4fac53fe79664e14a2ebc | [
"MIT"
] | permissive | manmanCover/multi-task-pytorch | f320bfd60dd121b897e6d521944f2fb9d7669b47 | 7d57645ec8be0ca0c258cfa99fb788e3cd37f106 | refs/heads/master | 2020-06-03T03:01:40.554172 | 2019-01-30T16:44:52 | 2019-01-30T16:44:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,076 | py | import torch
import lib.modeling.resnet as resnet
import lib.modeling.semseg_heads as snet
import torch.nn as nn
import torch.optim as optim
import utils.resnet_weights_helper as resnet_utils
from torch.autograd import Variable
from roi_data.loader import RoiDataLoader, MinibatchSampler, collate_minibatch, collate_mini... | [
"729622788@qq.com"
] | 729622788@qq.com |
ecc82ad67eea1a842826c847fe8ae1887bf1f494 | be84495751737bbf0a8b7d8db2fb737cbd9c297c | /sdl/dynamic_array.py | 92e62d012074dca2f8fde972d46e36697f2aeb38 | [] | no_license | mario007/renmas | 5e38ff66cffb27b3edc59e95b7cf88906ccc03c9 | bfb4e1defc88eb514e58bdff7082d722fc885e64 | refs/heads/master | 2021-01-10T21:29:35.019792 | 2014-08-17T19:11:51 | 2014-08-17T19:11:51 | 1,688,798 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,518 | py |
import x86
from struct import unpack, pack
import array
from .memcpy import memcpy
class DynamicArray:
def __init__(self, struct, reserve=0):
self.size = 0
self.struct = struct
self.sizeof = struct.sizeof()
self.members = {}
self.members2 = {}
self.reserve = reserv... | [
"mvidov@yahoo.com"
] | mvidov@yahoo.com |
14a10b1ba5cc71f797448912729b405413dbd484 | b0f6f0e2cdc8faf2f86a06edef3ddd11a3684e5c | /scripts/files.py | 74bdf3103bfb9f9c55975e50eb50b4353ad69152 | [] | no_license | nachocano/trec-kba | f20e1e89ac2bbe38876c4ad63165aa18b689352b | 9ffdd95855af203c33a6a3315d9bf2ba886ac123 | refs/heads/master | 2021-01-19T10:05:30.194144 | 2015-02-04T22:01:33 | 2015-02-04T22:01:33 | 20,716,036 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 784 | py | import re
import argparse
import fileinput
from collections import defaultdict
def main():
parser = argparse.ArgumentParser(description='TODO')
parser.add_argument('-s', '--stream_file', required=True)
parser.add_argument('-m', '--mapping_file', required=True)
args = parser.parse_args()
folder_regex = re.co... | [
"nachoacano@gmail.com"
] | nachoacano@gmail.com |
b44eefd8646cb63089391f99cd431fb9df6041c3 | 9e3e8f1befeeb31150b27650ce5f6460b9c17445 | /quest/eval_tpu.py | c19bf4db8f6c168530cb1919ee40ed1a9d7a22d0 | [
"MIT"
] | permissive | ceshine/kaggle-quest | d5ee108e0b7a7c2daa5469abad0c443f31e00029 | a25b9d964c28d97769bc040da05f2e39987433c4 | refs/heads/master | 2023-06-23T07:18:52.293776 | 2020-03-31T07:09:17 | 2020-03-31T07:09:17 | 240,172,051 | 8 | 0 | MIT | 2023-06-12T21:27:41 | 2020-02-13T03:53:23 | Python | UTF-8 | Python | false | false | 3,379 | py | from pathlib import Path
import fire
import joblib
import numpy as np
import pandas as pd
from tqdm import tqdm
import tensorflow as tf
from scipy.special import expit
from transformers import AutoTokenizer, RobertaConfig
from tf_helper_bot.utils import prepare_tpu
from .models import DualRobertaModel
from .metrics i... | [
"shuanck@gmail.com"
] | shuanck@gmail.com |
487a4d8912d41645bb082b45b1f66a69b4c4d6e6 | 7434ef0a0840da62c449b73a3810d11bcf300644 | /finances/test/test_calc.py | 5a8d1560fbf46e7f302e01bda804bcc1a30ecd2e | [] | no_license | webmalc/maxibooking-billing-django | 40f497dc794e0b29868a01b482b5865764b35fd3 | d5ca86c3701b86e359b0648a5b76b0b71faa7810 | refs/heads/master | 2022-12-17T21:50:42.210125 | 2019-08-14T09:33:02 | 2019-08-14T09:33:02 | 202,347,569 | 2 | 0 | null | 2022-12-09T22:25:58 | 2019-08-14T12:36:22 | Python | UTF-8 | Python | false | false | 6,140 | py | import pytest
from django.test import TestCase
from django.urls import reverse
from moneyed import AED, EUR, RUB, Money
from clients.models import ClientService
from finances.lib.calc import (Calc, CalcException, Other, Rooms,
get_currency_by_country)
from finances.models import Service
... | [
"m@webmalc.pw"
] | m@webmalc.pw |
883edeeb0725bcc8d54ee7e760eab12633a54fdd | bde9cfb7af2b9df7ad197d1a09042484839c9dc0 | /podi_extractcentral.py | ad0cefdd91278403036a6b4fd6d8e187b26d1b13 | [] | no_license | bxy8804/QuickReduce | a77be224a820c9e463fec64b6e40f93e968c60ac | acee6e7358b7f1cbfee3924b54decfca5ea57016 | refs/heads/master | 2020-06-06T18:31:28.732014 | 2018-11-08T15:09:01 | 2018-11-08T15:09:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,194 | py | #! /usr/bin/env python
#
# Copyright 2012-2013 Ralf Kotulla
# kotulla@uwm.edu
#
# This file is part of the ODI QuickReduce pipeline package.
#
# If you find this program or parts thereof please make sure to
# cite it appropriately (please contact the author for the most
# up-to-date reference to use... | [
"kotulla@wisc.edu"
] | kotulla@wisc.edu |
afd68aa6639281e3cb1ad2225c55b112a6aa7c97 | c6ccdf8ae4556c6e7e2719d1324caf037cea8b7b | /backend/course/migrations/0001_initial.py | cf349adad0d33cc61f56ba7d0d4ea02a16c4c35b | [] | no_license | crowdbotics-apps/flyzia-23509 | cca29847ef8b202b1210d83e55174693c5c23559 | a0d538c83e7be423b5aec437d8f4463660f3fc86 | refs/heads/master | 2023-02-08T06:55:54.753866 | 2020-12-29T17:36:57 | 2020-12-29T17:36:57 | 323,459,698 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,517 | py | # Generated by Django 2.2.17 on 2020-12-21 22:18
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
op... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
416666c1d1c1adad4e974a5525db9d4b4a8c0f86 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /zxAXEgpjQ3XrLs2K7_7.py | 507bad45c4629bd100e03b30105073bac1b397ef | [] | 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 | 590 | py | """
Given two lists, merge them to one list and sort the new list in the same
order as the first list.
### Examples
merge_sort([1, 2, 3], [5, 4, 6]) ➞ [1, 2, 3, 4, 5, 6]
merge_sort([8, 6, 4, 2], [-2, -6, 0, -4]) ➞ [8, 6, 4, 2, 0, -2, -4, -6]
merge_sort([120, 180, 200], [190, 175, 130]) ➞ [120... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
0b943aee81eb354178d317cc1d1e47125a526f20 | 1eb7fa8b1745d4e51cefb4eceb44621862516aa6 | /leetCode/Python/76-minimumWindowSubstring.py | 61a1baaaf6473433aeefad57302fee04ddcbe18a | [] | no_license | geniousisme/CodingInterview | bd93961d728f1fe266ad5edf91adc5d024e5ca48 | a64bca9c07a7be8d4060c4b96e89d8d429a7f1a3 | refs/heads/master | 2021-01-10T11:15:31.305787 | 2017-03-06T00:03:13 | 2017-03-06T00:03:13 | 43,990,453 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,655 | py | '''
Given a string S and a string T,
find the minimum window in S which will contain all the characters in T in complexity O(n).
For example,
S = "ADOBECODEBANC"
T = "ABC"
Minimum window is "BANC".
Note:
If there is no such window in S that covers all characters in T,
return the empty string "".
If there are multi... | [
"chia-hao.hsu@aiesec.net"
] | chia-hao.hsu@aiesec.net |
79399b7cc82d33a181760bc97e327a836e39d396 | bfb591a1d5166d3b56f2e8fb7f2aa52cdbfd4831 | /questions/q166_find_quaduple_subarray_sum/brute_force.py | 1e54db456a1d7ad6ef30d92169ad0d21468c153d | [
"MIT"
] | permissive | aadhityasw/Competitive-Programs | 8a5543995ae6ae2adae7ebaa9cb41b222d8372f1 | 3d233b665a3b2a9d0b1245f7de688b725d258b1c | refs/heads/master | 2022-01-16T19:36:48.332134 | 2022-01-03T18:14:45 | 2022-01-03T18:14:45 | 192,506,814 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 447 | py | def fourSum(arr, num):
arr.sort()
n = len(arr)
ans = []
for i in range(n) :
for j in range(i+1, n) :
for k in range(j+1, n) :
for l in range(k+1, n) :
if (arr[i] + arr[j] + arr[k] + arr[l]) == num :
cur = (arr[i], arr[j... | [
"aadhityas@gmail.com"
] | aadhityas@gmail.com |
61ec709ac062ee0fdc9c7d3009c29eea63a3a55a | ba075a5cb2ff6af35b6f9a864b9ad1e088940e87 | /tests/fixtures/spect.py | be49403f62478b5881e0762944bb5a90cf9f1661 | [
"BSD-3-Clause"
] | permissive | JaerongA/vak | f9bbb19e455a4191283a8ec14660e11faed10be5 | c94001aed072c5a67ea6e97cf7b298aafc6d5d19 | refs/heads/main | 2022-02-28T04:14:26.346642 | 2022-02-08T04:06:14 | 2022-02-08T04:06:14 | 456,023,562 | 1 | 0 | BSD-3-Clause | 2022-02-06T00:54:00 | 2022-02-06T00:54:00 | null | UTF-8 | Python | false | false | 5,346 | py | """fixtures relating to array files containing spectrograms"""
import pytest
import vak.files.spect
@pytest.fixture
def spect_dir_mat(source_test_data_root):
return source_test_data_root.joinpath("spect_mat_annot_yarden", "llb3", "spect")
@pytest.fixture
def spect_dir_npz(generated_test_data_root):
return ... | [
"nickledave@users.noreply.github.com"
] | nickledave@users.noreply.github.com |
07ed1effda09eeaf4bffd2dfe4a27aef6bb825da | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02836/s954196164.py | f72ad55504c196f03f70fce4002d07b8ba79d244 | [] | 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 | 169 | py | S = input()
S_midn = int(len(S) / 2)
S_rev = S[::-1]
count = 0
for i in range(S_midn):
if S[i] != S_rev[i]:
count += 1
print(count)
#print(S, S_rev, S_midn) | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
17e2b144b078813d6d920ad4fdbc20fda5b6ea6f | 6440a113597191d3b78aa6b5cae6cea9fb057e2e | /Bloomberg/browser_history.py | ab02385dfe78560a3c6b50fcbb33c651b03009e8 | [] | no_license | DarshanGowda0/LC-Grind | 40c162d8894df81ea7124f66daf20f86f327b6cb | f7b9a86797d52ab1057f0300352c0c5670a59bd5 | refs/heads/master | 2023-01-28T01:27:45.195164 | 2020-12-06T03:58:14 | 2020-12-06T03:58:14 | 277,024,335 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,136 | py | class BrowserHistory:
def __init__(self, homepage: str):
self.arr = [homepage]
self.cur = 0
def visit(self, url: str) -> None:
# print("visit", url, self.cur, self.arr)
if self.cur < len(self.arr) - 1:
self.cur += 1
self.arr[self.cur] = url
w... | [
"darshan.gowda008@gmail.com"
] | darshan.gowda008@gmail.com |
8617091491520978235cfe6feb48a6c8ea795564 | 4b44a299bafbd4ca408ce1c89c9fe4a449632783 | /python2/09_Iterators_generators_coroutines/03_generators.py | e6c021858b1e50bb0263ef05ffa4be354d258bdd | [] | no_license | umunusb1/PythonMaterial | ecd33d32b2de664eaaae5192be7c3f6d6bef1d67 | 1e0785c55ccb8f5b9df1978e1773365a29479ce0 | refs/heads/master | 2023-01-23T23:39:35.797800 | 2020-12-02T19:29:00 | 2020-12-02T19:29:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 456 | py | #!/usr/bin/python
def simple_gen():
yield "Hello"
yield "World"
gen = simple_gen()
print(next(gen))
print(gen.next())
def count(n):
print "Stating to count!"
i = 0
while i < n:
yield i
# print i
i += 1
print '$', i
# return i
# PEP8 strongly discourages usag... | [
"uday3prakash@gmail.com"
] | uday3prakash@gmail.com |
8be9192cabe804ad8ee2e1c2534781dbc329f061 | 648f742d6db2ea4e97b83c99b6fc49abd59e9667 | /common/vault/oas/models/global_parameters_list_global_parameter_values_response.py | 337813587ac811bf9d012507a5d06525599367ea | [] | no_license | jmiller-tm/replit | c56ce63718f6eb2d9b53bd09d3f7b3ef3496cb86 | c8e6af3268c4ef8da66516154850919ea79055dc | refs/heads/main | 2023-08-30T00:49:35.738089 | 2021-11-16T23:09:08 | 2021-11-16T23:09:08 | 428,809,777 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,504 | py | # coding: utf-8
"""
vault/kernel/core_api/proto/v1/accounts/core_api_account_schedule_tags.proto
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: version not set
Generated by: https://github.com/swagger-api/... | [
"jmiller@jmiller-tm00769-mbp.nomad.thomac.net"
] | jmiller@jmiller-tm00769-mbp.nomad.thomac.net |
16379711e57e8d6a82d949f0f3980a1b58e0d446 | a32056487cebf6bfafef8daac9e31ebfa6b16638 | /problem-20.py | 63112fb5fc31e7f7575df96ea92c8297c8465449 | [] | no_license | samuelreboucas07/Challenges-Project-Euller | e71f9ed99dd6d44f9d5ca746a3f583c75e2fe8e1 | cb155918237606e1a2472a872a422fd6587693b5 | refs/heads/main | 2023-04-16T11:47:51.922055 | 2021-04-28T12:13:02 | 2021-04-28T12:13:02 | 347,523,638 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 270 | py | # Factorial digit sum
limit = 100
factorial = 1
sum_numbers = 0
for i in range (limit, 0, -1):
factorial *= i
numbers = list(str(factorial))
for number in numbers:
sum_numbers += int(number)
print('Soma dos dígitos do fatorial de 100: ' + str(sum_numbers)) | [
"samuelreboucas07@hotmail.com"
] | samuelreboucas07@hotmail.com |
1eac640ffbb05358b5c9e12e090adfe3f0f57f6f | a3385f7636ceb232e97ae30badee0ba9145138f8 | /egs/callhome_egyptian/s5/local/split_alt_punc.py | c81cca355810ea43e09689f8d826b53ce0d4b7e6 | [
"Apache-2.0"
] | permissive | samsucik/prosodic-lid-globalphone | b6a6ccdcece11d834fc89abaa51031fc9f9e37e1 | ca6a8e855441410ab85326d27b0f0076d48d3f33 | refs/heads/master | 2022-11-29T09:17:24.753115 | 2021-02-03T18:17:16 | 2021-02-03T18:17:16 | 149,014,872 | 3 | 2 | Apache-2.0 | 2022-09-23T22:17:01 | 2018-09-16T16:38:53 | Shell | UTF-8 | Python | false | false | 439 | py | #!/usr/bin/env python
lexicon = open("data/local/tmp/lexicon.1")
lexicon_ext = open("data/local/tmp/lexicon.2", "w")
for line in lexicon:
line = line.strip()
if "//" not in line:
lexicon_ext.write(line + "\n")
continue
lineComp = line.split("\t")
prons = lineComp[1].split("//")
for... | [
"s1531206@ed.ac.uk"
] | s1531206@ed.ac.uk |
a1d3ee3d662e370ad3b2cd6112e33cb4cf16e1e4 | 3d4520ab8ff54457b9a945c8b9151376e6ef1a71 | /plain/CalcWithVars/evaluator_test.py | 62e07092778fe48a4acbefa69ae7081499caa5c9 | [] | no_license | pliba/kaminpy | dac7e53711cb4f30d4587a3d370230212dc5c99c | f410ad951faf4d2dab257e6764a89268e106eefc | refs/heads/master | 2021-06-21T16:20:49.437529 | 2021-06-08T03:39:04 | 2021-06-08T03:39:04 | 157,875,818 | 16 | 3 | null | 2018-11-16T14:07:48 | 2018-11-16T14:07:48 | null | UTF-8 | Python | false | false | 894 | py | from pytest import mark, raises
from evaluator import evaluate, global_environment
import errors
def test_evaluate_number():
got = evaluate(7)
assert 7 == got
@mark.parametrize("ast, value", [
(['+', 1, 2], 3),
(['*', 6, ['+', 3, 4]], 42),
(['/', ['*', ['-', 100, 32], 5], 9], 37)
])
def test_ex... | [
"luciano@ramalho.org"
] | luciano@ramalho.org |
e6d3452d32c8bd6ce91a3c2635262a21fa8fd464 | 9aaa39f200ee6a14d7d432ef6a3ee9795163ebed | /Algorithm/Python/796. Rotate String.py | 27c7ca9d039d9813fbfddea0a4ad301c8c445f90 | [] | no_license | WuLC/LeetCode | 47e1c351852d86c64595a083e7818ecde4131cb3 | ee79d3437cf47b26a4bca0ec798dc54d7b623453 | refs/heads/master | 2023-07-07T18:29:29.110931 | 2023-07-02T04:31:00 | 2023-07-02T04:31:00 | 54,354,616 | 29 | 16 | null | null | null | null | UTF-8 | Python | false | false | 430 | py | # -*- coding: utf-8 -*-
# Created on Sun Mar 11 2018 11:33:15
# Author: WuLC
# EMail: liangchaowu5@gmail.com
# simple solution
class Solution(object):
def rotateString(self, A, B):
"""
:type A: str
:type B: str
:rtype: bool
"""
if A == B:
return True
... | [
"liangchaowu5@gmail.com"
] | liangchaowu5@gmail.com |
1ac9ebeaa06cf71b2d03af7f2c8a33a6ac122cf4 | 9ae6ce54bf9a2a86201961fdbd5e7b0ec913ff56 | /google/ads/googleads/v10/errors/types/asset_group_asset_error.py | 1da4cc631cf5eddf4801ea5c4b4ee4278edc732c | [
"Apache-2.0"
] | permissive | GerhardusM/google-ads-python | 73b275a06e5401e6b951a6cd99af98c247e34aa3 | 676ac5fcb5bec0d9b5897f4c950049dac5647555 | refs/heads/master | 2022-07-06T19:05:50.932553 | 2022-06-17T20:41:17 | 2022-06-17T20:41:17 | 207,535,443 | 0 | 0 | Apache-2.0 | 2019-09-10T10:58:55 | 2019-09-10T10:58:55 | null | UTF-8 | Python | false | false | 1,272 | py | # -*- coding: utf-8 -*-
# Copyright 2022 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 or... | [
"noreply@github.com"
] | GerhardusM.noreply@github.com |
e3bf61fdd1869c6df5383da371d1bbcf093107f9 | 396f93d8e73c419ef82a94174815a2cecbb8334b | /.history/tester2_20200321204328.py | ee5b1938c75144057ae20b85257b3114e9cde938 | [] | no_license | mirfarzam/ArtificialIntelligence-HeuristicAlgorithm-TabuSearch | 8c73d9448b916009c9431526864a4441fdeb682a | 90b2dca920c85cddd7c1b3335344ac7b10a9b061 | refs/heads/master | 2021-03-26T21:16:42.561068 | 2020-04-17T21:44:26 | 2020-04-17T21:44:26 | 247,750,502 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 865 | py | import os
import subprocess
import re
from datetime import datetime
import time
numberOfTests = 100
Tabu_iteration = 5
Tab
final_solution = []
print("Test for 5 0 10")
for i in range(0, numberOfTests):
process = subprocess.Popen(['./algo_tabou.exe', '20', '0', '10', 'distances_entre_villes_10.txt'],stdout=sub... | [
"farzam.mirmoeini@gmail.com"
] | farzam.mirmoeini@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.