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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dbcd29e91fa9f2683c4ecd6772bdadb128f724b9 | 6b201605227f11880c1d32c9cad300f6e29ff4ae | /Python/Buch_ATBS/Teil_1/Kapitel_01_bis_04/10_listen_add_var.py | 3d113562ea3415f7c567ab2154bba28507807152 | [
"MIT"
] | permissive | Apop85/Scripts | e2e8e6ed0c0da08a4d7c895aa366c9305197137b | 467c34e59f2708f2d2f8bb369c36fd782d365e8b | refs/heads/master | 2022-12-08T08:11:04.566376 | 2022-05-13T13:17:04 | 2022-05-13T13:17:04 | 164,251,836 | 0 | 0 | MIT | 2022-12-08T01:50:22 | 2019-01-05T21:16:45 | Python | UTF-8 | Python | false | false | 982 | py | # Erstellen, auslesen und ändern von variablen Listen
print('Lass uns eine Party organisieren!\nWen sollen wir alles einladen?')
liste=[]
counter=[0, 0]
while True:
print('Nenne einen Namen für deinen', str(counter[0]+1) + '. Gast oder beende die Liste mit Enter')
name=str(input())
if name != '':
l... | [
"39341618+Apop85@users.noreply.github.com"
] | 39341618+Apop85@users.noreply.github.com |
ee6afd68b8a85db2101475a3009c5e5431216ec8 | 0b38023dfdd50e78998fcac7e2a2b7fe01724f68 | /practice.py | de7d82c173d5339d488a64fb7f5c12a25972b9d0 | [] | no_license | patnir/TitanicKaggle | b87c60637fa541f8acd8882d09387b99bdbfd3fa | 128aff5bfaa8814ffd52886342487b7d85854b58 | refs/heads/master | 2021-01-22T04:53:22.157311 | 2017-03-04T17:02:33 | 2017-03-04T17:02:33 | 81,593,007 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 329 | py | import numpy as np
def read_file():
with open("test.csv") as f:
contents = f.readlines()[2:]
passengerInfoMap = [line.strip().split(',') for line in contents]
return passengerInfoMap
def main():
passengerMapInfo = read_file()
print passengerMapInfo
return
if __name__ == "__main__":
... | [
"rahul20patni@gmail.com"
] | rahul20patni@gmail.com |
6471c322fb35963e83fcadd5e35652c2132229a1 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03785/s323806734.py | 79858127c0064e56171656cbe0ff62fa828a48e6 | [] | 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 | 243 | py | n, c, k = map(int, input().split())
t = sorted([int(input()) for _ in range(n)])
fast, cnt, ans = 0, 0, 0
for i in t:
if fast + k < i or cnt == c:
cnt = 0
if cnt == 0:
ans += 1
fast = i
cnt += 1
print(ans)
| [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
6ba0dda082a2658716770155081a655107dcbe03 | 7846777de2b90a38dfc791c2f3ea3c6ab8603b30 | /MY_CRM/web/migrations/0004_course.py | eff3cecf7d73a796b2f6b1f6a7dfef12a5cb0318 | [] | no_license | Mrs-wang1/python-test | 9e464c88aedf10db3babe4b6fd948c7724e3ea95 | 8017a63631b994e67d3aaa342a7ea6e60fe6fe9c | refs/heads/master | 2022-09-21T06:10:53.583226 | 2019-09-07T14:53:09 | 2019-09-07T14:53:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 528 | py | # Generated by Django 2.2.3 on 2019-08-19 03:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('web', '0003_userinfo'),
]
operations = [
migrations.CreateModel(
name='Course',
fields=[
('id', mode... | [
"vita@qq.com"
] | vita@qq.com |
efc76d039da5727d804d0b07dd45263a033d4e26 | 991f857dd0ace64afbb339895da74cecd98af2ce | /parsl/tests/test_sites/test_midway/kyle_test.py | 8c90e7c2b1334113c1888655a400dc8659a1ce40 | [
"Apache-2.0"
] | permissive | annawoodard/parsl | c64b463466827d7420a1ae6b4144786a7216e689 | ad74c8ed136004813124abf1d17f5553cefe5b73 | refs/heads/master | 2021-09-09T23:10:56.972784 | 2018-03-20T03:35:08 | 2018-03-20T03:35:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,663 | py | #!/usr/bin/env python3
from parsl import App, DataFlowKernel
from parsl.dataflow.futures import Future
config = {
"sites": [
{"site": "Local_IPP",
"auth": {
"channel": "ssh",
"hostname": "swift.rcc.uchicago.edu",
"username": "yadunand",
"scriptD... | [
"yadudoc1729@gmail.com"
] | yadudoc1729@gmail.com |
3cf6de09b83c533ef2a052d6c9cbb0d0102f97c8 | c3432a248c8a7a43425c0fe1691557c0936ab380 | /CodePlus_Practice_RE/2021.04.Week2/08/5557_1학년.py | cb0edb30db68341bd98ff8b055f567599bd1f0dd | [] | no_license | Parkyunhwan/BaekJoon | 13cb3af1f45212d7c418ecc4b927f42615b14a74 | 9a882c568f991c9fed3df45277f091626fcc2c94 | refs/heads/master | 2022-12-24T21:47:47.052967 | 2022-12-20T16:16:59 | 2022-12-20T16:16:59 | 232,264,447 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 440 | py | n = int(input())
arr = [0] + list(map(int, input().split()))
dp = [[0] * 21 for _ in range(n + 1)]
dp[1][arr[1]] = 1
for i in range(1, n - 1):
for j in range(0, 21):
if dp[i][j] != 0:
if j - arr[i + 1] >= 0:
dp[i + 1][j - arr[i + 1]] += dp[i][j]
if j + arr[i + 1] ... | [
"pyh8618@gmail.com"
] | pyh8618@gmail.com |
2261791d61291c10904f053b3305b3a17a86ae52 | aa265e03e73f718d4008cfe30ada7ee32c852eec | /ARC_B/ARC033_B.py | 50cff5a2110bec95b990d1e72b67abf866727513 | [
"MIT"
] | permissive | ryosuke0825/atcoder_python | 4fb9de9733cd9ef41c2ad9ad38b3f190f49d3ad5 | 52d037d0bc9ef2c721bf2958c1c2ead558cb0cf5 | refs/heads/master | 2023-03-11T22:47:56.963089 | 2023-03-05T01:21:06 | 2023-03-05T01:21:06 | 181,768,029 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 263 | py | from collections import Counter
na, nb = map(int, input().split())
A = input().split()
B = input().split()
ac = Counter(A)
bc = Counter(B)
r = 0
for a in A:
if a in bc:
r += 1
p = len(A)
for b in B:
if not(b in ac):
p += 1
print(r/p)
| [
"ayakobon@gmail.com"
] | ayakobon@gmail.com |
a2872747db59ec5f6e15b856cae9f0e2c290997a | 5a281cb78335e06c631181720546f6876005d4e5 | /masakari-7.0.0/masakari/notifications/objects/notification.py | 82b4cc42432ef93d72e663f7890c51f5d0760edb | [
"Apache-2.0"
] | permissive | scottwedge/OpenStack-Stein | d25b2a5bb54a714fc23f0ff0c11fb1fdacad85e8 | 7077d1f602031dace92916f14e36b124f474de15 | refs/heads/master | 2021-03-22T16:07:19.561504 | 2020-03-15T01:31:10 | 2020-03-15T01:31:10 | 247,380,811 | 0 | 0 | Apache-2.0 | 2020-03-15T01:24:15 | 2020-03-15T01:24:15 | null | UTF-8 | Python | false | false | 7,005 | py | # Copyright (c) 2018 NTT DATA
#
# 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 writing, ... | [
"Wayne Gong@minbgong-winvm.cisco.com"
] | Wayne Gong@minbgong-winvm.cisco.com |
ae1bd2b41d73243fedc2607cc0d2c4caeab9e799 | de4eed9fc580be9b0c0e57c0b16ac478b3557285 | /MIT6002/week5/ProblemSet5/graph.py | 6651cf6e3513cd3987f87a82c9232f25b7f2ff1c | [] | no_license | LyingCortex/PythonCoures | 61420469c58990a8ed19c95d3060122e4b831a1e | 3cb5211d5dfa9c8c4777da117ae3f1962dfc5094 | refs/heads/master | 2021-01-10T22:22:16.119010 | 2016-04-08T14:06:24 | 2016-04-08T14:06:24 | 55,781,308 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,838 | py | # 6.00.2x Problem Set 5
# Graph optimization
#
# A set of data structures to represent graphs
#
class Node(object):
def __init__(self, name):
self.name = str(name)
def getName(self):
return self.name
def __str__(self):
return self.name
def __repr__(self):
return self.nam... | [
"liuyangxtp@gmail.com"
] | liuyangxtp@gmail.com |
5268fbcf45752a1558f179a9c741d7a1a385bb67 | 55c64c7a78c5f78f35f84ae1fce60d387ba11040 | /bc4py/user/utils.py | 006a0cc54216ec5bec89f6526697e7b4b43b269e | [
"MIT"
] | permissive | kmn/bc4py | df580de46456fed860e7fc0a812f5b46e04483c3 | 8f9ee09ed1325faad8c361a9b6c1b5abbc93cbc1 | refs/heads/master | 2020-04-13T06:04:32.273534 | 2018-12-18T02:48:41 | 2018-12-18T02:48:41 | 163,010,903 | 0 | 0 | null | 2018-12-24T17:16:21 | 2018-12-24T17:16:21 | null | UTF-8 | Python | false | false | 417 | py | from bc4py.config import V
from bc4py.database.create import closing, create_db
from bc4py.database.account import read_address2keypair
from nem_ed25519.signature import sign
def message2signature(raw, address):
# sign by address
with closing(create_db(V.DB_ACCOUNT_PATH)) as db:
cur = db.cursor()
... | [
"thhjuu@yahoo.co.jp"
] | thhjuu@yahoo.co.jp |
ec1b6645ec158d8db826a430ec22125632516747 | 75825f9fe297a8d5ef04945d2773f58aaebe6d5d | /eea/restapi/coremetadata/tests/test_doctests.py | 228862f25beabee0e22567935c1a154c7b24e0e2 | [] | no_license | eea/eea.restapi.coremetadata | e4711846fa85a504723e35f04aee8de79e507cf6 | f39acc83bb09089163907f99d91ff440f33dcebf | refs/heads/master | 2023-06-15T02:52:38.559296 | 2021-07-09T06:08:14 | 2021-07-09T06:08:14 | 377,752,141 | 1 | 0 | null | 2021-07-09T06:08:15 | 2021-06-17T08:03:30 | Python | UTF-8 | Python | false | false | 688 | py | """ Doc tests
"""
import doctest
import unittest
from eea.restapi.coremetadata.tests.base import FUNCTIONAL_TESTING
from plone.testing import layered
OPTIONFLAGS = (doctest.REPORT_ONLY_FIRST_FAILURE |
doctest.ELLIPSIS |
doctest.NORMALIZE_WHITESPACE)
def test_suite():
""" Suite
"... | [
"mlarreategi@codesyntax.com"
] | mlarreategi@codesyntax.com |
06f55180fcad96fe5f8aaca82ae6dccf6cc973be | 90f729624737cc9700464532a0c67bcbfe718bde | /lino_xl/lib/polls/fixtures/feedback.py | ce7545e0ba81364b21265591e83fe44226897485 | [
"AGPL-3.0-only"
] | permissive | lino-framework/xl | 46ba6dac6e36bb8e700ad07992961097bb04952f | 642b2eba63e272e56743da2d7629be3f32f670aa | refs/heads/master | 2021-05-22T09:59:22.244649 | 2021-04-12T23:45:06 | 2021-04-12T23:45:06 | 52,145,415 | 1 | 5 | BSD-2-Clause | 2021-03-17T11:20:34 | 2016-02-20T09:08:36 | Python | UTF-8 | Python | false | false | 1,424 | py | # -*- coding: UTF-8 -*-
# Copyright 2014-2017 Rumma & Ko Ltd
# License: GNU Affero General Public License v3 (see file COPYING for details)
from django.conf import settings
from lino.api import dd, rt
from lino.utils import Cycler
def objects():
polls = rt.models.polls
five = polls.ChoiceSet.objects.get(na... | [
"luc.saffre@gmail.com"
] | luc.saffre@gmail.com |
7d2cc8f913b097c87dd2dd9caa2e3d66f4f74d79 | 8cb210f5a7b9a46dcdd1c4f4cdebb9b006e16d2f | /cedm/belieftracking/ObjectBeliefTracker.py | 530b64014b7a715d4c16d878cdd26766c20029d8 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | drwiner/Py3Dial | 0ed4572c3d110907a27a8a8f3167299db0de1919 | 0aa5b68f4548bb15e9d167165c17306fd267ee4f | refs/heads/master | 2020-03-26T19:13:53.511897 | 2018-08-18T21:45:32 | 2018-08-18T21:45:32 | 145,254,529 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,095 | py | ###############################################################################
# PyDial: Multi-domain Statistical Spoken Dialogue System Software
###############################################################################
#
# Copyright 2015 - 2018
# Cambridge University Engineering Department Dialogue Systems Grou... | [
"drwiner131@gmail.com"
] | drwiner131@gmail.com |
fdb8ca7d716ae0a3dc1f7b41f5c3768d122c7b99 | b466a62a6b8151937212688c09b3a5704eaa7466 | /Python OOP Retake Exam - 22 Aug 2020/project/appliances/appliance.py | 227707d7f3c094fc98874167c3d84937b74194ed | [
"MIT"
] | permissive | DiyanKalaydzhiev23/OOP---Python | 89efa1a08056375496278dac3af97e10876f7728 | 7ac424d5fb08a6bd28dc36593e45d949b3ac0cd0 | refs/heads/main | 2023-07-08T08:23:05.148293 | 2021-08-13T12:09:12 | 2021-08-13T12:09:12 | 383,723,287 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 139 | py | class Appliance:
def __init__(self, cost):
self.cost = cost
def get_monthly_expense(self):
return self.cost * 30
| [
"diankostadenov@gmail.com"
] | diankostadenov@gmail.com |
ac2dfbc99a7a0e248dbad8f1758f3feed89f6d46 | fed18966525169edf96e6178e36c6fb5ab5bfe5c | /otherTools/filter_envsetup.py | ec786a0746a0b69544b1496b1afd825035b5449e | [] | no_license | huashuolee/borqs_stress | cef50c37b0dc0abdfcecd4f5de90925a61e53e88 | e3375b1032ec5a0dc625dc04c4924192ffc90f26 | refs/heads/master | 2021-01-19T01:37:11.626225 | 2019-07-12T13:21:25 | 2019-07-12T13:21:25 | 11,167,198 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 266 | py | import os
def filter():
with open('envsetup.sh','r') as file:
allline = file.readlines()
for item in allline:
if item[0:4] == "func":
with open('funclist.txt','aw') as f1:
f1.write(item)
filter()
| [
"huashuolee@gmail.com"
] | huashuolee@gmail.com |
6973841d3d6e2f6c942f338e662a36c3b5453b6c | 888f65551bb3fe1b8e84c205796b24678669a649 | /setup.py | 4898f9aa3e56d8538a55236a80b74129a9b9604f | [] | no_license | chunharrison/NBA-Predictor | e6514c70f2cf26d6db4c14aee225cfbd9d5984a7 | 967951ba34debee012385af63f2bf8031dee51ca | refs/heads/master | 2022-05-04T22:02:03.374496 | 2019-05-15T05:55:34 | 2019-05-15T05:55:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 280 | py | from templates import app
#Load this config object for development mode
# app.config.from_object('configurations.DevelopmentConfig')
#Load this config object for production mode
# app.config.from_object('configurations.ProductionConfig')
if __name__ == '__main__':
app.run()
| [
"wjsdntjr@hotmail.com"
] | wjsdntjr@hotmail.com |
6436cccb11a67a22858fffba788b3e79e683b050 | ee0c8cc7b86d4dc41469aae59e3632102fedfdb1 | /mysite/blog/models.py | 3946516c391051c0c9bd832de60543e73c100a41 | [] | no_license | Hamza-abughazaleh/blog-django | 1a177aa00d86a34cc49c6ee39f2b068d291a4f12 | 3a4b43b58beb25054e5798f219d7175629009138 | refs/heads/master | 2021-07-20T07:00:37.651344 | 2017-10-25T12:15:58 | 2017-10-25T12:15:58 | 108,093,782 | 0 | 0 | null | 2017-10-25T12:19:14 | 2017-10-24T07:44:17 | Python | UTF-8 | Python | false | false | 1,224 | py | from django.db import models
from django.utils import timezone
from django.core.urlresolvers import reverse
# Create your models here.
class Post(models.Model):
author = models.ForeignKey('auth.User')
title = models.CharField(max_length=200)
text = models.TextField()
created_date = models.DateTimeField... | [
"hamzaabughazaleh23@gmail.com"
] | hamzaabughazaleh23@gmail.com |
e81ca984fb46b96ee1438d132425f7a202cf21fa | 7eb61dcca9f98d077f8c497611257fa2c65ee44f | /2017 Programs/Functions practice/general.py | 4761f5af02efb1423ee08b093e55dbe5be58cda3 | [] | no_license | jasonyu0100/General-Programs | bf7d87cfae46d79a40e5b6c428e591ddc5ef4d97 | 0b3e71962159a8dadb3bca6db1c3a1ac2baf2634 | refs/heads/master | 2021-06-16T15:55:24.038897 | 2021-02-02T09:57:02 | 2021-02-02T09:57:02 | 139,376,295 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 690 | py | def thing(general):
values = general.replace('x^2',':').replace('x',':').replace('= 0','').replace(' ','')
values = values.split(':')
a = values[0]
if a == '':
a = 1
else:
a = int(values[0])
b = int(values [1])
c = int(values [2])
return(quadratic(a,b,c))
def quadratic(a... | [
"jasonyu0100@gmail.com"
] | jasonyu0100@gmail.com |
c16f22c2751fc69b349ab31c1d655c21054ae228 | c2e15137cd3ddfe574d06ed313f4c4039835a48b | /Disk_space/disk_space_read_dusk.py | 929164c8d8fa356fe160974f596d180ba3df3639 | [] | no_license | chandra-mta/MTA | df57845577ac50f21c4b1775a441804d78060e97 | 60015d4fbbcc7e00595152fb21a8c55e2366a982 | refs/heads/master | 2023-08-18T13:05:33.397195 | 2023-08-11T14:28:40 | 2023-08-11T14:28:40 | 4,586,218 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,048 | py | #!/usr/bin/env /data/mta/Script/Python3.8/envs/ska3-shiny/bin/python
#################################################################################
# #
# disk_space_read_dusk.py: check /data/mta space and subdirectories #
# ... | [
"bspitzbart@cfa.harvard.edu"
] | bspitzbart@cfa.harvard.edu |
03a23b59dae7cf40ea72c9aae46d4db9435c4de3 | b73b094a48b574a8445cf8120b0f67677beddc2a | /ailab/benchmark/models.py | c0b2edc5dddbd3892aef3125d3b0194c98bc374f | [
"Apache-2.0"
] | permissive | urantialife/FAI-PEP | 280a7fafe8a0c8478fd0f7a98ff5b746b3bdcf3b | 900973098c6b520cdae50b3c38c7edb8331a5143 | refs/heads/master | 2020-06-01T14:15:22.188679 | 2019-06-07T05:16:35 | 2019-06-07T05:19:29 | 190,810,964 | 1 | 0 | Apache-2.0 | 2019-06-07T21:29:31 | 2019-06-07T21:29:31 | null | UTF-8 | Python | false | false | 5,010 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
class BenchmarkInfo(models.Model):
command = models.TextField(null=False)
start_time = models.DateTimeField(null=True)
done_time = models.DateTimeField(null=True)
status = models.CharField(max_length=10,
... | [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
22ead11b195c20d6f210e17ccd5ca1a98af324fa | 6a34b039ededb2e1dcdc07c6976475654ca0ae0a | /code_all/day04/demo05.py | 42ab9e5f3133846c043b97fd1e30b2a90ccb68c5 | [
"MIT"
] | permissive | testcg/python | 57c62671ab1aad18205c1dee4457b55009cef098 | 4db4bd5d0e44af807d2df80cf8c8980b40cc03c4 | refs/heads/main | 2023-07-09T13:19:24.740751 | 2021-08-11T09:25:20 | 2021-08-11T09:25:20 | 394,932,987 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 431 | py | """
"""
# 需求:累加1--100之间整数
# 条件:能被3整除
# 思想1:满足条件 累加
# sum_value = 0
# for number in range(1,101):
# if number % 3 ==0:
# sum_value += number
# print(sum_value)
# 思想2:不满足条件 跳过
sum_value = 0
for number in range(1, 101): # 1 2 3 ...
if number % 3 != 0:
# break # 跳出
continue # 跳过
sum_... | [
"cheng@eaglesoftware.cn"
] | cheng@eaglesoftware.cn |
34c458c2f69c2407b85732ed51bc0e481574248f | 0c1d6b8dff8bedfffa8703015949b6ca6cc83f86 | /lib/worklists/operator/CU/v2.0/business/EPON_2+1/INTERNET_PPPoE_Disable/data.py | d567da9daf95534efeb0a69649522b4faf75cddf | [] | no_license | samwei8/TR069 | 6b87252bd53f23c37186c9433ce4d79507b8c7dd | 7f6b8d598359c6049a4e6cb1eb1db0899bce7f5c | refs/heads/master | 2021-06-21T11:07:47.345271 | 2017-08-08T07:14:55 | 2017-08-08T07:14:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 720 | py | # coding:utf-8
# -----------------------------doc--------------------------
# 工单 描述
WORKLIST_DOC = """
功能描述:取消服务类型为Internet的PPPoE接入方式的上网业务工单;
若不需要检查X_CU_LanInterface,则将其配置为null。
参数:
| PVC_OR_VLAN | PVC:0/65 | ADSL上行用PVC格式,LAN\EPON\VDSL则用VLAN格式,默认是ADSL的PVC |
| X_CU_LanInterface | ... | [
"zhaojunhhu@gmail.com"
] | zhaojunhhu@gmail.com |
dfb3ef63c4c1a269c8c4016a37886e7c49d0f6e3 | ab97407d4f3c91142f2bed8e5c5415fbc9be8ac6 | /python/Find Minimum in Rotated Sorted Array.py | a84fe2a75aae1f1c62ea074bac1d80ee4cc94e83 | [] | no_license | Lendfating/LeetCode | d328c68578d10d6cdba0c4dcb3359ddf085546e1 | 4cc492e04a7003839f07df93070fa9c19726a1c5 | refs/heads/master | 2020-12-30T09:26:20.461654 | 2015-02-01T08:41:46 | 2015-02-01T08:41:46 | 26,170,626 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,085 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
Created on Nov 6, 2014
@author: Zhen
'''
"""
# problem
Suppose a sorted array is rotated at some pivot unknown to you beforehand.
(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).
Find the minimum element.
You may assume no duplicate exists in the array.
Link: https://... | [
"lizhen19900409@126.com"
] | lizhen19900409@126.com |
755b75468d4a0e38a78a5d5f84c82628d67aa0a2 | c057dad7f9bce269a3e06ff007dbcac2911a7c10 | /Python/Alphabet_Rangoli.py | e311592e7950daf3fa51514c8b7b01a90e5fafe5 | [] | no_license | ApoorvaJu08/Hackerrank_solutions | bc57c695732e3db8d66bcc2795721f1a6bd10b14 | 0976dffb2eb8d8c4b5c59f94cfe3386bc5dfc4f6 | refs/heads/master | 2021-07-18T17:21:47.632636 | 2020-05-28T17:05:05 | 2020-05-28T17:05:05 | 170,991,139 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,362 | py | # You are given an integer, . Your task is to print an alphabet rangoli of size . (Rangoli is a form of Indian folk art based on creation of patterns.)
# Different sizes of alphabet rangoli are shown below:
# size 3
# ----c----
# --c-b-c--
# c-b-a-b-c
# --c-b-c--
# ----c----
# size 5
# --------e--------
# ------e-... | [
"apoorva10339@gmail.com"
] | apoorva10339@gmail.com |
4023ceeabb37a8bc59a117c99d7b0bb5e61c2a33 | 81be7f1f5e8d3772d5ade58598ab475bcee16db0 | /tests/conftest.py | 14f1cd0975e425854468fc5ae33cce8544a2e8a2 | [
"MIT"
] | permissive | csm-adapt/quality-made | 382b47681c6fc298f952b3650c40d264fc41bddf | 78f6ac780e907814ecdc904f896d44d41fb633d8 | refs/heads/master | 2022-11-05T13:44:16.723020 | 2020-06-15T20:16:48 | 2020-06-15T20:16:48 | 256,512,689 | 0 | 0 | MIT | 2020-06-15T20:16:50 | 2020-04-17T13:36:52 | Jupyter Notebook | UTF-8 | Python | false | false | 319 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Dummy conftest.py for qualitymade.
If you don't know what this is for, just leave it empty.
Read more about conftest.py under:
https://pytest.org/latest/plugins.html
"""
from __future__ import print_function, absolute_import, division
# import pytest
| [
"bkappes@mines.edu"
] | bkappes@mines.edu |
252c636c8df25c390fe6aa3e6e946172ec0f22df | 8557f1f2fe9345d8435b6641bd8bf2fd348032e4 | /backend/happy_dog_walkers_22050/urls.py | 8c5d5ebd503f87f4602cf695680d0022e9a09781 | [] | no_license | crowdbotics-apps/happy-dog-walkers-22050 | 76918a4ea15ef28c426789100410b4bce02c7fb9 | 01ca4fbb7a03f0c22be68f8668bf193f73c9a400 | refs/heads/master | 2023-01-02T04:26:13.072764 | 2020-10-28T15:01:46 | 2020-10-28T15:01:46 | 307,966,583 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,973 | py | """happy_dog_walkers_22050 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='ho... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
91ffcf4a9f44b835a7789552710f97b558dae09c | e1bc46edbe00f261282cb798eb59a25ad5227eff | /lte/gateway/python/integ_tests/s1aptests/test_attach_detach_dedicated_bearer_deactivation_invalid_ebi.py | 62d90728e6b8ae8d6846ae2bbae2ba24aa49a0e2 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | 119Vik/magma-1 | 57f9a69036c742fcfcb97e84c59be78dec650609 | 107a7b374466a837fc0a49b283ba9d6ff1d702e3 | refs/heads/master | 2022-12-14T14:03:53.841221 | 2020-07-24T10:46:09 | 2020-07-24T11:29:37 | 279,833,292 | 0 | 0 | BSD-3-Clause | 2020-07-15T12:12:30 | 2020-07-15T10:05:13 | Go | UTF-8 | Python | false | false | 3,206 | py | """
Copyright (c) 2016-present, Facebook, Inc.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
of patent rights can be found in the PATENTS file in the same directory.
"""
import unittest
import s1ap... | [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
7cac53e9783671d3c767eb265f3baf4655e0edab | 06708f7518aebd4e7559bfa621be973cf3410dc5 | /main/tests.py | b67484a7631ea22eeeb50028c5f75e24c0a91dd8 | [] | no_license | SevenLines/cloudlike-test | 487f774224ba3f17a4710d8f8f66e7eb0139482a | 8e61a733d71121c49162a8ced909b079fa5bcc89 | refs/heads/master | 2021-01-18T19:06:53.260513 | 2017-04-01T11:15:37 | 2017-04-01T11:15:37 | 86,888,516 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,382 | py | from django.contrib.auth.models import User
from django.test import TestCase
# Create your tests here.
from django.urls.base import reverse
from rest_framework.test import APIRequestFactory, APIClient
class LoggedSession(object):
def __init__(self, client, username, password):
self.client = client
... | [
"mmailm@mail.ru"
] | mmailm@mail.ru |
4f1a30b8f6fde70e658db803469424031af3d1c7 | 41c26da9c57052a3c9cd17b81d91f41ef074cf8d | /MyLeetCode/python/Longest Absolute File Path.py | ba9ce8bb44e380a85eb9064c1bd918df782f8dd1 | [] | no_license | ihuei801/leetcode | a82f59a16574f4781ce64a5faa099b75943de94e | fe79161211cc08c269cde9e1fdcfed27de11f2cb | refs/heads/master | 2021-06-08T05:12:53.934029 | 2020-05-07T07:22:25 | 2020-05-07T07:22:25 | 93,356,513 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 605 | py | ###
# Hash Table
# Time Complexity: O(n)
# Space Complexity: O(n)
###
class Solution(object):
def lengthLongestPath(self, input):
"""
:type input: str
:rtype: int
"""
if not input:
return 0
maxlen = 0
d = {0:0}
for line in input.splitlines... | [
"hhuang@pinterest.com"
] | hhuang@pinterest.com |
65ee99c661ec4dda040d3480a8693f6fa12c2810 | 1ff31cedc4794083e213e6637deaacab49cfdd9a | /pyatv/mrp/protobuf/PlaybackQueueContext_pb2.pyi | 628f26d03c1dff0d1b53f8172cfe08dc27f0d57e | [
"MIT"
] | permissive | dschu012/pyatv | 910cefec45fcfe94fe9b3fee59672299215db24b | 6496548aee09ff95f5515abb172c1ba19b9d995b | refs/heads/master | 2020-12-04T06:35:25.957921 | 2020-01-01T14:38:54 | 2020-01-01T18:35:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,431 | pyi | # @generated by generate_proto_mypy_stubs.py. Do not edit!
import sys
from google.protobuf.descriptor import (
Descriptor as google___protobuf___descriptor___Descriptor,
)
from google.protobuf.message import (
Message as google___protobuf___message___Message,
)
from typing import (
Optional as typing___O... | [
"pierre.staahl@gmail.com"
] | pierre.staahl@gmail.com |
3cf0efb5c439690a745b4b0afcc159a32c3b36e2 | 2bb1e159beec13f42384ce2a693c28fea5aad133 | /2017/Qualification/ProblemC/problemC.py | fce04778334e3fb73682d72e7a8698895567d4a1 | [] | no_license | carrdelling/google_codejam | 7d3debd26c494d3fcc70c093c732d608a0864172 | 4b3fab6bd8611ba84b06651eb563889ff6486774 | refs/heads/master | 2021-01-10T13:29:04.163189 | 2018-04-15T10:16:08 | 2018-04-15T10:16:08 | 47,877,782 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,540 | py | #!/usr/bin/env python
################################################################################
#
# Google Code Jam - 2017
#
# Qualification round - Problem C - Bathroom Stalls
#
# Joaquin Derrac - carrdelling@gmail.com
#
################################################################################
import s... | [
"carrdelling@gmail.com"
] | carrdelling@gmail.com |
eaf8e17423ab668ecda7d4f5075ff28d57c3c561 | 72b7b07e928f3f2c88e62b4c198b8611807d7259 | /findinfile.py | ed30287711553010a97d45e15f0519c3d43a8f7e | [] | no_license | f-prime/Find | 7f4ce14fa2ca41597e82d04a136c1d75a5f24f38 | c2bd7c1d75be4a33c2fbd383d5910313af7349bd | refs/heads/master | 2021-06-01T00:29:06.366424 | 2016-07-14T02:37:40 | 2016-07-14T02:37:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,216 | py | #!/usr/bin/python
import sys
import re
import os
import string
def regex(pattern, content, ifTrue, ignoreCase):
try:
for c in content:
if ignoreCase:
c = c.lower()
pattern = pattern.lower()
if re.findall(pattern, c):
print ifTrue
... | [
"max00355@gmail.com"
] | max00355@gmail.com |
7fc6a1fab5f5c18f0fd58e7c4a4b9b172bcbdaa8 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/88/usersdata/181/62057/submittedfiles/listas.py | 7b603dec79873e3fa661b19294b610e30e15fd51 | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 262 | py | # -*- coding: utf-8 -*-
def maiorDegrau(a):
b=degraus(a)
c=maior(b)
return (c)
a=[]
n=int(input('digite o tamanho da lista a:'))
for i in range (1,n+1,1):
valor=float(input('digite o valor:'))
a.append(valor)
print (maiorDegrau(a))
| [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
ff983895af7e5619847b5c3a5c7d40b3f03771cd | fb124e51024917d6479fa626d9607ff10f7a3aba | /storm-control/storm_control/sc_hardware/phreshPhotonics/phreshQPDModule.py | 197c4c947c3d64ccc05a2b30e7785a22de78b677 | [
"MIT"
] | permissive | BehnamAbaie/storm-control | 054bd7bbd903ed9635e4d1121c30544f58473c4f | 0c686321142eccad62ce3365eae22c3b69229b0d | refs/heads/main | 2023-06-18T08:04:01.108874 | 2021-07-14T00:51:15 | 2021-07-14T00:51:15 | 342,049,487 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,653 | py | #!/usr/bin/env python
"""
Phresh photonics QPD functionality
Hazen 05/17
"""
import numpy
from PyQt5 import QtCore
import storm_control.hal4000.halLib.halMessage as halMessage
import storm_control.sc_hardware.baseClasses.hardwareModule as hardwareModule
import storm_control.sc_hardware.baseClasses.lock... | [
"noreply@github.com"
] | BehnamAbaie.noreply@github.com |
2b4949e40c5ee02f83bc5156588b6d8a2223f2ed | 347def1a51bfe39068b66fb3c3c18a8a32d63c26 | /SPGanalyse.py | 9480da49fa2f17544921ccd2af345ecc267b179e | [] | no_license | xusanpangzi/python-basic-project | 42448e76fe9521c311cf4e9f875d09614b3c4908 | fbf643c995e00404d31026befc407a4c40564422 | refs/heads/master | 2020-03-21T07:59:54.115549 | 2018-06-22T14:51:22 | 2018-06-22T14:51:22 | 137,640,487 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,446 | py | from random import random
import os
def printIntro():
print("这个程序运行两个选手A和B的某种竞技比赛")
print("这个程序需要A和B的能力值(0-1)")
def getinputs():
a=eval(input("请输入选手A的能力值:"))
b=eval(input("请输入选手B的能力值:"))
n=eval(input("请输入模拟场次:"))
return a,b,n
def printsummary(winsA,winsB):
n=winsA+winsB
print("竞技分析开始,共模拟... | [
"767306336@qq.com"
] | 767306336@qq.com |
962fb6aef6c6e8ff1a4e331345aa4ba5cf8efa86 | a66697979660727e1171fc0be1e8a32605bf917b | /PythonOOP/EXAM_real/project/astronaut/geodesist.py | 332d3047133d813becdb51a0be884774663fd325 | [] | no_license | antares681/Python | 6277a8581f87bcf21204e879ab67f9aeed808b4a | 9cf28421613171ec2e763b73201e4b54a45b0b9e | refs/heads/master | 2023-07-18T05:06:01.617316 | 2021-09-04T17:25:05 | 2021-09-04T17:25:05 | 354,951,435 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 202 | py | from project.astronaut.astronaut import Astronaut
class Geodesist(Astronaut):
def __init__(self, name):
super().__init__(name, 50)
def increase_oxygen(self, amount: int):
pass | [
"lazar.iliev@outlook.com"
] | lazar.iliev@outlook.com |
5f61049ac450a224c72f423a5140bf1ee1a20b54 | 609582ee37a01ac6a67fb9c957825dcd3c9a5b3a | /LeetCode_Hash_Table/500_Keyboard_Row.py | 5a331625e6f36aa93f2fe77f6194714030c2bb26 | [] | no_license | captainjack331089/captainjack33.LeetCode | a9ad7b3591675c76814eda22e683745068e0abed | 4c03f28371e003e8e6a7c30b7b0c46beb5e2a8e7 | refs/heads/master | 2022-03-07T19:53:40.454945 | 2019-11-06T19:32:00 | 2019-11-06T19:32:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,558 | py | """
500. Keyboard Row
Category: Hash Table
Difficulty: Easy
"""
"""
Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below.
Example:
Input: ["Hello", "Alaska", "Dad", "Peace"]
Output: ["Alaska", "Dad"]
Note:
You may use one... | [
"qfhjack@gmail.com"
] | qfhjack@gmail.com |
5baa5a09c8da90a1fded7fe04a08456933e8d08e | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03568/s565017949.py | f7866ab2dae79c2bdfd7234f6e25f9d6b1def4ca | [] | 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 | 610 | py | ans = 0
number = set()
def exsearch(s, i, N, A):
if i == N:
global ans
mul = 1
for i in range(N):
if s[i] == "0":
mul *= A[i]
elif s[i] == "1":
mul *= (A[i] - 1)
elif s[i] == "2":
mul *= (A[i] + 1)
... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
d99f2e88436dce201756210d1e90004fcad2215c | de56ee2369d36c93ad802f0359f3274b9a3f0a25 | /feedback/forms.py | 0ccce9e448cc92b299f327dbb0b7a57a47fa91d5 | [] | no_license | Anubhav722/asynchronous-celery-tasks | bdfd485b6c6b2777a4712ad64ebabf347e717654 | a21f055e8e524db662d21f60dac2f8daab075f63 | refs/heads/master | 2021-01-23T00:45:41.631402 | 2017-05-31T10:47:44 | 2017-05-31T10:47:44 | 92,840,568 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 649 | py | from django import forms
from feedback.tasks import send_feedback_email_task
class FeedbackForm(forms.Form):
email = forms.EmailField(label="Email Address")
message = forms.CharField(
label="Message", widget=forms.Textarea(attrs={'rows': 5}))
honeypot = forms.CharField(widget=forms.HiddenInput(), ... | [
"anubhavs286@gmail.com"
] | anubhavs286@gmail.com |
2e7af367c84bf31c034298d0c6c9dd384f36d82c | 103ff8b603ca53320fae4eea7b2f424d8cd0fc99 | /gen_pics/split_skin_pic_single7.py | f0ea83b6da15e17320f44cc1110ff1c36b28df06 | [] | no_license | lqy169/LOL_Overlay_Assistant_Tool | 22cb7a8458d0a1bf54af914240f1b4aa01c5fd42 | 5e27a62e41dbf5469a6b26b0e2269dbeb4cbccfd | refs/heads/master | 2022-07-11T00:53:28.218999 | 2020-05-07T18:18:25 | 2020-05-07T18:18:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,029 | py | import os
import cv2
import numpy
def get_array(value, offset):
low = value - offset if value - offset > 0 else 1
high = value + offset
return [low, value, high]
def splitPic(image, center, output_path, step_size=60):
if not os.path.exists(output_path):
os.mkdir(output_path)
index = 0
... | [
"aaron19940628@gmail.com"
] | aaron19940628@gmail.com |
0d09e9df3a8bb4e0ff2530150bfa7d37a6782afa | 441f0b4b4f2016ace7bed37431779b3352b9c2e4 | /YouTube Ignorancia Zero/Programacao Para Internet/137 - Programação para Internet III: UDP/UDP_server.py | b8cc6b44a8d635c8b5fd3dbbb596ee057edef3d4 | [] | no_license | AlexGalhardo/Learning-Python | 936b2eae814d148b0b3b77cc76cf81b45fbb4a02 | b710952101a0409f585ba975e2854bf0e0286ac7 | refs/heads/master | 2020-05-19T23:32:49.285710 | 2019-09-04T17:37:27 | 2019-09-04T17:37:27 | 134,312,273 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 759 | py | from socket import *
def main():
# Cria host e port number
host = ""
port = 5000
# Cria socket
server = socket(AF_INET, SOCK_DGRAM)
# Indica que o servidor foi iniciado
print("Servidor iniciado")
# Bloco infinito do servidor
while True:
# Recebe a data e o endereço da con... | [
"aleexgvieira@gmail.com"
] | aleexgvieira@gmail.com |
78c85676a3c25b0d2a7bda7ab810dd6c33d75c1c | dfcb65de02953afaac24cc926ee32fcdede1ac21 | /src/tests/unit/security/permission/component.py | 4d72d13dd2496cf634b30fef1afe095c11ffb1fa | [
"BSD-3-Clause"
] | permissive | mononobi/pyrin | 031d0c38da945b76b07ea100554ffc7f8081b05e | 9d4776498225de4f3d16a4600b5b19212abe8562 | refs/heads/master | 2023-08-31T03:56:44.700142 | 2023-08-20T22:20:06 | 2023-08-20T22:20:06 | 185,481,041 | 20 | 8 | null | null | null | null | UTF-8 | Python | false | false | 467 | py | # -*- coding: utf-8 -*-
"""
permission component module.
"""
from pyrin.application.decorators import component
from pyrin.application.structs import Component
from tests.unit.security.permission import PermissionPackage
from tests.unit.security.permission.manager import PermissionManager
@component(PermissionPacka... | [
"mohamadnobakht@gmail.com"
] | mohamadnobakht@gmail.com |
4e65747aead20b575c9aa57aba84c519ef273b97 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_41/52.py | 7355ebde092c1425d5d5d100ea62de038880bab2 | [] | 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 | 931 | py | #!/usr/bin/python
import sys
def nextLine():
return sys.stdin.next()[:-1]
def debug(s):
sys.stderr.write("# "+s+"\n")
def vec(line):
v = []
c = [0]*10
for i in line:
ii = int(i)
v.append(ii)
c[ii] += 1
return (v,c)
def build(v,c,next):
for i in xrange(next+1,len(c)):
if c[i] > 0:
v.append(i)
c... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
54a98ddeb8477641379cb7f0e23dc48b03f67357 | f83ef53177180ebfeb5a3e230aa29794f52ce1fc | /opencv/opencv-3.4.2/samples/python/tutorial_code/ShapeDescriptors/moments/moments_demo.py | c528110ba191eaf959b3e1206f7e0dc65f0ca78d | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | msrLi/portingSources | fe7528b3fd08eed4a1b41383c88ee5c09c2294ef | 57d561730ab27804a3172b33807f2bffbc9e52ae | refs/heads/master | 2021-07-08T01:22:29.604203 | 2019-07-10T13:07:06 | 2019-07-10T13:07:06 | 196,183,165 | 2 | 1 | Apache-2.0 | 2020-10-13T14:30:53 | 2019-07-10T10:16:46 | null | UTF-8 | Python | false | false | 2,494 | py | from __future__ import print_function
from __future__ import division
import cv2 as cv
import numpy as np
import argparse
import random as rng
rng.seed(12345)
def thresh_callback(val):
threshold = val
## [Canny]
# Detect edges using Canny
canny_output = cv.Canny(src_gray, threshold, threshold * 2)
... | [
"lihuibin705@163.com"
] | lihuibin705@163.com |
68da1df1d58cc27c45e16d12798e67ef5b6c4d24 | 38a9e2780ac8b800c336207a5c0a621eb1277a53 | /src/olympus/objects/object_config.py | 8a206e9c308923052b8a175eb95f2765ce188514 | [
"MIT"
] | permissive | priyansh-1902/olympus | 2454850413bb0562a1bfe20ab35fa7e770367323 | f57ad769918c0d5d805c439ab5ffbd180af698fa | refs/heads/main | 2023-06-21T05:58:49.118264 | 2021-08-07T22:19:41 | 2021-08-07T22:19:41 | 342,454,516 | 0 | 0 | MIT | 2021-08-07T22:19:41 | 2021-02-26T03:43:08 | Python | UTF-8 | Python | false | false | 2,389 | py | #!/usr/bin/env python
from olympus import Logger
from .abstract_object import Object
class Config(Object):
def __init__(self, from_dict=None, from_json=None, name='CustomConfig'):
"""
Args:
from_dict:
from_json:
name:
"""
super(Config, self)... | [
"hase.florian@gmail.com"
] | hase.florian@gmail.com |
9adda3cd8b8c9702b90fba0d1a4a1da8c8b3a4a6 | 0b4dbc9395c56ac4fd8a4286c7702a5fc1690f25 | /python/5Kyu/pig_it.py | 18b1c0f33b82e20446a41071a6443098ad57a48e | [] | no_license | guiconti/CodeWars | 5865b094e6321ed55bc92fb833b25c50b1e5916e | 7ad61fec596c893a4b0ce19399868b035a8a1b0b | refs/heads/master | 2021-01-20T13:55:29.710590 | 2017-04-15T22:37:24 | 2017-04-15T22:37:24 | 82,721,936 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 200 | py | from string import punctuation
def pig_it(text):
latin = lambda word: (word[1:] + word [:1] + 'ay') if word not in punctuation else word
return ' '.join([latin(word) for word in text.split()]) | [
"guibasconti@gmail.com"
] | guibasconti@gmail.com |
3e853dc2c19fe9db79e52bafdad7399ee899e5f3 | 68bad4b3d92872bb5b77b4ee503e588d20511a27 | /python/scripts_inhibition/eNeuro_fig_08_pert_control.py | 7638ffd2cd0f298b06389888a1a9dc26a6fb89b2 | [] | no_license | mickelindahl/bgmodel | 647be626a7311a8f08f3dfc897c6dd4466fc0a92 | 78e6f2b73bbcbecd0dba25caf99f835313c914ee | refs/heads/master | 2023-08-29T13:57:04.122115 | 2022-02-11T14:28:23 | 2022-02-11T14:28:23 | 17,148,386 | 7 | 3 | null | null | null | null | UTF-8 | Python | false | false | 7,770 | py | '''
Created on Aug 12, 2013
@author: lindahlm
'''
from core.network.default_params import Perturbation_list as pl
from core import misc
import numpy
import pprint
pp=pprint.pprint
# from oscillation_perturbations8 import get_solution_final_beta2
def STN_ampa_gaba_input_magnitude():
l=[
[20, 188, 0.08],... | [
"mickelindahl@gmail.com"
] | mickelindahl@gmail.com |
63ca8613a966805b5c7cea3f25a0bacdf5cc62f5 | 8dc84558f0058d90dfc4955e905dab1b22d12c08 | /chrome/browser/ui/ash/ksv/DEPS | d8e20efee657dcf080a8e16cfeb6bdf38d795615 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | meniossin/src | 42a95cc6c4a9c71d43d62bc4311224ca1fd61e03 | 44f73f7e76119e5ab415d4593ac66485e65d700a | refs/heads/master | 2022-12-16T20:17:03.747113 | 2020-09-03T10:43:12 | 2020-09-03T10:43:12 | 263,710,168 | 1 | 0 | BSD-3-Clause | 2020-05-13T18:20:09 | 2020-05-13T18:20:08 | null | UTF-8 | Python | false | false | 466 | include_rules = [
"-ash"
"-chrome",
"+ash/components/shortcut_viewer/public",
"+chrome/browser/ui/ash/ksv",
]
specific_include_rules = {
"keyboard_shortcut_viewer_metadata_unittest\.cc": [
"+ash/components/shortcut_viewer",
"+chrome/browser/ui/views",
],
# https://crbug.com/841020
"keyboard_sho... | [
"arnaud@geometry.ee"
] | arnaud@geometry.ee | |
022a693d1d77c7c39f3bfe9cf3e5f5dcd69d45c9 | 8ecfcc5732558a9152a80c0f6ce9ed1f34b913ee | /ci/solidityci.py | dafd00997a4ae75290767505628c76830f56cf4c | [
"GPL-2.0-only"
] | permissive | sambacha/mev-assist-contracts | 5ada5c8289a097665f1b03b64b84284310c556c6 | 04b866132b12985e6493150bcc23f94772e60d68 | refs/heads/master | 2023-04-01T11:15:35.864434 | 2021-04-08T20:01:29 | 2021-04-08T20:01:29 | 356,015,183 | 1 | 0 | MIT | 2021-04-08T18:43:48 | 2021-04-08T18:43:07 | Solidity | UTF-8 | Python | false | false | 5,127 | py | import sys
from yattag import Doc
from slither.slither import Slither
from slither.slithir.operations import Call, EventCall
from slither.core.declarations import Modifier
if len(sys.argv) != 2:
print("python3 solidityci.py contract.sol [output]")
sys.exit(-1)
target = sys.argv[1]
def getEventsOfFunction(... | [
"sam@freighttrust.com"
] | sam@freighttrust.com |
c37267fa9b0f9ce0009c464ae5fa282cf84f2dbd | 621dfccf1ace31bcf48cd1e7cc80b8dbd556b21b | /03_bigdata/01_collection/02_openapi/01_Basic/01_xml/01_NEWS_search (1).py | 5d72bdc54e66f06a1328ce300901a6b00b921abb | [] | no_license | hansangwoo1969/iot_python2019 | 35d90997b442845d1f5fa5a6119d5352a8dbe46f | e1ea46bb4afcc33e1fc28b43e845759d8688098b | refs/heads/master | 2020-06-14T22:19:47.647686 | 2019-09-19T07:40:16 | 2019-09-19T07:40:16 | 195,142,246 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,423 | py | # [참고사항]
# - API 호출수 25,000회/일로 제한
# - 한번 호출에 최대 100개 검색
# - 한번 실행에 최대 1000개까지 기사 검색
import urllib.request
import datetime
import json
app_id="EHK_oQA_3p1nOWkjJhuJ"
app_pw="h3lJUgpHxx"
def get_request_url(url):
req = urllib.request.Request(url)
req.add_header("X-Naver-Client-Id", app_id)
req.add_header("X... | [
"you@example.com"
] | you@example.com |
232f0e1825b64db16a33cc678f782fa66c7d9219 | eb7bef45ac848e585586a2e51f177d5ca37384d0 | /TwistedIntro/blocking-server/slowpoetry.py | fee03307cc33239cac84f722ca4867d89d933911 | [
"MIT"
] | permissive | gsrini27/Books-BK-PythonCookbook3rd | bb55cb9d0e3623d582b281e6d9981a4fa5f98d5f | 1b9d9f71d4102bf8a07a6e425caacfe0fce52a99 | refs/heads/master | 2023-03-17T01:07:15.576298 | 2018-02-28T05:42:49 | 2018-02-28T05:42:49 | 506,852,495 | 1 | 0 | null | 2022-06-24T02:25:37 | 2022-06-24T02:25:37 | null | UTF-8 | Python | false | false | 2,562 | py | # This is the blocking version of the Slow Poetry Server.
import optparse, os, socket, time
def parse_args():
usage = """
usage: %prog [options] poetry-file
This is the Slow Poetry Server, blocking edition.
Run it like this:
python slowpoetry.py <path-to-poetry-file>
If you are in the base ... | [
"chyiyaqing@gmail.com"
] | chyiyaqing@gmail.com |
7f2953d82ddaee2dced8136d52bb2819c6b70242 | ec43235341b0217cc1038fcfd3edb573af618929 | /fullpythontutorial/functions/exercises/return_day.py | 253bc9967ece8af6553ea2d2c486f4bbafd5e30c | [] | no_license | Lunchesque/udemy | 9a90793be39cb76c15eed1ca05517a3bf7e8ca58 | 5aad30642e3063fcf5c5276069f869f2c223a4d3 | refs/heads/master | 2021-04-30T08:25:00.075288 | 2018-05-01T20:05:09 | 2018-05-01T20:05:09 | 121,374,875 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 277 | py | days = {1: "Sunday",
2: "Monday",
3: "Tuesday",
4: "Wednesday",
5: "Thursday",
6: "Friday",
7: "Saturday"
}
def return_day(key):
if key in days.keys():
return days[key]
return None
print(return_day(45))
| [
"lunchesque1993@gmail.com"
] | lunchesque1993@gmail.com |
277ff5954014bfb5270dcdf269bf1caf24d860f6 | 728440e47484f819cf58e4855272afa6b83a5b45 | /flask_intro/4_conditions/app.py | 292cede411691b1bc4c7c09023ca7ff28b230712 | [] | no_license | jgrynczewski/Pytwwa3_backend | ac30ca95834a1386fa180362f2cad2cfe5102ac5 | 67c4cd88cf6a585c1bad80693435f7d5329ed5c3 | refs/heads/master | 2022-12-17T07:06:06.502986 | 2020-09-19T11:31:55 | 2020-09-19T11:31:55 | 275,351,060 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 669 | py | import datetime
from flask import Flask
from flask import render_template
app = Flask(__name__)
@app.route("/newyear")
def index2():
now = datetime.datetime.now()
var = now.month == 1 and now.day == 1
return render_template("index2.html", context=var)
# @app.route("/")
# def index():
# now = datet... | [
"jgrynczewski@gmail.com"
] | jgrynczewski@gmail.com |
18aa03066f108c14c9e94f3b5ade0f92ae2fc5f0 | 5ec2f12793dcf33b63cdb6c4a39febbce685d375 | /practise5-13.py | a9aa0f053ddae3591c0d8bcba6925f1fde71131c | [] | no_license | XiangLei5833/Python- | 11af2d408f16c892786657a7f8d45c92f3f41473 | 06f83bc99a4ed29526617333875d93753efc65fb | refs/heads/master | 2020-04-05T13:41:48.664969 | 2017-07-03T13:11:15 | 2017-07-03T13:11:15 | 94,986,116 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 290 | py | #!/usr/bin/env python
# -*- coding: utf-8
# 时间转换
def Min(a, b):
min = a*60 + b
return min
if __name__ == '__main__':
M = input('Enter a time: ')
try:
(h, m) = M.split(':')
print Min(h, m)
except ValueError:
print 'Please input again'
| [
"leixiang5833@163.com"
] | leixiang5833@163.com |
c634f7838d93731421970ff2749e98a2e68ff633 | ee0b9cd2424e634a212a6d9734af1eaedd40dfe0 | /jhub37_mcstas_baseline/sasview-5.0.3/src/sas/sasgui/perspectives/invariant/report_dialog.py | a24b33b4a1685f7a295f41edc6d84337f8090152 | [
"BSD-3-Clause"
] | permissive | moving-northwards/Docker | 775755b4618c1a7946f540505b0178e119d294d1 | 8ef18fd8c6abb0608ce9b53187e53d00d3e4e9ae | refs/heads/master | 2023-05-26T08:42:58.634525 | 2021-06-15T08:41:08 | 2021-06-15T08:41:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,066 | py |
################################################################################
# This software was developed by the University of Tennessee as part of the
# Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
# project funded by the US National Science Foundation.
#
# See the license text in license.... | [
"torben.nielsen@esss.se"
] | torben.nielsen@esss.se |
61e243157499055f9d9eb5b9e36372bc401a29b9 | 276be0a3381ea09dfc9cfe80ae748be1013db478 | /0x15-api/2-export_to_JSON.py | e9d0387a7aed46b7ac5c6bd39693df70a36f0d76 | [] | no_license | ch-canaza/holberton-system_engineering-devops | c8b2f30ed8c67fa72859653a62b8e1d60b82c8e3 | a4f0493d5d2f4465136ac30c2f68577e2647cf42 | refs/heads/master | 2020-12-23T02:30:21.603123 | 2020-10-08T20:27:02 | 2020-10-08T20:27:02 | 237,005,672 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 834 | py | #!/usr/bin/python3
"""extend your Python script to export data in the JSON format
"""
import json
import requests
import sys
if __name__ == "__main__":
user_id = sys.argv[1]
url = "https://jsonplaceholder.typicode.com/"
user = requests.get(url + "users/{}".format(user_id)).json()
username = user.get("... | [
"ch-canaza@hotmail.com"
] | ch-canaza@hotmail.com |
a4d9cc679a23f01eba13c6ae03d21d9801539259 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/59/usersdata/233/48941/submittedfiles/testes.py | 54d357411f5a07441d5b860c42a8291e75200622 | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 154 | py | # -*- coding: utf-8 -*-
#COMECE AQUI ABAIXO
import math
soma=0
list=[1,2,0,5]
for number in list:
soma=soma+number
print(soma)
| [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
3f8d9842e66c79464fca6fdbd9ebceb598f71237 | d1c67f2031d657902acef4411877d75b992eab91 | /swagger_client/models/alert_paging.py | e179b7c1a9de057786dc66856c0216787a5f2e3e | [] | no_license | Certn/opsgenie-python | c6e6a7f42394499e5224d679cc9a449042fcf9c3 | bd5f402f97d591e4082b38c938cbabca4cf29787 | refs/heads/master | 2023-01-01T10:45:13.132455 | 2020-10-27T17:40:01 | 2020-10-27T17:40:01 | 307,769,432 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,541 | py | # coding: utf-8
"""
Opsgenie REST API
Opsgenie OpenAPI Specification # noqa: E501
OpenAPI spec version: 2.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class AlertPaging(object):
"""NOTE: This class is auto gen... | [
"john@oram.ca"
] | john@oram.ca |
d7facc1d411be92c520d8a8acdebf6b8d43b455e | 0ff09b6c7b926eb5adfe8c6da76f55ba2ada26f6 | /dwi_ml/models/projects/transformers_utils.py | cac71e76f6b0dcc622d7c547125c623a642dadbf | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | scil-vital/dwi_ml | 1885545b65bad1f3503703e575f27fd5b3749eeb | 229456e0d4a9b73c0fd1069b062ca02c49dece00 | refs/heads/master | 2023-08-20T17:48:32.008843 | 2023-08-18T14:09:04 | 2023-08-18T14:09:04 | 236,539,765 | 8 | 5 | MIT | 2023-09-08T12:17:28 | 2020-01-27T16:44:42 | Python | UTF-8 | Python | false | false | 6,499 | py | # -*- coding: utf-8 -*-
from dwi_ml.models.embeddings_on_tensors import keys_to_embeddings
from dwi_ml.models.projects.positional_encoding import (
keys_to_positional_encodings)
from dwi_ml.models.projects.transforming_tractography import (
AbstractTransformerModel)
from dwi_ml.models.utils.direction_getters im... | [
"emmanuelle.renauld@usherbrooke.ca"
] | emmanuelle.renauld@usherbrooke.ca |
02256e8e6a3315e909dc863ee36c3c8cca35e84f | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /data/p2DJ/New/program/qiskit/noisy/startQiskit_noisy403.py | cd8a57d1ebb783bb9a9cb258be10e4a008cc3619 | [
"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 | 3,480 | py | # qubit number=2
# total number=21
import cirq
import qiskit
from qiskit.providers.aer import QasmSimulator
from qiskit.test.mock import FakeVigo
from qiskit import IBMQ
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from ... | [
"wangjiyuan123@yeah.net"
] | wangjiyuan123@yeah.net |
4c53e34b8080285df095d10d6a18a2fc29712933 | 1837473484f7e712aaf837b96ea7f61bf5129bfc | /lesson7/2.py | 1d35246682bc338d61f18e8a4cdea6d43eb0558e | [] | no_license | kirigaikabuto/DistanceLesson | f6b6ddf65f3720aece00b11354bb911abe666b0e | cfe3c53b895c40e3dae71a38135e73a6e8ba92c7 | refs/heads/master | 2021-05-15T02:28:03.913147 | 2020-04-18T14:48:57 | 2020-04-18T14:48:57 | 250,292,160 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 296 | py | import random
n = int(input())
arr=[]
for i in range(n):
arr.append(random.randint(0,1000))
for i in range(len(arr)):
for j in range(0, len(arr) - i - 1):
if arr[j] > arr[j + 1]:
(arr[j], arr[j + 1]) = (arr[j + 1], arr[j])
print(arr)
print("Min",arr[0],"Max",arr[n-1]) | [
"tleugazy98.com"
] | tleugazy98.com |
1792f7fca33652996ca23412548e9dbe7bce91b5 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03281/s494126680.py | 2f74676371b4c6dbc8b5a1e6827fe4a16594bc98 | [] | 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 | 288 | py | N = int(input())
ret = 0
if N <= 105:
if N == 105:
print(1)
else:
print(0)
exit()
ans = 1
for i in range(106, N+1):
ret = 0
for j in range(1, i+1):
if i % j == 0:
ret += 1
if ret == 8 and i % 2 == 1:
ans += 1
print(ans) | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
691a516724aa3bccca042c4b25d59667666eb2d1 | 86b9a8564e380c2bcf4fe8ad7577f219a089b38a | /Codewars/Two Sum.py | 4af66375591d07160d10d4fc21bbca527e0a1ca6 | [] | no_license | Adamkadaban/Competition-Programs | 72a706cab889626940b63187b0c947ab3b30f156 | caa13752a52ef47af15dee977918374598d1d176 | refs/heads/master | 2021-11-24T16:43:07.452881 | 2021-11-23T19:44:54 | 2021-11-23T19:44:54 | 172,764,905 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 243 | py | def two_sum(numbers, target):
for i in range(len(numbers)):
for j in range(len(numbers)):
if i!=j:
if numbers[i]+numbers[j]==target:
return sorted([i, j])
return
| [
"34610663+Adamkadaban@users.noreply.github.com"
] | 34610663+Adamkadaban@users.noreply.github.com |
cc8e3ba0e7fdb7c26ae555b85e43e711c2c9cbb9 | b7e924cff3940a94014f7ef83f830f31c61b1ce1 | /Assignments/Basic Syntax Conditional Statements and Loops/More Exercise/01. Find The Largest.py | c8834820536bd3d477e2063360f4ba164a1ddc47 | [
"MIT"
] | permissive | KaloyankerR/python-fundamentals-repository | a1406ca021819ca32390700380646f1107bf078e | b8e69523ea7e6aa352e8398f0202e283374a0f7c | refs/heads/master | 2023-04-10T05:22:43.907759 | 2021-04-20T20:45:54 | 2021-04-20T20:45:54 | 289,025,722 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 128 | py | number = reversed(sorted(input()))
largest_number = ''
for digit in number:
largest_number += digit
print(largest_number)
| [
"kaloyankulov2003kk@gmail.com"
] | kaloyankulov2003kk@gmail.com |
d85f634430ae93c34e955cc092e3eca507e43650 | aa3f670fcc2b43d8a5eb8a131082510bed2eb4d8 | /scripts/dbutil/scrape_ndbc.py | 65b5b5a01233011e00a47e7297ba66856e8ab8ee | [
"MIT"
] | permissive | jamayfieldjr/iem | e0d496311d82790ad518c600c2fcffe44e834da1 | 275b77a65f3b12e26e6cbdb230786b9c7d2b9c9a | refs/heads/master | 2020-08-07T11:55:56.256857 | 2019-10-04T04:22:36 | 2019-10-04T04:22:36 | 213,439,554 | 1 | 0 | MIT | 2019-10-07T17:01:20 | 2019-10-07T17:01:20 | null | UTF-8 | Python | false | false | 2,952 | py | """See if we can get metadata dynmically from NDBC
var currentstnlat = 29.789;
var currentstnlng = -90.42;
var currentstnname = '8762482 - West Bank 1, Bayou Gauche, LA';
<b>Site elevation:</b> sea level<br />
"""
from __future__ import print_function
import requests
from pyiem.reference impor... | [
"akrherz@iastate.edu"
] | akrherz@iastate.edu |
b3d8547cf17ad5fffa3f7482415fd3e8955ab8a4 | 7c8bd2e26fdabf1555e0150272ecf035f6c21bbd | /ps프로젝트/GP/DOM.py | 3458c120757e5f5206f30c1c7f1b2d09d8e437ab | [] | no_license | hyeokjinson/algorithm | 44090c2895763a0c53d48ff4084a96bdfc77f953 | 46c04e0f583d4c6ec4f51a24f19a373b173b3d5c | refs/heads/master | 2021-07-21T10:18:43.918149 | 2021-03-27T12:27:56 | 2021-03-27T12:27:56 | 245,392,582 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 672 | py | from collections import deque
if __name__ == '__main__':
n,m,p=map(int,input().split())
channel=[-1]*(m+1)
watched=[False]*(m+1)
for i in range(n):
a,b=map(int,input().split())
if channel[b]==-1:
channel[b]=a
q=deque()
q.append(p)
res=0
arr=[]
while q:... | [
"hjson817@gmail.com"
] | hjson817@gmail.com |
42564cde83b8dcd632f507bf76e2a3269798f858 | a46e3ab5260c819e2b1a20343205b248a76314f3 | /pycharm_wrong_infer_none.py | c161ce8e3adc25b0fbaef060cf017a2a5ac46b9b | [] | no_license | albertz/playground | 97ea882eb077e341c69f9e593918d38f89f8bc64 | f30c6330d855056f1756eeb558aa51fe72040c4e | refs/heads/master | 2023-08-16T16:33:01.780047 | 2023-07-31T11:46:58 | 2023-07-31T11:46:58 | 3,687,829 | 10 | 3 | null | null | null | null | UTF-8 | Python | false | false | 432 | py |
"""
https://youtrack.jetbrains.com/issue/PY-50411
"""
from typing import Optional, Tuple
class Obj:
def __init__(self, a: Optional[int]):
self.a = a
def func(obj: Obj):
# No warning here.
print(None if obj.a is None else (obj.a + 1))
def func_loop(objs: Tuple[Obj]):
for obj in objs:
# Warning o... | [
"albert.zeyer@rwth-aachen.de"
] | albert.zeyer@rwth-aachen.de |
d506b8441492c97b538b1d8cb62af8f84ecd8039 | 52825eeb90f5c31a344a5485617ff4ba2af42217 | /chapter_04/4_4.py | d773561fdc6be0c28cfce7cbbe7e1bb7d1b54a67 | [] | no_license | hsqf/Course_Python | e3c73e1e1c067f3c2d83def49651e3bb111737f2 | d1a0633a600dc84d9faed9537b64ff1f16b1a9ce | refs/heads/master | 2021-01-03T20:34:13.404896 | 2019-09-22T02:29:02 | 2019-09-22T02:29:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 627 | py | # -*- coding: utf-8 -*-
"""
描述:
Python 中的类变量和对象变量(实例的变量)
"""
class A:
# 类变量
aa = 1
def __init__(self, x, y):
"""
构造函数
"""
self.x = x
self.y = y
if __name__ == '__main__':
# a = A(2, 3)
# print(a.x, a.y, a.aa)
# print(A.aa)
# ... | [
"1692717842@qq.com"
] | 1692717842@qq.com |
84d81997b27ffbe4f13e77c324fbad2e814eb97d | 4c2b03c36f3cf013f9a5aff389a4cc235ef4c38b | /0x0B-python-input_output/10-class_to_json.py | 65c0cfef88c477dbc75dec647679f16e68622e28 | [] | no_license | felipesv/holbertonschool-higher_level_programming | 48066d8a48e05d33c6f477fc7a9feb999c3064c6 | 2091f5fd25c6c4004351046ac032ef55f958acde | refs/heads/master | 2020-09-29T00:57:04.546582 | 2020-05-14T16:17:58 | 2020-05-14T16:17:58 | 226,907,330 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 221 | py | #!/usr/bin/python3
"""
returns the dictionary description with simple data structure
"""
def class_to_json(obj):
"""
returns the dictionary description with simple data structure
"""
return obj.__dict__
| [
"1165@holbertonschool.com"
] | 1165@holbertonschool.com |
1cab681fb32867c885f46fa0180690b404845a46 | d01812e8c3c882ae9389cfbe671b79d48eff88c5 | /databuild/functions/data.py | d6378bc67ba4569ab8f56e62006e5bfe7aaedb6f | [
"BSD-3-Clause"
] | permissive | databuild/databuild | 7ff5952cff899af3ecf787a65240ecfae7c25a41 | 4c8ee04fad1748f5b966753057ac05efbc289b10 | refs/heads/master | 2021-01-17T09:40:40.709602 | 2014-10-17T21:44:01 | 2014-10-17T21:44:22 | 17,579,913 | 1 | 0 | null | 2014-07-17T21:49:34 | 2014-03-10T02:50:45 | Python | UTF-8 | Python | false | false | 660 | py | def cross(environment, book, row, sheet_source, column_source, column_key):
"""
Returns a single value from a column from a different dataset, matching by the key.
"""
a = book.sheets[sheet_source]
return environment.copy(a.get(**{column_key: row[column_key]})[column_source])
def column(environme... | [
"flavio.curella@gmail.com"
] | flavio.curella@gmail.com |
37cdf9745c8343190254ace798b16cbf21ddab89 | 64e0b9c8e1264e3e866e80e2faad513b90cec54e | /mlflow/labs/experiment_ce.py | 440579886d68b081d2ff536155d0470cba90284b | [
"Apache-2.0"
] | permissive | dsnoor/tutorials-1 | ac59a54c6788e6371d3745fd1e16cbc9a5e655ae | ee274f7c19453be26dd7e3ca0a7fcbe8649a3664 | refs/heads/master | 2021-01-02T01:46:31.872699 | 2020-01-07T01:03:24 | 2020-01-07T01:03:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,206 | py | import os
import shutil
from random import random, randint
import mlflow
from mlflow import log_metric, log_param, log_artifacts
from mlflow.tracking import MlflowClient
if __name__ == "__main__":
# set the tracking server to be Databricks Community Edition
# set the experiment name; if name does not exist, ... | [
"dmatrix@comcast.net"
] | dmatrix@comcast.net |
83ed695cbe3ba49626c1b65be9891794603757de | 5b412f48f44dbb16bd666258b07d84e9bcccf55a | /ogutils/collections/transformations.py | 1565afddf14a28ecaffc0fb19d98f4f6001d6064 | [
"MIT"
] | permissive | cademarkegard/og-python-utils | 46560b2f23efc06e1dfcfa2e3e7bb95c0d74916b | 00f44927383dd1bd6348f47302c4453d56963479 | refs/heads/master | 2020-12-31T01:36:44.508892 | 2015-12-17T07:23:26 | 2015-12-17T07:23:26 | 45,757,651 | 0 | 0 | null | 2015-11-07T22:35:46 | 2015-11-07T22:35:46 | null | UTF-8 | Python | false | false | 2,541 | py | import inspect
from checks import is_collection
from itertools import islice
def recursive_iter(enumerables):
'''
Walks nested list-like elements as though they were sequentially available
recursive_iter([[1,2], 3])
# => 1, 2, 3
'''
if not is_collection(enumerables) or isinstance(en... | [
"mseal007@gmail.com"
] | mseal007@gmail.com |
1dbaafbea961ff7503349f555929d5a16bcdee1b | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /benchmark/startQiskit_QC538.py | ed59f1cd106c96edbf1f43c16cc772095a227fb9 | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/QDiff | ad53650034897abb5941e74539e3aee8edb600ab | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | refs/heads/main | 2023-08-05T04:52:24.961998 | 2021-09-19T02:56:16 | 2021-09-19T02:56:16 | 405,159,939 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,699 | py | # qubit number=3
# total number=15
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
import networkx as nx
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collectio... | [
"wangjiyuan123@yeah.net"
] | wangjiyuan123@yeah.net |
2ac54659da235071d764f4fa0a02e33f141ca98b | 67055c66ae4bca82ee61dab1757b73cc21559cfd | /regex_solutions/24_extract_date.py | 7928f7ec907940aa4e9d04287d2437c3ba0ded94 | [] | no_license | kevinelong/network_python | 0482f694c9c050f4226bdfb7cc4fe31df26dd17b | 41158808bac5d127c3f3f3cfaea202cb60d7167c | refs/heads/master | 2023-07-14T12:20:14.550017 | 2021-08-26T00:13:45 | 2021-08-26T00:13:45 | 359,521,517 | 1 | 20 | null | 2021-04-28T18:08:15 | 2021-04-19T16:12:03 | Python | UTF-8 | Python | false | false | 354 | py | import re
# 24) Write a Python program to extract year, month and date from a an url.
def extract_date(url):
return re.findall(r'/(\d{4})/(\d{1,2})/(\d{1,2})/', url)
url1 = "https://www.washingtonpost.com/news/football-insider/wp/2016/09/02/odell-beckhams-fame-rests-on-one-stupid-little-ball-josh-norman-tells-a... | [
"kevinelong@gmail.com"
] | kevinelong@gmail.com |
c9c5643d8ecbfccdc28cf26c7521298bf53c3816 | 1ef58ad5f86860b87e54c7d6096f464371a3e851 | /Dictionary/1.SortingScript.py | f360fe087b1e012d9eeddbd4fa4e4431b77bf3e7 | [] | no_license | Wolvarun9295/PythonDataStructures | c4b8edf1accb0886c20401f49589b19b5ea45135 | 456429dca7fc3cbd20be6c555ecfe55d78b8c9e1 | refs/heads/master | 2022-10-30T14:37:05.420578 | 2020-06-15T18:38:06 | 2020-06-15T18:38:06 | 272,503,557 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 524 | py | # Imported operator module.
import operator
# Initialized a dictionary.
dictionarySample = {3: 4, 1: 2, 7: 8, 5: 6, 0: 0}
print(f'Dictionary: {dictionarySample}')
# Sorting in Ascending.
sortedDictionary = sorted(dictionarySample.items(), key=operator.itemgetter(1))
print(f'Dictionary values sorted in Ascending: {sort... | [
"varun.nagrare@gmail.com"
] | varun.nagrare@gmail.com |
47bc38ad981925fba08f74b8e0993b01f22ea091 | 0f68d41e99d00122c8b51a34e526b7c0e47c9b26 | /evening6-12/goodluck/goodluck/wsgi.py | 2279b2274a159434a86b8e565810929100a71976 | [] | no_license | sTranger-q/django | 4f3c6e906e78f478c33d1604340f19f106d3a13e | 1ab13d32f4bdcaf3fee1b8e33ec2b1b5c6b66bd4 | refs/heads/master | 2022-11-08T05:29:36.122018 | 2020-06-30T10:01:23 | 2020-06-30T10:01:23 | 270,882,617 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 393 | py | """
WSGI config for goodluck project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETT... | [
"853561128@qq.com"
] | 853561128@qq.com |
57601356c01b5a14571cedcfc8f71cc69c8f692d | 5c5e2af6257627c6932bba48699829a128655a8e | /tests/benchmark_speed_ws.py | 4bebede8d42d53e8bda83dd588b99ff6df2c7dce | [
"MIT"
] | permissive | jiahuei/document-scanner-opencv-ws | 6d3036665c1300cf87137f1f24eaebc00c8fbf55 | a8efaffd4f26381e54925f79ca93400fd7abe273 | refs/heads/main | 2023-04-14T21:51:54.793997 | 2021-04-27T14:44:13 | 2021-04-27T14:44:13 | 362,004,458 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,118 | py | # -*- coding: utf-8 -*-
r"""
Created on 18 Mar 2021 18:06:08
@author: jiahuei
python -m tests.benchmark_speed_ws
"""
import logging
import os
import websocket
import json
import numpy as np
from statistics import median, mean
from multiprocessing import Pool
from multiprocessing.pool import ThreadPool
from time impor... | [
"tanjiahuei@gmail.com"
] | tanjiahuei@gmail.com |
4bc8f73e0b7968f966e9fce51e8e40f667df430a | 042dbd0ecc3bb3a847682a6bc4007e0860c6c259 | /Qshop/celery.py | 72ee7a2169ad330038ed298e41b5e3a3ae9b70dc | [] | no_license | Hqj130359/Qshop | 3276ebe48905a7fdc67afb2c4f6bf8c65884aa1b | d98ed66cab2d673d88c20599ddb4871cbd1296b6 | refs/heads/master | 2022-12-16T02:34:28.809332 | 2019-10-06T13:31:43 | 2019-10-06T13:31:43 | 213,158,844 | 0 | 0 | null | 2022-12-04T14:50:41 | 2019-10-06T11:48:18 | CSS | UTF-8 | Python | false | false | 554 | py | from __future__ import absolute_import,unicode_literals
import os
from celery import Celery
from django.conf import settings
#设置celery的环境变量和django-celery的工作目录
os.environ.setdefault('DJANGO_SETTINGS_MODULE','CeleryTask.settings')
#实例化celery应用
app=Celery("art_project")
#celery服务器的名称
#加载celery配置
app.config_from_obje... | [
"zhangsan@qq.com"
] | zhangsan@qq.com |
8195918a5f75065826a553698356d32bd9a59276 | 7889f7f0532db6a7f81e6f8630e399c90438b2b9 | /3.4.0/_downloads/0d94160c338d1cb111a4d38e5df5307f/polar_bar.py | a833342b532ccbb7cc3331222f28ab2487553ab3 | [] | no_license | matplotlib/matplotlib.github.com | ef5d23a5bf77cb5af675f1a8273d641e410b2560 | 2a60d39490941a524e5385670d488c86083a032c | refs/heads/main | 2023-08-16T18:46:58.934777 | 2023-08-10T05:07:57 | 2023-08-10T05:08:30 | 1,385,150 | 25 | 59 | null | 2023-08-30T15:59:50 | 2011-02-19T03:27:35 | null | UTF-8 | Python | false | false | 862 | py | """
=======================
Bar chart on polar axis
=======================
Demo of bar plot on a polar axis.
"""
import numpy as np
import matplotlib.pyplot as plt
# Fixing random state for reproducibility
np.random.seed(19680801)
# Compute pie slices
N = 20
theta = np.linspace(0.0, 2 * np.pi, N, endpoint=False)
r... | [
"quantum.analyst@gmail.com"
] | quantum.analyst@gmail.com |
295ed24d6c6ae158a6f9a0075dd0d27c01e2da87 | 3d19e1a316de4d6d96471c64332fff7acfaf1308 | /Users/N/numeroteca/funcionariodesobedece.py | 9aa224c1bf3912d17bb3ef3038c735799bf49190 | [] | no_license | BerilBBJ/scraperwiki-scraper-vault | 4e98837ac3b1cc3a3edb01b8954ed00f341c8fcc | 65ea6a943cc348a9caf3782b900b36446f7e137d | refs/heads/master | 2021-12-02T23:55:58.481210 | 2013-09-30T17:02:59 | 2013-09-30T17:02:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,180 | py | import scraperwiki
import simplejson
import sys
# retrieve a page
base_url = 'http://search.twitter.com/search.json?q='
q = 'FuncionarioDesobedece'
options = '&rpp=100&page='
page = 1
while 1:
try:
url = base_url + q + options + str(page)
html = scraperwiki.scrape(url)
print html
s... | [
"pallih@kaninka.net"
] | pallih@kaninka.net |
2a3800a770bc6824ab337da5ecd5817fefd10ea2 | 5ac78e3c45f84bc5c756a1f8214a715e02250b6f | /hydra/basic/6_composition/my_app.py | 817f744813784994644bae067d86b2dba6afaf8d | [] | no_license | gtatiya/Python-Programming | 9d59663c009dd8cc9e2ade70a3b6ee7c0875ce82 | abd145bbed303c83f81bbc2fb1258356a4f4fc11 | refs/heads/master | 2023-07-18T06:29:19.929468 | 2023-06-25T00:21:44 | 2023-06-25T00:21:44 | 73,011,024 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,321 | py | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
from omegaconf import DictConfig, OmegaConf
import hydra
@hydra.main(version_base=None, config_path="conf", config_name="config")
def my_app(cfg: DictConfig) -> None:
print(OmegaConf.to_yaml(cfg))
if __name__ == "__main__":
my_app()
''... | [
"gtatiya@live.com"
] | gtatiya@live.com |
661a0892b39865f5d78353328a62e6118d0fbfc2 | 7e955e1610449f38a72bbc96bab01f670a542d89 | /src/chapter_4/square_matrix_multiply_recursive.py | 4a68109115c1665f6f687c1baa94c3721d12aaa2 | [] | no_license | phpcmsapp/Introduction-to-Algorithms-Code | 62607ff0446397f7a5896c4d8d3a8743be0d2db4 | 7dd18685546fc7e01425c10d92ae0f2704da4881 | refs/heads/master | 2021-04-09T15:03:43.971481 | 2018-03-16T00:55:28 | 2018-03-16T00:55:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,922 | py | def square_matrix_multiply_recursive(a, b):
n = len(a)
c = [[0] * n for i in range(n)]
if n == 1:
c[0][0] = a[0][0] * b[0][0]
else:
half = n // 2
a11 = [[0] * half for i in range(half)]
a12 = [[0] * half for i in range(half)]
a21 = [[0] * half for i in range(hal... | [
"mao_xiaodan@hotmail.com"
] | mao_xiaodan@hotmail.com |
c30d070b529b6437a2e6ced585cb55ae57f816e6 | 24804993cdc9361714085853f840ccde710fd274 | /models/admin.py | 6f4a4b4464e67125712f854ccd0d31e5c7e09bfb | [] | no_license | KivutiBrian/Bio-Foods | fb986ad1dce4292b18814c1aefe99462f14cedf6 | 613807b19a035853455a47bf9cbd120af0d45de9 | refs/heads/master | 2023-05-25T06:49:41.617476 | 2021-09-03T13:02:30 | 2021-09-03T13:02:30 | 242,188,211 | 0 | 0 | null | 2023-05-01T22:49:26 | 2020-02-21T16:55:20 | CSS | UTF-8 | Python | false | false | 1,111 | py | from app import db,bcrypt
class Admin(db.Model):
__tablename__ = 'admin'
id = db.Column(db.Integer, primary_key=True)
firstname = db.Column(db.String(30), nullable=False)
lastname = db.Column(db.String(30), nullable=False)
email = db.Column(db.String(30), nullable=False, unique=True)
password =... | [
"briankivuti1@gmail.com"
] | briankivuti1@gmail.com |
47cab0ce81ea76b1d1f756b910eb135858db6613 | 1afc66eb8b8eef83f798766365336b746bff4238 | /Python/Section 6/users.py | 44f6a573011cceca05f7e180051ee55fb5f6e17d | [] | no_license | singh-amits/Python_Mini_Projects | 69547dc3a6cb7f8932eb60e0a12f2fb6db741bc5 | c945563868c16e4dbb420a5be253f6a2d556a141 | refs/heads/main | 2023-08-16T02:01:48.846358 | 2021-10-17T09:23:23 | 2021-10-17T09:23:23 | 418,075,521 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 633 | py | class user():
def sign_in(self):
print('logged in')
class wizard(user):
def __init__(self, name, power):
self.name = name
self.power = power
def attack(self):
print(f'attacking with the power of {self.power}')
class archer(user):
def __init__(self, name, num_arrows):... | [
"mailmeamit27@gmail.com"
] | mailmeamit27@gmail.com |
9cb6e8fb9a2d9f761d7c926667a75caec12d7253 | a0a5c7099956674d42c5ce1e1bc0a25168b07866 | /accounts/migrations/0001_initial.py | a4a60b62e1fec7d451e5ed0d6ee082369e6ec1e7 | [
"MIT"
] | permissive | vollov/aron | ade5365fb4449d5281c2998a34e467112c1966c8 | 193ba0b84efeacb19fe3da064eb41f8a09b1be2c | refs/heads/master | 2021-01-12T02:50:31.088330 | 2017-01-19T22:32:01 | 2017-01-19T22:32:01 | 77,718,909 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,677 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-12-31 13:40
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0008_alter_user_username_max_length')... | [
"dike.zhang@gmail.com"
] | dike.zhang@gmail.com |
9d7e610edceb235661829e677ab655c923dd9add | a10377a6d0c7576b9e47209f49dea398181f73fe | /ants/http/request/__init__.py | 97e1b17764fe91f584e369711adf1b3d1cf50337 | [
"BSD-3-Clause"
] | permissive | zymITsky/ants | 14077dab214aff543bbc75a059240dd55f656916 | 52918d18c94a9a69c3b2495286e3384ba57ad6f8 | refs/heads/master | 2020-06-01T11:04:53.520288 | 2015-02-03T08:09:59 | 2015-02-03T08:09:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,430 | py | """
This module implements the Request class which is used to represent HTTP
requests in Scrapy.
See documentation in docs/topics/request-response.rst
"""
from w3lib.url import safe_url_string
from ants.http.headers import Headers
from ants.utils.trackref import object_ref
from ants.utils.url import escape_ajax
from... | [
"cong.wang@tqmall.com"
] | cong.wang@tqmall.com |
441e7e141607fcb4a4bb8ca2165b8abf7d0a8712 | 22ab88f92f8626d47137c2ad3c1cac615216f69c | /初赛第4复赛12名解决方案/bert/data_split.py | 19c0ca90f3ad6eeae1ad04be196802ef8b2637a3 | [] | no_license | billiecn/fake_new_detect | 069737d3c1366644178bc2b5cc53a1fa932f7bf7 | 15995d6956007f8ed3194d6fb2f134c1b1d77b50 | refs/heads/master | 2022-04-16T18:43:38.587389 | 2019-10-29T03:39:43 | 2019-10-29T03:39:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,166 | py | import sys
import pandas as pd
import numpy as np
import csv
import pprint
def main(K=10):
f = open("./task1/train.csv")
reader = csv.reader(f)
data_lines = [row for row in reader]
now = 1
interval = int(len(data_lines) / K)
df_splited = []
for idx in range(0,K):
if idx == K-1:
... | [
"2429825530@qq.com"
] | 2429825530@qq.com |
82a682367b6307590ebbdda2a6746678279b1903 | a2b00b021859e3075b7ff8cfb698c797710ada82 | /phylogeny/phylogeny_align_genetrees.py | 555d03f678428829b63a23cd439b1d5f9849d9e9 | [] | no_license | singhal/Spheno_Gene_Flow | fb9fd936a3970b74592ed0be22e28cdc1fc7cdb2 | b0056a3464d4a6cdfffba10037bfa679c3e5dbdd | refs/heads/master | 2020-03-20T22:41:50.035111 | 2018-06-18T22:01:43 | 2018-06-18T22:01:43 | 137,811,166 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 8,177 | py | import argparse
import glob
import os
import multiprocessing as mp
import pandas as pd
import re
import subprocess
import random
"""
Sonal Singhal
created on 23 June 2016
Written assuming:
* mafft 7.294
* RAxML 8.2.4
This script borrows heavily from:
https://github.com/faircloth-lab/phyluce/blob/master/bin/align/phy... | [
"sonal.singhal1@gmail.com"
] | sonal.singhal1@gmail.com |
69bc6333179b168d9a0eaa898e31ddbd7857a728 | b810af0c5422d779e0440f63f925eac6e7a26f24 | /baekjoon_study/Mathmatics2/baekjoon_9020.py | d512202a9d2c5027f5619e58bd6637d0edab6ba1 | [] | no_license | jangjungkeon/Algorithm | 338b60d36d53611271252ba13b70d9c0438ce924 | d4b3cceef5e2d1232956e6a61d7e3fb2dece3885 | refs/heads/master | 2023-03-14T23:37:41.564674 | 2021-03-29T08:26:17 | 2021-03-29T08:26:17 | 238,368,898 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,124 | py | import sys
def make_prim_list(n):
# prim_list_bool, prim_list 초기화
prim_list_bool = [True] * (n)
prim_list_bool[0] = prim_list_bool[1] = False
prim_list = []
# 소수가 아닌 수는 거르기.
for i in range(2, int(n ** 0.5) + 1):
if prim_list_bool[i]: # 소수라면
for j in range(2 * i, n, i):
... | [
"jkit13@naver.com"
] | jkit13@naver.com |
6d39db7bcd638a9db7d25e38433363d6ee00fbaf | 53eee7eb899cb518983008532257037fb89def13 | /548.split-array-with-equal-sum.py | 1b988edf5b8c5d8072d2566ecd67ffcc61d8ec2f | [] | no_license | chenxu0602/LeetCode | 0deb3041a66cb15e12ed4585bbe0fefce5dc6b26 | 3dc5af2bc870fcc8f2142130fcd2b7cab8733151 | refs/heads/master | 2023-07-05T19:26:21.608123 | 2023-07-02T08:35:35 | 2023-07-02T08:35:35 | 233,351,978 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,764 | py | #
# @lc app=leetcode id=548 lang=python3
#
# [548] Split Array with Equal Sum
#
# https://leetcode.com/problems/split-array-with-equal-sum/description/
#
# algorithms
# Medium (43.58%)
# Likes: 141
# Dislikes: 51
# Total Accepted: 9K
# Total Submissions: 20.5K
# Testcase Example: '[1,2,1,2,1,2,1]'
#
#
# Given a... | [
"chenxu@Chens-iMac.local"
] | chenxu@Chens-iMac.local |
490c95c1d0772947c9a6fb0387616b9816ab888b | 4b41a76c5c366ba2daa30843acea16609b8f5da7 | /2017/13/AoC17_13_2.py | e32bed533b793315e20992d00b6394a6e2e2b030 | [] | no_license | grandfoosier/AdventOfCode | c4706cfefef61e80060cca89b0433636e42bf974 | a43fdd72fe4279196252f24a4894500a4e272a5d | refs/heads/master | 2020-06-11T12:36:48.699811 | 2019-01-14T23:44:44 | 2019-01-14T23:44:44 | 75,665,958 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,385 | py | fname = "AoC17_13_1.txt"
Walls = [line.rstrip("\n") for line in open(fname)]
# Walls = ["0: 3","1: 2","4: 4","6: 4"]
print "\nFirewall Opened\n"
Rs = {}; Ss = {}; Ps = {}
for w in Walls:
d = int(w[: w.find(":")])
r = int(w[w.find(" ")+1:]) - 1
Rs[d] = r; Ss[d] = 0; Ps[d] = 1
print "Firewall Loaded\n"
def ... | [
"noreply@github.com"
] | grandfoosier.noreply@github.com |
601551c06ac220769a70a53b03360722b23e6234 | d873b0e3549ab09c476c7f3a5fb85b139c4c4306 | /graphs/Breadth_First.py | e2fd65bd8eba5d632118ccdaebfd363000c15df4 | [] | no_license | teddymcw/pythonds_algos | 6e97480b880734eaa64871f07533e29e0adecf47 | 63eb92f3d2ee4bc2ae0bbb6342673f566c5f4ecd | refs/heads/master | 2016-09-03T03:26:29.206114 | 2014-09-22T22:21:14 | 2014-09-22T22:21:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,179 | py | from graph_ADT import Graph
#from graph_ADT import Vertex
#from pythonds.basic import Queue
def buildGraph(wordFile):
d = {}
g = Graph()
wfile = open(wordFile,'r')
# create buckets of words that differ by one letter
for line in wfile:
word = line[:-1]
for i in range(len(word)):
... | [
"teddymcw@gmail.com"
] | teddymcw@gmail.com |
8e7017742c96c28d0f326dd917d4d1e7305561fe | 9e567b8241ce00e9d53843f5aba11c4a119b079f | /tags/v0_64/htdocs/examples/customize_rc.py | 868e427ce9c9052ff957d82d948ee2ee64f78170 | [
"Python-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | neilpanchal/matplotlib | 3d2a7133e858c4eefbb6c2939eb3f7a328b18118 | 7565d1f2943e0e7b4a3f11ce692dfb9b548d0b83 | refs/heads/master | 2020-06-11T09:20:43.941323 | 2011-01-21T21:50:16 | 2011-01-21T21:50:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,352 | py | #!/usr/bin/env python
"""
I'm not trying to make a good liking figure here, but just to show
some examples of customizing rc params on the fly
If you like to work interactively, and need to create different sets
of defaults for figures (eg one set of defaults for publication, one
set for interactive exploration), you ... | [
"(no author)@f61c4167-ca0d-0410-bb4a-bb21726e55ed"
] | (no author)@f61c4167-ca0d-0410-bb4a-bb21726e55ed |
a47548a38d434b1526d932d3c4ff52ef83121d2c | 10d5d44a613327f74a9da44e7f9e059370392591 | /jeslee_web/ideal/tests.py | 83164e352d6848eb6c3ab3dface04dcd7ec363be | [] | no_license | ceasaro/jeslee | 21ba473cb072ad35d7eb821cf2b61b2785148815 | cd99b8ca1d6e67ed43baff962b8f5235a5151ae2 | refs/heads/master | 2021-01-17T07:09:48.746402 | 2017-06-28T09:31:40 | 2017-06-28T09:31:40 | 9,577,114 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,623 | py | """
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
import hashlib
from django.conf import settings
from django.test import SimpleTestCase
from lfs.order.models import Order
from mock impo... | [
"ceesvw@gmail.com"
] | ceesvw@gmail.com |
d367939fdab85e60b6346a7cdad55c01cf55bb12 | 43268854505070471e0911bc0e5b280cadec8601 | /modeller9v8/modlib/modeller/terms.py | 8fe8471087666b0c22ce9d6cdee833e6d301a11b | [] | no_license | realbigws/From_CA_to_FullAtom | 08621bf350c77e29140051d1af850a51e5fe138f | a59d9fcbc6c1f2bfc5fc2d77da26318c63ac3052 | refs/heads/master | 2020-05-30T01:37:47.378404 | 2019-05-30T21:42:45 | 2019-05-30T21:42:45 | 189,481,583 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,556 | py | """Classes for handling user-defined energy terms"""
from modeller.util.modlist import LinkList
import _modeller
class energy_term(object):
"""Base class for user-defined energy terms. Override the L{eval} method
and the L{_physical_type} member in your own subclasses."""
_physical_type = None
_cu... | [
"wangsheng@ttic.edu"
] | wangsheng@ttic.edu |
4cf0299e2b69979382971a5003ae9bfc55fc4d1f | fed0616e61f4db10608538ade99a9b4651831874 | /table2OneToMany/views.py | 575acafbedacb9c4137dbef7a4bf57df2c3734ab | [] | no_license | michelcameroon/hilltopTutorial | 458f745aecb95dd85f098cfd449623503003fda3 | 46d0c450a47d54b6b4416ce6040fa7e55324f4fa | refs/heads/master | 2020-03-25T06:36:59.602682 | 2018-08-04T09:07:21 | 2018-08-04T09:07:21 | 143,513,862 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 237 | py | from django.shortcuts import render
# Create your views here.
# views.py
from django.views.generic import ListView
from .models import Student
class StudentList(ListView):
model = Student
template_name = 'student_list.html'
| [
"lug.limbe@gmail.com"
] | lug.limbe@gmail.com |
d4cb6ec4e555687926526feb4f66edaa3ff590af | cdd1901812799e5542ac6c2ecd5af06eb30aeacd | /Datasets/labelme/change_name.py | 67582155273164611422794b9e51abfd13c269c5 | [] | no_license | thinkinchaos/Tools | ff0030494996493aa75b355880961a5d6b511ba6 | f0571d101c7003ded516b036ce2d6552d38b443f | refs/heads/master | 2023-06-10T01:30:29.285972 | 2021-07-01T02:09:51 | 2021-07-01T02:09:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,147 | py | root = 'D:/DATA/zhatu_coco/labelme' # 根目录,py文件所在的路径
import os
from pathlib import Path
import json
image_names = [i.name for i in Path('D:/DATA/zhatu_coco/images').glob('*.jpg')]
for json_path in Path(root).rglob('*.json'): # 遍历文件夹及子文件下下所有符合条件的文件
with open(str(json_path), "r") as file: # str是把windows路径转为strin... | [
"1044068981@qq.com"
] | 1044068981@qq.com |
d3cd12e6655209465e9e6b4b64976c2d9b2c4919 | ba2eea85cef560c54d5cb4af0e4f2c7c3ee3eb2f | /nesfr3_workspace/catkin_ws/build/hdl_people_tracking/cmake/hdl_people_tracking-genmsg-context.py | 1f4e44a9c8578e109d3a04a78ae0c973207030d7 | [] | no_license | HiSeun/nesfr3_selfwork | 0c782597ffd66d736d53ae05594d23fa7f1d9a85 | 855d43117a235462335c6693b334e7a6235d1d31 | refs/heads/master | 2023-02-08T07:33:15.637998 | 2021-01-05T08:48:45 | 2021-01-05T08:48:45 | 326,935,430 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 833 | py | # generated from genmsg/cmake/pkg-genmsg.context.in
messages_str = "/mnt/catkin_ws/src/hdl_people_tracking/msg/Cluster.msg;/mnt/catkin_ws/src/hdl_people_tracking/msg/ClusterArray.msg;/mnt/catkin_ws/src/hdl_people_tracking/msg/Track.msg;/mnt/catkin_ws/src/hdl_people_tracking/msg/TrackArray.msg"
services_str = ""
pkg_na... | [
"ksw05088@naver.com"
] | ksw05088@naver.com |
fc075a1d572d1067682cbeb25b411d555cca2ac6 | ac5e52a3fc52dde58d208746cddabef2e378119e | /exps-sblp/sblp_ut=3.5_rd=0.8_rw=0.06_rn=4_u=0.075-0.325_p=harmonic-2/sched=RUN_trial=49/sched.py | ba2ba55e0527da2d37e823ce80dddf6619cfb452 | [] | no_license | ricardobtxr/experiment-scripts | 1e2abfcd94fb0ef5a56c5d7dffddfe814752eef1 | 7bcebff7ac2f2822423f211f1162cd017a18babb | refs/heads/master | 2023-04-09T02:37:41.466794 | 2021-04-25T03:27:16 | 2021-04-25T03:27:16 | 358,926,457 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 504 | py | -S 1 -X RUN -Q 0 -L 4 127 400
-S 0 -X RUN -Q 0 -L 4 122 400
-S 0 -X RUN -Q 0 -L 4 108 400
-S 0 -X RUN -Q 0 -L 4 68 250
-S 2 -X RUN -Q 1 -L 2 65 300
-S 2 -X RUN -Q 1 -L 2 64 400
-S 2 -X RUN -Q 1 -L 2 53 300
-S 2 -X RUN -Q 1 -L 2 48 175
-S 3 -X RUN -Q 2 -L 2 48 200
-S 3 -X RUN -Q 2 -... | [
"ricardo.btxr@gmail.com"
] | ricardo.btxr@gmail.com |
3d3524e449bd9eb0428617233f19791a6b50ccef | 29c43fe1f4f5c46b7ffff429154cb8ea5938ca5e | /setup.py | e8bbf705bc156ebb25601e1327f18680da60b009 | [
"CC0-1.0"
] | permissive | biomodels/BIOMD0000000387 | 3422ca5ca0f776cca199ae0d52de1b5ce2672ba7 | 130c8844222d20a672b6f17e6c40a9ac82b239ff | refs/heads/master | 2021-01-23T00:07:18.974242 | 2014-10-16T05:14:41 | 2014-10-16T05:14:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 377 | py | from setuptools import setup, find_packages
setup(name='BIOMD0000000387',
version=20140916,
description='BIOMD0000000387 from BioModels',
url='http://www.ebi.ac.uk/biomodels-main/BIOMD0000000387',
maintainer='Stanley Gu',
maintainer_url='stanleygu@gmail.com',
packages=find_packages(... | [
"stanleygu@gmail.com"
] | stanleygu@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.