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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8b79e8d2293cf3bd64469d77cb243802b45c36b0 | cc3a436bdbd82b0f4887ed2e038688abe30dd84e | /db_beispiele/sql_thema_lager/test_4_executemany_context_manager.py | a38c79e2612bd3bf49c8910aa6b174b867758ea0 | [] | no_license | enextus/python_learnstuff | 05673348bc66114fe30670aa11cff58fedade19a | 76b6acdab9dc0d685fd3b1265fd2a3ebe72c6dae | refs/heads/master | 2021-01-07T05:10:33.616407 | 2020-02-19T13:12:55 | 2020-02-19T13:12:55 | 241,564,349 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 625 | py | import sqlite3
# DB anlegen
connection = sqlite3.connect("lagerverwaltung.db")
try:
with connection:
cursor = connection.cursor()
werte = (
(10, 1145345345, "Grafikkarte Typ 1a", "1FC", 10),
(20, 2245345345, "Grafikkarte Typ 2a", "2FC", 20),
(30, 3345345345, "Gra... | [
"enextus@gmail.com"
] | enextus@gmail.com |
1024c67c8586e45972b26f9c5150925363e335cf | eaecb9cc09c45561f68ab888adc82ba41e4aef68 | /day1/1_5.py | bb1592f958c24a211c9541faf38af3ec8b56da40 | [] | no_license | NyangUk/Python | 4e90823e3c88394b89a618c3f466a913091a5402 | c3470cc78f90072114e06ffdabba768ed97b3df2 | refs/heads/master | 2021-02-04T19:52:30.750424 | 2020-03-15T14:07:04 | 2020-03-15T14:07:04 | 243,703,965 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 454 | py | #문자열 더하기
a = "hello"
b = "world"
print(a+b)
# 문자열 곱하기(문자열의 반복)
print(a*3)
#인덱싱과 슬라이싱
str = "You make me happy"
print(str[2])
print(str[15])
# 해당 인덱스부터 해당 인덱까지 슬라이싱
print(str[4: 8])
# 해당 인덱스부터 끝까지 슬라이싱
print(str[-5:])
print(str[4:])
# 처음부터 해당 인덱스까지 슬라이싱
print(str[:3])
# 모두 출력
print(str[:])
| [
"lobgd9150@gmail.com"
] | lobgd9150@gmail.com |
6807b0c4401dc1cb9f40723462b632eca12325f1 | dfcb9827b966a5055a47e27b884eaacd88269eb1 | /ssseg/cfgs/pspnet/cfgs_ade20k_resnet101os16.py | b6aa35c78713c6329e4f3286f41f547c6ee3b419 | [
"MIT"
] | permissive | RiDang/sssegmentation | cdff2be603fc709c1d03897383032e69f850f0cd | 2a79959a3d7dff346bab9d8e917889aa5621615a | refs/heads/main | 2023-02-05T12:52:35.391061 | 2020-12-27T05:59:58 | 2020-12-27T05:59:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,380 | py | '''define the config file for ade20k and resnet101os16'''
from .base_cfg import *
# modify dataset config
DATASET_CFG = DATASET_CFG.copy()
DATASET_CFG['train'].update(
{
'type': 'ade20k',
'rootdir': 'data/ADE20k',
}
)
DATASET_CFG['test'].update(
{
'type': 'ade20k',
'rootdir... | [
"1159254961@qq.com"
] | 1159254961@qq.com |
d12f8508baa8f4eea6a03f7d3abdaf33e80e8b4b | f1c34b81006d5f8f67d43bc106993b118ecf4f47 | /src/libANGLE/renderer/d3d/d3d11/gen_blit11helper.py | a0f38fce9a0d86669d5ae83742299eccc790cb46 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | passerbya/angle | 843f7ca81d99c73f37ddf0cf1764c950aa112a7b | 2f1d503bcdbb85be639ecadfc7007b93e5fd15e7 | refs/heads/main | 2023-08-16T00:00:23.648772 | 2021-09-17T01:49:14 | 2021-10-05T03:51:01 | 413,764,463 | 0 | 0 | NOASSERTION | 2021-10-05T10:07:18 | 2021-10-05T10:07:18 | null | UTF-8 | Python | false | false | 13,140 | py | #!/usr/bin/python2
#
# Copyright 2018 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# gen_blit11helper.py:
# Generates the code for retrieving the various blit shaders for D3D11
# NOTE: don't run this script di... | [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
d48013e92e429cfbb437f1a9fb93beea0da6ced8 | ce76b3ef70b885d7c354b6ddb8447d111548e0f1 | /eye/own_life/call_problem_at_fact/work_or_same_way/try_right_company/hand.py | 546e23910136fff2113be1592a5b42000d72e81c | [] | no_license | JingkaiTang/github-play | 9bdca4115eee94a7b5e4ae9d3d6052514729ff21 | 51b550425a91a97480714fe9bc63cb5112f6f729 | refs/heads/master | 2021-01-20T20:18:21.249162 | 2016-08-19T07:20:12 | 2016-08-19T07:20:12 | 60,834,519 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 210 | py |
#! /usr/bin/env python
def find_bad_time(str_arg):
other_person(str_arg)
print('small_work')
def other_person(str_arg):
print(str_arg)
if __name__ == '__main__':
find_bad_time('young_work')
| [
"jingkaitang@gmail.com"
] | jingkaitang@gmail.com |
6c0e0d53a24b21ccaed3bb9638496199be3bdcbe | 23fc74d366e4f0ffef7d37d1c75227adc9ab2ff9 | /nab/items.py | a23d5f8192ac89e8750ff0eb5a6b34c6960ad46f | [] | no_license | SimeonYS/nab | be5c86c24dc2f40fbd762e9ee7ff0b72e9a23179 | 1b0c64b9641e9c493281bf3b005901f83a9e70cb | refs/heads/main | 2023-04-08T23:43:50.480985 | 2021-04-21T10:30:12 | 2021-04-21T10:30:12 | 360,128,000 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 181 | py | import scrapy
class NabItem(scrapy.Item):
title = scrapy.Field()
content = scrapy.Field()
date = scrapy.Field()
link = scrapy.Field()
category = scrapy.Field() | [
"simeon.simeonov@adata.pro"
] | simeon.simeonov@adata.pro |
1a2f915a17f8ecf95b094df79b794144d5162b93 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_4/142.py | 691e77898129a1b22200d504e458ba959b2f1b43 | [] | 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 | 357 | py | f = open('A-large.in')
t = int(f.readline())
def plu(x,y):
return x+y
for i in range(t):
n = int(f.readline())
a = map(int,f.readline().split(' '))
b = map(int,f.readline().split(' '))
a.sort()
b.sort(reverse = True)
ab = reduce(plu,map(lambda x:x[0]*x[1], zip(a,b)))
... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
f2abd89f8fc1cabc07435ed5cb04587a27fe755c | ae8d2c7d27817c39b28444517f1f6222137147b5 | /snake/variaveis/variaveis.py | b922642a5db11e1d9e8646690caf5b401a5193b6 | [] | no_license | FailBoatBigBrains/atividades-intro | 27b1799337862cc1f707888eeecb9f97df090699 | 4a2faff8bdd3dd1855946ce5ceed45fa8624964b | refs/heads/main | 2023-05-02T13:59:17.501540 | 2021-05-25T01:48:27 | 2021-05-25T01:48:27 | 370,130,895 | 1 | 1 | null | 2021-05-25T01:38:09 | 2021-05-23T18:39:48 | Python | UTF-8 | Python | false | false | 152 | py | inteiro = 6
texto = "Paulo Victor"
numReal = 3.2
logico = True
print(type(inteiro))
print(type(texto))
print(type(numReal))
print(type(logico)) | [
"rodrigondec@gmail.com"
] | rodrigondec@gmail.com |
e691b54a539a95e8290bff0c6871ab46fa3dce8c | 0617c812e9bf58a2dbc1c1fef35e497b054ed7e4 | /venv/Lib/site-packages/pyrogram/raw/functions/account/update_profile.py | 0658770ed18202942990a0ecec4750e7b1186404 | [] | no_license | howei5163/my_framework | 32cf510e19a371b6a3a7c80eab53f10a6952f7b2 | 492c9af4ceaebfe6e87df8425cb21534fbbb0c61 | refs/heads/main | 2023-01-27T14:33:56.159867 | 2020-12-07T10:19:33 | 2020-12-07T10:19:33 | 306,561,184 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,124 | py | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2020 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | [
"houwei5163"
] | houwei5163 |
a40c7c1db9f60095ccb86766aae8923aad9c8b61 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /RJySHrDkBjSAj5gzq_0.py | c848015327c952d1f64b0acba95645ec5ffab932 | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 202 | py |
def nespers(lst):
inner_nespers = [nespers(l) if type(l)==list else 1 for l in lst]
return prod(range(1,len(lst)+1)) * prod(inner_nespers)
def prod(lst):
p=1
for i in lst: p*=i
return p
| [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
a6ee2c31e22c693e3587c38c11d3048f374e123f | fe31c3cb21bac1cf7d06bb8dbb00ad7c09994403 | /untitled/venv/bin/easy_install-3.5 | 55592bba055f632a51481e2b362984bd88585ea1 | [] | no_license | bsakari/Python-Projects | 87718827daa9ff4ac16bf0855e04cadef329aa1d | 41104d8d1df84c27255f2d221ff68f219de8c84f | refs/heads/master | 2020-03-21T03:16:42.332439 | 2018-06-20T14:39:34 | 2018-06-20T14:39:34 | 138,045,571 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 454 | 5 | #!/home/kingwanyama/PycharmProjects/untitled/venv/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.0.1','console_scripts','easy_install-3.5'
__requires__ = 'setuptools==39.0.1'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.... | [
"sakaribenjamin@gmail.com"
] | sakaribenjamin@gmail.com |
0c7912e526ccb358b821db0007d73274a074a257 | 473fc28d466ddbe9758ca49c7d4fb42e7d82586e | /app/src/main/java/com/syd/source/aosp/frameworks/compile/slang/lit-tests/lit.cfg | 09d304e090a7fe9440d8f2fd66ea314e1fa7d904 | [
"NCSA",
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] | permissive | lz-purple/Source | a7788070623f2965a8caa3264778f48d17372bab | e2745b756317aac3c7a27a4c10bdfe0921a82a1c | refs/heads/master | 2020-12-23T17:03:12.412572 | 2020-01-31T01:54:37 | 2020-01-31T01:54:37 | 237,205,127 | 4 | 2 | null | null | null | null | UTF-8 | Python | false | false | 3,562 | cfg | # -*- Python -*-
# Configuration file for the 'lit' test runner.
# name: The name of this test suite.
config.name = 'slang_lit_tests'
# suffixes: A list of file extensions to treat as test files.
config.suffixes = ['.rs', '.ll']
# testFormat: The test format to use to interpret tests.
import lit.formats
config.test... | [
"997530783@qq.com"
] | 997530783@qq.com |
abe61b3d6719f6a8c8cb023d951e49eb48b00576 | 2f98aa7e5bfc2fc5ef25e4d5cfa1d7802e3a7fae | /python/python_142.py | e9dd75c58f733f5b61a2c04c5361b1837726c11d | [] | no_license | AK-1121/code_extraction | cc812b6832b112e3ffcc2bb7eb4237fd85c88c01 | 5297a4a3aab3bb37efa24a89636935da04a1f8b6 | refs/heads/master | 2020-05-23T08:04:11.789141 | 2015-10-22T19:19:40 | 2015-10-22T19:19:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 180 | py | # python curses.ascii depending on locale?
In Python, is there a concise way to use a list comprehension with multiple iterators?
[ (i,j) for i in range(1,3) for j in range(1,5) ]
| [
"ubuntu@ip-172-31-7-228.us-west-2.compute.internal"
] | ubuntu@ip-172-31-7-228.us-west-2.compute.internal |
f9ab008c5d2d1275f8bc4d9bbdfd1145868da9bc | 9a46bc80ae0cc16d82cdc7b8f0091266613b06e2 | /Web/twisted/challenge/twisted/test/test_process.py | f984cff375b550eb6bbae34c7045edb2ac8b8020 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | osirislab/CSAW-CTF-2013-Finals | 50367cbb9709ae10f7e1537b23508a9d47000c0f | b1bce3adde421b1f6a598b04d35f83dfb88caca4 | refs/heads/master | 2020-07-26T13:36:04.028965 | 2019-09-15T21:28:02 | 2019-09-15T21:28:02 | 208,659,589 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 82,530 | py | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Test running processes.
"""
import gzip
import os
import sys
import signal
import StringIO
import errno
import gc
import stat
import operator
try:
import fcntl
except ImportError:
fcntl = process = None
else:
from twisted.internet... | [
"jaimitino@gmail.com"
] | jaimitino@gmail.com |
fe06710df9033229550fb6f32de19b518c6559fa | 1fc45a47f0e540941c87b04616f3b4019da9f9a0 | /src/sentry/south_migrations/0231_auto__add_field_savedsearch_is_default.py | e3fe2bb87cb5ce5dcf78c4b106058e893de3df3e | [
"BSD-2-Clause"
] | permissive | seukjung/sentry-8.15.0 | febc11864a74a68ddb97b146cc1d2438ef019241 | fd3cab65c64fcbc32817885fa44df65534844793 | refs/heads/master | 2022-10-28T06:39:17.063333 | 2018-01-17T12:31:55 | 2018-01-17T12:31:55 | 117,833,103 | 0 | 0 | BSD-3-Clause | 2022-10-05T18:09:54 | 2018-01-17T12:28:13 | Python | UTF-8 | Python | false | false | 42,207 | py | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'SavedSearch.is_default'
db.add_column('sentry_savedsearch... | [
"jeyce@github.com"
] | jeyce@github.com |
37454adc17ccc4b5d78654a4827a312ec0be412f | 666898bf873aa812f5dcc66e67617668c3dcfe2b | /plugins/effects/PhxShaderSimVol.py | 80f83b40a11c9246dee5d6f369e1e57bd9087878 | [] | no_license | ISRAELAVLIS33/vb30 | 752b31c6e8cb9f7690c4c568c832a0cbe9c1347f | ac5278a2ec28c704f0c3e73ad338d910ab3a7330 | refs/heads/master | 2021-01-20T21:19:32.096384 | 2014-08-22T14:38:50 | 2014-08-22T14:38:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,509 | py | #
# V-Ray For Blender
#
# http://chaosgroup.com
#
# Author: Andrei Izrantcev
# E-Mail: andrei.izrantcev@chaosgroup.com
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the... | [
"andrei.izrantcev@chaosgroup.com"
] | andrei.izrantcev@chaosgroup.com |
02ab42c5c8badbbe590644d21545d1ba4ab4d0dd | 30d61ce0b728f31a830db6b6b1954a32551990b2 | /src/main.py | a470e7a4ea2faf9f82c75807851c1a0dd64d1968 | [
"MIT"
] | permissive | hgiesel/anki_set_randomizer | 6755dc8489b703887c55a5427bbbdab858f58a65 | 1a9a22480eb6c0e7f421dc08d36d14920e43dd3e | refs/heads/master | 2022-08-24T05:45:13.339132 | 2020-01-15T17:04:26 | 2020-01-30T13:56:50 | 197,258,760 | 5 | 0 | MIT | 2022-07-20T17:28:42 | 2019-07-16T19:56:27 | JavaScript | UTF-8 | Python | false | false | 492 | py | from aqt import mw
from aqt.qt import QDialog, QWidget, QAction
from anki.hooks import addHook
from .lib import config
from .setup import setup_editor, setup_menu_option, setup_addon_manager
# from .occluder.custom.sr_occluder import SROccluder
# def debugOpenWindow():
# dialog = SROccluder(mw)
# dialog.setu... | [
"hengiesel@gmail.com"
] | hengiesel@gmail.com |
4469a63ba80c88335dffc1c5c727ec4f2a7ca15a | 6096761c409494f402826d39fea631df6de3c538 | /ldLib/GUI/Box.py | 6464786bc91bbb64cfb43fd81b0653eaea4c689e | [] | no_license | Bobsleigh/LD39 | b2b7a785edf53279d011efef296b137721bc0828 | 66963968aa84fe1abfe2dbf3732fb0a0dde7808b | refs/heads/master | 2021-01-01T19:48:55.818426 | 2017-07-31T23:13:10 | 2017-07-31T23:13:10 | 98,695,704 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,761 | py | import pygame
import os
from app.settings import *
class Box(pygame.sprite.Sprite):
def __init__(self,pos, size):
super().__init__()
x = size[0]
y = size[1]
TILEX = 32
TILEY = 32
upLeft = pygame.image.load(os.path.join('img', 'GUI', "GreyUpLeft.bmp"))
upMi... | [
"philippe.gendreau.2@ulaval.ca"
] | philippe.gendreau.2@ulaval.ca |
df3b7b97135f87ff488c16c0aa9b5365e35d0091 | c24fef69a42ac1da33c892eb85c955acc743354c | /minSteps.py | 78e5189330d5367e4bd6326c19ab54b3ef5826d5 | [] | no_license | Arithmeticjia/leetcode-python | e3c1d5c5a2733c56637ee2fb51222c7465dc6425 | a24869d88cb41e53fb0abe482ba87dd1e54b2167 | refs/heads/master | 2021-08-15T21:55:11.511687 | 2021-01-03T03:50:54 | 2021-01-03T03:50:54 | 237,393,853 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 396 | py | class Solution(object):
# 将一个数从2除到N - 1
# 遇到能整除的就不是素数,反之就是
def minSteps(self, n):
ans = 0
d = 2
while n > 1:
while n % d == 0:
ans += d
print(d)
n /= d
d += 1
return ans
if __name__ == '__main__':
p... | [
"1097197237@qq.com"
] | 1097197237@qq.com |
b77eb3aeb34b85c37ffa57c467c252cd52526fa6 | 316b8375a7ef8095f09973d13f5a49bc7fbe7580 | /famous_company_mianshi/36.py | 039a0176eb7c628cdf53041f293633bcf3fe4d84 | [] | no_license | zhaolijian/suanfa | 9a8d23fbca01d994f7eef24631783c4b7ed25683 | 4f3b25f360f30c0e604ba4dc4d5774ccb5f25b32 | refs/heads/master | 2023-06-08T17:12:41.522937 | 2021-06-27T08:13:16 | 2021-06-27T08:13:16 | 313,269,459 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,065 | py | # 给定数组arr,设长度为n,输出arr的最长递增子序列。(如果有多个答案,请输出其中字典序最小的)
import bisect
class Solution:
def LIS(self , arr ):
# write code here
n = len(arr)
# 每个位置对应的长度
dp = [1]*n
lenth = 1
# 递增序列
array = [arr[0]]
for i in range(1, n):
if arr[i]>array[-1]:
... | [
"820913569@qq.com"
] | 820913569@qq.com |
9bc3e0af0b981fcc67ba1e93a31e1299923fa78e | 43b1ba0e9d98fd4c8b2612f00a4b9b55b7a7cb57 | /test/stress_test.py | f6c846dfa023aee4d7f657e46d2f20577c237b3f | [
"MIT"
] | permissive | yuan-xy/libra-client | 11604e6fcd9ee6d38cbf0fa838ceea720c50fe96 | 697058bfa7bc8e8a7a2598dae4bb289f44524dba | refs/heads/master | 2021-06-16T07:09:02.750346 | 2020-07-02T09:49:21 | 2020-07-02T09:49:21 | 207,316,691 | 30 | 12 | MIT | 2021-06-02T00:26:18 | 2019-09-09T13:33:17 | Python | UTF-8 | Python | false | false | 2,023 | py | import libra
from libra.transaction import *
import os, time
import pytest
import pdb
def is_in_ci():
if 'TRAVIS' in os.environ:
return True
if 'CI' in os.environ and os.environ['CI'] == 'true':
return True
return False
def run_stress_test():
return 'STRESS_TEST' in os.en... | [
"yuan_xin_yu@hotmail.com"
] | yuan_xin_yu@hotmail.com |
068cd0e8af0be84c210ae53c6054e13ba56cc747 | ff47f05ded47d70215cdff9be5869fbf1c834f24 | /main/models.py | 36b366630a9bd423f8a70fd4c737a6b6a913cb86 | [
"MIT"
] | permissive | azul-cloud/cityinfo | d213c9fb3846ed6fe36cef6dae0049e27c869860 | 5655020fbe0215681960a3593cdc3a280a573f3f | refs/heads/master | 2021-01-02T08:32:45.361189 | 2014-12-18T17:55:04 | 2014-12-18T17:55:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,539 | py | from django.db import models
from django.contrib.auth.models import AbstractUser
from django.utils.text import slugify
class TimeStampedModel(models.Model):
'''
An abstract base class model that provides selfupdating
created and modified fields.
'''
created = models.DateTimeField(auto_now_add=True... | [
"awwester@gmail.com"
] | awwester@gmail.com |
6f9f132770740e72b39e901d80b4022a053caf43 | 13a416a2694d1f6aa1a68cd47610236bf61cafbc | /0521/0521/src/main10.py | 49ff0389ada708db45f20887b397e9f05252d42f | [] | no_license | Highjune/Python | c637f7d0f9e5d1ac9d6ad87b4e54833b8ff4ae11 | 1be43816d22f5f3b8679cf0cd3939e9d9f54497a | refs/heads/master | 2022-11-24T01:20:54.470172 | 2020-07-27T18:01:47 | 2020-07-27T18:01:47 | 263,271,337 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 584 | py | class Member:
def __init__(self, name, age):
self._name = name
self._age = age
def __str__(self):
return 'Name = {}\tAge={}'.format(self._name, self._age)
#
# mylist = []
# mylist.append(Member('한지민', 24))
# mylist.append(Member('박지민', 34))
# mylist.append(Member('김지민', 44))
import pic... | [
"highjune37@gmail.com"
] | highjune37@gmail.com |
b7ce2e513324ae270999609f7d90295f5b41301b | 9afbb6993450d1e0c3bae68e86844bd06d4419ee | /Matplotlib/pie1.py | ceb5ad4aa47ca8b4ac3b8cace43bc88d2d4da881 | [] | no_license | Jigar710/Python_Programs | 6f331caac30878655d4cca4ad97d4214c0262088 | 714a6306487eb6712f32ccb51b6a2407a81873fa | refs/heads/main | 2023-02-25T12:24:44.874199 | 2021-01-28T15:43:24 | 2021-01-28T15:43:24 | 332,869,164 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 416 | py | from matplotlib import pyplot as plt
exp_vals = [1400,600,300,410,250]
exp_labels = ['Home Rent','Food','Phone / Internet Bill','Car','Other Utilities']
#plt.axis('equal')
#plt.pie(exp_vals,labels=exp_labels,radius=1.5,autopct='%0.2f%%',explode=[0,0.3,0,0,0],shadow=True,startangle=45)
plt.pie(exp_vals,labels=exp_labe... | [
"jigar.shekhat.777@gmail.com"
] | jigar.shekhat.777@gmail.com |
2b4b4cd1460b03d4452e7a08ef358552d7d94102 | eb3683f9127befb9ef96d8eb801206cf7b84d6a7 | /testing/test_programs/stypy_code_copy/stypy_copy/code_generation_copy/source_code_writer_copy.py | cc3502fab2dc0be8c3ed59103934043d6c7b7137 | [] | no_license | ComputationalReflection/stypy | 61ec27333a12f76ac055d13f8969d3e0de172f88 | be66ae846c82ac40ba7b48f9880d6e3990681a5b | refs/heads/master | 2021-05-13T18:24:29.005894 | 2018-06-14T15:42:50 | 2018-06-14T15:42:50 | 116,855,812 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 413 | py | import os
def write_python_source_code(source_file_path, src):
"""
Writes Python source code to the provided file
:param source_file_path: Destination .py file
:param src: Source code
:return:
"""
dirname = os.path.dirname(source_file_path)
if not os.path.exists(dirname):
os.ma... | [
"redondojose@uniovi.es"
] | redondojose@uniovi.es |
3d93ab4b8aa0b181a49a1187c4294ece82068360 | 6e69f2b3bbbdc559fcfff3b21d5c72d6f8be9297 | /dolo/tests/test_model_import.py | 032e8d328ab31d897d99277e346aa38e64835c49 | [
"BSD-2-Clause"
] | permissive | compumetrika/dolo | 8e0a3cd0a5557c444f36b6f9f7751241baf49879 | eabc232ffc3d15937639276f2ffbaaec6a522dec | refs/heads/master | 2020-12-28T23:05:05.360177 | 2014-10-29T16:09:26 | 2014-10-29T16:09:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,870 | py | import unittest
import numpy
from dolo import yaml_import
def test_web_import():
model = yaml_import("https://raw.githubusercontent.com/EconForge/dolo/master/examples/models/rbc.yaml")
assert(len(model.symbols['states'])==2)
def model_evaluation(compiler='numpy', data_layout='columns'):
#model = yaml_... | [
"pablo.winant@gmail.com"
] | pablo.winant@gmail.com |
f8572068431e4fb492804c42745205932066ecf6 | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_5634697451274240_0/Python/LiranR/pancakes.py | d52201d60d69a84e45131570da46bcaec7c332cc | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | Python | false | false | 167 | py | T = int(raw_input())
for w in xrange(1,T+1):
S = raw_input() + "+"
ans = sum([S[i-1] != S[i] for i in xrange(1,len(S))])
print "Case #%d: %d"%(w,ans)
| [
"alexandra1.back@gmail.com"
] | alexandra1.back@gmail.com |
c3afb220ec9fbf1ff6b0d1cd5fa69fbf6d1990d4 | bd37e10ba5aa2e241c82c0f707e832e2d2c98448 | /delivery_app/coupons/views.py | 2a062b64c0b5da79d62e0dd1fe0b402b451bb24a | [] | no_license | DmitriyBul/DimkaDeliveryApp | 9d88aaf733fee5345fe1ff0ca4a83242b3ca73c4 | 22fe0229bbd17e978bdc279751e41c98584a0e44 | refs/heads/main | 2023-08-23T16:34:42.470321 | 2021-11-05T07:06:40 | 2021-11-05T07:06:40 | 402,777,939 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 855 | py | from django.shortcuts import render
# Create your views here.
from django.shortcuts import render, redirect
from django.utils import timezone
from django.views.decorators.http import require_POST
from .models import Coupon
from .forms import CouponApplyForm
@require_POST
def coupon_apply(request):
now = timezone... | [
"128dmitriy128@gmail.com"
] | 128dmitriy128@gmail.com |
283fdc87bf1002aaa79adb4c5814d8ebb1806045 | fafb89a3552e4dbb47d134966462ef5f3f37f576 | /2nd_order-Yee/PyCUDA/101-block1d-grid1d-smem-register.py | 34d08f7b1ae5857296154bec98c86b30e96e3398 | [] | no_license | EMinsight/fdtd_accelerate | 78fa1546df5264550d12fba3cf964838b560711d | a566c60753932eeb646c4a3dea7ed25c7b059256 | refs/heads/master | 2021-12-14T03:26:52.070069 | 2012-07-25T08:25:21 | 2012-07-25T08:25:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,194 | py | #!/usr/bin/env python
import numpy as np
import pycuda.driver as cuda
import pycuda.autoinit
MAX_GRID = 65535
kernels = """
__global__ void update_e(int nx, int ny, int nz, float *ex, float *ey, float *ez, float *hx, float *hy, float *hz, float *cex, float *cey, float *cez) {
int tx = threadIdx.x;
int idx = blockI... | [
"kh.kim@kiaps.org"
] | kh.kim@kiaps.org |
2a9e8851128546350c7abee83e1bc9fbf7a24bf8 | f640dc2a1925123878bcd92b11135a8773711710 | /Python学习/窗口界面开发/爬虫day01/CSDN爬虫/V0.0.1-csdn博客爬取.py | 780873a6a1584ccb53836dabf3834d4e0822da5c | [
"Apache-2.0"
] | permissive | gengzi/PycharmProject | 62c4a9c801947077bab7b1115c4f3d8953389e7c | 2e2c66e9e403fe2d2043a13a4780914dae8fe823 | refs/heads/master | 2022-04-24T03:11:22.244970 | 2020-04-24T01:15:33 | 2020-04-24T01:15:33 | 122,830,287 | 3 | 0 | null | 2020-04-24T01:13:43 | 2018-02-25T11:33:48 | Python | UTF-8 | Python | false | false | 3,092 | py | #!/usr/bin/env python2
# -*- coding:utf-8 -*-
# Hello world - 西蒙.科泽斯 这是“向编程之神所称颂的传统咒语,愿他帮助并保佑你更好的学习这门语言
import re
import urllib
import urllib2
"""
目的:使用正则表达式对csdn爬取博客数据
版本1 :最终效果:
(0)模拟登陆csdn网站
(1)自动爬取用户所关注的csdn用户
(2)自动爬取关注用户的所有文章页面,并对每一篇文章的必要数据解析
... | [
"1164014750@qq.com"
] | 1164014750@qq.com |
ba99306484b72de71d87d864c33a269c40184eee | fb7ecd90d8e32b52c4aad0d1e3b4e678330fec57 | /.c9/metadata/environment/basket/models.py | 02497f9b24f14f833d85eac75852714495d0b414 | [] | no_license | dennyshow/milestone-project4 | 0bd49eec64efebd3003bb9aa1a6c33a08904279c | bf0725cc846110b3f1f2d5a9d89c9506ce26f66d | refs/heads/master | 2022-12-09T22:33:41.179691 | 2020-01-24T06:32:50 | 2020-01-24T06:32:50 | 224,240,712 | 0 | 1 | null | 2022-12-08T03:24:55 | 2019-11-26T16:45:40 | Python | UTF-8 | Python | false | false | 420 | py | {"filter":false,"title":"models.py","tooltip":"/basket/models.py","undoManager":{"mark":-1,"position":-1,"stack":[]},"ace":{"folds":[],"scrolltop":0,"scrollleft":0,"selection":{"start":{"row":0,"column":0},"end":{"row":0,"column":0},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":tr... | [
"ec2-user@ip-172-31-47-222.ec2.internal"
] | ec2-user@ip-172-31-47-222.ec2.internal |
acc5002760a39b2af4bef188ba482854e4181a74 | e82b761f53d6a3ae023ee65a219eea38e66946a0 | /All_In_One/addons/XNALaraMesh/write_ascii_xps.py | 7e32c78673d9ac2faaf5933f2b020aabb037f152 | [] | no_license | 2434325680/Learnbgame | f3a050c28df588cbb3b14e1067a58221252e2e40 | 7b796d30dfd22b7706a93e4419ed913d18d29a44 | refs/heads/master | 2023-08-22T23:59:55.711050 | 2021-10-17T07:26:07 | 2021-10-17T07:26:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,579 | py | # -*- coding: utf-8 -*-
# <pep8 compliant>
import io
import operator
import os
from . import ascii_ops
from . import mock_xps_data
from . import read_ascii_xps
from . import read_bin_xps
from . import xps_const
from . import xps_types
import bpy
from mathutils import Vector
def writeBones(bones):
bonesString = ... | [
"root@localhost.localdomain"
] | root@localhost.localdomain |
dd8fdd54b11276228668cccfd945243340d67dba | ac216a2cc36f91625e440247986ead2cd8cce350 | /appengine/findit/common/constants.py | 5dbce09cdf5f5d6e9720f0c7b8b33695cce71b99 | [
"BSD-3-Clause"
] | permissive | xinghun61/infra | b77cdc566d9a63c5d97f9e30e8d589982b1678ab | b5d4783f99461438ca9e6a477535617fadab6ba3 | refs/heads/master | 2023-01-12T21:36:49.360274 | 2019-10-01T18:09:22 | 2019-10-01T18:09:22 | 212,168,656 | 2 | 1 | BSD-3-Clause | 2023-01-07T10:18:03 | 2019-10-01T18:22:44 | Python | UTF-8 | Python | false | false | 3,225 | py | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Includes all the constants of module names, queue names, url paths, etc."""
import os
import re
# OAuth2 client_id of the "API Explorer" web app.
API_EXP... | [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
f97760ca1bf4c07bff0404d75870085147e3fac8 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/59/usersdata/171/61734/submittedfiles/testes.py | a341b35cef7824be8d50453d8b9dd564d6e0356a | [] | 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 | 143 | py | # -*- coding: utf-8 -*-
import math
#COMECE AQUI ABAIXO
def media(a):
if a>0:
return(a)
n=int(input('digite n':))
print(media(a))
| [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
04318f2ed6e372d3b4f7df0dd70b0c0936b57f71 | f1d2a86b7dd93f4ddafa8961780775a28e7b4508 | /GeneralPractice/TopologicalSort_Method1.py | 36addad7c26f7a5c16adc5ee9609ac14416dc41f | [] | no_license | deepika087/CompetitiveProgramming | 76f8c1451fce1a8e3c94656f81a5b04363987dc6 | d40c24736a6fee43b56aa1c80150c5f14be4ff22 | refs/heads/master | 2021-06-12T02:26:22.374506 | 2021-02-20T19:27:57 | 2021-02-20T19:27:57 | 70,208,474 | 10 | 6 | null | null | null | null | UTF-8 | Python | false | false | 985 | py | __author__ = 'deepika'
#This method usses Topological sort
# This approach asusmes it is Directed acyclic graph
# as done by https://github.com/mission-peace/interview/blob/master/src/com/interview/graph/TopologicalSort.java
def sortProcess(process):
result = [] #Act like stack
visited = set()
for vertic... | [
"deepika_087@yahoo.com"
] | deepika_087@yahoo.com |
3a9df567dbd6e5969a903d1b203ca696a011a695 | 96237c354775cf9c1e54b52e7501f14bbe47db44 | /scripts/combine-oflc-data.py | 300aea2008c2796f19a344a60192568f72a436d7 | [] | no_license | BuzzFeedNews/H-2-certification-data | c2eef67651000ee540591563d5368431eb9e9586 | bd2f1dc922ad6927e90b9fbb82ca001965a7dce0 | refs/heads/master | 2022-12-25T05:34:34.858773 | 2022-05-19T16:22:48 | 2022-05-19T16:22:48 | 45,624,801 | 13 | 7 | null | 2022-07-06T21:32:43 | 2015-11-05T16:42:03 | Python | UTF-8 | Python | false | false | 6,681 | py | #!/usr/bin/env python
import pandas as pd
import namestand
import us
import glob
import sys, os
import itertools
import re
import six
flatten = lambda x: list(itertools.chain.from_iterable(x))
t = namestand.translator
standardizer = namestand.combine([
namestand.downscore,
t(re.compile(r"address(\d)"), r"addre... | [
"jsvine@gmail.com"
] | jsvine@gmail.com |
f03dbd7d9753ab4f73da86d30a04f7ec8d81afc4 | 1d0c89ecaa7598e5cb6a26a20a1bdd5f51d60123 | /apps/compra/models.py | f21f2a2b26e9244025f9a97b38301dc4ce3984f0 | [] | no_license | chrisstianandres/american_audio | a1fee70e798a151fcbfd492ed75878a8524c783b | ee31f01af4212cc2484188003900648064811fcb | refs/heads/master | 2023-02-01T02:36:59.824789 | 2020-12-09T23:17:45 | 2020-12-09T23:17:45 | 307,203,032 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,246 | py | from datetime import datetime
from django.db import models
from django.forms import model_to_dict
from apps.empleado.models import Empleado
from apps.producto.models import Producto
from apps.presentacion.models import Presentacion
from apps.proveedor.models import Proveedor
estado = (
(0, 'DEVUELTA'),
(1, 'F... | [
"Chrisstianandres@gmail.com"
] | Chrisstianandres@gmail.com |
3dbfc9c3c4c8b0b6bece13fa6cbcf6ed63e2b3ee | 6976df580fc9970d7ea725e442460cda516669ab | /archeage_packages/archeage_packages/asgi.py | c61035d973a7d732e0acf8c36c264ac6f4fb4a70 | [] | no_license | Ksieciu/django-for-shiro | 93c9273bc91f7e1aee3979a1c046f5e0855f9bec | 581715750683cdf82654589996cf2ba817d3e5fc | refs/heads/main | 2023-01-09T04:11:41.731905 | 2020-11-10T23:54:05 | 2020-11-10T23:54:05 | 312,014,562 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 411 | py | """
ASGI config for archeage_packages project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJ... | [
"30780278+Ksieciu@users.noreply.github.com"
] | 30780278+Ksieciu@users.noreply.github.com |
6cf71a2a911ec53a8ef7c615c05642542f75efe3 | 1c6065b9f9e6468f059260f21f9b5c89c416b6c1 | /backend/manage.py | 7d47f11244e8ab7fe2281fc87ecc054e17d3c407 | [] | no_license | crowdbotics-apps/checking-sharemodul-14196 | 150d99445493740fc45d32efc69de127035c6280 | cfddf9a19a78451ae86c55b8204673dbfb870f2e | refs/heads/master | 2023-01-06T02:33:56.814688 | 2020-10-29T08:52:55 | 2020-10-29T08:52:55 | 308,248,791 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 645 | 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', 'checking_sharemodul_14196.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
4b677287e7310404928570e30130c86320d49fc0 | 59de7788673ade984b9c9fbc33664a7cbdba67d3 | /res/scripts/client/messenger/proto/bw_chat2/search_processor.py | 65783704c8b92516855cbde21df3a4adeb4c08c1 | [] | no_license | webiumsk/WOT-0.9.15-CT | 3fa24ab37a6c91b7073034afb2f355efa5b7fe36 | fbd194fbaa6bdece51c7a68fc35bbb5257948341 | refs/heads/master | 2020-12-24T21:27:23.175774 | 2016-05-01T13:47:44 | 2016-05-01T13:47:44 | 57,600,180 | 0 | 0 | null | null | null | null | WINDOWS-1250 | Python | false | false | 2,408 | py | # 2016.05.01 15:25:06 Střední Evropa (letní čas)
# Embedded file name: scripts/client/messenger/proto/bw_chat2/search_processor.py
from debug_utils import LOG_WARNING
from messenger.m_constants import PROTO_TYPE
from messenger.proto import proto_getter
from messenger.proto.events import g_messengerEvents
from messenger... | [
"info@webium.sk"
] | info@webium.sk |
431c40192e68966f6cc88752b5a46be65e4add61 | 724f0c3ed438e20b48f04952f8316e3779b95120 | /hw/hw_06/log_config/server_log_config.py | 31035811a8aabd78dbdbb9183d5914eec7687e20 | [] | no_license | SKO7OPENDRA/python_messanger | d1572c8dd8ae8e4752b4a86cc342637e7f4b9d3e | af341c4ee1447a628ae93de7bcb3452a6e8520d3 | refs/heads/master | 2021-05-19T11:55:20.693807 | 2020-03-31T18:51:15 | 2020-03-31T18:51:15 | 251,680,118 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 596 | py | import logging
import sys
import os
from logging.handlers import TimedRotatingFileHandler
sys.path.append('../')
SERVER_LOGGER = logging.getLogger('server')
formatter = logging.Formatter(
"%(asctime)s %(levelname)s %(module)s %(message)s ")
PATH = os.path.dirname(os.path.abspath(__file__))
PATH = os.path.join(PA... | [
"58439768+SKO7OPENDRA@users.noreply.github.com"
] | 58439768+SKO7OPENDRA@users.noreply.github.com |
46fa7a83657149d4b97f999d88ebe07aa6150d12 | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-4/6a880b78a2305ea71f211b741f16873b41538c1f-<main>-fix.py | b881b8815a1bf39ef737cc4b65695f67d2e98f47 | [] | no_license | wsgan001/PyFPattern | e0fe06341cc5d51b3ad0fe29b84098d140ed54d1 | cc347e32745f99c0cd95e79a18ddacc4574d7faa | refs/heads/main | 2023-08-25T23:48:26.112133 | 2021-10-23T14:11:22 | 2021-10-23T14:11:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,326 | py | def main():
argument_spec = ovirt_full_argument_spec(state=dict(choices=['present', 'absent'], default='present'), data_center=dict(required=True), id=dict(default=None), name=dict(required=True), description=dict(default=None), comment=dict(default=None), external_provider=dict(default=None), vlan_tag=dict(default... | [
"dg1732004@smail.nju.edu.cn"
] | dg1732004@smail.nju.edu.cn |
6110c5ad3475b11e2c8b245b32c87ccbeed8f6f4 | d73844728e49155fbfee3157fd19a615eea93cf3 | /Ayush_stuff/Priya_practice_01.py | 4f00fa11ac652d871cf2489dd09aee77f45528e9 | [] | no_license | thorenscientific/py | 962c98a44d36e54661416f79c6149de59f9e2674 | 05dc170f7d488d403d40c01316717e7c151fc350 | refs/heads/master | 2021-01-11T12:30:03.699074 | 2017-11-24T01:22:09 | 2017-11-24T01:22:09 | 79,374,946 | 1 | 1 | null | 2020-07-23T21:52:18 | 2017-01-18T19:17:29 | Python | UTF-8 | Python | false | false | 520 | py | # -*- coding: utf-8 -*-
"""
Created on Sun Oct 01 19:08:31 2017
@author: Priya
"""
print("priya's while loop")
year = 2005
while year < 2017:
print(year)
year = year + 1
print("Priya's for loop")
groceryList = ["milk", "bread", "eggs", "coffee"]
for item in groceryList:
print(item)
... | [
"thorenscientific@gmail.com"
] | thorenscientific@gmail.com |
2c93bb48352a1b6a6df2c637a68de53df949aaad | 3a751dd11ad893d4222cc52148d0829de9f4029f | /django/django_extras/mini_register/register_login_app/models.py | 344d665a338c728fb789f923b786b9fed611299f | [] | no_license | higashizono33/python_stack | 76b5fc63a63913e309a545b7f586a99c684fa0d2 | 5ec93e384e911b9d05de54af232d464928b76e7e | refs/heads/master | 2023-04-18T23:18:21.569125 | 2021-04-26T02:40:55 | 2021-04-26T02:40:55 | 339,864,117 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 705 | py | from django.core.exceptions import ValidationError
from django.db import models
# Create your models here.
# our validator
def validateLengthGreaterThanTwo(value):
if len(value) < 3:
raise ValidationError(
'{} must be longer than 2 letters'.format(value)
)
class User(models.Model):
... | [
"takashizono@gmail.com"
] | takashizono@gmail.com |
2251ac8d84a4d828ff70c410f272fd4675deab29 | 922b67efc75a8f923c411d4444603552286efcd6 | /TIY8-3.py | 9402884885a4c2f6f68f50b8f3cdbecaa726ef16 | [] | no_license | EthanPassinoFWCS/Chapter8Anthis | a7e879283be108802811129ac711dc8fbd13ff3f | e6b0176ef9fd2884134286c4500ac5fcc6c8e9bf | refs/heads/master | 2022-12-26T08:15:38.938982 | 2020-09-14T18:03:25 | 2020-09-14T18:03:25 | 295,477,040 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 178 | py | def make_shirt(size, text):
print(f"Shirt will have the text {text} and is the size of {size}.")
make_shirt(10, "Python Coding")
make_shirt(size=12, text="Python Coding")
| [
"ethan.passino@fwcsstudents.org"
] | ethan.passino@fwcsstudents.org |
bfe2299a2fa1551213650329d712e5ada826948d | 921d71dcc3d07f5fafa83a70c975bf26527fc64a | /kaldi/steps/libs/common.py | ff33ff70715191b66981c0d4e93cc5f3c1d872e5 | [
"Apache-2.0"
] | permissive | songfuture/asv-subtools | 4e5e27a2a5d9d9dfd203a9d8eac9bc6f4c4b373d | 14ca80a220edcbb45072f7a4372900f3e37774d4 | refs/heads/master | 2023-07-21T12:14:48.312865 | 2021-09-02T10:14:13 | 2021-09-02T10:14:13 | 336,680,823 | 2 | 0 | Apache-2.0 | 2021-09-02T10:16:11 | 2021-02-07T02:13:45 | Python | UTF-8 | Python | false | false | 17,037 | py |
# Copyright 2016 Vijayaditya Peddinti.
# 2016 Vimal Manohar
# 2017 Johns Hopkins University (author: Daniel Povey)
# Apache 2.0
""" This module contains several utility functions and classes that are
commonly used in many kaldi python scripts.
"""
from __future__ import print_function
from __fut... | [
"snowdar@stu.xmu.edu.cn"
] | snowdar@stu.xmu.edu.cn |
1b87ff8bb17f4d6863dbc7deba9b66f9766479cc | 05938c3d5fadd69f1fa8ff9b4a940ddc8590846c | /code/flask/ch11-logging-activity/pypi_flask_ch11/pypi_org/viewmodels/admin/editpage_viewmodel.py | 056921807290ea6a0ae5ff59e3555cde9b9fd31d | [] | no_license | hellroft9711/adding-a-cms-to-your-web-app-course | 8ed9c545aa094d47784a162e92ad8d543a6e1709 | c80e6339ba752b860495ef0170bb2937bb5154ad | refs/heads/master | 2022-12-28T23:41:59.453311 | 2020-10-15T06:18:23 | 2020-10-15T06:18:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,557 | py | from pypi_org.services import cms_service
from pypi_org.viewmodels.shared.viewmodelbase import ViewModelBase
class EditPageViewModel(ViewModelBase):
def __init__(self, page_id: int = 0):
super().__init__()
self.page_id = page_id
self.page = None
self.is_shared = False
self... | [
"mikeckennedy@gmail.com"
] | mikeckennedy@gmail.com |
176e1f6208c048f89e4a32ed1b9fbeb86ee776fc | 538fde0022ac6dddaa5cda3aef541c820039108d | /Lecture6/Pr6.10.py | 4514c665ed158684d5139d8d928f7319dae32d90 | [] | no_license | P4SSER8Y/MITx-6.00.1x | db2ef41a27dd53cb4b16d6ce787a056b05f60e51 | 10cdb474ee13d0b4e71d88fac1471d6db0527d7d | refs/heads/master | 2021-05-29T18:53:06.892800 | 2015-10-09T15:59:17 | 2015-10-09T15:59:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 430 | py | def howMany(aDict):
'''
aDict: A dictionary, where all the values are lists.
returns: int, how many values are in the dictionary.
'''
# Your Code Here
result = 0
for t in aDict.values():
result += len(t)
return result
animals = { 'a': ['aardvark'], 'b': ['baboon'], 'c': ['coati... | [
"beobachter70@163.com"
] | beobachter70@163.com |
ab780c0d83bccd542799c642c411f9ba11c28cd5 | 1cfa92c882c5f655454916ff95919d9843f8942b | /library/pippy/game.py | a31e58a15aff365fb3666426ff28ac47b6c8c642 | [] | no_license | sugar-activities/4256-activity | 915789d11c2cb2bdce13d28826e9259a13a0bcc8 | db7b27bda49fedb3307d444a4cd39aa984084ea2 | refs/heads/master | 2021-01-19T23:14:17.532092 | 2017-04-21T05:12:18 | 2017-04-21T05:12:18 | 88,938,009 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,578 | py | """pygame support for pippy."""
# Copyright (C) 2007-8 One Laptop Per Child Association, Inc.
# Licensed under the terms of the GNU GPL v2 or later; see
# /usr/share/licenses/common-licenses/GPLv2+ for details.
# Written by C. Scott Ananian <cscott@laptop.org>
def pause():
"""Display a "Paused" screen and suspend.... | [
"ignacio@sugarlabs.org"
] | ignacio@sugarlabs.org |
b47a621c1dc24eef21c89e89f2d5e7409325241d | 38d1e0b40d9cc54e4aa272ae5c2872fca378002a | /python_stack/django/django_full_stack/python_project/matchmaking_app/models.py | 9794e42602379703738fdea8d1eff6406c24855d | [] | no_license | taichikoga/Dojo_Assignments | 0a8974a6fcb3ce83973fd481803f1bb7126ca3ba | 4c7e82bd652286d281ce86fe9c14491182c3ecde | refs/heads/master | 2022-11-22T23:19:02.431639 | 2020-07-20T17:53:37 | 2020-07-20T17:53:37 | 274,190,553 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,898 | py | from django.db import models
from user_app.models import User
# Create your models here.
class LobbyManager(models.Manager):
def lobby_validator(self, post_data):
errors = {}
if len(post_data['title']) == 0:
errors['no_title'] = "The lobby name cannot be blank."
if len(post_da... | [
"63776416+taichikoga@users.noreply.github.com"
] | 63776416+taichikoga@users.noreply.github.com |
7080ecd33499952594cbe115fd1444bd2ef3cdcc | 6527b66fd08d9e7f833973adf421faccd8b765f5 | /yuancloud/recicler/website/payment_sips/__yuancloud__.py | 89f0d1ac0074b23b9edfe543324237d8d58301a4 | [] | no_license | cash2one/yuancloud | 9a41933514e57167afb70cb5daba7f352673fb4d | 5a4fd72991c846d5cb7c5082f6bdfef5b2bca572 | refs/heads/master | 2021-06-19T22:11:08.260079 | 2017-06-29T06:26:15 | 2017-06-29T06:26:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,336 | py | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright Eezee-It
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, eith... | [
"liuganghao@lztogether.com"
] | liuganghao@lztogether.com |
de74647547727a3e2802a56e07990f5a8a140714 | 73afed0a2a5993e15b8813702af07d941f094823 | /817.py | 12c84fd248bf0fcc1bb8340fdd558a0a5d0eb261 | [] | no_license | Pennylele/Algorithms-fun-daily | 6d83196354aa22bb7dc0423f2c82f802ef4dad8d | ce8d4a366244d335f97a5d045d101810a1c6920e | refs/heads/master | 2023-05-28T08:29:53.390530 | 2021-06-08T17:14:41 | 2021-06-08T17:14:41 | 363,510,125 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 297 | py | class Solution:
def numComponents(self, head, nums):
set_nums = set(nums)
ans = 0
while head:
if head.val in set_nums and (head.next == None or head.next.val not in set_nums):
ans += 1
head = head.next
return ans | [
"fangle0121@gmail.com"
] | fangle0121@gmail.com |
5cac5e8d48e957d723f50768c2ea893d9d1b41db | 911d644fc8aba5c026ab51fa2ffb33698f7618a7 | /droidlet/perception/robot/detectron/detector/properties_head.py | 65cc5f48af91f165e1741ea6267e10541e1a5632 | [
"MIT"
] | permissive | adamlerer/droidlet | 3df03e89f0a3d6236152d96fa68c4e89a7d8701f | ada38d191dadcea9aba12330e35e8e7d6d1663d9 | refs/heads/main | 2023-05-15T07:38:22.731918 | 2021-06-09T07:09:28 | 2021-06-09T07:09:28 | 375,388,047 | 0 | 0 | MIT | 2021-06-09T14:40:15 | 2021-06-09T14:40:14 | null | UTF-8 | Python | false | false | 4,738 | py | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import logging
from typing import List
import torch
import numpy as np
import fvcore.nn.weight_init as weight_init
from torch import nn
from torch.nn import functional as F
from detectron2.layers import Conv2d, Linear, ShapeSpec, cat, get_norm
from... | [
"yuxuans@fb.com"
] | yuxuans@fb.com |
363311b7302fc4413181af5d5d00a274b00c3222 | 5f5ce7dda4b28c3897359c7ea08ec985889265e5 | /classical-ml-algorithm-implementation/supervised/py-decision-tree/deprecated/py-identification-tree/branchDisorderCalculus.py | e907b34e04746da66c0552bf6b9757578526df21 | [] | no_license | FelSiq/machine-learning-learning | 1d8a4ed497331c79f248e4b10e2a74ccea8922dc | 6cfed782f48da8259cdeb00ca413982afe8cc86d | refs/heads/master | 2021-11-21T06:46:44.939256 | 2021-11-07T21:09:20 | 2021-11-07T21:09:20 | 97,542,279 | 4 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,341 | py | import numpy as np
import math
def subsetEntropy(subset, base=2):
classes, absFreqs = np.unique(subset, return_counts=True)
probs = absFreqs / len(subset)
return -sum(
[(probs[i] * math.log(probs[i], base) if 0.0 < probs[i] < 1.0 else 0.0)
for i in range(len(probs))])
def setEntropy(ins... | [
"felipe.siqueira@usp.br"
] | felipe.siqueira@usp.br |
9fc0b3b1a85f34ecb856822e11cb3ada34bef459 | cfa4c756333d2a321b1a85126c74f9728649281c | /src/cogent3/maths/stats/kendall.py | 944c20600e299dbddc955234395eb256dfc7cdbc | [
"BSD-3-Clause"
] | permissive | genomematt/cogent3 | f86d8d0f906387064ebd588ef7194a91c3faa5a8 | d4b561c6ad06a44f82a79940e7699b3ffce71442 | refs/heads/develop | 2023-01-30T10:12:38.233989 | 2022-01-23T08:20:47 | 2022-01-23T08:20:47 | 240,843,994 | 0 | 0 | BSD-3-Clause | 2023-01-23T19:02:17 | 2020-02-16T06:33:35 | Python | UTF-8 | Python | false | false | 3,719 | py | """
Computes kendalls tau statistic and associated probabilities. A wrapper
function is provided in cogent3.maths.stats.kendall_correlation
Translated from R 2.5 by Gavin Huttley
"""
from numpy import array, floor, sqrt
from cogent3.maths.stats.distribution import zprob
from cogent3.maths.stats.number import Catego... | [
"Gavin.Huttley@anu.edu.au"
] | Gavin.Huttley@anu.edu.au |
81d590e7e42ef28d25bb603571370db2b3eee464 | b1962b701230e8fe3235676b6a9a659b1ad921ef | /app/client/forms.py | ec9deba05127fe1dd1cd5137777a969f1b9617e0 | [] | no_license | volgoweb/wt | 8e08dc0ff83ac120992bd81c209a420b207df966 | 3a88b8d7d6e1f925b363bfecb94008e14d15943f | refs/heads/master | 2021-01-23T09:29:42.209757 | 2016-02-05T21:24:10 | 2016-02-05T21:24:10 | 42,570,795 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 933 | py | # -*- coding: utf-8 -*-
from django import forms
from helper.forms import BootstrapFormMixin
from .models import Client
class ClientsListFilters(BootstrapFormMixin, forms.Form):
needle = forms.CharField(
required=False,
widget=forms.TextInput(attrs={
'placeholder': 'Найти по словам в ... | [
"volgoweb@bk.ru"
] | volgoweb@bk.ru |
ec9f79146afece701b6e1266c2775b68175cea9a | 1126705b1be73c8b0e80fc955135c81e6ba30080 | /emission/net/usercache/formatters/android/location.py | b459f63008787a151f7015a9ca21bdb3b20d8f5e | [
"BSD-3-Clause"
] | permissive | asiripanich/e-mission-server | 40cede3fd81d726a43c3ccb08ecad0ed2fafab21 | 00e7c4edfa2617800b1b512f5d37c11dd62f0660 | refs/heads/master | 2023-07-07T18:41:15.988655 | 2022-11-10T02:51:32 | 2022-11-10T02:51:32 | 549,350,112 | 0 | 0 | BSD-3-Clause | 2023-06-27T23:43:16 | 2022-10-11T03:46:37 | Jupyter Notebook | UTF-8 | Python | false | false | 1,576 | py | from __future__ import division
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from builtins import *
from past.utils import old_div
import logging
# It is not clear if we need to... | [
"shankari@eecs.berkeley.edu"
] | shankari@eecs.berkeley.edu |
e33d7268c006614937a9ff01c708a5df50966513 | 9b9a02657812ea0cb47db0ae411196f0e81c5152 | /repoData/tsileo-bakthat/allPythonContent.py | ca153e1d13c58e0ba3ca324bf24fc323d1b5e9e7 | [] | no_license | aCoffeeYin/pyreco | cb42db94a3a5fc134356c9a2a738a063d0898572 | 0ac6653219c2701c13c508c5c4fc9bc3437eea06 | refs/heads/master | 2020-12-14T14:10:05.763693 | 2016-06-27T05:15:15 | 2016-06-27T05:15:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 71,810 | py | __FILENAME__ = backends
# -*- encoding: utf-8 -*-
import tempfile
import os
import logging
import shelve
import json
import socket
import httplib
import boto
from boto.s3.key import Key
import math
from boto.glacier.exceptions import UnexpectedHTTPResponseError
from boto.exception import S3ResponseError
... | [
"dyangUCI@github.com"
] | dyangUCI@github.com |
a3dd69ee58772d489bde477099bd670f8e1f08fe | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /vBEm4jimnvxaFhdgs_11.py | 2412beea37c789a406d5b2a887fc6b2a76353d7d | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 128 | py |
years_in_one_house = lambda age, moves: age // (moves + 1) if age % (moves + 1) == 0 or age == 31 else age // (moves + 1) + 1
| [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
e8cc5330cf083d78fb5b551800ecb1fb67b7b440 | b4da2201d2df789e28472aeded28720d5269ade5 | /Komodo-Edit-7/lib/mozilla/python/xpcom/server/policy.py | d066eb40c64d3cb6fb939efb1e0ccdf14c2bea20 | [] | no_license | AeonSaber/first_app | 5ad89d4fb05d7662e2a39ce68176f43f1e618bf0 | 522fdfa6d33419fd49e431766fff85b40d21e78e | refs/heads/master | 2020-06-12T17:22:09.786142 | 2013-09-09T23:57:51 | 2013-09-09T23:57:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 19,979 | py | # ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (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.mozilla.org/MPL/
#
# Softwa... | [
"jpsutton@madisoncollege.edu"
] | jpsutton@madisoncollege.edu |
8932b31f08873f41d6369cce38a1b82edde90f9f | 7bd5ca970fbbe4a3ed0c7dadcf43ba8681a737f3 | /yukicoder/300-399/306.py | ea7f6d128bdd432ad58c5e76213dac385b5235c9 | [] | no_license | roiti46/Contest | c0c35478cd80f675965d10b1a371e44084f9b6ee | c4b850d76796c5388d2e0d2234f90dc8acfaadfa | refs/heads/master | 2021-01-17T13:23:30.551754 | 2017-12-10T13:06:42 | 2017-12-10T13:06:42 | 27,001,893 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 258 | py | # -*- coding: utf-8 -*-
import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll
xa, ya = map(float, raw_input().split())
xb, yb = map(float, raw_input().split())
xb *= -1
y = (ya - yb)/(xa - xb) * (0 - xa) + ya
print "%.10f" % y
| [
"roiti46@gmail.com"
] | roiti46@gmail.com |
ded2b484c15fb27590e08f30eb041f8c84226431 | cc578cec7c485e2c1060fd075ccc08eb18124345 | /cs15211/PushDominoes.py | 802b3538644ba17b3ce82a76ec7e8ba6f8c973f0 | [
"Apache-2.0"
] | permissive | JulyKikuAkita/PythonPrac | 18e36bfad934a6112f727b4906a5e4b784182354 | 0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c | refs/heads/master | 2021-01-21T16:49:01.482561 | 2019-02-07T06:15:29 | 2019-02-07T06:15:29 | 91,907,704 | 1 | 1 | Apache-2.0 | 2019-02-07T06:15:30 | 2017-05-20T18:12:53 | Python | UTF-8 | Python | false | false | 5,507 | py | __source__ = 'https://leetcode.com/problems/push-dominoes/'
# Time: O(N)
# Space: O(N)
#
# Description: Leetcode # 838. Push Dominoes
#
# There are N dominoes in a line, and we place each domino vertically upright.
#
# In the beginning, we simultaneously push some of the dominoes either to the left or to the right.
#
... | [
"b92701105@gmail.com"
] | b92701105@gmail.com |
2f4e822cfa7fc07280ba4bdb88b374d54a1dc256 | a71d8a1d000f6443fd62708a026db2bd918f29aa | /_pramp/200308/time_planner_mine.py | 01f08fcb44d5fcb02f2dcaa3e8bc2bafb4e12d18 | [] | no_license | scottwedge/algorithm | 68172e3cb6d65d7e6096ab2cf51b110f3e0a046d | 832c3e580e936b9e9cbd0c492d5b80eeac455c34 | refs/heads/master | 2022-12-03T10:33:53.713400 | 2020-08-09T14:09:10 | 2020-08-09T14:09:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,967 | py | """
Time Planner
Implement a function meetingPlanner that given the availability, slotsA and slotsB, of two people and a meeting duration dur,
returns the earliest time slot that works for both of them and is of duration dur. If there is no common time slot that satisfies the duration requirement,
return an empty array... | [
"myungwoo.ko@gmail.com"
] | myungwoo.ko@gmail.com |
e089d32bd82c53bef6f348df60646a0128bbca46 | 863bc319e092b5127037db0ead15e627e4b0ac72 | /Data/scigrid-de/pypower/scigrid_2011_01_08_17.py | 80e2e00a52ac3d9eb61ce347e0ba4b7d8e955cbf | [
"MIT"
] | permissive | thanever/SOC | ea349e61eebef7f31c610765cd5db1be14b60800 | 7dc33e9f4713d012f206385452987579f46b63eb | refs/heads/master | 2023-08-27T04:57:38.825111 | 2023-08-07T03:20:42 | 2023-08-07T03:20:42 | 212,486,054 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 400,630 | py | from numpy import array
def scigrid_2011_01_08_17():
ppc = {"version": '2'}
ppc["baseMVA"] = 100.0
ppc["bus"] = array([
[586, 3, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[589, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[590, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1,... | [
"hantong.eee@gmail.com"
] | hantong.eee@gmail.com |
aa2de0b6732f12389abb9105e25c94584b7d6400 | 0a2cc497665f2a14460577f129405f6e4f793791 | /sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/aio/operations/_disk_accesses_operations.py | fd2271f8fe69531646edede2ea900135197f9bfb | [
"MIT",
"LGPL-2.1-or-later",
"LicenseRef-scancode-generic-cla"
] | permissive | hivyas/azure-sdk-for-python | 112158aa9e1dd6e30cf6b3dde19f5db6ea2a577b | 8b3258fa45f5dc25236c22ad950e48aa4e1c181c | refs/heads/master | 2023-06-17T12:01:26.392186 | 2021-05-18T19:56:01 | 2021-05-18T19:56:01 | 313,761,277 | 1 | 1 | MIT | 2020-12-02T17:48:22 | 2020-11-17T22:42:00 | Python | UTF-8 | Python | false | false | 33,636 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | [
"noreply@github.com"
] | hivyas.noreply@github.com |
8aaae0d0e5abdb11090ec7658532ff232cbdfa8d | 347792b1a0870b88e6d975dea1cdb0cc0bb1c30b | /info_collector/management/commands/load_info.py | 61b1b14c3d081c8d3d7c471f9fb11329e7bf4172 | [] | no_license | MakeBugsEveryday/fruits_learning | e0df3d77cc97157d6809a33bcd519f7d62ef3f8a | fb3560b59328287b163965030a445f4aa82c7336 | refs/heads/master | 2020-04-14T08:44:18.553489 | 2018-09-02T08:30:24 | 2018-09-02T08:30:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,889 | py | """
This command load info from a json file produced by sync_info
"""
from __future__ import absolute_import
import os
from django.core.management.base import BaseCommand
from django.core import serializers
from django.conf import settings
from django.utils import timezone
from datetime import timedelta
from ...model... | [
"fruitschen@gmail.com"
] | fruitschen@gmail.com |
66a8a3b42e1487fb5231b4da4f4cee9956528e45 | ba694353a3cb1cfd02a6773b40f693386d0dba39 | /sdk/python/pulumi_google_native/dialogflow/v2beta1/get_intent.py | 74c95ed6ee19ad32933b063936c798a679581ca4 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | pulumi/pulumi-google-native | cc57af8bd3d1d6b76f1f48333ed1f1b31d56f92b | 124d255e5b7f5440d1ef63c9a71e4cc1d661cd10 | refs/heads/master | 2023-08-25T00:18:00.300230 | 2023-07-20T04:25:48 | 2023-07-20T04:25:48 | 323,680,373 | 69 | 16 | Apache-2.0 | 2023-09-13T00:28:04 | 2020-12-22T16:39:01 | Python | UTF-8 | Python | false | false | 18,452 | 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 copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _u... | [
"noreply@github.com"
] | pulumi.noreply@github.com |
ed6334cd993c64d8622b6ed9ec674611632bf090 | a46ccf3496712f85e92e15bac27b9f9df23436a4 | /notebooks/_solutions/90_package_numpy20.py | 314ffe3bd1543db441756d795761d25b72bd31d6 | [
"BSD-3-Clause"
] | permissive | jorisvandenbossche/DS-python-geospatial | a30ef43daa1d8cfd9d5652ab047bd828573bb493 | cd5d63057a335e0cb157faf12b945ec664da4c10 | refs/heads/main | 2022-11-24T09:55:06.552714 | 2022-11-20T22:15:50 | 2022-11-20T22:15:50 | 244,412,214 | 134 | 39 | BSD-3-Clause | 2023-09-14T17:10:54 | 2020-03-02T15:57:19 | Jupyter Notebook | UTF-8 | Python | false | false | 189 | py | # Assign the new values according to the classes
b4_data_classified[b4_data < 0.05] = 10
b4_data_classified[(0.05 <= b4_data) & (b4_data < 0.1)] = 20
b4_data_classified[0.1 <= b4_data] = 30 | [
"noreply@github.com"
] | jorisvandenbossche.noreply@github.com |
7c4e89f29a4f597b9a96bba25f75587ed64a5c46 | daee54824cb107f9b5749e3c12e7f09f544bac0e | /modules/filters/ICPTransform.py | aed4ac43f48c32a42df1f3549e5c42e480f2f7cd | [] | no_license | JoonVan/devide | 8fa556d2b42c5ad70c3595303253f2a171de0312 | 586225d68b079e2a96007bd33784113b3a19a538 | refs/heads/master | 2020-12-26T06:25:01.744966 | 2017-01-22T19:47:50 | 2017-01-22T19:47:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,099 | py | # Copyright (c) Charl P. Botha, TU Delft
# All rights reserved.
# See COPYRIGHT for details.
from module_base import ModuleBase
from module_mixins import ScriptedConfigModuleMixin
import module_utils
import vtk
class ICPTransform(ScriptedConfigModuleMixin, ModuleBase):
def __init__(self, module_manager):
... | [
"cpbotha@users.noreply.github.com"
] | cpbotha@users.noreply.github.com |
7c4f5dc27015cab044ad2d937f18c0efc89f1e60 | adef987d8985651c0e7063f4c61025027a459236 | /dist/Basilisk/simulation/coarse_sun_sensor/__init__.py | 2e373128cf089b3a34cb60bde81a79ebf997caaf | [
"ISC"
] | permissive | maxprofs-llcio/basilisk_mag | cab6202b10f8a29e7f57de79d2bb6190a05a2567 | a8b1e37c31c1287549d6fd4d71fcaa35b6fc3f14 | refs/heads/master | 2022-03-19T15:51:48.295046 | 2019-04-08T19:09:09 | 2019-04-08T19:09:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 136 | py | # This __init__.py file for the coarse_sun_sensor package is automatically generated by the build system
from coarse_sun_sensor import * | [
"ian.cooke@colorado.edu"
] | ian.cooke@colorado.edu |
669f35e2b5d1caafa0b18d4b8d19c348c798a800 | 17c380fe1fee2d6dd7a249c506a6b8827c3d0417 | /17/t17.py | c85a1e58f740f2eb5c35f08f7bc73f68a8cff619 | [] | no_license | LubosKolouch/adventofcode_2019 | b80f0603ee2a642c56def502b1575dde6e1f02b2 | 84d381f3ad416940de6c891ee095e1770f44c0bf | refs/heads/master | 2023-02-06T14:08:30.962125 | 2020-12-28T08:04:54 | 2020-12-28T08:04:54 | 225,130,832 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,692 | py | #! python3
import sys
from pprint import pprint
import numpy as np
from itertools import permutations
import csv
from collections import deque,defaultdict
import networkx as nx
# keep grid state in grid
# x,y for robot
# deque for steps taken
# look around, can find uknown field => try to move to it
# if oxygen found... | [
"lubos@kolouch.net"
] | lubos@kolouch.net |
d0edae97f3234f98ea514da1b69ccddf03d41cf2 | c37b599dc08153dd72436c69933243ce60048391 | /homeassistant/components/zha/core/group.py | 4fc86012d1afe716bcbec797dcb134d40b506620 | [
"Apache-2.0"
] | permissive | perara/home-assistant | 2abb44b88ae248e086c4d4e568d79a993152f1ab | dee557872bfbc759555bd73e006e46f9ecb16063 | refs/heads/dev | 2020-04-01T19:06:37.239471 | 2020-03-30T23:06:53 | 2020-03-30T23:06:53 | 153,535,277 | 2 | 1 | Apache-2.0 | 2018-10-18T23:30:09 | 2018-10-17T23:14:37 | Python | UTF-8 | Python | false | false | 4,339 | py | """Group for Zigbee Home Automation."""
import asyncio
import logging
from typing import Any, Dict, List
from zigpy.types.named import EUI64
from homeassistant.core import callback
from homeassistant.helpers.entity_registry import async_entries_for_device
from homeassistant.helpers.typing import HomeAssistantType
fr... | [
"noreply@github.com"
] | perara.noreply@github.com |
071d32d9a9a8ba1012ae4db1213484abe6b375b5 | ba1e90ae6ea9f8f74d9b542e159825341c717712 | /2015/cook6232.py | b4aa472148bcc52eb13144faa267af64c4dccb14 | [] | no_license | sailesh2/CompetitiveCode | b384687a7caa8980ab9b9c9deef2488b0bfe9cd9 | 5671dac08216f4ce75d5992e6af8208fa2324d12 | refs/heads/master | 2021-06-24T22:39:11.396049 | 2020-11-27T05:22:17 | 2020-11-27T05:22:17 | 161,877,355 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,726 | py | import math
t=input()
i=0
while i<t:
x=raw_input().split(' ')
a=int(x[0])
r=int(x[1])
val=math.log(a,2)
valu=math.log(r,2)
ctr=0
if val==int(val):
ctr=ctr+int(valu)-int(val)+1
else:
ctr=ctr+int(valu)-int(val)
#print ctr
#print ... | [
"sailesh.ku.upadhyaya@gmail.com"
] | sailesh.ku.upadhyaya@gmail.com |
02f1982f52977dba2f119174a1cc41267af901d1 | 955b968d46b4c436be55daf8aa1b8fc8fe402610 | /ch07/test_project/runtest.py | 691edc3494a2b355896bb7d736cabd8e750a041d | [] | no_license | han-huang/python_selenium | 1c8159fd1421b1f0e87cb0df20ae4fe82450f879 | 56f9f5e5687cf533c678a1c12e1ecaa4c50a7795 | refs/heads/master | 2020-03-09T02:24:48.882279 | 2018-04-07T15:06:18 | 2018-04-07T15:06:18 | 128,535,917 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,296 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import unittest
if __name__ == '__main__':
test_dir = './test_project/test_case'
# use the following command according to your position
# (C:\Users\Han\Anaconda3) C:\Users\Han\selenium_test\ch07>python test_project\runtest.py
# test_baidu
# .test_youda... | [
"vagrant@LaravelDemoSite"
] | vagrant@LaravelDemoSite |
a1514ec6cf256948f5a05abe38392dc1b3d6988b | 7889f7f0532db6a7f81e6f8630e399c90438b2b9 | /1.2.1/examples/old_animation/animate_decay_tk_blit.py | cae4c4a2b9738ef36bfa60dbb049891fc4748c57 | [] | 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 | 1,362 | py | from __future__ import print_function
import time, sys
import numpy as np
import matplotlib.pyplot as plt
def data_gen():
t = data_gen.t
data_gen.t += 0.05
return np.sin(2*np.pi*t) * np.exp(-t/10.)
data_gen.t = 0
fig = plt.figure()
ax = fig.add_subplot(111)
line, = ax.plot([], [], animated=True, lw=2)
ax... | [
"mdboom@gmail.com"
] | mdboom@gmail.com |
aa265207ea29c09f527c34c01a1bcab2fb2f2c29 | 79acd6922037d309857d95fb4a633788525a0535 | /traffic_ops/testing/api_contract/v4/test_cdn_notifications.py | ffbde0cfc67d3d2aa72b3b9a3600860b1e70b144 | [
"Apache-2.0",
"MPL-2.0",
"BSD-3-Clause",
"CC0-1.0",
"Artistic-2.0",
"CC-BY-SA-4.0",
"MIT",
"ISC",
"BSD-2-Clause",
"OFL-1.1",
"JSON",
"LicenseRef-scancode-unknown-license-reference",
"GPL-1.0-or-later",
"WTFPL",
"LGPL-2.0-or-later",
"X11"
] | permissive | apache/trafficcontrol | 86da3a526e5e0d533547969274cd30d74636d922 | e835435e47175f84a04234d15183ab7b61cc2825 | refs/heads/master | 2023-08-31T08:02:25.363164 | 2023-08-30T23:00:43 | 2023-08-30T23:00:43 | 67,198,520 | 811 | 438 | Apache-2.0 | 2023-09-14T18:12:55 | 2016-09-02T07:00:06 | Go | UTF-8 | Python | false | false | 3,421 | py | #
# 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
# distributed under ... | [
"noreply@github.com"
] | apache.noreply@github.com |
2858574beee37ead615d1ec149cde8c23c960521 | 83b242997a1560214285fd38ab4d39a0b1210ddc | /opencv/GridLayoutOpenCVImageView.py | d7ea3d0a5847c6a1f77ca525b5dc4b9262973cae | [] | no_license | ivartz/vid2fft | 0a25d853e178b43fd0a5f765934887963f5c37f9 | 1b6ec82de04f86819ab4c1056d4f9d9bde1ed9c8 | refs/heads/master | 2020-08-07T21:44:28.745553 | 2019-10-08T09:18:41 | 2019-10-08T09:18:41 | 213,594,969 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,051 | py | #/******************************************************************************
#
# Copyright (c) 2018 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free ... | [
"djloek@gmail.com"
] | djloek@gmail.com |
fa95bfcf77fa09a23c7924c3a286ce78947100cb | 3603f8f76ff81ea75bfc916888bdcfa55b7f12e4 | /alds/alds1_14_d.py | 975679140adc5dbd6eefa01c4723c51ecfa045a1 | [] | no_license | kimotot/aizu | 4de0319959a3b166b8c2c4940ab7b701b6ee3395 | 315be1240cff733e1c6a7cd98942a95b3bd7ec96 | refs/heads/master | 2021-07-24T12:37:41.935302 | 2021-03-10T09:05:05 | 2021-03-10T09:05:05 | 91,927,321 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,156 | py | BASE = 127
MASK = (1 << 32) - 1
BASE_D = {}
def calc_hash(t, tl, pl):
res = set()
tmp = 0
for i in range(pl):
tmp = (tmp * BASE + t[i]) & MASK
res.add(tmp)
if pl - 1 in BASE_D:
BASE_K = BASE_D[pl - 1]
else:
BASE_K = 1
for _ in range(pl - 1):
BASE_K ... | [
"god4bid@hear.to"
] | god4bid@hear.to |
43335228d802178391f31941a9e0fa159ce87500 | 909afe0216a37bdc19683d81e533fa6c094329c1 | /python/sorts/shell_sort.py | 67299c1495d6b4639ee791f37cc6da5544dc356b | [] | no_license | wxnacy/study | af7fdcd9915d668be73c6db81bdc961247e24c73 | 7bca9dc8ec211be15c12f89bffbb680d639f87bf | refs/heads/master | 2023-04-08T17:57:40.801687 | 2023-03-29T08:02:20 | 2023-03-29T08:02:20 | 118,090,886 | 18 | 22 | null | 2022-12-16T03:11:43 | 2018-01-19T07:14:02 | HTML | UTF-8 | Python | false | false | 976 | py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author: wxnacy(wxnacy@gmail.com)
# Description: 希尔排序
import time
import random
import utils
def shell_sort(nums: list):
gap = 1
while gap < len(nums) // 3:
gap = gap * 3 + 1
while gap > 0:
for i in range(gap, len(nums)):
tmp = num... | [
"371032668@qq.com"
] | 371032668@qq.com |
fbad24f82cc33754aabee50875a18d984d94fa03 | dbe9d697b3ec48c6561a39f16912fd1dc5f56e9a | /BuildSimHubAPI/measures/cooling_all_cop.py | 48ee96a7b00ec2c8498b12b2ca903881f87ad752 | [
"MIT"
] | permissive | mostaphaRoudsari/buildsimhub_python_api | 0e0cff43415e4e6d2833cd6519841ab0cdd2b5be | 4a562a678fc2f9671f9fc62faae46b79c448a922 | refs/heads/master | 2020-03-08T23:29:37.855206 | 2018-04-23T14:21:24 | 2018-04-23T14:21:24 | 128,465,836 | 0 | 0 | MIT | 2018-04-23T00:46:04 | 2018-04-06T20:11:40 | HTML | UTF-8 | Python | false | false | 354 | py | from .model_action import ModelAction
class CoolingCOP(ModelAction):
def __init__(self):
ModelAction.__init__(self, 'cooling_all_equip')
def get_num_value(self):
return ModelAction.num_of_value(self)
def set_datalist(self, datalist):
# this is just a on off option
ModelAc... | [
"weilix@alumni.cmu.edu"
] | weilix@alumni.cmu.edu |
6fbc71491ef7242a8f62c4233a3cdcb118750c8e | 45e8c30fbcd754e780230c3afd8a587f0833f4b0 | /blender_2.03_tree/lib/Python/Tools/Scripts/ifdef.py | c90c5714934e7aa240bf92c9207723b5dfb87669 | [] | no_license | daar/bare-blender | 2fdfb312a1d8f3048346bfa504aa863a61cfe814 | 3306d88a2ac9f78bcc7830c4bcafb4f2c7db7897 | refs/heads/master | 2021-01-16T17:47:42.303184 | 2015-05-19T21:33:46 | 2015-05-19T21:33:46 | 32,135,666 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,257 | py | #! /usr/bin/env python
# Selectively preprocess #ifdef / #ifndef statements.
# Usage:
# ifdef [-Dname] ... [-Uname] ... [file] ...
#
# This scans the file(s), looking for #ifdef and #ifndef preprocessor
# commands that test for one of the names mentioned in the -D and -U
# options. On standard output it writ... | [
"dhkblaszyk@zeelandnet.nl"
] | dhkblaszyk@zeelandnet.nl |
953cf453e7743497a3e364313a32fd3059acc1ee | 5859059a32ee60a6d0e705284aac7d325c8d481d | /Mmap/main.py | 65b1d9e1c2351525dece3b7002f2ad93e743ac8e | [] | no_license | Louis-Saglio/Bac_a_sable | e9bd8dbd316a53e0a6b8288b486a8bdd1f4840ca | 03e7aa6d11d9b260298cee827ed3526ad889fd0c | refs/heads/master | 2021-06-12T12:05:36.939230 | 2021-04-30T22:41:08 | 2021-04-30T22:41:08 | 84,747,973 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 72 | py | import mmap
with open("file") as f:
mm = mmap.mmap(f.fileno(), 0)
| [
"louis.saglio@sfr.fr"
] | louis.saglio@sfr.fr |
e0155ee40ac561e9dbef92f98a18c26f788b0444 | b6e6060b2d5df98436b78b21e61e82a5e2a25aed | /neurolib/tests/models/test_dkf_build.py | 9e76a20ff5e46596fd791ac787ff8fcbe60e6899 | [] | no_license | gumpfly/neurolib | f7ba01d6539baf760eb10585e3cfa5cb1a077b8f | 12ee60e78f384a9fa9b780a614fae7b72d9b5b19 | refs/heads/master | 2020-12-02T14:55:10.829786 | 2019-03-22T20:11:03 | 2019-03-28T23:42:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,388 | py | # Copyright 2018 Daniel Hernandez Diaz, Columbia University
#
# 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 applicabl... | [
"dh2832@columbia.edu"
] | dh2832@columbia.edu |
4f04e500a77f74aaea687b7c9d11fcceb12a9dd8 | 3dedff16fa0cbabbd3972189d7a47cbf7ef5a700 | /regex/book-collect-proj.py | 7256f5fef5ea4e73ac874cc04815a5ad8ca9b109 | [] | no_license | khmahmud101/python-practice-code | 5abb146dab4ff94e142a6f0836a831502afc206c | 58dd863e233a1901f9b36a1eacb16e7ac6298aff | refs/heads/master | 2020-08-04T10:21:21.860710 | 2020-01-14T06:15:44 | 2020-01-14T06:15:44 | 212,105,053 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,483 | py | import re
import requests
import os
import sys
def create_directory(name):
print("Creating directory",name)
try:
os.mkdir(name)
except FileExistsError:
print(name, "Already exists")
def download_image(img_url, file_name):
print("downloading image",img_url)
r = requests.get(img_url)
... | [
"kmahmud1991@gmail.com"
] | kmahmud1991@gmail.com |
c81fc03bcdf8d0924551df58293bb5f5e8403a5f | 612c762ba2910ed710d57c1c92a29846cf99fe9b | /automol/graph/_stereo.py | 017d8ac3907a111031452052fb3970b3c2fc8e4c | [
"Apache-2.0"
] | permissive | z5476t4508/autochem | 69ea807ead6d97153f656ec56383ba8cc64eaa3c | 87f50adc09c3f1170459c629697aadd74154c769 | refs/heads/master | 2023-03-03T12:06:58.545208 | 2020-12-23T21:00:33 | 2020-12-23T21:00:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,772 | py | """ stereo graph library
"""
import itertools
import functools
import numpy
from automol import dict_
from automol.graph._res import resonance_dominant_atom_hybridizations
from automol.graph._res import resonance_dominant_bond_orders
from automol.graph._ring import rings_bond_keys
from automol.graph._graph import atoms... | [
"avcopan@gmail.com"
] | avcopan@gmail.com |
594538e0c3fa474cea75a814a7965e74957ab8d8 | d12b59b33df5c467abf081d48e043dac70cc5a9c | /ixnetwork_restpy/testplatform/sessions/ixnetwork/statistics/view/availabletrafficitemfilter/availabletrafficitemfilter.py | a351f7cdbbfe2bc8b176041a808380bb7b6e0f3a | [
"MIT"
] | permissive | ajbalogh/ixnetwork_restpy | 59ce20b88c1f99f95a980ff01106bda8f4ad5a0f | 60a107e84fd8c1a32e24500259738e11740069fd | refs/heads/master | 2023-04-02T22:01:51.088515 | 2021-04-09T18:39:28 | 2021-04-09T18:39:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,017 | py | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify,... | [
"andy.balogh@keysight.com"
] | andy.balogh@keysight.com |
84bb5135cae15455cc01115155784b904470b373 | 58db5cdab90e34107018892b69c6b4ed63fc2604 | /heap_experimenting.py | d375b12a0a06e123a87547175bf7708ab94cc682 | [] | no_license | jamiejamiebobamie/pythonPlayground | 2b329d0a8741146f7a715b15b33c4e2f24a9a677 | b622eeb78b22760d2570cc085716f74b344072e8 | refs/heads/master | 2020-04-14T15:03:01.127800 | 2019-10-03T23:34:32 | 2019-10-03T23:34:32 | 163,914,975 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,367 | py |
"""
Given an unsorted array, return the 2nd largest element.
"""
import heapq
A = [1001,22,3,45,56,666,75,8,90,100,11]
my_first_heap = heapq.heapify(A) #time complexity? O(n) or O(nlogn)
print(A) #checking to see if it worked... heapify is in place, apparently.
for i, item in enumerate(A):
if 2*i+2 < len(A):
... | [
"jmccrory@vt.edu"
] | jmccrory@vt.edu |
3a098e438624b9b860bd1cd8b95c15a5de68ea1c | fe84a4b596b66cfbd9136df434fc650cba88a381 | /linked_list.py | fa03abc55be4684faabde4f05fcc9435682c5281 | [] | no_license | halida/book_admin | 7cd31a8291074eaef4a5e307b2d3d8730d8cc3de | 691bda72399d33a779f9db3305f5f9aef7a52308 | refs/heads/master | 2021-01-10T20:45:04.305940 | 2011-10-20T08:20:51 | 2011-10-20T08:20:51 | 2,611,306 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,154 | py | #!/usr/bin/env python
#-*- coding:utf-8 -*-
"""
module: linked_list
"""
class LinkedList():
def __init__(self, *args):
self.data = [None, None]
self.tail = self.data
self.length = 0
if len(args) > 0:
for v in args:
self.append(v)
def appand(self, v):
... | [
"linjunhalida@gmail.com"
] | linjunhalida@gmail.com |
0714fd3809c8332196ade2710ae7d365ff4fa9d5 | 8ffd55d70d14664d3486b60d401730248bbbaea7 | /lesson_1/var3.py | cb59e1b19a9a964b0a7a68aec6b249fa3eec4a6b | [] | no_license | MeSmoker/epixx | ef63b00cd5cce4288f1b4818b48e9a196bb8727f | d3c06c070789ce0aaace1d2b715841ed811349ab | refs/heads/master | 2020-03-31T16:43:30.848827 | 2018-10-09T16:45:26 | 2018-10-09T16:45:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 167 | py | # var3.py
a = 5
b = 7
def add(x, y):
return x + y
def sub(x, y):
return x - y
def fun(x, y):
return add(sub(x,y), sub(y, x))
print(fun(a, b))
| [
"dmitriy.fedoroff@gmail.com"
] | dmitriy.fedoroff@gmail.com |
dcc30c0886d16bf98cde8ee27b03503d620512d6 | c627d0e0625e9179c02a893f864a04d4ab1a4acf | /basic_functions.py | 2ce23fe6c9c4e6c33e39bfd34137c67da5bd1b53 | [] | no_license | alseambusher/android-manager | 809dda92be876b64156fe1345415460e6466ecf6 | 1c392bccc26de2a29f2fd500bb5c4ff68a2a0aad | refs/heads/master | 2020-05-21T13:07:59.554462 | 2012-12-03T13:35:18 | 2012-12-03T13:35:18 | 6,122,735 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 77 | py | class Callable:
def __init__(self,anycallable):
self.__call__=anycallable
| [
"alseambusher@gmail.com"
] | alseambusher@gmail.com |
3ccdbe8cfed608c5bb94351a5881f8417368deef | b1f0c6ba53ba6638e7c7bf60a6da7603408489f4 | /SPD-2.31-Testing-and-Architecture/lab/refactoring/replace_temp_with_query.py | bac0c87dc00cd1272f6c7577802f845bacf0a33c | [
"MIT"
] | permissive | kbigdelysh/SPD-2.31-Testing-and-Architecture- | 67cb833931a0902bd8b5927de4aed3af413f4d27 | 2f7a72fe4c409aa65d6647686b7bbd554f393c21 | refs/heads/main | 2023-03-13T06:16:43.024518 | 2021-03-05T00:31:52 | 2021-03-05T00:31:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,258 | py | # By Kamran Bigdely Nov. 2020
# Replace temp variable with query
"""
MOD DOCSTRING
"""
class Employer:
"""
CLASS DOCSTRING
"""
def __init__(self, name):
self.name = name
def send(self):
"""
FUNC DOCSTRING
"""
print("Students' contact info were sent to", self.n... | [
"tyler.holland@students.makeschool.com"
] | tyler.holland@students.makeschool.com |
e535159d501b985c5ea12430a34514dc0f4ae2e2 | 5ae4744786ee01a0df792a44c656bc69e6e4b02c | /tier3/exceptionpackage/operatorerror.py | 5af7c24fe02b68810c7bedb0cb7bf05a80551abc | [
"MIT"
] | permissive | Otumian-empire/Pydoc-Tutorial | d50a031176c2ae79ea8cee7c9807031057499c8b | 0535d7589432075b13c6899c4567f555d9a2bc9f | refs/heads/master | 2020-07-13T23:30:05.041675 | 2020-01-22T16:48:54 | 2020-01-22T16:48:54 | 205,178,075 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 763 | py | # user defined-exceptions
# an exception handler class for the operator error
# and extend or inherits CalculatorError
from calculatorerror import CalculatorError
class OperatorError(CalculatorError):
""" exception handler for operator error """
def __init__(self, operator):
self.operator = operator
... | [
"popecan1000@gmail.com"
] | popecan1000@gmail.com |
1c166a35e40a67cfb29fa99936d0da7691eb08bc | b04cc98a746d1df457183bc14908094a8be00ba1 | /paddleslim/quant/layers/__init__.py | 34e5a1ea510da11c5619ad896c21ebb5bfaa6aa9 | [
"Apache-2.0"
] | permissive | PaddlePaddle/PaddleSlim | a3bcaef0c92016b7f6946d58787f87c7db8ff3f8 | bb02b103a89a09635941bc0bbbd38506d7412468 | refs/heads/develop | 2023-08-31T01:47:27.824722 | 2023-08-25T08:06:08 | 2023-08-25T08:06:08 | 228,290,594 | 1,534 | 402 | Apache-2.0 | 2023-08-29T09:37:55 | 2019-12-16T02:56:50 | Python | UTF-8 | Python | false | false | 771 | py | # Copyright (c) 2023 PaddlePaddle 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 applic... | [
"noreply@github.com"
] | PaddlePaddle.noreply@github.com |
7bfe2781fe27722f94d270631c0a5f0ba9fc4b1f | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/domain/DeliveryItemInfoVO.py | d6bdd1646cd361b974bb8d785cf8b07ccec057ec | [
"Apache-2.0"
] | permissive | alipay/alipay-sdk-python-all | 8bd20882852ffeb70a6e929038bf88ff1d1eff1c | 1fad300587c9e7e099747305ba9077d4cd7afde9 | refs/heads/master | 2023-08-27T21:35:01.778771 | 2023-08-23T07:12:26 | 2023-08-23T07:12:26 | 133,338,689 | 247 | 70 | Apache-2.0 | 2023-04-25T04:54:02 | 2018-05-14T09:40:54 | Python | UTF-8 | Python | false | false | 1,407 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class DeliveryItemInfoVO(object):
def __init__(self):
self._out_item_id = None
self._out_sku_id = None
@property
def out_item_id(self):
return self._out_item_id
@o... | [
"jishupei.jsp@alibaba-inc.com"
] | jishupei.jsp@alibaba-inc.com |
41daa3a029ad221dc891dcbc5249e05a5eea3071 | d5ff462707ed588a5d07b539b6a748ebee625074 | /flask-01/app/main/__init__.py | b106e46696125aa318afabc238760319e8245108 | [] | no_license | it-zyk/flask-code | d1bf715996c389ce71023c7fddb19172cdc90770 | a3686067792f8f6e82e18cd8873389036d5a53b8 | refs/heads/master | 2022-12-11T19:23:53.270473 | 2020-02-04T03:03:43 | 2020-02-04T03:03:43 | 227,514,424 | 0 | 0 | null | 2022-12-08T03:20:42 | 2019-12-12T03:44:43 | HTML | UTF-8 | Python | false | false | 114 | py | from flask import Blueprint
# 创建蓝本
main = Blueprint('main', __name__)
from . import views, errors
| [
"it-zyk@outlook.com"
] | it-zyk@outlook.com |
756427620d33437ce90a3d9e28df84fcc4b527b1 | d554b1aa8b70fddf81da8988b4aaa43788fede88 | /5 - Notebooks e Data/1 - Análises numéricas/Arquivos David/Atualizados/logDicas-master/data/2019-1/225/users/4013/codes/1590_2049.py | 7b91444bf1c8d78467b6d64eb2a681c0aa8ae2a9 | [] | no_license | JosephLevinthal/Research-projects | a3bc3ca3b09faad16f5cce5949a2279cf14742ba | 60d5fd6eb864a5181f4321e7a992812f3c2139f9 | refs/heads/master | 2022-07-31T06:43:02.686109 | 2020-05-23T00:24:26 | 2020-05-23T00:24:26 | 266,199,309 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 294 | py | # Teste seu codigo aos poucos.
# Nao teste tudo no final, pois fica mais dificil de identificar erros.
# Nao se intimide com as mensagens de erro. Elas ajudam a corrigir seu codigo.
x = int(input("dividendo:"))
y = int(input("divisor:"))
r = x // y
s = x % y
print(x)
print(y)
print(r)
print(s) | [
"jvlo@icomp.ufam.edu.br"
] | jvlo@icomp.ufam.edu.br |
5e35d0d3f8c2c109c1dc6fdbd19f33b538e7a1a4 | 72dc7d124cdac8f2dcab3f72e95e9a646154a6a0 | /byceps/services/shop/sequence/transfer/models.py | 7d19d0ec3b6a5a42ec5a8b699aadfb1fd3cdefb4 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | m-ober/byceps | e6569802ee76e8d81b892f1f547881010359e416 | 4d0d43446f3f86a7888ed55395bc2aba58eb52d5 | refs/heads/master | 2020-11-30T23:31:33.944870 | 2020-02-12T23:53:55 | 2020-02-12T23:56:04 | 40,315,983 | 0 | 0 | null | 2015-08-06T16:41:36 | 2015-08-06T16:41:36 | null | UTF-8 | Python | false | false | 464 | py | """
byceps.services.shop.sequence.transfer.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from dataclasses import dataclass
from enum import Enum
from ...shop.transfer.models import ShopID
Purpose = Enum('Purpose'... | [
"homework@nwsnet.de"
] | homework@nwsnet.de |
4cb268755dca952abb752dde62c114213b50e43d | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03711/s193171197.py | 1f512c58f6da315fbc6955376a215e60d67bd3cb | [] | 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 | 218 | py | f = [1,3,5,7,8,10,12]
g = [4,6,9,11]
x,y = map(int,input().split())
if x == 2 and y == 2:
print('Yes')
elif x in f and y in f:
print('Yes')
elif x in g and y in g:
print('Yes')
else:
print('No') | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
b1bb48673d2eedf87dcd9c1291aed5782b7b8a30 | d6074aac6e9e5f2fa5355c3c9ddaebe892c4151d | /pydeps/depgraph.py | afc1e0ed3d43cb8aee422af3c24712d8e6bc1795 | [
"BSD-2-Clause"
] | permissive | pombredanne/pydeps | f5aae8b825cf86db8308adad808b4bbf8cee52a2 | 95833f42f86f9c5c23ef14b675828d0ddc4df73e | refs/heads/master | 2021-01-18T07:52:41.522028 | 2016-05-19T13:53:14 | 2016-05-19T13:53:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,094 | py | # -*- coding: utf-8 -*-
from collections import defaultdict
import fnmatch
from itertools import izip_longest
import json
import os
import pprint
import re
import enum
from . import colors
import sys
# we're normally not interested in imports of std python packages.
PYLIB_PATH = {
# in virtualenvs that see the sys... | [
"bp@datakortet.no"
] | bp@datakortet.no |
35d5b23b404e3728da6de486f07b8d4f759e7c77 | 0d37dfacdfc160ffe504fbc3d2c2b73791d3fac1 | /flyemflows/workflow/sparsemeshes.py | a8d4556e6ec24357c971624aa7b4134ac9775e07 | [
"BSD-3-Clause"
] | permissive | aplbrain/flyemflows | 6d7e5dabc578cbfe62631dcfe1bf6ef61bc64d87 | d9d5521888c884bd1d68cd0097d3bae47f96013c | refs/heads/master | 2021-07-10T22:14:05.673092 | 2020-07-31T20:20:46 | 2020-07-31T20:20:46 | 191,405,225 | 0 | 0 | null | 2019-06-11T15:58:14 | 2019-06-11T15:58:13 | null | UTF-8 | Python | false | false | 9,915 | py | import os
import copy
import logging
from math import log2, pow, ceil
import numpy as np
import pandas as pd
import dask.bag as db
from dvid_resource_manager.client import ResourceManagerClient
from neuclease.util import Timer
from neuclease.dvid import fetch_sparsevol_coarse, fetch_sparsevol
from vol2mesh import ... | [
"bergs@janelia.hhmi.org"
] | bergs@janelia.hhmi.org |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.