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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e7289fa1f549284d7e98f8964c2d31047a9bc6da | 7c2c36ebf1a28a1b3990578bb59883d0a5fe74e6 | /turbustat/tests/test_pdf.py | 3ab83d5028113dcd19cf5de8be96265696ed77af | [
"MIT"
] | permissive | hopehhchen/TurbuStat | 1ebb6dbdd9e80fcacc0e4ed75359909a1bad8a4d | 3793c8b3a6deb4c14b1388b5290a21d93f1697cf | refs/heads/master | 2020-07-09T23:58:07.035643 | 2015-06-08T14:43:38 | 2015-06-08T14:43:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,371 | py | # Licensed under an MIT open source license - see LICENSE
from unittest import TestCase
import numpy as np
import numpy.testing as npt
from ..statistics.pdf import PDF, PDF_Distance
from ._testing_data import \
dataset1, dataset2, computed_data, computed_distances
class testPDF(TestCase):
def setUp(self)... | [
"[email protected]"
] | |
83ac34c589d3f1a44e27f059c40cebcdad36f63d | b54d6a18bc5e86462c1f085386bc48065db5851c | /targetDF.py | 0c442099cfd980035cfa5306b1d087212fa72489 | [] | no_license | zoshs2/Percolation_Seoul | 5b5b8ebabe186fbc9e265fc190c3d0641e196517 | 69c0aa99d1f7a2fb9259681a1ed63794cbe5ea5c | refs/heads/main | 2023-07-28T20:50:13.393765 | 2021-09-28T13:25:31 | 2021-09-28T13:25:31 | 390,687,544 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,030 | py | import pandas as pd
def targetDF(dataset, YEAR, MONTH, DAY, HOUR=False, MINUTE=False) -> pd.DataFrame:
'''
Return pd.DataFrame with only data that we concerned.
Example
-------
In[0] date_dataset = targetDF(dataset, 2021, 2, 1)
In[1] date_dataset = extract_ratio_df(date_dataset) # Generate a r... | [
"[email protected]"
] | |
47ea363768f04b52b108cc1522373cc3a8f7d61a | 85a9ffeccb64f6159adbd164ff98edf4ac315e33 | /pysnmp/BAY-STACK-NOTIFICATIONS-MIB.py | 9fe6dd9a7f0564c4dc72d5d5ffd161421012167e | [
"Apache-2.0"
] | permissive | agustinhenze/mibs.snmplabs.com | 5d7d5d4da84424c5f5a1ed2752f5043ae00019fb | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | refs/heads/master | 2020-12-26T12:41:41.132395 | 2019-08-16T15:51:41 | 2019-08-16T15:53:57 | 237,512,469 | 0 | 0 | Apache-2.0 | 2020-01-31T20:41:36 | 2020-01-31T20:41:35 | null | UTF-8 | Python | false | false | 19,230 | py | #
# PySNMP MIB module BAY-STACK-NOTIFICATIONS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/BAY-STACK-NOTIFICATIONS-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:19:14 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python versio... | [
"[email protected]"
] | |
e3af53fba43b0b71ce8efca13bf2a89e6455544d | cea45595be3e9ff0daa09b4443c7220368e5c512 | /catalog/forms.py | d17b59b3d29f1d2a4beed6697d06d27d5e996bb9 | [] | no_license | VladyslavHnatchenko/mdn | 7b65ecf2e73eff2533aae4ffe5ad6a5a928750d9 | f74736aeaf8c4b8ca51889c1a00571cb07f6dba2 | refs/heads/master | 2020-04-18T02:16:08.622726 | 2019-02-15T13:37:49 | 2019-02-15T13:37:49 | 167,149,898 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 919 | py | import datetime
from django import forms
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
class RenewBookForm(forms.Form):
renewal_date = forms.DateField(help_text="Enter a date between now and"
" 4 weeks (defa... | [
"[email protected]"
] | |
3170c04749e484a7ed6bc52dc2aac6b927bdd8f1 | 29790e8faa702dc52ff2ebf905d15ff8c6cfcda9 | /pyvows/assertions/inclusion.py | fc1d51ea05f322686a78849c17c541a6ad3d37a1 | [] | no_license | scraping-xx/pyvows | 0227a2b3f16bcf562acb48902ed3c58d6e616791 | b03e9bed37b93f24eca1dd910c05e78e81969ca2 | refs/heads/master | 2020-12-01T01:15:09.487368 | 2011-08-16T03:36:57 | 2011-08-16T03:36:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 633 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# pyVows testing engine
# https://github.com/heynemann/pyvows
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 Bernardo Heynemann [email protected]
from pyvows import Vows
@Vows.assertion
def to_include(topic, exp... | [
"[email protected]"
] | |
371e2253a9dfed238c59e6c0d05d3ff759ba2f77 | c9ddbdb5678ba6e1c5c7e64adf2802ca16df778c | /cases/synthetic/coverage-big-1134.py | ddbf3edc9d3761abdb1aadc07c33a7eef98fd2b1 | [] | 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 | 13,176 | py | count:int = 0
count2:int = 0
count3:int = 0
count4:int = 0
count5:int = 0
def foo(s: str) -> int:
return len(s)
def foo2(s: str, s2: str) -> int:
return len(s)
def foo3(s: str, s2: str, s3: str) -> int:
return len(s)
def foo4(s: str, s2: str, s3: str, s4: str) -> int:
return len(s)
def foo5(s: str,... | [
"[email protected]"
] | |
6399568472f674133ea232ed648f413406c0c095 | fd15d1a9d0fdf6908bb7c8d1d4490bb6cf817d1f | /CareerFlash/migrations/0012_auto_20190918_0307.py | 4a906d6dd1216a9a77ebe27977af08c7ec4755fd | [] | no_license | stanleysh/Career-Flash | 8bca183ae2576c0aae7dbdb62c2abd60e8890e6d | 6e062afb5ef8959141475e1d73af431a0cf047b4 | refs/heads/master | 2020-08-05T06:23:26.427944 | 2019-09-19T17:34:23 | 2019-09-19T17:34:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 402 | py | # Generated by Django 2.2.5 on 2019-09-18 03:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('CareerFlash', '0011_orginization'),
]
operations = [
migrations.AlterField(
model_name='orginization',
name='name',
... | [
"[email protected]"
] | |
cdc243853b5430781b560f6d3f53ceeb14bb4b58 | a0447b03ad89a41a5c2e2073e32aeaf4d6279340 | /ironic/tests/unit/dhcp/test_dnsmasq.py | 64fe46f3393fd13874809d60d2532be93e42bae0 | [
"Apache-2.0"
] | permissive | openstack/ironic | 2ae87e36d7a62d44b7ed62cad4e2e294d48e061b | ab76ff12e1c3c2208455e917f1a40d4000b4e990 | refs/heads/master | 2023-08-31T11:08:34.486456 | 2023-08-31T04:45:05 | 2023-08-31T04:45:05 | 10,066,301 | 411 | 365 | Apache-2.0 | 2023-07-25T02:05:53 | 2013-05-14T22:28:24 | Python | UTF-8 | Python | false | false | 5,237 | py | #
# Copyright 2022 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | [
"[email protected]"
] | |
d1c15709092c258b430c6ded3da4b80b379da6d7 | bb1e0e89fcf1f1ffb61214ddf262ba327dd10757 | /plotly_study/validators/scattergl/marker/__init__.py | 5076833461f161bf0707c189a46671576aba5327 | [
"MIT"
] | permissive | lucasiscovici/plotly_py | ccb8c3ced89a0f7eccf1ae98551fa712460033fe | 42ab769febb45fbbe0a3c677dc4306a4f59cea36 | refs/heads/master | 2020-09-12T05:43:12.363609 | 2019-12-02T15:13:13 | 2019-12-02T15:13:13 | 222,328,180 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 35,078 | py | import _plotly_utils.basevalidators
class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="symbolsrc", parent_name="scattergl.marker", **kwargs
):
super(SymbolsrcValidator, self).__init__(
plotly_name=plotly_name,
parent_na... | [
"[email protected]"
] | |
841cd9e9d8193c58fdc4c4845d4a09b81a7bd904 | 2b8e7eadb920e96c75697880a9c5461aa8e0c5ed | /nabu/processing/processors/feature_computers/fbank.py | 77c4ebb1d59833e9ebe2c1032e1545f7cb99d2f4 | [
"MIT"
] | permissive | ishandutta2007/nabu | fb963ed3cd34ee340014e0c1e77927c838bba0ad | 313018a46f68cec1d4a7eb15b8b1cf68111a959c | refs/heads/master | 2020-04-03T04:57:57.911576 | 2018-12-14T11:02:52 | 2018-12-14T11:02:52 | 155,029,958 | 0 | 0 | MIT | 2018-12-06T18:20:12 | 2018-10-28T02:59:31 | Python | UTF-8 | Python | false | false | 1,446 | py | '''@file fbank.py
contains the fbank feature computer'''
import numpy as np
import base
import feature_computer
from sigproc import snip
class Fbank(feature_computer.FeatureComputer):
'''the feature computer class to compute fbank features'''
def comp_feat(self, sig, rate):
'''
compute the fe... | [
"[email protected]"
] | |
90146830bfe90f1fccd9b4b89f96401860d91053 | f445450ac693b466ca20b42f1ac82071d32dd991 | /generated_tempdir_2019_09_15_163300/generated_part009372.py | 79176e5034b71cfcfb2a2bf71973eb4b7665d2c3 | [] | no_license | Upabjojr/rubi_generated | 76e43cbafe70b4e1516fb761cabd9e5257691374 | cd35e9e51722b04fb159ada3d5811d62a423e429 | refs/heads/master | 2020-07-25T17:26:19.227918 | 2019-09-15T15:41:48 | 2019-09-15T15:41:48 | 208,357,412 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,292 | py | from sympy.abc import *
from matchpy.matching.many_to_one import CommutativeMatcher
from matchpy import *
from matchpy.utils import VariableWithCount
from collections import deque
from multiset import Multiset
from sympy.integrals.rubi.constraints import *
from sympy.integrals.rubi.utility_function import *
from sympy.... | [
"[email protected]"
] | |
de6131cb7460f4df0537d86258086f70cd965e4f | 73fbdbe4943cd4a8de371ba1af4b5cdfea3138d8 | /project4_lyrics/lyrics_project/main.py | 5b2eae2671200684d80d3cc5530e8486ab9cf16a | [] | no_license | GParolini/spiced_academy_projects | 74524d99842e7659a38371b6e697f9fd90a9e0fa | 64b9458c9294a767636211d59ae00e329fb527f5 | refs/heads/master | 2023-05-31T05:30:07.692702 | 2021-06-21T08:54:46 | 2021-06-21T08:54:46 | 363,920,518 | 0 | 0 | null | 2021-05-03T13:33:28 | 2021-05-03T12:22:05 | null | UTF-8 | Python | false | false | 4,865 | py | #!/usr/bin/env python
# coding: utf-8
# # Project 4: Web scraping and text classification
from colorama import init
from colorama import deinit
from colorama import Fore, Back, Style
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
from skle... | [
"[email protected]"
] | |
609760859820be1e68a6de0cb45de2de2a4b6eb9 | b77e464c1051dbec0dea6deaf63ccc393c17c84c | /tests/test_base.py | b49f58ee4e9aca182c4a93894ccbbe58618c0117 | [
"Unlicense"
] | permissive | victtorvpb/flask-cash-back-plataform | 63dad5677811df8d24999a6c4ad5e46d91d87dcd | 301bcad96662e7ba8f74b8e6896248f2ac2854d3 | refs/heads/main | 2023-07-12T02:46:23.526791 | 2021-08-16T23:01:11 | 2021-08-16T23:01:32 | 397,004,794 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 389 | py | import pytest
from flask_cash_back_plataform import BaseClass, base_function
given = pytest.mark.parametrize
@given("fn", [BaseClass(), base_function])
def test_parameterized(fn):
assert "hello from" in fn()
def test_base_function():
assert base_function() == "hello from base function"
def test_base_cla... | [
"[email protected]"
] | |
4fc79439d5cdb7cacba4370b7e8d37f14b961c4a | ac32bac45df77083f4ef3115e747038a6753936c | /adapter-transformers-customs/adapter-transformers-attn/src/transformers/trainer-with-sub-model-list.py | 4c0c31f94fbf40ec2a6cf77be31c8626e614571d | [
"Apache-2.0"
] | permissive | Yujin-Yujin/rexpert | 13e1d5c4ca55664dd9fbb9a765ea5157a2e0893f | ed8628dc053194fee40e593b1cc5ec45a26c8073 | refs/heads/main | 2023-06-22T05:58:42.269923 | 2021-07-23T06:35:43 | 2021-07-23T06:35:43 | 373,423,887 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 82,655 | py | # coding=utf-8
# Copyright 2020-present the HuggingFace Inc. team.
#
# 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 ap... | [
"[email protected]"
] | |
efdbbaf125546b22e79da1e189dd44d713d68223 | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/CodeJamCrawler/16_0_2_neat/16_0_2_jolley_Pancakes.py | 0f7c8e1f03d564dbbb9de3c313d22706fa0aea19 | [] | no_license | DaHuO/Supergraph | 9cd26d8c5a081803015d93cf5f2674009e92ef7e | c88059dc66297af577ad2b8afa4e0ac0ad622915 | refs/heads/master | 2021-06-14T16:07:52.405091 | 2016-08-21T13:39:13 | 2016-08-21T13:39:13 | 49,829,508 | 2 | 0 | null | 2021-03-19T21:55:46 | 2016-01-17T18:23:00 | Python | UTF-8 | Python | false | false | 972 | py | # -*- coding: utf-8 -*-
"""
Created on Sat Apr 9 18:01:19 2016
@author: jo
"""
with open('input', 'r') as f:
cases = 0
case = 0
with open('outputPan', 'w') as fo:
for line in f:
if line[0].isdigit():
cases = int(line)
#print(line)
else:
ca... | [
"[[email protected]]"
] | |
b59c437e9488ef3d05b937ed48797e71bc060614 | fe54d59a1a030a9c1395f4f4d3ef2e2b2ec48343 | /build/lib/nailgun/objects/serializers/node.py | a2db68ad18b2230ba9ca3569cf67682031e2d880 | [] | no_license | zbwzy/nailgun | 38a4198a0630a1608c14e55bee03b5ed04ded3e8 | 2eaeece03ebc53f48791db2aa8e7d24c010910f2 | refs/heads/master | 2022-09-25T09:03:33.296368 | 2016-02-23T09:32:55 | 2016-02-23T09:32:55 | 52,345,460 | 0 | 0 | null | 2022-09-16T17:45:43 | 2016-02-23T09:03:07 | Python | UTF-8 | Python | false | false | 2,488 | py | # -*- coding: utf-8 -*-
# Copyright 2013 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | [
"[email protected]"
] | |
eeb5c32aeca4c54f2b5c6ffc35714485bb235f96 | 7174b27cd79cad398ffa1add9b59da6e9adbeae4 | /python-100days/day0-15/day13/more_thread2.py | 35152bd4993d043a4da4ce465dc7221aa7d7ba44 | [] | no_license | UULIN/py | ddf037021afce04e46d51c133bfa06257ef7200a | a5d32597fc91fbd5ec41f54fb942c82300766299 | refs/heads/master | 2021-07-18T08:20:49.342072 | 2020-10-21T14:41:42 | 2020-10-21T14:41:42 | 222,977,134 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,226 | py | from time import sleep
from threading import Thread, Lock
class Account(object):
def __init__(self):
self._balance = 0
self._lock = Lock()
def deposit(self, money):
self._lock.acquire()
try:
# 计算存款后的余额
new_balance = self._balance + money
# ... | [
"[email protected]"
] | |
ae02b14171429a5182162ab7f4da4271b917afb0 | 5f6c16e89cf58304c2e70f1e34f14110fcec636c | /python-swagger-sdk/swagger_client/models/inline_response2006.py | 07fbec9fdc5ad9c1c909603b3c658606843c2559 | [] | no_license | mohammedpatla/secretapi | 481c97901a5e92ca02e29470ab683df80ea0f26a | df420498bd0ae37fd1a152c3877a1342275a8f43 | refs/heads/master | 2022-12-25T01:55:18.038954 | 2020-10-04T23:13:54 | 2020-10-04T23:13:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,041 | py | # coding: utf-8
"""
API for Secret Network by ChainofSecrets.org
A REST interface for state queries, transaction generation and broadcasting. # noqa: E501
OpenAPI spec version: 3.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
impo... | [
"[email protected]"
] | |
eccf709bc85d1da00c645964d906df42ca0dd0af | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/reverseA_20200714202827.py | c8528cea3532a5e29a64703e1b1f20412489e57a | [] | no_license | MaryanneNjeri/pythonModules | 56f54bf098ae58ea069bf33f11ae94fa8eedcabc | f4e56b1e4dda2349267af634a46f6b9df6686020 | refs/heads/master | 2022-12-16T02:59:19.896129 | 2020-09-11T12:05:22 | 2020-09-11T12:05:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 282 | py | '''
Given array A consisting of N integers, return the reversed array
'''
def array(arr):
i = 0
j = len(arr)-1
while i < len(arr)-2 and j > 0:
temp = arr[i]
arr[i] = arr[j]
arr[j] = temp
i +=1
j -=1
arr([1, 2, 3, 4, 5, 6])
| [
"[email protected]"
] | |
c2901094b0c4b4a53907e0010cd8c43666a720bb | c9500ad778b8521aaa85cb7fe3239989efaa4799 | /plugins/get_url/unit_test/test_get_file.py | 1b7ecf108a88e562d02711af4289979fc0778ff2 | [
"MIT"
] | permissive | rapid7/insightconnect-plugins | 5a6465e720f114d71b1a82fe14e42e94db104a0b | 718d15ca36c57231bb89df0aebc53d0210db400c | refs/heads/master | 2023-09-01T09:21:27.143980 | 2023-08-31T10:25:36 | 2023-08-31T10:25:36 | 190,435,635 | 61 | 60 | MIT | 2023-09-14T08:47:37 | 2019-06-05T17:05:12 | Python | UTF-8 | Python | false | false | 37,536 | py | import os
import sys
from unit_test.util import Util
sys.path.append(os.path.abspath("../"))
from unittest import TestCase
from komand_get_url.actions.get_file import GetFile
from komand_get_url.actions.get_file.schema import Input
from unittest.mock import patch
from insightconnect_plugin_runtime.exceptions import ... | [
"[email protected]"
] | |
85ae61cc05563eee47e7f771d1f64d635a86292e | 192dec1ea734fd67a3c3720228826cf754b2da5a | /valeo/vr/apps.py | b88f93e9775d8048cb831c38beadcdde6919dbff | [] | no_license | fafaschiavo/cpi_valeo | a4df4e64161e58e44ade276f0b6284abfb5af6d2 | 777ef6173bbc4bf5941098cb2ea3b13fccf490c1 | refs/heads/master | 2020-04-06T04:14:59.226013 | 2017-05-02T22:39:00 | 2017-05-02T22:39:00 | 82,980,893 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 120 | py | from __future__ import unicode_literals
from django.apps import AppConfig
class VrConfig(AppConfig):
name = 'vr'
| [
"[email protected]"
] | |
5113f8bf9f0595543e85f6a8f9655e1f589b4282 | 6d724d9326ede63fd940cc5d39920f38d987e716 | /shop/migrations/0004_orders_orderupdate.py | 9b38da972769d22736faa52aba4630c6afddc452 | [] | no_license | Alan-thapa98/mac | 5dea8254276ce79fd7f11e20772b43e3a9943602 | a5317bcb1d6b1fde9b726dc2b0c99ddd85f18b45 | refs/heads/master | 2023-07-11T05:45:05.075152 | 2021-07-30T12:00:02 | 2021-07-30T12:00:02 | 391,047,535 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,370 | py | # Generated by Django 3.1.2 on 2021-01-24 12:43
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('shop', '0003_contact'),
]
operations = [
migrations.CreateModel(
name='Orders',
fields=[
('order_id'... | [
"alanthapa98.gmail.com"
] | alanthapa98.gmail.com |
d3a903414652662f91ef2a9f09ed1a87342d49bf | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_201/436.py | 78e4a99556ff805c431b31596155fa8617440523 | [] | 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 | 1,143 | py | f = open('C:\\Users\\djspence\\Downloads\\C-large.in', 'r')
tries = int(f.readline())
for case in range(0, tries):
lengths = {}
vals = f.readline().strip().split(' ')
n = int(vals[0])
remaining = int(vals[1])
lengths[n] = 1
small = 0
large = 0
while remaining > 0:
... | [
"[email protected]"
] | |
1898f53db1e53665c6f69f9ef8b54411b060dd23 | 75983ccc6e1eba55890429baace2bf716ac4cf33 | /python/tvm/relay/ir_pass.py | 84189c840d71a5dccdc08b92a22eb837b2fb5405 | [
"Apache-2.0"
] | permissive | clhne/tvm | 49c8be30c87791d5e8f13eea477620a829573d1c | d59320c764bd09474775e1b292f3c05c27743d24 | refs/heads/master | 2020-03-29T21:16:30.061742 | 2018-09-25T19:15:15 | 2018-09-25T19:15:15 | 150,358,639 | 1 | 0 | Apache-2.0 | 2018-09-26T02:41:46 | 2018-09-26T02:41:45 | null | UTF-8 | Python | false | false | 372 | py | # pylint: disable=no-else-return,
# pylint: disable=unidiomatic-typecheck
"""The set of passes for Relay.
Exposes an interface for configuring the passes and scripting
them in Python.
"""
from . import _ir_pass
# Expose checking expression, should rename to infer_type.
# pylint: disable=invalid-name
check_expr = _ir_... | [
"[email protected]"
] | |
95b7481abd5da44b653139b6e671965a8b6bc81e | 2f98aa7e5bfc2fc5ef25e4d5cfa1d7802e3a7fae | /python/python_24692.py | 165e8518e2ba9cad5538a7ef480b9d654979df4a | [] | 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 | 63 | py | # Python NameError: name 'self' is not defined Why?
python -tt
| [
"[email protected]"
] | |
2a04c078859847f83b2a810252c0bd0a2a0367e9 | da052c0bbf811dc4c29a83d1b1bffffd41becaab | /core/web_debranding/__manifest__.py | 2626a321be85b590c2375e95e0b69f7ad52c0bfc | [] | no_license | Muhammad-SF/Test | ef76a45ad28ac8054a4844f5b3826040a222fb6e | 46e15330b5d642053da61754247f3fbf9d02717e | refs/heads/main | 2023-03-13T10:03:50.146152 | 2021-03-07T20:28:36 | 2021-03-07T20:28:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 824 | py | # -*- coding: utf-8 -*-
{
'name': "Backend debranding",
'version': '1.1.1',
'author': 'IT-Projects LLC, Ivan Yelizariev',
'license': 'LGPL-3',
'category': 'Debranding',
'images': ['images/web_debranding.png'],
'website': 'https://twitter.com/yelizariev',
'price': 150.00,
'currency': ... | [
"[email protected]"
] | |
6997ba18d8ad2fb05c77cb9cbd2942726bf65798 | fd4aba49cbd4042a95e7376eac245df0e95b72d3 | /auto-generated/python/test/test_margin.py | a5287ac7cde2c798af31194cd8a629e51b3cef2c | [] | no_license | bretton/api-connectors | 47755e7ec4701a600b3bf6a541c618573e97e365 | e8b9de34ff941c3edae2b094f6ab0eb1c24bf8bb | refs/heads/master | 2020-04-14T20:01:38.746415 | 2019-12-20T11:43:05 | 2019-12-20T11:43:05 | 164,079,343 | 2 | 2 | null | 2019-12-20T11:43:06 | 2019-01-04T08:21:45 | C++ | UTF-8 | Python | false | false | 2,277 | py | # coding: utf-8
"""
BitMEX API
## REST API for the BitMEX Trading Platform [View Changelog](/app/apiChangelog) #### Getting Started Base URI: [https://www.bitmex.com/api/v1](/api/v1) ##### Fetching Data All REST endpoints are documented below. You can try out any query right from this interface. Most ... | [
"[email protected]"
] | |
db166c5dcc339e356cf775d43a928a65440502ce | 7130a96ef7c2199cdb52406069fdc5e015760d70 | /components/docker/block/SPResnetBlockV2.py | 858733a371f31bb60c735dd0184b8db52d6b793f | [] | no_license | yanqinghao/AiLab-Pytorch | c37e8f47241d7f1a003226b2a19b9406ff7f6f9b | ceea8a1196dca4d219a099cbaedcecf7c3f96564 | refs/heads/master | 2021-07-08T07:15:29.801492 | 2020-10-23T06:14:34 | 2020-10-23T06:14:34 | 198,990,470 | 0 | 0 | null | 2019-08-14T09:23:00 | 2019-07-26T09:40:58 | Python | UTF-8 | Python | false | false | 734 | py | # coding=utf-8
from __future__ import absolute_import, print_function
import suanpan
from suanpan.app.arguments import Int
from suanpan.app import app
from args import PytorchLayersModel
from utils import getLayerName, net
@app.input(PytorchLayersModel(key="inputModel"))
@app.param(Int(key="inplanes", default=64))
@... | [
"[email protected]"
] | |
87503f32f0ebd1aa3c6acc09980ebdaeb4ed6a34 | 0438cb6726cd47f17b75cc960d457e433beeed95 | /tests/test_cli.py | 7e6cc9f4c08378936ae125b5e9812674ea17fbb7 | [
"MIT"
] | permissive | boydgreenfield/metasort | 3071aa4600f6b5f0ba9eeb431b1cbcc7c1399102 | 27622d75f36b1dde959c269cb90b57f4110d813b | refs/heads/master | 2021-01-22T20:39:08.266721 | 2015-04-10T18:57:12 | 2015-04-10T18:57:12 | 33,745,227 | 0 | 0 | null | 2015-04-10T18:53:23 | 2015-04-10T18:53:23 | null | UTF-8 | Python | false | false | 49 | py | from nose.tools import *
def test_base():
pass | [
"[email protected]"
] | |
c7049fd951803d6bc6f19109023f9ea5c5d783c2 | a3e4cc590667c444460d3a1f659f53f907da1783 | /azure/mgmt/blueprint/models/assignment_deployment_job_result_py3.py | 52b07be3a07c2f65071a62d8c0a9f5ad292585ef | [] | no_license | eduardomourar/azure-mgmt-blueprint | 729d9c08915caab9e8029278da6dc87c4eaa44d6 | 153c3c63cb519350cb68752e07251e1e8ff26510 | refs/heads/master | 2020-05-27T02:26:42.436079 | 2019-11-11T11:52:14 | 2019-11-11T11:52:14 | 188,451,854 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,334 | 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]"
] | |
647577be7019d95438e3a5c1aa3b2dcbafb93134 | c6053ad14e9a9161128ab43ced5604d801ba616d | /Public/Public_zqxt_99/__init__.py | 4f5ee4f58760d9dfb875cffb3773d9d9dbf5771b | [] | no_license | HesterXu/Home | 0f6bdace39f15e8be26031f88248f2febf33954d | ef8fa0becb687b7b6f73a7167bdde562b8c539be | refs/heads/master | 2020-04-04T00:56:35.183580 | 2018-12-25T02:48:51 | 2018-12-25T02:49:05 | 155,662,403 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 164 | py | # -*- coding: utf-8 -*-
# @Time : 2018/12/11/10:55
# @Author : Hester Xu
# Email : [email protected]
# @File : __init__.py.py
# @Software : PyCharm
| [
"[email protected]"
] | |
bf9b4c55e0e0b67ded0e6452ab8893a773b3fb88 | d469de9070628b7c56e283066d9122eb73c42dd2 | /algorithms/data_structures/binary_tree.py | 7dad06d856241373ca5e8bfd012d65a0b853afdc | [] | no_license | Rowing0914/Interview_Prep_Python | af26369ccb92c623fc2ac44e62d3f61e94046df6 | a77a9b2342fbc9fc87b9f3670b0f3ab36f47eac7 | refs/heads/master | 2022-11-26T10:22:44.564728 | 2020-08-07T12:06:54 | 2020-08-07T12:06:54 | 269,878,434 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 923 | py |
class Node:
def __init__(self, value):
self.l = None
self.r = None
self.v = value
class BinaryTree:
def __init__(self):
self.root = None
def add(self, item):
if self.root == None:
self.root = Node(value=item)
else:
self._add(item, self.root)
def _add(self, item, node):
if item > node.v:
... | [
"[email protected]"
] | |
843d02469e85866f10c030b14a8b34b1ddb154ba | cfcd117378664e4bea080b3c1011a25a575b3d51 | /hawc/apps/vocab/migrations/0004_term_uid.py | f894ab0af5c902c93c900e051fb9821419084ebb | [
"MIT"
] | permissive | shapiromatron/hawc | 9d3a625da54d336334da4576bd5dac6915c18d4f | 51177c6fb9354cd028f7099fc10d83b1051fd50d | refs/heads/main | 2023-08-03T13:04:23.836537 | 2023-08-01T18:39:16 | 2023-08-01T18:39:16 | 25,273,569 | 25 | 15 | NOASSERTION | 2023-09-14T17:03:48 | 2014-10-15T21:06:33 | Python | UTF-8 | Python | false | false | 348 | py | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("vocab", "0003_load_v1"),
]
operations = [
migrations.AddField(
model_name="term",
name="uid",
field=models.PositiveIntegerField(blank=True, null=True, uni... | [
"[email protected]"
] | |
d0e245f285f7028136bf38a0f29d170d8c9f4d5a | 8bb4a472344fda15985ac322d14e8f4ad79c7553 | /Python3-Core/src/test/prompto/translate/eme/TestCss.py | 801cb78f8fe015a3e6257711209c57258ee542a1 | [] | no_license | prompto/prompto-python3 | c6b356f5af30c6826730ba7f2ad869f341983a2d | 64bd3d97d4702cc912097d41d961f7ab3fd82bee | refs/heads/master | 2022-12-24T12:33:16.251468 | 2022-11-27T17:37:56 | 2022-11-27T17:37:56 | 32,623,633 | 4 | 0 | null | 2019-05-04T11:06:05 | 2015-03-21T07:17:25 | Python | UTF-8 | Python | false | false | 767 | py | from prompto.parser.e.BaseEParserTest import BaseEParserTest
class TestCss(BaseEParserTest):
def setUp(self):
super(type(self), self).setUp()
def testCodeValue(self):
self.compareResourceEME("css/codeValue.pec")
def testCompositeValue(self):
self.compareResourceEME("css/c... | [
"[email protected]"
] | |
e89461a51e52313d597915885da1df109637baae | ae288b9604ee86b471d698023fce03738b578544 | /lib/system/__init__.py | d3474854c5d8888f77545f1a7a11a08f805ffc55 | [] | no_license | snaress/studio | a8421a0772600494859ba86daace4bf499f8e055 | 90f4fc50ca9541c0d70cb381c8002ef8a3ce8087 | refs/heads/master | 2021-01-17T05:49:57.193795 | 2016-02-07T13:57:24 | 2016-02-07T13:57:24 | 25,691,833 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 147 | py | import os
#-- Package Var --#
toolPath = os.path.normpath(os.path.dirname(__file__))
toolName = toolPath.split(os.sep)[-1]
toolPack = __package__
| [
"[email protected]"
] | |
d531ac6b14b28efdbcaa7dbcc9edad4029ab4ccf | 0ff562277646000e7f05c68e18133466effeb962 | /seq2seq/evaluate.py | 9356c281bfea4c511ab9d95e5d84048c069e162c | [] | no_license | zyxue/bio-seq2seq-attention | 708fd8a73f69c8564d488c185dba792e3570cbed | 692614f4d025c78800ecd6c104c430e2bff11edf | refs/heads/master | 2020-04-16T21:34:59.626246 | 2019-02-22T00:42:40 | 2019-02-22T00:42:40 | 165,930,778 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,839 | py | import random
import torch
from seq2seq.plot import plot_attn
# from seq2seq.utils import tensor_from_sentence, get_device
def evaluate(src_lang, tgt_lang, enc, dec, tgt_sos_index, src_seq, seq_len):
with torch.no_grad():
# shape: S X B X 1
src_tensor = tensor_from_sentence(src_lang, src_seq).vie... | [
"[email protected]"
] | |
07260035fae3775eccc23a0180c11509e81f5968 | 6b9084d234c87d7597f97ec95808e13f599bf9a1 | /algorithms/tracker/transt/builder.py | f300dc026d1df2f2ed64f5f4be27d71f5490de44 | [] | no_license | LitingLin/ubiquitous-happiness | 4b46234ce0cb29c4d27b00ec5a60d3eeb52c26fc | aae2d764e136ca4a36c054212b361dd7e8b22cba | refs/heads/main | 2023-07-13T19:51:32.227633 | 2021-08-03T16:02:03 | 2021-08-03T16:02:03 | 316,664,903 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,328 | py | import torch
from models.TransT.builder import build_transt
from algorithms.tracker.transt.tracker import TransTTracker
from data.tracking.methods.TransT.evaluation.builder import build_evaluation_data_processors
def build_transt_tracker(network_config, evaluation_config, weight_path, device):
device = torch.devi... | [
"[email protected]"
] | |
1dbec0cd8d756ebeae9a779507e72fa0e3c38631 | 3d06eeebdd598efba25d29d7e3d03d90ede1bfbd | /18_lesson(django)/video-shop/videostore/courses/forms.py | 25df6a10b202d97a7c1598c18ec17325dee5ec84 | [] | no_license | duk1edev/itproger | 58bdd16088dec7864585d318935b118ce584874d | 786f94fff6d816f3f978bd8c24c3d985ffd5ffb2 | refs/heads/master | 2021-01-02T02:43:32.684100 | 2020-03-28T18:10:25 | 2020-03-28T18:10:25 | 239,443,309 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 571 | py | from django import forms
from .models import Course
class CreateCourseForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(CreateCourseForm, self).__init__(*args, **kwargs)
self.fields['slug'].label = 'Название URL'
self.fields['title'].label = 'Название курса'
self.fi... | [
"[email protected]"
] | |
70d103be4cf7033045a7bfe4abce7325e7410269 | e0980f704a573894350e285f66f4cf390837238e | /.history/rocketman/settings/dev_20210104181322.py | 6b33f05fcfb179db48a0b11ba3e3a32f5bde8bef | [] | no_license | rucpata/WagtailWebsite | 28008474ec779d12ef43bceb61827168274a8b61 | 5aa44f51592f49c9a708fc5515ad877c6a29dfd9 | refs/heads/main | 2023-02-09T15:30:02.133415 | 2021-01-05T14:55:45 | 2021-01-05T14:55:45 | 303,961,094 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 638 | py | from .base import *
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '0qjdxh8nibnbihjuj9*-%$#kx!i8y^wk6wt(h)@27m1g-9g$)v'
# SECURITY WARNING: define the correct hosts in production!
ALLOWED_HOSTS = ['localho... | [
"[email protected]"
] | |
0cb8fe31319034d1b0d7e1d5d9511de51d466943 | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/exercism_data/python/anagram/1d85ad5d39ab4551a2af68f5a6bd2b21.py | 1bbc9ad83b17ae2c9371525d8394a6a6641fbf73 | [] | no_license | itsolutionscorp/AutoStyle-Clustering | 54bde86fe6dbad35b568b38cfcb14c5ffaab51b0 | be0e2f635a7558f56c61bc0b36c6146b01d1e6e6 | refs/heads/master | 2020-12-11T07:27:19.291038 | 2016-03-16T03:18:00 | 2016-03-16T03:18:42 | 59,454,921 | 4 | 0 | null | 2016-05-23T05:40:56 | 2016-05-23T05:40:56 | null | UTF-8 | Python | false | false | 529 | py | def detect_anagrams(word, anagrams):
real_anagrams = []
for candidate in anagrams:
# Case insensitive
lower_word = word.lower()
lower_candidate = candidate.lower()
for char in lower_word:
if char in lower_candidate:
lower_candidate = lower_candidate... | [
"[email protected]"
] | |
f22577938fc54158f83a3dc1f43cd18d5cfa7cea | 4a7ede06edbe66f9d1eb485261f94cc3251a914b | /test/pyaz/webapp/config/ssl/__init__.py | b8b893c526afb4dff9fd44ab4dc16187a35ffb19 | [
"MIT"
] | permissive | bigdatamoore/py-az-cli | a9e924ec58f3a3067b655f242ca1b675b77fa1d5 | 54383a4ee7cc77556f6183e74e992eec95b28e01 | refs/heads/main | 2023-08-14T08:21:51.004926 | 2021-09-19T12:17:31 | 2021-09-19T12:17:31 | 360,809,341 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,010 | py | import json, subprocess
from .... pyaz_utils import get_cli_name, get_params
def upload(resource_group, name, certificate_password, certificate_file, slot=None):
params = get_params(locals())
command = "az webapp config ssl upload " + params
print(command)
output = subprocess.run(command, shell=Tru... | [
"“[email protected]”"
] | |
cb4b97b896fc5683599a57fe012bcc1fe716bb96 | b49e7e1fb8557f21280b452b2d5e29668613fe83 | /leonardo/module/web/widget/feedreader/models.py | e2b9999d1a451c50e6f88b523b571787e8d75ef2 | [
"BSD-2-Clause"
] | permissive | pombredanne/django-leonardo | 6e03f7f53391c024cfbfd9d4c91bd696adcb361d | dcbe6c4a0c296a03c3a98b3d5ae74f13037ff81b | refs/heads/master | 2021-01-17T10:24:09.879844 | 2016-04-06T19:30:05 | 2016-04-06T19:30:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,619 | py | # -#- coding: utf-8 -#-
import datetime
import feedparser
from django.db import models
from django.template.context import RequestContext
from django.template.loader import render_to_string
from django.utils.translation import ugettext_lazy as _
from leonardo.module.web.models import Widget, ContentProxyWidgetMixin
f... | [
"[email protected]"
] | |
8107640d66d0dd58eb2d0351d0559824dc3a2c98 | c29763f930c7c00b435a9b25dddf7f6e2e8548a1 | /Atividades disciplinas/6 periodo/IA/algoritmo de dijkstra/test.py | 6417af691864735fbf0325a743f03bdf7e10a868 | [] | no_license | jadsonlucio/Faculdade | f94ae6e513bb783f01c72dcb52479ad4bb50dc03 | 2ca553e8fa027820782edc56fc4eafac7eae5773 | refs/heads/master | 2020-07-06T20:34:10.087739 | 2019-12-07T20:45:55 | 2019-12-07T20:45:55 | 203,131,862 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,172 | py | import numpy as np
from map.location import Location, calc_distance
from map.map import Map
COORDINATES_MAP_TEST_1 = {
"latitude_min" : 0,
"latitude_max" : 10,
"longitude_min" : 0,
"longitude_max" : 10
}
CIDADES_ALAGOAS = list(open("tests/cidades_alagoas.txt", "r").readlines())[:10]
def generate_rand... | [
"[email protected]"
] | |
251411a9333fbd7da3a0557d59516ffd7672af6c | f6d8f211bd87b47b511ac0b6599806ab3131999f | /04-case-study-interface-design/ex_4_12_5.py | 937b06979b4f78846f3bdcb3f460fea8fed15b30 | [] | no_license | csu-xiao-an/think-python | 6cea58da4644cd1351112560e75de150d3731ce9 | 8177b0506707c903c3d4d9a125c931aba890cc0c | refs/heads/master | 2020-07-26T19:35:38.919702 | 2019-09-16T03:33:15 | 2019-09-16T03:33:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,746 | py | """This module contains a code for ex.5 related to ch.4.12.
Think Python, 2nd Edition
by Allen Downey
http://thinkpython2.com
"""
import math
import turtle
def polyline(t, n, length, angle):
"""Draws n line segments.
:param t: Turtle object
:param n: number of line segments
:param length: length of... | [
"[email protected]"
] | |
49dbafb4ad1aeaf9119acdede9c7aa71c786d66a | 727f1bc2205c88577b419cf0036c029b8c6f7766 | /out-bin/py/google/fhir/models/model_test.runfiles/pypi__tensorflow_1_12_0/tensorflow-1.12.0.data/purelib/tensorflow/python/layers/utils.py | 19fe50abb25751952deed4e3e7c7ae32c95d8ff6 | [
"Apache-2.0"
] | permissive | rasalt/fhir | 55cf78feed3596a3101b86f9e9bbf6652c6ed4ad | d49883cc4d4986e11ca66058d5a327691e6e048a | refs/heads/master | 2020-04-13T00:16:54.050913 | 2019-01-15T14:22:15 | 2019-01-15T14:22:15 | 160,260,223 | 0 | 0 | Apache-2.0 | 2018-12-03T22:07:01 | 2018-12-03T22:07:01 | null | UTF-8 | Python | false | false | 174 | py | /home/rkharwar/.cache/bazel/_bazel_rkharwar/c4bcd65252c8f8250f091ba96375f9a5/external/pypi__tensorflow_1_12_0/tensorflow-1.12.0.data/purelib/tensorflow/python/layers/utils.py | [
"[email protected]"
] | |
74b5b828f3763b47c0928d9ef000736bbb8defdc | 5c71d64db74c4c39b6e9adb70036a56e197f111c | /amsterdam-airbnb/CV_LinearRegression_selectedfeatures.py | 7bf77d7e9d82ecfe3d6a251211a286ad6095989d | [] | no_license | sebkeil/Group20-VU | 3e70f1e464bb9873c8e8125ae190a52f08c85804 | 38f80d80944583e1ac48c6219130de69c0c60242 | refs/heads/master | 2021-05-18T03:15:15.671035 | 2020-09-06T15:00:10 | 2020-09-06T15:00:10 | 251,079,102 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,035 | py | from sklearn.model_selection import cross_validate
from sklearn.linear_model import LinearRegression
import pandas as pd
import numpy as np
from sklearn.preprocessing import StandardScaler
# read in files
X_train = pd.read_csv('train.csv')
y_train = pd.read_csv('y_train.csv', names=['price'])
# drop features
X_train... | [
"[email protected]"
] | |
8dca1271759ee7e83227a510a85cae83c7c18567 | 1c390cd4fd3605046914767485b49a929198b470 | /PE/73.py | 605024f5c153e5bca66a554ce755b76a2d0b1973 | [] | no_license | wwwwodddd/Zukunft | f87fe736b53506f69ab18db674311dd60de04a43 | 03ffffee9a76e99f6e00bba6dbae91abc6994a34 | refs/heads/master | 2023-01-24T06:14:35.691292 | 2023-01-21T15:42:32 | 2023-01-21T15:42:32 | 163,685,977 | 7 | 8 | null | null | null | null | UTF-8 | Python | false | false | 148 | py | from fractions import gcd
z=0
for i in range(12001):
print i
for j in range(i):
if gcd(i,j)==1 and 2*j<=i and 3*j>=i:
z+=1
print z-2
| [
"[email protected]"
] | |
844fd7640e35207a398b570c7d71e27fb7b2de5f | 70734c75951d1349a4a4f66ba82a24f4726aa968 | /smartrecruiters_python_client/models/source_types.py | 6e69f1629ccd49872df29317f8a45592265c7bfa | [
"MIT"
] | permissive | yogasukmawijaya/smartrecruiters-python-client | 0f044847ef76bbe57a3a922e7b0adb4f98c0917f | 6d0849d173a3d6718b5f0769098f4c76857f637d | refs/heads/master | 2020-04-09T16:45:41.703240 | 2017-07-08T19:59:25 | 2017-07-08T19:59:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,002 | py | # coding: utf-8
"""
Unofficial python library for the SmartRecruiters API
The SmartRecruiters API provides a platform to integrate services or applications, build apps and create fully customizable career sites. It exposes SmartRecruiters functionality and allows to connect and build software enhancing it.
... | [
"[email protected]"
] | |
9b0e6e18151779ef2c05e047ba28042259e4bdb8 | 4ab83ae9b3320e423116579a2de14600aeda16e0 | /46_孩子们的游戏(圆圈中最后剩下的数).py | 15ab243f7034126827dcc0951c5356c320a720dc | [] | no_license | yaodalu/JZOffer | a4e8d6611cbff686dbbdd95226caeb5614945f9c | ede5f500f45b865058352b0c37629d7f2254a4d6 | refs/heads/master | 2020-05-21T17:10:09.705926 | 2019-09-10T01:05:55 | 2019-09-10T01:05:55 | 186,118,657 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,083 | py | # -*- coding:utf-8 -*-
class Solution:
def LastRemaining_Solution(self, n, m):
"""单向循环链表解法"""
if n == 0: #特殊情况,没有小朋友
return -1
if n == 1: #特殊情况,只有一个小朋友
return 1
i... | [
"[email protected]"
] | |
0023937f5c12f7a15fd54083090d66e26fe0887a | f2cacb05d20e2e699e64035b6bee9a8bed3d3b8e | /atm/__init__.py | 4d85ea4f53cca492fe01cc6e8f66cf043c77030a | [
"BSD-3-Clause"
] | permissive | moeyensj/atm | 31e54e93c0881307770ab0d7815b9c4678f9f2e6 | 0523600cf44423a1ef72ca40fff29bbfbe1281a8 | refs/heads/master | 2022-08-13T05:33:54.131701 | 2021-03-03T23:38:02 | 2021-03-03T23:38:02 | 196,091,171 | 9 | 2 | BSD-3-Clause | 2021-03-03T23:38:03 | 2019-07-09T22:16:20 | Python | UTF-8 | Python | false | false | 289 | py | from .version import __version__
from .config import *
from .constants import *
from .frames import *
from .helpers import *
from .functions import *
from .models import *
from .obs import *
from .analysis import *
from .data_processing import *
from .fit import *
from .plotting import *
| [
"[email protected]"
] | |
15a860f8bc4c092e866e5ee2784958d676c664fb | a98bc8906c3fbe4d388442d24cbeed06d06686f9 | /Codechef 2019/sept Long 2019/chefinsq.py | a3cdcb3f34a5e9ed032f62cfec6c69d944f9028e | [] | no_license | Arrowheadahp/Contests-Challenges-and-Events | 1ac4f1b2067276fa669e86ecfdb685d95ba663fd | fc156e5ae49b3074a9dbd56acd4fdc2af25c6a3f | refs/heads/master | 2022-12-13T19:50:38.041410 | 2020-08-22T14:16:23 | 2020-08-22T14:16:23 | 197,886,111 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 342 | py | def fact(k):
f = 1
while k:
f*=k
k-=1
return f
for _ in range(input()):
n, k = map(int, raw_input().split())
A = map(int, raw_input().split())
A.sort()
x = A[k-1]
s = A[:k].count(x)
t = A.count(x)
#print s, t
print fact(t)/(fact(s)*fact(t-s))
'''
2
4 2
1 ... | [
"[email protected]"
] | |
70a701bc5cf1cd1ac9d4ac6d0363562e3c83398d | c9ddbdb5678ba6e1c5c7e64adf2802ca16df778c | /cases/synthetic/tree-big-2951.py | fa63609bcdcdfb979fea5d777ccafaefcce4369d | [] | 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 | 23,286 | py | # Binary-search trees
class TreeNode(object):
value:int = 0
left:"TreeNode" = None
right:"TreeNode" = None
def insert(self:"TreeNode", x:int) -> bool:
if x < self.value:
if self.left is None:
self.left = makeNode(x)
return True
else:
... | [
"[email protected]"
] | |
734222744177ba9b4b567229c0c42a7e3e563b04 | 71b11008ab0455dd9fd2c47107f8a27e08febb27 | /04、 python编程/day01/3-code/算数运算符.py | 449a9baa4ca2b1ae2202b8fdd1968229b4f48c70 | [] | no_license | zmh19941223/heimatest2021 | 49ce328f8ce763df0dd67ed1d26eb553fd9e7da4 | 3d2e9e3551a199bda9945df2b957a9bc70d78f64 | refs/heads/main | 2023-08-25T17:03:31.519976 | 2021-10-18T05:07:03 | 2021-10-18T05:07:03 | 418,348,201 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 112 | py | print(3 + 2)
print(3 - 2)
print(3 * 2)
print(3 / 2)
print(3 // 2)
print(3 % 2)
print(3 ** 2)
print("hello" * 3) | [
"[email protected]"
] | |
c6adb1d9469a5adfe8a767e63e40fbd9ab028c03 | 8df1237388352d29c894403feaf91e800edef6bf | /Algorithms/141.linked-list-cycle/141.linked-list-cycle.py | 255c09e7e984294aef20caa856189c3b49b66f31 | [
"MIT"
] | permissive | GaLaPyPy/leetcode-solutions | 8cfa5d220516683c6e18ff35c74d84779975d725 | 40920d11c584504e805d103cdc6ef3f3774172b3 | refs/heads/master | 2023-06-19T22:28:58.956306 | 2021-07-19T00:20:56 | 2021-07-19T00:20:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 272 | py | class Solution:
def hasCycle(self, head: ListNode) -> bool:
fast = slow = head
while slow and fast and fast.next:
slow = slow.next
fast = fast.next
if slow is fast:
return True
return False
| [
"[email protected]"
] | |
5b47d39363b966b6fd8208f0f5a184dedf934ca4 | c9642233f1de71f1a61ae28c695c2d9228825156 | /echecs_espoir/service/mahjong/models/hutype/two/siguiyi.py | 63d95ac314dad7a3b187dc3c09ab0befe8eacee5 | [
"AFL-3.0"
] | permissive | obespoir/echecs | d8314cffa85c8dce316d40e3e713615e9b237648 | e4bb8be1d360b6c568725aee4dfe4c037a855a49 | refs/heads/master | 2022-12-11T04:04:40.021535 | 2020-03-29T06:58:25 | 2020-03-29T06:58:25 | 249,185,889 | 16 | 9 | null | null | null | null | UTF-8 | Python | false | false | 2,763 | py | # coding=utf-8
import time
from service.mahjong.models.hutype.basetype import BaseType
from service.mahjong.constants.carddefine import CardType, CARD_SIZE
from service.mahjong.models.card.hand_card import HandCard
from service.mahjong.models.card.card import Card
from service.mahjong.models.utils.cardanalyse import C... | [
"[email protected]"
] | |
21c351a8fe2fc37d56c8ee1bc4ffb02f12c1c5cf | 04803c70bb97012b7d500a177ac0240fb2ddbe38 | /4chpd/pdep/network556_1.py | 2b8da0c07c0a5631e9d783dabeb7fa796d2e24f7 | [] | no_license | shenghuiqin/chpd | 735e0415f6688d88579fc935459c1b0f53596d1d | 396ba54629036e3f2be0b3fabe09b78c90d56939 | refs/heads/master | 2023-03-01T23:29:02.118150 | 2019-10-05T04:02:23 | 2019-10-05T04:02:23 | 192,084,217 | 0 | 0 | null | 2019-06-18T18:33:13 | 2019-06-15T13:52:28 | HTML | UTF-8 | Python | false | false | 93,703 | py | species(
label = 'C=C[CH]C(C)O[CH]C(2302)',
structure = SMILES('C=C[CH]C(C)O[CH]C'),
E0 = (69.8904,'kJ/mol'),
modes = [
HarmonicOscillator(frequencies=([1380,1390,370,380,2900,435,3000,3050,390,425,1340,1360,335,370,2950,3100,1380,975,1025,1650,3010,987.5,1337.5,450,1655,2750,2770,2790,2810,2830... | [
"[email protected]"
] | |
afc614636a168d512fd7a9da31c0dc42b2a9191f | afc4e63338fcb6538117ab2da3ebeb7b6d485399 | /campoapp/cedis/urls.py | 7b9a3a3c63a8bfbeeffb7c13b8791bc8046c038a | [] | no_license | alrvivas/cedis-erp | 7531108ba4dd2212788cb6d108ccacdce42d4b37 | aa7d3c5d844473b72786ee6168f9b3a71be349f2 | refs/heads/master | 2022-11-25T14:21:40.365438 | 2018-09-28T18:06:41 | 2018-09-28T18:06:41 | 146,667,529 | 0 | 0 | null | 2022-11-22T02:52:27 | 2018-08-29T22:52:30 | JavaScript | UTF-8 | Python | false | false | 725 | py | from django.conf.urls import url
from django.urls import path,re_path
from .views import (
CedisView,
CedisCreation,
RouteCedis,
RouteCreation,
ClientRoute,
)
app_name = 'cedis'
urlpatterns = [
path('', CedisView.as_view(), name='cedis'),
re_path(r'^nuevo$', CedisCreation.as_view(), name='... | [
"[email protected]"
] | |
56c2adbfffabb89ea6c69a685d01c01d8098d791 | 235de1014c7aa9b05ee3c9cce2e7557c6406f800 | /Rationale_Analysis/experiments/hyperparam_search.py | d61afcd61a83d2afaa5a437ea45f96894e5a8e2c | [
"MIT"
] | permissive | yuvalpinter/rationale_analysis | b07336142e7de932238a3cc07c656e6616c0e717 | 2b25c6027d4459fc27e0f6793da6fee695e409a9 | refs/heads/master | 2020-09-11T08:16:15.031620 | 2019-11-17T23:25:11 | 2019-11-17T23:25:11 | 222,000,886 | 0 | 0 | MIT | 2019-11-15T20:48:41 | 2019-11-15T20:48:41 | null | UTF-8 | Python | false | false | 1,617 | py | import argparse
import os
import json
import subprocess
import hyperopt
from hyperopt import hp
import numpy as np
np.exp = lambda x : 10**x
parser = argparse.ArgumentParser()
parser.add_argument("--exp-name", type=str, required=True)
parser.add_argument("--search-space-file", type=str, required=True)
parser.add_argu... | [
"[email protected]"
] | |
fcc48edcfdd4d1fc34b4b877308b372de722ad40 | 8eab8ab725c2132bb8d090cdb2d23a5f71945249 | /virt/Lib/site-packages/win32comext/shell/demos/create_link.py | 354561b7c50d6342a359a3c4e10a1c066bef399a | [
"MIT"
] | permissive | JoaoSevergnini/metalpy | 6c88a413a82bc25edd9308b8490a76fae8dd76ca | c2d0098a309b6ce8c756ff840bfb53fb291747b6 | refs/heads/main | 2023-04-18T17:25:26.474485 | 2022-09-18T20:44:45 | 2022-09-18T20:44:45 | 474,773,752 | 3 | 1 | MIT | 2022-11-03T20:07:50 | 2022-03-27T22:21:01 | Python | UTF-8 | Python | false | false | 2,329 | py | # link.py
# From a demo by Mark Hammond, corrupted by Mike Fletcher
# (and re-corrupted by Mark Hammond :-)
from win32com.shell import shell
import pythoncom, os
class PyShortcut:
def __init__(self):
self._base = pythoncom.CoCreateInstance(
shell.CLSID_ShellLink,
None,
... | [
"[email protected]"
] | |
097ffe889ecca6ba681f647340800b9ee5807fde | 4f0d9dbbf1a870b661870ebb1f4ac2306e6e3802 | /apps/main/models.py | ccc30a23e7cb0441f0aa491fb824e23c663e04a4 | [] | no_license | ItEngine/ItEngine | a5d13af8ae6fc4ebcb4633d0e12e8e7e90a10c63 | 2932f31f33140b3e066d8108235398276500092e | refs/heads/master | 2020-12-03T02:30:36.385719 | 2016-07-23T00:58:04 | 2016-07-23T00:58:04 | 45,215,270 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,385 | py | import datetime
from flask import Blueprint
from sqlalchemy import event
from sqlalchemy.event import listens_for
from werkzeug.security import generate_password_hash
from app import db, login_manager
class User(db.Model):
"""
Model User
"""
__tablename__ = 'Users'
id = db.Column(db.Integer, pr... | [
"[email protected]"
] | |
a6388fd226aa360a3e348f2f9468dcad02a7a36f | f4e57645e92b594dcf611336b774f9febcd09923 | /simics/monitorCore/genContextMgr.py | 7d63179158f92977c44f66d185ba05a758005c85 | [] | no_license | kingking888/RESim | 24dc63f23df59c66a4aa455cef25a71ecbf2958a | cb3ea4536df5f93719894db83fbfbe42eb25309a | refs/heads/master | 2023-03-21T00:11:12.327617 | 2021-03-19T22:37:32 | 2021-03-19T22:37:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 45,525 | py | from simics import *
'''
Track task context and set/remove beakpoints & haps accordingly. Currently recognises two contexts:
default & RESim. Also has a carve-out for "maze_exit" breakpoints/haps, managed as an attribute of
the hap. Designed to watch a single thread group.
There is one instance of this module per c... | [
"[email protected]"
] | |
52fac62da61576ec22dc52af49eaae937130bdfd | 9ec1242ae20b6f407f25a266456d83fb8a3d5f73 | /src/nellCoin/lib/messages.py | dd5b6fb432476e6c8530ccf6e7483d3a9b8685ad | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain",
"MIT"
] | permissive | Nell-MDCoin/Nell-MDCoin | 5b6d6af7e141844ba22970adacd4877d024e872b | 9a1be366aba13539132dc7d0a9f0fdeaa2e19044 | refs/heads/master | 2020-03-21T23:17:23.329553 | 2018-06-29T17:32:53 | 2018-06-29T17:32:53 | 139,177,535 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 9,907 | py | # messages.py
#
# Distributed under the MIT/X11 software license
from __future__ import absolute_import, division, print_function, unicode_literals
import struct
import time
import random
import cStringIO
from nellCoin.lib.coredefs import *
from nellCoin.lib.core import *
MSG_TX = 1
MSG_BLOCK = 2
class msg_version(... | [
"[email protected]"
] | |
9d9c1305ed57e2a327da571c32f06702b2a1fc11 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /Akx92Ldcy78xp5zCF_4.py | 9d5e1d493ab24f7c6508ffe8f4080fda61583184 | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 669 | py | """
The function is given two strings `t` \- template, `s` \- to be sorted. Sort
the characters in `s` such that if the character is present in `t` then it is
sorted according to the order in `t` and other characters are sorted
alphabetically after the ones found in `t`.
### Examples
custom_sort("edc", "abcdef... | [
"[email protected]"
] | |
dffb8f1d28234925bf2aa668f60bba767b675746 | f1a5d89b17e3bf0f354546cc47c329a81f15dfc9 | /apps/__init__.py | 9827ad08f3307fbdc79dfbb87ce314af564b62c8 | [] | no_license | lucassimon/civilizations | 067193e17e7651a9fecb53f2b6e459c15ff4c97b | db8db27bb56ccda8c23059de88c60ef8d9670cb0 | refs/heads/master | 2020-03-29T13:16:01.025175 | 2018-12-29T18:22:45 | 2018-12-29T18:22:45 | 149,949,155 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 499 | py | # -*- coding: utf-8 -*-
# Python Libs.
from vibora import Vibora, Response
# -*- coding: utf-8 -*-
from vibora.hooks import Events
from .config import config
from .api import api
def create_app(config_name):
app = Vibora()
@app.handle(Events.AFTER_ENDPOINT)
async def before_response(response: Respons... | [
"[email protected]"
] | |
367d5083a97e5d006b5ed778da35518abfec3376 | 3f50e7f6894fc8eea825502b846dc0967493f7a4 | /doc-src/objects/index.py | 53bceb10edb9127c2df0acace412c55eba5bbc78 | [
"MIT"
] | permissive | bavardage/qtile | 92e62bc3195f3cfb0059afaa3dd008bd490caa6a | c384d354f00c8d025d0eff3e5e292303ad4b4e58 | refs/heads/master | 2021-01-16T00:49:34.141225 | 2009-03-26T16:54:51 | 2009-03-26T16:54:51 | 106,682 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 235 | py | from countershape.doc import *
pages = [
Page("barsngaps.html", "Bars and Gaps"),
Page("groups.html", "Groups"),
Page("layouts.html", "Layouts"),
Page("screens.html", "Screens"),
Page("widgets.html", "Widgets"),
]
| [
"[email protected]"
] | |
986d770ae16a5a17ea8ab21a9c8611ad9ec844f3 | e62b1e748582584a5c2a05fff970fe09e72752b4 | /app/migrations/0084_auto_20200312_2145.py | 78c8618744d5f9bd75ef8f090009cc7f7e073750 | [] | no_license | wlodekf/jpk | 5957b515ecbcded9b4f27d6a0785ee89e3a0d585 | 1c200350f57469e890a124d07f741d836d9a0833 | refs/heads/master | 2023-07-10T20:15:11.111276 | 2021-08-11T12:21:14 | 2021-08-11T12:21:14 | 394,978,461 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 645 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.14.dev20170906233242 on 2020-03-12 21:45
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0083_auto_20200304_1321'),
]
operations = [
migrat... | [
"[email protected]"
] | |
204aa6d13a66a0db1220d1ef9864c83c98c175d0 | efd6a277c2d5bffdfba6ccb4d5efd555e652d29e | /chap7/7.7.py | 7c207a1ed18a1835e5860abdacf3a292352aca05 | [] | no_license | CavalcanteLucas/cookbook | dd57583c8b5271879bb086783c12795d1c0a7ee8 | 09ac71e291571e3add8d23d79b1684b356702a40 | refs/heads/master | 2020-03-25T03:09:39.608599 | 2019-09-13T04:43:23 | 2019-09-13T04:43:23 | 143,325,952 | 0 | 0 | null | 2020-09-25T05:46:30 | 2018-08-02T17:32:08 | Python | UTF-8 | Python | false | false | 45 | py | # Capturing Variable in Anonymous Functions
| [
"[email protected]"
] | |
d4e579745fae8a47e60cc476411f97325d51b3fc | 9a9e47d9cf1f663de411218a533c10bbf288cc9d | /config/wsgi.py | bc1f238dd14822d7df2fe5c0fdcf05f70c23e3ec | [
"MIT"
] | permissive | eyobofficial/Gebeya-Schedule-Bot | 110f862a5e905c127e23ec0ad9bc9406f4180859 | 8c757fa8c26cf5dda6f917997c521d0f37b28aa9 | refs/heads/development | 2022-12-14T10:23:17.323365 | 2019-09-16T18:28:37 | 2019-09-16T18:28:37 | 204,556,349 | 3 | 2 | MIT | 2022-04-22T22:17:15 | 2019-08-26T20:31:16 | Python | UTF-8 | Python | false | false | 442 | py | """
WSGI config for config project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
"""
import os
from decouple import config
from django.core.wsgi import get_wsgi_application
os.envir... | [
"[email protected]"
] | |
fe67b587acb41838b627af66ca34a11ad458a34e | 7aa4e4bfee6b0a265a4bcf1b7f81291f3299f43b | /Day17/quiz_brain.py | 144287abfa11e8d10c95fbeb19d7332d51e1fc84 | [] | no_license | fazer1929/100DaysOfCode_Python | 464b54e33fdda25f985a4a7fde327ceafc88fa93 | 313cd77ad7266b18fd2442548569cf96f330ce26 | refs/heads/main | 2023-05-05T01:59:48.936964 | 2021-05-30T14:34:57 | 2021-05-30T14:34:57 | 311,775,381 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 868 | py | class QuizBrain:
def __init__(self,qlist):
self.question_list = qlist
self.question_number = 0
self.score = 0
def nextQuestion(self):
self.question_number += 1
question = self.question_list[self.question_number]
ans = input(f"Q.{self.question_number}: {question.t... | [
"[email protected]"
] | |
466bd43facef0ff807850dc4caf2a5d061758411 | 72af42076bac692f9a42e0a914913e031738cc55 | /01, 특강_210705_0706/02, source/CookData(2021.01.15)/Code03-02.py | 77bba4c75ad3200137cbc7e4f6f9c010afb45baa | [] | no_license | goareum93/Algorithm | f0ab0ee7926f89802d851c2a80f98cba08116f6c | ec68f2526b1ea2904891b929a7bbc74139a6402e | refs/heads/master | 2023-07-01T07:17:16.987779 | 2021-08-05T14:52:51 | 2021-08-05T14:52:51 | 376,908,264 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 536 | py | katok = ["다현", "정연", "쯔위", "사나", "지효"]
def insert_data(position, friend) :
if position < 0 or position > len(katok) :
print("데이터를 삽입할 범위를 벗어났습니다.")
return
katok.append(None) # 빈칸 추가
kLen = len(katok) # 배열의 현재 크기
for i in range(kLen-1, position, -1) :
katok[i] = katok[i-1]
katok[i-1] = None
... | [
"[email protected]"
] | |
65f9cfdb3e2d22893d9a562025b9bd322fc2b5d5 | ca8fe12def17494b4fd8a97664d7d9fcb1f9121f | /notifier.py | 5541ce560a39a17898c3957aad22a6fb585f744f | [] | no_license | pondelion/PassiveHealthMonitor | 0d52c71bc8b8aa327680ef7585bd24a608bd4385 | 4072c4c161a0d4d1c7e86931edb70b4c076e96e4 | refs/heads/main | 2023-04-25T16:06:12.784931 | 2021-05-15T03:49:35 | 2021-05-15T03:49:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 514 | py | from abc import ABCMeta, abstractmethod
from overrides import overrides
class Notifier(metaclass=ABCMeta):
@abstractmethod
def notify(
self,
monitoring_target: str,
notified_cpunt: int
) -> None:
raise NotImplementedError
class MockNotifier(Notifier):
@overrides
... | [
"[email protected]"
] | |
f7721c25cf493ef1ded4213a2d67b41a3474dcfc | 14b5679d88afa782dc5d6b35878ab043089a060a | /students/贾帅杰/home0529/hachina5.py | 36d8ba5bc9fbfdee8285432c97c1d565fbda2281 | [] | no_license | mutiangua/EIS2020 | c541ef32623f67f9277945cd39cff3c02f06e4dd | 92aa2711b763a2c93be238825c445bf2db8da391 | refs/heads/master | 2022-11-18T05:21:47.567342 | 2020-07-11T10:11:21 | 2020-07-11T10:11:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,617 | py | # 引入datetime库用于方便时间相关计算
from datetime import timedelta
import logging
import voluptuous as vol
# 引入HomeAssitant中定义的一些类与函数
# track_time_interval是监听时间变化事件的一个函数
from homeassistant.helpers.event import track_time_interval
import homeassistant.helpers.config_validation as cv
DOMAIN = "hachina5"
ENTITYID = D... | [
"[email protected]"
] | |
7023ccfa04ae9db5e41aa1991b5c1bdc4d513f2a | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02948/s243741324.py | 2cffaa3be99d436febcc3c638d3fc41cc448b571 | [] | 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 | 491 | py | from heapq import heappop,heappush,heapify
from collections import deque
N,M=map(int,input().split())
A,B,C = [0]*N,[0]*N,[0]*N
for i in range(N):
A[i],B[i] = map(int,input().split())
C[i]=[A[i],B[i]]
C.sort()
C=deque(C)
a=[]
heapify(a)
ans=0
for i in range(M,-1,-1):
while C:
if C[0][0]<=M-i:
... | [
"[email protected]"
] | |
4749a3c0908091555e12a2d95d89a42aa01f83f6 | b1571f4ee376d789b8094777fd81c4fb47a89cf1 | /AtCoder/練習/Beginners Selection/ABC087B.py | 23846c48ce3cc1eb755514d5511a6d7951002ae6 | [] | no_license | hiroyaonoe/Competitive-programming | e49e43f8853602ba73e658cab423bd91ebbe9286 | 2949e10eec3a38498bedb57ea41a2491916bab1c | refs/heads/master | 2021-06-23T21:56:33.232931 | 2021-05-30T15:27:31 | 2021-05-30T15:27:31 | 225,863,783 | 2 | 0 | null | 2020-06-14T17:54:28 | 2019-12-04T12:37:24 | Python | UTF-8 | Python | false | false | 595 | py | a=int(input())
b=int(input())
c=int(input())
x=int(input())
cnt=0
for i in range(a+1):
for j in range(b+1):
for k in range(c+1):
if x == 500*i+100*j+50*k:cnt+=1
print(cnt)
'''
coinA=min(a,x//500)
coinB=min(b,(x-coinA*500)//100)
coinC=min(c,(x-coinB*100)//50)
cnt=0
changeB=coinB
changeC=coinC
if ... | [
"[email protected]"
] | |
c23dd5e12ae719e7b4616d5f20ac6bbd59a2fadb | 4073f351551c2f73c5659cb3038a68360cc5b369 | /Lärobok/kap 6/kap. 6, sid. 76 - sätta ihop strängar.py | a6ec6841d16836e6f2de9f964e810fd69f375383 | [
"MIT"
] | permissive | Pharou/programmering1python | b9a5aca72354d3e7e91a5023a621d22a962ecd7c | 9b689027db1f7fbf06925f3094fcb126880453e4 | refs/heads/master | 2022-11-28T06:33:17.295157 | 2020-07-25T11:02:07 | 2020-07-25T11:02:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 572 | py | #!/usr/bin/python3.8
# Filnamn: kap. 6, sid. 76 - sätta ihop strängar.py
# Programmering 1 med Python - Lärobok
# Kapitel 6 - Mer om teckensträngar i Python
# Med plustecken kan du slå samman flera strängar till en enda.
# Det kallas även konkatenering av strängar
fn = 'Tage'
ln = 'Test'
name = fn + ln
print(name)
... | [
"[email protected]"
] | |
91c53302d52e9d5a99a4e0d0b685179371931b6d | cc08f8eb47ef92839ba1cc0d04a7f6be6c06bd45 | /Personal/Jaypur/Jaypur/settings.py | 76bd9d7c357d60980068b2b15d2475f763bef64f | [] | no_license | ProsenjitKumar/PycharmProjects | d90d0e7c2f4adc84e861c12a3fcb9174f15cde17 | 285692394581441ce7b706afa3b7af9e995f1c55 | refs/heads/master | 2022-12-13T01:09:55.408985 | 2019-05-08T02:21:47 | 2019-05-08T02:21:47 | 181,052,978 | 1 | 1 | null | 2022-12-08T02:31:17 | 2019-04-12T17:21:59 | null | UTF-8 | Python | false | false | 3,158 | py | """
Django settings for Jaypur project.
Generated by 'django-admin startproject' using Django 2.1.3.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
# ... | [
"[email protected]"
] | |
2c5bad20f3963b0a05c987b18b93b70740c5217f | 543e4a93fd94a1ebcadb7ba9bd8b1f3afd3a12b8 | /maza/modules/exploits/routers/dlink/multi_hedwig_cgi_exec.py | cda6380b6efab9cd5609c5c1aeab67de8cb19247 | [
"MIT"
] | permissive | ArturSpirin/maza | e3127f07b90034f08ff294cc4afcad239bb6a6c3 | 56ae6325c08bcedd22c57b9fe11b58f1b38314ca | refs/heads/master | 2020-04-10T16:24:47.245172 | 2018-12-11T07:13:15 | 2018-12-11T07:13:15 | 161,144,181 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,810 | py | import struct
from maza.core.exploit import *
from maza.core.http.http_client import HTTPClient
class Exploit(HTTPClient):
__info__ = {
"name": "D-Link Hedwig CGI RCE",
"description": "Module exploits buffer overflow vulnerablity in D-Link Hedwig CGI component, "
"which lead... | [
"[email protected]"
] | |
b84dd9230ccb462252288d436554e4655ed6d463 | 58a82d4b72e8c83d8c93a3d3639aa65fbdc9fcbd | /BCPrompt/bc_operators.py | a9acc39d4ec5b58e487e2b05b20c2289164e5737 | [] | no_license | 8Observer8/myblendercontrib | 4de9b880da56a909b3da19c732e32557ab48400b | 71aa26457c50622cf5646a7aa39fbe11491f3e7b | refs/heads/master | 2021-01-15T15:33:13.133667 | 2015-10-14T15:38:48 | 2015-10-14T15:38:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,961 | py | import bpy
from console_python import add_scrollback
from .bc_command_dispatch import (
in_scene_commands,
in_search_commands,
in_sverchok_commands,
in_core_dev_commands,
in_modeling_tools,
in_upgrade_commands,
in_bpm_commands,
in_fast_ops_commands)
history_append = bpy.ops.console.his... | [
"[email protected]"
] | |
5d6ded4faf7566b8fb858f56738f9b733236abda | a3776dfa7a4bfd76ff7cb63ddb3f6d70483b89d2 | /python/Sort/BubbleSort.py | fe4c0e4f183df93e94e89a9a26fea609cdd7d9a2 | [] | no_license | x-jeff/Algorithm_Code | 9e3038d9504391e2bd52ddde1230f69953339ab8 | b0411bcc7a7ab674ceca73aeb1348d3241370817 | refs/heads/master | 2023-07-11T19:55:52.401814 | 2021-08-14T03:46:12 | 2021-08-14T03:46:12 | 293,771,649 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 321 | py | def bubbleSort(arr):
for i in range(1, len(arr)):
for j in range(0, len(arr)-i):
if arr[j] > arr[j+1]:
arr[j], arr[j + 1] = arr[j + 1], arr[j]
return arr
if __name__ == '__main__':
testlist = [17, 23, 20, 14, 12, 25, 1, 20, 81, 14, 11, 12]
print(bubbleSort(testlist)... | [
"[email protected]"
] | |
ac126a334e5c16ab0f0e7c96bd9e37e9401d058a | d0081f81996635e913b1f267a4586eb0bfd3dcd5 | /dataactcore/migrations/versions/001758a1ab82_remove_legal_entity_address_line3_from_.py | a17f33249deb510d2d5a9c4c694595932bedba00 | [
"CC0-1.0"
] | permissive | fedspendingtransparency/data-act-broker-backend | 71c10a6c7c284c8fa6556ccc0efce798870b059b | b12c73976fd7eb5728eda90e56e053759c733c35 | refs/heads/master | 2023-09-01T07:41:35.449877 | 2023-08-29T20:14:45 | 2023-08-29T20:14:45 | 57,313,310 | 55 | 36 | CC0-1.0 | 2023-09-13T16:40:58 | 2016-04-28T15:39:36 | Python | UTF-8 | Python | false | false | 994 | py | """Remove legal_entity_address_line3 from DetachedAwardFinancialAssistance
Revision ID: 001758a1ab82
Revises: 60830f0881a5
Create Date: 2018-03-09 10:50:38.640532
"""
# revision identifiers, used by Alembic.
revision = '001758a1ab82'
down_revision = '60830f0881a5'
branch_labels = None
depends_on = None
from alembic... | [
"[email protected]"
] | |
367694bf22eedbb89985c70d2368890832e317f2 | 23d5370d1b4d889aba0c2bfccfe3fcc8bced7bf4 | /examples/RLC_example/test/RLC_IO_I_eval_sim.py | 7106cd0859cc1a4f13867be28def0f2e4708d138 | [
"MIT"
] | permissive | marcosfelt/sysid-neural-structures-fitting | 0cd21b4197b52ffe5ef78ac4045a431e202fdb05 | 80eda427251e8cce1d2a565b5cbca533252315e4 | refs/heads/master | 2022-12-06T18:45:21.365282 | 2020-09-03T18:32:16 | 2020-09-03T18:32:16 | 292,630,318 | 0 | 0 | MIT | 2020-09-03T17:01:34 | 2020-09-03T17:01:33 | null | UTF-8 | Python | false | false | 4,273 | py | import pandas as pd
import numpy as np
import torch
import matplotlib.pyplot as plt
import os
import sys
sys.path.append(os.path.join("..", ".."))
from torchid.iofitter import NeuralIOSimulator
from torchid.iomodels import NeuralIOModel
from common import metrics
if __name__ == '__main__':
dataset_type = 'id'
... | [
"[email protected]"
] | |
7de38a9ebf121bd2358964fca2221e14ee60c24a | b93446177b6ac10bd27582b1e9647f0adab7d3d4 | /pyVoodoo/ir.py | af3c8d637b9a9ac7f6a12bde7d1fe86473914bc8 | [
"BSD-3-Clause"
] | permissive | bossiernesto/pyVoodoo | 727f2666a656e8af7ed3d2c8ee4a2ea51f7b95f0 | 7be339ce05c909d0c3c2893ab1eaa2d18f335235 | refs/heads/master | 2021-04-09T17:16:46.984893 | 2017-01-31T22:11:29 | 2017-01-31T22:11:29 | 34,115,994 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 67 | py | class Node(tuple):
"""Base class for AST"""
__slots__ = []
| [
"[email protected]"
] | |
2ad5195cb2531f382db1acaca896c6c212992811 | e63c1e59b2d1bfb5c03d7bf9178cf3b8302ce551 | /uri/uri_python/ad_hoc/p1089.py | 5016209f1dd88333f5f3c73bdab477d7dc2336d9 | [] | no_license | GabrielEstevam/icpc_contest_training | b8d97184ace8a0e13e1c0bf442baa36c853a6837 | 012796c2ceb901cf7aa25d44a93614696a7d9c58 | refs/heads/master | 2020-04-24T06:15:16.826669 | 2019-10-08T23:13:15 | 2019-10-08T23:13:15 | 171,758,893 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 366 | py | N = int(input())
while N != 0:
entry = input().split(" ")
picos = 0
aux_a = int(entry[N-2])
aux_b = int(entry[N-1])
for i in range(N):
if (aux_b < aux_a and aux_b < int(entry[i])) or (aux_b > aux_a and aux_b > int(entry[i])):
picos += 1
aux_a = aux_b
aux_b = int(e... | [
"[email protected]"
] | |
1df8e317fea69f008dc5d5e32315bd51aa0fb43c | 5896da906bdcb1315881712a0baa52a706bbeb06 | /cursoemvideo/Atividades/exercicios/ex106.py | 3ebfa0d823d84edaa4ae159d58714aa44738c3d8 | [] | no_license | frederico-prog/python | 313b4c11347fb33f67d73dee89f3106f483a2333 | 6c3d3757944fcbf569e1114838f236a9329358bd | refs/heads/master | 2022-12-13T23:26:55.112797 | 2020-08-21T22:03:26 | 2020-08-21T22:03:26 | 272,381,728 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,125 | py | '''
FAÇA UM MINI-SISTEMA QUE UTILIZE O INTERECTIVE HELP DO PYTHON. O USUÁRIO VAI DIGITAR O COMANDO E O MANUAL VAI APARECER.
QUANDO O USUÁRIO DIGITAR A PALAVRA 'FIM', O PROGRAMA SE ENCERRARÁ.
OBS.: USE CORES.
'''
from time import sleep
c = (
'\033[m', # 0- sem cor
'\033[0;30;41m', # 1- cor ... | [
"[email protected]"
] | |
7a18d7edc350a9159863008804955748ffbeec6f | e262e64415335060868e9f7f73ab8701e3be2f7b | /.history/Test002/数据类型_20201205162718.py | 6bec763ca9a2bf6df3696d9f6db0124f17054d85 | [] | no_license | Allison001/developer_test | 6e211f1e2bd4287ee26fd2b33baf1c6a8d80fc63 | b8e04b4b248b0c10a35e93128a5323165990052c | refs/heads/master | 2023-06-18T08:46:40.202383 | 2021-07-23T03:31:54 | 2021-07-23T03:31:54 | 322,807,303 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 208 | py | fruits = ['orange', 'apple', 'pear', 'banana', 'kiwi', 'apple', 'banana']
# print(fruits.count("apple"))
# a = fruits.index("banana",4)
# print(a)
# fruits.reverse()
# print(fruits)
fruits.append("daka")
| [
"[email protected]"
] | |
2fd4937da743fc000cbedc14f31385020e365cac | c264153f9188d3af187905d846fa20296a0af85d | /Python/Python3网络爬虫开发实战/《Python3网络爬虫开发实战》随书源代码/proxy/selenium_chrome_auth.py | f9b9e55510c5325125459414bee6a67c7eb3fbed | [] | no_license | IS-OSCAR-YU/ebooks | 5cd3c1089a221759793524df647e231a582b19ba | b125204c4fe69b9ca9ff774c7bc166d3cb2a875b | refs/heads/master | 2023-05-23T02:46:58.718636 | 2021-06-16T12:15:13 | 2021-06-16T12:15:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,653 | py | from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import zipfile
ip = '127.0.0.1'
port = 9743
username = 'foo'
password = 'bar'
manifest_json = """
{
"version": "1.0.0",
"manifest_version": 2,
"name": "Chrome Proxy",
"permissions": [
"proxy",
... | [
"[email protected]"
] | |
ecf74664f5363c52e4790b600cfe87442802733c | 76efd7bde15c764d81b847c2f1d27776e90ec2ed | /imgauth/urls.py | 9e3bcaf4c6a05bdd033ed6d3d6fdce1b5c3a4914 | [] | no_license | ccsreenidhin/Image-Metadata-Analysis-ELA | e7e961f5d5724397081c9437c78e727577f449fe | 4bb24c3047dc59a81867c7c9cdb58bc0fc222358 | refs/heads/master | 2022-11-07T21:18:51.340625 | 2018-03-23T17:16:27 | 2020-06-13T08:02:49 | 271,966,669 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,033 | py | """imgauth URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | [
"[email protected]"
] | |
221f6766e94a926edbc76bf1e3da59c333ccd8f6 | 42631b33be63821744ec85caf6ef49a6b1d189b0 | /VSRTorch/Models/video/__init__.py | f1c5cfea0869dbccaa6f876c2c5d088f6f37712f | [
"MIT"
] | permissive | AliceMegatron/VideoSuperResolution | c70e822764b29a01f3a7c035cfc10e3b31b9f6f4 | bfcf237ee7e412b688c7f5e094585bbaecffc1d0 | refs/heads/master | 2020-05-29T15:25:13.840222 | 2019-05-16T13:00:43 | 2019-05-16T13:00:43 | 189,219,950 | 1 | 0 | MIT | 2019-05-29T12:21:53 | 2019-05-29T12:21:52 | null | UTF-8 | Python | false | false | 240 | py | # Copyright (c): Wenyi Tang 2017-2019.
# Author: Wenyi Tang
# Email: [email protected]
# Update Date: 2019/4/3 下午5:10
import logging
_logger = logging.getLogger("VSR.VIDEO")
_logger.info("@LoSealL. Video related ops, nets...")
| [
"[email protected]"
] | |
101ccd2aec21b66c706af7a581d6bb1035636092 | abb614790bdf41c7db9d09dfdea4385f78c2be52 | /rtk-RQA/rtk/hardware/__gui/gtk/Capacitor.py | 936eb677804a46719f2a7e3d331f370599b11797 | [
"BSD-3-Clause"
] | permissive | codacy-badger/rtk | f981bb75aadef6aaeb5a6fa427d0a3a158626a2a | bdb9392164b0b32b0da53f8632cbe6e3be808b12 | refs/heads/master | 2020-03-19T02:46:10.320241 | 2017-10-26T20:08:12 | 2017-10-26T20:08:12 | 135,659,105 | 0 | 0 | null | 2018-06-01T02:43:23 | 2018-06-01T02:43:23 | null | UTF-8 | Python | false | false | 39,030 | py | #!/usr/bin/env python
"""
###################################################
Capacitor Package Component Specific Work Book View
###################################################
"""
# -*- coding: utf-8 -*-
#
# rtk.hardware.__gui.gtk.Capacitor.py is part of The RTK Project
#
# All rights reserved.
... | [
"[email protected]"
] | |
c3016ff7a972f62e2906adc7b0164ee77a5a2a1c | ebfac951b49ba380d4b88e0c6308aea326597381 | /chatrender/views/chat_types.py | 7b37509617634b9ce6f0f47cc6e770b11a026be2 | [
"MIT"
] | permissive | The-Politico/django-politico-slackchat-renderer | 2e4175359a4df004526722a190040cef767837fd | adb3ed2ba5039a97ee7b021d39aa40cab11e5661 | refs/heads/master | 2022-12-10T10:57:51.796473 | 2018-05-22T15:37:57 | 2018-05-22T15:37:57 | 120,328,521 | 2 | 0 | MIT | 2022-12-08T02:09:33 | 2018-02-05T16:10:25 | JavaScript | UTF-8 | Python | false | false | 431 | py | import requests
from chatrender.conf import settings
from django.contrib.admin.views.decorators import staff_member_required
from django.shortcuts import render
@staff_member_required
def chat_types(request):
response = requests.get(settings.SLACKCHAT_CHATTYPE_ENDPOINT)
context = response.json()
return r... | [
"[email protected]"
] | |
9d48aa9c700b4a07e4a8f8bcbda6c8fb2120b598 | bad08ce4b707f8d479a6f9d6562f90d397042df7 | /Python/python-socket-网络协议.py | eb95bcb6957946195c1044ca5c82f8d396114488 | [] | no_license | lengyue1024/notes | 93bf4ec614cbde69341bc7e4decad169a608ff39 | 549358063da05057654811a352ae408e48498f25 | refs/heads/master | 2020-04-29T07:14:45.482919 | 2019-03-16T07:51:26 | 2019-03-16T07:51:26 | 175,945,339 | 2 | 0 | null | 2019-03-16T08:19:53 | 2019-03-16T08:19:52 | null | GB18030 | Python | false | false | 2,273 | py | ----------------------------
网络协议入门 |
----------------------------
----------------------------
网络-物理层和链路层 |
----------------------------
* 以太网协议(ethernet)
* 一组电信号组成一个数据包,叫做 - 帧
* 每一帧分为:报头(head)和数据(data)两部分
———————————————————————————————
|head| data |
———————————————————————————————
* he... | [
"[email protected]"
] | |
1f459741a34f6b06e0c9856c6a59f86fee6acd63 | a3cdfaf2d4d72f4d1c8bd2a9d3e8ce1f6d0316ca | /Research Files/10x10x10_moving/10x10x10movinglammpsscriptgenerator.py | e24983c5d7ba1cc8fa3588b9ef5309dd69d9177a | [] | no_license | webclinic017/Personal-Projects | d61e3f5ad1e1c12c611ae088fa64050dc2f4693b | 4e730e350e5698bb40bbdb1526596c6a8a3c5596 | refs/heads/master | 2023-06-10T23:00:50.948934 | 2021-07-03T00:46:19 | 2021-07-03T00:46:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,014 | py | #!/usr/bin/env python
if __name__ == '__main__':
temperature = 50
for i in range(1,21):
temp = int(temperature) * i
if temp == 1000:
temp_string = "99_1000"
else:
temp_string = str(temp)
f = open("10x10x10_{}k_moving_py.lmp".format(temp_string), "w+")
... | [
"[email protected]"
] | |
6f97e11be404d475c96c2f5c4625ac4c0a5f12cb | bfe6c95fa8a2aae3c3998bd59555583fed72900a | /lengthOfLIS.py | 0416711c4a259c5b75a686e99c23b0c224139c4f | [] | no_license | zzz136454872/leetcode | f9534016388a1ba010599f4771c08a55748694b2 | b5ea6c21bff317884bdb3d7e873aa159b8c30215 | refs/heads/master | 2023-09-01T17:26:57.624117 | 2023-08-29T03:18:56 | 2023-08-29T03:18:56 | 240,464,565 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 991 | py | # one solution
# class Solution:
# def lengthOfLIS(self, nums):
# log=[0 for i in range(len(nums))]
# for i in range(len(nums)):
# m=0
# for j in range(i):
# if nums[j]<nums[i]:
# m=max(m,log[j])
# log[i]=m+1
# retur... | [
"[email protected]"
] | |
82d5072c95d430143fba75124b748cf8add70456 | d342898f0a632b28d5c6f594208300c546cb51e3 | /Helper.py | ee73a7910b6b3f420a71ca6c2bdb1f2d9ec9298c | [] | no_license | DragonKiller952/ST-Groep-8 | 91ce869b1905504e65d84acf104fc68156d0ef91 | 00c19288b2fb5a6110fba6a2eea7b03650d0e534 | refs/heads/main | 2023-01-31T22:08:12.134684 | 2020-12-17T09:05:02 | 2020-12-17T09:05:02 | 318,191,516 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 612 | py | # Chosing blue
def standard_color(*args):
return 'blue'
# Chosing random without duplicates
def unique_random(self, choices, used):
choice = self.random.choice(choices)
while choice in used:
choice = self.random.choice(choices)
used.append(choice)
return choice
# Chosing color based on age... | [
"[email protected]"
] | |
09fb11f511d0b05365e34eecb467462c7c0d96a0 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/97/usersdata/228/56191/submittedfiles/lecker.py | 8478e84811202758aba6f53520c3def648a83ece | [] | 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 | 838 | py | # -*- coding: utf-8 -*-
from __future__ import division
n=int(input('digite o número de elementos:'))
lista1=[]
lista2=[]
for i in range (0,n,1):
termo1=int(input('digite o termo:'))
lista1.append(termo1)
for i in range (0,n,1):
termo2=int(input('digite o termo:'))
lista2.append(termo2)
def le... | [
"[email protected]"
] | |
440db3f7231af9543565979f36d3760abc278062 | 5f1afd8240ce286b0a78f61b7faa3a53e4d170e1 | /examples/contrib/mnist/mnist_with_neptune_logger.py | 2f7c7d2bc0784994e1fff9e02cd16acff0e25d91 | [
"BSD-3-Clause"
] | permissive | dnola/ignite | b71e5fe7c57fe157c09044d534321b070ec4c844 | da86f6d83268cba0275a18be506a69f142157e97 | refs/heads/master | 2020-12-29T08:47:24.519519 | 2020-02-07T14:30:29 | 2020-02-07T14:30:29 | 238,542,050 | 0 | 0 | BSD-3-Clause | 2020-02-05T20:29:07 | 2020-02-05T20:29:06 | null | UTF-8 | Python | false | false | 6,778 | py | """
MNIST example with training and validation monitoring using Neptune.
Requirements:
Neptune: `pip install neptune-client`
Usage:
Run the example:
```bash
python mnist_with_neptune_logger.py
```
Go to https://neptune.ai and explore your experiment.
Note:
You can see an example expe... | [
"[email protected]"
] | |
605f934856fa73abaca59a8d4b985a30749fa454 | f47ac8d59fe1c0f807d699fe5b5991ed3662bfdb | /binary24.py | 9cad221c86da71526bc3fda5faefd88b49ae47c7 | [] | no_license | YanglanWang/jianzhi_offer | 5561d8a29881d8504b23446353e9f969c01ed0c5 | 1c568f399ed6ac1017671c40c765e609c1b6d178 | refs/heads/master | 2020-06-16T10:41:44.979558 | 2019-08-03T09:07:37 | 2019-08-03T09:07:37 | 195,543,754 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,224 | py | import create_tree
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
# def FindPath(self, root, expectNumber):
# # write code here
# start=root
# if start==None:
# return []
# if start.left==... | [
"[email protected]"
] | |
4ad984ec5a966cb62eaeb618dfbc4aafb9fcd4f7 | 7100c3c8012dcf2bc6427bf33c55662bc61924f2 | /api/v1/views/cities.py | ecabd72acf87d8cdd29c4b5dfb6bb78c183ae1ca | [
"LicenseRef-scancode-public-domain"
] | permissive | OscarDRT/AirBnB_clone_v3 | c3ffa7b7ffb5182143b0f37c8ef7d1342cdffa0a | 9f015b7f1aa1b9c7f7f0d85fd7f5dc97a6679e9c | refs/heads/master | 2022-05-27T07:35:53.627606 | 2020-04-29T21:55:33 | 2020-04-29T21:55:33 | 259,408,927 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,956 | py | #!/usr/bin/python3
"""Documentation"""
from flask import Flask, jsonify, abort, make_response, request
from api.v1.views import app_views
from models.state import *
from models.city import *
from models import storage
@app_views.route('/states/<state_id>/cities', methods=['GET', 'POST'],
strict_slash... | [
"[email protected]"
] | |
707533be29f322011c761603977cdb06d18f4ac2 | 972aca82afd04ec6cbb4bf7225e3dcd56fe6f3f0 | /face_recog/recognition/views.py | 044b04aa9c2b8708a1c1e95018615f2a28c6cf5a | [] | no_license | sbhusal123/On-web-face-recognition | a41b05e53e691648f5c0296f6ad919e353e07221 | 5ff56aacce759656af407ac2cba03f72b2ce3de4 | refs/heads/master | 2022-02-25T16:12:58.746395 | 2019-09-07T06:06:37 | 2019-09-07T06:06:37 | 166,095,690 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,841 | py | from django.shortcuts import render,HttpResponse
from django.core.files.storage import FileSystemStorage
import os
import shutil
from django.conf import settings
from .models import User
# Create your views here.
def index(request):
if request.method == 'POST' and request.FILES['myfile']:
try:
... | [
"="
] | = |
15632584457de864ad6c921b7228c6996d3390a5 | ebdeaa70f6e30abab03a1589bcdd56d1339151ef | /day18Python多线程/day18-多线程/code1/耗时操作.py | 4fe94df37f17e3955e313560c7b922708e178a96 | [] | no_license | gilgameshzzz/learn | 490d8eb408d064473fdbfa3f1f854c2f163a7ef6 | d476af77a6163ef4f273087582cbecd7f2ec15e6 | refs/heads/master | 2020-03-31T11:32:42.909453 | 2018-11-22T03:34:45 | 2018-11-22T03:34:45 | 152,181,143 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 795 | py | """__author__ = 余婷"""
import pygame
from random import randint
import time
"""
1.耗时操作放到主线程中的问题:
耗时操作放到主线程中,会阻塞线程
多个耗时操作都放到一个线程中执行,最终执行的时间是两个耗时操作的时间和
2.怎么解决问题?
使用多线程(创建多个线程)
"""
def rand_color():
return randint(0, 255),randint(0, 255),randint(0, 255)
def long_time():
print('耗时操作开始')
time.sleep(10)
p... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.