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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4b8b1a48b348b43ac25dc9a03ea165b76e3778d9 | 01e95505c457d81f077efab8d2b2e90619ec5ef0 | /day94/findKthLargest.py | 96130579a909ce73172ae8caf93e25c57703aadd | [] | no_license | chenjunyuan1996/Java-Practice | f07e4cb1756b423b89c0440a5d65efcc6cb5caa5 | 2e6a505a4635a408e575ce6a1af382e2ccf0fe22 | refs/heads/master | 2021-04-08T12:14:21.518855 | 2020-07-08T02:04:05 | 2020-07-08T02:04:05 | 248,774,679 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 367 | py | import heapq
class Solution:
def findKthLargest(self, nums: List[int], k: int) -> int:
heapq.heapify(nums)
for _ in range(len(nums) - k):
heapq.heappop(nums)
return heapq.heappop(nums)
# class Solution:
# def findKthLargest(self, nums: List[int], k: int) -> int:
# nu... | [
"noreply@github.com"
] | chenjunyuan1996.noreply@github.com |
a492b1b73c204b6562d920932d0a3d81eeb837ec | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/otherforms/_perpetrating.py | e808c2cc964c2bc09f3d33ea9b1ad14118af6f45 | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 240 | py |
#calss header
class _PERPETRATING():
def __init__(self,):
self.name = "PERPETRATING"
self.definitions = perpetrate
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.basic = ['perpetrate']
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
9e63101b0f8f16dcf299a047a320ca7a8d32d9eb | 01932366dd322ec3459db9dd85a2fd8d22a82fcb | /tf114/tf04_1_placeholder.py | 88c1f37a64d2fe2da32bb062fd2faf266e50827e | [] | no_license | Jeong-Kyu/A_study | 653f5fd695109639badfa9e99fd5643d2e9ff1ac | 6866c88fcc25841ceae2cd278dcb5ad5654c2a69 | refs/heads/master | 2023-06-11T02:44:20.574147 | 2021-07-05T08:59:43 | 2021-07-05T08:59:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 427 | py | import tensorflow as tf
node1 = tf.constant(2.0)
node2 = tf.constant(3.0)
node3 = tf.add(node1, node2)
sess = tf.Session()
a = tf.placeholder(tf.float32)
b = tf.placeholder(tf.float32)
adder_node = a + b
print(sess.run(adder_node, feed_dict={a:3, b:4.5})) # 7.5
print(sess.run(adder_node, feed_dict={a:[1,3], b:[3,4]... | [
"jare92n@gmail.com"
] | jare92n@gmail.com |
e0ac9e0d05aaa040a8292082b2d6d88b3c8ffa2a | 0b9bc1f99956df03e760720f154e90d27a4ad4d2 | /setup.py | acaf76173093bd2c0655fc5ed3679c78a6037957 | [
"ISC"
] | permissive | PlumpMath/demosys-py | 644b48def3be551b3e7d31241cf65dbd07f3b291 | 6a8689e967ec104fd8a73f92d8531fc0ef4aab4b | refs/heads/master | 2020-12-30T13:20:47.814479 | 2017-05-07T19:21:44 | 2017-05-07T19:21:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,269 | py | from setuptools import setup
setup(
name="demosys-py",
version="0.3.12",
description="Modern OpenGL 3.3+ Framework inspired by Django",
long_description=open('README.rst').read(),
url="https://github.com/Contraz/demosys-py",
author="Einar Forselv",
author_email="eforselv@gmail.com",
mai... | [
"eforselv@gmail.com"
] | eforselv@gmail.com |
f22515151a5551e4782336568b86630524086dc9 | 2dce8389133562c48c183ef9fb89e053b7a3b6d1 | /api/admin.py | d7904d9ba25ac80aec9898a5d0e0555d9204e67f | [] | no_license | Shatki/backend-evo | a742a9daaacc0a283529c47737057ee1f10228c0 | a977b6e346d73db53a21cc1aad094a377041f362 | refs/heads/master | 2020-06-20T09:41:27.838131 | 2019-12-02T06:05:59 | 2019-12-02T06:05:59 | 197,081,088 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 633 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib import admin
from models import Token, Log
@admin.register(Token)
class TokenAdmin(admin.ModelAdmin):
model = Token
list_display = (
'key',
'user',
'created',
'updated',
)
readonly_fiel... | [
"Shatki@mail.ru"
] | Shatki@mail.ru |
fd56c4e38f4d51cfd5a6a9ee1313be7f31dd9ab6 | 2c3e6390fd02d888720f6a01679e63e0603ba128 | /Python/Algorithms/Greedy/Max_Min/solution.py | 3587a43713023d513dd9787974bc2c1ef216e325 | [] | no_license | dileepmenon/HackerRank | ab39a7a6e40308a09bb7c3f644e4c8c1883a493c | 07e4627e5507561f82df055b925a19833d88d258 | refs/heads/master | 2021-01-11T17:51:34.323145 | 2019-01-21T12:02:11 | 2019-01-21T12:02:11 | 79,847,239 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 240 | py | #!bin/python3
n = int(input())
k = int(input())
s = []
for i in range(n):
s.append(int(input().strip()))
s = sorted(s)
mini = 1e10
for n, i in enumerate(s[:-(k-1)]):
m = s[n+k-1] - s[n]
if m < mini:
mini = m
print(mini)
| [
"dileepmenon92@yahoo.com"
] | dileepmenon92@yahoo.com |
f91fb6654eb7b987d618a8ebcdb893f1a71c4106 | cc6c3705c370c404735158e172cff71d65b325a5 | /[프로그래머스 레벨3] 네트워크.py | d08e267a731bec66265fa4c29339e01582e6abb9 | [] | no_license | Leewongi0731/DailyCodeTest | 4df8dc94ce12c7cc8eb4e0f2ed014080e390b171 | 9f2e83d455f3cc0439cc284662960f190eb574ac | refs/heads/main | 2023-04-10T05:10:54.892529 | 2021-04-17T13:53:26 | 2021-04-17T13:53:26 | 324,298,727 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 630 | py | # DFS/BFS: 네트워크
from collections import deque
def solution(n, computers):
visited = [ False for i in range(n) ]
answer = 0
for i in range(n):
if visited[i] == False:
visited[i] = True
queue = deque()
queue.append( i )
while queue:
... | [
"wglee0731@naver.com"
] | wglee0731@naver.com |
ac4db275b5a358071441b950bec2b352caf0f6a6 | 9cb914a9badf1349ec7a0cc15e09661c76a1d357 | /widedeep/utils/data_utils.py | 2039b75a43169b00a72183cc80124e8f190f0035 | [] | no_license | yutsai84/Wide-and-Deep-PyTorch | 16e9cbe0ab21f5d19750001ae2c8837bfac86882 | 1fb1ee595ce3eabd07e9f8e668a819ee37518e3a | refs/heads/master | 2020-07-20T15:44:16.888844 | 2019-06-24T20:32:55 | 2019-06-24T20:32:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,120 | py | import pandas as pd
from typing import List, Dict, Optional
def label_encode(df_inp:pd.DataFrame, cols:Optional[List[str]]=None,
val_to_idx:Optional[Dict[str,Dict[str,int]]]=None):
"""
Helper function to label-encode some features of a given dataset.
Parameters:
-----------
df_inp: pd.Datafra... | [
"jrzaurin@gmail.com"
] | jrzaurin@gmail.com |
92f5e541272034997a4e8ef6b743f03d25801537 | a61263850fe63de61ec3004519f0d9aa69f104ac | /python_Algorithm/battle10/BestAlbum.py | dcea550a32d847e23fc04e3fd996e133e9e780fa | [] | no_license | Kimhyeonsuk/Programmers_Python | dd0e13ef6690cfab0c46a7c8b07a5f3b40175071 | cc5687c8db2cfa098602829dec3acbf17c5c2177 | refs/heads/master | 2023-07-16T22:30:29.457419 | 2021-09-02T10:40:56 | 2021-09-02T10:40:56 | 355,876,212 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 662 | py | from collections import defaultdict
def solution(genres, plays):
answer = []
musicDict=defaultdict(list)
for i in range(len(genres)):
musicDict[genres[i]].append((i,plays[i]))
#musicDict.items().sort(key=lambda x: len(musicDict[x]))
tmplist=[(1,200),(2,300),(4,100)]
a=sum(pair[1] for pa... | [
"philippe10@naver.com"
] | philippe10@naver.com |
c0596f3c11f7e1284632536bb410660e8d8543c3 | a2c7bc7f0cf5c18ba84e9a605cfc722fbf169901 | /python_1_to_1000/899_Orderly_Queue.py | 9f4611d6f27e6e757997735ec2fb756e1e7842d2 | [] | no_license | jakehoare/leetcode | 3bf9edd499034ce32be462d4c197af9a8ed53b5d | 05e0beff0047f0ad399d0b46d625bb8d3459814e | refs/heads/master | 2022-02-07T04:03:20.659422 | 2022-01-26T22:03:00 | 2022-01-26T22:03:00 | 71,602,471 | 58 | 38 | null | null | null | null | UTF-8 | Python | false | false | 1,001 | py | _author_ = 'jake'
_project_ = 'leetcode'
# https://leetcode.com/problems/orderly-queue/
# A string S of lowercase letters is given. Then, we may make any number of moves.
# In each move, we choose one of the first K letters (starting from the left), remove it,
# and place it at the end of the string.
# Return the lexi... | [
"jake_hoare@hotmail.com"
] | jake_hoare@hotmail.com |
d048db7244be9ce8c331cfae2cabccadf8e545f4 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02901/s182457186.py | 2013723aad6266c552cccdfd8854b7ea9960f70d | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 554 | py | n,m = map(int,input().split())
p = []
for k in range(m):
a,b = map(int,input().split())
c = list(map(int,input().split()))
key = 0
for i in c:
key += 2**(i-1)
p.append([a,key])
inf = 10**9
dp = []
for u in range(m+1):
dp.append([inf for i in range(2**n)])
dp[0][0] = 0
for i in range(m)... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
95054f0a460bb519adc68aa70d71f76850879abf | fb4b70ad38d0fc810cb9ee034c8fb963c079f64b | /Medium/Combinations.py | 78acdba9ae043cceba5a34d09bd7fab2566e594d | [] | no_license | ChrisLiu95/Leetcode | 0e14f0a7b7aa557bb2576589da8e73dbeeae8483 | baa3342ebe2600f365b9348455f6342e19866a44 | refs/heads/master | 2021-07-11T12:01:00.249208 | 2018-09-26T21:27:42 | 2018-09-26T21:27:42 | 117,451,180 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 726 | py | """
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.
Example:
Input: n = 4, k = 2
Output:
[
[2,4],
[3,4],
[2,3],
[1,2],
[1,3],
[1,4],
]
"""
class Solution:
def combine(self, n, k):
"""
:type n: int
:type k: int
:rtype: List[Li... | [
"xiangchong95@gmail.com"
] | xiangchong95@gmail.com |
0f02707acde8e6516ae2e1fd709fd9b4b49367fd | e669b3fe7da2698da4ce02e98325ce154d2aa546 | /swaps/utils/channels_request.py | 69d81622ba3b67aa1d96fbbdf78211bd7aa7c4ce | [
"Apache-2.0"
] | permissive | marcellinamichie291/cash_carry_leveraged_futures_arbitrageur | 0834a911fdd6c9f1462f6f2f59926f715fc51461 | 1120ebfb487ce4987fe70e6645b36e0d7ce041ec | refs/heads/main | 2023-03-16T18:35:28.730554 | 2020-12-04T07:46:13 | 2020-12-04T07:46:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,680 | py | import json
from swaps.utils.time_service import get_current_timestamp
def dict_add_new(old_dict, new_dict):
if old_dict is None:
old_dict = {}
if new_dict and len(new_dict):
for key_val, val in new_dict.items():
if val:
exist_val = old_dict.get(key_val, None)
... | [
"jare@coindexlabs.com"
] | jare@coindexlabs.com |
6b83fe052d7aaa1ba3b3d3aea415fddb3d31a166 | 99c4d4a6592fded0e8e59652484ab226ac0bd38c | /code/batch-2/vse-naloge-brez-testov/DN6-M-029.py | 892973eee43e2e78c1dde5ffa9dfc81677b4c719 | [] | no_license | benquick123/code-profiling | 23e9aa5aecb91753e2f1fecdc3f6d62049a990d5 | 0d496d649247776d121683d10019ec2a7cba574c | refs/heads/master | 2021-10-08T02:53:50.107036 | 2018-12-06T22:56:38 | 2018-12-06T22:56:38 | 126,011,752 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,250 | py | import collections
def unikati(s):
l = []
for a in s:
if not l.__contains__(a):
l.append(a)
return l
def avtor(tvit):
return tvit.split()[0][:-1]
def vsi_avtorji(tviti):
l = []
for t in tviti:
l.append(avtor(t))
return unikati(l)
def izloci_bes... | [
"benjamin.fele@gmail.com"
] | benjamin.fele@gmail.com |
cc17e396ac1ce7b650e1cced566267de834f1e4b | 30ac2f9831ebd33885a6f48d153356c2e3731c26 | /Python_Stack/django/django_orm/project_marcela/app_marcela/migrations/0002_post_created_at.py | c18b5ca1dd488cabbb07e09d92f1cbe4f97d4f0e | [] | no_license | pharaoht/Coding-Dojo-Projects | 192cfd8c36b6dadb049e81d31bd780c7ab340d1e | 504f71acbac3c006cf866a08aea0566058f81ce2 | refs/heads/master | 2023-05-11T21:09:17.316257 | 2021-06-08T00:54:09 | 2021-06-08T00:54:09 | 334,003,413 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 398 | py | # Generated by Django 2.2.4 on 2021-03-03 00:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app_marcela', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='post',
name='created_at',
... | [
"pharaohmanson@gmail.com"
] | pharaohmanson@gmail.com |
7e498773aa3cfc9fce1a83a67e038360ba587a78 | 3e79ffa27abf7fc1b6102223673703a9a8b96f4e | /a2_basic_part/b1_linear_model.py | d907d89d1aef92727741cb01a0d5933270110f02 | [] | no_license | Freshield/LEARN_Paddlepaddle | f3feaaa5daf3f879a0df9b6ef5276bbd2cef6117 | 6b9bed182d86b61a3f0166c9c5f4b949566ba9e3 | refs/heads/master | 2021-07-10T11:11:12.938714 | 2020-01-12T07:49:39 | 2020-01-12T07:49:39 | 232,985,746 | 0 | 1 | null | 2021-03-09T07:37:33 | 2020-01-10T06:57:44 | Python | UTF-8 | Python | false | false | 5,721 | py | #coding=utf-8
"""
@Author: Freshield
@Contact: yangyufresh@163.com
@File: b1_linear_model.py
@Time: 2020-01-13 12:08
@Last_update: 2020-01-13 12:08
@Desc: None
@==============================================@
@ _____ _ _ _ _ @
@ | __|___ ___ ___| |_|_|___| |_| | @
@ | __|... | [
"zxdsw199182@gmail.com"
] | zxdsw199182@gmail.com |
254b12e95e033f4cb945c7291cde4f78cffeef10 | 6eb56f2e3f14f2373be07fe95b1c6fedf1e2d49f | /month01/house_information_manager_system/dal.py | 1d5c594bf9f25424240cf05c09d4f1a5e250bcb7 | [
"Apache-2.0"
] | permissive | chaofan-zheng/python_leanring_code | fe22b0370cadebf7456477269aff4a35cef0eb41 | 0af44ff39b9ded2c1d2cc96c6d356d21170ac04d | refs/heads/main | 2023-02-28T07:56:46.457552 | 2021-02-10T15:08:33 | 2021-02-10T15:08:33 | 323,584,115 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,397 | py | """
数据访问层
data access layer
"""
import csv
from typing import List
from model import HouseModel
class HouseDao:
"""
房源数据访问对象
"""
__house_data = [] # type:List[HouseModel]
__FILE_NAME = "house.csv"
@classmethod
def load(cls) -> List[HouseModel]:
"""
加载房源信息
... | [
"417355570@qq.com"
] | 417355570@qq.com |
ce502914e04e34be2f8b196398ec920125f70284 | 7e127aaa903ce70014fb8edbcd55698894356506 | /29.Regular Expressions - Lab/04. Match Numbers.py | 4dc935ae145f2a74d519d922ebac36614f5a7777 | [] | no_license | filipov73/python_fundamentals_september_2019 | e2e7e014bbef3ed2b3b662d272461bb44c7ed0e0 | d1bb7d61d1e7b8a141ac00eec40612b18ef6492f | refs/heads/master | 2020-07-28T07:55:17.147110 | 2019-12-15T21:31:44 | 2019-12-15T21:31:44 | 209,356,557 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 185 | py | import re
text = input()
pattern = r"(^|(?<=\s))(?P<target>[-]?[0-9]*[\.]?[0-9]*)($|(?=\s))"
match = re.finditer(pattern, text)
for m in match:
print(m.group("target"), end=" ")
| [
"m_filipov@yahoo.com"
] | m_filipov@yahoo.com |
28d80c9e3b215ece449186a6eefa2b2069127dbb | afbae26b958b5ef20548402a65002dcc8e55b66a | /release/stubs.min/Autodesk/Revit/UI/__init___parts/DoubleClickTarget.py | ac848f360fb91de8651f30625b8e0945afa4b428 | [
"MIT"
] | permissive | gtalarico/ironpython-stubs | d875cb8932c7644f807dc6fde9dd513d159e4f5c | c7f6a6cb197e3949e40a4880a0b2a44e72d0a940 | refs/heads/master | 2023-07-12T01:43:47.295560 | 2022-05-23T18:12:06 | 2022-05-23T18:12:06 | 95,340,553 | 235 | 88 | NOASSERTION | 2023-07-05T06:36:28 | 2017-06-25T05:30:46 | Python | UTF-8 | Python | false | false | 1,313 | py | class DoubleClickTarget(Enum,IComparable,IFormattable,IConvertible):
"""
Elements that support double-click in Revit. Note that this is meant to cover cases
where the element itself is a double-click target. Individual controls that are targets
are handled separately.
enum DoubleClickTarget... | [
"gtalarico@gmail.com"
] | gtalarico@gmail.com |
371af32e554de5ee981afd75def3765ddc68ffc0 | 039f2c747a9524daa1e45501ada5fb19bd5dd28f | /CODE FESTIVAL 2017 Final/b.py | e5d245849581bb86064321a537570151f234fc2a | [
"Unlicense"
] | permissive | yuto-moriizumi/AtCoder | 86dbb4f98fea627c68b5391bf0cc25bcce556b88 | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | refs/heads/master | 2023-03-25T08:10:31.738457 | 2021-03-23T08:48:01 | 2021-03-23T08:48:01 | 242,283,632 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 266 | py | from collections import Counter
s = input()
l = len(s)
for i in Counter(s).most_common():
largest = i[1]
if largest == 1:
print('YES')
exit(0)
if l >= largest * 2:
l -= 1
continue
print('NO')
exit(0)
print('YES')
| [
"kurvan1112@gmail.com"
] | kurvan1112@gmail.com |
22882df1ce9fffb6608a469e33a4b786a5eacd58 | 83de24182a7af33c43ee340b57755e73275149ae | /aliyun-python-sdk-das/aliyunsdkdas/request/v20200116/GetEndpointSwitchTaskRequest.py | c48a7b273c03dd0298d744e9b9df61034ed7b317 | [
"Apache-2.0"
] | permissive | aliyun/aliyun-openapi-python-sdk | 4436ca6c57190ceadbc80f0b1c35b1ab13c00c7f | 83fd547946fd6772cf26f338d9653f4316c81d3c | refs/heads/master | 2023-08-04T12:32:57.028821 | 2023-08-04T06:00:29 | 2023-08-04T06:00:29 | 39,558,861 | 1,080 | 721 | NOASSERTION | 2023-09-14T08:51:06 | 2015-07-23T09:39:45 | Python | UTF-8 | Python | false | false | 2,680 | py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
3d123b68f227b5944f66c6aea19b482904c6ec96 | e8187ac32552978361a5de92bb1b632b394dd4c4 | /tests/Forex_demo.py | 51e79ff54010bc7ff158e3e2509f0e906b6102ab | [
"MIT"
] | permissive | sibuzu/OnePy | 7385f5fbc48ebe65543bb998f0af84e468f3b442 | 464fca1c68a10f90ad128da3bfb03f05d2fc24bc | refs/heads/master | 2020-03-08T13:23:31.960132 | 2018-04-06T04:35:56 | 2018-04-06T04:35:56 | 128,156,689 | 0 | 0 | MIT | 2018-04-05T03:57:13 | 2018-04-05T03:57:13 | null | UTF-8 | Python | false | false | 2,766 | py | import OnePy as op
class MyStrategy(op.StrategyBase):
def __init__(self, marketevent):
super(MyStrategy, self).__init__(marketevent)
def prenext(self):
"""以下条件均可用于next中进行策略逻辑判断"""
# print(self.bar.open[1])
# print(self.bar.high[1:])
# print(self.bar.low[:2])
# ... | [
"chenjiayicjy@126.com"
] | chenjiayicjy@126.com |
f0605007a768f64dd1eb60c47578f75c9bfd2283 | 34a478381cdf89e636315d5f4d620eeabe712b00 | /venv/lib/python3.6/site-packages/future/moves/urllib/parse.py | 01d521019c390a55d327da666cd034bb6e5a6359 | [] | no_license | 21fernando/Pygames | 67e03e9d62c64b55ea24d6b0f4a2a7b333247011 | 10bf1519012a8ed3e08dda0d23c9187c44e58c13 | refs/heads/master | 2021-01-05T07:00:17.165831 | 2020-06-01T13:42:05 | 2020-06-01T13:42:05 | 240,922,333 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,046 | py | from __future__ import absolute_import
from future.standard_library import suspend_hooks
from future.utils import PY3
if PY3:
from urllib.parse import *
else:
__future_module__ = True
from urlparse import (ParseResult, SplitResult, parse_qs, parse_qsl,
urldefrag, urljoin, urlpar... | [
"tharindu.fernando@terathought.com"
] | tharindu.fernando@terathought.com |
31782c6a2a9a3d34d6111b5af5e52befac232b8e | 01e02a7ae79464cfcdde313aca1d940eaad04ffe | /04-添加路由-mini_web框架/03-实现伪静态/web_server.py | de0da609d51d57827ba75df0bf304e1c0bc4cb07 | [] | no_license | ybsdegit/mini_web | db09b2d0a435e0b5c454a0b5d0be18b0f1fea0de | 0b650f7e1bb18808ad3ce47328084aada229bc9b | refs/heads/master | 2020-05-24T22:35:43.925824 | 2019-05-23T16:32:28 | 2019-05-23T16:32:28 | 187,500,291 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,474 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/5/18 22:32
# @Author : Paulson
# @File : 01-面向对象-多进程实现http服务器_WSGI.py
# @Software: PyCharm
# @define : function
import re
import socket
import multiprocessing # 多进程
# import time
import sys
# from dynamic import mini_frame
class WSGIServer(object)... | [
"ybsdeyx@163.com"
] | ybsdeyx@163.com |
d7033d1d800220694b05e7b0d3db1fa3fa2968cb | 1f139ddb46bbe681e3bf87308c7be0fb2f5938cd | /pytorch_toolbelt/utils/catalyst_utils.py | b28e807646c2f82a626558bc18fc7733f6769e3a | [
"MIT"
] | permissive | thohidu/pytorch-toolbelt | fc8f9dff8c12022e1ba59cc06e4f88bd96c591f6 | 7194a76dd9e153a9558c6a3321e25018dc58cdd8 | refs/heads/master | 2020-07-29T01:30:52.903212 | 2019-09-12T19:32:54 | 2019-09-12T19:32:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 149 | py | import warnings
from pytorch_toolbelt.utils.catalyst import *
warnings.warn('Please use \'from pytorch_toolbelt.utils.catalyst import *\' instead')
| [
"ekhvedchenya@gmail.com"
] | ekhvedchenya@gmail.com |
b7c84eb3a05bbe91b8d6ef63e41fab8d61e8c402 | 937520b77c177934c1e610d7c46c77df1def22be | /PythonWork/exercise/test_dict2.py | 66b5e1e4251bfe8e95915568896defc845192d5a | [] | no_license | silviu20/fzwork | eac62129fcabc5a5ea5da93c3c44918062191b35 | 793d736b739dbb982368c1705d6e476967227550 | refs/heads/master | 2023-03-23T00:49:33.130855 | 2021-02-15T03:24:20 | 2021-02-15T03:24:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,833 | py | #!/usr/bin/python
import sys
import os
def is_list_of_dict_all(input_field):
is_dict_all = all(isinstance(i, dict) for i in input_field)
return is_dict_all
def is_list_of_dict_any(input_field):
is_dict_any = any(isinstance(i, dict) for i in input_field)
return is_dict_any
def main():
... | [
"minganghz@gmail.com"
] | minganghz@gmail.com |
e545b2bc69384425609733177bf85ce2098d4fa6 | f139a99d51cfa01a7892f0ac5bbb022c0cee0664 | /Pythonlogy/build/lib/ShareYourSystem/Standards/Itemizers/Manager/09_ExampleDoc.py | 3c2c9551636ee8c3bb917b1d37c40d7b67956b3f | [
"MIT"
] | permissive | Ledoux/ShareYourSystem | 90bb2e6be3088b458348afa37ace68c93c4b6a7a | 3a2ffabf46f1f68b2c4fd80fa6edb07ae85fa3b2 | refs/heads/master | 2021-01-25T12:14:34.118295 | 2017-01-12T14:44:31 | 2017-01-12T14:44:31 | 29,198,670 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 276 | py |
#ImportModules
import ShareYourSystem as SYS
#define
class ChildClass(SYS.TeamerClass):pass
#define
MyManager=SYS.ManagerClass(
).manage(
'Child',
{
'MyInt':0
},
_ClassesDict={
'Child':ChildClass
}
)
#print
print("MyManager is ")
SYS._print(MyManager)
| [
"erwan.ledoux@ens.fr"
] | erwan.ledoux@ens.fr |
e9e87149ec81a41c0906c5cdf4a7d628d77ee3db | 490f5e517942f529ddc8c1e0d421a208ff1ca29b | /02_code/nestexc.py | 31a1f0da4c028ba8ea0f53e750123f1cfd824166 | [] | no_license | emnglang/py-lab | facdc464a8c84b90f06b5cb639315981c0b4ba8d | bc3566da81e0b2cfa9ce563ffc198d35294971a1 | refs/heads/master | 2020-03-25T15:10:42.856062 | 2018-08-24T14:54:33 | 2018-08-24T14:54:33 | 143,869,343 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 273 | py | def action2():
print(1 + []) # Generate TypeError
def action1():
try:
action2()
except TypeError: # Most recent matching try
print('inner try')
try:
action1()
except TypeError: # Here, only if action1 re-raises
print('outer try')
| [
"linja1688@gmail.com"
] | linja1688@gmail.com |
3dd919a27297d2fc12bee84dca098fb9f6961ae0 | 05c8a4cec561a4a45274035dcc2ffddc2753488e | /AWS Lambda로 시작하는 서버리스/lambda_s3.py | 7dbe2c1f12d43c11662d57bae7cd912fc077911e | [] | no_license | Ani-Gil/Amazon-Web-Services | 2853d89c639969ce7f4b3bb91f37b012b5c48cb9 | 229c9ec9a458b57c8a9fbc4cd1b569473a79d850 | refs/heads/master | 2023-03-31T08:24:02.962778 | 2021-04-01T09:14:54 | 2021-04-01T09:14:54 | 325,930,062 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 240 | py | import json
import boto3
import botocore
def lambda_handler(event, context):
s3 = boto3.resource('s3')
bucket_list = []
for bucket in s3.buckets.all():
bucket_list.append(bucket.name)
return json.dumps(bucket_list) | [
"dlatldn426@gmail.com"
] | dlatldn426@gmail.com |
ea41da86369d1faeef59e4ed60285374faeb01eb | f0efb6d4f35a94a36086e8afd2c22fcccff717c4 | /horizon/horizon/dashboards/nova/overview/tests.py | b68f04a3ec33491e8bd352d8cc5f7e7ad39656bb | [
"Apache-2.0"
] | permissive | andrewsmedina/horizon | 3355933d64c646ecefc7f71c2e4b35d864fd4b30 | 6892653c0573a6a55f359cce6c1796053ef65cbf | refs/heads/master | 2021-01-20T23:18:06.384260 | 2012-02-06T22:42:56 | 2012-02-06T22:42:56 | 3,372,713 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,112 | py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2011 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... | [
"gabriel@strikeawe.com"
] | gabriel@strikeawe.com |
50b1e53cbd9acce8b3cc11689d21484eb9619f38 | 76426594e65bae8db20be3fcc15db4684bf84642 | /Functions/2_Calculations.py | fae63d29e7db327f44833f2bc14421ef74e4c348 | [] | no_license | Mishakaveli1994/Python_Fundamentals_May | edb2ebb19553a6bac531599dbcf25b621c360727 | 0dcda59987f1a51e515e756af9aaaa97ca39a681 | refs/heads/master | 2022-11-14T07:03:41.083733 | 2020-07-08T07:26:37 | 2020-07-08T07:26:37 | 265,183,726 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 374 | py | def Operations(com, num1, num2):
if com == 'multiply':
return num1 * num2
elif com == 'divide':
return int(num1 / num2)
elif com == 'add':
return int(num1 + num2)
elif com == 'subtract':
return int(num1 - num2)
command = input()
integer1 = int(input())
integer2 = int(in... | [
"mihata1994@yahoo.com"
] | mihata1994@yahoo.com |
93ae6c072fd2f1020c3e2ca62662157330bfac6f | 51ce07a419abe50f49e7bb6a6c036af291ea2ef5 | /2.Web/4. JavaScript/01_javascript/00_python.py | 262cfee93456448c469c7f5a9bfb8daef16d5bec | [] | no_license | salee1023/TIL | c902869e1359246b6dd926166f5ac9209af7b1aa | 2905bd331e451673cbbe87a19e658510b4fd47da | refs/heads/master | 2023-03-10T09:48:41.377704 | 2021-02-24T10:47:27 | 2021-02-24T10:47:27 | 341,129,838 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 415 | py | from time import sleep
"""
def sleep_3_seconds():
sleep(3)
print('잘잤다!')
print('이제 잘거다!')
sleep_3_seconds()
print('학교간다!')
"""
import requests
import json
response = requests.get('https://jsonplaceholder.typicode.com/todos/1')
# print(response.text)
# print(response.text.get('title'))
todo = response.js... | [
"dltmddk1023@gmail.com"
] | dltmddk1023@gmail.com |
3281e8ab02beebd59ea847218c1833e7f1658c62 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02683/s917624912.py | fe273b619f083d1e05ca1080c0bf5a8b4d8d4cc7 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 772 | py | n,m,x = map(int,input().split())
books = []
for i in range(n):
book = list(map(int,input().split()))
books.append(book)
min_money = -1
#n冊あるとき、2**n通りの選び方
count = 0
for i in range(2**n):
select = format(count, "0" + str(n) + "b")
lst = []
while "1" in select:
index = select.index("1")
... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
63b1677fff8c91872af3ca9339cc64c1aee18827 | 45ab4c22d918dc4390572f53c267cf60de0d68fb | /src/Analysis/Engine/Impl/Typeshed/third_party/2and3/jinja2/runtime.pyi | 34d06f4cd51732e73ca08e2ec55c8e457bdb2db0 | [
"Apache-2.0",
"MIT"
] | permissive | sourcegraph/python-language-server | 580a24fd15fe9d4abeb95e9333d61db1c11a2670 | 64eae156f14aa14642afcac0e7edaf5d7c6d1a1c | refs/heads/master | 2023-04-09T21:17:07.555979 | 2018-12-06T23:25:05 | 2018-12-06T23:25:05 | 155,174,256 | 2 | 2 | Apache-2.0 | 2018-10-29T08:06:49 | 2018-10-29T08:06:49 | null | UTF-8 | Python | false | false | 4,359 | pyi | from typing import Any, Dict, Optional, Text, Union
from jinja2.utils import Markup as Markup, escape as escape, missing as missing, concat as concat
from jinja2.exceptions import TemplateRuntimeError as TemplateRuntimeError, TemplateNotFound as TemplateNotFound
from jinja2.environment import Environment
to_string = ... | [
"alsher@microsoft.com"
] | alsher@microsoft.com |
4a2528cb42858e3cfcbb7cf3cf3802526da62fca | 51ea2be2a164e90a6f6c327ccedc95b5492a5329 | /AtCoder/contest 169/B.py | d3c20ddfcbad26254ac87540ae95c5b99a136623 | [
"MIT"
] | permissive | hanzohasashi33/Competetive_programming | 081c30d248d54cdf488d36d1c965b0f184296562 | b609972ada1c7177f182665e998beaa0c1eba514 | refs/heads/master | 2021-06-30T07:21:12.625721 | 2021-02-01T12:54:56 | 2021-02-01T12:54:56 | 216,160,136 | 22 | 23 | MIT | 2022-05-30T16:13:36 | 2019-10-19T06:28:39 | C++ | UTF-8 | Python | false | false | 445 | py | #! /usr/bin/env python3
import math
if __name__ == "__main__":
n = int(input())
l = list(map(int,input().split()))
if 0 in l :
print("0")
else :
flag = 1
prod = 1
for i in range(n) :
prod = prod * l[i]
if prod > int(math.pow(10,18)) :
... | [
"noreply@github.com"
] | hanzohasashi33.noreply@github.com |
ea0f51cbc0046b7570b8cd119682d4a75bbe6c72 | eba3e4a3935d6422d1ed85aaf69337f5ba15fc74 | /webhelpers/webhelpers/util.py | 0b3493d54744f6882168878248a31fb188d3971f | [
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | arianepaola/tg2jython | 2ae74250ca43b021323ef0951a9763712c2eb3d6 | 971b9c3eb8ca941d1797bb4b458f275bdca5a2cb | refs/heads/master | 2021-01-21T12:07:48.815690 | 2009-03-27T02:38:11 | 2009-03-27T02:38:11 | 160,242 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,998 | py | """Utility functions used by various web helpers
This module is such a mess that no new helpers should be added to it.
"""
import cgi
import copy
import sys
import urllib
from UserDict import DictMixin
from xml.sax.saxutils import XMLGenerator
def cgi_escape(s, quote=False):
"""Replace special characters '&', '<'... | [
"ariane@venus.(none)"
] | ariane@venus.(none) |
b39077907054b333d4287ef291d9748713c5403f | b47a619f6ccd0f76ccce989e62d0c963a1c14ab4 | /Python/dp/Pascal's Triangle.py | b16023a2b62b62ac9acffb697b1ac24dda36fb18 | [] | no_license | GreatTwang/lccc_solution | 0799d19097549ef3c9beeebf6dc9960db9f9eb54 | e75899634f45b0d60f8b3cb854ab9e503d676a57 | refs/heads/master | 2020-07-07T02:45:18.984502 | 2019-10-09T04:53:35 | 2019-10-09T04:53:35 | 203,219,848 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 270 | py | class Solution:
def generate(self, numRows: int) -> List[List[int]]:
ans = [[1] * n for n in range(1, numRows+1)]
for i in range(1, numRows):
for j in range(1, i):
ans[i][j] = ans[i-1][j-1] + ans[i-1][j]
return ans | [
"tianwang@bu.edu"
] | tianwang@bu.edu |
051f82fb2eae3cf07090abae844f24ffff48c33f | 4820b9d3792935e610c72a9a51adc7ac1d41928d | /spider_framework/utils_module/log_module.py | c42ab752de52df5868147f8c9a558918346767cd | [] | no_license | lxngoddess5321/my_spider_framework | baf8fb622be6493f287ddb75c9b418fb40989588 | c51d3b2ed12bbe011590bd964086ecbbf5051684 | refs/heads/master | 2021-10-07T19:52:05.681537 | 2018-10-17T10:10:38 | 2018-10-17T10:10:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,231 | py | import logging
from ..config import MY_DEBUG_LEVEL, SAVE_LOG_DEBUG_LEVEL
from logging import getLogger
'''
日志 模块
'''
def get_logger():
'''
打印到终端的日志
'''
logger = getLogger(__name__)
if logger.handlers:
for i in range(len(logger.handlers)):
logger.handlers.pop()
logger.setLe... | [
"binhui.ni@yourdream.cc"
] | binhui.ni@yourdream.cc |
2e1146b4417135466fdcb21688edcd6ebe325b3a | eb8b5cde971573668800146b3632e43ed6e493d2 | /python/oneflow/nn/modules/slice.py | 2e80aa0be10adbd81c4ab61db817dfbb90093c56 | [
"Apache-2.0"
] | permissive | big-data-ai/oneflow | 16f167f7fb7fca2ce527d6e3383c577a90829e8a | b1c67df42fb9c5ab1335008441b0273272d7128d | refs/heads/master | 2023-07-08T21:21:41.136387 | 2021-08-21T11:31:14 | 2021-08-21T11:31:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,729 | py | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | [
"noreply@github.com"
] | big-data-ai.noreply@github.com |
0e65763aae42f6b916d54aec32de9bcb2a209084 | 5e277ad64a375bfe61890b10e2d4d5a56dba4e13 | /review_proc.py | 0075a935d6511c15566fb37c44e20c1447adf5a8 | [] | no_license | corynezin/thesis | 0d10295a7ca768ae25bd319fe64e0ed73c77a6a4 | dfa69ebbd9ec01c085b73c3ea0ca1bda8f96d28e | refs/heads/master | 2021-09-14T08:52:36.991586 | 2018-05-10T18:42:31 | 2018-05-10T18:42:31 | 102,166,292 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,174 | py | import preprocess
import numpy as np
import re
class review:
def __init__(self,review_filename):
self.review_rating = int(re.search('_\d+',review_filename).group()[1:])
target_list = [0,1] if self.review_rating > 5 else [1,0]
self.sentiment = 'pos' if self.review_rating > 5 else 'neg'
... | [
"cory.nezin@gmail.com"
] | cory.nezin@gmail.com |
75ccb63aa623660c5681513e663cf6a50af90af6 | 8f48d12b88048e424ebb0d72ca6dfab5cf12ae0f | /0600_0999/981.py | 1a6e46f5d61ecaaf9c8139e8154c73ea4412e334 | [] | no_license | renjieliu/leetcode | e1caf13c18a8107ed9252588b339fb76bcb1b246 | 4668b64fcb9320b6c316d8608fc61911ce43b6c7 | refs/heads/master | 2023-03-18T18:16:06.187741 | 2023-03-14T20:31:59 | 2023-03-14T20:31:59 | 128,823,819 | 7 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,762 | py | class TimeMap:
def __init__(self):
self.hmp = defaultdict(lambda: [])
def set(self, key: str, value: str, timestamp: int) -> None: # O( 1 | N )
self.hmp[key].append([timestamp, value])
def get(self, key: str, timestamp: int) -> str: # O( logN | 1)
if key not in s... | [
"anlrj@qq.com"
] | anlrj@qq.com |
bccbdd6ab1c0bab86ca3e3352d833229a05d3679 | faa7aa061ffcd848116a3f183c1db4a441d61e6b | /src/python/gwas_analysis/simulation/datasets.py | 4f4ee6c00feb6309394d181aefec003fd258f667 | [
"Apache-2.0"
] | permissive | OwenAnalytics/gwas-analysis | 5fd4aa6967b28baef1e36e919725a0c1703e81bd | d98895d7be40599c634afb1f16d4e65a54bf1e49 | refs/heads/master | 2021-03-20T00:34:54.741143 | 2020-03-05T20:58:01 | 2020-03-05T20:58:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,095 | py | import hail as hl
import numpy as np
def add_default_plink_fields(mt):
"""Add fields to PLINK"""
return mt\
.annotate_rows(rsid=hl.null(hl.tstr))\
.annotate_cols(
fam_id=hl.null(hl.tstr), pat_id=hl.null(hl.tstr), mat_id=hl.null(hl.tstr),
is_female=hl.null(hl.tbool), is_c... | [
"eric.allen.czech@gmail.com"
] | eric.allen.czech@gmail.com |
bbec99ae2b5ea6286b4d97f19f582f1d67789ea4 | 97f2852420d6fdc98e5a4a0321c35920ff070d41 | /examples/scripts/sc/bpdn.py | ec1b86001f3b086cd1d6100739505c546c5b3005 | [
"BSD-3-Clause"
] | permissive | eglxiang/sporco | 93595f3afb6acda758425f7332513eeb892fa51f | e4a716b32b675d6e23ba0bfc3b2d7c6f9bc5d7a3 | refs/heads/master | 2021-05-04T23:03:57.430340 | 2018-01-19T19:03:01 | 2018-01-19T19:03:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,813 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of the SPORCO package. Details of the copyright
# and user license can be found in the 'LICENSE.txt' file distributed
# with the package.
"""
Basis Pursuit DeNoising
=======================
This example demonstrates the use of class :class:`.bpdn.BPDN`... | [
"brendt@ieee.org"
] | brendt@ieee.org |
7b804ed8026e6ddf34fe4c475ce0d29b951b5dde | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/55/usersdata/104/23990/submittedfiles/av2_p3_civil.py | ac21c1e60965dc21136e7ac37b76bdf79d5cdab3 | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 542 | py | # -*- coding: utf-8 -*-
from __future__ import division
import numpy as np
n=input('Digite a dimensão:')
l=input('Digite o indice da linha:')
c=input('Digite o indice da coluna:')
z=np.zeros((n,n))
cont=0
for i in range(0,z.shape[0],1):
for j in range(0,z.shape[1],1):
z[i,j]=input('Digite um valor pra matri... | [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
890897de0e2407e83757b81338ec52876035c9ec | c18e1fa174e1b0e6d56e9f1a8a3708099c3cd248 | /learning_from_mcvine/res_sims/Ei_500/E-19.3373420406_hkl-15.2533735111,-2.42069710922,-2.25423202276/run.py | 062d0c20ccd91b5fab5907dbbdcb625f693780d8 | [] | no_license | pnave95/ORNL_public_research | e0662657b41969f3f3dc263ea4c62a042d85547a | 58cad7508f9d29c17af5419f05522c2f724e717e | refs/heads/master | 2021-01-20T00:39:58.308250 | 2017-06-22T20:03:57 | 2017-06-22T20:03:57 | 89,160,804 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,146 | py | #!/usr/bin/env python
import mcvine.cli
from numpy import array
from mcvine_workflow.singlextal.resolution import use_res_comps as urc
beam_neutrons_path = '/SNS/users/p63/ORNL_public_research/MCViNE_Covmat_comparison/mcvine_resolution/beams/beam_500_1e9/out/neutrons'
instrument = urc.instrument('ARCS', '3.*meter', '13... | [
"p63@analysis-node03.sns.gov"
] | p63@analysis-node03.sns.gov |
968a2c227c209441b7833e9d75bafd8d0e62c481 | c5031dd49aebbf6cdff7e895dd787c2ff1a7fee7 | /views.py | e04c3ede16578cd1cda082f615ef5002c992dc21 | [] | no_license | bwghughes/badbatch | 9e5ba912f54b67a445c7947f5cf5140c153ce9dc | 91510eec14fb549f82572cddcbdb829f10b099e4 | refs/heads/master | 2016-09-05T23:47:26.004471 | 2013-05-29T13:01:31 | 2013-05-29T13:01:31 | 9,768,943 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,679 | py | from flask import Flask, render_template, make_response, request
from flask.ext.classy import FlaskView
from models import Subscriber, Caller, Alert
GOOD_SMS_RESPONSE = """
<Response>
<Sms>Thanks - you're subscribed to alerts for {}</Sms>
</Response>
"""
WELCOME_MESSAGE = """
<Response>
<Play>https://dl.drop... | [
"bwghughes@gmail.com"
] | bwghughes@gmail.com |
1a08b8bf04ccf742049429578062f962d1c96358 | 423167d8b46975ffd31a7e9e66e885d47b8d797a | /example/scenario_analysis.py | de2766a7da23578d1052070c3ce90920a848f707 | [
"Apache-2.0"
] | permissive | ricardoalzamora/covid19-sir | 37da075808b1f3671f69b2c4e3d5ef91e23605a2 | 5046273f9163c96e94bcd2587032d11266fb93dc | refs/heads/master | 2023-04-24T01:08:48.786702 | 2021-05-16T16:30:07 | 2021-05-16T16:30:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,479 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
When you use this file from the top directory of the repository with poetry, please run
cd example; poetry run ./scenario_analysis.py; cd ../
"""
import os
import sys
try:
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
except Exception:
pass
fr... | [
"7270139+lisphilar@users.noreply.github.com"
] | 7270139+lisphilar@users.noreply.github.com |
53b7bb634bbe11f156af448a0b90aabc5aa28881 | c3a3beda6fe3a9bbd5b240477f542a46dd92823a | /decision_structures/TH/03_ship_weight.py | ff1ab257e513bba996bfdf4578fccee2bd1f4c5d | [] | no_license | nfarnan/cs001X_examples | 2e64955b705c8ac9c4319becf6344d36b9560e78 | 80b612249fa97ff685f345582f184d57f94bff8e | refs/heads/master | 2020-12-11T14:06:00.890074 | 2020-04-14T19:41:02 | 2020-04-14T19:41:02 | 209,681,009 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 611 | py | # get weight from the user
weight = float(input("How heavy is the package to ship (lbs)? "))
if weight <= 0:
print("Invalid weight (you jerk)")
total = None
elif weight <= 2:
# flat rate of $5
total = 5
# between 2 and 6 lbs:
elif weight <= 6:
# $5 + $1.50 per lb over 2
total = 5 + 1.5 * (weight - 2)
# betwee... | [
"nlf4@pitt.edu"
] | nlf4@pitt.edu |
7daa0d0d547ab9c3cba71dd3dcdf840e38722952 | c3be4b24d4e22d46fee0e22371956171f1749c6c | /tests/basics/sys1.py | a9984576bc3d377429641c208f20256a109fe71e | [
"MIT"
] | permissive | node-it/micropython | cf8475ffd8c63d4c150889df9185720360649b62 | f9f166b5624866afb4a2879f695658e47ada0d18 | refs/heads/master | 2021-01-24T00:33:19.306380 | 2015-09-14T07:37:50 | 2015-09-14T07:37:50 | 41,246,185 | 3 | 1 | null | 2015-08-23T11:02:01 | 2015-08-23T11:02:01 | null | UTF-8 | Python | false | false | 450 | py | # test sys module
import sys
print(sys.__name__)
print(type(sys.path))
print(type(sys.argv))
print(sys.version[:3])
print(sys.version_info[0], sys.version_info[1])
print(sys.byteorder in ('little', 'big'))
print(sys.maxsize > 100)
print(sys.implementation.name in ('cpython', 'micropython'))
try:
sys.exit()
excep... | [
"damien.p.george@gmail.com"
] | damien.p.george@gmail.com |
5e9a88eccaf758f39a54e535be17725e678de84e | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/exercism_data/python/bob/a9d7efd2700f4e2d95d23262cec49fba.py | f2db793e14031cb690ad3c0958b82aab41efe8b9 | [] | 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 | 182 | py | def hey(str):
if str.strip() == '':
return 'Fine. Be that way!'
if str.isupper():
return 'Whoa, chill out!'
if str[-1:] == '?':
return 'Sure.'
return 'Whatever.'
| [
"rrc@berkeley.edu"
] | rrc@berkeley.edu |
17711318a96c21a99c9c3ba28b16771301336780 | d4252920cf72df6973c31dad81aacd5d9ad6d4c6 | /Magnetron.py | b9ceb15966b02489f3570c4882fad99f5b3108a5 | [] | no_license | tnakaicode/GeomSurf | e1894acf41d09900906c8d993bb39e935e582541 | 4481180607e0854328ec2cca1a33158a4d67339a | refs/heads/master | 2023-04-08T15:23:22.513937 | 2023-03-20T04:56:19 | 2023-03-20T04:56:19 | 217,652,775 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,496 | py | import numpy as np
import matplotlib.pyplot as plt
import sys
import os
import time
import argparse
sys.path.append(os.path.join("./"))
from src.base_occ import dispocc, set_trf
import logging
logging.getLogger('matplotlib').setLevel(logging.ERROR)
from OCC.Core.gp import gp_Pnt, gp_Vec, gp_Dir
from OCC.Core.gp impo... | [
"tnakaicode@gmail.com"
] | tnakaicode@gmail.com |
c5d8dbe72900b5a6f2d2da49db2ecea32f7d46f7 | 675c5e97a84cfda399ca74c1804e0218c43b7c70 | /xTool/reloader_helpers.py | 4645a4a02bf23c91a17574784161709e9535164b | [
"MIT",
"BSD-3-Clause",
"Apache-2.0",
"BSD-2-Clause",
"Python-2.0"
] | permissive | fengzhongzhu1621/xTool | 37a232e5ea220c8e5cb48aaf6868bc9cf24181e8 | 57d745ce6be531c000a3b477c38bfdd4c2ac74e3 | refs/heads/master | 2023-07-20T22:31:50.278926 | 2023-07-18T02:29:21 | 2023-07-18T02:29:21 | 88,688,127 | 3 | 4 | Apache-2.0 | 2023-05-09T21:53:19 | 2017-04-19T01:49:20 | Python | UTF-8 | Python | false | false | 5,088 | py | # -*- coding: utf-8 -*-
import os
import signal
import subprocess
import sys
from multiprocessing import Process
from time import sleep
def _iter_module_files():
"""This iterates over all relevant Python files.
It goes through all
loaded files from modules, all files in folders of already loaded module... | [
"jinyinqiao@gmail.com"
] | jinyinqiao@gmail.com |
972a9c0b011114c455f48a45d191bafdb9cef46b | 215456f5e1e5576173d80aa7cee368128bb74ad9 | /20. Segment Trees I - Basics/segment_tree_update_range.py | a95e1e203df1f955dc5750b50f2ebc39f1856503 | [] | no_license | najeex/Competitive-Programming | 99b80c7da8335217003871cfc7205bb03d3b2194 | 1d50620681687a6d3796092cba7410f49dcbad7e | refs/heads/master | 2023-01-12T07:19:23.148177 | 2020-11-17T21:56:47 | 2020-11-17T21:56:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 443 | py | def do_update_range(tree,st,end,qs,qe,inc,index):
# Out of Bound
if (qe<st or qs>end):
return
if(st == end):
tree[index]+=inc
return
mid = (st+end)//2
do_update_range(tree,st,mid,qs,qe,inc,2*index)
do_update_range(tree,mid+1,end,qs,qe,inc,2*index+1)
tree[inde... | [
"34626597+ShashankSinha98@users.noreply.github.com"
] | 34626597+ShashankSinha98@users.noreply.github.com |
dd972508d621747c2828816f2deb7e2d3c24d719 | d0758e0ca004226cec8ad8b26c9565c98534a8b8 | /01-environment/scripts/2-convert-hours-into-seconds.py | 8a285d26240e9594370db2728adf235dd6e08846 | [] | no_license | pythoncanarias/eoi | 334d64a96afc76ac1fa10282378f291b6d8c94b3 | 349367254f85e3e4273cede067ca950913a1332c | refs/heads/master | 2023-07-06T08:00:11.366345 | 2023-06-30T15:19:33 | 2023-06-30T15:19:33 | 222,742,870 | 26 | 19 | null | 2023-06-25T16:03:46 | 2019-11-19T16:41:25 | Jupyter Notebook | UTF-8 | Python | false | false | 196 | py | seconds = 12345
seconds = seconds % (24 * 3600)
hour = seconds // 3600
seconds %= 3600
minutes = seconds // 60
seconds %= 60
result = f"{hour}:{minutes}:{seconds}"
print(result)
| [
"euribates@gmail.com"
] | euribates@gmail.com |
c05c75b1ce8c837f05b6cc4f7dfb07c3f13266e0 | aa5050aeccdd649730c1163e56e98bcd919e460d | /hash-table/1_两数之和/1_easy_两数之和.py | d767cb29155263e8901d0007b4ccc6cc17dd0d3f | [] | no_license | darrenzhang1007/Algorithm | 482ad837fc7135ba521d73f21989d2326953d506 | 8e121225b7952ef0aa45d2d4970874be944ae93a | refs/heads/master | 2022-12-02T17:44:41.934246 | 2020-08-16T15:43:42 | 2020-08-16T15:43:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,292 | py | #
# @lc app=leetcode.cn id=1 lang=python3
#
# [1] 两数之和
#
# https://leetcode-cn.com/problems/two-sum/description/
#
# algorithms
# Easy (46.95%)
# Likes: 7595
# Dislikes: 0
# Total Accepted: 809.2K
# Total Submissions: 1.7M
# Testcase Example: '[2,7,11,15]\n9'
#
# 给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整... | [
"785320051@qq.com"
] | 785320051@qq.com |
5dab8387db92dbf58a725bfad59d2fec73191a44 | e3b9aa9b17ebb55e53dbc4fa9d1f49c3a56c6488 | /google_cloud_compute/komand_google_cloud_compute/actions/list_instances/action.py | 3ce658e6b3a6a8b3a0c28c4b4d769af55180aa38 | [
"MIT"
] | permissive | OSSSP/insightconnect-plugins | ab7c77f91c46bd66b10db9da1cd7571dfc048ab7 | 846758dab745170cf1a8c146211a8bea9592e8ff | refs/heads/master | 2023-04-06T23:57:28.449617 | 2020-03-18T01:24:28 | 2020-03-18T01:24:28 | 248,185,529 | 1 | 0 | MIT | 2023-04-04T00:12:18 | 2020-03-18T09:14:53 | null | UTF-8 | Python | false | false | 2,859 | py | import komand
from .schema import ListInstancesInput, ListInstancesOutput
# Custom imports below
import json
import urllib2
import urllib
class ListInstances(komand.Action):
def __init__(self):
super(self.__class__, self).__init__(
name='list_instances',
description='Retrie... | [
"jonschipp@gmail.com"
] | jonschipp@gmail.com |
bb8fbbd453de9fcaa0965f94390d370aa6db90bd | dc980bbd2bd6078f1e49004afcc710a89ed12565 | /test/functional/mining_basic.py | 141428d730985c1e36e3e8442b2d608e350b8cff | [
"MIT"
] | permissive | frankjardel/isocoin | c21408225399b33f941c303d0e66e0db264a03c2 | 36e3ce6d64839a37c45b6e17aedfb2238c3a5257 | refs/heads/master | 2020-03-28T10:11:59.484529 | 2019-07-17T17:06:11 | 2019-07-17T17:06:11 | 148,090,292 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,659 | py | #!/usr/bin/env python3
# Copyright (c) 2014-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test mining RPCs
- getmininginfo
- getblocktemplate proposal mode
- submitblock"""
import copy
from b... | [
"jardelfrank42@gmail.com"
] | jardelfrank42@gmail.com |
bf30e63ff5b2a51a8df26887c8bf4e54f8f1d483 | 4d199640f69c11fe1d7de14b3536acc96cd7f494 | /sleekxmpp/test/livesocket.py | 3e0f213599b7d0754c33b1869bd0fa3d845c9216 | [
"MIT"
] | permissive | andrzej-bieniek/SleekXMPP | bd0a6f1a36ff4c7580b18096a02d06d71d7980a2 | 596e135a03cd1dfd8eb27b63cdfe791d8f28317d | refs/heads/master | 2021-05-27T09:04:18.068754 | 2010-12-28T21:32:28 | 2010-12-28T21:32:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,530 | py | """
SleekXMPP: The Sleek XMPP Library
Copyright (C) 2010 Nathanael C. Fritz, Lance J.T. Stout
This file is part of SleekXMPP.
See the file LICENSE for copying permission.
"""
import socket
import threading
try:
import queue
except ImportError:
import Queue as queue
class TestLiveSocket(objec... | [
"lancestout@gmail.com"
] | lancestout@gmail.com |
b391928367aeb1f0c572852d523cfa8dffe8bd49 | a46d135ba8fd7bd40f0b7d7a96c72be446025719 | /packages/python/plotly/plotly/validators/waterfall/connector/line/_color.py | 6eba1722b2077420556cbf1563bdaf8e040ebc01 | [
"MIT"
] | permissive | hugovk/plotly.py | 5e763fe96f225d964c4fcd1dea79dbefa50b4692 | cfad7862594b35965c0e000813bd7805e8494a5b | refs/heads/master | 2022-05-10T12:17:38.797994 | 2021-12-21T03:49:19 | 2021-12-21T03:49:19 | 234,146,634 | 0 | 0 | MIT | 2020-01-15T18:33:43 | 2020-01-15T18:33:41 | null | UTF-8 | Python | false | false | 421 | py | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="color", parent_name="waterfall.connector.line", **kwargs
):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_name... | [
"noreply@github.com"
] | hugovk.noreply@github.com |
a6e6646451229e2b7220614636007a30013de781 | dcbef06d5a00f07756339b9e62c684dec2fee425 | /rpm/check-osc-status.py | 5d85268bc2616108a6e3b031c6a0ab223057f4c5 | [
"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 | 1,137 | py | #!/usr/bin/env python
# Copyright 2023, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this fi... | [
"kay.hayen@gmail.com"
] | kay.hayen@gmail.com |
58fbb2cd5b1b649f8841012594a2630156e8d9be | 97959e8f049e1877931e85b9965fc48e1d7b7616 | /p55.py | f7f447aa6212abb0db6bf7c016c7feac3596a565 | [] | no_license | mahabaleshwarabairi/mahabaleshwarabairi | 403911a7e9a0ec93730845eea6e27ee55363113f | 27935ac9165f049c48153455768709e6d8c8a374 | refs/heads/master | 2023-04-26T08:26:17.574774 | 2021-06-05T08:36:35 | 2021-06-05T08:36:35 | 351,385,527 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 250 | py | # -*- coding: utf-8 -*-
"""
Created on Thu Jan 23 15:00:58 2020
@author: Mahabaleshwara.Bairi
"""
import re
p="2004-059-559"## this
num=re.sub(r'#.*$', "",p)
print ("Phone Num:",num)
num1=re.sub(r'\D',"",p)
print ("Phone Num is:",num1) | [
"root@localhost.localdomain"
] | root@localhost.localdomain |
5ad82a9a88a2be6c11135b8bcc1433544b4f539c | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/331/usersdata/283/96369/submittedfiles/funcoes1.py | 5793b2d79c4d50c83c12645f27984aef06a2263d | [] | 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 | 614 | py | # -*- coding: utf-8 -*-
a=[]
b=[]
c=[]
d=0
n=int(input('Digite o número de elementos: '))
for i in range (0,n,1):
a.append(input('a[%d]: '%(i+1)))
for i in range (0,n,1):
b.append(input('b[%d]: '%(i+1)))
for i in range (0,n,1):
c.append(input('c[%d]: '%(i+1)))
#escreva o código da função crescente aqui
... | [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
91c2ee015fb2c7d8b8d48f30f27c54badf897285 | ef6f5f8ee33856e1dcc8e186598da805eb222576 | /run/eval_wider.py | 06e9f455a1bd13088acc2adbb506e5e5dea82da2 | [] | no_license | woolpeeker/CNet | 23616bdfcae3ea9ea0767beac525b24ee583cb6e | af923927b7385c0c4b4ac1e568611af5ae859662 | refs/heads/master | 2020-04-11T07:36:48.590687 | 2019-10-26T08:10:19 | 2019-10-26T08:10:19 | 161,616,574 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,666 | py | import tensorflow as tf
import os, json
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
import time
import tracemalloc
from models.detector import Detector, RefineDetector
from datasets.widerface import WiderEval, save_wider_result
wider_type = 'wider_val'
cfg_path = 'base.json'
cfg = json.load(open(cfg_path))
... | [
"luojiapeng1993@gmail.com"
] | luojiapeng1993@gmail.com |
2e6e23d9d6abc378938716f0e4436a7322c594df | 906171cc2ff7a669149d807c0e6d6db3fbea5f91 | /算法题/Leetcode/easy/Balanced_Binary_Tree.py | 44a9c050416083324e31e22ae66349332626cdf3 | [] | no_license | Deanhz/normal_works | a2942e9eab9b51d190039b659b6924fe2fba7ae9 | 7ae3d5b121bb7af38e3c7e6330ce8ff78ceaadb1 | refs/heads/master | 2020-03-25T20:51:02.835663 | 2019-02-18T16:34:44 | 2019-02-18T16:34:44 | 144,149,031 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,318 | py | # -*- coding: utf-8 -*-
"""
Created on Sat Apr 21 09:40:50 2018
@author: Dean
110 easy
Given a binary tree, determine if it is height-balanced.
总结:经典,多回顾
"""
# Definition for a binary tree node.
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
cla... | [
"258796762@qq.com"
] | 258796762@qq.com |
38036e14a4380832cac0ebfcfd3eb4c197c7bc65 | d34006106e74b1f1ed7a6075065af4fd4db57c94 | /courses/urls.py | ee8402a3bcea0b33a246b3d300023230c82bed5d | [] | no_license | charles-co/online_edu | 52756d50e4d8c67dae9b1e9a53112e8e8799c37c | 80f51883ebd1f21e4df7f987f1a5985b0d97063c | refs/heads/master | 2022-12-12T19:34:52.685870 | 2020-08-26T10:00:02 | 2020-08-26T10:00:02 | 284,412,907 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,648 | py | from django.conf.urls import url
from django.urls import path
from courses.views import (ManageCourseListView, CourseCreateView,
CourseDeleteView, CourseUpdateView,
CourseModuleUpdateView, ContentCreateUpdateView,
ContentDeleteView, ModuleConten... | [
"charlesboy49@gmail.com"
] | charlesboy49@gmail.com |
b1b3dfd35ca91e50686630d1385ebf65564ea43c | bf9ae1e4269952622c7f03dc86c418d21eb20ec7 | /PythonCode-OldBoy/Day6/随堂练习/09.面向对象补充1.py | cb9c91c8506f6a5a662b80f1c78bbe922528b171 | [] | no_license | ChuixinZeng/PythonStudyCode | 5692ca7cf5fe9b9ca24e9f54f6594f3a79b0ffb5 | 2986c83c804da51ef386ca419d0c4ebcf194cf8f | refs/heads/master | 2021-01-21T16:09:58.622069 | 2019-12-01T14:30:36 | 2019-12-01T14:30:36 | 91,876,874 | 4 | 4 | null | null | null | null | UTF-8 | Python | false | false | 2,734 | py | # -*- coding:utf-8 -*-
# Author:Chuixin Zeng
'''
1、什么是面向对象编程?
- 以前使用的是函数,现在是使用类和对象
2、什么是类,什么是对象,又有什么关系?
- 类就是一个个函数的集合,模块里面包着类,类里面是函数
- 有类之后,是通过对象去调用(obj = 类()),即先实例化;没有类的话是直接调用函数了
3、不会面向对象,也能实现功能,但是虽然函数编程能实现,但是比较麻烦。如果用面向对象就非常容易实现
4、JAVA和C#只支持面向对象编程,而Python可以用函数式编程,比如写脚本等
5、什么时候适用面向对象?
- 公共的功能提取出来(参考... | [
"zengchuixin@126.com"
] | zengchuixin@126.com |
1fbdda687d4ef678b42567fd78d33aac654b576b | aabfe137db175f0e070bd9342e6346ae65e2be32 | /PhysicsTools/UtilAlgos/test/testPrimaryVertexFilter_cfg.py | 06e8c871266a0b94e22bdc68db8b71679566634e | [] | no_license | matteosan1/cmssw | e67b77be5d03e826afd36a9ec5a6dc1b3ee57deb | 74f7c9a4cf24913e2a9f4e6805bb2e8e25ab7d52 | refs/heads/CMSSW_7_0_X | 2021-01-15T18:35:33.405650 | 2013-07-30T14:59:30 | 2013-07-30T14:59:30 | 11,789,054 | 1 | 1 | null | 2016-04-03T13:48:46 | 2013-07-31T11:06:26 | C++ | UTF-8 | Python | false | false | 1,391 | py | import FWCore.ParameterSet.Config as cms
process = cms.Process("Test")
process.source = cms.Source("PoolSource",
fileNames = cms.untracked.vstring(
"/store/relval/CMSSW_6_1_1-START61_V11/RelValZTT/GEN-SIM-RECO/v1/00000/0633BF33-EC76-E211-B3B6-003048F0E1BE.root"
)
)
process.maxEvents = cms.untracked.PSet( inpu... | [
"giulio.eulisse@gmail.com"
] | giulio.eulisse@gmail.com |
e654a216cec9eeb4d6b00c38da48018b1f0f353a | 1ee3dc4fa096d12e409af3a298ba01f5558c62b5 | /ixnetwork_restpy/samples/traffic/traffic_scalable_sources_multicast_receivers.py | def95a197b3b1ac1ba8b2a301077e02ecd9a9225 | [
"MIT"
] | permissive | parthpower/ixnetwork_restpy | 321e64a87be0a4d990276d26f43aca9cf4d43cc9 | 73fa29796a5178c707ee4e21d90ff4dad31cc1ed | refs/heads/master | 2020-07-04T13:34:42.162458 | 2019-08-13T20:33:17 | 2019-08-13T20:33:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,298 | py | """Demonstrates creating a traffic item that uses scalable sources and igmp multicast receivers.
"""
from ixnetwork_restpy.testplatform.testplatform import TestPlatform
# connect to a test platform, create a session and get the root IxNetwork object
test_platform = TestPlatform('127.0.0.1', rest_port=11009)
test_pla... | [
"srvc_cm_packages@keysight.com"
] | srvc_cm_packages@keysight.com |
5eae74cbeddc0d8a2e8adb20a7c6afb0e9fce122 | 3d19e1a316de4d6d96471c64332fff7acfaf1308 | /Users/X/xinterium/lre-xpath.py | 410cfa9d62f97bbbe7a228bc9c04292af62a5edd | [] | no_license | BerilBBJ/scraperwiki-scraper-vault | 4e98837ac3b1cc3a3edb01b8954ed00f341c8fcc | 65ea6a943cc348a9caf3782b900b36446f7e137d | refs/heads/master | 2021-12-02T23:55:58.481210 | 2013-09-30T17:02:59 | 2013-09-30T17:02:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,446 | py | import scraperwiki
import lxml.html
root = scraperwiki.scrape('http://onethingwell.org/')
content = lxml.html.etree.HTML(root)
linkage = content.xpath("/html/body/div/article/h2/a/@href")
for links in linkage:
record = { "link" : links }
scraperwiki.datastore.save(["link"], record)
#import urllib2
#proper... | [
"pallih@kaninka.net"
] | pallih@kaninka.net |
52ad32a0b5f54a1962705f64be4803dfeecc8632 | 21ec0f80b0ae4c06d06d49aa79ebbd65b1a7a576 | /helium/feed/services/icalprivateservice.py | 832e346842faf697d94dfc0058f5fe268c4f7fb8 | [
"MIT"
] | permissive | codacy-badger/platform | 0f928fc7d9cd8d03aeec00a8f88fc1bcc7914d84 | 8c0ee6073a166a2cbc3b45bd7dc2b07de63e60ba | refs/heads/master | 2020-06-28T01:53:32.417069 | 2018-04-27T18:28:21 | 2018-04-27T18:28:21 | 97,083,591 | 0 | 0 | null | 2017-07-13T05:30:53 | 2017-07-13T05:30:52 | null | UTF-8 | Python | false | false | 5,956 | py | import datetime
import logging
import icalendar
import pytz
from django.conf import settings
from django.utils import timezone
from helium.planner.models import Homework, Course
from helium.planner.services import coursescheduleservice
__author__ = "Alex Laird"
__copyright__ = "Copyright 2018, Helium Edu"
__version_... | [
"alexdlaird@gmail.com"
] | alexdlaird@gmail.com |
877ed3b48dda3902af5777d898230054bbcf9db6 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /RB6iWFrCd6rXWH3vi_20.py | 3d7a9cf97a45b10073e6b35d4c3fcaa634f87aec | [] | 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 | 895 | py |
def longest_substring(input):
sublst=[]
outputlst=[]
output=[]
result=''
input=list(input)
length=0
for n in range(1, len(input)):
if n==len(input)-1:
if int(input[n-1])%2 != int(input[n])%2:
sublst.append(input[n-1])
sublst.append(inp... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
e43bbdd79dae5546951bc78ba24a7c8496cce4f9 | c720e6bb5c3a897ccef00bb4819594d7340f03c1 | /uasb_talento_humano/controllers/controllers.py | caf47096a019f2d9a6cadeec0b0a79269f8fa27a | [] | no_license | Brahim820/odoo_ec | 85978be23885ef986d3f8b3cdd5aac6cc37e95ef | 99b44fbfafca5adeea27fe4e27f219fb4a4592ba | refs/heads/master | 2020-04-12T23:30:51.028372 | 2018-07-05T22:16:11 | 2018-07-05T22:16:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 877 | py | # -*- coding: utf-8 -*-
from odoo import http
# class UasbTalentoHumano(http.Controller):
# @http.route('/uasb_talento_humano/uasb_talento_humano/', auth='public')
# def index(self, **kw):
# return "Hello, world"
# @http.route('/uasb_talento_humano/uasb_talento_humano/objects/', auth='public')
# ... | [
"ceduardodch@gmail.com"
] | ceduardodch@gmail.com |
3da3ae281735756eb05004f5a94c6360e4ee298a | 82072f2b075fce8815719c25dbef9a41780bf095 | /butter/payment_processors/okpay.py | 2081e4564eeff9fa37d05587f54c2dc7d21cc69e | [] | no_license | CoinGame/Brekky | 9aa22c7e4cb5319c849e1c423c2c3e3148d4a211 | d019cbc79b40da570a23f08a0bf8138d9ca16e41 | refs/heads/master | 2021-01-17T00:26:55.258661 | 2016-06-13T16:04:07 | 2016-06-13T16:04:07 | 61,204,463 | 0 | 0 | null | 2016-06-15T11:56:35 | 2016-06-15T11:56:35 | null | UTF-8 | Python | false | false | 1,081 | py |
class OkPay(object):
def __init__(self):
pass
@staticmethod
def generate_payment_url(tx, post_data, currency):
"""
generate a payment url to allow a user to send funds by this processor
:param tx: a butter Transactions object
:param post_data: the request POST data ... | [
"mj2p.sg@gmail.com"
] | mj2p.sg@gmail.com |
7d83f21a8e7d35b9414b9278519adfe849535bda | 8a452b71e3942d762fc2e86e49e72eac951b7eba | /leetcode/editor/en/[863]All Nodes Distance K in Binary Tree.py | 0a39ab9ce0c4272097cfe804461198de2b89e8e7 | [] | no_license | tainenko/Leetcode2019 | 7bea3a6545f97c678a176b93d6622f1f87e0f0df | 8595b04cf5a024c2cd8a97f750d890a818568401 | refs/heads/master | 2023-08-02T18:10:59.542292 | 2023-08-02T17:25:49 | 2023-08-02T17:25:49 | 178,761,023 | 5 | 0 | null | 2019-08-27T10:59:12 | 2019-04-01T01:04:21 | JavaScript | UTF-8 | Python | false | false | 2,072 | py | # Given the root of a binary tree, the value of a target node target, and an
# integer k, return an array of the values of all nodes that have a distance k from
# the target node.
#
# You can return the answer in any order.
#
#
# Example 1:
#
#
# Input: root = [3,5,1,6,2,0,8,null,null,7,4], target = 5, k... | [
"31752048+tainenko@users.noreply.github.com"
] | 31752048+tainenko@users.noreply.github.com |
65379c5690bfb6c7cffec9f732b51e8704c1916d | dc8939cec0ade08763465cb5e696acc51300b558 | /terms/sitemaps.py | e4954b26f4e16e2441cd02066acc6cb0116674ec | [] | no_license | jssevestre/django-terms | 68a8aac98ce01d7ad9d38fb7144e63ce95c602aa | b611de8338c8635a7488355b3bb965cbc9f60621 | refs/heads/master | 2021-01-16T18:10:03.845018 | 2012-12-13T20:17:53 | 2012-12-13T20:17:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 201 | py | from django.contrib.sitemaps import Sitemap
from .models import Term
class TermsSitemap(Sitemap):
changefreq = 'yearly'
priority = 0.1
def items(self):
return Term.objects.all()
| [
"bordage.bertrand@gmail.com"
] | bordage.bertrand@gmail.com |
bed1815497b01a4c3e741e0c724bc27a92e9f58c | b03131e692be3f84617cc5a9073397407489725c | /algorithms/insertion_sort.py | 823b92e858a378f57941e67325faed4481722860 | [] | no_license | RW21/CS | 1ad20c534d864150c76441011735878a4bccef67 | 3dc4cee33b219e66c77f18a7d7d98fd9abd9746d | refs/heads/master | 2022-12-09T06:18:31.234442 | 2020-09-08T03:56:27 | 2020-09-08T03:56:27 | 198,140,449 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 215 | py | def insertion_sort(target: list):
for i in range(len(target)):
j = i
while j > 0 and target[j-1] > target[j]:
target[j], target[j-1] = target[j-1], target[j]
j -= 1
| [
"rinze.watanabe.translation@gmail.com"
] | rinze.watanabe.translation@gmail.com |
c4bf4511663c31fe55fe0f4250de49ff41c87c50 | d623b8fe1b7e5d49d1c2623fc6ff0356bda50d5d | /homeassistant/components/stream/fmp4utils.py | 313f5632841553419821979be43335d25c4bc651 | [
"Apache-2.0"
] | permissive | piotr-kubiak/home-assistant | 02f1ab8195d9111c6d4c96a55715e67de6b103d9 | d32f3e359f1fabe2d79b0e07e375b3723b7cb07c | refs/heads/dev | 2023-03-03T11:08:25.871531 | 2022-08-26T19:41:41 | 2022-08-26T19:41:41 | 198,906,482 | 1 | 0 | Apache-2.0 | 2023-02-22T06:23:51 | 2019-07-25T22:00:44 | Python | UTF-8 | Python | false | false | 5,157 | py | """Utilities to help convert mp4s to fmp4s."""
from __future__ import annotations
from collections.abc import Generator
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from io import BytesIO
def find_box(
mp4_bytes: bytes, target_type: bytes, box_start: int = 0
) -> Generator[int, None, None]:
"""Fin... | [
"noreply@github.com"
] | piotr-kubiak.noreply@github.com |
684724273767766b2f19229ced552c22bfafeb0b | a1712d8de5cb6f617a0a00a1b1f66611e51a078a | /MODEL1209260000/model.py | fbd316cc19ecc23e5380b50dcf9c9b4db88630a1 | [
"CC0-1.0"
] | permissive | biomodels/MODEL1209260000 | b91ae3f90a5490c61e914492036a0d8f06c13f40 | 840c2121e69055a822f866cd3a8dcfd54bb939fc | refs/heads/master | 2021-01-10T20:47:57.130323 | 2014-10-16T05:49:45 | 2014-10-16T05:49:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 427 | py | import os
path = os.path.dirname(os.path.realpath(__file__))
sbmlFilePath = os.path.join(path, 'MODEL1209260000.xml')
with open(sbmlFilePath,'r') as f:
sbmlString = f.read()
def module_exists(module_name):
try:
__import__(module_name)
except ImportError:
return False
else:
ret... | [
"stanleygu@gmail.com"
] | stanleygu@gmail.com |
989051728c2f6305625e1332d2e580b5303439c2 | 1b314747aba065a9b27a08110b3c741e76b563d3 | /SiteSaltWebsite/LearningCentre/models.py | 75b04fca2dfca73a1f582813bda1eac2dcf2c55d | [] | no_license | SiteSaltSeo/website | a9e42fe9942839fb844332235ce4b7ad464e52cc | a2c3de297bc941364adf0fbd8d1c9a7a2075520b | refs/heads/master | 2021-01-13T03:27:32.393143 | 2017-02-10T16:58:06 | 2017-02-10T16:58:06 | 77,544,407 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,664 | py | from django.db import models
from tinymce.models import HTMLField
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.db.models.signals import pre_save
from django.utils import timezone
from django.utils.text import slugify
from taggit.managers import TaggableManager
# ... | [
"miles@klarity.co.za"
] | miles@klarity.co.za |
78303de5ffa29d614c26b48531b25d9f043b7929 | 1cc54d31a4a443230668ca063bcd27179ff096c2 | /orders/migrations/0008_auto_20210614_1603.py | 766143b2e2f4f431029a06336922ac81da67d743 | [] | no_license | akhmadakhmedov/e-commerce | 8d84f0ae7acd4dc80c8afbe3ab55ed13873ef631 | 6708aa62dec08be9b18fae15125eeef266d869e3 | refs/heads/main | 2023-05-29T21:36:40.354231 | 2021-06-14T13:23:22 | 2021-06-14T13:23:22 | 370,982,449 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 732 | py | # Generated by Django 3.1 on 2021-06-14 10:03
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('store', '0011_auto_20210530_0826'),
('orders', '0007_auto_20210610_2029'),
]
operations = [
migrations.RemoveField(
model_... | [
"ahmedov.thy@gmail.com"
] | ahmedov.thy@gmail.com |
4ea0127ec6e8c32e957d7d551d6ffe666064fb80 | 182dd5305aedeaa197f302c0d830ab85413cdd53 | /core/controllers/viewers/ViewerWorkFlowWidget.py | 501ab69580b4c33dd4fd01fc010371b056a84765 | [
"MIT"
] | permissive | UmSenhorQualquer/workflow-editor | 016dbf47759b2572a811b80fc8bc79c88404c4ab | 6f836f99e155c2f503cf59adf4e8b8b574184e6d | refs/heads/master | 2021-01-24T18:58:13.224476 | 2017-07-20T10:00:10 | 2017-07-20T10:00:10 | 86,163,117 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,652 | py | from core.controllers.viewers.BaseViewer import BaseViewer
from core.modules.OTModuleWorkFlowItem import OTModuleWorkFlowItem
from core.modules.ModuleConnection import ModuleConnection
from PyQt4.Qt import QGLWidget
import OpenGL.GL as GL
import OpenGL.GLU as GLU
class ViewerWorkFlowWidget(QGLWidget, BaseViewer):
"... | [
"ricardo.ribeiro@neuro.fchampalimaud.org"
] | ricardo.ribeiro@neuro.fchampalimaud.org |
dd3e7631ef1e1a27729f12519c1a1f334a0e0e37 | f9d564f1aa83eca45872dab7fbaa26dd48210d08 | /huaweicloud-sdk-ddm/huaweicloudsdkddm/v1/model/list_users_request.py | 48a4cc1a3b12331cdaef8c1ed7af8de231db4d72 | [
"Apache-2.0"
] | permissive | huaweicloud/huaweicloud-sdk-python-v3 | cde6d849ce5b1de05ac5ebfd6153f27803837d84 | f69344c1dadb79067746ddf9bfde4bddc18d5ecf | refs/heads/master | 2023-09-01T19:29:43.013318 | 2023-08-31T08:28:59 | 2023-08-31T08:28:59 | 262,207,814 | 103 | 44 | NOASSERTION | 2023-06-22T14:50:48 | 2020-05-08T02:28:43 | Python | UTF-8 | Python | false | false | 4,812 | py | # coding: utf-8
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ListUsersRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute n... | [
"hwcloudsdk@huawei.com"
] | hwcloudsdk@huawei.com |
266fcca4b8f1fe2dd8c8a1afbaf33f1e4b207757 | 8ee9c5c47268b5c683d06fcc75b101a9e69ccac3 | /python/Data Structures and Algorithms in Python Book/oop/progression.py | 54a1b9f045820896dd09fe156c505a29ece4add2 | [
"MIT"
] | permissive | gauravssnl/Data-Structures-and-Algorithms | c8103e4540735423598da88d828a705505c88de3 | 1c335c72ce514d4f95090241bbd6edf01a1141a8 | refs/heads/master | 2021-03-20T18:50:12.375933 | 2021-01-29T14:07:50 | 2021-01-29T14:07:50 | 247,225,247 | 7 | 3 | null | null | null | null | UTF-8 | Python | false | false | 773 | py | class Progression:
"""Iterator producing a generic progression"""
def __init__(self, start=0):
self._current = start
def _advance(self):
self._current += 1
def __next__(self):
if self._current is None:
raise StopIteration()
else:
answer = se... | [
"gaurav.ssnl@gmail.com"
] | gaurav.ssnl@gmail.com |
631189ba67ca67ca428e94d598a63fb585ae6586 | 66213c48da0b752dc6c350789935fe2b2b9ef5ca | /abc/073/b.py | 49055e322ace5e54231c3feef7112fe2d1c7bf71 | [] | no_license | taketakeyyy/atcoder | 28c58ae52606ba85852687f9e726581ab2539b91 | a57067be27b27db3fee008cbcfe639f5309103cc | refs/heads/master | 2023-09-04T16:53:55.172945 | 2023-09-04T07:25:59 | 2023-09-04T07:25:59 | 123,848,306 | 0 | 0 | null | 2019-04-21T07:39:45 | 2018-03-05T01:37:20 | Python | UTF-8 | Python | false | false | 218 | py | # -*- coding:utf-8 -*-
def solve():
N = int(input())
ans = 0
for i in range(N):
l, r = list(map(int, input().split()))
ans += (r-l+1)
print(ans)
if __name__ == "__main__":
solve()
| [
"taketakeyyy@gmail.com"
] | taketakeyyy@gmail.com |
0a856fd54e08e10091639e740913e725949c9ba0 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /bPHcgMpkf9WvbwbAo_17.py | ae189b285a6add59bcac280df42b8b20906bebdd | [] | 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 | 628 | py | """
Create a function that takes a list of 10 numbers (between 0 and 9) and
returns a string of those numbers formatted as a phone number (e.g. **(555)
555-5555** ).
### Examples
format_phone_number([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]) ➞ "(123) 456-7890"
format_phone_number([5, 1, 9, 5, 5, 5, 4, 4, 6, 8]) ... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
36e1e876191b5608a2fc8632cc1605ea365d48f6 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_350/ch73_2019_09_19_03_25_07_126275.py | cbd46874a7ea99a0423cbf67d40f740edc2f536d | [] | 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 | 183 | py | def remove_vogais(n):
i=0
while i < len(n):
if n[i]=='a' or 'e' or 'i' or 'o' or 'u':
del str(n[i])
i+=1
return n
| [
"you@example.com"
] | you@example.com |
0a0400bdfd132056066e3cd66032d690c636731b | 4a6c81f79121a46071ac2861f7d34a09fe25d5c3 | /swExpertAcademy/q6325_listSearch.py | 7b16e18f6dba0cfc11c94ecce522b8030412be72 | [] | no_license | ghleokim/codeTestProblems | 3faa6913b7ea1822f6fd08edba559e562499d188 | 8d329c401979cfd8d9be0480ccc5b0a22aaf7fcf | refs/heads/master | 2020-06-17T17:27:32.441855 | 2019-09-07T16:22:17 | 2019-09-07T16:22:17 | 195,992,392 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 344 | py | #Q6325 리스트에서 특정 숫자 검색, 임의의 숫자 포함 여부 출력
def search(element, targetList):
for i in targetList:
if i == element:
return True
return False
smList = [2,4,6,8,10]
print(smList)
searchTar = [5, 10]
for tar in searchTar:
print("{0} => {1}".format(tar,search(tar,smList)))
| [
"gh.leokim@gmail.com"
] | gh.leokim@gmail.com |
274a8bc5b54bb65156e9a1643fba830ecbc62d75 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03149/s477674495.py | d640759cb7cb16949768f8d31d04f1017213075e | [] | 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 | 148 | py | pool = list(map(int, input().split()))
flag = True
for i in [1, 7, 9, 4]:
if i not in pool:
flag = False
print('YES' if flag else 'NO')
| [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
1d74987c81c74f596f41e1f69cce5ef55fdab17e | a55516ea904ff7ee77cd9a6d9639675b19c9e563 | /9/rabota/results/rabota_andreeva_ekaterina/rabota_klass.py | d44ea1941d4107122fd8fd2840538954c56437e0 | [] | no_license | aaveter/curs_2016_b | d4c33635fb05899988012b8c3dcedd5dea6f1492 | 5ad5b8b9c6f3d96debbf823b75050179d92855a6 | refs/heads/master | 2020-04-06T03:53:44.135602 | 2016-07-09T08:47:25 | 2016-07-09T08:47:25 | 58,814,616 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 622 | py | # coding: utf-8
# 1. Исправить ошибки в этом программном коде
n = 0
def smart_task():
n += 1
print( 'start of smart_task #{}'.format('n') )
def other_task(): ## +
param_1 = None,
param_2 = None
if param_1 == None:
return None
print... | [
"aa.veter@gmail.com"
] | aa.veter@gmail.com |
e1cf9341fecd7456d9a76c1c6e54d6787c6dbc1f | 8c85cfa6255013626fe6cef4dba4b1b85bf8fd04 | /tests/processing_components/test_rfi.py | ca7a52a11bb4e36a91c2a1e422c421e5dea306d7 | [
"Apache-2.0"
] | permissive | Yonhua/rascil | a22ffede242ab180a9aa4441b278b25bf76b53e8 | 8948ac8ae6cd563a5c381f755176af0a5eb66136 | refs/heads/master | 2020-12-11T14:58:00.146611 | 2020-01-14T14:51:03 | 2020-01-14T14:51:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,407 | py | """ Unit tests for RFI simulation
"""
import logging
import unittest
import astropy.units as u
import numpy
import numpy.testing
from astropy.coordinates import SkyCoord, EarthLocation
from rascil.processing_components.simulation import create_named_configuration
from rascil.processing_components.simulation.rfi imp... | [
"realtimcornwell@gmail.com"
] | realtimcornwell@gmail.com |
4835d640c7f395215cdbfa655c6d3132e9c56a2c | 09f8a3825c5109a6cec94ae34ea17d9ace66f381 | /cohesity_management_sdk/models/bifrost_config.py | 2c90196dabd2e958b1777a07c0dd56bafa279f98 | [
"Apache-2.0"
] | permissive | cohesity/management-sdk-python | 103ee07b2f047da69d7b1edfae39d218295d1747 | e4973dfeb836266904d0369ea845513c7acf261e | refs/heads/master | 2023-08-04T06:30:37.551358 | 2023-07-19T12:02:12 | 2023-07-19T12:02:12 | 134,367,879 | 24 | 20 | Apache-2.0 | 2023-08-31T04:37:28 | 2018-05-22T06:04:19 | Python | UTF-8 | Python | false | false | 4,366 | py | # -*- coding: utf-8 -*-
# Copyright 2023 Cohesity Inc.
import cohesity_management_sdk.models.bifrost_subnet
class BifrostConfig(object):
"""Implementation of the 'BifrostConfig' model.
Specifies the settings of a BifrostConfig. Its used by both Request and
Response structures.
Attributes:
... | [
"naveena.maplelabs@cohesity.com"
] | naveena.maplelabs@cohesity.com |
bbc4303261f37c35f0d3dadbfd56e6706f46abd1 | 4a513ee1781ac98947cc69c340955b318af91e95 | /구현 코드/그래프 알고리즘/이분매칭.py | 79fddac362f3f5d21196ab9c42c532d050308b0b | [] | no_license | atom015/algorithm | 7843d71cee5b760acdb3b9d74f37a091133c9ced | ad94a3dd12cb23363fa401f9cc67b52b36317206 | refs/heads/master | 2023-03-05T09:35:06.282154 | 2021-02-24T18:39:42 | 2021-02-24T18:39:42 | 194,266,560 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 834 | py | n = int(input())
m = int(input())
arr = [[] for i in range(n+1)]
d = [0 for i in range(n+1)] #선택하는 노드
c = [False for i in range(n+1)]
#매칭성공 True, 실패한경우 False
def dfs(nd):
# 연결된 모든노드에 대해서 들어갈수있는지 시도
for i in arr[nd]:
# 이미 처리한 노드는 볼 필요가 없음
if c[i]:continue
c[i] = True
# 비어있거나 점유 노... | [
"zeezlelove@gmail.com"
] | zeezlelove@gmail.com |
cf8e9c90654c724f061666a25a014c6fc4c881cd | 0dc9968c34f74f6ff15435104806956169d6c82a | /algorithm/Bit Manipulation/counter_game.py | 8b4925870c8054de079e3841cc105e61d152b85f | [] | no_license | tasnuvaleeya/hackerRank | 5ac0e5b089e8da83980b37b1dea45def20fe02e0 | 7259324ea0692ce36c494d9b8913eef8e2211aa9 | refs/heads/master | 2021-04-09T17:37:41.769210 | 2018-04-12T13:55:56 | 2018-04-12T13:55:56 | 125,638,757 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 156 | py | def is_power(n):
n = n/2
if n == 2:
return True
elif n > 2:
return is_power(n)
else:
return False
print(is_power(5)) | [
"tasnuva2606@gmail.com"
] | tasnuva2606@gmail.com |
b325b3694658d4ef44ae549ffd8291f680ace251 | 57eb44ce1d84aca3580e28688cf645db483d0d03 | /plots/model_explorer/plotters/bar_plot/date_distribution/__init__.py | 6ff9c2509a147ce16db92ea206c57b895d473d04 | [
"Apache-2.0"
] | permissive | TheLabbingProject/pylabber | cbfd7a6663d56f779dde96bd6e0281f5c8f06393 | 4b51065f457ab86ed311f222080187caf1979fea | refs/heads/master | 2023-04-08T05:29:08.356479 | 2023-03-29T09:06:11 | 2023-03-29T09:06:11 | 205,411,164 | 5 | 3 | Apache-2.0 | 2023-03-29T09:06:13 | 2019-08-30T15:40:47 | Python | UTF-8 | Python | false | false | 235 | py | from plots.model_explorer.plotters.bar_plot.date_distribution.configuration import (
DateDistributionConfiguration,
)
from plots.model_explorer.plotters.bar_plot.date_distribution.date_distribution import (
DateDistribution,
)
| [
"z.baratz@gmail.com"
] | z.baratz@gmail.com |
e8c1d60c415d3ee29cbd5114291d871a461cba08 | bede13ba6e7f8c2750815df29bb2217228e91ca5 | /total_payable_receivable/__init__.py | 88054b442a6206c2336a59300aa15939ec0e816e | [] | no_license | CybroOdoo/CybroAddons | f44c1c43df1aad348409924603e538aa3abc7319 | 4b1bcb8f17aad44fe9c80a8180eb0128e6bb2c14 | refs/heads/16.0 | 2023-09-01T17:52:04.418982 | 2023-09-01T11:43:47 | 2023-09-01T11:43:47 | 47,947,919 | 209 | 561 | null | 2023-09-14T01:47:59 | 2015-12-14T02:38:57 | HTML | UTF-8 | Python | false | false | 905 | py | # -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>).
# Author: odoo@cybrosys.com
# You can modify it under the terms of the GNU AFFERO
# GEN... | [
"ajmal@cybrosys.in"
] | ajmal@cybrosys.in |
6dc1a9a9a1f98288656da50df7d912da214fa09f | 7f2f76af3f76d93c33876ddadcf7d409ac0e7cc3 | /mlflow_tools/export_import/export_run.py | 1a9788f997323654d068f5c06cbbd52141c2e46b | [] | no_license | kaleko/mlflow-tools | 8ac9013facd6a641b35125cd969b3462f1988fb0 | 2d86a9ee928728e34a1bce2a04e7793ad0a94c02 | refs/heads/master | 2021-01-07T11:38:48.389909 | 2020-01-15T19:27:01 | 2020-01-15T19:27:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,236 | py | """
Exports a run to a directory of zip file.
"""
import os
import shutil
import traceback
import tempfile
import mlflow
from ..common import filesystem as _filesystem
from ..common.http_client import DatabricksHttpClient
from ..common import MlflowToolsException
from ..export_import import utils
print("MLflow Vers... | [
"amesar@users.noreply.github.co"
] | amesar@users.noreply.github.co |
2ef8dc1e993c9850edbb46bfd62833493e578680 | b51f2424cc5ef59ce9eb2dcf265d17e8dff0de19 | /backend/leadmanager/leadmanager/settings.py | 400d4679b153d2bf2f47d90659a4f78c1f22c1a9 | [] | no_license | luisandia/react-django-login | 4cca4e9ba304f1627df53a2eb44ba23183609024 | c3dfad79cb58acf412e70f35d0baa5ea7c2c7d49 | refs/heads/master | 2021-02-06T01:08:29.163778 | 2020-03-04T21:56:41 | 2020-03-04T21:56:41 | 243,856,655 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,336 | py | """
Django settings for leadmanager project.
Generated by 'django-admin startproject' using Django 3.0.2.
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/
"""
import o... | [
"luisandiamamani@gmail.com"
] | luisandiamamani@gmail.com |
06992303131511a9a036a395f866148eb5c2edb9 | 19a4b144e8afa70931d7a6e03bad2acea3d58fec | /venv/Lib/site-packages/tableutil/cell.py | b3933a193b1c9ea162686cf91c50bf020fcd57c3 | [
"Apache-2.0"
] | permissive | avim2809/CameraSiteBlocker | 29505f8d2d36f7d402787a032a916bd0fc2c4941 | bfc0434e75e8f3f95c459a4adc86b7673200816e | refs/heads/master | 2020-11-24T17:01:05.842820 | 2019-12-26T12:55:34 | 2019-12-26T12:55:34 | 228,260,283 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,500 | py | # -*- coding: utf-8 -*-
import logging_helper
from future.builtins import str
from dominate import tags
from conversionutil.convert import CONVERTER, convert
from fdutil.type_check import is_list_or_dictionary
from .constants import Justify
from .helpers import (escape_jira_markup,
is_a_table)
l... | [
"avim2809@gmail.com"
] | avim2809@gmail.com |
df647ba9ca420a68ed6310a18dc14de7934223ba | 153da69b35f032f5b83a06f17008ba41a1b336b4 | /src/test/hspylib/core/config/test_properties.py | da8d53ee15806f94474529cac49a21ead328588f | [
"MIT"
] | permissive | TrendingTechnology/hspylib | 6400cadf9dfe6ab5733712dcfeccf8022d61c589 | c79a2c17e89fe21d00ccd9c1646a03407cd61839 | refs/heads/master | 2023-06-20T15:47:35.962661 | 2021-07-19T22:12:18 | 2021-07-19T23:45:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,119 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
TODO Purpose of the file
@project: HSPyLib
hspylib.test.hspylib.core.config
@file: test_properties.py
@created: Tue, 4 May 2021
@author: <B>H</B>ugo <B>S</B>aporetti <B>J</B>unior"
@site: https://github.com/yorevs/hspylib
@license: MIT -... | [
"yorevs@gmail.com"
] | yorevs@gmail.com |
df5c9e59ddfd77df8d7da3aba3408b773b4e6ccf | 7d741303a0d117762de76266eb2fc4dceaa49f01 | /Classwork/12/12-13-17.py | 1a118df1e1268ac5988857f0b1eee6663b910b55 | [] | no_license | HelalChow/Pyhton-Basics | e5870c9649f03533f2364ac4a96cd07af01af360 | 7155ca26d361d92b6d7bbbbc328b683ff9aa4151 | refs/heads/master | 2021-10-19T00:22:36.714395 | 2019-02-15T21:40:52 | 2019-02-15T21:40:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 805 | py | def main():
file_name = input("Please enter a filename: ")
line_num_str = (input("Please enter the line number you want: "))
try:
line_num = int(line_num_str)
in_file = open(file_name, "r")
line = get_line_number(in_file, line_num)
in_file.close()
print(line... | [
"noreply@github.com"
] | HelalChow.noreply@github.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.