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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
288de51aecb74984b26d4c45de7430cecdb35121 | 6c48ad953031fd6be870e8bd8775538b9ac7033e | /python/demo06/demo06_multi_inherit.py | 4d65f096931f3671905f96e664f5289bfe015bca | [] | no_license | yeswhos/Code-Practice | b080c9484f510d02c2d78e388fc03eedc397aa7b | 0fd8263a5c87dbd0e8b1dd5a38f32a188870308b | refs/heads/master | 2023-04-08T13:11:06.105039 | 2023-03-16T11:34:03 | 2023-03-16T11:34:03 | 247,809,031 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 167 | py | class A:
def demo(self):
print("self方法")
class B:
def test(self):
print("test 方法")
class C(A, B):
pass
c = C()
c.demo()
c.test() | [
"[email protected]"
] | |
e6c752bba55bc005223a795821bd8aa1cb76ec92 | 41c9fde93aeb2afbbe10032a6a5b326573675220 | /notify/models.py | cd84534c00eb3f0ca55493ff698a79c8a5e6542a | [] | no_license | yindashan/nuri | 99dd6c2b944c9014391817018bf9406c40699cfd | a9bda6e88d1dd0db3517d068f540dba6c64bcc74 | refs/heads/master | 2021-01-22T11:46:54.758649 | 2014-10-20T10:36:19 | 2014-10-20T10:36:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,613 | py | # -*- coding:utf-8 -*-
# 所有主机和硬件报警都通过此模块发出
import json
from celery import task
from utils.sms import sms
from utils.mail import send_mail
from appitem.models import AppService, AppRelation
from datetime import datetime
from django.conf import settings
# 异步处理主机存活事件的通知
@task
def notify_host(criterion, host, state, now_... | [
"="
] | = |
11155037fa8a2a647ca6bb086624a0138afc34dc | 3d4fcc7cbfafc4aaebea8e08d3a084ed0f0d06a1 | /Programme_2/Creation_donnees/MIDI/grieg_berceusefMidiComplet.py | c3ece892e9ad8431e2d89671e0cefe3dd8e43248 | [] | no_license | XgLsuLzRMy/Composition-Musicale-par-Reseau-de-Neurones | 0421d540efe2d9dc522346810f6237c5f24fa3bf | 518a6485e2ad44e8c7fbae93c94a9dc767454a83 | refs/heads/master | 2021-09-03T20:43:01.218089 | 2018-01-11T20:02:00 | 2018-01-11T20:02:00 | 106,448,584 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 133,069 | py | midi.Pattern(format=1, resolution=480, tracks=\
[midi.Track(\
[midi.TrackNameEvent(tick=0, text='Grieg: Berceuse Opus 38 Nr. 1', data=[71, 114, 105, 101, 103, 58, 32, 66, 101, 114, 99, 101, 117, 115, 101, 32, 79, 112, 117, 115, 32, 51, 56, 32, 78, 114, 46, 32, 49]),
midi.CopyrightMetaEvent(tick=0, text='Copyright ... | [
"[email protected]"
] | |
acdf4977672dbda2425b7f78c305dc1d7776bfe6 | 0c12d94714546d38266314f4858fa484136f02dc | /fluent_utils/django_compat/django14.py | 8e20d3f46f6f4a1ba1d1a2fc5e03abde5af259fc | [
"Apache-2.0"
] | permissive | benkonrath/django-fluent-utils | a63504dbccd3e21b3c88b04665f48f4721848d40 | 5e90dfe5f7b22ca2c2fe942c304e51981e170ba6 | refs/heads/master | 2021-01-01T04:04:01.452357 | 2017-05-22T11:10:44 | 2017-05-22T11:10:44 | 97,116,253 | 0 | 0 | null | 2017-07-13T11:43:06 | 2017-07-13T11:43:06 | null | UTF-8 | Python | false | false | 1,084 | py | # The timezone support was introduced in Django 1.4, fallback to standard library for 1.3.
try:
from django.utils.timezone import now, utc
except ImportError:
# Django < 1.4
from datetime import datetime
now = datetime.now
utc = None # datetime(..., tzinfo=utc) creates naive datetime this way.
#... | [
"[email protected]"
] | |
9854c422ac2f90220f55dde8a71086e0fc9de277 | 4c91490373be8867d47a01a181a8257e503236e1 | /Level 1/두개 뽑아서 더하기.py | 1cb9ae1671f978983f0ca5fb93453b00662f303a | [] | no_license | dohee479/PROGRAMMERS | bc1b9d8ad4841e96f8dbe650cb1e70064e4a1bd5 | 398261d5c340de5b0135c4bad6858d925c94482d | refs/heads/master | 2023-03-23T17:28:35.191331 | 2021-03-12T16:53:47 | 2021-03-12T16:53:47 | 298,023,004 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 604 | py | def backtrack(numbers, index, cnt, m, result):
global visited
if cnt == m:
answer.add(result)
return
for i in range(index, len(numbers)):
if visited[i]:
continue
for j in range(i + 1):
visited[j] = 1
backtrack(numbers, i + 1, cnt + 1, m, resul... | [
"[email protected]"
] | |
6f8c1430858a1d50773c27f7a66d2f78b7af6ed8 | a56252fda5c9e42eff04792c6e16e413ad51ba1a | /resources/usr/local/lib/python2.7/dist-packages/scipy/sparse/linalg/isolve/iterative.py | 900364c2141b13046fe9ed63ff04b06df9541251 | [
"Apache-2.0"
] | permissive | edawson/parliament2 | 4231e692565dbecf99d09148e75c00750e6797c4 | 2632aa3484ef64c9539c4885026b705b737f6d1e | refs/heads/master | 2021-06-21T23:13:29.482239 | 2020-12-07T21:10:08 | 2020-12-07T21:10:08 | 150,246,745 | 0 | 0 | Apache-2.0 | 2019-09-11T03:22:55 | 2018-09-25T10:21:03 | Python | UTF-8 | Python | false | false | 21,019 | py | """Iterative methods for solving linear systems"""
from __future__ import division, print_function, absolute_import
__all__ = ['bicg','bicgstab','cg','cgs','gmres','qmr']
from . import _iterative
import numpy as np
from scipy.sparse.linalg.interface import LinearOperator
from scipy.lib.decorator import decorator
fr... | [
"[email protected]"
] | |
536e71273f02e7028fe26d6242db9bada2af0dcc | 7a4da5ec2196bf975a9e6115846244788b36b952 | /3.7.0/lldb-3.7.0.src/test/macosx/safe-to-func-call/TestSafeFuncCalls.py | 73ae892dc7571294845b8570857cc0d81492d0aa | [
"NCSA",
"MIT"
] | permissive | androm3da/clang_sles | ca4ada2ec85d625c65818ca9b60dcf1bc27f0756 | 2ba6d0711546ad681883c42dfb8661b842806695 | refs/heads/master | 2021-01-10T13:50:25.353394 | 2016-03-31T21:38:29 | 2016-03-31T21:38:29 | 44,787,977 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,887 | py | """Test function call thread safety."""
import os, time
import unittest2
import lldb
import lldbutil
from lldbtest import *
class TestSafeFuncCalls(TestBase):
mydir = TestBase.compute_mydir(__file__)
@skipUnlessDarwin
@python_api_test
@dsym_test
def test_with_dsym_and_python_api(self):
"... | [
"[email protected]"
] | |
003b0869325795d0e20613fbcd858c7435600cdd | d5ad13232e3f1ced55f6956bc4cbda87925c8085 | /RNAseqMSMS/8-snv-virus-sv/1-integration.py | 28de0f65de0b94bbf61a878cf425349690bcfd78 | [] | no_license | arvin580/SIBS | c0ba9a8a41f59cb333517c286f7d80300b9501a2 | 0cc2378bf62359ec068336ea4de16d081d0f58a4 | refs/heads/master | 2021-01-23T21:57:35.658443 | 2015-04-09T23:11:34 | 2015-04-09T23:11:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,646 | py | ### [SNV, Virus, Deltion, Duplication, Inversion, Translocation]
D = {}
inFile = open('sum_snv.exome_summary.overall.filter')
for line in inFile:
line = line.strip()
fields = line.split('\t')
gene = fields[1]
D.setdefault(gene,[0,0,0,0,0,0])
D[gene][0] = 1
inFile.close()
inFile = open('ERR0498-04-... | [
"[email protected]"
] | |
674ad7c2490eb113d1ff5457500c8598258b54df | 1c6283303ceb883add8de4ee07c5ffcfc2e93fab | /Jinja2/lib/python3.7/site-packages/ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/configelement/stack/fCoEGPFCP_template.py | e65f9365f8707673b7cd59d7b4a6b7714c358188 | [] | no_license | pdobrinskiy/devcore | 0f5b3dfc2f3bf1e44abd716f008a01c443e14f18 | 580c7df6f5db8c118990cf01bc2b986285b9718b | refs/heads/main | 2023-07-29T20:28:49.035475 | 2021-09-14T10:02:16 | 2021-09-14T10:02:16 | 405,919,390 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 27,422 | py | from ixnetwork_restpy.base import Base
from ixnetwork_restpy.files import Files
class FCoEGPFCP(Base):
__slots__ = ()
_SDM_NAME = 'fCoEGPFCP'
_SDM_ATT_MAP = {
'FcoeHeaderVersion': 'fCoEGPFCP.header.fcoeHeader.version-1',
'FcoeHeaderReserved': 'fCoEGPFCP.header.fcoeHeader.reserved-... | [
"[email protected]"
] | |
9c1ebff143583caed72eccb5483e60f02ed4113a | 93ca62f2fb727c20f1fc5c8d81b7134877e85c6e | /Refactoring/refactoring_3_abstraction.py | e0146c6f647d0d2e91a1e1af6a47ef2590df21a1 | [] | no_license | lily48/oop-python | f607e954d50236f6f8d7844f1c4e29b38c0dbfae | b009cd4477a5045de115e44aa326923a32ba7c1c | refs/heads/master | 2023-01-19T03:39:22.726179 | 2020-11-18T20:38:14 | 2020-11-18T20:38:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,016 | py | """
Simulate a simple board game.
There are 2 players.
Each player takes turn rolling a die and moving that number of spaces.
The first person to space 100 wins.
"""
import random
class Player:
def __init__(self, player_number):
self.score = 0
self.player_number = player_number
def roll_die(s... | [
"[email protected]"
] | |
5c95a60905b7a7bda2099078018e15544b41824c | 473625e02c757fd9f9ba58624aa84551280611e3 | /store/migrations/0010_icat.py | d484e1b5289f8c78f96cc0fa8a5342cbe38026ee | [] | no_license | rohitrajput-42/PortalK | 1a15cd182b252de459acc950eb87d3837d7e6ff4 | a5647b560d850c650c9cefae30a43bc7424d188b | refs/heads/main | 2023-01-21T08:50:06.614440 | 2020-11-27T12:58:57 | 2020-11-27T12:58:57 | 314,314,573 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 505 | py | # Generated by Django 3.1.2 on 2020-11-15 12:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('store', '0009_joblist_lcat'),
]
operations = [
migrations.CreateModel(
name='Icat',
fields=[
('id', ... | [
"[email protected]"
] | |
13d9348edcc2d4475fd1cd08528d9a9ad8745c7a | cbd3ac62b75ac3dceb6ffb219eaa3fe9d2ef0c00 | /src/build/android/pylib/constants/__init__.py | 9209f32c73e5ecda6818cf4cd518e9a6dfee865a | [
"BSD-3-Clause"
] | permissive | crazypeace/naiveproxy | d403fa282bcf65cac3eacb519667d6767080d05d | 0a8242dca02b760272d4a0eb8f8a712f9d1093c4 | refs/heads/master | 2023-03-09T21:23:30.415305 | 2022-10-06T17:23:40 | 2022-10-06T17:23:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,079 | py | # Copyright (c) 2012 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.
"""Defines a set of constants shared by test runners and other scripts."""
# TODO(jbudorick): Split these constants into coherent modules.
# pylint: di... | [
"[email protected]"
] | |
3395107d611736090f54619e51924ac5ed480fdc | fc357aba40672ce57fcbf96e2ad837caaef389d4 | /dashboard/dashboard/auto_bisect_test.py | 3299e395363cceb7762d3ef6115eaa707fb181ea | [
"BSD-3-Clause"
] | permissive | dinosk/catapult | e550a7028ff3836fa7ec974d1a85eae2ccb14513 | 6de275176224197282cfd6a5617f3775abad734b | refs/heads/master | 2021-06-05T16:37:44.163473 | 2016-02-11T19:16:02 | 2016-02-11T19:16:02 | 56,242,905 | 0 | 1 | BSD-3-Clause | 2020-07-24T05:02:58 | 2016-04-14T14:12:00 | HTML | UTF-8 | Python | false | false | 9,419 | py | # Copyright 2015 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.
import datetime
import unittest
import mock
import webapp2
import webtest
from dashboard import auto_bisect
from dashboard import request_handler
from dash... | [
"[email protected]"
] | |
d184179a81f11f57b1cdd2a8e64a7a8ee95a2bd2 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2667/60755/240482.py | d1424016496d8a183f3003a82a8271c426557281 | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 168 | py | NumOfEg = int(input())
result = []
for i in range(NumOfEg):
num = input().split(" ")
result.append(pow(2,int(num[1]))-int(num[0]))
for i in result:
print(i) | [
"[email protected]"
] | |
10f1e85617f62e861d852026b268840e60d81013 | e823bc36af457f229f6879d6e6a3ef6247c129aa | /virtualenv/Lib/site-packages/twisted/conch/test/test_connection.py | f81d90f719d6d096243abd991056097bb9343740 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | William-An/DFB_Final | e772fa979c41f2f83a4bf657cde499456215fb3b | 49a9244c98116574676992ebecd1d9435e1d5b1e | refs/heads/master | 2022-11-07T15:47:36.189057 | 2017-07-22T01:01:37 | 2017-07-22T01:01:43 | 97,426,562 | 1 | 1 | MIT | 2022-10-15T02:45:57 | 2017-07-17T02:21:42 | Python | UTF-8 | Python | false | false | 27,716 | py | # Copyright (c) 2007-2010 Twisted Matrix Laboratories.
# See LICENSE for details
"""
This module tests twisted.conch.ssh.connection.
"""
from __future__ import division, absolute_import
import struct
from twisted.conch import error
from twisted.conch.ssh import channel, common, connection
from twisted.python.compat ... | [
"[email protected]"
] | |
3808964e73e804ea86f5c9f6bb724678bd097437 | 8163d8f03aea22cb4fa1e60d809781049fff4bb4 | /relationship/first/migrations/0001_initial.py | f5297a9e109a0d6e57feaf3aac287ec150b66734 | [] | no_license | shubham454/Django-Devlopment | 694b973d31a82d2ded11f95138bd766130d7d3c9 | 43a2c3b98dbe9f582f2394fcfb3beb133c37b145 | refs/heads/master | 2022-12-04T14:34:05.093402 | 2020-08-13T18:35:33 | 2020-08-13T18:35:33 | 287,353,684 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 921 | py | # Generated by Django 2.2.2 on 2019-12-30 05:36
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Language',
fields=[
... | [
"[email protected]"
] | |
a5745b3b97a4ed742e0b12d53ace7eda3fbebed1 | 5b25362295262504a56dcbac10a40226bdc18bba | /libapp/migrations/0012_user_notification.py | 8d2e484be18e0f6780273648fc8161dc05ae32f1 | [
"MIT"
] | permissive | Nyagah-Tech/library | 2fef2c990b7992bb3b311dfb1502b4d2124494ac | 2ae1df4e89257c9c7d7f2328ab6c5f6352867997 | refs/heads/master | 2022-12-14T14:31:54.440553 | 2020-05-29T14:18:59 | 2020-05-29T14:18:59 | 235,101,527 | 0 | 0 | MIT | 2022-12-08T03:43:09 | 2020-01-20T12:56:42 | Python | UTF-8 | Python | false | false | 881 | py | # Generated by Django 2.2.8 on 2020-01-24 05:39
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import tinymce.models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('li... | [
"[email protected]"
] | |
13b12204cb376256fe6b328b751c09622f692292 | 49f98241bfd0848f0b9d06d062ef6ead01f2bb9c | /w3af/core/data/db/dbms.py | bc14b89c04021f56ee313741cccf4478bf140f77 | [] | no_license | s0i37/__w3af | 8f63f91879bc3790cc25c1dd7b0b5e983e5e24ab | ebaf108680bd88f0bc48d1a1d86ae80cb35d0213 | refs/heads/master | 2021-09-16T20:23:18.375077 | 2018-06-24T17:33:16 | 2018-06-24T17:33:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,956 | py | """
dbms.py
Copyright 2013 Andres Riancho
This file is part of w3af, http://w3af.org/ .
w3af 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 version 2 of the License.
w3af is distributed in the hope that it wil... | [
"[email protected]"
] | |
e958a6f04aa7711889b4247d69ccf74e4f61fd27 | d042c1d3b3d62264bc93d9f8e0b9f57f85e24b62 | /Python3/04_RegularExpression/re.py | fd80656fb1ddefc5d0daa6abc0468d0b75463bb3 | [] | no_license | FadelBerakdar/OSTpythonCourse | f1867c1a329d4041914cbdeaa869a8db41ec4625 | 3f1740fd21f341490856a9e434154e049d19933a | refs/heads/master | 2016-08-12T23:24:22.765256 | 2016-02-24T13:39:58 | 2016-02-24T13:39:58 | 52,438,301 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,034 | py | """
______________________________________________________________________
| Regular Expression |
|______________________________________________________________________|
| . | any character except new line \n |
| \w | any unicode wo... | [
"[email protected]"
] | |
928297c5bd91bcea7bfd13a8298215620b62700a | 5b3bf81b22f4eb78a1d9e801b2d1d6a48509a236 | /leetcode/1010.py | 840fc1be71784ae1cc6aede7f3ce2feac361d083 | [] | no_license | okoks9011/problem_solving | 42a0843cfdf58846090dff1a2762b6e02362d068 | e86d86bb5e3856fcaaa5e20fe19194871d3981ca | refs/heads/master | 2023-01-21T19:06:14.143000 | 2023-01-08T17:45:16 | 2023-01-08T17:45:16 | 141,427,667 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 401 | py | from collections import defaultdict
class Solution:
def numPairsDivisibleBy60(self, time: List[int]) -> int:
dic = defaultdict(int)
for t in time:
dic[t % 60] += 1
result = 0
for i in range(1, 30):
result += dic[i] * dic[60-i]
result += dic[0] * (d... | [
"[email protected]"
] | |
a4bc70bf128abaaee85e0af536872bfe798071e7 | 07988c4c354fea7186962a38198b47af95ea40fe | /kubernetes/client/apis/apiregistration_v1_api.py | 76913891609fd738dd42ce965cb69cf9a5a3d8cb | [
"Apache-2.0"
] | permissive | GitObjects/python | cd9fb60798d1d6728c9773a6c71545bfcc83a43e | 2cbd4dfe14e6e0bcec72839bbfc9e5c3f6f6945d | refs/heads/master | 2020-03-22T17:29:41.474848 | 2018-08-01T03:02:03 | 2018-08-01T03:02:03 | 140,398,453 | 0 | 0 | Apache-2.0 | 2018-08-01T03:02:04 | 2018-07-10T08:04:27 | Python | UTF-8 | Python | false | false | 66,956 | py | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.11.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
i... | [
"[email protected]"
] | |
3f0ceb8350bfe0a17cf4877ecffca5c89455cb04 | f11600b9a256bf6a2b584d127faddc27a0f0b474 | /easy/1566.py | e1fd77a95b8a19432432804e090514e518bd9f8c | [] | no_license | longhao54/leetcode | 9c1f0ce4ca505ec33640dd9b334bae906acd2db5 | d156c6a13c89727f80ed6244cae40574395ecf34 | refs/heads/master | 2022-10-24T07:40:47.242861 | 2022-10-20T08:50:52 | 2022-10-20T08:50:52 | 196,952,603 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 992 | py | class Solution:
def containsPattern(self, arr: List[int], m: int, k: int) -> bool:
if m * k == len(arr):
return [arr[0]] * m * k == arr
for start in range(0, len(arr)-m*k):
tmp = arr[start:start+m]*k
index = 0
while index < len(arr)-m:
... | [
"[email protected]"
] | |
ee6f15e3182bc0c650262c869b4aa170fc6f416d | 40f8107fdd2afa1f9c41d4d02b32298258bd3ae7 | /src/app/cache.py | bdc0c3b9d8a36c32ac9b7ea12af8a10dacd4439c | [
"Apache-2.0"
] | permissive | ConvergeTP/von_tails | 91f62e722325e1a0845e766359dae94de13076d3 | 98ce984b001cd09005b6496ce10687588def53ef | refs/heads/master | 2020-05-30T23:18:30.532496 | 2019-08-21T14:30:58 | 2019-08-21T14:30:58 | 170,901,819 | 0 | 0 | Apache-2.0 | 2019-04-02T18:01:45 | 2019-02-15T17:18:29 | Python | UTF-8 | Python | false | false | 705 | py | """
Copyright 2017-2019 Government of Canada - Public Services and Procurement Canada - buyandsell.gc.ca
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
... | [
"[email protected]"
] | |
5cf1d0203417d378aac698a22fa0890bb4bffcae | ba0e07b34def26c37ee22b9dac1714867f001fa5 | /azure-mgmt-web/azure/mgmt/web/operations/recommendations_operations.py | c3e0db7d769a8e215a861a5b4665f4787afeeee7 | [
"MIT"
] | permissive | CharaD7/azure-sdk-for-python | b11a08ac7d24a22a808a18203072b4c7bd264dfa | 9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c | refs/heads/master | 2023-05-12T12:34:26.172873 | 2016-10-26T21:35:20 | 2016-10-26T21:35:20 | 72,448,760 | 1 | 0 | MIT | 2023-05-04T17:15:01 | 2016-10-31T15:14:09 | Python | UTF-8 | Python | false | false | 14,493 | 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 ... | [
"[email protected]"
] | |
caa1bab989647808316c09990fc13f5e713b386c | 21e7753732296bfdfb6dd9a9b58c7c6b8d90a1e5 | /Bits/nextNumber/getNext.py | 6ebc140b20a361fff4350f249e1d6384893f8d31 | [] | no_license | rongfeng-china/python-algorithms-and-data-structures | eb8514b44d7ff97dd7c4deda2d8ea888a5aa8d04 | a69241bb7b684bc7d00acdd46c2fc214f7b61887 | refs/heads/master | 2020-03-13T09:08:13.375870 | 2015-12-11T07:37:30 | 2015-12-11T07:37:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 890 | py | # Given a positive number, print the next smallest and the next
# largest number that have the same number of 1 bits in their
# binary representation.
def getNext(n):
c = n
# let p denote the position of first non-trailing 0 ie a zero which is followed by 1s
c0 = 0 # number of zeros to right of position p
... | [
"[email protected]"
] | |
791eb38cc58c33681d0a94055779d53287ea54ce | 68fb568c78dbcd4e73c2b697ab463e02fdde7960 | /_scripts/utils_databasePopulate.py | cf0c8c512c0b35083f405a6f9bafae21830b87a2 | [] | no_license | StBogdan/LightningExplorer | 114400dfb813ee039b1b73d7d3f92817b982c79b | 4ef5e5e1c633bd1ba18a5b37e3e9d1db79f1d503 | refs/heads/master | 2020-03-20T06:06:06.264959 | 2019-04-21T14:52:07 | 2019-04-21T14:52:07 | 137,238,511 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,013 | py | import os
import django
import sys
import _scripts.utils_config as config
from datetime import datetime
from nodes.models import *
"""
What: Take data from files, convert it, put it in database
Why: Automate data loading
"""
# Django setup (run in the virtual environment)
os.environ.setdefault("DJANGO_SETTINGS_MODUL... | [
"[email protected]"
] | |
621a9809e8f9a0c711fccec07ffb4f43131cc423 | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-2/c19541276c8f809733d4587fdcc04a8c7add54b3-<draw_text>-bug.py | 4b03e81403d0a80992ec3ff20502160971ac0508 | [] | 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 | 1,744 | py |
def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
s = common_texification(s)
prop_cmds = _font_properties_str(prop)
s = ('%s %s' % (prop_cmds, s))
writeln(self.fh, '\\begin{pgfscope}')
alpha = gc.get_alpha()
if (alpha != 1.0):
writeln(self.fh, ('\\pgfsetfillopaci... | [
"[email protected]"
] | |
3b96e5ce191ac951020d3af07454faec70bbb18a | 6879a8596df6f302c63966a2d27f6b4d11cc9b29 | /abc/problems030/021/b.py | 8a85c8e452bae3d0deb92785c327dd6922669e59 | [] | no_license | wkwkgg/atcoder | 41b1e02b88bf7a8291b709306e54cb56cb93e52a | 28a7d4084a4100236510c05a88e50aa0403ac7cd | refs/heads/master | 2020-07-26T03:47:19.460049 | 2020-03-01T18:29:57 | 2020-03-01T18:29:57 | 208,523,188 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 165 | py | N = int(input())
A, B = map(int, input().split())
K = int(input())
P = list(map(int, input().split()))
print("YES" if len(P) + 2 == len(set(P + [A, B])) else "NO")
| [
"[email protected]"
] | |
82449f43a77d7008703082bf0d83768860297c65 | bd48e8af13abb5a8574b47ea3337e64a45e8f672 | /nanum/search/apis.py | c9621326855333e4e5c41e1bd2a515cdc0b21840 | [] | no_license | markui/nanum-project | d221cacfaed9d6e2e882f3d4f29dc77055a4e97b | 399064b62a7c8049b37efd77a98f17a903754070 | refs/heads/master | 2021-09-08T08:03:30.667750 | 2018-01-09T07:06:11 | 2018-01-09T07:06:11 | 110,780,979 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,510 | py | from rest_framework import generics, permissions
from rest_framework.exceptions import ParseError
from rest_framework.response import Response
from rest_framework.views import APIView
from topics.models import Topic
from topics.serializers import TopicSerializer
from . import search
class TopicSearchAPIView(generics... | [
"[email protected]"
] | |
9b9afbb047cf6727bb42595fed496738377aa805 | 64c6134c2873ded7e84b93f10162fb6f27f25139 | /PPPDebug.py | 30ce0f3868cb09886d2cbb64b184695648871941 | [
"BSD-2-Clause"
] | permissive | umd-lhcb/UT-Aux-mapping | 1c22e1aec6eeefaa9d54f0cc48486a8162784c99 | 69f611f133ddcf1df18a9256c9ba1e9a577c1019 | refs/heads/master | 2022-01-19T11:54:26.101859 | 2022-01-09T04:31:49 | 2022-01-09T04:31:49 | 162,521,821 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,246 | py | #!/usr/bin/env python
#
# Author: Yipeng Sun
# License: BSD 2-clause
# Last Change: Fri May 28, 2021 at 03:43 AM +0200
from pathlib import Path
from itertools import permutations
from collections.abc import Iterable
from pyUTM.io import WirelistNaiveReader, PcadNaiveReader
from UT_Aux_mapping.const import input_dir
... | [
"[email protected]"
] | |
de8847b98859f45a2aa099cc3edc51818cb87fd7 | fbcdb3e66f9fce9bf8596ae9f28e14ad23da30a2 | /lib/elf/header.py | 53d8e10256a8ee921189b7ecba34a03f83eb3a03 | [
"BSD-2-Clause"
] | permissive | arizvisa/syringe | 38349e6ff81bc1d709d520b8a8d949a47a3b5f6c | e02b014dc764ed822288210248c9438a843af8a9 | refs/heads/master | 2023-08-18T11:44:50.096141 | 2023-08-16T21:15:58 | 2023-08-16T21:15:58 | 22,565,979 | 36 | 9 | BSD-2-Clause | 2021-05-24T19:38:31 | 2014-08-03T03:24:16 | Python | UTF-8 | Python | false | false | 23,782 | py | import ptypes, time, datetime, functools, operator, bisect
from . import EV_, E_IDENT, section, segment
from .base import *
class ET_(pint.enum, Elf32_Half):
_values_ = [
('NONE', 0),
('REL', 1),
('EXEC', 2),
('DYN', 3),
('CORE', 4),
# ET_LOOS(0xfe00) - ET_HIOS(0xfef... | [
"[email protected]"
] | |
d68fe861a80437aa7df982272ee1d513723f0492 | 69582e48fd7965df3f769c52e27caf0868a09e93 | /lista1/roberta/questao4.py | 23e35af4384697af77761db66b666f007e2d6d4d | [] | no_license | yurimalheiros/IP-2019-2 | b591cd48fd8f253dfd17f2f99d5a2327b17432c2 | 25b9e5802709a7491933d62d8300cbd7c3ef177f | refs/heads/master | 2020-09-18T16:59:50.937764 | 2020-02-26T15:42:41 | 2020-02-26T15:42:41 | 224,156,588 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 508 | py | # Função Definir alarme
# Autor Roberta de Lima
from datetime import datetime, timedelta
# Função Estática
print("ALARME")
dt = datetime(2019,11,3, 14)
hrAlarme = dt + timedelta(hours=51)
print("Sendo 14hrs, daqui a 51hrs o alarme tocará às ",hrAlarme.strftime("%H:%M "))
# Função dinâmica
#tempo = int... | [
"[email protected]"
] | |
245e30a12a1d2ad46ca40d3018cb3e900a6d25a6 | 24f664aa2344d4f5d5e7b048ac4e85231715c4c8 | /experimental/dsmith/glsl/generators.py | 145d0ae0ab124b97f48c357842f95e93fd61bc24 | [] | no_license | speycode/clfuzz | 79320655e879d1e0a06a481e8ec2e293c7c10db7 | f2a96cf84a7971f70cb982c07b84207db407b3eb | refs/heads/master | 2020-12-05T13:44:55.486419 | 2020-01-03T14:14:03 | 2020-01-03T14:15:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,783 | py | #
# Copyright 2017, 2018 Chris Cummins <[email protected]>.
#
# This file is part of DeepSmith.
#
# DeepSmith is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your opt... | [
"[email protected]"
] | |
c7ba61c0a3b5a899b8ee49ba4ba2fc8900cae79b | b1f748d761751e89f62cf5b8a2b13adac5bf3a29 | /setprice/apps.py | f40a45dfd11be0925a3a5178812e4788c49ae528 | [] | no_license | sangeeth-subramoniam/buildingmanagementheroku | 7b77be693fa73dbd2dff9c816bf50daf1e501029 | db26de549f7088d2ff80a303abeeaaa548d43e0b | refs/heads/master | 2023-07-08T13:46:06.384694 | 2021-08-10T06:50:14 | 2021-08-10T06:50:14 | 392,492,925 | 0 | 0 | null | 2021-08-04T02:46:57 | 2021-08-04T00:14:10 | Python | UTF-8 | Python | false | false | 148 | py | from django.apps import AppConfig
class SetpriceConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'setprice'
| [
"[email protected]"
] | |
97a357ea5ffdef6f835f86617addc0cc7f749d5c | 87d5b21265c381104de8f45aa67842a4adc880eb | /257. Binary Tree Paths.py | 51ff3604e23dc618adedd7bd3014b6538442da6f | [] | no_license | MYMSSENDOG/leetcodes | ac047fe0d951e0946740cb75103fc94aae967166 | 8a52a417a903a0742034161471a084bc1e494d68 | refs/heads/master | 2020-09-23T16:55:08.579319 | 2020-09-03T19:44:26 | 2020-09-03T19:44:26 | 225,543,895 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 865 | py | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
from tree_node_lib import *
class Solution:
def binaryTreePaths(self, root: TreeNode) :
if not root:
return []
ret = []
... | [
"[email protected]"
] | |
3828a0b1c4613505ab9b4cda45351013c7a86543 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03608/s343365481.py | d46c782a99ce70c039b4156e5d7b06c88335bcd8 | [] | 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 | 644 | py | import itertools
n, m, r = map(int, input().split())
d = [[float('inf')]*n for _ in range(n)]
rs = list(map(int, input().split()))
for _ in range(m):
a, b, t = map(int, input().split())
a -= 1
b -= 1
d[a][b] = t
d[b][a] = t
for i in range(n):
d[i][i] = 0
def warshall_floyd(d):
#d[i][j]: iからjへの最短距離
for ... | [
"[email protected]"
] | |
60210a71a62757ae874cc9ded2d4021e2125873f | 86df33d911606ecae9996752d79b530a124c472b | /hipsr-converter-tandem.py | 0147ac8002f3f239f71b190911e4b8564052e80f | [] | no_license | telegraphic/hipsr_reduction | 905248c004e46ad7e62d05652e831c0913b32b90 | 1ec8e8877f68ee6d4ba0c7c103015c7749400280 | refs/heads/master | 2020-05-20T10:56:43.677174 | 2019-01-31T05:57:57 | 2019-01-31T05:57:57 | 9,489,410 | 0 | 0 | null | 2019-01-31T05:57:58 | 2013-04-17T04:48:16 | Python | UTF-8 | Python | false | false | 8,541 | py | #!/usr/bin/env python
"""
hipsr-converter.py
==================
This script starts a graphical user interface for converting HIPSR + MBCORR data to SD-FITS.
Use this script when converting HIPSR + MBCORR data taken in tandem.
"""
# Imports
import sys
from lib.sdfits import *
from lib import eager_weaver
try:
fr... | [
"[email protected]"
] | |
998f5b3d89a07a14d7dc41bd878db07e4902b536 | 6022fcef8175c71e3f9d702fc7098eee2a3eb9ac | /game/steam/review.py | adc766e91db223836ccb85b430ef0afc1fcb34f9 | [] | no_license | yxw19870806/Py3Crawler | f8fe8d68138dcfe3c63cc086d8b0042c814eab20 | e79889d0dbc13df90bca29e616ca5024ad2cdf18 | refs/heads/master | 2023-08-22T19:19:43.458412 | 2023-05-17T06:15:31 | 2023-05-17T06:15:31 | 139,689,380 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,030 | py | # -*- coding:UTF-8 -*-
"""
获取steam可以发布评测的游戏
https://store.steampowered.com/
@author: hikaru
email: [email protected]
如有问题或建议请联系
"""
import os
from common import *
from game.steam.lib import steam
# 打印列表
# print_type 0 全部游戏
# print_type 1 只要本体
# print_type 2 只要DLC
# print_type 3 只要本体已评测的DLC
def print_list(... | [
"[email protected]"
] | |
12d4022463c4e14e4a8d07430052771096ea3c82 | 48894ae68f0234e263d325470178d67ab313c73e | /sa/profiles/Supertel/K2X/get_arp.py | 000b19c788f9e60b4779efc75da73afe20e2447b | [
"BSD-3-Clause"
] | permissive | DreamerDDL/noc | 7f949f55bb2c02c15ac2cc46bc62d957aee43a86 | 2ab0ab7718bb7116da2c3953efd466757e11d9ce | refs/heads/master | 2021-05-10T18:22:53.678588 | 2015-06-29T12:28:20 | 2015-06-29T12:28:20 | 118,628,133 | 0 | 0 | null | 2018-01-23T15:19:51 | 2018-01-23T15:19:51 | null | UTF-8 | Python | false | false | 2,424 | py | # -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## Supertel.K2X.get_arp
##----------------------------------------------------------------------
## Copyright (C) 2007-2014 The NOC Project
## See LICENSE for details
##------------------------------------------------------... | [
"[email protected]"
] | |
e193c720a834640102192c91e1ebc0f7a0c50778 | 8fa191cd4a67431a04eff62d35122ee83cc7b0af | /bookwyrm/migrations/0100_shelf_description.py | 18185b17def91702d69be55cd555a444186df05a | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | bookwyrm-social/bookwyrm | 24678676a7a58dba96641194dfae3fffbf01574d | 0f8da5b738047f3c34d60d93f59bdedd8f797224 | refs/heads/main | 2023-08-20T21:45:30.957277 | 2023-08-19T23:41:50 | 2023-08-19T23:41:50 | 236,415,735 | 1,398 | 216 | NOASSERTION | 2023-09-08T20:43:06 | 2020-01-27T03:51:54 | Python | UTF-8 | Python | false | false | 416 | py | # Generated by Django 3.2.5 on 2021-09-28 23:20
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0099_readthrough_is_active"),
]
operations = [
migrations.AddField(
model_name="shelf",
name="descriptio... | [
"[email protected]"
] | |
ed78e6a932f361509c7b2a9d7e57906f6d9a5d0f | b0485dc3e30dc0170391e131ec00ccb335768817 | /_build.py | afeb10aaecab2d7aba8fdf9720bc4faddcca2854 | [] | no_license | leisvip/djc_helper | 8a54483780bcb6ec3a5316a869d5652cfad393f7 | 9e5982047ce6db05f09db3d81e7f4df6303f21d7 | refs/heads/master | 2023-06-25T07:06:13.307176 | 2021-07-19T02:09:09 | 2021-07-19T02:09:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,837 | py | # 编译脚本
import argparse
import os
import shutil
import subprocess
from _init_venv_and_requirements import init_venv_and_requirements
from log import logger, color
from util import human_readable_size, show_head_line
def build(disable_douban=False):
# 初始化相关路径变量
venv_path = ".venv"
pyinstaller_path = os.pat... | [
"[email protected]"
] | |
42e95b4be95d83bcba4b00923df10849d38dd895 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03393/s345995802.py | 343e2097a0d4f2b25bd715fd2830e3222965ec14 | [] | 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 | 419 | py | S = input()
se = set()
for s in S:
se.add(s)
if len(S) < 26:
for i in range(26):
s = chr(ord('a')+i)
if not s in se:
print(S+s)
exit()
else:
while len(S) > 1:
se.remove(S[-1])
S = S[:-1]
for i in range(ord(S[-1]), ord('z')+1):
s = c... | [
"[email protected]"
] | |
2cc201cf266ff314089da1d203b0b3d0cc31fdfd | 1b862f34c125ce200244dd79e4fda4b5b605ce2e | /.history/images_20210218000603.py | 0a459524a8dabc3b90e7a0501798a67b7e4b69cb | [] | no_license | edwino26/CoreImages | 26085a49cf1cb79442ae563a88354b2fdceace87 | 6bf6e68cac8ab36c87b1e6ea702bfe6882b0f40e | refs/heads/master | 2023-06-22T12:53:37.344895 | 2021-07-21T04:31:44 | 2021-07-21T04:31:44 | 309,553,247 | 0 | 4 | null | 2021-04-29T23:23:15 | 2020-11-03T02:45:07 | Lasso | UTF-8 | Python | false | false | 2,563 | py | import os
clear = lambda : os.system('cls')
#
# %%
import glob
import cv2
import os.path
import numpy as np
import matplotlib.pyplot as plt
# %%
cores_per_image = 6
uvFiles = glob.glob('./Photos/*.jpg')
print(uvFiles)
# Picture path
img = cv2.imread(uvFiles[0].replace('./Photos/',''))
print(img)
a = []
b = [... | [
"[email protected]"
] | |
7aaf30d580238668767fc362313bb0f9006f72eb | a838d4bed14d5df5314000b41f8318c4ebe0974e | /sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_configuration.py | b419fc134f8d50033f2cbf5f5c9a6e3c66cd4704 | [
"MIT",
"LicenseRef-scancode-generic-cla",
"LGPL-2.1-or-later"
] | permissive | scbedd/azure-sdk-for-python | ee7cbd6a8725ddd4a6edfde5f40a2a589808daea | cc8bdfceb23e5ae9f78323edc2a4e66e348bb17a | refs/heads/master | 2023-09-01T08:38:56.188954 | 2021-06-17T22:52:28 | 2021-06-17T22:52:28 | 159,568,218 | 2 | 0 | MIT | 2019-08-11T21:16:01 | 2018-11-28T21:34:49 | Python | UTF-8 | Python | false | false | 3,264 | 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 ... | [
"[email protected]"
] | |
e0a1f5a316d34042d099a185a757946ab5667625 | 3f99756553008745dcac63da942c8afe189a0bbb | /src/common/debug.py | 2c2a20b77c88f20d2287098df133eea0833a9ebc | [] | no_license | hekaistorm/DQN_wechat_jump_AI | b34e1d15486e4f6884221e68cb110f4b5f8fcaa6 | 2dc71f22e234bc17dd280d309103e84596754588 | refs/heads/master | 2020-09-06T09:05:59.478004 | 2018-02-04T05:28:06 | 2018-02-04T05:28:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,185 | py | # -*- coding: utf-8 -*-
"""
这儿是debug的代码,当DEBUG_SWITCH开关开启的时候,会将各种信息存在本地,方便检查故障
"""
import os
import sys
import shutil
from PIL import ImageDraw
# 用来保存每一次的图片
screenshot_backup_dir = '../data/backups/'
def make_debug_dir(screenshot_backup_dir):
"""
创建备份文件夹
"""
if not os.path.isdir(screenshot_backup_dir... | [
"[email protected]"
] | |
ee4e5ba67072d17cb87c3d167e85dfec37495d32 | bac37a96ead59a3c4caaac63745d5748f5060195 | /第9章 异常/异常4.py | 7086b6c235bbdfbd54433b2b3796687261036263 | [] | no_license | pod1019/python_learning | 1e7d3a9c10fc8c1b4e8ff31554d495df518fb385 | a15213d33a253c3a77ab0d5de9a4f937c27693ca | refs/heads/master | 2020-09-14T11:11:53.100591 | 2020-04-11T04:00:27 | 2020-04-11T04:00:27 | 223,112,718 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 500 | py | # 多个except结构
try:
a = input("请输入被除数:")
b = input("请输入除数:")
c = float(a)/float(b)
print("两数相除的结果是:",c)
except ZeroDivisionError:
print("异常:除数不能为0")
except TypeError:
print("异常:除数和被除数都应该为数值类型")
except NameError:
print("异常:变量不存在")
except BaseException as e:
print(e)
print(type(e))
fina... | [
"[email protected]"
] | |
8336f14eb60ba8b70f687a50cfcfb4356b0cb70a | 9360aeefb3605a3fe0c5e512e52ec3bc0942903f | /app.py | 7527e6647e891d5f6706d20edee3162f0ce7496d | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | eliaswalyba/facebound | 1ff7dc32cc4bf50d14f2e6434af2adfb14300245 | 92500e61b1bc50702ea339563ee8b38b55a31169 | refs/heads/master | 2022-07-01T17:42:02.360416 | 2020-05-08T15:23:03 | 2020-05-08T15:23:03 | 262,851,606 | 0 | 0 | MIT | 2020-05-10T18:37:03 | 2020-05-10T18:37:02 | null | UTF-8 | Python | false | false | 3,484 | py |
import cv2, os
import numpy as np
import streamlit as st
import matplotlib.pyplot as plt
from PIL import Image, ImageEnhance
@st.cache
def load_image(img):
im = Image.open(img)
return im
FACE_CASCADE_PATH = '/algos/haarcascade_frontalface_default.xml'
face_cascade = cv2.CascadeClassifier(FACE_CASCADE_PATH )... | [
"[email protected]"
] | |
fd07de3d5d3a2288f381e55246f4331593b092d8 | f4b8c90c1349c8740c1805f7b6b0e15eb5db7f41 | /test/test_room_space_inventory_status_item.py | 832bf42dbe4715ab3e1fb79003804c3340495d2d | [] | no_license | CalPolyResDev/StarRezAPI | 012fb8351159f96a81352d6c7bfa36cd2d7df13c | b184e1863c37ff4fcf7a05509ad8ea8ba825b367 | refs/heads/master | 2021-01-25T10:29:37.966602 | 2018-03-15T01:01:35 | 2018-03-15T01:01:35 | 123,355,501 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,152 | py | # coding: utf-8
"""
StarRez API
This is a way to connect with the StarRez API. We are not the developers of the StarRez API, we are just an organization that uses it and wanted a better way to connect to it. # noqa: E501
OpenAPI spec version: 1.0.0
Contact: [email protected]
Generated by: https... | [
"[email protected]"
] | |
12bc7081611f0cf4e76ac1ca7877c8802cf8993e | 61673ab9a42f7151de7337608c442fa6247f13bb | /pyqtgraph/TextItem/main.py | cee6f112509d051cd992e54fb2b7de2352ab1089 | [
"MIT"
] | permissive | furas/python-examples | 22d101670ecd667a29376d7c7d7d86f8ec71f6cf | 95cb53b664f312e0830f010c0c96be94d4a4db90 | refs/heads/master | 2022-08-23T23:55:08.313936 | 2022-08-01T14:48:33 | 2022-08-01T14:48:33 | 45,575,296 | 176 | 91 | MIT | 2021-02-17T23:33:37 | 2015-11-04T23:54:32 | Python | UTF-8 | Python | false | false | 268 | py | from PyQt5 import QtGui
import pyqtgraph as pg
app = QtGui.QApplication([])
x = [1,2,3,4,5]
y = [0,3,1,2,0]
plotWidget = pg.plot()
plotWidget.plot(x, y)
text = pg.TextItem("Hello World", color='f00')
plotWidget.addItem(text)
text.setPos(3, 2)
app.exec_()
| [
"[email protected]"
] | |
86c01d24c8a65bb62895d8f7fd5b4121e6227f36 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_032/ch15_2020_03_09_16_43_39_394880.py | d97f1bf48a978c5d3d9d2f3b83f3fff684be1147 | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 132 | py | NOME=input('Digite o seu nome:')
if NOME == 'Chris':
print('Todo mundo odeia o Chris')
else:
print('Olá, {0}'.format(NOME)) | [
"[email protected]"
] | |
a0ed7cbed9ef438cd2a8f009ffb45f28b0f19996 | c9ddbdb5678ba6e1c5c7e64adf2802ca16df778c | /cases/synthetic/sieve-big-1515.py | fd70e3a1a249fdf5f31490f6386c64d3a7cd4f0b | [] | no_license | Virtlink/ccbench-chocopy | c3f7f6af6349aff6503196f727ef89f210a1eac8 | c7efae43bf32696ee2b2ee781bdfe4f7730dec3f | refs/heads/main | 2023-04-07T15:07:12.464038 | 2022-02-03T15:42:39 | 2022-02-03T15:42:39 | 451,969,776 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 31,755 | py | # A resizable list of integers
class Vector(object):
items: [int] = None
size: int = 0
def __init__(self:"Vector"):
self.items = [0]
# Returns current capacity
def capacity(self:"Vector") -> int:
return len(self.items)
# Increases capacity of vector by one element
def incr... | [
"[email protected]"
] | |
95b99eeeb62fe5d5845a1d7211ce8f29cf1115e8 | 64d1211404c89da4e09d77d859f2cdf6609a057e | /models/official/nlp/bert/model_training_utils_test.py | 1940a764e46a11fba48b6faab7706797c15bace1 | [
"Apache-2.0"
] | permissive | Nerfertili/Deep_learning_learning_udemy | f375209e0675ab8f4da9551d8a5bdee4f2948ed8 | 0fe6c1f36019b29151acb17a1f248b34d6089aeb | refs/heads/master | 2023-02-17T10:10:52.536426 | 2021-01-19T02:48:23 | 2021-01-19T02:48:23 | 330,823,730 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 12,085 | py | # Copyright 2019 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... | [
"[email protected]"
] | |
f05afaefedd21c8a8362d23218c7eb4c9d7ffa0f | 1ffc17893d9e15fd939628bbc41c3d2633713ebd | /docs/tests/test_documentation_tutorial.py | d607bf9a8a7c3372aaf0f4fa1cdc37a04f40be05 | [
"Apache-2.0"
] | permissive | xadupre/sklearn-onnx | 646e8a158cdded725064964494f0f8a760630aa8 | b05e4864cedbf4f2a9e6c003781d1db8b53264ac | refs/heads/master | 2023-09-01T15:58:38.112315 | 2022-12-21T01:59:45 | 2022-12-21T01:59:45 | 382,323,831 | 0 | 2 | Apache-2.0 | 2023-01-04T13:41:33 | 2021-07-02T11:22:00 | Python | UTF-8 | Python | false | false | 3,935 | py | # SPDX-License-Identifier: Apache-2.0
"""
Tests examples from the documentation.
"""
import unittest
import os
import sys
import importlib
import subprocess
def import_source(module_file_path, module_name):
if not os.path.exists(module_file_path):
raise FileNotFoundError(module_file_path)
module_spec... | [
"[email protected]"
] | |
49c6cbd957b72bbe58f4d43230aeb3420ad6a399 | fad392b7b1533103a0ddcc18e059fcd2e85c0fda | /install/px4_msgs/lib/python3.6/site-packages/px4_msgs/msg/_ulog_stream_ack.py | 70bef6edd37055221ffb8d9a6fa0096b1b9e0d97 | [] | no_license | adamdai/px4_ros_com_ros2 | bee6ef27559a3a157d10c250a45818a5c75f2eff | bcd7a1bd13c318d69994a64215f256b9ec7ae2bb | refs/heads/master | 2023-07-24T18:09:24.817561 | 2021-08-23T21:47:18 | 2021-08-23T21:47:18 | 399,255,215 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 103 | py | /home/navlab-tx2-4/px4_ros_com_ros2/build/px4_msgs/rosidl_generator_py/px4_msgs/msg/_ulog_stream_ack.py | [
"[email protected]"
] | |
d9918150ac573b71d76f30a0003d5f85cfd22438 | b76f7cd15857016c9b7d7a444488f0e122d90109 | /dongyeop/2020.07.29.py | cf15c73be6e0f913cef857e2272ff3985ff1f911 | [] | no_license | eunjin917/Summer-Algorithm-Merge | 705e5a8837898a27911d8270799a37e6360262f5 | d2e11873dac7745e8d662c3d7b4ff34570e1286d | refs/heads/master | 2023-03-23T22:02:18.957706 | 2020-08-29T14:00:50 | 2020-08-29T14:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 140 | py | #개인 퀴즈 서울에서 김서방 찾기
def solution(seoul):
return ("김서방은 {}에 있다".format(seoul.index('Kim')))
| [
"[email protected]"
] | |
25eb28da4c15af658689383ec67271d21e30711e | 2e145222a18d4509d937951f5cec4df0e26ee86f | /vas/sqlfire/AgentInstances.py | c7014e3358ef52496bfff95762d437cb06c53a4c | [
"Apache-2.0"
] | permissive | vdreamakitex/vas-python-api | 7627b7e3fcf76c16b1ea8b9fb670fdb708eff083 | ce7148a2044863e078e78b47abbaafc426f732ee | refs/heads/master | 2021-01-18T05:13:25.459916 | 2012-11-05T09:58:45 | 2012-11-05T09:58:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,711 | py | # vFabric Administration Server API
# Copyright (c) 2012 VMware, Inc. 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
... | [
"[email protected]"
] | |
205101325b29051add4fec00ed7a7ca59766cd56 | f1e7c31d22ee90e5e3705352170388c09b7470d4 | /day2/decorator4.py | 69c18443a573abae91c47ec9c78ea8ce44331c52 | [] | no_license | taizilinger123/apple | d0b58eb184d4a7c5aec674e914fa67139d2419ca | 285c10eedfa0863ad6d51efb9dea5c7d0ae540a6 | refs/heads/master | 2020-03-28T07:54:50.118668 | 2018-09-09T05:37:12 | 2018-09-09T05:37:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 499 | py | import time
def timer(func): #timer(test1) func=test1
def deco(*args,**kwargs):
start_time=time.time()
func(*args,**kwargs) #run test1()
stop_time=time.time()
print("the func run time is %s" %(stop_time-start_time))
return deco
@timer #test1=timer(test1)
def test1():
ti... | [
"[email protected]"
] | |
9a7fc8e23d82ffb80c491b1e51e26e71ab025f91 | ce18cf6bdb1a85a65a509597b4c0ec046b855186 | /2020年12月/换酒问题.py | 2aae2a3d340b6efc017fbb7a2722d70f2ee89088 | [] | no_license | elssm/leetcode | e12e39faff1da5afb234be08e7d9db85fbee58f8 | a38103d2d93b34bc8bcf09f87c7ea698f99c4e36 | refs/heads/master | 2021-06-11T06:44:44.993905 | 2021-04-28T06:14:23 | 2021-04-28T06:14:23 | 171,072,054 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 376 | py | class Solution(object):
def numWaterBottles(self, numBottles, numExchange):
"""
:type numBottles: int
:type numExchange: int
:rtype: int
"""
res=numBottles
while numBottles//numExchange:
res+=numBottles//numExchange
numBottles=numBottle... | [
"[email protected]"
] | |
19051aed542c9f4efa751cfbf4908783c1d3215e | dd0d2a4da64200a7bea42d23122384189b900850 | /common_digit.py | 64c95fda4c01ff6bdc0db9231dae66fbd66e46a4 | [] | no_license | gakkistyle/comp9021 | 06ad00b47b7b0135013b014464b5f13530cad49d | 4d0d4a2d719745528bf84ed0dfb88a43f858be7e | refs/heads/master | 2022-09-24T13:10:29.609277 | 2020-06-06T16:54:42 | 2020-06-06T16:54:42 | 270,043,710 | 14 | 7 | null | null | null | null | UTF-8 | Python | false | false | 770 | py | def average_of_digits(digit=None):
if digit == None:
return -1
if len(digit) == 1:
digit_set = set(str(digit[0]))
sum = 0
for e in digit_set:
sum += int(e)
return sum/len(digit_set)
common = []
word_set1 = set(str(digit[0]))
word_set2 = set(str(dig... | [
"[email protected]"
] | |
b5ce86e5c7206e0947b0bcb912983f891ecd0ce1 | 6df76f8a6fcdf444c3863e3788a2f4b2c539c22c | /django code/p109/p109/asgi.py | dbabed799f89d9fe7ba5076c4cdafffb94c9e6d1 | [] | no_license | basantbhandari/DjangoProjectsAsDocs | 068e4a704fade4a97e6c40353edb0a4299bd9678 | 594dbb560391eaf94bb6db6dc07702d127010b88 | refs/heads/master | 2022-12-18T22:33:23.902228 | 2020-09-22T13:11:01 | 2020-09-22T13:11:01 | 297,651,728 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 385 | py | """
ASGI config for p109 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.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS... | [
"[email protected]"
] | |
c357997cbb60325855930257b942fbd28f13b1d8 | 6130f811f3acfcb9f60939d8752bb035cadaf928 | /examples/adspygoogle/dfp/v201311/order_service/update_orders.py | 24750560181ff34e7c6f4beb06d0f96e0cb10b50 | [
"Apache-2.0"
] | permissive | gsembi/googleads-python-legacy-lib | f2e3197413c23c1192b11e54bf78c087f04a2baa | 9de235ffb65d014dd6ba22be50659c910eca5ae2 | refs/heads/master | 2021-01-23T23:38:28.076465 | 2014-10-14T20:38:20 | 2014-10-14T20:38:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,707 | py | #!/usr/bin/python
#
# Copyright 2013 Google Inc. 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... | [
"[email protected]"
] | |
ac8f9f2c4057ab0711a7c50124f020d7bd010361 | 5479cdac56abc115d3b52fbd31814dfd27262da7 | /TaobaoSdk/Request/MarketingPromotionsGetRequest.py | 5cd18fc86d83e7ffabe7feb005d71b73b4f75e98 | [] | no_license | xuyaoqiang-maimiao/TaobaoOpenPythonSDK | d9d2be6a7aa27c02bea699ed5667a9a30bf483ab | c82cde732e443ecb03cfeac07843e884e5b2167c | refs/heads/master | 2021-01-18T07:49:57.984245 | 2012-08-21T07:31:10 | 2012-08-21T07:31:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,100 | py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim: set ts=4 sts=4 sw=4 et:
## @brief 根据商品ID查询卖家使用该第三方工具对商品设置的所有优惠策略
# @author [email protected]
# @date 2012-08-09 12:36:54
# @version: 0.0.0
import os
import sys
import time
def __getCurrentPath():
return os.path.normpath(os.path.join(os.path.realpath(... | [
"[email protected]"
] | |
5f8dc7f6ee3faba3e195cb8bd5c54cebab04e678 | 6eb282bbe4d43273b9e9cc8c0fa79400888cba9e | /tests/test_routes_image.py | e98c7912a9f48cdf2e6d390350ecba8cd232dc51 | [
"MIT"
] | permissive | jdelgad/memegen | d4300c707c5fee59aa2f5c5e0e8e606d699255ef | 0de8e5d6bfae75843bbe0d149c7796cb044e24a7 | refs/heads/master | 2020-12-25T08:51:20.523408 | 2016-06-10T13:50:46 | 2016-06-10T13:50:46 | 60,996,119 | 1 | 0 | null | 2016-06-13T00:30:19 | 2016-06-13T00:30:19 | null | UTF-8 | Python | false | false | 7,191 | py | # pylint: disable=unused-variable,misplaced-comparison-constant,expression-not-assigned
import os
import pytest
from expecter import expect
from .conftest import load
TESTS = os.path.dirname(__file__)
ROOT = os.path.dirname(TESTS)
IMAGES = os.path.join(ROOT, "data", "images")
LATEST = os.path.join(IMAGES, "latest.j... | [
"[email protected]"
] | |
b5e23c5c655c526644f144779516ce18dd7a353e | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/97/usersdata/194/54823/submittedfiles/lecker.py | f56acb6233287f3cbe81bfd2b3aa0164580158d3 | [] | 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 | 824 | py | # -*- coding: utf-8 -*-
from __future__ import division
def lecker(lista):
cont=0
for i in range(0,len(lista)-1,1):
if i==0:
if lista[i]>lista[i+1]:
cont=cont+1
elif i==(len(lista)-1):
if lista[i]>lista[i-1]:
cont=cont+1
else:
... | [
"[email protected]"
] | |
8aac474ed41ab941cc830699ba847bd56a96843a | 7698a74a06e10dd5e1f27e6bd9f9b2a5cda1c5fb | /zzz.masterscriptsTEB_GIST/for005md.py | 5c2e1af3abcf60dbbdff817943ffd3a973318e9a | [] | no_license | kingbo2008/teb_scripts_programs | ef20b24fe8982046397d3659b68f0ad70e9b6b8b | 5fd9d60c28ceb5c7827f1bd94b1b8fdecf74944e | refs/heads/master | 2023-02-11T00:57:59.347144 | 2021-01-07T17:42:11 | 2021-01-07T17:42:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,330 | py | import sys
import copy
import math
import matplotlib
import scipy
import numpy
import pylab
def read_MD_outfile(filename,totE, kE, pE, time, temp, pres):
fileh = open(filename,'r')
result_flag = False
count = 0
for line in fileh:
line = line.strip('\n')
splitline = line.split()
... | [
"[email protected]"
] | |
7bfaaf0db70cf0354f13f8bb62ab277d818e5da2 | 972dff80b81c78082e9022084ef75e954b204471 | /gui/system/alertmods/volume_status.py | 44a265cdb00c201d6b3499a3c0ac6c890b8daed5 | [] | no_license | TomHoenderdos/freenas | 34bbf9957ed5904f1296af5a57eedc95e04f1074 | 83ae0c1805ea7e57b70f436810eca3b9cc0c9825 | refs/heads/master | 2021-01-17T09:29:19.668079 | 2014-01-28T01:58:23 | 2014-01-28T01:58:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,124 | py | import re
import subprocess
from django.utils.translation import ugettext_lazy as _
from freenasUI.storage.models import Volume
from freenasUI.system.alert import alertPlugins, Alert, BaseAlert
class VolumeStatusAlert(BaseAlert):
def on_volume_status_not_healthy(self, vol, status, message):
if message:... | [
"[email protected]"
] | |
a6fa412a4318bdd44745d738c2d2aa91cac8f9d2 | 277b9292d494db49836c93693257ecab87ebeb18 | /ynlu/sdk/evaluation/tests/test_entity_overlapping_ratio.py | 541945abbd95063fa16157907ee1d43443903ffe | [
"MIT"
] | permissive | hsiaoyi0504/yoctol-nlu-py | 90c2df421994006a49a4db7fe6f104d247201fbd | 4cec8d52ba3dd7827bddde152c95e814e533c0f2 | refs/heads/master | 2020-03-23T23:41:40.055683 | 2018-04-19T08:57:42 | 2018-04-19T08:57:42 | 142,249,617 | 0 | 0 | MIT | 2018-07-25T05:00:05 | 2018-07-25T05:00:05 | null | UTF-8 | Python | false | false | 6,265 | py | from unittest import TestCase
from ..entity_overlapping_score import (
single__entity_overlapping_score,
entity_overlapping_score,
)
class OverlappingScoreTestCase(TestCase):
def test_single__entity_overlapping_score_different_length(self):
with self.assertRaises(ValueError):
single__... | [
"[email protected]"
] | |
7ffcb76ec73333e2ac89d9c1b17839de77716f5e | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/420/usersdata/329/87976/submittedfiles/exe11.py | 715adcb70c57813e5b1796b83f844bcbc85024f3 | [] | 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 | 244 | py | # -*- coding: utf-8 -*-
n = int(input("digite um numero com 8 algarismos: "))
soma = 0
while n < 10000000 and n > 9999999:
resto = n % 10
n = (n - resto)/10
soma = soma + resto
print ('%d' % soma)
else:
print("NAO SEI")
| [
"[email protected]"
] | |
85872ca81454d863e57c47043a303a247a75e42d | 2a8abd5d6acdc260aff3639bce35ca1e688869e9 | /telestream_cloud_qc_sdk/telestream_cloud_qc/models/frame_aspect_ratio_test.py | e350d1d1f34c6e4931d4824fe21895777c5735ce | [
"MIT"
] | permissive | Telestream/telestream-cloud-python-sdk | 57dd2f0422c83531e213f48d87bc0c71f58b5872 | ce0ad503299661a0f622661359367173c06889fc | refs/heads/master | 2021-01-18T02:17:44.258254 | 2020-04-09T11:36:07 | 2020-04-09T11:36:07 | 49,494,916 | 0 | 0 | MIT | 2018-01-22T10:07:49 | 2016-01-12T11:10:56 | Python | UTF-8 | Python | false | false | 6,377 | py | # coding: utf-8
"""
Qc API
Qc API # noqa: E501
The version of the OpenAPI document: 3.0.0
Contact: [email protected]
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from telestream_cloud_qc.configuration import Configuration
class... | [
"[email protected]"
] | |
ed7b5fcf55324e383b99dd8f860e850435b47ada | 0faf534ebb6db6f32279e5bee25b968bd425ce3a | /tests/core/_while/_while.py | b6d827a12289764a394e2ef4beffb7579457bc29 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | PyHDI/veriloggen | e8647cb2d40737d84e31d6b89c5799bab9cbd583 | f2b1b9567150af097eed1b5e79ba2b412854ef43 | refs/heads/develop | 2023-08-09T10:02:35.626403 | 2023-08-09T00:50:14 | 2023-08-09T00:50:14 | 37,813,184 | 282 | 60 | Apache-2.0 | 2023-07-20T03:03:29 | 2015-06-21T15:05:30 | Python | UTF-8 | Python | false | false | 1,032 | py | from __future__ import absolute_import
from __future__ import print_function
import sys
import os
# the next line can be removed after installation
sys.path.insert(0, os.path.dirname(os.path.dirname(
os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))
from veriloggen import *
def mkTest():
m = Mo... | [
"[email protected]"
] | |
4541f9dcb4fab88b6bbf5c77db6b8d07c29b9cc9 | 16ccfb5d13029afde7fb5d54371c97d1866de905 | /corkscrew/version.py | 3f686add9e1a94e02216d00bd7ebc2291ef4da42 | [] | no_license | mattvonrocketstein/corkscrew | b69c32ea78f0bfe948b83a85bb4f60351e560116 | 8c992599e865aee8cfc93900a945ff5248ed1ab2 | refs/heads/master | 2021-01-01T18:42:10.205684 | 2015-11-08T09:55:45 | 2015-11-08T09:55:45 | 2,240,780 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 44 | py | """ corkscrew.version
"""
__version__=0.18 | [
"matthewvonrocketstein@gmail-dot-com"
] | matthewvonrocketstein@gmail-dot-com |
eb599ad48afd47de67a5a38758872173421836a2 | f2a0c0cad8ccc82ac00c7fa9dbf06c5fec96089c | /Student_Management/main/urls.py | b6fe5fc9e31bae12859e560cff9d8544ad9433a3 | [] | no_license | tushargoyal22/Django-Learning | 49bb0c97f6e344dae053a3c913a74c765a9a021b | eb87ac56220d7f0e1e4741cda754547180835713 | refs/heads/master | 2020-12-26T18:12:07.305533 | 2020-04-20T06:22:14 | 2020-04-20T06:22:14 | 237,585,513 | 0 | 0 | null | 2020-06-06T09:08:09 | 2020-02-01T08:31:48 | CSS | UTF-8 | Python | false | false | 497 | py | from django.urls import path
from main import views
urlpatterns = [
path('',views.Index.as_view()),
path('college/<int:pk>' , views.CollegeDetail.as_view(),name='college'),
path('colleges/',views.CollegeList.as_view()),
path('create_college/' , views.CollegeCreate.as_view()),
path('update_college/... | [
"[email protected]"
] | |
e187641d7db47cec739bd694e61860ff1f2d4b26 | a48eaa4419b87c011abdee1eebfd04b469f4417b | /.history/ghostpost/views_20200211120737.py | 0c516f78e19399fa4ac83bde5fc952b2f89adef3 | [] | no_license | Imraj423/ghostpost | 6418d6c9561528ac8c31dd70d8aae7fac4c77cca | 4edc559eb1f9ef0d11aae78e2b1dbd5c4903ddb5 | refs/heads/master | 2021-01-02T13:32:58.032239 | 2020-02-11T23:21:31 | 2020-02-11T23:21:31 | 239,644,968 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,858 | py |
from django.shortcuts import render
from django.contrib.auth.models import User
from ghostpost.models import ghostPost
from django.shortcuts import render, reverse, HttpResponseRedirect
from ghostpost.forms import addPost
def index(request):
item = ghostPost.objects.all()
return render(request, 'index.html',... | [
"[email protected]"
] | |
652e8748f26f358862132b7fc9300aa65f1f05ec | 3ff9821b1984417a83a75c7d186da9228e13ead9 | /No_0530_Minimum Absolute Difference in BST/minimum_absolute)difference_in_BST_by_inorder_iteration.py | a7418dd3d34f9db81a543e4abdb35916f72c1593 | [
"MIT"
] | permissive | brianchiang-tw/leetcode | fd4df1917daef403c48cb5a3f5834579526ad0c2 | 6978acfb8cb767002cb953d02be68999845425f3 | refs/heads/master | 2023-06-11T00:44:01.423772 | 2023-06-01T03:52:00 | 2023-06-01T03:52:00 | 222,939,709 | 41 | 12 | null | null | null | null | UTF-8 | Python | false | false | 2,094 | py | '''
Description:
Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes.
Example:
Input:
1
\
3
/
2
Output:
1
Explanation:
The minimum absolute difference is 1, which is the difference between 2 and 1 (or between 2 and 3).
No... | [
"[email protected]"
] | |
35fddb176546bcdc04b5f7168fe7656d9d16c1c5 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02675/s648199301.py | b63ed0e3bb4be52116a50e76ac3fe5f3864781f1 | [] | 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 | 332 | py | # -*- coding: utf-8 -*-
def main():
N = int(input())
case1 = [2, 4, 5, 7, 9]
case2 = [0, 1, 6, 8]
case3 = [3]
num = N % 10
if num in case1:
ans = 'hon'
elif num in case2:
ans = 'pon'
elif num in case3:
ans = 'bon'
print(ans)
if __name__ == "__main__"... | [
"[email protected]"
] | |
96a1d7b58328b30fde41e93d4831caca9bf6fc36 | 9aaa39f200ee6a14d7d432ef6a3ee9795163ebed | /Algorithm/Python/146. LRU Cache.py | 12ae61d680fa056cf718b935addad161d26c1efe | [] | no_license | WuLC/LeetCode | 47e1c351852d86c64595a083e7818ecde4131cb3 | ee79d3437cf47b26a4bca0ec798dc54d7b623453 | refs/heads/master | 2023-07-07T18:29:29.110931 | 2023-07-02T04:31:00 | 2023-07-02T04:31:00 | 54,354,616 | 29 | 16 | null | null | null | null | UTF-8 | Python | false | false | 1,259 | py | # -*- coding: utf-8 -*-
# @Author: WuLC
# @Date: 2016-08-04 22:39:03
# @Last modified by: WuLC
# @Last Modified time: 2016-08-04 22:40:49
# @Email: [email protected]
class LRUCache(object):
def __init__(self, capacity):
"""
:type capacity: int
"""
self.capacity = capacity
... | [
"[email protected]"
] | |
f86f346345b1e788b5612e8ac5f117bc6c0dbce1 | e168a4b9e7997b5266df4c1fe2afbaf0ed031fed | /url_shortener/profiles/forms.py | 470c5cd6344634922a1279b0c41660591cc5b23a | [] | no_license | AaronScruggs/urly-bird | 756eba26f21c66e78ed93bf6f936b50fb927aaef | a27314afb309de42230852fc2bd35416dece46d9 | refs/heads/master | 2021-01-22T01:18:59.907605 | 2016-04-05T07:01:53 | 2016-04-05T07:01:53 | 55,178,264 | 0 | 0 | null | 2016-03-31T19:45:02 | 2016-03-31T19:45:01 | null | UTF-8 | Python | false | false | 217 | py | from django import forms
from django.contrib.auth.models import User
from profiles.models import Profile
class ImageUpdateForm(forms.ModelForm):
class Meta:
model = Profile
fields = ("image",)
| [
"[email protected]"
] | |
a74b58b3e5974f4098f7a4932dfa112f9fedbc7e | 19ddab74600f71700a6b693281d0180d5271f295 | /程序员面试金典/01_04_回文排列.py | bc02963092c9dc8e4d739287a6103fd74aad53ce | [] | no_license | zhulf0804/Coding.Python | 4d55a430da1a8077c81feba65c13ac654aaf094a | 46ab03e23d15ebd5434ef4dd5ae99130000b00a5 | refs/heads/master | 2022-09-14T18:40:59.880941 | 2022-08-20T08:25:51 | 2022-08-20T08:25:51 | 213,113,482 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 337 | py | class Solution:
def canPermutePalindrome(self, s: str) -> bool:
d = {}
for item in s:
d[item] = d.get(item, 0) + 1
is_odd = False
for k, v in d.items():
if v & 1 == 1:
if is_odd:
return False
is_odd = True
... | [
"[email protected]"
] | |
16ae617aa0dff53873785822c7cb2db033f9590b | 494e3fbbdff5cf6edb087f3103ad5f15acbc174f | /schedule/migrations/0002_auto_20180727_2329.py | d0a6847d6321e79defcf1bfbd06aa6f38fb59def | [] | no_license | TalentoUnicamp/my | 1209048acdedbb916b8ae8ec80761d09f6ad7754 | 3d87a33cd282d97dbbbd5f62658f231456f12765 | refs/heads/master | 2020-03-23T21:12:58.316033 | 2018-08-14T06:11:36 | 2018-08-14T06:11:36 | 142,090,262 | 11 | 0 | null | 2018-08-17T05:13:26 | 2018-07-24T01:53:23 | JavaScript | UTF-8 | Python | false | false | 1,698 | py | # Generated by Django 2.0.3 on 2018-07-28 02:29
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('schedule', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='event',
... | [
"[email protected]"
] | |
9abea3f326ea59ebd86d1c7b1d83e63ad82ffd60 | 6fcfb638fa725b6d21083ec54e3609fc1b287d9e | /python/ChenglongChen_Kaggle_HomeDepot/Kaggle_HomeDepot-master/Code/Chenglong/feature_group_distance.py | 8be14bcf62e8f822d47294b1071b3b95a6516e0a | [] | no_license | LiuFang816/SALSTM_py_data | 6db258e51858aeff14af38898fef715b46980ac1 | d494b3041069d377d6a7a9c296a14334f2fa5acc | refs/heads/master | 2022-12-25T06:39:52.222097 | 2019-12-12T08:49:07 | 2019-12-12T08:49:07 | 227,546,525 | 10 | 7 | null | 2022-12-19T02:53:01 | 2019-12-12T07:29:39 | Python | UTF-8 | Python | false | false | 4,848 | py | # -*- coding: utf-8 -*-
"""
@author: Chenglong Chen <[email protected]>
@brief: group relevance based distance features
@note: such features are not used in final submission
"""
import re
import string
import numpy as np
import pandas as pd
import config
from config import TRAIN_SIZE
from utils import dist_util... | [
"[email protected]"
] | |
4fccba1e6cf207096ecb5d43ef2b1e74b10f2d7a | e41651d8f9b5d260b800136672c70cb85c3b80ff | /Notification_System/temboo/Library/Flickr/PhotoComments/LeaveComment.py | 86bbc8411b315c8fddfd9fdd48b7df1f6c43f6c9 | [] | no_license | shriswissfed/GPS-tracking-system | 43e667fe3d00aa8e65e86d50a4f776fcb06e8c5c | 1c5e90a483386bd2e5c5f48f7c5b306cd5f17965 | refs/heads/master | 2020-05-23T03:06:46.484473 | 2018-10-03T08:50:00 | 2018-10-03T08:50:00 | 55,578,217 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,616 | py | # -*- coding: utf-8 -*-
###############################################################################
#
# LeaveComment
# Add a comment to a specified photo on Flickr.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not us... | [
"[email protected]"
] | |
ec358af8dcc747a31d12f7fb499c7a78bba2c640 | 7701773efa258510951bc7d45325b4cca26b3a7d | /from_trans_file_cloud/explore_pathlib.py | cd6ac1e600ecf9cc21bb0408817543f804917d9b | [] | no_license | Archanciel/explore | c170b2c8b5eed0c1220d5e7c2ac326228f6b2485 | 0576369ded0e54ce7ff9596ec4df076e69067e0c | refs/heads/master | 2022-06-17T19:15:03.647074 | 2022-06-01T20:07:04 | 2022-06-01T20:07:04 | 105,314,051 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 222 | py | from pathlib import Path
root = Path('D:\\Development\\Python\\trans_file_cloud\\.git')
child = Path('D:\\Development\\Python\\trans_file_cloud\\.git\\hooks')
other = Path('/some/other/path')
print(root in child.parents) | [
"[email protected]"
] | |
ae83c59eb63599eac7d7f45ea8229a239af25040 | 82f993631da2871933edf83f7648deb6c59fd7e4 | /w1/L3/7.py | 8469a86b108877706bb07df0088f4d1eea2b7434 | [] | no_license | bobur554396/PPII2021Summer | 298f26ea0e74c199af7b57a5d40f65e20049ecdd | 7ef38fb4ad4f606940d2ba3daaa47cbd9ca8bcd2 | refs/heads/master | 2023-06-26T05:42:08.523345 | 2021-07-24T12:40:05 | 2021-07-24T12:40:05 | 380,511,125 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 200 | py | # - [] Iterators and Iterbales
a = [1, 2, 3, 4] # - iterable object
it = iter(a)
# print(next(it))
# print(next(it))
# print(next(it))
# print(next(it))
# print(next(it))
for i in it:
print(i)
| [
"[email protected]"
] | |
f9a25ea75f1038ebb53730647439228ea1d83873 | 9102c3a5fa3a5b0202d61206973d0ea167f7a4d0 | /July/07-IslandPerimeter.py | a93da08ce948ac402b6597b23157a28ceea1580f | [] | no_license | Madhav-Somanath/LeetCode | 8e1b39e106cec238e5a2a3acb3eb267f5c36f781 | b6950f74d61db784095c71df5115ba10be936c65 | refs/heads/master | 2023-01-08T15:10:00.249806 | 2020-10-31T14:45:43 | 2020-10-31T14:45:43 | 255,654,520 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,657 | py | """ You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water.
Grid cells are connected horizontally/vertically (not diagonally). The grid is completely surrounded by water,
and there is exactly one island (i.e., one or more connected land cells).
The island doesn't ... | [
"[email protected]"
] | |
a7d11fe7ad97288252922c00a7c365e7199665ed | 43e900f11e2b230cdc0b2e48007d40294fefd87a | /Amazon/VideoOnsite/162.find-peak-element.py | 5b3ada63691cf9fcf4b02f7261a2be18b71ec8d7 | [] | no_license | DarkAlexWang/leetcode | 02f2ed993688c34d3ce8f95d81b3e36a53ca002f | 89142297559af20cf990a8e40975811b4be36955 | refs/heads/master | 2023-01-07T13:01:19.598427 | 2022-12-28T19:00:19 | 2022-12-28T19:00:19 | 232,729,581 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 557 | py | #
# @lc app=leetcode id=162 lang=python3
#
# [162] Find Peak Element
#
# @lc code=start
class Solution:
def findPeakElement(self, nums: List[int]) -> int:
l, r = 0, len(nums) - 1
while l + 1 < r:
mid = (l + r) // 2
if nums[mid] > nums[mid + 1] and nums[mid] > nums[mid - 1]:
... | [
"[email protected]"
] | |
04fa896307a6d243658fb915099d337f76804cd5 | 86813bf514f3e0257f92207f40a68443f08ee44b | /0406 根据身高重建队列/0406 根据身高重建队列.py | 989f32ac1430a2408dcaef254410bf9310c75be2 | [] | no_license | Aurora-yuan/Leetcode_Python3 | 4ce56679b48862c87addc8cd870cdd525c9d926c | 720bb530850febc2aa67a56a7a0b3a85ab37f415 | refs/heads/master | 2021-07-12T13:23:19.399155 | 2020-10-21T03:14:36 | 2020-10-21T03:14:36 | 212,998,500 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 838 | py | #label: 贪心算法 difficulty: medium
"""
思路
1.排序:按照身高从高到低排,升高相同的按k从小到大排
2.插入:按照排序好的顺序逐个插入新数组,插入的位置按照k来插
如示例中,排序完:
[[7,0], [7,1], [6,1], [5,0], [5,2],[4,4]]
插入的过程:
第一插:[[7,0]]
第二插:[[7,0], [7,1]]
第三插:[[7,0], [6,1],[7,1]]
第四插:[[5,0],[7,0], [6,1],[7,1]]
...
先插高的,后插矮的,即使后插的插到前面也不会有影像,因为矮
"""
class Solution(object):
def ... | [
"[email protected]"
] | |
963b0a84d3f5586261ec0ed22a68007f2a76aa70 | 0a1356b97465cc1d5c3f661f61b3b8c51fb05d46 | /android_binding/.buildozer/android/platform/python-for-android/testapps/testapp/main.py | 5baa420f3c203147e6abbfe8085c24a0a8778493 | [
"MIT",
"Python-2.0"
] | permissive | Rohan-cod/cross_platform_calc | 00360f971e4da68dd36d6836c9ddbb157f6b77d5 | 5785a5e8150d174019b330c812e7eb012cc4dd79 | refs/heads/master | 2022-12-22T10:29:05.317051 | 2021-06-05T10:52:44 | 2021-06-05T10:52:44 | 237,465,912 | 2 | 1 | MIT | 2022-12-09T05:18:55 | 2020-01-31T16:07:31 | C | UTF-8 | Python | false | false | 4,015 | py | print('main.py was successfully called')
import os
print('imported os')
print('this dir is', os.path.abspath(os.curdir))
print('contents of this dir', os.listdir('./'))
import sys
print('pythonpath is', sys.path)
import kivy
print('imported kivy')
print('file is', kivy.__file__)
from kivy.app import App
from ki... | [
"[email protected]"
] | |
cf7330a35aacb57aecc3cf237fab0a5660c9e136 | 7a550d2268bc4bc7e2fec608ffb1db4b2e5e94a0 | /1101-1200/1155-Number of Dice Rolls With Target Sum/1155-Number of Dice Rolls With Target Sum.py | f54e16cb49f5483bfd0bcd1a41d19b792bf96035 | [
"MIT"
] | permissive | jiadaizhao/LeetCode | be31bd0db50cc6835d9c9eff8e0175747098afc6 | 4ddea0a532fe7c5d053ffbd6870174ec99fc2d60 | refs/heads/master | 2021-11-05T04:38:47.252590 | 2021-10-31T09:54:53 | 2021-10-31T09:54:53 | 99,655,604 | 52 | 28 | MIT | 2020-10-02T12:47:47 | 2017-08-08T05:57:26 | C++ | UTF-8 | Python | false | false | 863 | py | class Solution:
def numRollsToTarget(self, d: int, f: int, target: int) -> int:
dp = [[0] * (1 + target) for _ in range(1 + d)]
dp[0][0] = 1
MOD = 10 ** 9 + 7
for i in range(1, 1 + d):
for j in range(1, 1 + target):
for k in range(1, 1 + min(f, j)):
... | [
"[email protected]"
] | |
efc48cf55cecc69f2b9a01cbc950890c053e3a77 | 31bc3fdc7c2b62880f84e50893c8e3d0dfb66fa6 | /libraries/numpy/python_369/python_369/numpy_118/built_in_scalars/uint_.py | 31601e10986c1a268eb3ab8a0b088f9f95f7615e | [] | no_license | tpt5cu/python-tutorial | 6e25cf0b346b8182ebc8a921efb25db65f16c144 | 5998e86165a52889faf14133b5b0d7588d637be1 | refs/heads/master | 2022-11-28T16:58:51.648259 | 2020-07-23T02:20:37 | 2020-07-23T02:20:37 | 269,521,394 | 0 | 0 | null | 2020-06-05T03:23:51 | 2020-06-05T03:23:50 | null | UTF-8 | Python | false | false | 1,496 | py | # https://numpy.org/doc/1.18/reference/arrays.scalars.html#built-in-scalar-types
import numpy as np
def what_is_uint():
'''
- "np.uint" and "np.uintc" are aliases for real underlying NumPy scalar types
- The values of those aliases depend on the operating system
- On my system, "np.uint"... | [
"[email protected]"
] | |
2d192a9d9291492a2911fb5ad35382030baf8fc5 | fad34b6b81e93850e6f408bbc24b3070e002997d | /Python-DM-Text Mining-01.py | e4b51fba0851281217136c06054f5f0570c357bf | [] | no_license | Sandy4321/Latent-Dirichlet-Allocation-2 | d60c14a3abb62e05a31aaac8c9a6d9381ec9d560 | 0bf6670643c7968064e375a287448b515b077473 | refs/heads/master | 2021-05-05T09:57:17.304046 | 2017-07-26T16:14:22 | 2017-07-26T16:14:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,149 | py | ############################################################################
# Created by: Prof. Valdecy Pereira, D.Sc.
# UFF - Universidade Federal Fluminense (Brazil)
# email: [email protected]
# Course: Data Mining
# Lesson: Text Mining
# Citation:
# PEREIRA, V. (2017). Project: LDA - Latent Dir... | [
"[email protected]"
] | |
3e30a6a777fc7d9632db4589647703d42784d301 | 9b64f0f04707a3a18968fd8f8a3ace718cd597bc | /huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/real_time_node_status.py | 7221161869b508adcbdee1530355437f7d8e3e9e | [
"Apache-2.0"
] | permissive | jaminGH/huaweicloud-sdk-python-v3 | eeecb3fb0f3396a475995df36d17095038615fba | 83ee0e4543c6b74eb0898079c3d8dd1c52c3e16b | refs/heads/master | 2023-06-18T11:49:13.958677 | 2021-07-16T07:57:47 | 2021-07-16T07:57:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,485 | py | # coding: utf-8
import re
import six
class RealTimeNodeStatus:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in... | [
"[email protected]"
] | |
e5cc439e0b34ca33b3d001bd387a2a4479ab0b82 | 5f332fd35e0071b6c33727b1ec7b22efefd4182a | /lib/sconstool/util/finder_.py | 84618a3615bf73a74897f7ec62a7cd00982180de | [
"MIT"
] | permissive | ptomulik/scons-tool-util | ec4bc3f6971feda4fa918632b0f0431faf96779b | daab1c7db087feb988a721bf10e6b5c29c0e02b2 | refs/heads/master | 2021-08-07T12:20:17.485348 | 2020-04-15T18:48:28 | 2020-04-15T18:48:28 | 153,349,258 | 1 | 0 | null | 2020-04-15T18:49:16 | 2018-10-16T20:23:55 | Python | UTF-8 | Python | false | false | 5,721 | py | # -*- coding: utf-8 -*-
"""Provides the :class:`.ToolFinder` class.
"""
from . import misc_
import os
__all__ = ('ToolFinder',)
class ToolFinder(object):
"""Callable object which searches for executables.
A single ToolFinder instance searches for a single file (program), for
example a compiler executa... | [
"[email protected]"
] | |
f6325cdee89668b585f012a30c7130e6022150fc | 91d1a6968b90d9d461e9a2ece12b465486e3ccc2 | /clouddirectory_write_f/schema_delete.py | 58f82c7195d72611e6c1e62d27b86b09d9f7b063 | [] | no_license | lxtxl/aws_cli | c31fc994c9a4296d6bac851e680d5adbf7e93481 | aaf35df1b7509abf5601d3f09ff1fece482facda | refs/heads/master | 2023-02-06T09:00:33.088379 | 2020-12-27T13:38:45 | 2020-12-27T13:38:45 | 318,686,394 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 866 | py | #!/usr/bin/python
# -*- codding: utf-8 -*-
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
from common.execute_command import write_parameter
# url : https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-instances.html
if __name__ == '__main__... | [
"[email protected]"
] | |
7fb7c4d5f15747a600819c85ad9266779fdb129c | a676d918b568964d475a3ea25c79d446b1783abf | /Chap0/project/ex16.py | cbb9237d4682e1be0fb5529a2f836c5ce46caa04 | [] | no_license | AIHackerTest/SailingChen10_Py101-004 | 35d76d32e6a21c487ce8d48f974532fb38a05051 | 3c95e04f7d54529e897beec7652e089514ee6dd5 | refs/heads/master | 2021-05-15T00:32:35.407998 | 2017-09-12T08:31:02 | 2017-09-12T08:31:02 | 103,240,423 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 731 | py | # coding = utf-8
from sys import argv
script, filename = argv
print ("We're going to erase %r." % filename)
print ("If you don't want that, hit CTRL-C (^C).")
print ("If you do want that, hit RETURN.")
input("yes or no: ")
print ("Opening the file...")
target = open(filename, 'w')
print ("Truncatin... | [
"[email protected]"
] | |
9b5b03a445f19ee80e1454f2b69ec50d24fc9858 | febeffe6ab6aaa33e3a92e2dbbd75783a4e32606 | /ssseg/cfgs/annnet/cfgs_voc_resnet101os8.py | c5a99a673dced76b76fc8e87509c725ef4b0e15f | [
"MIT"
] | permissive | Junjun2016/sssegmentation | 7bbc5d53abee1e0cc88d5e989e4cff5760ffcd09 | bf7281b369e8d7fc2f8986caaeec3ec38a30c313 | refs/heads/main | 2023-02-04T22:09:13.921774 | 2020-12-23T06:28:56 | 2020-12-23T06:28:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,208 | py | '''define the config file for voc and resnet101os8'''
from .base_cfg import *
# modify dataset config
DATASET_CFG = DATASET_CFG.copy()
DATASET_CFG['train'].update(
{
'type': 'voc',
'set': 'trainaug',
'rootdir': '/data/VOCdevkit/VOC2012',
}
)
DATASET_CFG['test'].update(
{
't... | [
"[email protected]"
] | |
8002b8bd33ebd7c6508328204e0bcaba4abfe848 | c527df31f9daf06c36e8025b372d137ad9c1c4c7 | /django/call_app/admin.py | e2561d3e10d41c1a4aa4e22c0d7feb735b07ee77 | [] | no_license | Katerina964/callback | 8dc7d5d230d095ec32ce1d69c4648f4564e99f87 | 741fa58779413845ccc4e478ccc2b952c6d000a0 | refs/heads/master | 2023-03-30T17:55:08.611493 | 2021-04-13T08:53:30 | 2021-04-13T08:53:30 | 295,951,947 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 169 | py | from django.contrib import admin
from .models import Crmaccount, Call, Customer
admin.site.register(Crmaccount)
admin.site.register(Call)
admin.site.register(Customer)
| [
"[email protected]"
] | |
c98f149bd94f32fc457a90250420211834c8d90c | a3d2620bbf25002c7b182600c2e40f8f06555e91 | /django_time/lab13/order/migrations/0007_remove_product_product_views.py | c68818c51d3abadc681f55d7596f477885ffcfe3 | [] | no_license | alejo8591/backend-lab | 782736a82933f705f825a1194369bfe13e86c0ec | 4a02a9552083a7c877e91b0f8b81e37a8650cf54 | refs/heads/master | 2016-09-03T03:53:43.878240 | 2015-11-26T06:35:38 | 2015-11-26T06:35:38 | 3,911,349 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 361 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('order', '0006_product_product_views'),
]
operations = [
migrations.RemoveField(
model_name='product',
... | [
"[email protected]"
] | |
01994540ff9ece71215b866941314e6004992e91 | 0c6100dc16291986fab157ed0437f9203f306f1b | /1101- 1200/1124.py | d5f6e0e4c103af58a54d2712db288e17c2355229 | [] | no_license | Matuiss2/URI-ONLINE | 4c93c139960a55f7cc719d0a3dcd6c6c716d3924 | 6cb20f0cb2a6d750d58b826e97c39c11bf8161d9 | refs/heads/master | 2021-09-17T09:47:16.209402 | 2018-06-30T08:00:14 | 2018-06-30T08:00:14 | 110,856,303 | 13 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,008 | py | def f(l1, l2, r1, r2):
# Processo
dx = l1 - r1 - r2
dy = l2 - r1 - r2
if dx < 0 or dy < 0:
return False # Se a soma dos raios for maior que um dos lados retorna falso, elimina vários casos
return dx * dx + dy * dy >= (r1 + r2) * (r1 + r2) and min(l1, l2) >= 2 * max(r1, r2)
# Valor bo... | [
"[email protected]"
] | |
bb02514e4e44722f691e3de8784fab89c79f2dd0 | c116a7ab1fb1ec460f526cf8cefe0abd9eac1584 | /py/lib/utils/metrics.py | 589ada85cb53607b1ba8cb38042382b3b9c77d89 | [
"Apache-2.0"
] | permissive | ckunlun/LightWeightCNN | 99a60b41d27a05bae6ad6ba7d2d537010f47726e | b3bed250520971c80bbc170958ff7f5b698be7cc | refs/heads/master | 2022-10-09T02:24:54.620610 | 2020-06-08T08:34:25 | 2020-06-08T08:34:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,734 | py | # -*- coding: utf-8 -*-
"""
@date: 2020/4/27 下午8:25
@file: metrics.py
@author: zj
@description:
"""
import torch
from thop import profile
from torchvision.models import AlexNet
from models.squeeze_net import SqueezeNet
from models.squeeze_net_bypass import SqueezeNetBypass
def compute_num_flops(model):
input ... | [
"[email protected]"
] | |
55bc765f2a5614073dcc33b1956bac232d9e27db | db52e7d3bcc78b60c8c7939bc95f07cab503b3d7 | /GUI for NMT/runnmtui.py | bb81a21cd0de211568f7108da7ff99f4b1fb6ab0 | [
"BSD-3-Clause"
] | permissive | krzwolk/GroundHog | e2d495254f5794fdbc5a0de51cf49c76e51fdc6a | 3d3e6ec9b30f3ae22bda28914c637c10050a472b | refs/heads/master | 2020-12-24T18:55:18.983124 | 2016-02-09T17:20:05 | 2016-02-09T17:20:05 | 51,382,746 | 0 | 0 | null | 2016-02-09T17:09:35 | 2016-02-09T17:09:35 | null | UTF-8 | Python | false | false | 210 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Description:
"""
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from nmtui import main
main()
| [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.