blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 616 | 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 777
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 149
values | src_encoding stringclasses 26
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 3 10.2M | extension stringclasses 188
values | content stringlengths 3 10.2M | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
88500cae1959d3a50aa79f110b56e75c6c48538a | 2ca65045c273dbd9d283dc68ebec9a2775d613ad | /code/versions/v5_exceptions/birthday.py | 929faa4e51e9d07af40700f099f4ecea2eeb151c | [
"MIT"
] | permissive | mbrochh/python-101 | 9456c8b4ec658e8a323c2c755ff2036186891f06 | 55b3a4a8e4ae44d8832ec74a04809d1caaf74f7c | refs/heads/master | 2021-01-10T07:32:36.219276 | 2016-01-18T01:03:51 | 2016-01-18T01:03:51 | 47,603,591 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 342 | py | import sys
BIRTHDAY = "1982-09-08"
age = None
try:
age = int(sys.argv[1])
except ValueError:
print("ERROR: Please enter an integer")
if age is not None:
if age < 0:
print("ERROR: Negative ages are not allowed")
else:
message = "I am born {} and I am {} years old".format(BIRTHDAY, age)
... | [
"mbrochh@gmail.com"
] | mbrochh@gmail.com |
9a0abce4a5daf52619e614c878da6a9a10f548a7 | 6ba38fe94e7ea5146c633f56f59c0c3278d695a7 | /tools/python/run_tests.py | 3e8f20a7d3d93459c70260f5a9221e9fb44713b4 | [
"MIT"
] | permissive | mworks/mworks | b49b721c2c5c0471180516892649fe3bd753a326 | abf78fc91a44b99a97cf0eafb29e68ca3b7a08c7 | refs/heads/master | 2023-09-05T20:04:58.434227 | 2023-08-30T01:08:09 | 2023-08-30T01:08:09 | 2,356,013 | 14 | 11 | null | 2012-10-03T17:48:45 | 2011-09-09T14:55:57 | C++ | UTF-8 | Python | false | false | 640 | py | import sys
import unittest
def main():
print('Running tests for Python %d.%d' % sys.version_info[:2],
file = sys.stderr)
if len(sys.argv) == 1:
tests = unittest.defaultTestLoader.discover('.')
else:
tests = unittest.defaultTestLoader.loadTestsFromNames(sys.argv[1:])
suite =... | [
"cstawarz@mit.edu"
] | cstawarz@mit.edu |
4289ac55a56d229e3e372945af918d5e75f668f6 | c6e23f02b28604d43ad37cb339738560e8fefdee | /python3/example_of_guess.py | a25c142b152c48f1126f58cda4fa1f0206bdc684 | [] | no_license | testdata6/python-test | 5fcf3449c3ed84be3f0d526048bb2a26baf4fa7f | 3539ddfc70416943b28691c2cac9f7f03aad5991 | refs/heads/master | 2020-04-09T07:07:26.503612 | 2019-10-02T10:57:17 | 2019-10-02T10:57:17 | 160,141,238 | 0 | 3 | null | 2019-10-02T10:57:19 | 2018-12-03T06:10:20 | Python | UTF-8 | Python | false | false | 930 | py | #!/usr/bin/python
## example for game program
secret_word = "batman"
guess = ""
guess_limit = 3
guess_count = 0
out_of_guess = False
print("You have only 3 Guess..\n")
print("Who is bruce wayne..??")
while guess != secret_word:
if guess_count < guess_limit:
guess = input("Enter a guess: ")
guess... | [
"amit.ganvir6@gmail.com"
] | amit.ganvir6@gmail.com |
cea9529d27ca31b7925da2e07de43c6f02d9876c | e2a189a9e273d6a0a3bc0f12c526f95ac0eb89ba | /azure-mgmt-datafactory/azure/mgmt/datafactory/models/azure_batch_linked_service.py | b47aa4665eeedcd89e0174093567444847d503e4 | [
"MIT"
] | permissive | tdjin/azure-sdk-for-python | f787c6532b8ed538e3680a16ab4525171e082523 | 3ef94140fa1de9bd9ca3ae31faec1151416b7a3a | refs/heads/master | 2021-05-15T22:47:40.555332 | 2017-10-11T17:47:31 | 2017-10-11T17:47:31 | 106,751,704 | 1 | 0 | null | 2017-10-12T22:27:30 | 2017-10-12T22:27:30 | null | UTF-8 | Python | false | false | 3,500 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | [
"laurent.mazuel@gmail.com"
] | laurent.mazuel@gmail.com |
15706c4d97675754be5847064a13bc612a6ffda1 | 0e52e94bf043f2b226105d3ba2c0720d15d58747 | /resources/migrations/0003_auto_20161129_1950.py | 1e07c3ebc9ccb62ec78022cec219d48b3b67e4eb | [
"BSD-3-Clause"
] | permissive | PARINetwork/pari | 80bc361a05322e30e4f2315c12440d4d4d0c7b59 | 08e4c42475ab62b37f3c3ab3ae6369acc2685ecc | refs/heads/master | 2022-11-13T19:47:58.424896 | 2021-08-15T05:19:30 | 2021-08-15T05:19:30 | 39,291,289 | 37 | 16 | BSD-3-Clause | 2022-11-10T10:29:27 | 2015-07-18T08:01:30 | Python | UTF-8 | Python | false | false | 657 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('resources', '0002_auto_20150731_0952'),
]
operations = [
migrations.AlterField(
model_name='resource',
... | [
"thejaswi.puthraya@gmail.com"
] | thejaswi.puthraya@gmail.com |
d096da2c9bdbac4a41886d03e09e69102a7f38dc | 518bf342bc4138982af3e2724e75f1d9ca3ba56c | /solutions/2048. Next Greater Numerically Balanced Number/2048.py | 2e0fd2aca9e3da7d1dfeff3444dcb293a37ca2d5 | [
"MIT"
] | permissive | walkccc/LeetCode | dae85af7cc689882a84ee5011f0a13a19ad97f18 | a27be41c174565d365cbfe785f0633f634a01b2a | refs/heads/main | 2023-08-28T01:32:43.384999 | 2023-08-20T19:00:45 | 2023-08-20T19:00:45 | 172,231,974 | 692 | 302 | MIT | 2023-08-13T14:48:42 | 2019-02-23T15:46:23 | C++ | UTF-8 | Python | false | false | 363 | py | class Solution:
def nextBeautifulNumber(self, n: int) -> int:
def isBalance(num: int) -> bool:
count = [0] * 10
while num:
if num % 10 == 0:
return False
count[num % 10] += 1
num //= 10
return all(c == i for i, c in enumerate(count) if c)
n += 1
while n... | [
"me@pengyuc.com"
] | me@pengyuc.com |
6a055bcfe8b6d07bfa5d45b81fd2c1f431f5e6e1 | 5917a63a6d16de893f54e86a70f5d881648112c1 | /Py1_spc-master/Lec9/main4.py | ffaff412e4806eaa3f496a9e576fe3d33a4ad98b | [] | no_license | litded/lessons | f14e8e68577d417fc87eaca1c426f535baa04e8b | af2e0f6cae61878a833a7eebd7c2509d930ede48 | refs/heads/master | 2023-08-22T00:49:50.362770 | 2021-10-16T20:33:01 | 2021-10-16T20:33:01 | 417,940,562 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,056 | py | """
Сравнение строковых литералов.
В Python строки хранятся в unicode.
"""
print("A" < "a") # 65 > 97
print("a" > "ABCDEFGH")
# Как сравниваются односимвольные строки?
print("A ordinal:", ord("A"))
print("Z ordinal:", ord("Z"))
print("91, 92, 93", chr(91), chr(92), chr(93))
print("a ordinal:", ord("a"))
print("b ordi... | [
"i.ivlev@westwing.ru"
] | i.ivlev@westwing.ru |
83790f074e58012e2da2c4ea1593852b7e398f2b | 00820b522cc16bf996f1ef44a94a2f31989c4065 | /abc/abc109/b.py | cb797384d27bb98d1011b6a93a2541b603c08567 | [] | no_license | yamato1992/at_coder | 6dffd425163a37a04e37507743a15f67b29239fc | 6e0ec47267ed3cae62aebdd3d149f6191fdcae27 | refs/heads/master | 2020-08-31T11:17:03.500616 | 2020-06-12T15:45:58 | 2020-06-12T15:45:58 | 218,678,043 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 224 | py | n = int(input())
ans = 'Yes'
words = [input() for _ in range(n)]
said = set()
tail = words[0][0]
for w in words:
if w in said or w[0] != tail:
ans = 'No'
break
said.add(w)
tail = w[-1]
print(ans) | [
"yamato.mitsui.orleans@gmail.com"
] | yamato.mitsui.orleans@gmail.com |
70d305debcce036600e190b80ecbf2a20ad2225d | b8630509b97621ddc3bbeaef8d1cd54ff77b3dde | /myvenv/lib/python3.5/site-packages/django/core/wsgi.py | c7be733c51ea1fa37d8b3f3be318bb7a6bbe7098 | [] | no_license | ChibaUnppluged/BandMaker-ogi | c4080204d63495fed42e26306663e06df8ffb373 | 68a4a6eceb3f385b97afe8741fc538216800f893 | refs/heads/master | 2021-01-01T04:29:28.436614 | 2017-10-20T16:30:00 | 2017-10-20T16:30:00 | 97,184,844 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 424 | py | # coding:utf-8
import django
from django.core.handlers.wsgi import WSGIHandler
def get_wsgi_application():
"""
The public interface to Django's WSGI support. Should return a WSGI
callable.
Allows us to avoid making django.core.handlers.WSGIHandler public API, in
case the internal WSGI implementat... | [
"pochi.0226.ogi@gmail.com"
] | pochi.0226.ogi@gmail.com |
7a389c3316ba0f517633942018387b465c8afc38 | cf457dacc75ade598d52a4cfd58c2120192da84c | /Python1808/第一阶段/day20-时间模块/01-作业.py | 2d3bc80fb1b9f61817370beedfb75298331700f0 | [] | no_license | LYblogs/python | b62608d73eb0a5a19306cabd4fd5706806fd557b | 1ee0bcecc3a78c6d2b191600872a1177e9c8df60 | refs/heads/master | 2020-04-12T10:12:01.478382 | 2018-12-19T10:59:47 | 2018-12-19T10:59:47 | 162,422,214 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 578 | py | # import re
# re_str =r"\d+\.?\d+"
# str1 =input("请输入字符串:")
# result =re.findall(re_str,str1)
# sum =0
# for countent in result:
# sum+=float(countent)
# # print(sum)
# print(ord("年"))
# print(chr(24180))
# print(hex(24180))
# # 5e74
# print(str.split("sadas/adas/23123/d","/"))
list1 = [
{'name': '张三', 'age': ... | [
"2271032145@qq.com"
] | 2271032145@qq.com |
e0637f771e9118316c07f1797a742be17a59b45f | 032f82a947c49145dba58b7add515fa8db372bd2 | /detectFace/smile.py | 25375b2c34fd90bb0723428e61759d7bd5b7b6f5 | [] | no_license | iamkamleshrangi/faceRecognition | dc50e865a596b79ed578bf32181494ee09d4d892 | c4a04c40bdb5584dbb11b328922e89b0d8670d6b | refs/heads/master | 2022-01-27T23:46:51.293573 | 2019-01-13T13:57:02 | 2019-01-13T13:57:02 | 165,401,241 | 4 | 0 | null | 2022-01-21T04:27:31 | 2019-01-12T15:09:54 | Python | UTF-8 | Python | false | false | 592 | py | import cv2
video = cv2.VideoCapture(0)
smile_detect = cv2.CascadeClassifier('../models/haarcascade_smile.xml')
#smile_detect = cv2.CascadeClassifier('../models/haarcascade_frontalface_alt2.xml')
while(True):
status, frame = video.read()
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
smiles = smile_detect... | [
"iamkamleshrangi@gmail.com"
] | iamkamleshrangi@gmail.com |
0312b90a0c29eea200321ece0170f9637f57ee3a | 2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02 | /PyTorch/contrib/cv/semantic_segmentation/Wseg/models/backbones/resnets.py | 3c673805dcaa5f348144d605a52144a1d42fa587 | [
"GPL-1.0-or-later",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Ascend/ModelZoo-PyTorch | 4c89414b9e2582cef9926d4670108a090c839d2d | 92acc188d3a0f634de58463b6676e70df83ef808 | refs/heads/master | 2023-07-19T12:40:00.512853 | 2023-07-17T02:48:18 | 2023-07-17T02:48:18 | 483,502,469 | 23 | 6 | Apache-2.0 | 2022-10-15T09:29:12 | 2022-04-20T04:11:18 | Python | UTF-8 | Python | false | false | 8,341 | py | # Copyright 2021 Huawei Technologies Co., Ltd
#
# 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 agree... | [
"wangjiangben@huawei.com"
] | wangjiangben@huawei.com |
96565b1eeecf90f8c57e59d969eb57ecacff790a | e0ed932fc2e4edb953cc4e423362dabc19083008 | /python/sanic_learn/docs/learn_mysql_直接连接.py | 7b353121f0890f57dd8d544e9078f25ccfbd9fa3 | [] | no_license | glfAdd/note | 90baee45003ac3998d898dcfbc618caa28f33b74 | 19a9aff61450be25904bff0fe672f660d49d90ff | refs/heads/main | 2023-05-27T13:28:36.092352 | 2023-05-24T03:35:58 | 2023-05-24T03:35:58 | 240,066,208 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,131 | py | """
异步数据库连接
文档
https://aiomysql.readthedocs.io/en/latest/
"""
import asyncio
import aiomysql
loop = asyncio.get_event_loop()
async def test_select():
"""
需要执行 fetchall fetchmany fetchone
耗时的io操作可以使用await来修饰
"""
# 创建连接
conn = await aiomysql.connect(host='172.17.0.1', port=3306, user='root',... | [
"2239660080@qq.com"
] | 2239660080@qq.com |
92d828fc8bf85ee5c1bd9ee1a1aebbac596976b8 | 7130f6c992982edfe680ae88acaf85773e4b66c7 | /gp/line/__init__.py | 103a6930407ffada8d20b06fd2febf1c0d6faa19 | [
"MIT"
] | permissive | westamine/gp | bd7b4d70d1e0142340d38352a39c5d185977e0cb | 4d511cd91b88c95cea69eff522f9a8ff0fa4cba8 | refs/heads/master | 2020-06-09T11:31:39.927909 | 2015-07-05T20:06:35 | 2015-07-05T20:06:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 310 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__all__ = ["load_data", "plot_data", "plot_results", "least_squares",
"interactive", "sample"]
from .data import load_data
from .plotting import plot_data, plot_results
from .lls import least_squares
from . import interactive
from .mcmc import sample
| [
"danfm@nyu.edu"
] | danfm@nyu.edu |
e1b8ccdec4cd5e758122582a2fd9a59057aeaefb | a2e638cd0c124254e67963bda62c21351881ee75 | /Python modules/replace_task_module.py | e98a24b07f9b0b175a36c623d4827f84d1c33905 | [] | no_license | webclinic017/fa-absa-py3 | 1ffa98f2bd72d541166fdaac421d3c84147a4e01 | 5e7cc7de3495145501ca53deb9efee2233ab7e1c | refs/heads/main | 2023-04-19T10:41:21.273030 | 2021-05-10T08:50:05 | 2021-05-10T08:50:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,901 | py | """
Script for replacing underlying module of tasks.
Requestor: Ridwaan Arbee
Developer: Jakub Tomaga
Date: July 2016
"""
import acm
from at_ael_variables import AelVariableHandler
def python_modules_hook(selected_variable):
"""Display module names of selected tasks."""
python_modules = []
if selected_... | [
"nencho.georogiev@absa.africa"
] | nencho.georogiev@absa.africa |
6dcb7b5ec15990f5b896c06d7f1c994a0d421c27 | 7bf287e00b35f50afa70e8585f41d1db543d98f2 | /Easy/VerifyingAnAlienDictionary.py | b20c9588ff212572ed1b54704881128b53211a6a | [] | no_license | mangalagb/Leetcode | eac611453de07ffc635265e98c39b46255cf76c6 | fcf6c3d5d60d13706950247d8a2327adc5faf17e | refs/heads/master | 2022-05-14T23:16:28.007044 | 2022-04-29T19:33:24 | 2022-04-29T19:33:24 | 158,616,622 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,473 | py | #In an alien language, surprisingly they also use english
# lowercase letters, but possibly in a different order. The order
# of the alphabet is some permutation of lowercase letters.
#
# Given a sequence of words written in the alien language, and the
# order of the alphabet, return true if and only if the given words... | [
"mangalagb@gmail.com"
] | mangalagb@gmail.com |
5d47a2dd0985bf48d44fe69c67217d7c4ad03085 | 85de10a9467b3cd88ce83227bee0d71706e2c2b0 | /c10/objectnvalues.py | a9277da65ee6b9748501ba9ba693f78b6cc24d88 | [] | no_license | sreejithev/thinkpythonsolutions | f0bbfc0951e57e9b81f50aabf968860484081524 | 59481fd3d2976e73691a3fff97e083c336070cea | refs/heads/master | 2019-07-22T14:08:54.890004 | 2017-09-15T05:06:26 | 2017-09-15T05:06:26 | 94,759,672 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 81 | py | a = 'banana'
b = 'banana'
print a is b
c = [1, 2, 3]
d = [1, 2, 3]
print c is d
| [
"sreejithevwyd@gmail.com"
] | sreejithevwyd@gmail.com |
1249da0151fc017d5576e0e6c75ea252623baeef | 0367282068af22fbd3c8497d80f3dc62a81b4ff5 | /notebooks/production/Y2017M10D04_RH_Threshold_WaterStress_V02.py | 6a809e3cd26bdaaae5ba2ad8e7ebeeb132535d3c | [] | no_license | c11/Aqueduct30Docker | 4adf2d56dc22740a309b1415065f5cf2f5a50cb6 | 5768347f8db5a9fca305b8cf601de6e5c88ddb65 | refs/heads/master | 2021-07-12T08:29:39.586590 | 2017-10-18T16:27:34 | 2017-10-18T16:27:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,588 | py |
# coding: utf-8
# # Thresholds WaterStress
#
# * Purpose of script: add arid and low water use, set thresholds and labels.
# * Author: Rutger Hofste
# * Kernel used: python35
# * Date created: 20171004
# In[1]:
import time, datetime, sys
dateString = time.strftime("Y%YM%mD%d")
timeString = time.strftime("UTC %H:... | [
"rutgerhofste@gmail.com"
] | rutgerhofste@gmail.com |
343af610943a92fd1d8e176748125ebddbf7da98 | 5f07c38899e350b0b776510fd7d7831d44cf1404 | /dfr2modelserializer/testapp/models.py | c119e003df1c7745a2482c797ba2eb38dac736df | [] | no_license | shubham454/Django-Rest | b733f1d47ada9df452e912dcd8acad48a7ec4c75 | 3d94f57cab3537c51caa68807d5fcdf8883d2d2c | refs/heads/master | 2022-12-14T20:37:11.835794 | 2020-08-13T18:43:26 | 2020-08-13T18:43:26 | 287,354,715 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 239 | py | from django.db import models
# Create your models here.
class Employee(models.Model):
eno = models.IntegerField()
ename = models.CharField(max_length=20)
esal = models.FloatField()
eaddr = models.CharField(max_length=50)
| [
"moreshubham203@gmail.com"
] | moreshubham203@gmail.com |
1579def2fa6f80ba6dfd435b6fff891f01993574 | 427ab1f7f7fe08f76fab6468f6ea24dc5bc2701d | /bugscan/exp-1997.py | f3a26aa41665cfe5f0f22efc9fcccb13fab27569 | [] | no_license | gayhub-blackerie/poc | b852b2bcdba78185efd68817c31579247c6e4b83 | 8b7c95d765deb450c029a921031eb1c90418f2a7 | refs/heads/master | 2021-07-24T03:05:52.697820 | 2017-11-04T10:33:51 | 2017-11-04T10:33:51 | 107,093,079 | 1 | 0 | null | 2017-10-16T07:31:31 | 2017-10-16T07:31:31 | null | UTF-8 | Python | false | false | 637 | py | #!/usr/bin/env python
#-*- coding:utf-8 -*-
#info:http://www.wooyun.org/bugs/wooyun-2015-0130135
import urlparse
def assign(service, arg):
if service == "hf_firewall":
arr = urlparse.urlparse(arg)
return True, '%s://%s/' % (arr.scheme, arr.netloc)
def audit(arg):
url = arg + 'setdomai... | [
"hackerlq@gmail.com"
] | hackerlq@gmail.com |
f67c1f598cae58a498fbf8fd0e2bc3c70b8bbca1 | 27a580304382e3a79c7307f42a83b689566dbf30 | /math/0x03-probability/7-main.py | 3c6a9d45e98d9aed3edc8c518ebf4cbbf5a0053a | [] | no_license | salmenz/holbertonschool-machine_learning | a37712a125cd2e9e4bd6975c3bb2338f3533474f | a49eb348ff994f35b0efbbd5ac3ac8ae8ccb57d2 | refs/heads/master | 2023-07-11T06:00:36.162782 | 2021-08-11T17:45:35 | 2021-08-11T17:45:35 | 279,366,817 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 327 | py | #!/usr/bin/env python3
import numpy as np
Normal = __import__('normal').Normal
np.random.seed(0)
data = np.random.normal(70, 10, 100).tolist()
n1 = Normal(data)
print('Z(90):', n1.z_score(90))
print('X(2):', n1.x_value(2))
n2 = Normal(mean=70, stddev=10)
print()
print('Z(90):', n2.z_score(90))
print('X(2):', n2.x_va... | [
"salmen.zooro@gmail.com"
] | salmen.zooro@gmail.com |
5a33009588fb2f2b491c14ae459dc4e0c3ebcd8b | f5a71706f855f179003f3af4575c2c9c1fba4d21 | /tests/dhcpv6/kea_only/config_backend/test_cb_v6_cmds_api_server_tag.py | 43204345382400a11bc78c67fc1bc86525b6f9ae | [
"ISC"
] | permissive | shawnmullaney/forge | b1bfa5c393f8c25c989ea250cd40bad281831626 | aaaef0a0645f73d24666aab6a400f3604e753aac | refs/heads/master | 2021-02-09T01:08:39.549478 | 2020-03-01T20:42:15 | 2020-03-01T20:42:15 | 244,220,385 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 40,627 | py | """Kea database config backend commands hook testing"""
import pytest
import srv_msg
from cb_model import setup_server_for_config_backend_cmds
pytestmark = [pytest.mark.py_test,
pytest.mark.v6,
pytest.mark.kea_only,
pytest.mark.controlchannel,
pytest.mark.hook,
... | [
"you@example.com"
] | you@example.com |
2299452f8564564455e6584601a2d41fd33587f8 | e8efa40c295bc86fe7fd621ae91e41ed52737e9d | /2022/examples-in-class-2022-11-18/function_example2.py | 140c56c5c905f1bd32d2b9559254ff2d562a9209 | [
"Apache-2.0"
] | permissive | ati-ozgur/course-python | 25eeb65a370e0ba7c9543c108fcfbe64c5e5af85 | 583e4df3387493d67f5ca5aeb617cfaf14a5e5a1 | refs/heads/master | 2023-01-12T05:33:03.831949 | 2022-12-28T11:33:19 | 2022-12-28T11:33:19 | 210,133,153 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 91 | py | def sayHello(name,country):
print(f"hello {name} and you are coming from {country}")
| [
"ati.ozgur@gmail.com"
] | ati.ozgur@gmail.com |
d697120315978be526aa241494b23f4a0e7f9925 | 18d6f64e55893c5057a83552e666ecacdd60c1a4 | /day23/solve.py | 8bc2a2f4017592322a674f9bea21c99cda6aa5c6 | [] | no_license | turtlegraphics/advent-of-code-2020 | bcf0c81c3f19da193483bd85436f6fecf9587b98 | ea75f5d57f130992369d64f173af15c4310582bc | refs/heads/main | 2023-02-07T09:44:08.265054 | 2020-12-25T06:14:07 | 2020-12-25T06:14:07 | 323,831,105 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,808 | py | #
# Advent of Code 2020
# Bryan Clair
#
# Day 23
#
import sys
import re
sys.path.append("..")
import aocutils
args = aocutils.parse_args()
# sooo overcomplicated.
# just use an array next[1],....,next[100]
# then given n, it's easy to find n-1.
# too bad I didn't come up with that during the show
class Cup:
def... | [
"bryan@slu.edu"
] | bryan@slu.edu |
ba065267e35f7f153525d6072d10645f44d8b6f3 | 3e321a7c381bf77d7563869b494a6d3a84816e75 | /Back-end/Abogados/caso/models.py | 76d097c8baa451cb5b7915735988822dc273f70e | [] | no_license | MrDavidAlv/Abogados | 865541efe223582f1eff42ae65d7295a5cc3407f | e1f2c4d7957e5686a6035f468f72d1b3fe6d2182 | refs/heads/master | 2023-03-18T22:14:07.010015 | 2021-03-08T15:06:38 | 2021-03-08T15:06:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 644 | py | from django.db import models
from tipocaso.models import Tipocaso
from persona.models import Persona
# Create your models here.
class Caso(models.Model):
Persona = models.ForeignKey(Persona, on_delete=models.CASCADE)
Tipocaso = models.ForeignKey(Tipocaso, on_delete=models.CASCADE)
Estado = models.CharFie... | [
"efnaranjo6@misena.edu.co"
] | efnaranjo6@misena.edu.co |
591f84ccce0d19a59c52ce49135400de0e2ac6bd | afedbd0af6dff5a4fca8bab92e2a5574d9e541ca | /venv/bin/jupyter | 5db9475d0efcb7304783dc968390a430e88f8653 | [] | no_license | wagolemusa/web_scrapping | d847b71ded82f471f28daed6083667eef450b21d | 794d24d1492d8ebeb9ffab16d1b185c6cab33c74 | refs/heads/master | 2022-12-31T22:31:02.407179 | 2020-10-21T09:27:39 | 2020-10-21T09:27:39 | 305,924,696 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 252 | #!/home/refuge/code/scraping/venv/bin/python3.5
# -*- coding: utf-8 -*-
import re
import sys
from jupyter_core.command import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"homiemusa@gmail.com"
] | homiemusa@gmail.com | |
f7864feff188f323877901f2c4fe77ce808fcd8b | 63f9a0d150cbef75f4e6e8246dc7ecac3f3b6d09 | /python/ray/tests/test_cli.py | 1f940674a4e9253aee2b40b3d095316cd09a7548 | [
"Apache-2.0",
"MIT"
] | permissive | ray-project/maze-raylit | 79f0a5af9fe4bdc13a2d5b3919da867ed5439aab | a03cd14a50d87d58effea1d749391af530d7609c | refs/heads/master | 2023-01-23T04:23:35.178501 | 2020-12-04T22:34:14 | 2020-12-04T22:34:14 | 318,274,659 | 5 | 0 | Apache-2.0 | 2020-12-04T22:34:15 | 2020-12-03T17:47:58 | Python | UTF-8 | Python | false | false | 13,300 | py | """
Some instructions on writing CLI tests:
1. Look at test_ray_start for a simple output test example.
2. To get a valid regex, start with copy-pasting your output from a captured
version (no formatting). Then escape ALL regex characters (parenthesis,
brackets, dots, etc.). THEN add ".+" to all the places where ... | [
"noreply@github.com"
] | ray-project.noreply@github.com |
6e4a2f4cc5f76f8d81311294eeae4a74eceab4b2 | 5a281cb78335e06c631181720546f6876005d4e5 | /manila-8.0.0/manila/share/drivers/infinidat/infinibox.py | 3c561209e8b0cdf382b9628e1832dd35e85799db | [
"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 | 20,747 | py | # Copyright 2017 Infinidat Ltd.
# 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 b... | [
"Wayne Gong@minbgong-winvm.cisco.com"
] | Wayne Gong@minbgong-winvm.cisco.com |
5b63b8ba18d4485a3cef8318da3faad02ac6ae28 | 89fe1d65133ed74535dc5fd2cd4918de320e7801 | /labelling_dataset/remove_api/tensorflow.compat.v1.disable_resource_variables - remove_api/1.py | c7fe0c30e77740c14074d3bfb374c4e713ea58fa | [] | no_license | soarsmu/MLCatchUp | 62a615ac62e2233a722e298bd1bf7c8a622ef0c6 | c874ea38aca653875671b349f09985d4c38fdd5d | refs/heads/master | 2023-01-13T11:50:14.944239 | 2020-11-23T08:15:21 | 2020-11-23T08:15:21 | 271,773,805 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,091 | py | # Copyright 2016 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 applicable ... | [
"stefanusagusharyono@gmail.com"
] | stefanusagusharyono@gmail.com |
81de24dc8ed63d6ea901da330ade528a11523e6d | 6e7e037c63a71fad935882b9204e923788e8d7cd | /Basic-Python/code/test_tuple.py | 17ea1e159611f6309af97e9bf421dfc9a376832c | [
"MIT"
] | permissive | AI-System/ai-learning-material-old | 93d219c11778b6a59bac5972c6a4341bf465910a | 1719f5b6ecb9b9caf485b9d806c1211b142b8ed5 | refs/heads/master | 2021-10-23T20:57:50.532039 | 2019-03-17T23:40:47 | 2019-03-17T23:40:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,195 | py | '''
元组与列表类似、不同之处在于元组的元素不能修改, 元组写在()内,元组之间用逗号隔开
元组中的元素类型也可以不同
元组与字符串类似,可以被索引,下标从0开始,-1表示从末尾开始的位置
元组也可以截取操作
可以把字符串看做一种特殊的元组
举例:
a=(10,20,30)
type(a) # <class 'tuple'>
a[0] # 10
a[1] # 20
a[1]=100 # 报错,不可修改
a[1:2] # (20,)
a[1:] # (20, 30)
a*2 # (10,20,30,10,20,30)
b=(80,90)
print(a+b) # (10,20,30,80,90)
'''
### 两种创... | [
"johnnynode@gmail.com"
] | johnnynode@gmail.com |
cbfead7e0befa23e4ce06733c7a0fc2174ce0d78 | a4ebfeefa95e97d60f9ad2fe36e75e59e3b50769 | /build/lib/Behaviour_Analysis/Plot_Behaviour_Matrix.py | d072b17292016ee2086e8d5d7320c31dc78e8625 | [] | no_license | matt-j-harvey/Widefield_Analysis | 9f1566ac26d4164d988ab9a43d953f228b15746d | e03037e909ce986d8221113e1bbf5d46ddd7ad70 | refs/heads/master | 2023-05-01T12:30:27.064246 | 2023-04-24T11:23:37 | 2023-04-24T11:23:37 | 252,776,416 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,854 | py | import numpy as np
import matplotlib.pyplot as plt
from matplotlib import gridspec, patches
def get_patch_colour(trial_type):
if trial_type == 1:
patch_colour = 'b'
elif trial_type == 2:
patch_colour = 'r'
elif trial_type == 3:
patch_colour = 'g'
elif trial_type == 4:
... | [
"matthew.jc.harvey@gmail.com"
] | matthew.jc.harvey@gmail.com |
5867e03172869c7f15826c33d3d528575e8620c3 | 920ba5f0459755ee2354c1f50ec5d99fef38facb | /lstm/vis.py | 04a51b1ba53e5fbf7ac0b1c773c45cd1b7089e95 | [] | no_license | mobeets/nullSpaceFits | 50d7352b9381b46b3e0a2bd32490e577d91f3b74 | b4f980cdc26bbcaea7b4b0d48a169e2cbc14089c | refs/heads/master | 2021-01-12T04:41:17.526909 | 2018-07-17T15:37:58 | 2018-07-17T15:37:58 | 77,710,491 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,998 | py | import os.path
import numpy as np
import matplotlib.pyplot as plt
def plot_tunings(gs, yte, yhats, ytr, outdir='', prefix=''):
fig = plt.figure(facecolor='white')
one_dim = len(yte.shape) == 1
if one_dim:
yte = yte[:,None]
ytr = ytr[:,None]
yhats = [yhat[:,None] for yhat in yhats]
... | [
"mobeets@gmail.com"
] | mobeets@gmail.com |
e4dd3377781c4a0c6f5f3b46b4a2912423d0af33 | 07c46f65354b3826556d3ab1ac2c556ed97da4ed | /re/exercises/regex_solution.py | 3ba87ed05e414d3513839625008da9fa540f455d | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | yunzhang599/Python3_Package_Examples | 34e2cb194540a829fe2c5f71290306226c3622b9 | 3e479925f3f6818bf35e46123f720839acf075eb | refs/heads/master | 2020-09-11T11:31:43.688890 | 2019-10-10T21:24:16 | 2019-10-10T21:24:16 | 222,050,071 | 1 | 0 | MIT | 2019-11-16T05:05:53 | 2019-11-16T05:05:52 | null | UTF-8 | Python | false | false | 1,714 | py |
import re
from compare import compare
def substitution_examples():
"""Some examples of using regular expression substitution."""
# example text
text = "7 apples, 24 bananas, 14 carrots, and oranges are fruit"
# replace one word by another
result = re.sub('carrots','pears',text)
com... | [
"krother@academis.eu"
] | krother@academis.eu |
8053621a0411fa97b47c6011c5c12756c407718b | 22cec5da2b1fb83dcc9cf7c888f1e2078b05b62e | /flora/types/generator_types.py | d6159acf244c1f549b2b569fdc734349bd99f42b | [
"Apache-2.0"
] | permissive | JuEnPeHa/flora-blockchain | 649d351e096e73222ab79759c71e191e42da5d34 | 656b5346752d43edb89d7f58aaf35b1cacc9a366 | refs/heads/main | 2023-07-18T08:52:51.353754 | 2021-09-07T08:13:35 | 2021-09-07T08:13:35 | 399,297,784 | 0 | 0 | Apache-2.0 | 2021-08-24T01:30:45 | 2021-08-24T01:30:44 | null | UTF-8 | Python | false | false | 1,189 | py | from dataclasses import dataclass
from typing import List
from flora.types.blockchain_format.program import SerializedProgram
from flora.util.ints import uint32
from flora.util.streamable import Streamable, streamable
class GeneratorBlockCacheInterface:
def get_generator_for_block_height(self, height: uint32) -> ... | [
"github@floracoin.farm"
] | github@floracoin.farm |
e2f1f00cf0dad07929ca55db1af43756621c1941 | 75c7004744315a22afdad8a68f20c06b8d3efad0 | /网络设备脚本/盛科命令行/日志.py | 6c656e2af100ada66f5ebce9be426580a2427f52 | [
"MIT"
] | permissive | cflw/network_device_script | b13cde8719f23402cdd6acd3ca9048a7d65952aa | c3644e933a3c557c44951a0a1994a49357e49c02 | refs/heads/master | 2023-08-03T11:00:29.188101 | 2023-07-29T13:58:09 | 2023-07-29T13:58:09 | 182,526,402 | 18 | 12 | null | null | null | null | UTF-8 | Python | false | false | 999 | py | import cflw代码库py.cflw网络地址 as 地址
from ..基础接口 import 操作
from ..命令行接口 import 命令
from ..命令行接口 import 模式
from ..命令行接口 import 日志 as 南向日志
#ev6
class C日志ev6(模式.C同级模式, 南向日志.I日志配置):
"""适用于: 盛科e580(v6.x), 浪潮cn61108pcvh(v6.x), 浪潮s5350(v6.x)"""
def __init__(self, a):
南向日志.I日志配置.__init__(self, a)
def fs服务器开关(self, a操作 = 操作.E操作.... | [
"cflw@outlook.com"
] | cflw@outlook.com |
5d32fee72334a792726003b83bf20f2513e0e006 | 4289fcc440e0cf3d2ecaca03bd2cb1a40933f8fc | /dtformats/tracev3.py | d220b2de0448c6c977fa59b4e1ac65728081954f | [
"Apache-2.0"
] | permissive | ydkhatri/dtformats | 4251563ad8a42dbfb8f293890ed844e29b2c856a | 692d53616f7c89e5ff4d6950778c46d3b94a0130 | refs/heads/master | 2020-04-20T23:41:11.816017 | 2019-02-03T12:40:55 | 2019-02-03T14:32:54 | 169,174,860 | 2 | 0 | Apache-2.0 | 2019-02-05T01:16:42 | 2019-02-05T01:16:41 | null | UTF-8 | Python | false | false | 7,901 | py | # -*- coding: utf-8 -*-
"""Apple Unified Logging and Activity Tracing (tracev3) files."""
from __future__ import unicode_literals
import lz4.block
from dtformats import data_format
from dtformats import errors
class TraceV3File(data_format.BinaryDataFile):
"""Apple Unified Logging and Activity Tracing (tracev3) ... | [
"joachim.metz@gmail.com"
] | joachim.metz@gmail.com |
a2ce438ff7170ae6cd3a03cad8f529b66f0c7d7e | 21c602c8b40c3cdf572fb63a745c15616adf5f31 | /enso/enso/contrib/scriptotron/cmdretriever.py | db19f4e29d16bf1cd1654c022dc1d97a10a20bf8 | [
"BSD-2-Clause"
] | permissive | GChristensen/enso-portable | a3353e5020dfd83ae612c728a0961dfd6615a0c8 | 61351f52f01367439e8810d2c482a9c9897545d8 | refs/heads/master | 2023-03-15T22:22:12.738941 | 2023-03-09T15:07:59 | 2023-03-09T15:07:59 | 3,496,184 | 144 | 39 | null | 2022-04-30T13:02:03 | 2012-02-20T17:58:22 | C | UTF-8 | Python | false | false | 4,022 | py | import logging
import inspect
import types
import re
COMMAND_EXPRESSION = re.compile( r"(?P<cmd>.+) {(?P<arg>.+)}" )
SCRIPT_PREFIX = "cmd_"
def _makeVarNameHumanReadable( funcName ):
return funcName.replace( "_", " " )
def _getCommandInfoFromFunc( func, funcName, cmdName,
argName = N... | [
"gchristnsn@gmail.com"
] | gchristnsn@gmail.com |
4b8b1a48b348b43ac25dc9a03ea165b76e3778d9 | 01e95505c457d81f077efab8d2b2e90619ec5ef0 | /day94/findKthLargest.py | 96130579a909ce73172ae8caf93e25c57703aadd | [] | no_license | chenjunyuan1996/Java-Practice | f07e4cb1756b423b89c0440a5d65efcc6cb5caa5 | 2e6a505a4635a408e575ce6a1af382e2ccf0fe22 | refs/heads/master | 2021-04-08T12:14:21.518855 | 2020-07-08T02:04:05 | 2020-07-08T02:04:05 | 248,774,679 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 367 | py | import heapq
class Solution:
def findKthLargest(self, nums: List[int], k: int) -> int:
heapq.heapify(nums)
for _ in range(len(nums) - k):
heapq.heappop(nums)
return heapq.heappop(nums)
# class Solution:
# def findKthLargest(self, nums: List[int], k: int) -> int:
# nu... | [
"noreply@github.com"
] | chenjunyuan1996.noreply@github.com |
a7c8b24e70d4d5e13565df07ff3eadf22cb1d778 | 3c119c145a00fbfc3b2d8841a3b9280fa4bc1da8 | /extapps/xadmin/views/dashboard.py | 48f571bb9f4b4ad02b5d90e475f8a5de0270435e | [] | no_license | disenQF/GoodsServer | 5cd54786d8c9b3444ffad38057fc62ebade87d3a | de7207b8fba0e60315ae7458978e210b325f305e | refs/heads/master | 2022-12-11T04:37:12.975547 | 2019-04-01T02:21:15 | 2019-04-01T02:21:15 | 177,748,032 | 3 | 1 | null | 2022-12-08T04:55:20 | 2019-03-26T08:45:59 | JavaScript | UTF-8 | Python | false | false | 23,397 | py | from django import forms
from django.apps import apps
from django.core.exceptions import PermissionDenied
from django.urls.base import reverse, NoReverseMatch
from django.template.context_processors import csrf
from django.db.models.base import ModelBase
from django.forms.forms import DeclarativeFieldsMetaclass
from dj... | [
"610039018@qq.com"
] | 610039018@qq.com |
a492b1b73c204b6562d920932d0a3d81eeb837ec | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/otherforms/_perpetrating.py | e808c2cc964c2bc09f3d33ea9b1ad14118af6f45 | [
"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 | 240 | py |
#calss header
class _PERPETRATING():
def __init__(self,):
self.name = "PERPETRATING"
self.definitions = perpetrate
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.basic = ['perpetrate']
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
9e63101b0f8f16dcf299a047a320ca7a8d32d9eb | 01932366dd322ec3459db9dd85a2fd8d22a82fcb | /tf114/tf04_1_placeholder.py | 88c1f37a64d2fe2da32bb062fd2faf266e50827e | [] | no_license | Jeong-Kyu/A_study | 653f5fd695109639badfa9e99fd5643d2e9ff1ac | 6866c88fcc25841ceae2cd278dcb5ad5654c2a69 | refs/heads/master | 2023-06-11T02:44:20.574147 | 2021-07-05T08:59:43 | 2021-07-05T08:59:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 427 | py | import tensorflow as tf
node1 = tf.constant(2.0)
node2 = tf.constant(3.0)
node3 = tf.add(node1, node2)
sess = tf.Session()
a = tf.placeholder(tf.float32)
b = tf.placeholder(tf.float32)
adder_node = a + b
print(sess.run(adder_node, feed_dict={a:3, b:4.5})) # 7.5
print(sess.run(adder_node, feed_dict={a:[1,3], b:[3,4]... | [
"jare92n@gmail.com"
] | jare92n@gmail.com |
e0ac9e0d05aaa040a8292082b2d6d88b3c8ffa2a | 0b9bc1f99956df03e760720f154e90d27a4ad4d2 | /setup.py | acaf76173093bd2c0655fc5ed3679c78a6037957 | [
"ISC"
] | permissive | PlumpMath/demosys-py | 644b48def3be551b3e7d31241cf65dbd07f3b291 | 6a8689e967ec104fd8a73f92d8531fc0ef4aab4b | refs/heads/master | 2020-12-30T13:20:47.814479 | 2017-05-07T19:21:44 | 2017-05-07T19:21:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,269 | py | from setuptools import setup
setup(
name="demosys-py",
version="0.3.12",
description="Modern OpenGL 3.3+ Framework inspired by Django",
long_description=open('README.rst').read(),
url="https://github.com/Contraz/demosys-py",
author="Einar Forselv",
author_email="eforselv@gmail.com",
mai... | [
"eforselv@gmail.com"
] | eforselv@gmail.com |
f22515151a5551e4782336568b86630524086dc9 | 2dce8389133562c48c183ef9fb89e053b7a3b6d1 | /api/admin.py | d7904d9ba25ac80aec9898a5d0e0555d9204e67f | [] | no_license | Shatki/backend-evo | a742a9daaacc0a283529c47737057ee1f10228c0 | a977b6e346d73db53a21cc1aad094a377041f362 | refs/heads/master | 2020-06-20T09:41:27.838131 | 2019-12-02T06:05:59 | 2019-12-02T06:05:59 | 197,081,088 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 633 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib import admin
from models import Token, Log
@admin.register(Token)
class TokenAdmin(admin.ModelAdmin):
model = Token
list_display = (
'key',
'user',
'created',
'updated',
)
readonly_fiel... | [
"Shatki@mail.ru"
] | Shatki@mail.ru |
fd56c4e38f4d51cfd5a6a9ee1313be7f31dd9ab6 | 2c3e6390fd02d888720f6a01679e63e0603ba128 | /Python/Algorithms/Greedy/Max_Min/solution.py | 3587a43713023d513dd9787974bc2c1ef216e325 | [] | no_license | dileepmenon/HackerRank | ab39a7a6e40308a09bb7c3f644e4c8c1883a493c | 07e4627e5507561f82df055b925a19833d88d258 | refs/heads/master | 2021-01-11T17:51:34.323145 | 2019-01-21T12:02:11 | 2019-01-21T12:02:11 | 79,847,239 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 240 | py | #!bin/python3
n = int(input())
k = int(input())
s = []
for i in range(n):
s.append(int(input().strip()))
s = sorted(s)
mini = 1e10
for n, i in enumerate(s[:-(k-1)]):
m = s[n+k-1] - s[n]
if m < mini:
mini = m
print(mini)
| [
"dileepmenon92@yahoo.com"
] | dileepmenon92@yahoo.com |
1be6e45ac19253453f22c93a9b94476b369c9f27 | 5d19b912d0df44a1614227225ead1d6c14e0a2c4 | /efficientdet/backbone/efficientnet_model.py | dccae2d733b0affbc9dfdba9f92bf2f3143726a0 | [
"Apache-2.0"
] | permissive | templeblock/automl | 07364e4ced03250c428fa8b622ec4d0e38ea035b | 0a73e836fd4a9d22919cb1ff5af9ca30082fa4b2 | refs/heads/master | 2021-04-14T05:43:33.868939 | 2020-07-17T06:21:22 | 2020-07-17T06:21:22 | 249,210,603 | 0 | 0 | Apache-2.0 | 2020-07-17T06:21:23 | 2020-03-22T15:17:38 | null | UTF-8 | Python | false | false | 27,135 | py | # Lint as: python3
# Copyright 2020 Google Research. 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 require... | [
"tanmingxing@google.com"
] | tanmingxing@google.com |
f91fb6654eb7b987d618a8ebcdb893f1a71c4106 | cc6c3705c370c404735158e172cff71d65b325a5 | /[프로그래머스 레벨3] 네트워크.py | d08e267a731bec66265fa4c29339e01582e6abb9 | [] | no_license | Leewongi0731/DailyCodeTest | 4df8dc94ce12c7cc8eb4e0f2ed014080e390b171 | 9f2e83d455f3cc0439cc284662960f190eb574ac | refs/heads/main | 2023-04-10T05:10:54.892529 | 2021-04-17T13:53:26 | 2021-04-17T13:53:26 | 324,298,727 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 630 | py | # DFS/BFS: 네트워크
from collections import deque
def solution(n, computers):
visited = [ False for i in range(n) ]
answer = 0
for i in range(n):
if visited[i] == False:
visited[i] = True
queue = deque()
queue.append( i )
while queue:
... | [
"wglee0731@naver.com"
] | wglee0731@naver.com |
ac4db275b5a358071441b950bec2b352caf0f6a6 | 9cb914a9badf1349ec7a0cc15e09661c76a1d357 | /widedeep/utils/data_utils.py | 2039b75a43169b00a72183cc80124e8f190f0035 | [] | no_license | yutsai84/Wide-and-Deep-PyTorch | 16e9cbe0ab21f5d19750001ae2c8837bfac86882 | 1fb1ee595ce3eabd07e9f8e668a819ee37518e3a | refs/heads/master | 2020-07-20T15:44:16.888844 | 2019-06-24T20:32:55 | 2019-06-24T20:32:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,120 | py | import pandas as pd
from typing import List, Dict, Optional
def label_encode(df_inp:pd.DataFrame, cols:Optional[List[str]]=None,
val_to_idx:Optional[Dict[str,Dict[str,int]]]=None):
"""
Helper function to label-encode some features of a given dataset.
Parameters:
-----------
df_inp: pd.Datafra... | [
"jrzaurin@gmail.com"
] | jrzaurin@gmail.com |
92f5e541272034997a4e8ef6b743f03d25801537 | a61263850fe63de61ec3004519f0d9aa69f104ac | /python_Algorithm/battle10/BestAlbum.py | dcea550a32d847e23fc04e3fd996e133e9e780fa | [] | no_license | Kimhyeonsuk/Programmers_Python | dd0e13ef6690cfab0c46a7c8b07a5f3b40175071 | cc5687c8db2cfa098602829dec3acbf17c5c2177 | refs/heads/master | 2023-07-16T22:30:29.457419 | 2021-09-02T10:40:56 | 2021-09-02T10:40:56 | 355,876,212 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 662 | py | from collections import defaultdict
def solution(genres, plays):
answer = []
musicDict=defaultdict(list)
for i in range(len(genres)):
musicDict[genres[i]].append((i,plays[i]))
#musicDict.items().sort(key=lambda x: len(musicDict[x]))
tmplist=[(1,200),(2,300),(4,100)]
a=sum(pair[1] for pa... | [
"philippe10@naver.com"
] | philippe10@naver.com |
9a0d77d507ed4b67fe149a92b9aa9c58d17a64c6 | fd8d87da179336a7b216ebc729289d3f52bd1c3d | /manage.py | 8da36930c713a12e1042b54d92902530b306deeb | [] | no_license | crowdbotics-apps/testapp-21254 | 9aafee1798cb41d6aaff2990fc0a3c7f91138a4f | 49d3c4e59edec5f5dae7094cd50ea3686164e62d | refs/heads/master | 2022-12-28T03:56:22.041058 | 2020-10-08T10:00:25 | 2020-10-08T10:00:25 | 302,299,122 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 633 | py | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testapp_21254.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
c0596f3c11f7e1284632536bb410660e8d8543c3 | a2c7bc7f0cf5c18ba84e9a605cfc722fbf169901 | /python_1_to_1000/899_Orderly_Queue.py | 9f4611d6f27e6e757997735ec2fb756e1e7842d2 | [] | no_license | jakehoare/leetcode | 3bf9edd499034ce32be462d4c197af9a8ed53b5d | 05e0beff0047f0ad399d0b46d625bb8d3459814e | refs/heads/master | 2022-02-07T04:03:20.659422 | 2022-01-26T22:03:00 | 2022-01-26T22:03:00 | 71,602,471 | 58 | 38 | null | null | null | null | UTF-8 | Python | false | false | 1,001 | py | _author_ = 'jake'
_project_ = 'leetcode'
# https://leetcode.com/problems/orderly-queue/
# A string S of lowercase letters is given. Then, we may make any number of moves.
# In each move, we choose one of the first K letters (starting from the left), remove it,
# and place it at the end of the string.
# Return the lexi... | [
"jake_hoare@hotmail.com"
] | jake_hoare@hotmail.com |
d048db7244be9ce8c331cfae2cabccadf8e545f4 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02901/s182457186.py | 2013723aad6266c552cccdfd8854b7ea9960f70d | [] | 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 | 554 | py | n,m = map(int,input().split())
p = []
for k in range(m):
a,b = map(int,input().split())
c = list(map(int,input().split()))
key = 0
for i in c:
key += 2**(i-1)
p.append([a,key])
inf = 10**9
dp = []
for u in range(m+1):
dp.append([inf for i in range(2**n)])
dp[0][0] = 0
for i in range(m)... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
95054f0a460bb519adc68aa70d71f76850879abf | fb4b70ad38d0fc810cb9ee034c8fb963c079f64b | /Medium/Combinations.py | 78acdba9ae043cceba5a34d09bd7fab2566e594d | [] | no_license | ChrisLiu95/Leetcode | 0e14f0a7b7aa557bb2576589da8e73dbeeae8483 | baa3342ebe2600f365b9348455f6342e19866a44 | refs/heads/master | 2021-07-11T12:01:00.249208 | 2018-09-26T21:27:42 | 2018-09-26T21:27:42 | 117,451,180 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 726 | py | """
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.
Example:
Input: n = 4, k = 2
Output:
[
[2,4],
[3,4],
[2,3],
[1,2],
[1,3],
[1,4],
]
"""
class Solution:
def combine(self, n, k):
"""
:type n: int
:type k: int
:rtype: List[Li... | [
"xiangchong95@gmail.com"
] | xiangchong95@gmail.com |
0f02707acde8e6516ae2e1fd709fd9b4b49367fd | e669b3fe7da2698da4ce02e98325ce154d2aa546 | /swaps/utils/channels_request.py | 69d81622ba3b67aa1d96fbbdf78211bd7aa7c4ce | [
"Apache-2.0"
] | permissive | marcellinamichie291/cash_carry_leveraged_futures_arbitrageur | 0834a911fdd6c9f1462f6f2f59926f715fc51461 | 1120ebfb487ce4987fe70e6645b36e0d7ce041ec | refs/heads/main | 2023-03-16T18:35:28.730554 | 2020-12-04T07:46:13 | 2020-12-04T07:46:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,680 | py | import json
from swaps.utils.time_service import get_current_timestamp
def dict_add_new(old_dict, new_dict):
if old_dict is None:
old_dict = {}
if new_dict and len(new_dict):
for key_val, val in new_dict.items():
if val:
exist_val = old_dict.get(key_val, None)
... | [
"jare@coindexlabs.com"
] | jare@coindexlabs.com |
6b83fe052d7aaa1ba3b3d3aea415fddb3d31a166 | 99c4d4a6592fded0e8e59652484ab226ac0bd38c | /code/batch-2/vse-naloge-brez-testov/DN6-M-029.py | 892973eee43e2e78c1dde5ffa9dfc81677b4c719 | [] | no_license | benquick123/code-profiling | 23e9aa5aecb91753e2f1fecdc3f6d62049a990d5 | 0d496d649247776d121683d10019ec2a7cba574c | refs/heads/master | 2021-10-08T02:53:50.107036 | 2018-12-06T22:56:38 | 2018-12-06T22:56:38 | 126,011,752 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,250 | py | import collections
def unikati(s):
l = []
for a in s:
if not l.__contains__(a):
l.append(a)
return l
def avtor(tvit):
return tvit.split()[0][:-1]
def vsi_avtorji(tviti):
l = []
for t in tviti:
l.append(avtor(t))
return unikati(l)
def izloci_bes... | [
"benjamin.fele@gmail.com"
] | benjamin.fele@gmail.com |
cc17e396ac1ce7b650e1cced566267de834f1e4b | 30ac2f9831ebd33885a6f48d153356c2e3731c26 | /Python_Stack/django/django_orm/project_marcela/app_marcela/migrations/0002_post_created_at.py | c18b5ca1dd488cabbb07e09d92f1cbe4f97d4f0e | [] | no_license | pharaoht/Coding-Dojo-Projects | 192cfd8c36b6dadb049e81d31bd780c7ab340d1e | 504f71acbac3c006cf866a08aea0566058f81ce2 | refs/heads/master | 2023-05-11T21:09:17.316257 | 2021-06-08T00:54:09 | 2021-06-08T00:54:09 | 334,003,413 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 398 | py | # Generated by Django 2.2.4 on 2021-03-03 00:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app_marcela', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='post',
name='created_at',
... | [
"pharaohmanson@gmail.com"
] | pharaohmanson@gmail.com |
65ff604aa0d9faba03d1c3b1a24337fa4aca44b0 | b1a2062940cc03a847d03620ed809108b6d65ab3 | /atlantic/sandy/setrun.py | 1094cc6bbd8955ef9b8ffd58c9d4f30536d06777 | [
"MIT"
] | permissive | navravi/surge-examples | a7149d3c2c6ba338d0acdbe8ae6000e70425b90c | 182ea1deb43e430b70ccd820c2d586a33934579b | refs/heads/master | 2020-04-10T16:04:53.959284 | 2018-06-12T23:52:23 | 2018-06-12T23:52:23 | 124,574,020 | 0 | 0 | MIT | 2018-03-09T17:45:21 | 2018-03-09T17:45:20 | null | UTF-8 | Python | false | false | 16,532 | py | # encoding: utf-8
"""
Module to set up run time parameters for Clawpack.
The values set in the function setrun are then written out to data files
that will be read in by the Fortran code.
"""
from __future__ import absolute_import
from __future__ import print_function
import os
import datetime
import shutil
import ... | [
"kyle.mandli@gmail.com"
] | kyle.mandli@gmail.com |
7e498773aa3cfc9fce1a83a67e038360ba587a78 | 3e79ffa27abf7fc1b6102223673703a9a8b96f4e | /a2_basic_part/b1_linear_model.py | d907d89d1aef92727741cb01a0d5933270110f02 | [] | no_license | Freshield/LEARN_Paddlepaddle | f3feaaa5daf3f879a0df9b6ef5276bbd2cef6117 | 6b9bed182d86b61a3f0166c9c5f4b949566ba9e3 | refs/heads/master | 2021-07-10T11:11:12.938714 | 2020-01-12T07:49:39 | 2020-01-12T07:49:39 | 232,985,746 | 0 | 1 | null | 2021-03-09T07:37:33 | 2020-01-10T06:57:44 | Python | UTF-8 | Python | false | false | 5,721 | py | #coding=utf-8
"""
@Author: Freshield
@Contact: yangyufresh@163.com
@File: b1_linear_model.py
@Time: 2020-01-13 12:08
@Last_update: 2020-01-13 12:08
@Desc: None
@==============================================@
@ _____ _ _ _ _ @
@ | __|___ ___ ___| |_|_|___| |_| | @
@ | __|... | [
"zxdsw199182@gmail.com"
] | zxdsw199182@gmail.com |
a7db0e54580505a757bbb8c04e2cc7b717895434 | 48e124e97cc776feb0ad6d17b9ef1dfa24e2e474 | /sdk/python/pulumi_azure_native/servicebus/v20180101preview/namespace_network_rule_set.py | 325324912364c61ca87ea1ef18b35791e914635a | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | bpkgoud/pulumi-azure-native | 0817502630062efbc35134410c4a784b61a4736d | a3215fe1b87fba69294f248017b1591767c2b96c | refs/heads/master | 2023-08-29T22:39:49.984212 | 2021-11-15T12:43:41 | 2021-11-15T12:43:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,437 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | [
"noreply@github.com"
] | bpkgoud.noreply@github.com |
254b12e95e033f4cb945c7291cde4f78cffeef10 | 6eb56f2e3f14f2373be07fe95b1c6fedf1e2d49f | /month01/house_information_manager_system/dal.py | 1d5c594bf9f25424240cf05c09d4f1a5e250bcb7 | [
"Apache-2.0"
] | permissive | chaofan-zheng/python_leanring_code | fe22b0370cadebf7456477269aff4a35cef0eb41 | 0af44ff39b9ded2c1d2cc96c6d356d21170ac04d | refs/heads/main | 2023-02-28T07:56:46.457552 | 2021-02-10T15:08:33 | 2021-02-10T15:08:33 | 323,584,115 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,397 | py | """
数据访问层
data access layer
"""
import csv
from typing import List
from model import HouseModel
class HouseDao:
"""
房源数据访问对象
"""
__house_data = [] # type:List[HouseModel]
__FILE_NAME = "house.csv"
@classmethod
def load(cls) -> List[HouseModel]:
"""
加载房源信息
... | [
"417355570@qq.com"
] | 417355570@qq.com |
ce502914e04e34be2f8b196398ec920125f70284 | 7e127aaa903ce70014fb8edbcd55698894356506 | /29.Regular Expressions - Lab/04. Match Numbers.py | 4dc935ae145f2a74d519d922ebac36614f5a7777 | [] | no_license | filipov73/python_fundamentals_september_2019 | e2e7e014bbef3ed2b3b662d272461bb44c7ed0e0 | d1bb7d61d1e7b8a141ac00eec40612b18ef6492f | refs/heads/master | 2020-07-28T07:55:17.147110 | 2019-12-15T21:31:44 | 2019-12-15T21:31:44 | 209,356,557 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 185 | py | import re
text = input()
pattern = r"(^|(?<=\s))(?P<target>[-]?[0-9]*[\.]?[0-9]*)($|(?=\s))"
match = re.finditer(pattern, text)
for m in match:
print(m.group("target"), end=" ")
| [
"m_filipov@yahoo.com"
] | m_filipov@yahoo.com |
b5b680bdbf8339b3da68e991485874792fa6100b | 026ee20aea11b6e47869cc23581f35f883b37ba7 | /test_15938/wsgi.py | 56db1ef0936015a2dbb1b20963d136bc34e23e75 | [] | no_license | crowdbotics-apps/test-15938 | b1f05efaabd568afd0454b0c2ece867ec9171088 | 3254939bd2377fdf36ff2c300169469f160b58af | refs/heads/master | 2023-05-19T00:15:37.353953 | 2020-04-16T21:20:21 | 2020-04-16T21:20:21 | 256,332,161 | 0 | 0 | null | 2021-06-12T18:05:32 | 2020-04-16T21:19:13 | Python | UTF-8 | Python | false | false | 397 | py | """
WSGI config for test_15938 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_SE... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
28d80c9e3b215ece449186a6eefa2b2069127dbb | afbae26b958b5ef20548402a65002dcc8e55b66a | /release/stubs.min/Autodesk/Revit/UI/__init___parts/DoubleClickTarget.py | ac848f360fb91de8651f30625b8e0945afa4b428 | [
"MIT"
] | permissive | gtalarico/ironpython-stubs | d875cb8932c7644f807dc6fde9dd513d159e4f5c | c7f6a6cb197e3949e40a4880a0b2a44e72d0a940 | refs/heads/master | 2023-07-12T01:43:47.295560 | 2022-05-23T18:12:06 | 2022-05-23T18:12:06 | 95,340,553 | 235 | 88 | NOASSERTION | 2023-07-05T06:36:28 | 2017-06-25T05:30:46 | Python | UTF-8 | Python | false | false | 1,313 | py | class DoubleClickTarget(Enum,IComparable,IFormattable,IConvertible):
"""
Elements that support double-click in Revit. Note that this is meant to cover cases
where the element itself is a double-click target. Individual controls that are targets
are handled separately.
enum DoubleClickTarget... | [
"gtalarico@gmail.com"
] | gtalarico@gmail.com |
371af32e554de5ee981afd75def3765ddc68ffc0 | 039f2c747a9524daa1e45501ada5fb19bd5dd28f | /CODE FESTIVAL 2017 Final/b.py | e5d245849581bb86064321a537570151f234fc2a | [
"Unlicense"
] | permissive | yuto-moriizumi/AtCoder | 86dbb4f98fea627c68b5391bf0cc25bcce556b88 | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | refs/heads/master | 2023-03-25T08:10:31.738457 | 2021-03-23T08:48:01 | 2021-03-23T08:48:01 | 242,283,632 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 266 | py | from collections import Counter
s = input()
l = len(s)
for i in Counter(s).most_common():
largest = i[1]
if largest == 1:
print('YES')
exit(0)
if l >= largest * 2:
l -= 1
continue
print('NO')
exit(0)
print('YES')
| [
"kurvan1112@gmail.com"
] | kurvan1112@gmail.com |
22882df1ce9fffb6608a469e33a4b786a5eacd58 | 83de24182a7af33c43ee340b57755e73275149ae | /aliyun-python-sdk-das/aliyunsdkdas/request/v20200116/GetEndpointSwitchTaskRequest.py | c48a7b273c03dd0298d744e9b9df61034ed7b317 | [
"Apache-2.0"
] | permissive | aliyun/aliyun-openapi-python-sdk | 4436ca6c57190ceadbc80f0b1c35b1ab13c00c7f | 83fd547946fd6772cf26f338d9653f4316c81d3c | refs/heads/master | 2023-08-04T12:32:57.028821 | 2023-08-04T06:00:29 | 2023-08-04T06:00:29 | 39,558,861 | 1,080 | 721 | NOASSERTION | 2023-09-14T08:51:06 | 2015-07-23T09:39:45 | Python | UTF-8 | Python | false | false | 2,680 | py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
3d123b68f227b5944f66c6aea19b482904c6ec96 | e8187ac32552978361a5de92bb1b632b394dd4c4 | /tests/Forex_demo.py | 51e79ff54010bc7ff158e3e2509f0e906b6102ab | [
"MIT"
] | permissive | sibuzu/OnePy | 7385f5fbc48ebe65543bb998f0af84e468f3b442 | 464fca1c68a10f90ad128da3bfb03f05d2fc24bc | refs/heads/master | 2020-03-08T13:23:31.960132 | 2018-04-06T04:35:56 | 2018-04-06T04:35:56 | 128,156,689 | 0 | 0 | MIT | 2018-04-05T03:57:13 | 2018-04-05T03:57:13 | null | UTF-8 | Python | false | false | 2,766 | py | import OnePy as op
class MyStrategy(op.StrategyBase):
def __init__(self, marketevent):
super(MyStrategy, self).__init__(marketevent)
def prenext(self):
"""以下条件均可用于next中进行策略逻辑判断"""
# print(self.bar.open[1])
# print(self.bar.high[1:])
# print(self.bar.low[:2])
# ... | [
"chenjiayicjy@126.com"
] | chenjiayicjy@126.com |
f0605007a768f64dd1eb60c47578f75c9bfd2283 | 34a478381cdf89e636315d5f4d620eeabe712b00 | /venv/lib/python3.6/site-packages/future/moves/urllib/parse.py | 01d521019c390a55d327da666cd034bb6e5a6359 | [] | no_license | 21fernando/Pygames | 67e03e9d62c64b55ea24d6b0f4a2a7b333247011 | 10bf1519012a8ed3e08dda0d23c9187c44e58c13 | refs/heads/master | 2021-01-05T07:00:17.165831 | 2020-06-01T13:42:05 | 2020-06-01T13:42:05 | 240,922,333 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,046 | py | from __future__ import absolute_import
from future.standard_library import suspend_hooks
from future.utils import PY3
if PY3:
from urllib.parse import *
else:
__future_module__ = True
from urlparse import (ParseResult, SplitResult, parse_qs, parse_qsl,
urldefrag, urljoin, urlpar... | [
"tharindu.fernando@terathought.com"
] | tharindu.fernando@terathought.com |
31782c6a2a9a3d34d6111b5af5e52befac232b8e | 01e02a7ae79464cfcdde313aca1d940eaad04ffe | /04-添加路由-mini_web框架/03-实现伪静态/web_server.py | de0da609d51d57827ba75df0bf304e1c0bc4cb07 | [] | no_license | ybsdegit/mini_web | db09b2d0a435e0b5c454a0b5d0be18b0f1fea0de | 0b650f7e1bb18808ad3ce47328084aada229bc9b | refs/heads/master | 2020-05-24T22:35:43.925824 | 2019-05-23T16:32:28 | 2019-05-23T16:32:28 | 187,500,291 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,474 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/5/18 22:32
# @Author : Paulson
# @File : 01-面向对象-多进程实现http服务器_WSGI.py
# @Software: PyCharm
# @define : function
import re
import socket
import multiprocessing # 多进程
# import time
import sys
# from dynamic import mini_frame
class WSGIServer(object)... | [
"ybsdeyx@163.com"
] | ybsdeyx@163.com |
d812d75a3877e2be0de1924025db6c8c2b54ece9 | b5bcdeee7d1e12a1268ba4deb4a33bec7bda0b13 | /js/json_template/jsontemplate.py | 844eaae04f83317dd56a600ceb5e8e008f21985a | [] | no_license | fanstatic/js.json_template | 9347439710972668b772ba86c5e5112722577802 | a53234fce10b69060e0605b24656307e266b83f4 | refs/heads/master | 2020-08-06T02:30:33.214783 | 2011-05-24T09:10:46 | 2011-05-24T09:10:46 | 212,800,827 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 46,762 | py | # Copyright (C) 2009 Andy Chu
#
# 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... | [
"kagesenshi.87@gmail.com"
] | kagesenshi.87@gmail.com |
d7033d1d800220694b05e7b0d3db1fa3fa2968cb | 1f139ddb46bbe681e3bf87308c7be0fb2f5938cd | /pytorch_toolbelt/utils/catalyst_utils.py | b28e807646c2f82a626558bc18fc7733f6769e3a | [
"MIT"
] | permissive | thohidu/pytorch-toolbelt | fc8f9dff8c12022e1ba59cc06e4f88bd96c591f6 | 7194a76dd9e153a9558c6a3321e25018dc58cdd8 | refs/heads/master | 2020-07-29T01:30:52.903212 | 2019-09-12T19:32:54 | 2019-09-12T19:32:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 149 | py | import warnings
from pytorch_toolbelt.utils.catalyst import *
warnings.warn('Please use \'from pytorch_toolbelt.utils.catalyst import *\' instead')
| [
"ekhvedchenya@gmail.com"
] | ekhvedchenya@gmail.com |
b7c84eb3a05bbe91b8d6ef63e41fab8d61e8c402 | 937520b77c177934c1e610d7c46c77df1def22be | /PythonWork/exercise/test_dict2.py | 66b5e1e4251bfe8e95915568896defc845192d5a | [] | no_license | silviu20/fzwork | eac62129fcabc5a5ea5da93c3c44918062191b35 | 793d736b739dbb982368c1705d6e476967227550 | refs/heads/master | 2023-03-23T00:49:33.130855 | 2021-02-15T03:24:20 | 2021-02-15T03:24:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,833 | py | #!/usr/bin/python
import sys
import os
def is_list_of_dict_all(input_field):
is_dict_all = all(isinstance(i, dict) for i in input_field)
return is_dict_all
def is_list_of_dict_any(input_field):
is_dict_any = any(isinstance(i, dict) for i in input_field)
return is_dict_any
def main():
... | [
"minganghz@gmail.com"
] | minganghz@gmail.com |
e545b2bc69384425609733177bf85ce2098d4fa6 | f139a99d51cfa01a7892f0ac5bbb022c0cee0664 | /Pythonlogy/build/lib/ShareYourSystem/Standards/Itemizers/Manager/09_ExampleDoc.py | 3c2c9551636ee8c3bb917b1d37c40d7b67956b3f | [
"MIT"
] | permissive | Ledoux/ShareYourSystem | 90bb2e6be3088b458348afa37ace68c93c4b6a7a | 3a2ffabf46f1f68b2c4fd80fa6edb07ae85fa3b2 | refs/heads/master | 2021-01-25T12:14:34.118295 | 2017-01-12T14:44:31 | 2017-01-12T14:44:31 | 29,198,670 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 276 | py |
#ImportModules
import ShareYourSystem as SYS
#define
class ChildClass(SYS.TeamerClass):pass
#define
MyManager=SYS.ManagerClass(
).manage(
'Child',
{
'MyInt':0
},
_ClassesDict={
'Child':ChildClass
}
)
#print
print("MyManager is ")
SYS._print(MyManager)
| [
"erwan.ledoux@ens.fr"
] | erwan.ledoux@ens.fr |
e9e87149ec81a41c0906c5cdf4a7d628d77ee3db | 490f5e517942f529ddc8c1e0d421a208ff1ca29b | /02_code/nestexc.py | 31a1f0da4c028ba8ea0f53e750123f1cfd824166 | [] | no_license | emnglang/py-lab | facdc464a8c84b90f06b5cb639315981c0b4ba8d | bc3566da81e0b2cfa9ce563ffc198d35294971a1 | refs/heads/master | 2020-03-25T15:10:42.856062 | 2018-08-24T14:54:33 | 2018-08-24T14:54:33 | 143,869,343 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 273 | py | def action2():
print(1 + []) # Generate TypeError
def action1():
try:
action2()
except TypeError: # Most recent matching try
print('inner try')
try:
action1()
except TypeError: # Here, only if action1 re-raises
print('outer try')
| [
"linja1688@gmail.com"
] | linja1688@gmail.com |
ca7bb565d3cf110640969fe3484c85f194783e1c | 5103746668e1bd31681ce6727207a452ffa1afee | /drivingtest/models.py | e04a4d41199d0e7455ba7879f0bd80121caacb90 | [] | no_license | tu95ctv/omc | 8891ee571850f972aa422f41666b88e34a2e0418 | 1002d208cf27eebec5d22ed74db5b4fb81c96e8f | refs/heads/master | 2021-01-10T02:24:06.632434 | 2016-02-06T10:16:55 | 2016-02-06T10:16:55 | 51,164,855 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 21,026 | py | # -*- coding: utf-8 -*-
print 'in model 2'
from django.db import models
from django.template.defaultfilters import default
from django.contrib.auth.models import User
from django import forms
#from drivingtest.forms import D4_DATETIME_FORMAT
D4_DATETIME_FORMAT = '%H:%M %d/%m/%Y'
postdict ={}
class PollManager(models.M... | [
"nguyenductu@gmail.com"
] | nguyenductu@gmail.com |
3dd919a27297d2fc12bee84dca098fb9f6961ae0 | 05c8a4cec561a4a45274035dcc2ffddc2753488e | /AWS Lambda로 시작하는 서버리스/lambda_s3.py | 7dbe2c1f12d43c11662d57bae7cd912fc077911e | [] | no_license | Ani-Gil/Amazon-Web-Services | 2853d89c639969ce7f4b3bb91f37b012b5c48cb9 | 229c9ec9a458b57c8a9fbc4cd1b569473a79d850 | refs/heads/master | 2023-03-31T08:24:02.962778 | 2021-04-01T09:14:54 | 2021-04-01T09:14:54 | 325,930,062 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 240 | py | import json
import boto3
import botocore
def lambda_handler(event, context):
s3 = boto3.resource('s3')
bucket_list = []
for bucket in s3.buckets.all():
bucket_list.append(bucket.name)
return json.dumps(bucket_list) | [
"dlatldn426@gmail.com"
] | dlatldn426@gmail.com |
ab3aa04cc46d01006986ac47089971b853b3241a | cd416ff1894ae199018e9dfcf8ccf9b0103eb521 | /vistrails/packages/tabledata/read/read_csv.py | a2e6b34a9df090c408321f591703619813cae5b9 | [] | no_license | cjh1/VisTrails | f1df45d8c839d151e5c359212d5b985825079284 | 43a056d5ba642793314fa7cba72dd6d76feb9b1a | refs/heads/master | 2021-01-19T18:32:09.734253 | 2013-12-16T22:45:17 | 2013-12-16T22:45:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,510 | py | import csv
from itertools import izip
try:
import numpy
except ImportError:
numpy = None
from vistrails.core.modules.vistrails_module import ModuleError
from ..common import Table
def count_lines(fp):
lines = 0
for line in fp:
lines += 1
return lines
class CSVFile(Table):
_input_por... | [
"remirampin@gmail.com"
] | remirampin@gmail.com |
ea41da86369d1faeef59e4ed60285374faeb01eb | f0efb6d4f35a94a36086e8afd2c22fcccff717c4 | /horizon/horizon/dashboards/nova/overview/tests.py | b68f04a3ec33491e8bd352d8cc5f7e7ad39656bb | [
"Apache-2.0"
] | permissive | andrewsmedina/horizon | 3355933d64c646ecefc7f71c2e4b35d864fd4b30 | 6892653c0573a6a55f359cce6c1796053ef65cbf | refs/heads/master | 2021-01-20T23:18:06.384260 | 2012-02-06T22:42:56 | 2012-02-06T22:42:56 | 3,372,713 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,112 | py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2011 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... | [
"gabriel@strikeawe.com"
] | gabriel@strikeawe.com |
50b1e53cbd9acce8b3cc11689d21484eb9619f38 | 76426594e65bae8db20be3fcc15db4684bf84642 | /Functions/2_Calculations.py | fae63d29e7db327f44833f2bc14421ef74e4c348 | [] | no_license | Mishakaveli1994/Python_Fundamentals_May | edb2ebb19553a6bac531599dbcf25b621c360727 | 0dcda59987f1a51e515e756af9aaaa97ca39a681 | refs/heads/master | 2022-11-14T07:03:41.083733 | 2020-07-08T07:26:37 | 2020-07-08T07:26:37 | 265,183,726 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 374 | py | def Operations(com, num1, num2):
if com == 'multiply':
return num1 * num2
elif com == 'divide':
return int(num1 / num2)
elif com == 'add':
return int(num1 + num2)
elif com == 'subtract':
return int(num1 - num2)
command = input()
integer1 = int(input())
integer2 = int(in... | [
"mihata1994@yahoo.com"
] | mihata1994@yahoo.com |
93ae6c072fd2f1020c3e2ca62662157330bfac6f | 51ce07a419abe50f49e7bb6a6c036af291ea2ef5 | /2.Web/4. JavaScript/01_javascript/00_python.py | 262cfee93456448c469c7f5a9bfb8daef16d5bec | [] | no_license | salee1023/TIL | c902869e1359246b6dd926166f5ac9209af7b1aa | 2905bd331e451673cbbe87a19e658510b4fd47da | refs/heads/master | 2023-03-10T09:48:41.377704 | 2021-02-24T10:47:27 | 2021-02-24T10:47:27 | 341,129,838 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 415 | py | from time import sleep
"""
def sleep_3_seconds():
sleep(3)
print('잘잤다!')
print('이제 잘거다!')
sleep_3_seconds()
print('학교간다!')
"""
import requests
import json
response = requests.get('https://jsonplaceholder.typicode.com/todos/1')
# print(response.text)
# print(response.text.get('title'))
todo = response.js... | [
"dltmddk1023@gmail.com"
] | dltmddk1023@gmail.com |
3281e8ab02beebd59ea847218c1833e7f1658c62 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02683/s917624912.py | fe273b619f083d1e05ca1080c0bf5a8b4d8d4cc7 | [] | 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 | 772 | py | n,m,x = map(int,input().split())
books = []
for i in range(n):
book = list(map(int,input().split()))
books.append(book)
min_money = -1
#n冊あるとき、2**n通りの選び方
count = 0
for i in range(2**n):
select = format(count, "0" + str(n) + "b")
lst = []
while "1" in select:
index = select.index("1")
... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
63b1677fff8c91872af3ca9339cc64c1aee18827 | 45ab4c22d918dc4390572f53c267cf60de0d68fb | /src/Analysis/Engine/Impl/Typeshed/third_party/2and3/jinja2/runtime.pyi | 34d06f4cd51732e73ca08e2ec55c8e457bdb2db0 | [
"Apache-2.0",
"MIT"
] | permissive | sourcegraph/python-language-server | 580a24fd15fe9d4abeb95e9333d61db1c11a2670 | 64eae156f14aa14642afcac0e7edaf5d7c6d1a1c | refs/heads/master | 2023-04-09T21:17:07.555979 | 2018-12-06T23:25:05 | 2018-12-06T23:25:05 | 155,174,256 | 2 | 2 | Apache-2.0 | 2018-10-29T08:06:49 | 2018-10-29T08:06:49 | null | UTF-8 | Python | false | false | 4,359 | pyi | from typing import Any, Dict, Optional, Text, Union
from jinja2.utils import Markup as Markup, escape as escape, missing as missing, concat as concat
from jinja2.exceptions import TemplateRuntimeError as TemplateRuntimeError, TemplateNotFound as TemplateNotFound
from jinja2.environment import Environment
to_string = ... | [
"alsher@microsoft.com"
] | alsher@microsoft.com |
27fdb80392ff69ad8c75ae7045d974f2bdb7b9c8 | ac765102e434d1592c9f55039ba9ea92c0fa4c0d | /osgbuild/test/test_osgbuild.py | fcc9d822043906415bd7f64f19de3d1d1227287c | [
"Apache-2.0"
] | permissive | wangfeilong321/osg-build | 904a9ad449232c59ceb548f16b41749f519f45fb | eb4398fa4c3aea4a7fe3bd4c7d4059872b1be707 | refs/heads/trunk | 2021-01-18T08:56:34.337677 | 2015-10-30T17:44:24 | 2015-10-30T17:44:24 | 48,836,956 | 1 | 0 | null | 2015-12-31T06:21:08 | 2015-12-31T06:21:08 | null | UTF-8 | Python | false | false | 18,080 | py | #!/usr/bin/python
"""unit tests for the osg-build tasks
"""
# pylint: disable=C0103,R0904,W0614,C0111
import atexit
import grp
import re
import os
from os.path import join as opj
import pwd
import shutil
import tempfile
import unittest
from unittest import makeSuite
import sys
from osgbuild.constants import *
from os... | [
"matyas@cs.wisc.edu"
] | matyas@cs.wisc.edu |
4a2528cb42858e3cfcbb7cf3cf3802526da62fca | 51ea2be2a164e90a6f6c327ccedc95b5492a5329 | /AtCoder/contest 169/B.py | d3c20ddfcbad26254ac87540ae95c5b99a136623 | [
"MIT"
] | permissive | hanzohasashi33/Competetive_programming | 081c30d248d54cdf488d36d1c965b0f184296562 | b609972ada1c7177f182665e998beaa0c1eba514 | refs/heads/master | 2021-06-30T07:21:12.625721 | 2021-02-01T12:54:56 | 2021-02-01T12:54:56 | 216,160,136 | 22 | 23 | MIT | 2022-05-30T16:13:36 | 2019-10-19T06:28:39 | C++ | UTF-8 | Python | false | false | 445 | py | #! /usr/bin/env python3
import math
if __name__ == "__main__":
n = int(input())
l = list(map(int,input().split()))
if 0 in l :
print("0")
else :
flag = 1
prod = 1
for i in range(n) :
prod = prod * l[i]
if prod > int(math.pow(10,18)) :
... | [
"noreply@github.com"
] | hanzohasashi33.noreply@github.com |
9b1c41643c252ffb2283363cff436818c67dfa93 | 7298d1692c6948f0880e550d6100c63a64ce3ea1 | /deriva-annotations/catalog1/catalog-configs/PDB/ihm_hydroxyl_radical_fp_restraint.py | 14a2744f9bd1eae4942f4d6bba7882342a98fe6f | [] | no_license | informatics-isi-edu/protein-database | b7684b3d08dbf22c1e7c4a4b8460248c6f0d2c6d | ce4be1bf13e6b1c22f3fccbb513824782609991f | refs/heads/master | 2023-08-16T10:24:10.206574 | 2023-07-25T23:10:42 | 2023-07-25T23:10:42 | 174,095,941 | 2 | 0 | null | 2023-06-16T19:44:43 | 2019-03-06T07:39:14 | Python | UTF-8 | Python | false | false | 14,760 | py | import argparse
from deriva.core import ErmrestCatalog, AttrDict, get_credential, DerivaPathError
from deriva.utils.catalog.components.deriva_model import DerivaCatalog
import deriva.core.ermrest_model as em
from deriva.core.ermrest_config import tag as chaise_tags
from deriva.utils.catalog.manage.update_catalog import... | [
"brinda.vallat@rcsb.org"
] | brinda.vallat@rcsb.org |
ea0f51cbc0046b7570b8cd119682d4a75bbe6c72 | eba3e4a3935d6422d1ed85aaf69337f5ba15fc74 | /webhelpers/webhelpers/util.py | 0b3493d54744f6882168878248a31fb188d3971f | [
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | arianepaola/tg2jython | 2ae74250ca43b021323ef0951a9763712c2eb3d6 | 971b9c3eb8ca941d1797bb4b458f275bdca5a2cb | refs/heads/master | 2021-01-21T12:07:48.815690 | 2009-03-27T02:38:11 | 2009-03-27T02:38:11 | 160,242 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,998 | py | """Utility functions used by various web helpers
This module is such a mess that no new helpers should be added to it.
"""
import cgi
import copy
import sys
import urllib
from UserDict import DictMixin
from xml.sax.saxutils import XMLGenerator
def cgi_escape(s, quote=False):
"""Replace special characters '&', '<'... | [
"ariane@venus.(none)"
] | ariane@venus.(none) |
b39077907054b333d4287ef291d9748713c5403f | b47a619f6ccd0f76ccce989e62d0c963a1c14ab4 | /Python/dp/Pascal's Triangle.py | b16023a2b62b62ac9acffb697b1ac24dda36fb18 | [] | no_license | GreatTwang/lccc_solution | 0799d19097549ef3c9beeebf6dc9960db9f9eb54 | e75899634f45b0d60f8b3cb854ab9e503d676a57 | refs/heads/master | 2020-07-07T02:45:18.984502 | 2019-10-09T04:53:35 | 2019-10-09T04:53:35 | 203,219,848 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 270 | py | class Solution:
def generate(self, numRows: int) -> List[List[int]]:
ans = [[1] * n for n in range(1, numRows+1)]
for i in range(1, numRows):
for j in range(1, i):
ans[i][j] = ans[i-1][j-1] + ans[i-1][j]
return ans | [
"tianwang@bu.edu"
] | tianwang@bu.edu |
ac0f1010e131972a1226f9c81defd539ba98669c | 95bbebf7a09d02e44e15cd2d20ce8b5c1b5ada20 | /examenCFI2LGui.py | 850094d568354159961161b63d5b98dd542c3b4c | [] | no_license | leem34/examenCFI2L | 42a93e35a1831a93f303b4c7ad67dd3c2d1ff6fe | dd7b5d3e29b24800ecee254640a199998215054a | refs/heads/master | 2016-09-14T08:49:09.017264 | 2016-05-15T07:54:49 | 2016-05-15T07:54:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 18,010 | py | # -*- coding: utf-8 -*-
"""
Ce module contient les boites de dialogue du programme.
"""
from PyQt4 import QtGui, QtCore
import logging
import random
from examenCFI2LParametres import TEXTE_EXPLICATION, HTML, LATEX, BDD, \
LIMESURVEY, CULTUREGE, LINUX, ALGO, R, PYTHON
from examenCFI2LGuiSrc import examenCFI2LGuiSr... | [
"dimitri.dubois@umontpellier.fr"
] | dimitri.dubois@umontpellier.fr |
de8b4fb7fd3a87ab8c995888317af17fdbe3a5bd | 29cc7e23c1ed4b117334238da90d97795df9ff4a | /source/python-saharaclient/releasenotes/source/conf.py | 23f10b7c7bfc30b4e107c5fee308d1562bc4996d | [
"Apache-2.0"
] | permissive | Kundjanasith/spark-dqn-learn | bf2c5b3fb6a5ffa72016c01dd7f2c337c200e89b | 4e5e72d77249636ddc59ade8abd69c7bd7720c3e | refs/heads/master | 2021-07-24T09:55:09.711821 | 2017-11-03T01:58:50 | 2017-11-03T01:58:50 | 109,242,862 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,447 | py | # -*- coding: utf-8 -*-
# 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, software... | [
"you@example.com"
] | you@example.com |
051f82fb2eae3cf07090abae844f24ffff48c33f | 4820b9d3792935e610c72a9a51adc7ac1d41928d | /spider_framework/utils_module/log_module.py | c42ab752de52df5868147f8c9a558918346767cd | [] | no_license | lxngoddess5321/my_spider_framework | baf8fb622be6493f287ddb75c9b418fb40989588 | c51d3b2ed12bbe011590bd964086ecbbf5051684 | refs/heads/master | 2021-10-07T19:52:05.681537 | 2018-10-17T10:10:38 | 2018-10-17T10:10:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,231 | py | import logging
from ..config import MY_DEBUG_LEVEL, SAVE_LOG_DEBUG_LEVEL
from logging import getLogger
'''
日志 模块
'''
def get_logger():
'''
打印到终端的日志
'''
logger = getLogger(__name__)
if logger.handlers:
for i in range(len(logger.handlers)):
logger.handlers.pop()
logger.setLe... | [
"binhui.ni@yourdream.cc"
] | binhui.ni@yourdream.cc |
2e1146b4417135466fdcb21688edcd6ebe325b3a | eb8b5cde971573668800146b3632e43ed6e493d2 | /python/oneflow/nn/modules/slice.py | 2e80aa0be10adbd81c4ab61db817dfbb90093c56 | [
"Apache-2.0"
] | permissive | big-data-ai/oneflow | 16f167f7fb7fca2ce527d6e3383c577a90829e8a | b1c67df42fb9c5ab1335008441b0273272d7128d | refs/heads/master | 2023-07-08T21:21:41.136387 | 2021-08-21T11:31:14 | 2021-08-21T11:31:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,729 | py | """
Copyright 2020 The OneFlow 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 applicable law or agr... | [
"noreply@github.com"
] | big-data-ai.noreply@github.com |
0e65763aae42f6b916d54aec32de9bcb2a209084 | 5e277ad64a375bfe61890b10e2d4d5a56dba4e13 | /review_proc.py | 0075a935d6511c15566fb37c44e20c1447adf5a8 | [] | no_license | corynezin/thesis | 0d10295a7ca768ae25bd319fe64e0ed73c77a6a4 | dfa69ebbd9ec01c085b73c3ea0ca1bda8f96d28e | refs/heads/master | 2021-09-14T08:52:36.991586 | 2018-05-10T18:42:31 | 2018-05-10T18:42:31 | 102,166,292 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,174 | py | import preprocess
import numpy as np
import re
class review:
def __init__(self,review_filename):
self.review_rating = int(re.search('_\d+',review_filename).group()[1:])
target_list = [0,1] if self.review_rating > 5 else [1,0]
self.sentiment = 'pos' if self.review_rating > 5 else 'neg'
... | [
"cory.nezin@gmail.com"
] | cory.nezin@gmail.com |
75ccb63aa623660c5681513e663cf6a50af90af6 | 8f48d12b88048e424ebb0d72ca6dfab5cf12ae0f | /0600_0999/981.py | 1a6e46f5d61ecaaf9c8139e8154c73ea4412e334 | [] | no_license | renjieliu/leetcode | e1caf13c18a8107ed9252588b339fb76bcb1b246 | 4668b64fcb9320b6c316d8608fc61911ce43b6c7 | refs/heads/master | 2023-03-18T18:16:06.187741 | 2023-03-14T20:31:59 | 2023-03-14T20:31:59 | 128,823,819 | 7 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,762 | py | class TimeMap:
def __init__(self):
self.hmp = defaultdict(lambda: [])
def set(self, key: str, value: str, timestamp: int) -> None: # O( 1 | N )
self.hmp[key].append([timestamp, value])
def get(self, key: str, timestamp: int) -> str: # O( logN | 1)
if key not in s... | [
"anlrj@qq.com"
] | anlrj@qq.com |
bccbdd6ab1c0bab86ca3e3352d833229a05d3679 | faa7aa061ffcd848116a3f183c1db4a441d61e6b | /src/python/gwas_analysis/simulation/datasets.py | 4f4ee6c00feb6309394d181aefec003fd258f667 | [
"Apache-2.0"
] | permissive | OwenAnalytics/gwas-analysis | 5fd4aa6967b28baef1e36e919725a0c1703e81bd | d98895d7be40599c634afb1f16d4e65a54bf1e49 | refs/heads/master | 2021-03-20T00:34:54.741143 | 2020-03-05T20:58:01 | 2020-03-05T20:58:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,095 | py | import hail as hl
import numpy as np
def add_default_plink_fields(mt):
"""Add fields to PLINK"""
return mt\
.annotate_rows(rsid=hl.null(hl.tstr))\
.annotate_cols(
fam_id=hl.null(hl.tstr), pat_id=hl.null(hl.tstr), mat_id=hl.null(hl.tstr),
is_female=hl.null(hl.tbool), is_c... | [
"eric.allen.czech@gmail.com"
] | eric.allen.czech@gmail.com |
766e010b76d0ba563a0c426c18b6449cc2497894 | b3b9066196700269494b2a9350377bfd1aa8170e | /starlight/forms.py | b84e2589f76d853cee3d88a9ca48890d848e7db0 | [] | no_license | MagiCircles/RevueStarlight | f33000e06bc6ce6db506bd7460c47ffd2a3716c4 | 5ce8a023e2b618143fd9dcc3e78758c2623001d7 | refs/heads/master | 2022-08-13T20:12:25.201028 | 2022-07-10T15:14:44 | 2022-07-10T15:14:44 | 185,398,158 | 5 | 2 | null | 2022-07-30T18:11:03 | 2019-05-07T12:32:48 | Python | UTF-8 | Python | false | false | 28,391 | py | from collections import OrderedDict
from django import forms
from django.conf import settings as django_settings
from django.core.validators import MaxValueValidator
from django.db.models.fields import BLANK_CHOICE_DASH
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as ... | [
"db0company@gmail.com"
] | db0company@gmail.com |
bbec99ae2b5ea6286b4d97f19f582f1d67789ea4 | 97f2852420d6fdc98e5a4a0321c35920ff070d41 | /examples/scripts/sc/bpdn.py | ec1b86001f3b086cd1d6100739505c546c5b3005 | [
"BSD-3-Clause"
] | permissive | eglxiang/sporco | 93595f3afb6acda758425f7332513eeb892fa51f | e4a716b32b675d6e23ba0bfc3b2d7c6f9bc5d7a3 | refs/heads/master | 2021-05-04T23:03:57.430340 | 2018-01-19T19:03:01 | 2018-01-19T19:03:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,813 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of the SPORCO package. Details of the copyright
# and user license can be found in the 'LICENSE.txt' file distributed
# with the package.
"""
Basis Pursuit DeNoising
=======================
This example demonstrates the use of class :class:`.bpdn.BPDN`... | [
"brendt@ieee.org"
] | brendt@ieee.org |
7b804ed8026e6ddf34fe4c475ce0d29b951b5dde | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/55/usersdata/104/23990/submittedfiles/av2_p3_civil.py | ac21c1e60965dc21136e7ac37b76bdf79d5cdab3 | [] | 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 | 542 | py | # -*- coding: utf-8 -*-
from __future__ import division
import numpy as np
n=input('Digite a dimensão:')
l=input('Digite o indice da linha:')
c=input('Digite o indice da coluna:')
z=np.zeros((n,n))
cont=0
for i in range(0,z.shape[0],1):
for j in range(0,z.shape[1],1):
z[i,j]=input('Digite um valor pra matri... | [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
890897de0e2407e83757b81338ec52876035c9ec | c18e1fa174e1b0e6d56e9f1a8a3708099c3cd248 | /learning_from_mcvine/res_sims/Ei_500/E-19.3373420406_hkl-15.2533735111,-2.42069710922,-2.25423202276/run.py | 062d0c20ccd91b5fab5907dbbdcb625f693780d8 | [] | no_license | pnave95/ORNL_public_research | e0662657b41969f3f3dc263ea4c62a042d85547a | 58cad7508f9d29c17af5419f05522c2f724e717e | refs/heads/master | 2021-01-20T00:39:58.308250 | 2017-06-22T20:03:57 | 2017-06-22T20:03:57 | 89,160,804 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,146 | py | #!/usr/bin/env python
import mcvine.cli
from numpy import array
from mcvine_workflow.singlextal.resolution import use_res_comps as urc
beam_neutrons_path = '/SNS/users/p63/ORNL_public_research/MCViNE_Covmat_comparison/mcvine_resolution/beams/beam_500_1e9/out/neutrons'
instrument = urc.instrument('ARCS', '3.*meter', '13... | [
"p63@analysis-node03.sns.gov"
] | p63@analysis-node03.sns.gov |
968a2c227c209441b7833e9d75bafd8d0e62c481 | c5031dd49aebbf6cdff7e895dd787c2ff1a7fee7 | /views.py | e04c3ede16578cd1cda082f615ef5002c992dc21 | [] | no_license | bwghughes/badbatch | 9e5ba912f54b67a445c7947f5cf5140c153ce9dc | 91510eec14fb549f82572cddcbdb829f10b099e4 | refs/heads/master | 2016-09-05T23:47:26.004471 | 2013-05-29T13:01:31 | 2013-05-29T13:01:31 | 9,768,943 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,679 | py | from flask import Flask, render_template, make_response, request
from flask.ext.classy import FlaskView
from models import Subscriber, Caller, Alert
GOOD_SMS_RESPONSE = """
<Response>
<Sms>Thanks - you're subscribed to alerts for {}</Sms>
</Response>
"""
WELCOME_MESSAGE = """
<Response>
<Play>https://dl.drop... | [
"bwghughes@gmail.com"
] | bwghughes@gmail.com |
54a5a64eb284badb6659f8a34027d496bdbdcec5 | 1a3d6caf89e5b51a33627458ae7c0bbb00efdc1d | /src/gluonts/mx/model/lstnet/_estimator.py | f0400bcb2ad742ddeb956db595d554e50db3f836 | [
"Apache-2.0"
] | permissive | zoolhasson/gluon-ts | e9ff8e4ead4d040d9f8fa8e9db5f07473cb396ed | 3dfc0af66b68e3971032a6bd0f75cd216988acd6 | refs/heads/master | 2023-01-25T01:52:57.126499 | 2023-01-13T17:50:38 | 2023-01-13T17:50:38 | 241,743,126 | 0 | 1 | Apache-2.0 | 2020-08-06T16:53:11 | 2020-02-19T22:45:54 | Python | UTF-8 | Python | false | false | 10,587 | py | # Copyright 2018 Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license... | [
"noreply@github.com"
] | zoolhasson.noreply@github.com |
1a08b8bf04ccf742049429578062f962d1c96358 | 423167d8b46975ffd31a7e9e66e885d47b8d797a | /example/scenario_analysis.py | de2766a7da23578d1052070c3ce90920a848f707 | [
"Apache-2.0"
] | permissive | ricardoalzamora/covid19-sir | 37da075808b1f3671f69b2c4e3d5ef91e23605a2 | 5046273f9163c96e94bcd2587032d11266fb93dc | refs/heads/master | 2023-04-24T01:08:48.786702 | 2021-05-16T16:30:07 | 2021-05-16T16:30:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,479 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
When you use this file from the top directory of the repository with poetry, please run
cd example; poetry run ./scenario_analysis.py; cd ../
"""
import os
import sys
try:
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
except Exception:
pass
fr... | [
"7270139+lisphilar@users.noreply.github.com"
] | 7270139+lisphilar@users.noreply.github.com |
53b7bb634bbe11f156af448a0b90aabc5aa28881 | c3a3beda6fe3a9bbd5b240477f542a46dd92823a | /decision_structures/TH/03_ship_weight.py | ff1ab257e513bba996bfdf4578fccee2bd1f4c5d | [] | no_license | nfarnan/cs001X_examples | 2e64955b705c8ac9c4319becf6344d36b9560e78 | 80b612249fa97ff685f345582f184d57f94bff8e | refs/heads/master | 2020-12-11T14:06:00.890074 | 2020-04-14T19:41:02 | 2020-04-14T19:41:02 | 209,681,009 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 611 | py | # get weight from the user
weight = float(input("How heavy is the package to ship (lbs)? "))
if weight <= 0:
print("Invalid weight (you jerk)")
total = None
elif weight <= 2:
# flat rate of $5
total = 5
# between 2 and 6 lbs:
elif weight <= 6:
# $5 + $1.50 per lb over 2
total = 5 + 1.5 * (weight - 2)
# betwee... | [
"nlf4@pitt.edu"
] | nlf4@pitt.edu |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.