blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 288 | content_id stringlengths 40 40 | detected_licenses listlengths 0 112 | license_type stringclasses 2
values | repo_name stringlengths 5 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 684
values | visit_date timestamp[us]date 2015-08-06 10:31:46 2023-09-06 10:44:38 | revision_date timestamp[us]date 1970-01-01 02:38:32 2037-05-03 13:00:00 | committer_date timestamp[us]date 1970-01-01 02:38:32 2023-09-06 01:08:06 | github_id int64 4.92k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us]date 2012-06-04 01:52:49 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[us]date 2008-05-22 07:58:19 2023-08-21 12:35:19 ⌀ | gha_language stringclasses 147
values | src_encoding stringclasses 25
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 128 12.7k | extension stringclasses 142
values | content stringlengths 128 8.19k | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
23cb6c73db0e3711ff0ecbd0b6aa7165e94b3584 | a01fb7bb8e8738a3170083d84bc3fcfd40e7e44f | /python3/module/pandas/df/sql/join.py | 540fb2077f46a30f47e810c2b98ebc2c0a79da73 | [] | no_license | jk983294/CommonScript | f07acf603611b4691b176aa4a02791ef7d4d9370 | 774bcbbae9c146f37312c771c9e867fb93a0c452 | refs/heads/master | 2023-08-21T17:50:19.036159 | 2023-08-16T00:22:03 | 2023-08-16T00:22:03 | 42,732,160 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 739 | py | import pandas as pd
import numpy as np
df1 = pd.DataFrame({'key': ['A', 'B', 'C', 'D'], 'value': np.random.randn(4)})
df2 = pd.DataFrame({'key': ['B', 'D', 'D', 'E'], 'value': np.random.randn(4)})
print(df1)
print(df2)
# SELECT * FROM df1 INNER JOIN df2 ON df1.key = df2.key;
print(pd.merge(df1, df2, on='key'))
# in c... | [
"[email protected]"
] | |
f46f3f29cb80c2826087623308da18f78f72a5fc | 91f948b849a03f27c96aa6b76980a5fa68970b70 | /experiments/__init__.py | de913a706b51dac74f50aafe9917d627f649419c | [
"MIT"
] | permissive | satyam-cyc/MASS-Learning | 3d987af7622f604db02b64313179590651285170 | 0d40de5227c94d1a5e4b18e44d16374e12821ad2 | refs/heads/master | 2022-01-10T02:23:06.670225 | 2019-06-11T19:41:35 | 2019-06-11T19:41:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 304 | py | from .LogModelParameters import LogModelParameters
from .MASSLossTerms import MASSLossTerms
from .ModelLossAndAccuracy import ModelLossAndAccuracy
from .OODDetection import OODDetection
from .SaveModelParameters import SaveModelParameters
from .UncertaintyQuantification import UncertaintyQuantification
| [
"[email protected]"
] | |
cfe436e359c52cb80c53b6b3d45d67431576f12c | 16f173135e81215d05ee8f475c13a16e3796e1fa | /Deep_Learning_with_Keras_in_Python/3.Improving_Your_Model_Performance/Learning the digits.py | 4219e773851dd4e8ea25cc68e96088e4bed25bb3 | [] | no_license | jerry-mkpong/DataCamp | 1b53821f1a32b48efdc8465251401721ba75bb56 | 10445bad35ef11567910ffab6ac70a980555a1b7 | refs/heads/master | 2022-11-11T03:57:21.923366 | 2020-06-28T17:36:10 | 2020-06-28T17:36:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,060 | py | '''
You're going to build a model on the digits dataset, a sample dataset that comes pre-loaded with scikit learn. The digits dataset consist of 8x8 pixel handwritten digits from 0 to 9:
You want to distinguish between each of the 10 possible digits given an image, so we are dealing with multi-class classification.
T... | [
"[email protected]"
] | |
cefea000be2b8713b9d4ea548c735c4984caf7de | 3904a5773c5aa047692895dce1225be7d84f5cc7 | /ML_AI_TechWithTim/K-Means/K_Means.py | f33bc323b87c4aba7ff873f2b6d3cbe38641d449 | [] | no_license | snehilk1312/ML_1 | 063038586296c4f6f0ab92422a6c60dd007c4068 | 8e3b081b1037ab999ca78fa282ce7041730d082a | refs/heads/master | 2020-09-07T20:01:45.509060 | 2020-03-15T15:44:54 | 2020-03-15T15:44:54 | 220,898,676 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,057 | py | # Importing modules
import numpy as np
import sklearn
from sklearn.preprocessing import scale
from sklearn.datasets import load_digits
from sklearn.cluster import KMeans
from sklearn import metrics
# Loading Data sets
digits = load_digits()
data = scale(digits.data)
y = digits.target
k = len(np.unique(y)) # ... | [
"[email protected]"
] | |
00bb139bc7606403b576ce7cbadcf0745f8fc7fb | cc1eeb43eb9e4e83078f4c87e40a5c7fe56b109f | /Day05/shuixianhua.py | 8cb8f1e3429d4bb2394b367a322d9a2886c2fb28 | [] | no_license | test-wsl/learn_100 | d57ac4e8e7c062472273622351374decbae6d213 | 9fbb83455c15115b3cdec80d17c542e0aba2a6df | refs/heads/master | 2020-08-29T22:43:10.800177 | 2019-11-04T08:17:38 | 2019-11-04T08:17:38 | 218,192,964 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 326 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
寻找水仙花数
水仙花数为一个三位数,每位上的立方之和正好等于本身
version: 0.1
"""
for num in range(100, 1000):
low = num %10
mid = num // 10 %10
high = num // 100
if num == low ** 3 + mid ** 3 + high **3:
print (num)
| [
"weishl"
] | weishl |
e953daf74af26ba80d58f622e7985c62eaf4cadd | 76de53bd3923a57a36d0ed4b4a900b56050ebb31 | /SW Expert Academy/190926/1263_사람 네트워크2.py | 61dbab0dcf1c40b17376a408ca7e36d21934b1bb | [] | no_license | Seungjin22/Algorithm | 5b4fd53ae5742d830594d116e536531959b3454d | 753dda47334e445f7a9e1e41df5e44564d99e79e | refs/heads/master | 2020-09-04T08:54:01.359518 | 2020-02-03T10:41:05 | 2020-02-03T10:41:05 | 219,697,780 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 821 | py | import sys
sys.stdin = open('1263_input.txt')
def AllPairsShortest(D):
for k in range(N):
for i in range(N):
if i != k:
for j in range(N):
if j != k and j != i:
D[i][j] = min(D[i][k] + D[k][j], D[i][j])
T = int(input())
for tc in ran... | [
"[email protected]"
] | |
b4577f6dc2ca7a3c75449f92e21cad3aa1b6b5fe | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2814/60652/240209.py | 19b8d713af73e09dfece90f18c9ba12646de0b4a | [] | 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 | 162 | py | n = int(input())
l=list(map(int,input().split()))
l.sort()
num_s=0
wait_time=0
for i in l:
if i>=wait_time:
num_s+=1
wait_time+=i
print(num_s) | [
"[email protected]"
] | |
8196a6d153f61f9ad7d3d169b3850fb382e2b167 | 6963f191a3574edcfaecc265a363bc10d4cdfc19 | /osf/management/commands/osf_shell.py | 11ed88684d009e3e84f839751c5ea9a4012a6410 | [
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-warranty-disclaimer",
"AGPL-3.0-only",
"LGPL-2.0-or-later",
"LicenseRef-scancode-proprietary-license",
"MPL-1.1",
"CPAL-1.0",
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause",
"Apache-2.0"
] | permissive | rdm-dev12/RDM-osf.io | 8f3c2f7057b17512921292e84578d24ad4ca2bb5 | 14d9a924b8c6bc7d79fd34b87830ffa29acafed1 | refs/heads/timestamp-v18.2.7.file_upload_x_of_y | 2022-12-09T06:23:43.320341 | 2019-02-27T07:39:12 | 2019-02-27T07:39:12 | 172,862,723 | 0 | 0 | Apache-2.0 | 2022-09-16T17:58:51 | 2019-02-27T07:07:48 | Python | UTF-8 | Python | false | false | 7,816 | py | """Enhanced python shell.
Includes all features from django-extension's shell_plus command plus OSF-specific
niceties.
By default, sessions run in a transaction, so changes won't be commited until
you execute `commit()`.
All models are imported by default, as well as common OSF and Django objects.
To add more object... | [
"[email protected]"
] | |
4b07d1427059017a5efe9aaa2f4d709d14931aa8 | d4ea1f9747799bf503523b86b8b5ee29bab65eff | /gyun/cli/iaas_client/actions/s2/modify_s2_shared_target_attributes.py | a1ea167b28dd9c16607678be1997a591d7b7c26d | [
"Apache-2.0"
] | permissive | gyun-gome/gyun-cli | 88b5493d90a19c5bf56a1bba4bf301d1b4a3156d | 275b6664335e2ef21a01a48f8c06d6a89dd63467 | refs/heads/master | 2021-06-28T13:53:01.300135 | 2017-09-13T04:44:01 | 2017-09-13T04:44:01 | 103,353,093 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,206 | py | # encoding: utf-8
# =========================================================================
# ©2017-2018 北京国美云服科技有限公司
# -------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this work except in compliance with the ... | [
"[email protected]"
] | |
f686c14d3f3ccf88ac38fcd8a34d6d9f001befd4 | 3c0f50b6563e2c9c6306f7ca2216ff46c8250b96 | /address/migrations/0003_usuario.py | b33eb28800063dbfeb0a7fb4e8513ef46fb1f55c | [] | no_license | JoamirS/project-curriculo | 895e72b34a8a51478c3fe5958d509bfa89be761e | 490ed533dae740a7d2e1b652ce36fdb2af294eb3 | refs/heads/master | 2020-06-01T19:50:42.019259 | 2019-06-22T22:16:18 | 2019-06-22T22:16:18 | 190,904,296 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 576 | py | # Generated by Django 2.2.2 on 2019-06-12 17:20
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('address', '0002_auto_20190612_1127'),
]
operations = [
migrations.CreateModel(
name='Usuario',
fields=[
... | [
"[email protected]"
] | |
bf604c5c88de4b1652ed6c32594f61c0e84a082f | b6a59c78b4143441077f9ce81c9a6951687f9103 | /quiz/common/templatetags/common_tags.py | c22c495f3760396d2cbf01c3943b9cb2026abee6 | [] | no_license | EkaterinaEIvanova/quiz | 7389bd26eb891ba5a7033b91698321cbba7d2d7d | 6f93a5d6e604f127be0d29e8eebbb07c10eb9d47 | refs/heads/master | 2023-03-22T00:54:27.100204 | 2021-03-10T07:35:08 | 2021-03-10T07:35:08 | 346,270,553 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 179 | py | from django import template
register = template.Library()
@register.simple_tag()
def get_name_or_email(user):
name = user.name if user.name else user.email
return name
| [
"[email protected]"
] | |
cff93f064b230f06153b1a99ce69e4f99f7623ed | 82f5a3e139034da846db0c3516848e3a797a52f0 | /sixteen.py | 16eeac1b1be9cf18646774eb3f75c61a77c5b307 | [] | no_license | Yanl05/LeetCode-git | d98f807d05d80b7df6c0a4f69cf233e25b0695b5 | ce617247645517f15d513c29e12c7fff33e1cccf | refs/heads/master | 2020-04-12T08:33:30.416069 | 2018-12-19T06:07:36 | 2018-12-19T06:07:36 | 162,388,594 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,272 | py | '''
给定一个包括 n 个整数的数组 nums 和 一个目标值 target。
找出 nums 中的三个整数,使得它们的和与 target 最接近。返回这三个数的和。假定每组输入只存在唯一答案。
例如,给定数组 nums = [-1,2,1,-4], 和 target = 1.
与 target 最接近的三个数的和为 2. (-1 + 2 + 1 = 2).
'''
class Solution:
def threeSumClosest(self, nums, target):
"""
:type nums: List[int]
:type target: int
... | [
"[email protected]"
] | |
d4877edd8d5a2d480e47bd50800d5ab3ebf850c1 | 411e5de8629d6449ff9aad2eeb8bb1dbd5977768 | /AlgoExpert/array/largestRange/1.py | 821c57749e45fe5a0fdc1c4e4747e82157bdece3 | [
"MIT"
] | permissive | Muzque/Leetcode | cd22a8f5a17d9bdad48f8e2e4dba84051e2fb92b | 2c37b4426b7e8bfc1cd2a807240b0afab2051d03 | refs/heads/master | 2022-06-01T20:40:28.019107 | 2022-04-01T15:38:16 | 2022-04-01T15:39:24 | 129,880,002 | 1 | 1 | MIT | 2022-04-01T15:39:25 | 2018-04-17T09:28:02 | Python | UTF-8 | Python | false | false | 395 | py | def largestRange(array):
array.sort()
h = len(array)
mid = int(h/2) if h % 2 == 0 else int(h/2)+1
left, right = array[0], array[h-1]
for i in range(1, mid):
j = h - i - 1
if array[i] not in (array[i-1], array[i - 1]+1):
left = array[i]
if array[j] not in (array[j+... | [
"[email protected]"
] | |
df35d4e2bc4e83da4aa1b6939db8d9e229e0bd70 | 9edaf93c833ba90ae9a903aa3c44c407a7e55198 | /travelport/models/type_agency_profile_level_4.py | 5ee1ce876f63b649381647bc034c48d77dea4ecb | [] | no_license | tefra/xsdata-samples | c50aab4828b8c7c4448dbdab9c67d1ebc519e292 | ef027fe02e6a075d8ed676c86a80e9647d944571 | refs/heads/main | 2023-08-14T10:31:12.152696 | 2023-07-25T18:01:22 | 2023-07-25T18:01:22 | 222,543,692 | 6 | 1 | null | 2023-06-25T07:21:04 | 2019-11-18T21:00:37 | Python | UTF-8 | Python | false | false | 318 | py | from __future__ import annotations
from enum import Enum
__NAMESPACE__ = "http://www.travelport.com/schema/common_v37_0"
class TypeAgencyProfileLevel4(Enum):
"""
Profile levels in the Agency Hierarchy.
"""
AGENCY = "Agency"
BRANCH = "Branch"
BRANCH_GROUP = "BranchGroup"
AGENT = "Agent"
| [
"[email protected]"
] | |
6ffac5ea208ba2d6e273b1fdd1775d31f9762364 | 9eab77cb998e94ceb2b2d08738b05a98982505f1 | /sentiment-analysis/pythoncodes/01-text-to-id.py | 16b8e56535efcf07addf12250c40f7bd8382a0a7 | [] | no_license | behrouzmadahian/python | 1584dd13cde8531e69bb6fab76f148dc3fc0da57 | 5d4dbde8d570623fe785e78a3e45cd05ea80aa08 | refs/heads/master | 2021-06-28T16:53:09.927450 | 2020-09-21T14:02:55 | 2020-09-21T14:02:55 | 156,713,696 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 827 | py | import re
from nltk.corpus import stopwords
from nltk import word_tokenize
stop_words = stopwords.words('english')
def remove_stop_words(word_list, stopwords):
filtered_list = [w for w in word_list if not w in stopwords]
return filtered_list
# Removes punctuation, parentheses, question marks, etc... | [
"[email protected]"
] | |
225ceeb7e8183ff4fe55fd640c53ec2f3624a6c8 | 2bcc421ee345b00cf805c543b37d18b5d019dc04 | /adafruit-circuitpython-bundle-6.x-mpy-20201126/examples/matrixportal_simpletest.py | 6acecd14cfce626edae83fa7e034c7cadbe1bf85 | [] | no_license | saewoonam/sc-current-source-titano | 5a1ad46889c1b09c168424901fd71cb4eab5c61b | 1c136aa8b61268d9ac0b5a682b30ece70ab87663 | refs/heads/main | 2023-03-02T22:12:26.685537 | 2021-02-09T03:28:01 | 2021-02-09T03:28:01 | 317,299,900 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,528 | py | # SPDX-FileCopyrightText: 2020 Melissa LeBlanc-Williams, written for Adafruit Industries
#
# SPDX-License-Identifier: Unlicense
"""
This example checks the current Bitcoin price and displays it in the middle of the screen
"""
import time
import board
import terminalio
from adafruit_matrixportal.matrixportal im... | [
"[email protected]"
] | |
6ba923e2897f1f34a8d9fefb279295ca6d447ad8 | 3c88b31090d6568435e811a455ce934604fa5c9f | /category/migrations/0004_auto_20210604_1515.py | 1598b851990f23fb79ef630c2f5f22ca87780b4e | [] | no_license | kamran1231/Great-Cart-Django-Website | 09e0e7b5085737cf54614b45b5424ac5c273bb5b | a674593d5c8cb15be7b24dca397f9027659033e2 | refs/heads/main | 2023-05-17T08:52:31.092404 | 2021-06-09T20:21:08 | 2021-06-09T20:21:08 | 373,645,947 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 453 | py | # Generated by Django 3.1.7 on 2021-06-04 09:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('category', '0003_alter_category_category_name'),
]
operations = [
migrations.AlterField(
model_name='category',
name... | [
"[email protected]"
] | |
d8985677a59029b17e03e42069b38812e14ecf8d | 743d58c35caf21568feddc86946bbee340174721 | /leet_code/labuladong/stack/p0739_Daily_Temperatures.py | 0d1b05a124037d6c13f214f35b0a1ee5f41b145f | [] | no_license | klgentle/lc_python | 38009ed82614c8f21ca9af6e3779a2e0898af09f | aabe56e690b40e4b93afef99bfe46d9a06e20cea | refs/heads/master | 2022-12-02T05:23:55.585659 | 2022-08-07T12:11:38 | 2022-08-07T12:11:38 | 176,750,473 | 2 | 0 | null | 2022-11-15T23:42:06 | 2019-03-20T14:21:51 | Python | UTF-8 | Python | false | false | 926 | py | """
739. Daily Temperatures
Medium
Given a list of daily temperatures T, return a list such that, for each day in the input, tells you how many days you would have to wait until a warmer temperature. If there is no future day for which this is possible, put 0 instead.
For example, given the list of temperatures T = [... | [
"[email protected]"
] | |
ffd932dbd780505eb4bef606f414e3d7a4c848cc | fa93e53a9eee6cb476b8998d62067fce2fbcea13 | /build/position_controllers/catkin_generated/pkg.installspace.context.pc.py | 23b00e2290c58c2e5784fc5a4572705354fb4fd1 | [] | no_license | oyetripathi/ROS_conclusion_project | 2947ee2f575ddf05480dabc69cf8af3c2df53f73 | 01e71350437d57d8112b6cec298f89fc8291fb5f | refs/heads/master | 2023-06-30T00:38:29.711137 | 2021-08-05T09:17:54 | 2021-08-05T09:17:54 | 392,716,311 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 518 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "${prefix}/include".split(';') if "${prefix}/include" != "" else []
PROJECT_CATKIN_DEPENDS = "controller_interface;forward_command_controller".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "-lpos... | [
"[email protected]"
] | |
430b886607c68f95ee1443b58e22c10b06ca0c36 | b2135e3fc77666f043f0fbafd0d88ed9865d5b4f | /7183 Python Basics/32 Chapter 6 - About Properties/07 test_validation3/78794_01_code.py | 2f8efd74a7afa4db194872d5c8b652ef492fbd27 | [] | no_license | Felienne/spea | 164d05e9fbba82c7b7df8d00295f7157054f9248 | ecb06c66aaf6a2dced3f141ca415be9efb7dbff5 | refs/heads/master | 2020-03-17T17:35:27.302219 | 2018-05-17T10:14:49 | 2018-05-17T10:14:49 | 133,794,299 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 568 | py | #
class AboutAssignments(unittest.TestCase):
class Doctor:
def __init__(self):
self._age = 903
@property
def age(self):
return self._age
@age.setter
def age(self, value):
if value < self.age:
pass
# nice t... | [
"[email protected]"
] | |
7b14e461e9ba7105b24ef8d77b490e8ec0419f57 | c0239d75a8199ec84ad683f945c21785c1b59386 | /dingtalk/api/rest/OapiChatTagDeleteRequest.py | 2292ed627d4873421afe37fd82864be50c362d9b | [] | no_license | luss613/oauth_dingtalk | 9f253a75ce914c577dbabfb84e97fd883e80e04b | 1e2554642d2b16c642a031670d08efa4a74e8252 | refs/heads/master | 2023-04-23T01:16:33.450821 | 2020-06-18T08:22:57 | 2020-06-18T08:22:57 | 264,966,287 | 1 | 1 | null | 2020-06-18T08:31:24 | 2020-05-18T14:33:25 | Python | UTF-8 | Python | false | false | 348 | py | '''
Created by auto_sdk on 2019.10.31
'''
from dingtalk.api.base import RestApi
class OapiChatTagDeleteRequest(RestApi):
def __init__(self,url=None):
RestApi.__init__(self,url)
self.chatid = None
self.group_tag = None
def getHttpMethod(self):
return 'POST'
def getapiname(self):
return 'ding... | [
"[email protected]"
] | |
187ba8799480652d89c93f0faa7a2c97b7f99b6a | d61f7eda203a336868c010abb8f9a6f45dd51adb | /497. Random Point in Non-overlapping Rectangles.py | 01542c98bf043ff665c52427319b5c46b11bdf49 | [] | no_license | Mschikay/leetcode | b91df914afc728c2ae1a13d3994568bb6c1dcffb | 7c5e5fe76cee542f67cd7dd3a389470b02597548 | refs/heads/master | 2020-04-17T12:11:38.810325 | 2019-10-06T02:37:32 | 2019-10-06T02:37:32 | 166,570,922 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 761 | py | class Solution:
def __init__(self, rects: List[List[int]]):
self.rects = rects
self.prefix = [0]
for x1, y1, x2, y2 in rects:
self.prefix.append((x2 - x1 + 1) * (y2 - y1 + 1) + self.prefix[-1])
def pick(self) -> List[int]:
num = random.randint(0, self.prefix[-1])
... | [
"[email protected]"
] | |
3d6198b0abdc87164e432fd09c0390ecba72de19 | de1abd0ebbb817aa5f23d369e7dda360fd6f1c32 | /chapter8/7-NltkAnalysis.py | 486c02f2c7559694ee722504c06720e50861ed6a | [] | no_license | CodedQuen/Web-Scraping-with-Python- | 33aaa2e3733aa1f2b8c7a533d74f5d08ac868197 | 67f2d5f57726d5a943f5f044480e68c36076965b | refs/heads/master | 2022-06-13T01:34:39.764531 | 2020-05-05T11:07:01 | 2020-05-05T11:07:01 | 261,435,932 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 486 | py | from nltk import word_tokenize, sent_tokenize, pos_tag
sentences = sent_tokenize("Google is one of the best companies in the world. I constantly google myself to see what I'm up to.")
nouns = ['NN', 'NNS', 'NNP', 'NNPS']
for sentence in sentences:
if "google" in sentence.lower():
taggedWords = pos_... | [
"[email protected]"
] | |
7b44412ce11d8c6c342152422abcba093327737b | 3a48cfb0b43fe61f52355a67b2b5700aa8c5ddf2 | /src/som/interpreter/ast/nodes/message/generic_node.py | 5cfc38a7257dfdd24617ab9116a1996177084454 | [
"MIT"
] | permissive | SOM-st/RTruffleSOM | ce380d02985b0ef1f41f400409f61377dc3a583e | 1efc698577830ff3fcd1607e7155d9c6423e8804 | refs/heads/master | 2021-01-17T07:25:19.895376 | 2020-12-08T18:56:50 | 2020-12-08T18:56:50 | 17,311,290 | 9 | 2 | MIT | 2020-09-02T16:08:31 | 2014-03-01T08:45:25 | Python | UTF-8 | Python | false | false | 2,256 | py | from rpython.rlib.debug import make_sure_not_resized
from rpython.rlib.jit import we_are_jitted
from ..dispatch import SuperDispatchNode, UninitializedDispatchNode, send_does_not_understand
from .abstract_node import AbstractMessageNode
class GenericMessageNode(AbstractMessageNode):
_immutable_fields_ = ['_disp... | [
"[email protected]"
] | |
e1f076a8b40ac225debbdfe4c6812b58dabf08a9 | ef74d9ad851021bcb0ed12880e14269b6ed7f617 | /Sample/Doudizhu/Server/src/ZyGames.Doudizhu.HostServer/PyScript/Action/Action12001.py | 7d60a50f0c7331ca1c254a61ca9b33c5de93279d | [
"BSD-2-Clause-Views",
"MIT"
] | permissive | sunyuping/Scut | b5e5798e9b519941f0ac3a08a3263dc0f45beb47 | ec2ea35c0e4de1f2da49c50d14e119a4f17cd93a | refs/heads/master | 2020-12-25T23:19:26.597830 | 2013-11-16T07:50:01 | 2013-11-16T07:50:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,188 | py | import clr, sys
from action import *
from System import *
from mathUtils import MathUtils
clr.AddReference('ZyGames.Framework');
clr.AddReference('ZyGames.Framework.Common');
clr.AddReference('ZyGames.Framework.Game');
clr.AddReference('ZyGames.Doudizhu.Bll');
clr.AddReference('ZyGames.Doudizhu.Model');
clr.AddRefer... | [
"[email protected]"
] | |
33984d775374f698a16233b294ee3e505d447c22 | 75519d2a9bf55e2d9376ea08a36676948a8b232c | /ui/uikits/TextSteam.py | 222dfb2dcd7959a0cc728b523b9bf881ec8afbf0 | [
"MIT"
] | permissive | CGFanTuan/damgteam | 9c32d59cbd0ecb9d3acffd9b902b918c40797e14 | aec414f084f6ab6ec5897314390605aaa8380d62 | refs/heads/master | 2020-09-17T00:29:24.832648 | 2019-11-25T09:51:13 | 2019-11-25T09:51:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,118 | py | # -*- coding: utf-8 -*-
"""
Script Name: TextSteam.py
Author: Do Trinh/Jimmy - 3D artist.
Description:
"""
# -------------------------------------------------------------------------------------------------------------
from __future__ import absolute_import, unicode_literals
from PyQt5.QtCore ... | [
"[email protected]"
] | |
5bc9f7cb725e608b584db5bb260968104795a451 | 8aefdf04c115c6c6ab64997576ced97d4727dd06 | /curation-api/src/users/migrations/0003_auto_20170809_0921.py | b1d063c42c10db300647e9e67f63a3b2095bfcd5 | [] | no_license | mohanj1919/django_app_test | a0d47bc98c604d81253c74488dcdbc2ccd039863 | 5d5bc4c1eecbf627d38260e4d314d8451d67a4f5 | refs/heads/master | 2021-05-08T06:01:21.712986 | 2017-10-11T12:12:07 | 2017-10-11T12:12:07 | 106,544,537 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 485 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-08-09 09:21
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0002_auto_20170703_1555'),
]
operations = [
migrations.AlterField(... | [
"[email protected]"
] | |
59919a9d9900991467fcaabb4cc8e2acaff0e9e0 | 32eeb97dff5b1bf18cf5be2926b70bb322e5c1bd | /benchmark/aphotomanager/testcase/firstcases/testcase5_028.py | 6856a16cc6fb6a518aa1c467766e72d1e3596a1c | [] | no_license | Prefest2018/Prefest | c374d0441d714fb90fca40226fe2875b41cf37fc | ac236987512889e822ea6686c5d2e5b66b295648 | refs/heads/master | 2021-12-09T19:36:24.554864 | 2021-12-06T12:46:14 | 2021-12-06T12:46:14 | 173,225,161 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,391 | py | #coding=utf-8
import os
import subprocess
import time
import traceback
from appium import webdriver
from appium.webdriver.common.touch_action import TouchAction
from selenium.common.exceptions import NoSuchElementException, WebDriverException
desired_caps = {
'platformName' : 'Android',
'deviceName' : 'Android Emulat... | [
"[email protected]"
] | |
b15a144177a3426684ef389cecaaf365fc24dcb7 | f54070cd3048a3645cb25f301592a904d387a1c9 | /python_prgrams/testpython/file7.py | d8e98c05bbd14af3e9bf261e2d23c7dc207b2a22 | [] | no_license | mak705/Python_interview | 02bded60417f1e6e2d81e1f6cde6961d95da2a8e | aff2d6018fd539dbcde9e3a6b3f8a69167ffca0d | refs/heads/master | 2020-03-22T21:03:34.018919 | 2019-11-15T08:51:34 | 2019-11-15T08:51:34 | 140,653,056 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 138 | py | ##counting lines in a file
fhand = open('mul.py')
for line in fhand:
line = line.rstrip()
if not line.startswith('#From'):
print line
| [
"[email protected]"
] | |
fe616439df2cf983c744ea323919525c2e94cbb2 | 814fd0bea5bc063a4e34ebdd0a5597c9ff67532b | /chrome/common/extensions/docs/server2/refresh_tracker_test.py | f1f596f1afefe93317d8fa365571a158aa4abe97 | [
"BSD-3-Clause"
] | permissive | rzr/chromium-crosswalk | 1b22208ff556d69c009ad292bc17dca3fe15c493 | d391344809adf7b4f39764ac0e15c378169b805f | refs/heads/master | 2021-01-21T09:11:07.316526 | 2015-02-16T11:52:21 | 2015-02-16T11:52:21 | 38,887,985 | 0 | 0 | NOASSERTION | 2019-08-07T21:59:20 | 2015-07-10T15:35:50 | C++ | UTF-8 | Python | false | false | 1,941 | py | #!/usr/bin/env python
# Copyright 2014 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 unittest
from object_store_creator import ObjectStoreCreator
from refresh_tracker import RefreshTracker
class RefreshTrackerT... | [
"[email protected]"
] | |
a13bd7f9da7ea032c84dac021788da7cb8446ba9 | ac2c3e8c278d0aac250d31fd023c645fa3984a1b | /saleor/saleor/wishlist/error_codes.py | 5f77c477ea3948543085f5817a1d759cf6bc6e85 | [
"BSD-3-Clause",
"CC-BY-4.0"
] | permissive | jonndoe/saleor-test-shop | 152bc8bef615382a45ca5f4f86f3527398bd1ef9 | 1e83176684f418a96260c276f6a0d72adf7dcbe6 | refs/heads/master | 2023-01-21T16:54:36.372313 | 2020-12-02T10:19:13 | 2020-12-02T10:19:13 | 316,514,489 | 1 | 1 | BSD-3-Clause | 2020-11-27T23:29:20 | 2020-11-27T13:52:33 | TypeScript | UTF-8 | Python | false | false | 196 | py | from enum import Enum
class WishlistErrorCode(str, Enum):
GRAPHQL_ERROR = "graphql_error"
INVALID = "invalid"
NOT_FOUND = "not_found"
REQUIRED = "required"
UNIQUE = "unique"
| [
"[email protected]"
] | |
b9a387605d577d71f54a61961bb4e49480104471 | 0180b1a8e19c0a02e7c00ebe1a58e17347ad1996 | /BCR2000/consts.py | a1a23805ec9ecae2ff31a2bf1a642c416c9ebe69 | [] | no_license | cce/buttons | e486af364c6032b4be75ab9de26f42b8d882c5b0 | 7d4936c91df99f4c6e08f7e347de64361c75e652 | refs/heads/master | 2021-01-17T06:56:55.859306 | 2014-12-22T05:03:00 | 2015-11-25T03:42:28 | 46,657,841 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,666 | py | # Embedded file name: /Users/versonator/Jenkins/live/Binary/Core_Release_64_static/midi-remote-scripts/BCR2000/consts.py
""" The following consts should be substituted with the Sys Ex messages for requesting
a controller's ID response and that response to allow for automatic lookup"""
ID_REQUEST = 0
ID_RESP = 0
GENERIC... | [
"[email protected]"
] | |
62fed4f8d716eb544aca34dbe492a0dfcc899225 | 4da57c6e9efb0a884449e019ce5c9b5d516d2bb1 | /exp/kernel_benchmark/bin_clean/amarel_aggr_data.py | 6d0a278193addea1d73a624d1f74908838af8828 | [] | no_license | radical-experiments/affinity_model | dc848fe1666b2f017d37ba041890462890eba9b5 | fc67420a2278020eee770680fa7ccef76ed2dfa5 | refs/heads/master | 2021-04-06T16:56:26.847920 | 2018-09-25T03:15:47 | 2018-09-25T03:15:47 | 83,361,464 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,431 | py | import os
import sys
import csv
from pprint import pprint
from files_dir_mod import *
def amarel_aggregate(src_path, dst_path):
for dirname in dirnames:
if not os.path.isdir(src_path+'/'+dirname):
print "{0} does not exist".format(dirname)
continue
dir_keywords = dirname... | [
"[email protected]"
] | |
0255e46bd31fd1ecc2393fdf7322e84db39abf47 | 97e60d0ca572d0dc3fc80f8719cd57a707ab6069 | /bias_zebra_print/stock.py | dd94d374c932338a87ab830754b76fb7b1fe5b94 | [] | no_license | josepato/bias_trunk_v6 | 0c7c86493c88f015c049a139360478cabec7f698 | b6ab6fc2ff3dc832f26effdba421bcc76d5cabac | refs/heads/master | 2020-06-12T14:18:31.101513 | 2016-12-15T22:55:54 | 2016-12-15T22:55:54 | 75,803,957 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,033 | py | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
#... | [
"[email protected]"
] | |
b563672c1f0906584832778d726b6ba3cac18c7f | 060ce17de7b5cdbd5f7064d1fceb4ded17a23649 | /fn_microsoft_defender/fn_microsoft_defender/util/customize.py | bb2e546adca2b9b9f81794d806d0518c8a1f2dd2 | [
"MIT"
] | permissive | ibmresilient/resilient-community-apps | 74bbd770062a22801cef585d4415c29cbb4d34e2 | 6878c78b94eeca407998a41ce8db2cc00f2b6758 | refs/heads/main | 2023-06-26T20:47:15.059297 | 2023-06-23T16:33:58 | 2023-06-23T16:33:58 | 101,410,006 | 81 | 107 | MIT | 2023-03-29T20:40:31 | 2017-08-25T14:07:33 | Python | UTF-8 | Python | false | false | 6,691 | py | # -*- coding: utf-8 -*-
"""Generate the Resilient customizations required for fn_microsoft_defender"""
import base64
import os
import io
try:
from resilient import ImportDefinition
except ImportError:
# Support Apps running on resilient-circuits < v35.0.195
from resilient_circuits.util import ImportDefini... | [
"[email protected]"
] | |
5f5e98e0204db775e5b06fd86453f2a62c41f96b | 6dc685fdb6f4a556225f13a1d26170ee203e9eb6 | /Windows2016Lab/scripts/Service_Windows2016_Action___create___Task_set_parameters.py | 57d63f95d0ebaa657302006a67576086a8cb18df | [
"MIT"
] | permissive | amaniai/calm | dffe6227af4c9aa3d95a08b059eac619b2180889 | fefc8b9f75e098daa4c88c7c4570495ce6be9ee4 | refs/heads/master | 2023-08-15T17:52:50.555026 | 2021-10-10T08:33:01 | 2021-10-10T08:33:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 549 | py | username = 'user-{}'.format(_construct_random_password(8,numDigits=4, numLetters=4, numPuncs=0, numCaps=0).lower())
password = _construct_random_password(10,upper=14, numDigits=4)
print('ACCESS_USERNAME={}'.format(username))
print('ACCESS_PASSWORD={}'.format(password))
calm_index = int('@@{calm_array_index}@@')
email_... | [
"[email protected]"
] | |
dd0eb441e105f56c21813d7d9263c17466d46938 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/217/usersdata/274/113684/submittedfiles/av2_p3_m2.py | 56a351331cc54ba12f7e3c1497129b302fa40d64 | [] | 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 | 916 | py | # -*- coding: utf-8 -*
n=int(input("Dimensão do Quadrado: "))
while notn>=3:
n=int(input("Dimensão do Quadrado: "))
M=[]
for i in range(0,n,1):
L=[]
for j in range(o,n,1):
L.append(int(input("Elemento da Linha: "))
M.append(L)
somaL=[]
for i in range(0,n,1):
somaL.append(sum(M[i]))
somaC=[... | [
"[email protected]"
] | |
db889d7c5e5cba1d1b2ed71e137b42acf283c13f | b89ec2839b4a6bd4e2d774f64be9138f4b71a97e | /dataent/patches/v7_2/set_doctype_engine.py | 6de22a5c653dc5755560998976ce23c246a2026d | [
"MIT"
] | permissive | dataent/dataent | ec0e9a21d864bc0f7413ea39670584109c971855 | c41bd5942ffe5513f4d921c4c0595c84bbc422b4 | refs/heads/master | 2022-12-14T08:33:48.008587 | 2019-07-09T18:49:21 | 2019-07-09T18:49:21 | 195,729,981 | 0 | 0 | MIT | 2022-12-09T17:23:49 | 2019-07-08T03:26:28 | Python | UTF-8 | Python | false | false | 231 | py | from __future__ import unicode_literals
import dataent
def execute():
for t in dataent.db.sql('show table status'):
if t[0].startswith('tab'):
dataent.db.sql('update tabDocType set engine=%s where name=%s', (t[1], t[0][3:])) | [
"[email protected]"
] | |
6a4c16868431e1e23eb5da001f0272c6e45ae97e | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /7ECZC8CBEhy5QkvN3_15.py | b7cee2eac0f62400c8ad19d3b56c9c8b2daff2e8 | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 151 | py |
def how_many_walls(n, w, h):
sum_ = 0
count = 0
wallSquare = w * h
while sum_ <= n:
sum_ += wallSquare
count += 1
return count - 1
| [
"[email protected]"
] | |
677d22f42d470e7e6fab11f89b82637deaaa0fb6 | be80a2468706ab99c838fa85555c75db8f38bdeb | /app/reward/migrations/0002_auto_20180822_0903.py | 2e25721da289ed95493031d61d3ce8c3cf1f9c9a | [] | no_license | kimdohwan/Wadiz | 5468d218ba069387deabf83376b42a4f69360881 | 91f85f09a7c9a59864b69990127911a112d4bdbd | refs/heads/master | 2021-06-24T06:41:04.111305 | 2019-07-03T12:51:18 | 2019-07-03T12:51:18 | 143,955,968 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,105 | py | # Generated by Django 2.1 on 2018-08-22 00:03
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('reward', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | [
"[email protected]"
] | |
f44f6d9972814a4e7a1f84001a60cf2ac08ac418 | 5c26eafece0ee85a7ed4b6a34ee52753d7c86e49 | /polyaxon/estimators/hooks/step_hooks.py | 0e177575b29f1a02195d3439137b45db2c0d2a1a | [
"MIT"
] | permissive | StetHD/polyaxon | 345257076d484b2267ba20d9d346f1367cdd92d3 | dabddb9b6ea922a0549e3c6fd7711231f7462fa3 | refs/heads/master | 2021-03-19T06:45:51.806485 | 2017-09-26T14:31:26 | 2017-09-26T14:36:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,184 | py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from collections import OrderedDict
from tensorflow.python.training import basic_session_run_hooks
from polyaxon.estimators.hooks.utils import can_run_hook
class StepLoggingTensorHook(basic_session_run_hooks.LoggingTensorHook)... | [
"[email protected]"
] | |
1e30a64ef30c526d7e94b66f205c369d97dd8da2 | fa04309288a0f8b2daae2fd73c8224a1c0ad4d95 | /eventkit_cloud/tasks/tests/test_task_factory.py | b02b4477e9ad630dbbdb95b91ae28bb1c39b5c47 | [] | no_license | jj0hns0n/eventkit-cloud | 7bb828c57f29887621e47fe7ce0baa14071ef39e | 2f749090baf796b507e79251a4c4b30cb0b4e126 | refs/heads/master | 2021-01-01T19:45:32.464729 | 2017-07-24T19:01:24 | 2017-07-24T19:01:24 | 98,675,805 | 0 | 0 | null | 2017-07-28T18:16:34 | 2017-07-28T18:16:34 | null | UTF-8 | Python | false | false | 7,545 | py | # -*- coding: utf-8 -*-
import logging
import os
import uuid
from django.contrib.auth.models import Group, User
from django.contrib.gis.geos import GEOSGeometry, Polygon
from django.db import DatabaseError
from django.test import TestCase
from eventkit_cloud.jobs.models import Job, Region, ProviderTask, ExportProvide... | [
"[email protected]"
] | |
bfe394598000549c8aa731dc5185e43ee6e450f1 | 15581a76b36eab6062e71d4e5641cdfaf768b697 | /Leetcode Contests/Biweekly Contest 24/Minimum Value to Get Positive Step by Step Sum.py | ed393ceda76cec842051a7cd8dd259618306c947 | [] | no_license | MarianDanaila/Competitive-Programming | dd61298cc02ca3556ebc3394e8d635b57f58b4d2 | 3c5a662e931a5aa1934fba74b249bce65a5d75e2 | refs/heads/master | 2023-05-25T20:03:18.468713 | 2023-05-16T21:45:08 | 2023-05-16T21:45:08 | 254,296,597 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 318 | py | from typing import List
class Solution:
def minStartValue(self, nums: List[int]) -> int:
sum = 0
min = nums[0]
for i in nums:
sum += i
if sum < min:
min = sum
if min >= 0:
return 1
else:
return abs(min) + 1
| [
"[email protected]"
] | |
06ce341e0e7626e2104a0667155275b069268653 | 55c250525bd7198ac905b1f2f86d16a44f73e03a | /Python/Kivy/pycon2013/html5slides/scripts/md/render.py | b5ef0975e20eb201985c57c5b48cd150050171da | [] | no_license | NateWeiler/Resources | 213d18ba86f7cc9d845741b8571b9e2c2c6be916 | bd4a8a82a3e83a381c97d19e5df42cbababfc66c | refs/heads/master | 2023-09-03T17:50:31.937137 | 2023-08-28T23:50:57 | 2023-08-28T23:50:57 | 267,368,545 | 2 | 1 | null | 2022-09-08T15:20:18 | 2020-05-27T16:18:17 | null | UTF-8 | Python | false | false | 129 | py | version https://git-lfs.github.com/spec/v1
oid sha256:6e3940fcf589334234bc7943dfc2c0d8e860fc139a432eae485128714022232c
size 1807
| [
"[email protected]"
] | |
e5b0887d810d27576528bafda388fdfd915d3c4f | c6320d68968de93ce9d686f5a59bb34909d089bb | /03_Polynomial_Regression/polynomial_regression_rad.py | fafb65739a4f26fa1c7981097fe77412704b96b8 | [] | no_license | rbartosinski/MachineLearningRes | 0835e6b9f94c309bf2ce8ff7ceb73912a7eeea63 | 5a1af15e77d589149aa1cb22cb96f56956fd9a0f | refs/heads/master | 2020-04-07T00:58:03.692579 | 2019-01-11T13:49:12 | 2019-01-11T13:49:12 | 157,925,825 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,313 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Nov 20 15:04:28 2018
@author: radek
"""
#wczytanie bibliotek
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
#wczytanie danych
dataset = pd.read_csv('Position_Salaries.csv')
X = dataset.iloc[:, 1:2].values
y = dataset.iloc[:, 2]... | [
"[email protected]"
] | |
e4ae96c0131406c2419a148c0186b3269acfa42f | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03964/s755365360.py | 9f2a66cabd6d3f24f2aafce6d59b731dbfbc227f | [] | 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 | 619 | py | import bisect
import collections
import copy
import functools
import heapq
import math
import sys
from collections import deque
from collections import defaultdict
input = sys.stdin.readline
MOD = 10**9+7
N = int(input())
T = [0]*N
A = [0]*N
for i in range(N):
T[i],A[i] = map(int,(input().split()))
t,a = T[0],A[0... | [
"[email protected]"
] | |
5a1e071972d89f69b241aff120e8fcd705ae1ca1 | cc0d06e2aad3d30152c4a3f3356befdc58748313 | /2.til8.oktober/plot_wavepacket.py | a4583b0987077f652a46aaf25eff8dbe8cd4c6bb | [] | no_license | lasse-steinnes/IN1900 | db0bb4da33fa024d4fe9207337c0f1d956197c50 | c8d97c2903078471f8e419f88cc8488d9b8fc7da | refs/heads/master | 2020-12-14T15:34:36.429764 | 2020-01-18T19:59:46 | 2020-01-18T19:59:46 | 234,789,653 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 473 | py | ###
## Definerer funksjonen
from numpy import exp, sin, pi, linspace
bølge = lambda x,t=0: exp(-(x-3*t)**2)*sin(3*pi*(x-t))
## Lager intervallet for x
x_matrise = linspace(-4,4,1500)
# Slik at
bølge_t0 = bølge(x_matrise)
### Plotter funksjonen
import matplotlib.pyplot as plt
plt.plot(x_matrise, bølge_t0, label = '... | [
"[email protected]"
] | |
3701dcb0526d0abec2a1850baf3176ed362ec0d1 | d0eb582894eff3c44e3de4bd50f571f9d9ab3a02 | /venv/lib/python3.7/site-packages/flake8/plugins/pyflakes.py | 018d1c98a1f847fa743d847fa6d66a99ac4dbc0c | [
"MIT"
] | permissive | tdle94/app-store-scrapper | 159187ef3825213d40425215dd9c9806b415769e | ed75880bac0c9ef685b2c1bf57a6997901abface | refs/heads/master | 2022-12-20T21:10:59.621305 | 2020-10-28T00:32:21 | 2020-10-28T00:32:21 | 247,291,364 | 1 | 2 | MIT | 2022-12-08T03:53:08 | 2020-03-14T14:25:44 | Python | UTF-8 | Python | false | false | 6,021 | py | """Plugin built-in to Flake8 to treat pyflakes as a plugin."""
# -*- coding: utf-8 -*-
from __future__ import absolute_import
try:
# The 'demandimport' breaks pyflakes and flake8.plugins.pyflakes
from mercurial import demandimport
except ImportError:
pass
else:
demandimport.disable()
import os
from typ... | [
"[email protected]"
] | |
1d0479b10748363c8598f680dd8ac691974f0c9e | 11060ca244940baef96a51d794d73aab44fc31c6 | /src/brainstorming/tornado/modbus/pymodbus/__init__.py | 0bb3d9b53e2360b44fb5246e72a6c065e1fdb427 | [] | no_license | D3f0/txscada | eb54072b7311068a181c05a03076a0b835bb0fe1 | f8e1fd067a1d001006163e8c3316029f37af139c | refs/heads/master | 2020-12-24T06:27:17.042056 | 2016-07-27T17:17:56 | 2016-07-27T17:17:56 | 3,565,335 | 9 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,280 | py | """
Pymodbus: Modbus Protocol Implementation
-----------------------------------------
This package can supply modbus clients and servers:
client:
- Can perform single get/set on discretes and registers
- Can perform multiple get/set on discretes and registers
- Working on diagnostic/file/pipe/setting/info requets
-... | [
"devnull@localhost"
] | devnull@localhost |
ac8fcee7be310f87e1cf6a7479d7dec05c585cc6 | 6413fe58b04ac2a7efe1e56050ad42d0e688adc6 | /tempenv/lib/python3.7/site-packages/dash_bootstrap_components/_components/CardText.py | c0146873ce75910bc6733eabc85670d925f82320 | [
"MIT"
] | permissive | tytechortz/Denver_temperature | 7f91e0ac649f9584147d59193568f6ec7efe3a77 | 9d9ea31cd7ec003e8431dcbb10a3320be272996d | refs/heads/master | 2022-12-09T06:22:14.963463 | 2019-10-09T16:30:52 | 2019-10-09T16:30:52 | 170,581,559 | 1 | 0 | MIT | 2022-06-21T23:04:21 | 2019-02-13T21:22:53 | Python | UTF-8 | Python | false | false | 3,332 | py | # AUTO GENERATED FILE - DO NOT EDIT
from dash.development.base_component import Component, _explicitize_args
class CardText(Component):
"""A CardText component.
Keyword arguments:
- children (a list of or a singular dash component, string or number; optional): The children of this component
- id (string; optio... | [
"[email protected]"
] | |
f2acacf75129142364d47c4372031342a19566a9 | 1554150a9720ebf35cd11c746f69169b595dca10 | /tk_practise/shape_display_view.py | 908a4219294e3677bf29d3a5afa33665d56b7ca5 | [] | no_license | andrewili/shape-grammar-engine | 37a809f8cf78b133f8f1c3f9cf13a7fbbb564713 | 2859d8021442542561bdd1387deebc85e26f2d03 | refs/heads/master | 2021-01-18T22:46:51.221257 | 2016-05-31T21:15:28 | 2016-05-31T21:15:28 | 14,129,359 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,640 | py | # shape_display_view.py
import Tkinter as tk
import tkFileDialog
import tkFont
import ttk
class Observable(object):
def __init__(self):
self.observers = []
def broadcast(self, widget):
for observer in self.observers:
observer.respond(widget)
def add_observer(self, observer... | [
"[email protected]"
] | |
3609cbd86fe366108bed83305f57d5ac02c3ce24 | a2dc75a80398dee58c49fa00759ac99cfefeea36 | /bluebottle/bb_projects/migrations/0018_auto_20210302_1417.py | 69d49b4e0234875309c1a920a6cf0af3e76ba9e8 | [
"BSD-2-Clause"
] | permissive | onepercentclub/bluebottle | e38b0df2218772adf9febb8c6e25a2937889acc0 | 2b5f3562584137c8c9f5392265db1ab8ee8acf75 | refs/heads/master | 2023-08-29T14:01:50.565314 | 2023-08-24T11:18:58 | 2023-08-24T11:18:58 | 13,149,527 | 15 | 9 | BSD-3-Clause | 2023-09-13T10:46:20 | 2013-09-27T12:09:13 | Python | UTF-8 | Python | false | false | 956 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2021-03-02 13:17
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('bb_projects', '0017_auto_20210302_1417'),
('projects', '0095_auto_20210302_1417'),
... | [
"[email protected]"
] | |
9b73114f7ea4cb451dfbd939500b3c97b30e2d8a | 673440c09033912157d1c3767d5308f95755e76a | /ManachersAlgo.py | 34e2ae34f01f3af98fb2e6b72aa5e397af5e4c02 | [] | no_license | jagadeshwarrao/programming | 414193b1c538e37684378233d0532bd786d63b32 | 1b343251a8ad6a81e307d31b2025b11e0b28a707 | refs/heads/master | 2023-02-02T19:26:21.187561 | 2020-12-21T18:21:00 | 2020-12-21T18:21:00 | 274,644,612 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,482 | py |
def findLongestPalindromicString(text):
N = len(text)
if N == 0:
return
N = 2*N+1
L = [0] * N
L[0] = 0
L[1] = 1
C = 1
R = 2
i = 0
iMirror = 0
maxLPSLength = 0
maxLPSCenterPosition = 0
start = -1
end = -1
diff = -1
for i in xrange(2,N):
iMirror = 2*C-i
L[i]... | [
"[email protected]"
] | |
a40784738ed092668081456e1b724bb29a5780e8 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2790/60589/243105.py | 230152d093784ddcfff077a0a0b37bbdb892f405 | [] | 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 | 350 | py | nm=input().split(' ')
n=int(nm[0])
m=int(nm[1])
a=list(map(int,input().split(' ')))
b=list(map(int,input().split(' ')))
ans=[]
a.sort()
for e in b:
has=False
for i in range(n):
if a[i]>e:
has=True
ans.append(i)
break
if not has:
ans.append(n)
ans=list(map(... | [
"[email protected]"
] | |
6677355c1c7383d94b434226fae40b8cf76ba2d0 | bdf86d69efc1c5b21950c316ddd078ad8a2f2ec0 | /venv/Lib/site-packages/twisted/plugins/twisted_core.py | a66ad7f0104dc02e960fa9fecfcfe59830bb8d40 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | DuaNoDo/PythonProject | 543e153553c58e7174031b910fd6451399afcc81 | 2c5c8aa89dda4dec2ff4ca7171189788bf8b5f2c | refs/heads/master | 2020-05-07T22:22:29.878944 | 2019-06-14T07:44:35 | 2019-06-14T07:44:35 | 180,941,166 | 1 | 1 | null | 2019-06-04T06:27:29 | 2019-04-12T06:05:42 | Python | UTF-8 | Python | false | false | 588 | py | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
from __future__ import absolute_import, division
from twisted.internet.endpoints import (
_SystemdParser, _TCP6ServerParser, _StandardIOParser,
_TLSClientEndpointParser)
from twisted.protocols.haproxy._parser import (
HAProxyServerPar... | [
"[email protected]"
] | |
d2f61390d6b2c4b81f9dcb27acbe7b81d9e4cc13 | 16734d189c2bafa9c66fdc989126b7d9aa95c478 | /Python/flask/counter/server.py | 1c6c4ef1a9e0e7f137e799fcf25543dac002609e | [] | no_license | Ericksmith/CD-projects | 3dddd3a3819341be7202f11603cf793a2067c140 | 3b06b6e289d241c2f1115178c693d304280c2502 | refs/heads/master | 2021-08-15T17:41:32.329647 | 2017-11-18T01:18:04 | 2017-11-18T01:18:04 | 104,279,162 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 534 | py | from flask import Flask, session, render_template, request, redirect
app = Flask(__name__)
app.secret_key = "Dojo"
@app.route('/')
def index():
if session.get('counter') == None:
session['counter'] = 0
session['counter'] += 1
return render_template('index.html', counter = session['counter'])
@ap... | [
"[email protected]"
] | |
c702a1355b9688ac31eb5f513f2d151be4f47134 | f242b489b9d3db618cf04415d4a7d490bac36db0 | /Archives_Homework/src/archivesziped.py | 2b15451a84885e66b830d42976855d566e4d935e | [] | no_license | LABETE/Python2_Homework | e33d92d4f8a1867a850430600ccc7baf7ebc6dad | b24207b74c7883c220efc28d315e386dedead41d | refs/heads/master | 2016-08-12T19:04:05.304348 | 2015-05-27T04:05:18 | 2015-05-27T04:05:18 | 36,182,485 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 710 | py | import zipfile
import os
import glob
def zippedfiles(zipfilename):
path = os.getcwd()
zip_file = os.path.join(path, os.path.basename(zipfilename)+".zip")
files_to_zip = [os.path.basename(fn) for fn in glob.glob(zipfilename+"\*") if os.path.isfile(fn)]
zf = zipfile.ZipFile(zip_file, "w", zipfile.ZIP_DEF... | [
"[email protected]"
] | |
0a79edc64c01026d73147c2ba199040dde418acb | 0d75e69be45600c5ef5f700e409e8522b9678a02 | /IWDjangoAssignment1/settings.py | fbefbb96d64fcd6e7f9d12d0300504134dbaecd7 | [] | no_license | sdrsnadkry/IWDjangoAssignment1 | 28d4d6c264aac250e66a7be568fee29f1700464b | 6eb533d8bbdae68a6952113511626405e718cac6 | refs/heads/master | 2022-11-29T07:53:37.374821 | 2020-07-18T03:27:52 | 2020-07-18T03:27:52 | 280,572,491 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,138 | py | """
Django settings for IWDjangoAssignment1 project.
Generated by 'django-admin startproject' using Django 3.0.7.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
... | [
"[email protected]"
] | |
5bc8073cfa36a998bb67cbfb0078c319d984d68b | f561a219c57bd75790d3155acac6f54299a88b08 | /city/migrations/0010_auto_20170406_1957.py | c4a0d52767af5f7c0852ea55762bea83e23cf8ea | [] | no_license | ujjwalagrawal17/OfferCartServer | 1e81cf2dc17f19fa896062c2a084e6b232a8929e | b3cd1c5f8eecc167b6f4baebed3c4471140d905f | refs/heads/master | 2020-12-30T15:31:04.380084 | 2017-05-24T18:26:20 | 2017-05-24T18:26:20 | 91,155,405 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 472 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-04-06 19:57
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('city', '0009_auto_20170406_1951'),
]
operations = [
migrations.AlterField(
... | [
"[email protected]"
] | |
00525edd9f91bf0763fa8d35db247a55724a0f90 | ad13583673551857615498b9605d9dcab63bb2c3 | /output/models/nist_data/atomic/duration/schema_instance/nistschema_sv_iv_atomic_duration_enumeration_2_xsd/__init__.py | aa2a5364c28c8263b4cba85ac2516304e22deade | [
"MIT"
] | permissive | tefra/xsdata-w3c-tests | 397180205a735b06170aa188f1f39451d2089815 | 081d0908382a0e0b29c8ee9caca6f1c0e36dd6db | refs/heads/main | 2023-08-03T04:25:37.841917 | 2023-07-29T17:10:13 | 2023-07-30T12:11:13 | 239,622,251 | 2 | 0 | MIT | 2023-07-25T14:19:04 | 2020-02-10T21:59:47 | Python | UTF-8 | Python | false | false | 381 | py | from output.models.nist_data.atomic.duration.schema_instance.nistschema_sv_iv_atomic_duration_enumeration_2_xsd.nistschema_sv_iv_atomic_duration_enumeration_2 import (
NistschemaSvIvAtomicDurationEnumeration2,
NistschemaSvIvAtomicDurationEnumeration2Type,
)
__all__ = [
"NistschemaSvIvAtomicDurationEnumerat... | [
"[email protected]"
] | |
04c9978ad6a95cfed263e81ffc0cdeaba8a93b6c | ab460d3c0c3cbc4bd45542caea46fed8b1ee8c26 | /dprs/common/sftp/PySFTPAuthException.py | a6d9b4cf620bb2d34ac77e41957792eefe8c126a | [
"Unlicense"
] | permissive | sone777/automl-dprs | 8c7f977402f6819565c45acd1cb27d8d53c40144 | 63572d1877079d8390b0e4a3153edf470056acf0 | refs/heads/main | 2023-09-03T21:54:43.440111 | 2021-11-02T14:44:35 | 2021-11-02T14:44:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 288 | py | # -*- coding: utf-8 -*-
# Author : Jin Kim
# e-mail : [email protected]
# Powered by Seculayer © 2020 AI Service Model Team, R&D Center.
class PySFTPAuthException(Exception):
def __str__(self):
return "[ERROR-C0001] Authentication failed. check username and password!"
| [
"[email protected]"
] | |
5406a0bd1a39311a7a0f09d7800aa9d20636919f | c631e9756210bab774afda2b228853cb93ae28fe | /src/test/test_trainer_attention.py | 5e4bbec6ab8ba0a3a905e64b3e3157bbcaafa0c8 | [] | no_license | AIRob/pytorch-chat-bot | 9a9af2078ef4ee6b5ce5a10a75977fb0b5adfe6a | 1b604f9fecee70e519a930525afaa83facbfaf68 | refs/heads/master | 2020-03-27T10:00:35.117537 | 2017-12-09T01:38:40 | 2017-12-09T01:38:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,541 | py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
from unittest import TestCase
from data.data_loader_attention import DataLoaderAttention
from models.encoder import Encoder
from models.decoder import Decoder
from models.trainer import Trainer
class TestTrainerAtt... | [
"[email protected]"
] | |
8403194c971606033bb11b869b9d4c323b5903ff | 2e00546708761532e0081dc9be928b58307c5941 | /setup.py | 6f30596ede067a7daf4e98a7a4a82ac3164c7708 | [
"BSD-3-Clause"
] | permissive | gijs/bulbs | 5f16b9d748face55f514f73c849745af91a8bd97 | 650e03d1ee635d0d8f40557f4697b3a85b88cdff | refs/heads/master | 2021-01-18T06:23:04.496132 | 2011-07-15T15:00:49 | 2011-07-15T15:00:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,726 | py | """
Bulbs
-----
Bulbs is a Python persistence framework for graph databases that
connects to Rexster.
"""
from setuptools import Command, setup
class run_audit(Command):
"""Audits source code using PyFlakes for following issues:
- Names which are used but not defined or used before they are defined.
... | [
"[email protected]"
] | |
2e6261677ddc3501e9d60c2a0868e8ae1938e26e | f33e2e9e10a7c8a5ecc9997f86548bad071ce33e | /alerta/app/exceptions.py | 6c0b0caccf525a16c4431797256c413948898f77 | [
"Apache-2.0"
] | permissive | sasha-astiadi/alerta | 01f1136adbfc26f79935c1c44e9ca3d49efd6f00 | f9a33f50af562e5d0a470e1091e9d696d76558f4 | refs/heads/master | 2023-03-16T10:35:42.300274 | 2018-01-23T14:06:42 | 2018-01-23T14:06:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 431 | py |
class AlertaException(IOError):
pass
class RejectException(AlertaException):
"""The alert was rejected because the format did not meet the required policy."""
pass
class RateLimit(AlertaException):
"""Too many alerts have been received for a resource or from an origin."""
pass
class BlackoutPeri... | [
"[email protected]"
] | |
b71941a91b5406892fc0962d46ddbf6b15406fb4 | 64d923ab490341af97c4e7f6d91bf0e6ccefdf4b | /tensorforce/core/networks/auto.py | 6a445b051b06ae683e4435e6f34e5c608037ef5b | [
"Apache-2.0"
] | permissive | tensorforce/tensorforce | 38d458fedeeaa481adf083397829cea434d020cd | 1bf4c3abb471062fb66f9fe52852437756fd527b | refs/heads/master | 2023-08-17T17:35:34.578444 | 2023-08-14T20:14:08 | 2023-08-14T20:14:08 | 85,491,050 | 1,312 | 246 | Apache-2.0 | 2023-08-14T20:14:10 | 2017-03-19T16:24:22 | Python | UTF-8 | Python | false | false | 7,625 | py | # Copyright 2020 Tensorforce Team. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | [
"[email protected]"
] | |
4aadfcd20a040ed6e5cbe84affd38b0320fa6928 | e12385c85e41d98bc3104f3e4dde22025a0b6365 | /m5stack-u105/examples/test_saw.py | f4472bdcdd32643ae248bca4c8a0e8d2eb67553a | [] | no_license | mchobby/esp8266-upy | 6ee046856ec03c900ebde594967dd50c5f0a8e21 | 75184da49e8578315a26bc42d9c3816ae5d5afe8 | refs/heads/master | 2023-08-04T15:11:03.031121 | 2023-07-27T15:43:08 | 2023-07-27T15:43:08 | 72,998,023 | 47 | 30 | null | 2021-06-20T16:12:59 | 2016-11-06T15:00:57 | Python | UTF-8 | Python | false | false | 515 | py | """
Test the MicroPython driver for M5Stack U105, DDS unit (AD9833), I2C grove.
Set SAWTOOTH signal output (this have fixed frequency)
* Author(s):
30 may 2021: Meurisse D. (shop.mchobby.be) - Initial Writing
"""
from machine import I2C
from mdds import *
from time import sleep
# Pico - I2C(0) - sda=GP8, scl=GP9... | [
"[email protected]"
] | |
d04e9de9a1c3e8805f81d233500ea425bbc2a27d | 55646e56d6bb31ae0913eb71879f49efdfaf904f | /scribbli/profiles/constants.py | 1dc3127b96a3d1fc9dcffb567188491d639a6e3d | [] | no_license | jacobbridges/scribbli-mvp | 2d8851aba018b54431af0eb8cb030d02d35f173f | c24f2f1a2a19480a6b5f69ffbcccf0269d156140 | refs/heads/master | 2023-02-22T11:37:12.239845 | 2021-06-17T04:10:30 | 2021-06-17T04:10:30 | 156,637,826 | 0 | 0 | null | 2023-02-15T20:18:03 | 2018-11-08T02:20:53 | Python | UTF-8 | Python | false | false | 328 | py | class RoleChoices(object):
Guest = 0
User = 1
Moderator = 2
Admin = 3
@staticmethod
def as_choices():
return (
(RoleChoices.Guest, "Guest"),
(RoleChoices.User, "User"),
(RoleChoices.Moderator, "Moderator"),
(RoleChoices.Admin, "Admin"),
... | [
"[email protected]"
] | |
2bfe0ce34f0883cb0a19b9e1ddc4a134e88153f8 | bbea9b1f64284c9ca95d9f72f35e06aa39522c67 | /Scripts/plot_MS-FIGURE_4b_v2.py | 179017277abe54d6e9bf27d6a766bc9dfc223aaa | [
"MIT"
] | permissive | zmlabe/ModelBiasesANN | 1e70c150bd8897fa5fb822daf8ffad0ee581c5f1 | cece4a4b01ca1950f73c4d23fb379458778c221e | refs/heads/main | 2023-05-23T06:05:23.826345 | 2022-07-22T18:36:27 | 2022-07-22T18:36:27 | 339,145,668 | 7 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,625 | py | """
Script to plot figure 4b
Author : Zachary M. Labe
Date : 12 July 2021
Version : 2
"""
### Import packages
import sys
import matplotlib.pyplot as plt
import matplotlib.colors as c
import numpy as np
import palettable.cubehelix as cm
import palettable.scientific.sequential as sss
import palettable.cart... | [
"[email protected]"
] | |
6db9b78246aef370efc8ef609a33b1dadab124a8 | 53e58c213232e02250e64f48b97403ca86cd02f9 | /18/mc/ExoDiBosonResonances/EDBRTreeMaker/test/crab3_analysisM4500_R_0-7.py | fc7eba74e67b0348603262470fab519845902f68 | [] | no_license | xdlyu/fullRunII_ntuple_102X | 32e79c3bbc704cfaa00c67ab5124d40627fdacaf | d420b83eb9626a8ff1c79af5d34779cb805d57d8 | refs/heads/master | 2020-12-23T15:39:35.938678 | 2020-05-01T14:41:38 | 2020-05-01T14:41:38 | 237,192,426 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,160 | py | from WMCore.Configuration import Configuration
name = 'WWW'
steam_dir = 'xulyu'
config = Configuration()
config.section_("General")
config.General.requestName = 'M4500_R0-7_off'
config.General.transferLogs = True
config.section_("JobType")
config.JobType.pluginName = 'Analysis'
config.JobType.inputFiles = ['Autumn... | [
"[email protected]"
] | |
87934c23053f09c259a1ce2e6270ea821fc90da6 | 520baeba0e86b0bab3c5590f40b868ca4306dc7e | /hazelcast/protocol/codec/count_down_latch_get_count_codec.py | 345de04de3a44161676bfb0d96b360bac2e606ad | [
"Apache-2.0"
] | permissive | mustafaiman/hazelcast-python-client | 69f27367162045bbfa4e66e7adadcfd254dfab21 | 85f29f975c91520075d0461327e38ab93c2e78c2 | refs/heads/master | 2021-01-18T04:23:10.740371 | 2015-12-11T14:26:06 | 2015-12-11T14:26:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,038 | py | from hazelcast.serialization.data import *
from hazelcast.serialization.bits import *
from hazelcast.protocol.client_message import ClientMessage
from hazelcast.protocol.custom_codec import *
from hazelcast.protocol.codec.count_down_latch_message_type import *
REQUEST_TYPE = COUNTDOWNLATCH_GETCOUNT
RESPONSE_TYPE = 102... | [
"[email protected]"
] | |
fd8a249b1f44b14a3c11896e5a12e1c86a1988e9 | 372a0eb8d3be3d40b9dfb5cf45a7df2149d2dd0d | /charles/Week 07/lab08/lab08.py | 198fffad72e36dfcdfe4b7505ec51e6fe007c177 | [] | no_license | charlesfrye/cs61a-summer2015 | 5d14b679e5bea53cfa26c2a6a86720e8e77c322c | 1f5c0fbf5dce5d1322285595ca964493d9adbdfe | refs/heads/master | 2016-08-07T06:06:09.335913 | 2015-08-21T00:33:25 | 2015-08-21T00:33:25 | 38,509,126 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,460 | py | ## Linked Lists and Sets ##
# Linked Lists
class Link:
"""A linked list.
>>> s = Link(1, Link(2, Link(3, Link(4))))
>>> len(s)
4
>>> s[2]
3
>>> s
Link(1, Link(2, Link(3, Link(4))))
"""
empty = ()
def __init__(self, first, rest=empty):
assert rest is Link.empty or ... | [
"[email protected]"
] | |
95303882335933bf48710ea4c6a92ec77ab6fa8b | 71748e7379548d75fcf6713f0e6d66d6db1c2bbd | /4AL16IS051_SHETTY _TANVI/Jaishma Ma'am/Challenge 1/p1.py | 94f3b31275c157f72cf5617f380da3fcadaba83b | [] | no_license | alvas-education-foundation/ISE_4th_Year_Coding_challenge | fcf78c755cc924bea7e905e67c1e30385cf5af0b | 96cfc92d679576dab15ef7d1cb6773f2082abfb2 | refs/heads/master | 2022-11-17T09:19:23.851817 | 2020-07-21T09:59:40 | 2020-07-21T09:59:40 | 265,195,858 | 5 | 2 | null | null | null | null | UTF-8 | Python | false | false | 233 | py | @@ -0,0 +1,26 @@
1)
x = input("")
n = int(x)
if n % 2 == 1:
print("Weird")
elif n % 2 == 0 and 2 <= n <= 5:
print("Not Weird")
elif n % 2 == 0 and 6 <= n <= 20:
print("Weird")
else:
print("Not Weird")
| [
"[email protected]"
] | |
6b17dc10db7ef000a03c12afdf0d7cd7b9821e29 | 4904acd900496b4883c2f5b4aa6b45d1ef6654c0 | /graphgallery/datasets/tu_dataset.py | a2979a79643bdb0f96d5d8b81ba2af4af7188b33 | [
"MIT"
] | permissive | blindSpoter01/GraphGallery | aee039edd759be9272d123463b0ad73a57e561c7 | e41caeb32a07da95364f15b85cad527a67763255 | refs/heads/master | 2023-06-17T11:42:27.169751 | 2021-07-15T03:07:39 | 2021-07-15T03:07:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,887 | py | import os
import glob
import requests
import os.path as osp
import numpy as np
import pickle as pkl
import pandas as pd
from urllib.error import URLError
from typing import Optional, List
from .in_memory_dataset import InMemoryDataset
from ..data.edge_graph import EdgeGraph
from ..data.io import makedirs, ... | [
"[email protected]"
] | |
c4acc48e7f4000ebbf4268909ad39fdf1dab8ec8 | ae11eda73ad0a61f8f7f894314bd9aa40798b50a | /MyAnalysis/IsolationTools/python/muonDirectionalPFIsolations_cff.py | 8d48cf05750f63c872425cdbbf934b676a67f71b | [] | no_license | hbakhshi/NTupleProducer | 087a7286f7352e9f6c517d257d7f195280db058d | eec377339008d2139128059d7127f9a2184c080c | refs/heads/master | 2021-01-22T14:32:44.891691 | 2014-06-10T12:48:12 | 2014-06-10T12:48:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,644 | py | import FWCore.ParameterSet.Config as cms
import MyAnalysis.IsolationTools.muonPFIsoSingleType_cfi
### DR=0.1 cone
# Charged Hadron isolation
muonDirPFIsoChHad01 = MyAnalysis.IsolationTools.muonPFIsoSingleType_cfi.muonPFIsoSingleTypeMapProd.clone()
muonDirPFIsoChHad01.pfTypes = cms.untracked.vint32(1)
muonDirPFIsoChHad... | [
"[email protected]"
] | |
a9625efecd45a7fb3e4a24d22d5c9bdcebcb29c7 | fe3265b72e691c6df8ecd936c25b6d48ac33b59a | /homeassistant/components/homekit/type_triggers.py | b239d67877c7d22f4ee6b162d2d1ac3e503fea4d | [
"Apache-2.0"
] | permissive | bdraco/home-assistant | dcaf76c0967783a08eec30ce704e5e9603a2f0ca | bfa315be51371a1b63e04342a0b275a57ae148bd | refs/heads/dev | 2023-08-16T10:39:15.479821 | 2023-02-21T22:38:50 | 2023-02-21T22:38:50 | 218,684,806 | 13 | 7 | Apache-2.0 | 2023-02-21T23:40:57 | 2019-10-31T04:33:09 | Python | UTF-8 | Python | false | false | 4,485 | py | """Class to hold all sensor accessories."""
from __future__ import annotations
import logging
from typing import Any
from pyhap.const import CATEGORY_SENSOR
from homeassistant.core import CALLBACK_TYPE, Context
from homeassistant.helpers import entity_registry
from homeassistant.helpers.trigger import async_initiali... | [
"[email protected]"
] | |
5f3f39608a38d86ff22999affdb2aa8d25fb22ae | e3eead40e93fdf5186269536edefab4f08e9a5a2 | /LeetCode/75-sort_colors.py | f9126b00d4c74a0e97e76d064217b730e50cc3d7 | [] | no_license | davll/practical-algorithms | bbc930b42363cae00ce39e8a686854c19131d334 | 0e35e4cc87bd41144b8e34302aafe776fec1b356 | refs/heads/master | 2021-08-22T13:12:34.555074 | 2020-03-28T08:56:13 | 2020-03-28T08:56:13 | 147,224,029 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 883 | py | # https://leetcode.com/problems/sort-colors/
def sort_colours_v1(nums):
count = [0] * 3
for x in nums:
count[x] += 1
print("count = " + str(count))
start = 0
for k in range(3):
for i in range(count[k]):
nums[i+start] = k
start += count[k]
def sort_colours_v2(num... | [
"[email protected]"
] | |
e617b920f9e2568d05f0b9b81923724255ed6437 | dcbef06d5a00f07756339b9e62c684dec2fee425 | /nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/darwin.py | f997a7d9e6f3b45fabc0a4a6ede8551a69bcf4bd | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | Nuitka/Nuitka | f9543d8d95bfa0b81d4e60af0dfad99fb72893a4 | d87faf2f7e1d6ed9bfe4cf8c1d648f34307e33f2 | refs/heads/develop | 2023-08-28T14:00:32.861328 | 2023-08-27T09:16:45 | 2023-08-27T09:16:45 | 9,626,741 | 8,573 | 599 | Apache-2.0 | 2023-09-13T02:49:41 | 2013-04-23T15:40:33 | Python | UTF-8 | Python | false | false | 2,630 | py | # MIT License
#
# Copyright The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, ... | [
"[email protected]"
] | |
545c240dc43ec38cffd97004bd6125bf765692d6 | 5e49afd9c6ca73d7074c7ae220d5186fe4f44c08 | /setup.py | 100a3637c77fb07f8f43449aadc017a221620a02 | [
"MIT"
] | permissive | pylover/sharedlists | c2842618e7f6f9fea9dfefd710b9f94f36c19e7c | b020be26d3a64a3cdb9417a066a454b5b92006c5 | refs/heads/master | 2020-06-22T02:55:47.892070 | 2019-08-04T20:37:20 | 2019-08-04T20:37:20 | 197,615,918 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 801 | py | import re
from os.path import join, dirname
from setuptools import setup, find_packages
# reading package version (same way the sqlalchemy does)
with open(join(dirname(__file__), 'sharedlists', '__init__.py')) as v_file:
package_version = re.compile('.*__version__ = \'(.*?)\'', re.S).\
match(v_file.read(... | [
"[email protected]"
] | |
87e06c5f092bc078e57470af3c2e97ccb8e14638 | 6c137e70bb6b1b618fbbceddaeb74416d387520f | /lantz/lantz/drivers/agilent/__init__.py | 6cb05fee840da445ceb8ceea76d2bfa2c2dd3fe9 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | zhong-lab/code | fe497c75662f8c3b7ab3c01e7e351bff6d5e8d15 | b810362e06b44387f0768353c602ec5d29b551a2 | refs/heads/master | 2023-01-28T09:46:01.448833 | 2022-06-12T22:53:47 | 2022-06-12T22:53:47 | 184,670,765 | 2 | 7 | BSD-2-Clause | 2022-12-08T21:46:15 | 2019-05-02T23:37:39 | Python | UTF-8 | Python | false | false | 593 | py | # -*- coding: utf-8 -*-
"""
lantz.drivers.agilent
~~~~~~~~~~~~~~~~~~~~~~
:company: Agilent Technologies.
:description: Manufactures test instruments for research and industrial applications
:website: http://www.agilent.com/home
----
:copyright: 2015 by Lantz Authors, see AUTHORS for more det... | [
"none"
] | none |
7107ab73e45047060a6a8580092971ab13b86db0 | ab616e26a623fe7e81d30ba7b86fabe4a3658794 | /LibriSpeech/Get_Meta_LibriSpeech.py | 39a801bf12ffad5efc95d8bb95ea6ef3ab2b9afa | [] | no_license | ruclion/linears_decoder | 1d2367fbfa8fdde3ae0a8c53e5e82ed7035d1eed | 93cf874f87a601584c07ba5e4b673e401e9e7c90 | refs/heads/master | 2022-12-16T14:25:34.373534 | 2020-09-22T14:42:58 | 2020-09-22T14:42:58 | 289,808,115 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,973 | py | import os
# import numpy as np
# from audio import wav2mfcc_v2, load_wav
wavs_dir = 'wavs'
ppgs_dir = 'alignments'
zhaoxt_train = 'train.txt'
zhaoxt_test = 'test.txt'
meta_list_fromWavs = []
meta_list_fromPPGs = []
meta_list_fromZhaoxt = []
meta_list = []
meta_path = 'meta.txt'
def main():
# ... | [
"[email protected]"
] | |
39b4713bb06e115f5fef7f696c1b2c73fcf47adf | 1ed536ef1527e6655217e731f622d643ece49c2b | /scripts/align_all_vs_all.py | c152b8b783b8dffd40812fc5cb7771efc2c163fb | [] | no_license | siping/cgat | de0f7af124eb38c72d7dece78fff83ff92ddbf96 | aa4cc85ffdc53998ea1a5ac5516df2d16c254d2e | refs/heads/master | 2021-01-22T13:03:18.060139 | 2013-10-07T15:53:55 | 2013-10-07T15:53:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,781 | py | '''
align_all_vs_all.py - all-vs-all pairwise alignment
===================================================
:Author: Andreas Heger
:Release: $Id$
:Date: |today|
:Tags: Python
Purpose
-------
This script computes all-vs-all alignments between
sequences in a :term:`fasta` formatted file.
Currently only Smith-Waterman... | [
"[email protected]"
] | |
ede6a7910e34d87a8089ec7a7a792cc145ae0a44 | ec700463d9af81f68a477535ac233646f4d262f7 | /python/__main__.py | 2966615ac56651c81b277b34316ddc91361aca73 | [] | no_license | gregjhansell97/grid-map | 36579afa7beadb78a4b8cc53e2c7f45c75ac28a2 | 7d4c25b583474ec45265b01e524ed0884aaa2937 | refs/heads/master | 2020-03-16T20:42:24.156940 | 2018-10-02T23:29:58 | 2018-10-02T23:29:58 | 132,969,337 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 453 | py | from grid_map import GridMap
import timeit
if __name__ == "__main__":
gm = GridMap(5, bit_depth=10)
for x in range(1000):
for y in range(1000):
gm.add(x, y, "loc:" + str((x, y)))
gm = gm.sub_grids[1][0]
print(gm)
gm = gm.sub_grids[0][0]
print(gm)
gm = gm.sub_grids... | [
"[email protected]"
] | |
d2856e764575cdb8308c02b69d2303ddf1692b83 | c6d852e5842cf6f74123445d20ff03876377ae26 | /lemon/python22/lemon_14_190918_测试框架_unittest/test_练习相减02.py | 447882bd4b22fb5aed635fbc7eb95a77abf6e076 | [] | no_license | songyongzhuang/PythonCode_office | 0b3d35ca5d58bc305ae90fea8b1e8c7214619979 | cfadd3132c2c7c518c784589e0dab6510a662a6c | refs/heads/master | 2023-02-13T14:06:10.610935 | 2021-01-14T09:11:32 | 2021-01-14T09:11:32 | 327,183,429 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,436 | py | # --*-- coding : utf-8 --*--
# Project : python22
# Current file : test_练习相减02.py
# Author : Administrator
# Create time : 2019-09-19 10:22
# IDE : PyCharm
# TODO 成长很苦, 进步很甜, 加油!
import unittest
def minus(a, b): # add 加起来
""" 相减 """''
return a - b
x = 3
y = 5
expected = -2
class Test... | [
"[email protected]"
] | |
4cb569f1636bfc4eae939e6f9a0744d37db16326 | 20899d453bc61c169153338ac9d22d324df089c1 | /abc/abc162/B.py | 9eb9826bfab9e83ccd7c92096c9c66a9611d1f39 | [] | no_license | mui-nyan/AtCoder | b2d926b113963915426af679bf9b28430569707c | a702280f11a5b0b1b29dd099dbfc7b1c31fb89fd | refs/heads/master | 2022-07-04T16:32:41.164564 | 2022-06-19T07:24:11 | 2022-06-19T07:24:11 | 182,425,947 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 778 | py | import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)
# スペース区切りの入力を読み込んで数値リストにして返します。
def get_nums_l():
return [ int(s) for s in input().split(" ")]
# 改行区切りの入力をn行読み込んで数値リストにして返します。
def get_nums_n(n):
return [ int(input()) for _ in range(n)]
# 改行またはスペース... | [
"[email protected]"
] | |
85e88feb381eeaebe8cd19e82b3cf2a9e88051bc | c8d7f2da5ff9e13a5bb6f92b9387a336e7059644 | /dolo/numeric/matrix_equations.py | 0d3eb87483d5360957fdf884ec03b391a427d468 | [
"BSD-2-Clause"
] | permissive | TomAugspurger/dolo | 675e5c051e7fdcc8d0af441335d526408128b71f | 5d9f0f772860eadf3b9df79e47d158155835bd6b | refs/heads/master | 2020-12-25T12:47:30.156775 | 2013-02-11T20:13:56 | 2013-02-11T20:13:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,339 | py | from dolo.numeric.tensor import sdot,mdot
import numpy as np
TOL = 1e-10
# credits : second_order_solver is adapted from Sven Schreiber's port of Uhlig's Toolkit.
def second_order_solver(FF,GG,HH):
from scipy.linalg import qz
from dolo.numeric.extern.qz import qzdiv
from numpy import array,mat,c_,... | [
"[email protected]"
] | |
9eb155ab168b320e301794c6d06721d8159379c8 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/329/usersdata/297/91364/submittedfiles/dec2bin.py | f499b6f8e6c0b866d68629df150aa2c83d3d617b | [] | 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 | 203 | py | # -*- coding: utf-8 -*-
while(true):
p=int(input('digite um numero p: '))
q=int(input('digite um numero q: '))
if q>=p:
break
if str(p) in str(q):
print('S')
else :
print('N') | [
"[email protected]"
] | |
91ed919fe4f82d66d4c1e181233dc01892ee1182 | 420376c5a1fbf8a4572545a9c891a0f8f204ed5b | /scrapy_amazon/items.py | d2aeed20eb2ea2833ebfb79da6fce00b903d6891 | [] | no_license | kishoresurana/scrapy_amazon | 946fb8fe198736ba4233a2f3727ca1a1873ae937 | bbb72cdb5f468d5c8b605d273bb5c93b9a2b249a | refs/heads/master | 2020-12-25T21:55:35.192394 | 2014-07-27T20:09:24 | 2014-07-27T20:09:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 451 | py | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class ScrapyAmazonItem(scrapy.Item):
# define the fields for your item here like:
# name = scrapy.Field()
price = scrapy.Field()
conditi... | [
"[email protected]"
] | |
c4e8389d93f36f8805d8c3cdf58cabc747343f84 | 91fe8f479fa921fa84111d19222a5c6aa6eff030 | /basis/execute-unit/aiohttp-and-asyncio-test.py | 25312be5c6ecba564f33a7ed14ddc40b68021a95 | [] | no_license | romanticair/python | 2055c9cdaa46894c9788d5797643283786ed46dd | 6f91fe5e7cbedcdf4b8f7baa7641fd615b4d6141 | refs/heads/master | 2022-11-03T17:17:17.608786 | 2019-07-05T07:07:29 | 2019-07-05T07:07:29 | 195,356,190 | 0 | 1 | null | 2022-10-14T20:51:14 | 2019-07-05T07:00:33 | Python | UTF-8 | Python | false | false | 1,355 | py | """
asyncio 可以实现单线程并发IO操作。如果仅用在客户端,发挥的威力不大。
如果把asyncio用在服务器端,例如Web服务器,由于HTTP连接就是IO操作,
因此可以用单线程+coroutine实现多用户的高并发支持
asyncio实现了TCP、UDP、SSL等协议,aiohttp则是基于asyncio实现的HTTP框架
aiohttp的初始化函数init()也是一个coroutine,loop.create_server()则利用asyncio创建TCP服务
编写一个HTTP服务器,分别处理以下URL
1. / - 首页返回b'<h1>Index</h1>';
2. /hello/{name} - 根据URL参数... | [
"[email protected]"
] | |
6a42d49d7d83b0b0520c6e6d394d79b1e6c4fd48 | b8302a17ad124b2432380c7274e4780ec5adfe55 | /exercises/de/solution_04_03.py | e63f7c7a9d4320eaae8436a4c058573e32639ff4 | [
"MIT",
"CC-BY-NC-4.0"
] | permissive | FrankGrimm/spacy-course | 10da4ebf976d93aec50aa1b200019b4217f4043e | 5e09ef9d296dad2b0fd5ff1945f4cf9a55109906 | refs/heads/master | 2022-04-24T18:18:06.202131 | 2020-04-21T19:17:09 | 2020-04-21T19:17:09 | 257,692,388 | 1 | 0 | MIT | 2020-04-21T19:14:21 | 2020-04-21T19:14:20 | null | UTF-8 | Python | false | false | 650 | py | import json
from spacy.matcher import Matcher
from spacy.lang.de import German
with open("exercises/de/iphone.json") as f:
TEXTS = json.loads(f.read())
nlp = German()
matcher = Matcher(nlp.vocab)
# Zwei Tokens, deren kleingeschriebene Formen "iphone" und "x" sind
pattern1 = [{"LOWER": "iphone"}, {"LOWER": "x"}]
... | [
"[email protected]"
] | |
e9056dcc8a8628a344e0ddf4e9add6e257ddabae | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_310/ch25_2019_03_01_00_00_25_791523.py | 70bb03eaebe4809ffcc0bcea7e9b4073d6f8312b | [] | 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 | 160 | py | km=int(input(distancia):
if km <=200:
preco= km*0.5
print("{:.2f}".format(preco))
else:
preco= km*0.45
print("{:.2f}".format(preco)) | [
"[email protected]"
] | |
3cc7dc94fdb029bb70bc409a3dc8ffef0368bf06 | 2cec0797981b73c497866a75fb6d33f4c3a4c06c | /brain_tumor_classification/modules/data/utils.py | e5cd18bf3458f2de6aa299ac09b545c77cfc04b4 | [] | no_license | Vadbeg/brain_tumor_classification | ed44e50076627a0682e2eca13cf115716c510ed1 | ba87b65717cd1fe75871f3108db1394de271c62d | refs/heads/master | 2023-08-01T13:46:27.176780 | 2021-09-19T15:14:32 | 2021-09-19T15:14:32 | 397,667,617 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,718 | py | """Module with utilities for dataset"""
from pathlib import Path
from typing import List, Optional, Tuple, Union
import numpy as np
from monai.transforms import (
AddChanneld,
Compose,
LoadImaged,
Resized,
ScaleIntensityRanged,
Transform,
)
from torch.utils.data import DataLoader, Dataset
de... | [
"[email protected]"
] | |
e3f9b9ccd9704d797def23c50f582b8c877f8f37 | 9059d9cbad4188ed2980f551151b9678ffb68b44 | /Chapter12_logging/12-3.logging_config_example.py | 0262db2fa4267b523bc6fa234849422e7c5042d2 | [] | no_license | mhee4321/python_basic | ad0e64fa21ecfab231a6627ba6abeea82d725690 | 86031975a9121efe5785e83f663255a7b4e4ba77 | refs/heads/master | 2023-02-11T20:31:54.353219 | 2021-01-07T05:44:31 | 2021-01-07T05:44:31 | 326,850,491 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 750 | py | import logging # 로깅 모듈 탑재
import logging.config # 로깅 설정 모듈 탑재
# 설정 파일 읽어 오기
logging.config.fileConfig('12-2.logging.conf')
# 로거 생성
logger = logging.getLogger(__name__) # 로거 생성
# 로그 메시지 출력
logger.debug('이 메시지는 개발자만 이해해요.') # DEBUG 로그 출력
logger.info('생각대로 동작 하고 있어요.... | [
"[email protected]"
] | |
8a4871b4d661ef4a0a122394b00d6b5f55566f2e | 9d2bafb07baf657c447d09a6bc5a6e551ba1806d | /ros2_ws/build/std_msgs/rosidl_generator_py/std_msgs/msg/_multi_array_layout.py | e830a59dc03efc5d1893c4f8d32f97cabca4ecd6 | [] | no_license | weidafan/ros2_dds | f65c4352899a72e1ade662b4106e822d80a99403 | c0d9e6ff97cb7cc822fe25a62c0b1d56f7d12c59 | refs/heads/master | 2021-09-05T20:47:49.088161 | 2018-01-30T21:03:59 | 2018-01-30T21:03:59 | 119,592,597 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,630 | py | # generated from rosidl_generator_py/resource/_msg.py.em
# generated code does not contain a copyright notice
import logging
import traceback
class Metaclass(type):
"""Metaclass of message 'MultiArrayLayout'."""
_CONVERT_FROM_PY = None
_CONVERT_TO_PY = None
_DESTROY_ROS_MESSAGE = None
_TYPE_SUPP... | [
"[email protected]"
] | |
4b32a00c650bafd26ad85ee0f76ed96d200dfce0 | d99ac626d62c663704444a9cce7e7fc793a9e75e | /crypto_implementations/virgil-crypto-c/wrappers/python/virgil_crypto_lib/foundation/_c_bridge/_vscf_alg_info_der_serializer.py | 222936908c80c90638db7d52f3cdf4d1a644e7ae | [
"LicenseRef-scancode-warranty-disclaimer",
"BSD-2-Clause",
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Experiment5X/CryptoFunctionDetection | 3ab32d5573a249d24db1faf772721bc80b8d905d | dac700193e7e84963943593e36844b173211a8a1 | refs/heads/master | 2023-04-19T09:12:35.828268 | 2021-05-13T22:39:27 | 2021-05-13T22:39:27 | 355,299,557 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,174 | py | # Copyright (C) 2015-2020 Virgil Security, Inc.
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# (1) Redistributions of source code must retain the above copyright
# notice, this li... | [
"[email protected]"
] | |
519e6d1ad5bda54f6ed5b6ff5dc4202c57d10141 | 6f0d8416daeb787b13938d5fa49c3d2e08d15e02 | /tests/test_cam.py | 5a5dbc61b10d60caf62b858b4f880f2bed62d9ec | [
"MIT"
] | permissive | MartinHjelmare/matrixscreener | cbfc0ba95614c7dd6e152bb63a24b67ed03045ca | b6e93d9c96139cf5f2b8942d61681e45d7b6b4e5 | refs/heads/master | 2021-01-22T14:21:16.758654 | 2015-02-19T11:53:46 | 2015-02-19T11:53:46 | 57,959,734 | 0 | 0 | null | 2016-05-03T10:03:40 | 2016-05-03T10:03:40 | null | UTF-8 | Python | false | false | 1,526 | py | from matrixscreener.cam import *
import pytest
class EchoSocket:
"Dummy echo socket for mocking."
msg = ''
def send(self, msg):
self.msg = msg
return len(msg)
def recv(self, buffer_size):
return self.msg[0:buffer_size]
def connect(self, where):
pass
def setti... | [
"[email protected]"
] | |
20d215ab84216efee4da368d5a8ad6e24ed57fc4 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03679/s358798230.py | 083bf4ccd4da704fe0bfff938691cf5dbc1ec004 | [] | 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 | 133 | py | X, A, B = map(int, input().split())
if A >= B:
print('delicious')
elif A + X < B:
print('dangerous')
else:
print('safe') | [
"[email protected]"
] | |
da878145baa16b59947043420038f917d29d43bd | e7b483d88f80703c89553e1b9e2f5dd0322f7e38 | /sketch/util/http.py | e69fe5f151af3818aae7e26ffc6a7d32826a3f52 | [
"BSD-2-Clause"
] | permissive | nikcub/Sketch | 0f559ff9948bd355407257c25c261c1e0f237021 | 5d2d5f7e51c3eed374a8b12441dc8577b16c101e | refs/heads/master | 2016-09-09T23:32:10.243530 | 2011-11-04T13:56:03 | 2011-11-04T13:56:03 | 2,592,091 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,451 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim:ts=2:sw=2:expandtab
#
# Copyright (c) 2011, Nik Cubrilovic. All rights reserved.
#
# <[email protected]> <http://nikcub.appspot.com>
#
# Licensed under a BSD license. You may obtain a copy of the License at
#
# http://nikcub.appspot.com/bsd-license
#
"""
Sketch... | [
"[email protected]"
] | |
2182531e49175062ac8b030e998b5c2c6ca3ae8d | cad91ae76d2746a6c28ddda0f33a58f9d461378f | /PyTorch/Recommendation/NCF/feature_spec.py | 40d56a0e310d345e17261e9bbfbd4618f5acb691 | [
"Apache-2.0"
] | permissive | NVIDIA/DeepLearningExamples | fe677521e7e2a16e3cb0b77e358f9aab72f8c11a | a5388a45f71a949639b35cc5b990bd130d2d8164 | refs/heads/master | 2023-08-31T20:57:08.798455 | 2023-08-23T10:09:12 | 2023-08-23T10:09:12 | 131,881,622 | 11,838 | 3,124 | null | 2023-08-28T16:57:33 | 2018-05-02T17:04:05 | Jupyter Notebook | UTF-8 | Python | false | false | 1,943 | py | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | [
"[email protected]"
] | |
ac4cec9c23d857374e16c812fac948e0c272797e | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03108/s870352488.py | 0b87a41dcc411c3fbc8ae14366e08bef4bb0f7fc | [] | 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 | 1,652 | py | import sys
import collections
readline = sys.stdin.readline
class UnionFind():
def __init__(self, n):
self.n = n
self.parents = [-1]*n
self.rank = [0]*n
self.size = [1]*n
def find(self, x):
if self.parents[x] < 0:
return x
else:
self.par... | [
"[email protected]"
] | |
9d31dd701cf90d929170893cddab05db06011ba7 | c4544c22c0618451746795090e07c80bc85a0877 | /file_upload/article/forms.py | fd00ffba0492b96c7d39b7f2448d488bfccf1d67 | [] | no_license | RelaxedDong/Django_course | 35f7027dc552ad148d2dc8679a19a1ffb12b8d14 | 2965089d15e4c80cd6402d362ee37f8cc675c08b | refs/heads/master | 2022-01-09T14:28:40.503099 | 2019-05-24T07:07:03 | 2019-05-24T07:07:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 379 | py | #encoding:utf-8
# __author__ = 'donghao'
# __time__ = 2019/5/13 21:52
from django import forms
from .models import Book
from django.core import validators
class BookForm(forms.ModelForm):
cover_url = forms.FileField(validators=[validators.FileExtensionValidator(allowed_extensions=['jpg','jpeg'])])
class Meta:
... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.