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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
507e82f5adc9314085b0165139719ae82759ed26 | 33e2187c1815b1e1209743f5a4870401d2097d71 | /CTCI/Linked Lists/q2.3.py | 8437767ca78a47b5f0d14ead1c26ca2024f034c0 | [] | no_license | sachinjose/Coding-Prep | 8801e969a3608b5e69dc667cba7f3afaf7273e88 | 95f6bc85e7c38034e358af47ef4c228937cd4629 | refs/heads/master | 2022-12-26T22:49:48.510197 | 2020-09-22T07:05:55 | 2020-09-22T07:05:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 453 | py | class Node:
def __init__(self, item):
self.value = item
self.next = None
def del_mid_node(node):
front = node.next
node.value = front.value
node.next = front.next
front.next = None
def print_ll(node):
i = node
while i.next != None :
print(i.value)
i = i.next
return 1
a = Node(1)
b = Node(2)
c = Node... | [
"sachinjose16@gmail.com"
] | sachinjose16@gmail.com |
a2dd768f8a186fca693fd3dd4d8504d4e289e3bd | a2d36e471988e0fae32e9a9d559204ebb065ab7f | /huaweicloud-sdk-bss/huaweicloudsdkbss/v2/model/change_enterprise_realname_authentication_request.py | ffce54df52b790c9f5b5cf55ebbdeb800872ff27 | [
"Apache-2.0"
] | permissive | zhouxy666/huaweicloud-sdk-python-v3 | 4d878a90b8e003875fc803a61414788e5e4c2c34 | cc6f10a53205be4cb111d3ecfef8135ea804fa15 | refs/heads/master | 2023-09-02T07:41:12.605394 | 2021-11-12T03:20:11 | 2021-11-12T03:20:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,141 | py | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ChangeEnterpriseRealnameAuthenticationRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
at... | [
"hwcloudsdk@huawei.com"
] | hwcloudsdk@huawei.com |
d0026f19a145876761727a4f6448e85456207581 | 4d5aa9cafa363de94fa87211503f4416d8c3904e | /dbaas/physical/admin/replication_topology.py | e1e93b7c50b541953eb5cc34a14ba25c719bd062 | [] | permissive | jaeko44/python_dbaas | 0c77da58c4e72719126d69535ac7a16e9ef27d34 | 4fafa4ad70200fec1436c326c751761922ec9fa8 | refs/heads/master | 2020-12-03T00:18:15.535812 | 2017-04-20T21:16:50 | 2017-04-20T21:16:50 | 96,011,945 | 0 | 0 | BSD-3-Clause | 2020-04-04T05:16:53 | 2017-07-02T08:46:17 | Python | UTF-8 | Python | false | false | 457 | py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.contrib import admin
class ReplicationTopologyAdmin(admin.ModelAdmin):
list_filter = ("has_horizontal_scalability", "engine")
search_fields = ("name",)
list_display = ("name", "versions", "has_horizontal_scalabili... | [
"mauro_murari@hotmail.com"
] | mauro_murari@hotmail.com |
b523666030e030ea978ef346ea49101a187f219c | 7c85bf860949ee2c9245530a0c2b40de5b2181f9 | /albert_lstm_crf/albert/lcqmc_progressor.py | 7af945b348e3b4de4f91545fb4e80ed146465983 | [] | no_license | wjunneng/2019-FlyAI-Chinese-Named-Entity-Recognition | 6bc081e5d8cc8828af48a3d104240c86a0dcc03c | 308aa38673b8d1fc1a7c70f9d2b6599a29abcf4d | refs/heads/master | 2022-04-05T03:14:22.749509 | 2020-01-15T08:29:52 | 2020-01-15T08:29:52 | 226,505,227 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,996 | py | import torch
import csv
from callback.progressbar import ProgressBar
from model.tokenization_bert import BertTokenizer
from common.tools import logger
from torch.utils.data import TensorDataset
class InputExample(object):
def __init__(self, guid, text_a, text_b=None, label=None):
"""Constructs a InputExam... | [
"1194348056@qq.com"
] | 1194348056@qq.com |
832d3933942ae2d8daff1fd7920625da1b66c86c | 54f068e9cc75e2f8526b84f5d4692e7132ae4e3b | /utils/metrics.py | 29678b7db1c7fb09dcf0cc9b04442db09ca70f41 | [] | no_license | ChendongLi/LightGBM-with-Focal-Loss | 36f9260a4140a69fc4c6dfe5fb06e77db257e962 | edb4fdc003d007c1887482cbf6cd3f0a534a9370 | refs/heads/master | 2022-03-06T18:24:57.335602 | 2019-11-09T19:56:45 | 2019-11-09T19:56:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,209 | py | import numpy as np
import lightgbm as lgb
from sklearn.metrics import f1_score
from scipy.misc import derivative
def sigmoid(x): return 1./(1. + np.exp(-x))
def best_threshold(y_true, pred_proba, proba_range, verbose=False):
"""
Function to find the probability threshold that optimises the f1_score
Comment: t... | [
"jrzaurin@gmail.com"
] | jrzaurin@gmail.com |
0995853d407dcabc204161adc3c4ca37a2636203 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03326/s669032235.py | e2f14f49eb1efa395d9d49db4d17b4b77fa894e9 | [] | 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 | 357 | py | n,m = map(int, raw_input().split())
r = 0
cakes = [map(int, raw_input().split()) for _ in range(n)]
for b in range(8):
cakes.sort(key = lambda x: sum([x[i] * (-1 if ((b >> i) & 1) else 1) for i in range(3) ]))
s = 0
for i in range(n-1, n - 1 - m, -1):
s += sum([cakes[i][j] * (-1 if ((b >> j) & 1) else +1) for j... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
96484682bf491548ed5328bef04648f80baf509c | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03503/s669355709.py | 49c704585473d519a9db4a93c8490a499f0fba40 | [] | 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 | 732 | py | N = int(input())
Fs = []
for _ in range(N):
Fs.append(list(map(int, input().split())))
Ps = []
for _ in range(N):
Ps.append(list(map(int, input().split())))
def calc(isOpen):
global ans
isAllClose = True
for i in range(10):
if isOpen[i]:
isAllClose = False
if isAllClose:
... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
d17c91b48b0b2e8421bab774ed86dd07adb24bef | 62a212c3d7936c727e09b48d3c10495ea8db12fe | /src/backend/flask_interface/chapter.py | 043ccc6a4e7dd0845ac7e801c52f759896cca129 | [] | no_license | antonpaquin/Homulili | 080a2398e9ee7f19566be3de8a30903ae03a3b9e | 3c56ee5c41d5bf3f86a3325c6117d6795e12cdf2 | refs/heads/master | 2021-09-06T15:19:53.166674 | 2018-02-08T00:21:20 | 2018-02-08T00:21:20 | 110,213,888 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,386 | py | import logging
from .common import standard_request
logger = logging.getLogger(__name__)
def create(manga_id, name, sort_key):
return standard_request(
model='chapter',
method='create',
params={
'manga_id': manga_id,
'name': name,
'sort_key': sort_key,... | [
"antonpaquin@gmail.com"
] | antonpaquin@gmail.com |
a9d284d1c29f3355b27a4b6b659c9011c7035a01 | 0466a5dc950f4e89d8696329b89aa50246c7e7e3 | /deepwind-review/fig4_TKE.py | b4f60c186b01b542678dc16c336049133bc6c62c | [] | no_license | HansInM36/ppcode | 00bc94e6177b8110681127514517f277d7a7b07a | e5fe9de8ddf2991f2fe95bde38045ee02bbcfe10 | refs/heads/master | 2023-07-19T03:42:38.667878 | 2021-09-30T22:59:48 | 2021-09-30T22:59:48 | 313,005,222 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,481 | py | import os
import sys
sys.path.append('/scratch/ppcode/standard')
sys.path.append('/scratch/ppcode/standard/palm_std')
sys.path.append('/scratch/ppcode/standard/sowfa_std')
import imp
import palm_data_ext
from palm_data_ext import *
import sowfa_data_ext_L2
from sowfa_data_ext_L2 import *
import numpy as np
import matpl... | [
"xni001@gfi3104118.klientdrift.uib.no"
] | xni001@gfi3104118.klientdrift.uib.no |
3d61802c5666a8f8f7ba46bfd6447c11fc437c7f | 8b5fc00f5ec726a6f7f95806bfef0836341b925c | /posts/views.py | 7d0fcca802622e0a1f619d4fcf98a6fdd9b597b1 | [] | no_license | TareqMonwer/drf-blog-api | ae09d6dd484600e53ec109aef44203e353bbe5e9 | 2f5feb5c6540937589865827126052d5e3df2302 | refs/heads/master | 2022-12-21T03:23:11.252508 | 2021-06-04T06:50:42 | 2021-06-04T06:50:42 | 231,928,429 | 2 | 0 | null | 2022-12-09T05:20:50 | 2020-01-05T14:20:10 | Python | UTF-8 | Python | false | false | 1,256 | py | from django.contrib.auth import get_user_model
from rest_framework import generics, permissions
from rest_framework import viewsets
from .serializers import PostSerializer, UserSerializer
from .permissions import IsAuthorOrReadOnly
from .models import Post
class PostViewsets(viewsets.ModelViewSet):
permission_cl... | [
"tareqmonwer137@gmail.com"
] | tareqmonwer137@gmail.com |
f4821de951254d90c2a5a3596e891a557b05b01c | d0b4aebfde0c268df3456f4783cb3b8217a5fc4a | /trailingZeros.py | 85a8788ba53153aff8aea0c4e8a7d0f7defebc92 | [] | no_license | kns94/algorithms_practice | a42adf3c55383df8d41e7862caef7437fd6207ae | 6dfdffc075488af717b4e8d486bc3a9222f2721c | refs/heads/master | 2020-12-24T10:52:06.448310 | 2017-01-18T06:31:37 | 2017-01-18T06:31:37 | 73,129,504 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 513 | py | import math
class Solution(object):
def trailingZeroes(self, n):
"""
:type n: int
:rtype: int
"""
if n == 0 or n == 1:
return 0
count5 = 0
i = 1
while 1:
five_power = pow(5,i)
if five_power <... | [
"kns971@gmail.com"
] | kns971@gmail.com |
4829a2a9fcc7d02ba61654e17872292ce81df8ac | a838d4bed14d5df5314000b41f8318c4ebe0974e | /sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/aio/_configuration.py | 2c331f35d733d1b680d8fd78368d8f4befc0d50c | [
"MIT",
"LicenseRef-scancode-generic-cla",
"LGPL-2.1-or-later"
] | permissive | scbedd/azure-sdk-for-python | ee7cbd6a8725ddd4a6edfde5f40a2a589808daea | cc8bdfceb23e5ae9f78323edc2a4e66e348bb17a | refs/heads/master | 2023-09-01T08:38:56.188954 | 2021-06-17T22:52:28 | 2021-06-17T22:52:28 | 159,568,218 | 2 | 0 | MIT | 2019-08-11T21:16:01 | 2018-11-28T21:34:49 | Python | UTF-8 | Python | false | false | 3,324 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | [
"noreply@github.com"
] | scbedd.noreply@github.com |
22c6b2d0385de20ddad130b398ff3e6a01df299d | 6af96cf3c590a5418e87873e892fe704698c8ef8 | /70_defaultdict.py | 281ba6267c4a2054f8881edf257e87b39e5ec63f | [] | no_license | vikasjoshis001/Python-Course | f228ed362160831ee00c8498e679186463887982 | 40efa480b3b39b3abd1b2a0c6bad0af3db2ce205 | refs/heads/master | 2023-05-03T15:37:20.841229 | 2021-05-21T14:41:18 | 2021-05-21T14:41:18 | 283,190,082 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 610 | py | from collections import defaultdict
integer = input()
z = integer.split(" ")
numbers = []
for i in range(len(z)):
numbers.append(int(z[i]))
n = numbers[0]
m = numbers[1]
val = 0
letters1 = []
letters2 = []
for i in range(n):
letter1 = input()
letters1.append(letter1)
for j in range(m):
letter2 = inp... | [
"vikasjoshis001@gmail.com"
] | vikasjoshis001@gmail.com |
a64a9b4eb6ae0419fb6af4b76c697c99733b6cf5 | 51d7e8c09793b50d45731bd5ab9b531b525cf6db | /src/garage/replay_buffer/her_replay_buffer.py | f791f14c354f608206c914eb901b7dbd7924e91a | [
"MIT"
] | permissive | fangqyi/garage | 454247849a6a3f547557b3fac3787ba9eeb0391f | ddafba385ef005f46f913ab352f9638760e5b412 | refs/heads/master | 2023-02-25T00:43:18.903328 | 2021-01-26T01:52:15 | 2021-01-26T01:52:15 | 267,667,220 | 0 | 0 | MIT | 2020-05-28T18:35:08 | 2020-05-28T18:35:07 | null | UTF-8 | Python | false | false | 7,276 | py | """This module implements a Hindsight Experience Replay (HER).
See: https://arxiv.org/abs/1707.01495.
"""
import inspect
import numpy as np
from garage.replay_buffer.replay_buffer import ReplayBuffer
def make_her_sample(replay_k, reward_fun):
"""Generate a transition sampler for HER ReplayBuffer.
... | [
"qiaoyi.fang@duke.edu"
] | qiaoyi.fang@duke.edu |
6b930c08f6dc07b90cf59fb9cb1ac9a3830f6e29 | 209c876b1e248fd67bd156a137d961a6610f93c7 | /python/paddle/fluid/tests/unittests/hybrid_parallel_pp_alexnet.py | 2b85788ae56c620704877df1e7e4b190686738d1 | [
"Apache-2.0"
] | permissive | Qengineering/Paddle | 36e0dba37d29146ebef4fba869490ecedbf4294e | 591456c69b76ee96d04b7d15dca6bb8080301f21 | refs/heads/develop | 2023-01-24T12:40:04.551345 | 2022-10-06T10:30:56 | 2022-10-06T10:30:56 | 544,837,444 | 0 | 0 | Apache-2.0 | 2022-10-03T10:12:54 | 2022-10-03T10:12:54 | null | UTF-8 | Python | false | false | 4,361 | py | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | [
"noreply@github.com"
] | Qengineering.noreply@github.com |
de88cd83e3b8a51b96ce1b2e81d3970b1a7214e0 | c4430be891d7dcf2e0239daef571aa11e6b122d9 | /first_project/myvenv/Scripts/django-admin.py | 971d8096b9930fc04492a4475e82de237994acd8 | [] | no_license | dimka1993kh/Dj_HW_1 | c7c2965445a3aedc7d8ef0297e021a3c13993f4c | abe871fd416d8756040ba4d0997ed9b912997488 | refs/heads/master | 2023-04-05T08:08:23.299196 | 2021-04-04T14:38:32 | 2021-04-04T14:38:32 | 354,566,411 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 741 | py | #!c:\users\khmel\desktop\learn python\django\dj_hw_1\first-project\first_project\myvenv\scripts\python.exe
# When the django-admin.py deprecation ends, remove this script.
import warnings
from django.core import management
try:
from django.utils.deprecation import RemovedInDjango40Warning
except ImportError:
... | [
"dimka1993kh@gmail.com"
] | dimka1993kh@gmail.com |
207f4756d70c535fbb750eda3d45d712a85888c4 | 61ed20e6b48b6b1eeadb81a54fbb7b41422b0a45 | /Paramable.py | db51399142ff44247f5f82fc4d713574d8eafef0 | [] | no_license | Sandy4321/CPT-Plus-Python | 2d57e16549c4b6c95018985a62242f8291bb6b3b | a9b591850f87265d9914dad01666e400b3c111bd | refs/heads/main | 2023-04-26T05:26:45.864688 | 2021-05-28T08:12:26 | 2021-05-28T08:12:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,333 | py | class Paramable():
parameters= {}
def __init__(self,Parameters= None):
self.parameters= Parameters
def setParameters(self,Parameters):
self.parameters= Parameters
def paramDouble(self,name):
value= self.parameters.get(name)
return self.parameters.get(name) if value is not None else None
de... | [
"noreply@github.com"
] | Sandy4321.noreply@github.com |
e65f8759871d46b0463a8e7457ec37b01d0a83f3 | 7bd5ca970fbbe4a3ed0c7dadcf43ba8681a737f3 | /atcoder/arc/arc041/b.py | f8131fe642418ae62dd1e8cb36ea5b96495ceec6 | [] | no_license | roiti46/Contest | c0c35478cd80f675965d10b1a371e44084f9b6ee | c4b850d76796c5388d2e0d2234f90dc8acfaadfa | refs/heads/master | 2021-01-17T13:23:30.551754 | 2017-12-10T13:06:42 | 2017-12-10T13:06:42 | 27,001,893 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 528 | py | dxy = zip([1, 0, -1, 0], [0, 1, 0, -1])
N, M = map(int, raw_input().split())
b = [map(int, list(raw_input())) for i in xrange(N)]
a = [[0] * M for i in xrange(N)]
k = 1
for d in xrange(N / 2 + 1):
for y in [d, N - 1 - d]:
for x in xrange(1, M - 1):
if b[y][x] != 0:
a[y + k][x] += b[y][x]
tmp = b[y][x]
... | [
"roiti46@gmail.com"
] | roiti46@gmail.com |
46776886973da6232431438c8a45777e116011fd | ef1d38cfef63f22e149d6c9dd14e98955693c50d | /webhook/protos/pogoprotos/networking/requests/social/register_push_notification_message_pb2.py | 1e4e24b2159c6c9ed0aa4e88909c80e38daba977 | [] | no_license | Kneckter/WebhookListener | 4c186d9012fd6af69453d9d51ae33a38aa19b5fd | ea4ff29b66d6abf21cc1424ed976af76c3da5511 | refs/heads/master | 2022-10-09T04:26:33.466789 | 2019-11-24T17:30:59 | 2019-11-24T17:30:59 | 193,372,117 | 2 | 0 | null | 2022-09-23T22:26:10 | 2019-06-23T16:39:34 | Python | UTF-8 | Python | false | true | 7,374 | py | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pogoprotos/networking/requests/social/register_push_notification_message.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import mes... | [
"kasmar@gitlab.com"
] | kasmar@gitlab.com |
349e1fc75603fb2a77c4a4ae73ce7c02cb283bba | fdca7a438cd891ba306c495adfc864155290ef59 | /correlation.py | a125394b05dd75db5b34746dae87164f8b445be1 | [] | no_license | libowei1213/SportsNews | 974487d9f8fccf53058865e01cd2bff9b48e9bb6 | b803521a2ca74e4ffe5e5b929ac40df6d34ab808 | refs/heads/master | 2020-06-10T01:22:37.085751 | 2016-12-26T05:22:30 | 2016-12-26T05:22:30 | 76,117,308 | 1 | 0 | null | 2016-12-10T14:26:29 | 2016-12-10T14:26:29 | null | UTF-8 | Python | false | false | 618 | py | # coding=utf=8
import json
from gensim.models import Word2Vec
import jieba
import pickle
import time
word2vecModel = Word2Vec.load_word2vec_format("word2vec.model", binary=True)
docSimilarDict = pickle.load(open("doc_similar_dict.bin", "rb"))
# 最相似的五个词
def getSimilarWords(query):
words = []
for word in quer... | [
"libowei123123@qq.com"
] | libowei123123@qq.com |
fba5abb5537747e7cc126ea07b763f6364349fb2 | 64bf21e9b4ca104557d05dc90a70e9fc3c3544a4 | /tests/journal.api/error_notes.py | 50feb7eb121fc99ee678a8fa0d7ab561c62092d7 | [
"BSD-3-Clause"
] | permissive | pyre/pyre | e6341a96a532dac03f5710a046c3ebbb79c26395 | d741c44ffb3e9e1f726bf492202ac8738bb4aa1c | refs/heads/main | 2023-08-08T15:20:30.721308 | 2023-07-20T07:51:29 | 2023-07-20T07:51:29 | 59,451,598 | 27 | 13 | BSD-3-Clause | 2023-07-02T07:14:50 | 2016-05-23T04:17:24 | Python | UTF-8 | Python | false | false | 1,033 | py | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
#
# michael a.g. aïvázis <michael.aivazis@para-sim.com>
# (c) 1998-2023 all rights reserved
def test():
"""
Verify access to the channel metadata
"""
# access
import journal
# make a channel
channel = journal.error("test.channel")
# get ... | [
"michael.aivazis@para-sim.com"
] | michael.aivazis@para-sim.com |
39d31965ec76714a376a7a0cbb38aed5333fe64b | 114c1f7ceff04e00591f46eeb0a2eb387ac65710 | /g4g/ALGO/Searching/Coding_Problems/19_kth_smallest_element_in_row-wise_col-wise_sorted_2D_array.py | d937b87c8f1d5d3cabcec04d1e613b21de61577b | [] | no_license | sauravgsh16/DataStructures_Algorithms | 0783a5e6dd00817ac0b6f2b856ad8d82339a767d | d3133f026f972f28bd038fcee9f65784f5d3ea8b | refs/heads/master | 2020-04-23T03:00:29.713877 | 2019-11-25T10:52:33 | 2019-11-25T10:52:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,650 | py | ''' Kth smallest element in a row-wise and column-wise sorted 2D array '''
'''
Algorithm:
1) Build a min heap of elements from first row. A heap entry also stores
row number and column number.
2) Do following k times.
a) Get minimum element (or root) from min heap.
b) Find row number and col... | [
"GhoshSaurav@JohnDeere.com"
] | GhoshSaurav@JohnDeere.com |
99a772ef56a0045b29c6d562794d22d2f7a8bfef | b0ea541c0aef0fa8946aef3130490dc4fa068e9b | /ABC_PS1/catkin_ws/build/learning_ros_noetic/Part_4/mobot_mapping/catkin_generated/pkg.installspace.context.pc.py | ed8cd615c7530093768d6061c2a7484ac5d64dde | [] | no_license | ABCaps35/ECSE473_ABC | b66c8288412a34c72c858e16fd2f93540291b8ff | f03b9ec90317dd730aa723cb7fa7254ea03e412f | refs/heads/master | 2023-03-09T09:46:47.963268 | 2021-02-11T03:44:19 | 2021-02-11T03:44:19 | 337,913,499 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 394 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "roscpp;std_msgs".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "mobot_mapping"
PROJECT... | [
"acapelli345@gmail.com"
] | acapelli345@gmail.com |
83b3ede674e43d3ec88b0c8e25d143815f963c05 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/otherforms/_slaps.py | c2b00dc1a180251eb620011c2de56eb92b11daf6 | [
"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 | 214 | py |
#calss header
class _SLAPS():
def __init__(self,):
self.name = "SLAPS"
self.definitions = slap
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.basic = ['slap']
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
edc0b0666f4d7c9b685ef4a501def9c7fb1478b4 | 253089ef4ee99c50cdaa23fde4d789794789e2e9 | /97/holidays.py | 74ab4707382349d1194683c15ef69f436f20dcc0 | [] | no_license | Zaubeerer/bitesofpy | 194b61c5be79c528cce3c14b9e2c5c4c37059259 | e5647a8a7a28a212cf822abfb3a8936763cd6b81 | refs/heads/master | 2021-01-01T15:01:21.088411 | 2020-11-08T19:56:30 | 2020-11-08T19:56:30 | 239,328,990 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,143 | py | from collections import defaultdict
import os
from urllib.request import urlretrieve
from bs4 import BeautifulSoup
import re
from datetime import datetime
# prep data
tmp = os.getenv("TMP", "/tmp")
page = 'us_holidays.html'
holidays_page = os.path.join(tmp, page)
urlretrieve(
f'https://bites-data... | [
"r.beer@outlook.de"
] | r.beer@outlook.de |
d153b13c505232c9e7cad79ccf9c2e66cb7852b9 | 6a819308924a005aa66475515bd14586b97296ae | /venv/lib/python3.6/site-packages/PIL/ImagePalette.py | f33722f5ac2d67b2c4d3fefb58007d195c3253e7 | [] | no_license | AlexandrTyurikov/my_first_Django_project | a2c655dc295d3904c7688b8f36439ae8229d23d1 | 1a8e4d033c0ff6b1339d78c329f8beca058b019a | refs/heads/master | 2020-05-04T13:20:20.100479 | 2019-05-04T23:41:39 | 2019-05-04T23:41:39 | 179,156,468 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,320 | py | #
# The Python Imaging Library.
# $Id$
#
# images palette object
#
# History:
# 1996-03-11 fl Rewritten.
# 1997-01-03 fl Up and running.
# 1997-08-23 fl Added load hack
# 2001-04-16 fl Fixed randint shadow bug in random()
#
# Copyright (c) 1997-2001 by Secret Labs AB
# Copyright (c) 1996-1997 by Fredrik Lundh
#... | [
"tyur.sh@gmail.com"
] | tyur.sh@gmail.com |
ae482f5f801c9fc7d714c8b1c1d136d4a5ea6ea7 | ba095b34fb62cff6f5f6f32dc7036f13b45681a2 | /llia/synths/algo/algo_constants.py | 95a9f6e36228d341519f6ef51d8d46c1e077f12a | [] | no_license | plewto/Llia | 7d3c60bd7355d02e9b00e97c82f24da5fa83b0f4 | 97f530ff0841b9604f0d9575e7e1f0e3c0660be0 | refs/heads/master | 2020-05-21T20:39:07.223990 | 2018-04-30T02:28:55 | 2018-04-30T02:28:55 | 63,315,753 | 17 | 2 | null | 2016-08-04T17:10:17 | 2016-07-14T08:05:33 | Python | UTF-8 | Python | false | false | 1,968 | py | # llia.synths.algo.algo_constants
CFILL = "black"
CFOREGROUND = "white"
COUTLINE = "white"
MOD_RANGE_COUNT = 6
KEYSCALES = (-18,-12,-9,-6,-3,0,3,6,9,12,18)
LFO_RATIOS = ((0.125,"1/8"),
(0.250,"1/4"),
(0.375,"3/8"),
(0.500,"1/2"),
(0.625,"5/8"),
(0.... | [
"plewto@gmail.com"
] | plewto@gmail.com |
f51d6f03e2249ff68e86a5c1b53336e2988f0477 | 3f9511cdf1fc3dc76f1acda62be061f6442a1289 | /tests/sparkml/test_imputer.py | 9b238cf25b163506d3744f808f38d0d27c16a63e | [
"Apache-2.0"
] | permissive | xadupre/onnxmltools | e0aa5a2731c07a87cf0ec0f7b52507dc8c25e6cf | facefb245d991aa30c49bff7510a803997bc8137 | refs/heads/master | 2023-08-08T10:43:32.769022 | 2022-06-20T11:24:03 | 2022-06-20T11:24:03 | 331,380,871 | 0 | 0 | Apache-2.0 | 2021-01-20T17:30:45 | 2021-01-20T17:30:44 | null | UTF-8 | Python | false | false | 3,912 | py | # SPDX-License-Identifier: Apache-2.0
import sys
import unittest
import numpy
from pyspark.ml.feature import Imputer
from onnx.defs import onnx_opset_version
from onnxconverter_common.onnx_ex import DEFAULT_OPSET_NUMBER
from onnxmltools import convert_sparkml
from onnxmltools.convert.common.data_types import FloatTens... | [
"noreply@github.com"
] | xadupre.noreply@github.com |
61fd36e2270c1aa85f01ad2f827292a06b68e384 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_overs.py | ce1fa766d347ed234f486bbfb1bcc49794d6c8dd | [
"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 | 224 | py |
from xai.brain.wordbase.nouns._over import _OVER
#calss header
class _OVERS(_OVER, ):
def __init__(self,):
_OVER.__init__(self)
self.name = "OVERS"
self.specie = 'nouns'
self.basic = "over"
self.jsondata = {}
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
8f4d202437faa4e43520033760111cb066a89fb0 | 49122876b08f17e2f6a2a1efe41f0e2fc3623db6 | /publication/migrations/0001_initial.py | 7dbdcb207aa0e5c90b8e0fcc58da4dedc0f0cf92 | [] | no_license | Ansagan-Kabdolla/vestnik | bb2010daa22155953501fc5405ac9cdd36c5b68c | 40155e92e91d5c56c9018f51e277e7c64c95c134 | refs/heads/master | 2022-04-26T09:21:34.656317 | 2020-04-29T10:44:44 | 2020-04-29T10:44:44 | 259,898,209 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,827 | py | # Generated by Django 2.2.4 on 2020-04-10 11:56
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Predmeti',
fields=[
... | [
"ansagankabdolla4@gmail.com"
] | ansagankabdolla4@gmail.com |
fe0dee7118ce7fdfd87aaf3117f961056f616985 | bf0e884ed3c9b57d0bc022c45b4bd50f7f5ba34a | /tomheon/day19/day19-1.py | 33e533ec6d1b5d1deebfdbd7cbb3db6ce9861bea | [
"MIT"
] | permissive | sean-hart/advent2020 | 8db117f3e778ec8044e97ce8a0d17edeb6351415 | 1174afcedf9a8db5134803869e63ea182637fc29 | refs/heads/main | 2023-02-07T15:52:57.956987 | 2020-12-27T00:42:55 | 2020-12-27T00:42:55 | 317,643,649 | 0 | 8 | MIT | 2020-12-27T00:42:56 | 2020-12-01T19:17:17 | Python | UTF-8 | Python | false | false | 2,481 | py | import sys
from itertools import takewhile, dropwhile
def make_atom_checker(rule_text):
atom = rule_text.strip('"')
def _check_atom(message):
nonlocal atom
if message.startswith(atom):
return True, message[len(atom):]
else:
return False, message
return _ch... | [
"tomheon@gmail.com"
] | tomheon@gmail.com |
6a74b019629064bc3870806038bd746ab965c5b1 | ad69290bc5210424259ac0481aff95896ad92433 | /dalet/addresses.py | 607c611a12803171dbcf2d2f7afa368974f9870d | [
"MIT"
] | permissive | reuf/dalet | 9ade431ffb49e0db01d98553be3afd653b9e2a5c | 3af0c266cdd9b390da9c2a828d5b0cde1ee2b8b8 | refs/heads/master | 2021-06-18T17:26:53.656073 | 2017-05-28T18:23:38 | 2017-05-28T18:23:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 819 | py | import re
import countrynames
from normality import stringify
from normality.cleaning import remove_control_chars, collapse_spaces
LINE_BREAKS = re.compile(r'(\r\n|\n|<BR/>|\t|ESQ\.,|ESQ,|;)')
REMOVE = re.compile(r'(ATTENTION|ATTN|C/O|UNDELIVERABLE DOMESTIC ADDRESS)')
COMMATA = re.compile(r'(,\s?[,\.])')
def clean_a... | [
"friedrich@pudo.org"
] | friedrich@pudo.org |
c85d7cd9365249c757dcb0502bd5334fa989d9f7 | 1121c346e6ef7e3e59f0b372424d9c78c3ecebf1 | /repository.py | 2d7a9d5a0cd0e76afa5058197f6a30c3168965dd | [] | no_license | xueyuanl/pyt | 321c8b1112ad9ee20bb8362fff13e598f300e8b4 | 3d1ca47b16ebb072ac4564a450934386e92852f2 | refs/heads/master | 2021-01-01T10:43:28.267669 | 2020-02-09T04:07:37 | 2020-02-09T04:07:37 | 239,243,493 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,706 | py | import argparse
import collections
import configparser
import hashlib
import os
import re
import sys
import zlib
class GitRepository(object):
"""A git repository"""
worktree = None
gitdir = None
conf = None
def __init__(self, path, force=False):
self.worktree = path
self.gitdir ... | [
"15186846+xueyuanl@users.noreply.github.com"
] | 15186846+xueyuanl@users.noreply.github.com |
3b6881e7df189cf51aa028d4693e8f04399096ab | 582ffc028085cacb1d69315889e611fb31a23f98 | /ch5-blog-app/blog/migrations/0001_initial.py | 3567050eba1387160f830e3b68f3f643499ea4b8 | [
"MIT"
] | permissive | balazskiss1985/djangoforbeginners | af04e0d441414e777b952325fdf62339e1b4c2c8 | 827b1b11592e851a6c4948d849ae8815f9c138c7 | refs/heads/master | 2022-12-05T13:48:01.648379 | 2020-08-24T14:09:02 | 2020-08-24T14:09:02 | 289,945,354 | 0 | 0 | MIT | 2020-08-24T14:07:22 | 2020-08-24T14:07:21 | null | UTF-8 | Python | false | false | 786 | py | # Generated by Django 3.1rc1 on 2020-07-22 17:09
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
op... | [
"will@wsvincent.com"
] | will@wsvincent.com |
2cf275cca9a55fcce0e3b89acf707b082409bf94 | 7fa06a5089a9b5a10553d457501abbaa0a7f1112 | /opencv/pro4_Detect_face_and_eyes/face_and_eye_detection.py | de47c4a64a40009cd07e1c4b0b8e6587cafcf91f | [] | no_license | dbetm/processing-images | 15e0687b8688328c98af2979b36e7ebd595141ef | 53dcf5431d47cf19d84c086e61a99df9a35c69fe | refs/heads/master | 2020-04-18T00:18:23.077066 | 2019-11-27T05:14:12 | 2019-11-27T05:14:12 | 167,071,638 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 963 | py | import numpy as np
import cv2
# Cargar el clasificador en cascada
face_classifier = cv2.CascadeClassifier("../Haarcascades/haarcascade_frontalface_default.xml")
eye_classifier = cv2.CascadeClassifier("../Haarcascades/haarcascade_eye.xml")
# Cargamos la imagen y la convertimos
# a escala de grises
img = cv2.imread("ob... | [
"davbetm@gmail.com"
] | davbetm@gmail.com |
f96e024db9c5b10be18599484feec775f26283c2 | 1f8464d34c5fec12449133ebd7c18bc8629b1e18 | /infer.py | 4d5dac2a62e68c15dff0ead583c74d8c94d23dd4 | [] | no_license | markflies777/retinanet-digit-detector | 4eff6f1591e5adfaac115aca2c2a12b5d7735f6c | 6aadef08bfc29297479dce182ca2d4b553eddea7 | refs/heads/master | 2022-01-13T02:17:31.861004 | 2019-05-13T12:15:24 | 2019-05-13T12:15:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,835 | py | # -*- coding: utf-8 -*-
from keras_retinanet import models
from keras_retinanet.utils.image import read_image_bgr, preprocess_image, resize_image
import matplotlib.pyplot as plt
import cv2
import os
import numpy as np
import time
from retina.utils import visualize_boxes
MODEL_PATH = 'snapshots/resnet50... | [
"penny4860@gmail.com"
] | penny4860@gmail.com |
8f756e3bb14502ea7e325811d0c6fd2120a152ac | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2673/60585/281192.py | 0974fa348779c9a871dc14eaae1e67868df5eecf | [] | 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 | 237 | py | t=eval(input())
for _ in range(t):
n=bin(eval(input())).replace('0b','')
res=n[0]
for i in range(1,len(n)):
if res[-1]==n[i]:
res+='0'
else:
res+='1'
print(int(res,2))
| [
"1069583789@qq.com"
] | 1069583789@qq.com |
bf65e117900e20d5e6f3d1d8fa220ae79b2e3121 | c77b2f06a971d5e77a3dc71e972ef27fc85475a5 | /algo_ds/_general/merge_sort.py | 64cb2a65de1663f9525ecdc465874a585bde22de | [] | no_license | thefr33radical/codeblue | f25520ea85110ed09b09ae38e7db92bab8285b2f | 86bf4a4ba693b1797564dca66b645487973dafa4 | refs/heads/master | 2022-08-01T19:05:09.486567 | 2022-07-18T22:56:05 | 2022-07-18T22:56:05 | 110,525,490 | 3 | 6 | null | null | null | null | UTF-8 | Python | false | false | 988 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Oct 12 20:13:25 2017
@author: gowtham
"""
def sorter(arr,low,mid,high):
start1=low
start2=mid+1
temp=[]
start1=int(start1)
start2=int(start2)
while(start1<=mid and start2<=high):
if(arr[start1]<arr[start2]):
... | [
"imperial.gauntlet@gmail.com"
] | imperial.gauntlet@gmail.com |
fc3350506279dd9c1c2a5b781c39c33bb77c568b | a6678062b0cd9f2477e9e25d03f7a83f91ce994e | /upk/apk.py | 378107a37b43996269a9fc7970cdbe772aa0c035 | [
"MIT"
] | permissive | Cologler/upk-python | d0e2068984254ffbe4f35512751d63be3ad522e9 | f20f4ff3167d7a5a089523154b0b8f47973ea311 | refs/heads/main | 2023-04-17T06:34:59.427532 | 2021-04-29T15:54:36 | 2021-04-29T15:54:36 | 314,580,019 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 901 | py | # -*- coding: utf-8 -*-
#
# Copyright (c) 2020~2999 - Cologler <skyoflw@gmail.com>
# ----------
#
# ----------
from typing import TypedDict, Optional
from logging import Logger
import zipfile
import xml.etree.ElementTree as et
from .androidManifestDecompress import read
class _PackageInfo(TypedDict):
package: Op... | [
"skyoflw@gmail.com"
] | skyoflw@gmail.com |
38573492b46389b756279bc94787a0408c6ec72b | 2ccb99e0b35b58622c5a0be2a698ebda3ab29dec | /testing/web-platform/tests/XMLHttpRequest/resources/chunked.py | 7adabbfd7f471a7491508f613868300836ae74fc | [
"LicenseRef-scancode-w3c-03-bsd-license",
"BSD-3-Clause"
] | permissive | roytam1/palemoon27 | f436d4a3688fd14ea5423cbcaf16c4539b88781f | 685d46ffdaee14705ea40e7ac57c4c11e8f31cd0 | refs/heads/master | 2023-08-20T10:11:13.367377 | 2023-08-17T07:28:43 | 2023-08-17T07:28:43 | 142,234,965 | 61 | 16 | NOASSERTION | 2022-03-30T07:54:03 | 2018-07-25T02:10:02 | null | UTF-8 | Python | false | false | 666 | py | def main(request, response):
chunks = ["First chunk\r\n",
"Second chunk\r\n",
"Yet another (third) chunk\r\n",
"Yet another (fourth) chunk\r\n",
]
response.headers.set("Transfer-Encoding", "chunked");
response.headers.set("Trailer", "X-Test-Me");
r... | [
"roytam@gmail.com"
] | roytam@gmail.com |
6b3067f48101cec3d7d205b4a8a24c5bf2432457 | 05b7569b3999b3871fa1c72bdff172accfe7a48c | /nacao/PreProcess.py | d19da833d48f720edb7aa83198cd4b9293bef261 | [] | no_license | nanqianbeiquan/keras | d997cf2188ccb0e8e73143c26a7283ebd1275c42 | 576a32b4ccc75fc723a5f8662de1460a26b43822 | refs/heads/master | 2021-05-07T03:07:38.841726 | 2017-11-15T02:24:33 | 2017-11-15T02:24:33 | 109,337,972 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,051 | py | # -*- coding: utf-8 -*-
import numpy as np
import cv2
import os
import random
import time
class PreProcess(object):
def ConvertToGray(self,Image,filename):
GrayImage = cv2.cvtColor(Image,cv2.COLOR_BGR2GRAY)
return GrayImage
def ConvertToBpp(self,GrayImage,filename):
App,Bpp =... | [
"18801791073@163.com"
] | 18801791073@163.com |
e03823bb1b0db26108a8bda4155029fbfe027a13 | 0ba4cb23671ef141b530b42892c3904bf035c26b | /examples/mybot.py | 66279362900805dd4beafa9b42e9a2d4288654a8 | [] | no_license | Mika64/irc3 | 02b52904b008ee6076fc1fc564e0e7b2e3385777 | f21e2e2ac482e9a30b81f89d27367a49121a790b | refs/heads/master | 2021-01-15T09:08:43.126775 | 2014-05-01T14:53:07 | 2014-05-01T14:53:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,492 | py | # -*- coding: utf-8 -*-
import logging.config
from irc3.plugins.command import command
import logging
import irc3
@irc3.plugin
class MyPlugin:
"""A plugin is a class which take the IrcBot as argument
"""
def __init__(self, bot):
self.bot = bot
self.log = self.bot.log
@irc3.event(irc3... | [
"gael@gawel.org"
] | gael@gawel.org |
6fe6f2b7352f3fc6f5888617910a5fc2aa936cb3 | 2276e1797b87b59e4b46af7cbcb84e920f5f9a92 | /Python/Best Time to Buy and Sell Stock II.py | 8cd02052d473ccf42a41121ad0539327088ee6f4 | [] | no_license | ZhengyangXu/LintCode-1 | dd2d6b16969ed4a39944e4f678249f2e67f20e0a | bd56ae69b4fa6a742406ec3202148b39b8f4c035 | refs/heads/master | 2020-03-18T04:44:31.094572 | 2016-01-10T00:20:44 | 2016-01-10T00:20:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 777 | py | """
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit.
You may complete as many transactions as you like (ie, buy one and sell one share of the stock multiple times).
However, you may not engage in multiple transactions at the same ... | [
"anthonyjin0619@gmail.com"
] | anthonyjin0619@gmail.com |
8c7cbee9d2cc83756d0ac306ffcc3fc0f20ffb50 | 8eab8ab725c2132bb8d090cdb2d23a5f71945249 | /virt/Lib/site-packages/comtypes/test/test_createwrappers.py | e0dafe908c7b84e4ef0a488ed37fe7d3931eec0f | [
"MIT"
] | permissive | JoaoSevergnini/metalpy | 6c88a413a82bc25edd9308b8490a76fae8dd76ca | c2d0098a309b6ce8c756ff840bfb53fb291747b6 | refs/heads/main | 2023-04-18T17:25:26.474485 | 2022-09-18T20:44:45 | 2022-09-18T20:44:45 | 474,773,752 | 3 | 1 | MIT | 2022-11-03T20:07:50 | 2022-03-27T22:21:01 | Python | UTF-8 | Python | false | false | 4,063 | py | from __future__ import print_function
import glob
import os
import unittest
import warnings
import comtypes.client
import comtypes.client._generate
import comtypes.typeinfo
def setUpModule():
raise unittest.SkipTest("I have no idea what to do with this. It programmatically creates "
... | [
"joao.a.severgnini@gmail.com"
] | joao.a.severgnini@gmail.com |
9d568ee0da0b7d38e5e42f909ce7e3d97e831202 | c085578abc19db18ee0766e1f9598d79a3acdbe1 | /290-Word-Pattern/solution.py | d8cff43f74d5110e9f754da90d549719e16ebaca | [
"MIT"
] | permissive | Tanych/CodeTracking | efb6245edc036d7edf85e960972c34d03b8c707a | 86f1cb98de801f58c39d9a48ce9de12df7303d20 | refs/heads/master | 2020-05-21T17:40:10.105759 | 2016-10-09T18:20:42 | 2016-10-09T18:20:42 | 60,616,356 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 860 | py | class Solution(object):
def wordPattern(self, pattern, strs):
"""
:type pattern: str
:type str: strs
:rtype: bool
"""
if not pattern and not strs:
return True
strlist=strs.split(" ")
if len(strlist)!=len(pattern):
r... | [
"ychtan@email.gwu.edu"
] | ychtan@email.gwu.edu |
a643e7b0f7385c7628d0d02dc81cde3902e637f6 | 1c91439673c898c2219ee63750ea05ff847faee1 | /tools/deployment/pytorch2torchscript.py | f261b7c952602bc3c48f6f0cfaa8465bfccdb901 | [
"Apache-2.0"
] | permissive | ChenhongyiYang/GPViT | d7ba7f00d5139a989a999664ab0874c5c9d53d4d | 2b8882b2da41d4e175fe49a33fcefad1423216f4 | refs/heads/main | 2023-06-08T00:10:07.319078 | 2023-05-26T15:52:54 | 2023-05-26T15:52:54 | 577,075,781 | 78 | 2 | null | null | null | null | UTF-8 | Python | false | false | 4,364 | py | # Copyright (c) OpenMMLab. All rights reserved.
import argparse
import os
import os.path as osp
from functools import partial
import mmcv
import numpy as np
import torch
from mmcv.runner import load_checkpoint
from torch import nn
from mmcls.models import build_classifier
torch.manual_seed(3)
def _demo_mm_inputs(i... | [
"chenhongyiyang@Chenhongyis-MacBook-Pro.local"
] | chenhongyiyang@Chenhongyis-MacBook-Pro.local |
4e26b65bf4b0d1429e7f5b31c70652efb3ce0222 | 3e00e7fa0e2d41911fe91d858e0a9d2d0c1367c3 | /excercises/Closures and Decorators/Decorators 2 Name Directory.py | 4a868d9bed83072b64d4024cf67d5523db44cc90 | [] | no_license | Marius-Juston/Python-Hackerrank | 544867b4e85da2b40016b6e6d1ae403f991a554d | ad623d0dd21a89c64dc870b3d19332df390c436e | refs/heads/master | 2021-06-27T00:13:04.832916 | 2020-09-26T05:44:24 | 2020-09-26T05:44:24 | 150,328,239 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 408 | py | def person_lister(f):
def inner(people: list):
people.sort(key=lambda x: int(x[2]))
return (f(p) for p in people)
return inner
@person_lister
def name_format(person):
return ("Mr. " if person[3] == "M" else "Ms. ") + person[0] + " " + person[1]
if __name__ == '__main__':
people = [... | [
"Marius.juston@hotmail.fr"
] | Marius.juston@hotmail.fr |
ee343f08234ead3a6d75d6b2c4124b64188600ee | 1a5a9bfa6ee62c328fc6ab828ad743c555b0f23a | /catagory/JianzhiOffer/stage-08/0362-sliding-window-maximum.py | d4b60de378c963f1dbb38c482851fa989e3160f8 | [] | no_license | zzy1120716/my-nine-chapter | 04b3e4d43a0d8086e5c958b81a3dc4356622d65f | c7bf3eed366b91d6bdebb79d0f11680cf7c18344 | refs/heads/master | 2020-03-30T03:07:14.748145 | 2019-05-15T13:07:44 | 2019-05-15T13:07:44 | 150,670,072 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,455 | py | """
362. 滑动窗口的最大值
中文English
给出一个可能包含重复的整数数组,和一个大小为 k 的滑动窗口,
从左到右在数组中滑动这个窗口,找到数组中每个窗口内的最大值。
样例
给出数组 [1,2,7,7,8], 滑动窗口大小为 k = 3. 返回 [7,7,8].
解释:
最开始,窗口的状态如下:
[|1, 2 ,7| ,7 , 8], 最大值为 7;
然后窗口向右移动一位:
[1, |2, 7, 7|, 8], 最大值为 7;
最后窗口再向右移动一位:
[1, 2, |7, 7, 8|], 最大值为 8.
挑战
O(n)时间,O(k)的额外空间
"""
from collections import ... | [
"zzy1120716@126.com"
] | zzy1120716@126.com |
bc0eded4ab8b63a7876ed549115535c50a2aa105 | 383fe2d9b3d2c6adf315ae547226a57f2a8921f1 | /trunk/Communities/content/dc.py | f5b7377a099d5ec3ee705e81e992f2f2d0b52cbe | [] | no_license | BGCX261/zmetadata-svn-to-git | b03602998893dbcfe18581539735d32a17d24da7 | 1270067f91c4c61423042bad15086e2240bcdb4c | refs/heads/master | 2021-03-12T20:10:53.933178 | 2015-08-25T15:21:09 | 2015-08-25T15:21:09 | 41,587,713 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,570 | py | # -*- coding: utf-8 -*-
#
# File: dc.py
#
# Copyright (c) 2009 by []
# Generator: ArchGenXML Version 2.3
# http://plone.org/products/archgenxml
#
# GNU General Public License (GPL)
#
__author__ = """unknown <unknown>"""
__docformat__ = 'plaintext'
from AccessControl import ClassSecurityInfo
from Products.A... | [
"you@example.com"
] | you@example.com |
1444aa825e32179614189c689696bc11a5dd6ef3 | 3b9d763180410bf0abf5b9c37391a64319efe839 | /toontown/coghq/CashbotMintLavaRoomFoyer_Action00.py | d64f18cef53a6cc4ab3181758e21a4c3930593ea | [] | no_license | qphoton/Reverse_Engineering_Project_ToonTown | 442f15d484324be749f6f0e5e4e74fc6436e4e30 | 11468ab449060169191366bc14ff8113ee3beffb | refs/heads/master | 2021-05-08T00:07:09.720166 | 2017-10-21T02:37:22 | 2017-10-21T02:37:22 | 107,617,661 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 7,306 | py | # File: C (Python 2.4)
from toontown.coghq.SpecImports import *
GlobalEntities = {
1000: {
'type': 'levelMgr',
'name': 'LevelMgr',
'comment': '',
'parentEntId': 0,
'cogLevel': 0,
'farPlaneDistance': 1500,
'modelFilename': 'phase_10/models/cashbotHQ... | [
"Infinitywilee@rocketmail.com"
] | Infinitywilee@rocketmail.com |
197fcceffaa5b82ddd7b54391447a2a72d81ed69 | 7bc54bae28eec4b735c05ac7bc40b1a8711bb381 | /src/trainer_v2/custom_loop/demo/demo.py | 20066d8f5c923610ff3b9c75a1dfac1c5d125122 | [] | no_license | clover3/Chair | 755efd4abbd5f3f2fb59e9b1bc6e7bc070b8d05e | a2102ebf826a58efbc479181f1ebb5de21d1e49f | refs/heads/master | 2023-07-20T17:29:42.414170 | 2023-07-18T21:12:46 | 2023-07-18T21:12:46 | 157,024,916 | 0 | 0 | null | 2023-02-16T05:20:37 | 2018-11-10T21:55:29 | Python | UTF-8 | Python | false | false | 2,906 | py | import os
import sys
import numpy as np
from data_generator.tokenizer_wo_tf import get_tokenizer, pretty_tokens
from trainer_v2.custom_loop.modeling_common.tf_helper import distribute_dataset
from trainer_v2.custom_loop.neural_network_def.siamese import ModelConfig200_200
from trainer_v2.custom_loop.train_loop_helper... | [
"lesterny@gmail.com"
] | lesterny@gmail.com |
5e430023a77a7b01f693a1109ec471faaa60eb9c | 084a13b6524e21914826e842eeefefd09570a970 | /experiments/atari_easy/space_invaders/models/dqn_baseline/src/model.py | 4a031ef63acf4fda3d6e37fc7cea3c4ff9e410bb | [
"MIT"
] | permissive | michalnand/reinforcement_learning | 28aa0e2c92b6112cf366eff0e0d6a78b9a56e94f | 01635014a37a4c871766b4cdd2caaa26a0c2d8cc | refs/heads/main | 2023-06-01T10:27:36.601631 | 2023-02-12T19:46:01 | 2023-02-12T19:46:01 | 217,841,101 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,771 | py | import torch
import torch.nn as nn
class NoisyLinear(torch.nn.Module):
def __init__(self, in_features, out_features, sigma = 1.0):
super(NoisyLinear, self).__init__()
self.out_features = out_features
self.in_features = in_features
self.sigma = sigma
s... | [
"michal.nand@gmail.com"
] | michal.nand@gmail.com |
5f3cfb719b58e5c7c05e33d5bb548c5f0a306fa7 | 5168da0fb501135a3c86e4e95679f54a825d69d0 | /openquake/hazardlib/tests/gsim/allen_2012_test.py | 72173ea3d3ef0d060765778b3e310674efae37b0 | [
"AGPL-3.0-only",
"BSD-3-Clause"
] | permissive | GFZ-Centre-for-Early-Warning/shakyground | 266b29c05ea2cfff6d9d61f21b5114282c6fa117 | 0da9ba5a575360081715e8b90c71d4b16c6687c8 | refs/heads/master | 2023-06-01T21:41:11.127323 | 2018-10-09T10:31:48 | 2018-10-09T10:31:48 | 144,732,068 | 1 | 3 | BSD-3-Clause | 2019-11-18T07:58:49 | 2018-08-14T14:32:50 | Python | UTF-8 | Python | false | false | 1,264 | py | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2013-2018 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the Licen... | [
"mhaas@gfz-potsdam.de"
] | mhaas@gfz-potsdam.de |
2d9bba4e31f58ea55ec61a6c6c7285e3cf7e8ec9 | 868cd4895a8da17a7e3e2c8da0ec9e139f8d0c30 | /model/sample/fashion/keras_fashion_save.py | db5946f50bb4623f6d9dbc90553ff5c81a33419f | [] | no_license | inJAJA/Study | 35d4e410df7b476a4c298664bb99ce9b09bf6296 | c2fd9a1e1f3a31cb3737cbb4891d848cc802f1d4 | refs/heads/master | 2022-12-21T11:41:15.396610 | 2020-09-20T23:51:45 | 2020-09-20T23:51:45 | 263,212,524 | 3 | 3 | null | null | null | null | UTF-8 | Python | false | false | 2,958 | py | # 과제 2
# Sequential형으로 완성하시오.
# 하단에 주석으로 acc와 loss결과 명시하시오
import numpy as np
import matplotlib.pyplot as plt
from keras.models import Sequential
from keras.layers import Dense, Conv2D, MaxPooling2D, Flatten, Dropout
from keras.utils.np_utils import to_categorical
#1. data
from keras.datasets import fashion_mnist
(x_... | [
"zaiin4050@gmail.com"
] | zaiin4050@gmail.com |
610c90abeea73d06318c9768d6a3ccd4ee7ca167 | e0980f704a573894350e285f66f4cf390837238e | /.history/streams/blocks_20201029154124.py | 144d082f653b6fb9010adafaf907c6ceb91d68c2 | [] | no_license | rucpata/WagtailWebsite | 28008474ec779d12ef43bceb61827168274a8b61 | 5aa44f51592f49c9a708fc5515ad877c6a29dfd9 | refs/heads/main | 2023-02-09T15:30:02.133415 | 2021-01-05T14:55:45 | 2021-01-05T14:55:45 | 303,961,094 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,711 | py | from django import forms
from wagtail.core import blocks
from wagtail.images.blocks import ImageChooserBlock
from wagtail.contrib.table_block.blocks import TableBlock
class TitleBlock(blocks.StructBlock):
text = blocks.CharBlock(
required = True,
elp_text='Tekst do wyświetlenia',
)
class ... | [
"rucinska.patrycja@gmail.com"
] | rucinska.patrycja@gmail.com |
485bef81f64f6243691a9ec5a7e5c712d0c9c91b | bcaaf8535f639be14558216fb45cab6b4635895b | /list/020 Majority Element Efficient.py | 135fa26b6bac2c4e9bf494cf366e22bffaa22a8e | [] | no_license | RavinderSinghPB/Data-Structure-And-Algorithm-Python | 7f3b61216318e58eb58881d5181561d8e06b092b | 12a126803f4c6bee0e6dbd380604f703cf678de4 | refs/heads/main | 2023-01-25T03:47:16.264926 | 2020-12-02T04:45:02 | 2020-12-02T04:45:02 | 316,112,953 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 546 | py | def findMajority(arr, n):
res = 0
count = 1
for i in range(1, n):
if arr[res] == arr[i]:
count += 1
else:
count -= 1
if count == 0:
res = i
count = 1
count = 0
for i in range(0, n):
if arr[res] == arr[i]:
... | [
"ravindersingh.gfg@gmail.com"
] | ravindersingh.gfg@gmail.com |
187a0a5b1b63e6fb5ecdf4a16d709fada04e53b2 | f9d564f1aa83eca45872dab7fbaa26dd48210d08 | /huaweicloud-sdk-dataartsstudio/huaweicloudsdkdataartsstudio/v1/model/create_workspace_params.py | 69a6d3bae31e48ef092dcf6aae5927f4f94f6316 | [
"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 | 6,989 | py | # coding: utf-8
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class CreateWorkspaceParams:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attrib... | [
"hwcloudsdk@huawei.com"
] | hwcloudsdk@huawei.com |
5a55cace1700df5eeea3d479465e72d438fb341c | 2cd86616a2d29b2a19ddb906c5216ed7a48d2208 | /biobb_vs/gromacs_wrapper/genion.py | 83452c81f210fea238442bc7e2bbbfc922723b74 | [
"Apache-2.0"
] | permissive | bioexcel/biobb_vs_alpha | e0c8ab1bad864bd3a87cafa1ee7f6eddc50ee3ae | 5a7403bad0935ee4380c377d930bd24967770501 | refs/heads/master | 2021-09-26T00:24:15.473393 | 2018-10-26T12:57:16 | 2018-10-26T12:57:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,457 | py | #!/usr/bin/env python
"""Python wrapper for the GROMACS genion module
"""
import sys
import json
import configuration.settings as settings
from command_wrapper import cmd_wrapper
from tools import file_utils as fu
class Genion(object):
"""Wrapper for the 5.1.2 version of the genion module
Args:
input_... | [
"andriopau@gmail.com"
] | andriopau@gmail.com |
f78acc475c7f7428db7e6c915fe5f87224ca1fd2 | 1e177ebdcb470f738c058606ac0f86a36085f661 | /Python/AdafruitIO/PublishMQTT.py | 4768892f13f10590fc92c6a35aa4d873ecebd641 | [] | no_license | robingreig/raspi-git | 5cbdd295c1048a0571aa2c2f8576438269439f07 | 7373bf94557d7a88c8f343362ba64f9cd19c8ce7 | refs/heads/master | 2023-08-31T03:16:17.286700 | 2023-08-26T11:54:23 | 2023-08-26T11:54:23 | 16,873,881 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 232 | py | #!/usr/bin/python
import paho.mqtt.publish as publish
import time
print("Sending 0...")
publish.single("ledStatus", "0", hostname="raspi13")
time.sleep(1)
print("Sending 1...")
publish.single("ledStatus", "1", hostname="raspi13")
| [
"robin.greig@calalta.com"
] | robin.greig@calalta.com |
7b709a119701579dbcb5028cb79c513adfa97765 | f1fcd165cd8444310ce5d201e481e3982dc28110 | /easy/1901/190114/jang.py | bdbf8e0098b135c5249f6bb41fd103aac1ca0c6f | [] | no_license | JoosJuliet/algoStudy | 310a71a0fcc8f3c23281544cf3458ed999040176 | 3fc1e850f9d8b9f290f41fddd59ff403fbfffa05 | refs/heads/master | 2020-04-20T19:26:25.485875 | 2019-03-27T22:37:27 | 2019-03-27T22:37:27 | 169,049,593 | 1 | 0 | null | 2019-02-04T08:43:07 | 2019-02-04T08:43:07 | null | UTF-8 | Python | false | false | 264 | py | d, m, y = map(int, input().split())
d2, m2, y2 = map(int, input().split())
fine = 0
if y - y2 > 0:
fine += (y-y2)*10000
elif y - y2 == 0 and m - m2 > 0:
fine += (m-m2)*500
elif y - y2 == 0 and m - m2 == 0 and d - d2 > 0:
fine += (d-d2)*15
print(fine) | [
"wkdtjsgur100@naver.com"
] | wkdtjsgur100@naver.com |
8a974657debbb33dd868b65d2757c458567a3ffd | b0a162b1db3004b30cd735500971edea39e775ed | /wave1/Labs/Lab1of2.2.py | eec6582f29a7c4c13c1223c12938dc4853b6c6c6 | [] | no_license | geofferyj/WEJAPA_INTERNSHIP | 40da98c335affbbaf74d018d8a2f38fb30183f10 | 92a101d0280e0f732dc3cfd8727e436de86cdb62 | refs/heads/master | 2022-12-08T04:40:18.627904 | 2020-08-16T07:39:51 | 2020-08-16T07:39:51 | 286,264,965 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 951 | py | #Quiz: Assign and Modify Variables
#Now it's your turn to work with variables. The comments in this quiz (the lines that begin with #) have instructions for creating and modifying variables. After each comment write a line of code that implements the instruction.
#Note that this code uses scientific notation to define... | [
"geofferyjoseph1@gmail.com"
] | geofferyjoseph1@gmail.com |
45f625839b142e095671acdb09a4ea53a6a605a6 | 92a0977e694e49ca70adbcaaa0fd6a66576f85e6 | /blog/migrations/0001_initial.py | d46ac7e7b66d02b5a4f68a2609c3a3a894175958 | [] | no_license | Melody1992/my-first-blog | 9ca6cbf8f47257b1d7d12af98d8797cb3d3f2972 | 40e44bcc48883626e6ecc34417ded1aa7de12d08 | refs/heads/master | 2021-01-20T12:16:45.719637 | 2017-08-29T10:00:44 | 2017-08-29T10:00:44 | 101,709,681 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,051 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-08-29 09:13
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
depe... | [
"you@example.com"
] | you@example.com |
195d63b02681ad0d2d5fb06c1b8351574c2a7ff4 | 59f8e783abe9949cf9e9aef5936d2349f7df7414 | /methyl/ma_analysis/epigenotyping-old/decodingpath.py | 026184ea4b5bc9b8fb3a55161e1cddb4b2520f1d | [] | no_license | bhofmei/analysis-scripts | c4d8eafde2834b542c71c305e66c4e6f8a6e2c57 | 189bf355f0f878c5603b09a06b3b50b61a11ad93 | refs/heads/master | 2021-01-17T17:26:30.799097 | 2019-10-27T12:49:10 | 2019-10-27T12:49:10 | 56,076,808 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,397 | py | ### Decoding types ###
import pandas as pd
import numpy as np
import math
class DecodePath:
''' Base class for decoding types
'''
def __init__( self, df, transMat ):
# n bins, m states
self.labels = np.array( ['mother', 'MPV', 'father'] )
self.data = df # n x m
self.transitions = transMat # fraction probs n... | [
"bhofmei@gmail.com"
] | bhofmei@gmail.com |
1b371ce2d76c8b9c0dafca699c63800a51a7d093 | 4d4fcde3efaa334f7aa56beabd2aa26fbcc43650 | /server/src/uds/migrations/0037_service_token.py | 95647ca5e24fc6567d3090492d73e90580495ee2 | [] | no_license | xezpeleta/openuds | a8b11cb34eb0ef7bb2da80f67586a81b2de229ef | 840a7a02bd7c9894e8863a8a50874cdfdbf30fcd | refs/heads/master | 2023-08-21T17:55:48.914631 | 2021-10-06T10:39:06 | 2021-10-06T10:39:06 | 414,489,331 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 430 | py | # Generated by Django 3.0.3 on 2020-02-08 18:37
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('uds', '0036_auto_20200131_1224'),
]
operations = [
migrations.AddField(
model_name='service',
name='token',
... | [
"dkmaster@dkmon.com"
] | dkmaster@dkmon.com |
f2bdcb2ebe82957a5b18e994bc9df717a42e7ea2 | 99a4d88d2004bad1e9e79f92c33a9ab1eb5644c4 | /Solution/BOJ/11286 절댓값 힙.py | 94741ae799a6f6a4b3acd56a64aeef4332d76e6b | [] | no_license | ginger-kang/Problem-Solving | cb64a4f6a0275419fe7be67fb50a9eb48e4b5869 | 1fc074d39a47a416d990e6e3b95a6c9f62a838f7 | refs/heads/master | 2023-08-14T13:54:00.706663 | 2021-09-10T11:39:16 | 2021-09-10T11:39:16 | 255,123,394 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 278 | py | import heapq
import sys
input = sys.stdin.readline
N = int(input())
q = []
for _ in range(N):
x = int(input())
if x != 0:
heapq.heappush(q, (abs(x), x))
else:
if not len(q):
print(0)
else:
print(heapq.heappop(q)[1])
| [
"kdhoon07@gmail.com"
] | kdhoon07@gmail.com |
4eda55367dffe239294e5f2e103ff3db01021f09 | 30fe7671b60825a909428a30e3793bdf16eaaf29 | /.metadata/.plugins/org.eclipse.core.resources/.history/18/e08b59a165fa00161174a93fd5908e78 | 4f3868130d32db869552206dcc0d483e87aa16e2 | [] | no_license | abigdream84/PythonStudy | 0fc7a3b6b4a03a293b850d0ed12d5472483c4fb1 | 059274d3ba6f34b62ff111cda3fb263bd6ca8bcb | refs/heads/master | 2021-01-13T04:42:04.306730 | 2017-03-03T14:54:16 | 2017-03-03T14:54:16 | 79,123,274 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,174 | #!/usr/bin/env python
#coding:UTF-8
from audit_demo.utility.MySqlHelper import MySqlHelper
class s_g_u_relation(object):
def __init__(self):
self.__helper = MySqlHelper()
def get_uid(self,username):
sql = 'select u_id from u_table where u_name = %s'
try:
u_id = self._... | [
"abigdream@hotmail.com"
] | abigdream@hotmail.com | |
47f6bad4ec08b075bab3d5983b0dee9335efe10b | ab11444273824fb46eac78d7f3dd532ae65e3bf3 | /doc/conf.py | 7d97517b8acb380b0f9be389abd16b9fa6517b2e | [
"MIT"
] | permissive | firasm/sphinx-comments | 30f2d262a723ca11e7e53f153506ee926d52e3b1 | 25db7a450af426fd898c4b1f8c656c786f37ca8c | refs/heads/master | 2022-12-01T21:40:05.283906 | 2020-08-10T17:00:26 | 2020-08-10T17:00:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,365 | py | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | [
"choldgraf@berkeley.edu"
] | choldgraf@berkeley.edu |
b654052281e54dfedd953387d9a22ef9cbba28f0 | a2b598d8e89c1755f683d6b6fe35c3f1ef3e2cf6 | /past_archive/swexpert/3499(perfectShuffle).py | d2712767eb99f3281392018895df8ae2b11d6d43 | [
"MIT"
] | permissive | DongHyunByun/algorithm_practice | cbe82606eaa7f372d9c0b54679bdae863aab0099 | dcd595e6962c86f90f29e1d68f3ccc9bc673d837 | refs/heads/master | 2022-09-24T22:47:01.556157 | 2022-09-11T07:36:42 | 2022-09-11T07:36:42 | 231,518,518 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 398 | py | for t in range(int(input())):
N=int(input())
L=input().split()
print(f"#{t+1}",end="")
if N%2==0:
k=int(N/2)
for i in range(k):
print("",L[i],end="")
print("",L[i+k],end="")
print("")
else:
K=int(N/2)
for i in range(K):
prin... | [
"ngoodsamari@naver.com"
] | ngoodsamari@naver.com |
6d5e2b8faed3400b9be9ec71c62c78e65f70c8c5 | 9b36652dafb58888b7a584806ee69a33fcb609d5 | /objutils/tests/testTek.py | d26b7c1df514a10fceac180155a4ecf70ca605da | [] | no_license | pySART/objutils | db33e4576cf68111cb4debbafec06a0204844938 | 5ba4631b2245caae80d4dbe0053db0f2706ba53f | refs/heads/master | 2020-06-29T03:35:24.485977 | 2016-11-21T14:21:56 | 2016-11-21T14:21:56 | 74,451,500 | 5 | 2 | null | 2016-11-22T08:36:10 | 2016-11-22T08:36:10 | null | UTF-8 | Python | false | false | 961 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from objutils import loads, dumps
from objutils.section import Section
from objutils.image import Image, Builder
import unittest
TEK = b"""/B000100C576F77212044696420796F7520726561A5
/B010100D6C6C7920676F207468726F7567682061C1
/B020100E6C6C20746861742074726F75626C6520AF
... | [
"cpu12.gems@googlemail.com"
] | cpu12.gems@googlemail.com |
10b2e78bdd20211096522dfd8c9647defebbde56 | 78cb6dadc7599e01b078682b175f21be673ed199 | /438. Find All Anagrams in a String.py | 6cc8986e066d54440059175d3e147ddeb642285b | [] | no_license | AlexWufan/leetcode-python | 5cf5f13dbc7d1e425fde646df618e50c488fa79f | 435323a9fcea6a4d09266785e88fb78735e0cc3e | refs/heads/master | 2021-01-13T00:49:49.870468 | 2018-04-13T18:44:19 | 2018-04-13T18:44:19 | 51,347,271 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 892 | py | class Solution(object):
def findAnagrams(self, s, p):
"""
:type s: str
:type p: str
:rtype: List[int]
"""
output = []
d= {}
pdic = {}
if len(s) < len(p): return output
window = s[0:len(p)]
window = list(window)
for x in ... | [
"mengnanszw@gmail.com"
] | mengnanszw@gmail.com |
6331faf2779685d448c3fd00e25cd3fe87609f67 | 2173909e5a0a87d72f86f2805e602c1d73e07568 | /w3af-repo/w3af/core/controllers/misc/number_generator.py | ed8d1c1c56f485f8ad42374fc8ff73a1121aadf2 | [] | no_license | ZenSecurity/w3af-module | 78d603ed076f879b8bd280c0bf3382d153aaacec | 13967bffaa211fe7f793204796802f1a5967f1d7 | refs/heads/master | 2021-01-15T13:48:24.183830 | 2016-08-05T13:09:49 | 2016-08-05T13:09:49 | 40,010,219 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,518 | py | """
number_generator.py
Copyright 2009 Andres Riancho
This file is part of w3af, http://w3af.org/ .
w3af is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation version 2 of the License.
w3af is distributed in the hope... | [
"andres.riancho@gmail.com"
] | andres.riancho@gmail.com |
33e9c5a127191634c357502c02ba4bb43a209411 | e4616ae545872442f24b35e46d76d351edab22b0 | /test/sql/test_select.py | 4c00cb53c790e5d8c3c31a9b4e420e04e1325ebc | [
"MIT"
] | permissive | StefanosChaliasos/sqlalchemy | 0915d5fb66420eaf5dbb3468ed4a2c283f8802c0 | 8c228be322023041b11691d93dafa1be090f01a0 | refs/heads/master | 2022-12-05T02:43:43.684766 | 2020-08-26T13:12:24 | 2020-08-26T13:12:24 | 290,499,121 | 0 | 1 | MIT | 2020-08-26T13:08:17 | 2020-08-26T13:08:17 | null | UTF-8 | Python | false | false | 7,070 | py | from sqlalchemy import Column
from sqlalchemy import exc
from sqlalchemy import ForeignKey
from sqlalchemy import Integer
from sqlalchemy import MetaData
from sqlalchemy import select
from sqlalchemy import String
from sqlalchemy import Table
from sqlalchemy import tuple_
from sqlalchemy.sql import column
from sqlalche... | [
"mike_mp@zzzcomputing.com"
] | mike_mp@zzzcomputing.com |
9509c638c0f00031012f7d8b3195c967ca88f329 | 2a2ce1246252ef6f59e84dfea3888c5a98503eb8 | /examples/introduction.to.programming.with.turtle/for_all/3-4-4.flower.py | 917b9cc24fd5d2ca8f82570037dad0dd7ee82e1b | [
"BSD-3-Clause"
] | permissive | royqh1979/PyEasyGraphics | c7f57c1fb5a829287e9c462418998dcc0463a772 | 842121e461be3273f845866cf1aa40c312112af3 | refs/heads/master | 2021-06-11T10:34:03.001842 | 2021-04-04T10:47:52 | 2021-04-04T10:47:52 | 161,438,503 | 8 | 4 | BSD-3-Clause | 2021-04-04T10:47:53 | 2018-12-12T05:43:31 | Python | UTF-8 | Python | false | false | 337 | py | from easygraphics.turtle import *
def main():
create_world(800, 600)
set_speed(400)
for i in range(6):
for j in range(60):
fd(3)
rt(1)
rt(120)
for j in range(60):
fd(3)
rt(1)
rt(120)
rt(60)
pause()
close_world(... | [
"royqh1979@gmail.com"
] | royqh1979@gmail.com |
4f676bf12515b70baea4496e48da040e19db6938 | 0dca74ba205f42b38c1d1a474350e57ff78352b4 | /Geometry/HGCalGeometry/test/python/testHGCalNeighbor_cfg.py | 2fa941f4241557585e83e0bb0e699de4e83df2f8 | [
"Apache-2.0"
] | permissive | jaimeleonh/cmssw | 7fd567997a244934d6c78e9087cb2843330ebe09 | b26fdc373052d67c64a1b5635399ec14525f66e8 | refs/heads/AM_106X_dev | 2023-04-06T14:42:57.263616 | 2019-08-09T09:08:29 | 2019-08-09T09:08:29 | 181,003,620 | 1 | 0 | Apache-2.0 | 2019-04-12T12:28:16 | 2019-04-12T12:28:15 | null | UTF-8 | Python | false | false | 1,732 | py | import FWCore.ParameterSet.Config as cms
from Configuration.StandardSequences.Eras import eras
process = cms.Process("PROD",eras.Phase2C4)
process.load("SimGeneral.HepPDTESSource.pdt_cfi")
process.load("Configuration.Geometry.GeometryExtended2023D28Reco_cff")
process.load('Configuration.StandardSequences.MagneticFiel... | [
"sunanda.banerjee@cern.ch"
] | sunanda.banerjee@cern.ch |
11ae87bb61dbbdaf88257bb33a9cffad4e4b2702 | a38180435ac5786185c0aa48891c0aed0ab9d72b | /S4/S4 Decompiler/decompyle3/parsers/reducecheck/not_or_check.py | 91f0417f69f9a07e915508dd197ca8319a38c9a4 | [
"CC-BY-4.0"
] | permissive | NeonOcean/Environment | e190b6b09dd5dbecba0a38c497c01f84c6f9dc7d | ca658cf66e8fd6866c22a4a0136d415705b36d26 | refs/heads/master | 2022-12-03T13:17:00.100440 | 2021-01-09T23:26:55 | 2021-01-09T23:26:55 | 178,096,522 | 1 | 1 | CC-BY-4.0 | 2022-11-22T20:24:59 | 2019-03-28T00:38:17 | Python | UTF-8 | Python | false | false | 1,598 | py | # Copyright (c) 2020 Rocky Bernstein
def not_or_check(
self, lhs: str, n: int, rule, ast, tokens: list, first: int, last: int
) -> bool:
# Note (exp1 and exp2) and (not exp1 or exp2) are close, especially in
# an control structure like an "if".
# "exp1 and exp2":
# exp1; POP_JUMP_IF_FALSE endi... | [
"40919586+NeonOcean@users.noreply.github.com"
] | 40919586+NeonOcean@users.noreply.github.com |
0350c795fa887e71cffc61e9518bb61ec12bd3d0 | 4b41a76c5c366ba2daa30843acea16609b8f5da7 | /2017/21/AoC17_21_1.py | 74d5bfb689ee820e1ec5834706e68b017c97dce6 | [] | no_license | grandfoosier/AdventOfCode | c4706cfefef61e80060cca89b0433636e42bf974 | a43fdd72fe4279196252f24a4894500a4e272a5d | refs/heads/master | 2020-06-11T12:36:48.699811 | 2019-01-14T23:44:44 | 2019-01-14T23:44:44 | 75,665,958 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,995 | py | class Art(object):
def __init__(self):
fname = "AoC17_21_1.txt"
self.rules = [line.rstrip("\n").split() for line in open(fname)]
self.lkup = [i[0] for i in self.rules]
self.grid = ['.#.','..#','###']
def _twfh(self, s):
return (s[1] + s[0] + '/' + # 01 -> 10
... | [
"noreply@github.com"
] | grandfoosier.noreply@github.com |
fad51eb5f3e5f98fc3c8c6f2df4c0bf604c80a66 | e0ef688e339e6f4a68382d821d159185e4297628 | /rhodopsin/experiment_base.py | bcbc827fdccc8fee442bc7d768722f86188783e1 | [
"MIT"
] | permissive | djpetti/rhodopsin | bc11befcc5e90e29705d74ab59e1405586df998b | 97bdb9a6ba3c29b1fe1dd1e60b0b41e5a247ccf1 | refs/heads/master | 2021-07-01T08:00:21.414567 | 2019-05-18T21:39:36 | 2019-05-18T21:39:36 | 147,679,754 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,528 | py | import abc
import os
import signal
from . import menu
from . import params
class ExperimentBase(abc.ABC):
""" Base class for experiments that defines the API. """
def __init__(self, save_file="experiment.rhp", hyperparams=None,
status=None):
"""
Args:
save_file: Fi... | [
"djpetti@gmail.com"
] | djpetti@gmail.com |
507c7a2c804bb7e49d3d43b11b73884c2d80ed71 | 82b946da326148a3c1c1f687f96c0da165bb2c15 | /sdk/python/pulumi_azure_native/network/v20180401/traffic_manager_user_metrics_key.py | 6a8b7be397ddbe4a0f2f1fb0d12eca8f2972edca | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | morrell/pulumi-azure-native | 3916e978382366607f3df0a669f24cb16293ff5e | cd3ba4b9cb08c5e1df7674c1c71695b80e443f08 | refs/heads/master | 2023-06-20T19:37:05.414924 | 2021-07-19T20:57:53 | 2021-07-19T20:57:53 | 387,815,163 | 0 | 0 | Apache-2.0 | 2021-07-20T14:18:29 | 2021-07-20T14:18:28 | null | UTF-8 | Python | false | false | 5,274 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__... | [
"noreply@github.com"
] | morrell.noreply@github.com |
ae4858ddf9b7ff0bb77dffc2a48b39cb7643782b | 0b01cb61a4ae4ae236a354cbfa23064e9057e434 | /alipay/aop/api/domain/KoubeiQualityTestCloudacptItemQueryModel.py | bbc02ad96b03b678a8fa106974b1af53977ddacb | [
"Apache-2.0"
] | permissive | hipacloud/alipay-sdk-python-all | e4aec2869bf1ea6f7c6fb97ac7cc724be44ecd13 | bdbffbc6d5c7a0a3dd9db69c99443f98aecf907d | refs/heads/master | 2022-11-14T11:12:24.441822 | 2020-07-14T03:12:15 | 2020-07-14T03:12:15 | 277,970,730 | 0 | 0 | Apache-2.0 | 2020-07-08T02:33:15 | 2020-07-08T02:33:14 | null | UTF-8 | Python | false | false | 2,209 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class KoubeiQualityTestCloudacptItemQueryModel(object):
def __init__(self):
self._activity_id = None
self._batch_id = None
self._pid = None
self._uid = None
@proper... | [
"liuqun.lq@alibaba-inc.com"
] | liuqun.lq@alibaba-inc.com |
2aa1abfe9c766dd05c3b82d22bb3d5e20a3d7ec2 | 039c2e60b859d88bb686c0e66bc6dab2ab723b8e | /apps/door_limits/migrations/0003_auto_20191024_1554.py | ec0156b7c63c8b53f585a6b765b18fe2dccfcca7 | [] | no_license | ccc-0/ECS | 850613971e4c6fd9cbb6ddcbe2c51b5285d622ac | ef4d69cb4c6fd1b1bbd40ba9c754c8e50c56d8ee | refs/heads/master | 2020-09-13T21:50:42.033517 | 2020-02-13T03:47:10 | 2020-02-13T03:47:10 | 222,913,137 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 437 | py | # Generated by Django 2.2.6 on 2019-10-24 15:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('door_limits', '0002_door_approval_user_id'),
]
operations = [
migrations.AlterField(
model_name='door_approval',
nam... | [
"1056179315@qq.com"
] | 1056179315@qq.com |
99917f155da4e2422ceaad95199050b2dcce42ba | 2052a12f0ab7a827d6427b5533b6ae29847dcc3b | /auto_commit.py | 62ed14d9722982e710ac10eb7f581bae2986a7e1 | [
"MIT"
] | permissive | cleiveliu/leetcodecn | 7db7af4da18e62bd592afc9f81dfa4aab46adced | 618a4b63a9cd055f1782903e860e9a93dfd30fc9 | refs/heads/master | 2020-08-28T23:44:10.102451 | 2020-07-19T15:26:45 | 2020-07-19T15:26:45 | 217,856,119 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,636 | py | """
auto commit git and push to master with a git path and a optional commit message.
usage:
put this file in your git project dir and run it or \
script.py [-p|-pathname] filename [-m|-message] message
"""
import sys
import os
class Args:
def __init__(
self, pathname=os.path.dirname(__file__), commi... | [
"cleiveliu1@gmail.com"
] | cleiveliu1@gmail.com |
7c7528acff2e58560608a00d39c207443eb6d648 | be37e5a350ef9cd4e1742c321cde206434593c27 | /test/integration/query_block.py | ecbfe177a112065b729795a188b1eb0c09390e2d | [
"Apache-2.0",
"CC-BY-4.0"
] | permissive | points-org/fabric-sdk-py | 9b8e763dc9e3e8e3710fb35fedd2e44ddc682126 | d689032772873027938599b8e54a676bf083be1f | refs/heads/master | 2021-07-01T15:13:11.688343 | 2020-09-08T11:28:05 | 2020-09-14T03:53:33 | 162,869,379 | 0 | 0 | Apache-2.0 | 2019-08-14T06:12:00 | 2018-12-23T06:58:31 | Python | UTF-8 | Python | false | false | 4,789 | py | # Copyright IBM ALL Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
import logging
from time import sleep
from hfc.fabric.peer import create_peer
from hfc.fabric.transaction.tx_context import create_tx_context
from hfc.fabric.transaction.tx_proposal_request import create_tx_prop_req, \
CC_INVOKE, CC_TYPE... | [
"dixingxu@gmail.com"
] | dixingxu@gmail.com |
e882965dc976548eb945b75960f6b5fca4d2bc1f | 7769cb512623c8d3ba96c68556b2cea5547df5fd | /configs/carafe/faster_rcnn_r50_fpn_carafe_1x.py | 94c8a0fc1a56bc1a6601421de7e9a46df277b5d6 | [
"MIT"
] | permissive | JialeCao001/D2Det | 0e49f4c76e539d574e46b02f278242ca912c31ea | a76781ab624a1304f9c15679852a73b4b6770950 | refs/heads/master | 2022-12-05T01:00:08.498629 | 2020-09-04T11:33:26 | 2020-09-04T11:33:26 | 270,723,372 | 312 | 88 | MIT | 2020-07-08T23:53:23 | 2020-06-08T15:37:35 | Python | UTF-8 | Python | false | false | 5,751 | py | # model settings
model = dict(
type='FasterRCNN',
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
style='pytorch'),
neck=dict(
type='FPN_CARAFE',
in_chann... | [
"connor@tju.edu.cn"
] | connor@tju.edu.cn |
051cdb1c37fae845be8313b348917477fe0c38b2 | 54f352a242a8ad6ff5516703e91da61e08d9a9e6 | /Source Codes/AtCoder/arc026/A/4781959.py | 05338ad4307124120e6d44e3642dc59bfc7ff9e1 | [] | no_license | Kawser-nerd/CLCDSA | 5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb | aee32551795763b54acb26856ab239370cac4e75 | refs/heads/master | 2022-02-09T11:08:56.588303 | 2022-01-26T18:53:40 | 2022-01-26T18:53:40 | 211,783,197 | 23 | 9 | null | null | null | null | UTF-8 | Python | false | false | 138 | py | def main():
n, a, b = map(int, input().split())
nb = min(n, 5)
na = n - nb
r = b * nb + a * na
print(r)
main() | [
"kwnafi@yahoo.com"
] | kwnafi@yahoo.com |
a4b2b2d69ee2f1995a73f520d25aa4cd34320ae2 | 3db2fcd1a34ae7b22225029587369f49424457dd | /classifier_alignment/AnnotationLoader.py | ce50dc114c4bb171a9b8ded4eeaff6235048fe87 | [] | no_license | pombredanne/realigner | 7f0fdfdf42f757fead45cdeb5ea2901c4965e944 | b0c32cace20dd720c7609f009d86846d9ecb750f | refs/heads/master | 2021-01-18T03:57:30.977009 | 2014-05-06T09:35:46 | 2014-05-06T09:35:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,277 | py | import re
__author__ = 'michal'
from hmm.HMMLoader import HMMLoader
import track
from tools.intervalmap import intervalmap
from classifier_alignment.AnnotationConfig import register as register_annotations
import constants
class AnnotationLoader:
def __init__(self, sequence_regexp, loader=None):
if load... | [
"mhozza@gmail.com"
] | mhozza@gmail.com |
dad547f66f869ac30955e1734c0fdf2097890e2c | bd2a3d466869e0f8cb72075db7daec6c09bbbda1 | /sdk/network/azure-mgmt-network/azure/mgmt/network/_operations_mixin.py | 264c78dbcd0d5ffb95a36599de146d425e3d3237 | [
"MIT"
] | permissive | samvaity/azure-sdk-for-python | 7e8dcb2d3602d81e04c95e28306d3e2e7d33b03d | f2b072688d3dc688fed3905c558cff1fa0849b91 | refs/heads/master | 2021-08-11T21:14:29.433269 | 2019-07-19T17:40:10 | 2019-07-19T17:40:10 | 179,733,339 | 0 | 1 | MIT | 2019-04-05T18:17:43 | 2019-04-05T18:17:42 | null | UTF-8 | Python | false | false | 7,825 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | [
"noreply@github.com"
] | samvaity.noreply@github.com |
c8d9acb81ae074a09b5bba7f60d7cb919bfd6a0b | 5c099927aedc6fdbc515f40ff543c65b3bf4ec67 | /algorithms/path-sum-iii/src/Solution.py | ad4282344a76d00167c30841afc494b03849c924 | [] | no_license | bingzhong-project/leetcode | 7a99cb6af1adfbd9bb1996a7f66a65679053c478 | ba82e7d94840b3fec272e4c5f82e3a2cfe4b0505 | refs/heads/master | 2020-04-15T09:27:33.979519 | 2020-03-10T03:43:07 | 2020-03-10T03:43:07 | 164,550,933 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,052 | py | # Definition for a binary tree node.
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def pathSum(self, root: 'TreeNode', sum: 'int') -> 'int':
def func(node, res):
if node.val == sum:
res[0] += 1... | [
"zhongyongbin@foxmail.com"
] | zhongyongbin@foxmail.com |
b2456060afc71d8ae1bafe6a039a40981cd94970 | b8ddb0028579ba735bfde8de5e615884e05b012f | /jamaica/v1/lists/serializers.py | 8cf34ebb1a3a5f0804777c537e6d465b456aaf4d | [] | no_license | cohoe/jamaica | f4636eacd6a900de769641e3c3f60fe197be1999 | 0bf053e7b6db291b5aeb53fbd6f7f45082c9df9b | refs/heads/master | 2021-08-10T08:10:36.803415 | 2021-07-18T16:49:45 | 2021-07-18T16:49:45 | 235,926,691 | 2 | 0 | null | 2021-03-13T02:23:06 | 2020-01-24T02:24:22 | Python | UTF-8 | Python | false | false | 1,059 | py | from flask_restx import fields
from jamaica.v1.restx import api
from jamaica.v1.serializers import SearchResultBase
ListItemObject = api.model('ListItemObject', {
'cocktail_slug': fields.String(attribute='cocktail_slug', description='Slug of the cocktail.'),
'spec_slug': fields.String(attribute='spec_slug', d... | [
"grant@grantcohoe.com"
] | grant@grantcohoe.com |
a4d310d2b5b8002735888fb0537e58489cea744e | 99094cc79bdbb69bb24516e473f17b385847cb3a | /33.Search in Rotated Sorted Array/Solution.py | ca44fc1c7fe4e25beda59fa0010124fad406e966 | [] | no_license | simonxu14/LeetCode_Simon | 7d389bbfafd3906876a3f796195bb14db3a1aeb3 | 13f4595374f30b482c4da76e466037516ca3a420 | refs/heads/master | 2020-04-06T03:33:25.846686 | 2016-09-10T00:23:11 | 2016-09-10T00:23:11 | 40,810,940 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 680 | py | __author__ = 'Simon'
class Solution(object):
def search(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: int
"""
l = 0
r = len(nums) - 1
while l <= r:
mid = (r + l)/2
if nums[mid] == target:
... | [
"simonxu14@gmail.com"
] | simonxu14@gmail.com |
77c6ff64d70bf43e677e3a109dec9871b6a399d4 | 0bde5f7f09aa537ed1f4828d4e5ebee66475918f | /h2o-bindings/bin/custom/R/gen_svd.py | 29b777c6fd2ccee93d258de42738e4edb898a7cc | [
"Apache-2.0"
] | permissive | Winfredemalx54/h2o-3 | d69f1c07e1f5d2540cb0ce5e6073415fa0780d32 | dfb163c82ff3bfa6f88cdf02465a9bb4c8189cb7 | refs/heads/master | 2022-12-14T08:59:04.109986 | 2020-09-23T08:36:59 | 2020-09-23T08:36:59 | 297,947,978 | 2 | 0 | Apache-2.0 | 2020-09-23T11:28:54 | 2020-09-23T11:28:54 | null | UTF-8 | Python | false | false | 1,431 | py | rest_api_version = 99
extensions = dict(
required_params=['training_frame', 'x', 'destination_key'],
validate_required_params="",
set_required_params="""
parms$training_frame <- training_frame
if(!missing(x))
parms$ignored_columns <- .verify_datacols(training_frame, x)$cols_ignore
if(!missing(destination... | [
"noreply@github.com"
] | Winfredemalx54.noreply@github.com |
ab940f2287f99c5c3edf5a43baede27081603152 | e13f6678fb1be916f4746d8663edfbd841531f7e | /ebc/pauta/interfaces/servico.py | e23c1b36241754dee8b39345394ee8fba1e7813b | [
"Unlicense"
] | permissive | lflrocha/ebc.pauta | 67cf41ad0c751c70a53f609204f913c441de0ab3 | 1a77e9f47e22b60af88cf23f492a8b47ddfd27b6 | refs/heads/master | 2021-01-10T08:38:43.924935 | 2015-05-30T19:24:00 | 2015-05-30T19:24:00 | 36,572,062 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 302 | py | from zope import schema
from zope.interface import Interface
from zope.app.container.constraints import contains
from zope.app.container.constraints import containers
from ebc.pauta import pautaMessageFactory as _
class IServico(Interface):
""""""
# -*- schema definition goes here -*-
| [
"lflrocha@gmail.com"
] | lflrocha@gmail.com |
802ec2a72d6779bc336c31b7a68a721565858c5a | 7a39aed5ceff9070864afea30d3369ec70da093d | /tests/conftest.py | e1e05dcb51c92af9c1b689352a91423da84af5bb | [
"BSD-3-Clause"
] | permissive | Omulosi/reader | a0f3fc2c787481c14254edd7bfcd81f715f51a5d | 12759bb9441846eb5fce618137a6e70e2ec3c286 | refs/heads/master | 2023-07-15T12:02:10.365563 | 2021-08-30T11:37:35 | 2021-08-30T11:37:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,183 | py | import sqlite3
import sys
from contextlib import closing
from functools import wraps
import py.path
import pytest
from utils import reload_module
from reader import make_reader as original_make_reader
from reader._storage import Storage
def pytest_addoption(parser):
parser.addoption(
"--runslow", action... | [
"damian.adrian24@gmail.com"
] | damian.adrian24@gmail.com |
e68f8e37594831072a4f8e00d262136ca8794866 | 5d902e2565b08dc6b8bb2f06231a4319d9715513 | /polyaxon/runner/spawners/notebook_spawner.py | 72319bf6c8f57f367669104d98e7564e0899ea9e | [
"MIT"
] | permissive | rohansaphal97/polyaxon | bd4febfc94b7d1aa95ef8152472c3dcba725f6b2 | ee42a05e40c4d400a281b3b2c5d26f5b46bd785c | refs/heads/master | 2020-03-13T19:51:44.783780 | 2018-04-26T17:52:35 | 2018-04-26T18:06:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,763 | py | import json
import logging
import random
from django.conf import settings
from libs.utils import get_hmac
from projects.paths import get_project_repos_path
from runner.spawners.base import get_pod_volumes
from runner.spawners.project_spawner import ProjectSpawner
from runner.spawners.templates import constants, deplo... | [
"mouradmourafiq@gmail.com"
] | mouradmourafiq@gmail.com |
ef03b435fce9dbb91ba88d54ee8e945bdd417016 | 9d03d3e8b739a0a1aae7eca09fce6a6e3cd7fd9d | /model/position/__init__.py | 2d890d9eb6b9146c76025d13d2280bad7b01502c | [] | no_license | CallingWisdom/trade | c30954c8be17d7b140ad376011486caede69fd68 | a231ade6dbe99288a4ada2eec0e187b1e28594da | refs/heads/master | 2021-05-06T18:12:46.058972 | 2017-06-09T09:21:09 | 2017-06-09T09:21:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,280 | py | # -*- coding: utf-8 -*-
#
# Copyright 2017 Ricequant, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | [
"511735184@qq.com"
] | 511735184@qq.com |
2cc9599e40b6bdaa83c3872fc6617694066af3ab | f1c3a21c820fc1b0d182c859486cc6461f299bb9 | /TCN-TF/tcn.py | 4331af07f57e7fee40cbfa8036ae0ad6083a1730 | [] | no_license | JZDBB/AVEC | 85ee92a90ca9517780e4cc59d250d0b82c12cdeb | 79bd55b80be4e2ebd08c376f91900dbbb60e6dca | refs/heads/master | 2020-04-17T03:14:04.481303 | 2019-01-15T11:34:48 | 2019-01-27T11:35:03 | 166,172,956 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,691 | py | #coding: utf-8
'''
Author: Weiping Song
Time: April 24, 2018
'''
import tensorflow as tf
from wnconv1d import wnconv1d
class TemporalConvNet(object):
def __init__(self, num_channels, stride=1, kernel_size=2, dropout=0.2):
self.kernel_size=kernel_size
self.stride = stride
self.num_levels = l... | [
"oxuyining@gmail.com"
] | oxuyining@gmail.com |
182058774046558c47942649a24c9481da11c275 | 98c6ea9c884152e8340605a706efefbea6170be5 | /examples/data/Assignment_4/vhrjoc001/question1.py | 7ecb00ea83049b6f3e69ecfb564bccfff7664dc8 | [] | no_license | MrHamdulay/csc3-capstone | 479d659e1dcd28040e83ebd9e3374d0ccc0c6817 | 6f0fa0fa1555ceb1b0fb33f25e9694e68b6a53d2 | refs/heads/master | 2021-03-12T21:55:57.781339 | 2014-09-22T02:22:22 | 2014-09-22T02:22:22 | 22,372,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 535 | py | # test program for box drawer
import boxes
choice = input ("Choose test:\n")
action = choice[:1]
if action == 'a':
boxes.print_square ()
elif action == 'b':
width, height = map (int, choice[2:].split(" "))
print ("calling function")
boxes.print_rectangle (width, lll)
print ("called function... | [
"jarr2000@gmail.com"
] | jarr2000@gmail.com |
7e104bc331c9f6d2a933011e4a39b82e9eadc828 | 9e988c0dfbea15cd23a3de860cb0c88c3dcdbd97 | /sdBs/AllRun/ec_14465-1033/sdB_EC_14465-1033_coadd.py | fd7c867f87c741b45aa844001303b9f6bd4ad19b | [] | no_license | tboudreaux/SummerSTScICode | 73b2e5839b10c0bf733808f4316d34be91c5a3bd | 4dd1ffbb09e0a599257d21872f9d62b5420028b0 | refs/heads/master | 2021-01-20T18:07:44.723496 | 2016-08-08T16:49:53 | 2016-08-08T16:49:53 | 65,221,159 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 439 | py | from gPhoton.gMap import gMap
def main():
gMap(band="NUV", skypos=[222.304042,-10.760042], skyrange=[0.0333333333333,0.0333333333333], stepsz = 30., cntfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sdBs/sdB_EC_14465-1033/sdB_EC_14465-1033_movie_count.fits", cntcoaddfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sd... | [
"thomas@boudreauxmail.com"
] | thomas@boudreauxmail.com |
53c5f847e2583a782f9bd1c46700bb9d009aaef4 | 0910e259a9bd252300f19b2ff22049d640f19b1a | /ml/m16_pipeline_RS3_wine.py | 7b06a57c93e8fc7ce2d3be0c4654e2fd695ad072 | [] | no_license | kimtaeuk-AI/Study | c7259a0ed1770f249b78f096ad853be7424a1c8e | bad5a0ea72a0117035b5e45652819a3f7206c66f | refs/heads/master | 2023-05-05T12:34:52.471831 | 2021-05-22T16:16:12 | 2021-05-22T16:16:12 | 368,745,041 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,357 | py | #전처리 하나와 모델을 합침
import numpy as np
import tensorflow as tf
import pandas as pd
from sklearn.datasets import load_wine
from sklearn.preprocessing import MinMaxScaler, StandardScaler
from sklearn.model_selection import train_test_split, KFold, cross_val_score, GridSearchCV, RandomizedSearchCV
from sklearn.metrics import... | [
"ki3123.93123@gmail.com"
] | ki3123.93123@gmail.com |
0d389ad98371546fa8ff77dbfb4acf4c1ea82b87 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_pyres.py | 451934aa41c0b1e439c98c40e31627b1188cf4eb | [
"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 | 224 | py |
from xai.brain.wordbase.nouns._pyre import _PYRE
#calss header
class _PYRES(_PYRE, ):
def __init__(self,):
_PYRE.__init__(self)
self.name = "PYRES"
self.specie = 'nouns'
self.basic = "pyre"
self.jsondata = {}
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
0214d99b83874837d35712c1e0bd2eb3d8662662 | ab9a0e787695b9d04483cac5b710931287ed3e54 | /ruia_cache/cache_patch/__init__.py | 0172eabb8a618b63f96a73bc4c75f3327546d912 | [
"Apache-2.0"
] | permissive | python-ruia/ruia-cache | 42a529b17192b31237bc18ad2126400ec20ce9dd | a18609b29e76ad11c81aa1254e6b2d8a49454abd | refs/heads/main | 2023-02-15T08:38:31.565745 | 2021-01-03T13:44:36 | 2021-01-03T13:44:36 | 325,297,883 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 133 | py | #!/usr/bin/env python
"""
Created by howie.hu at 2021/1/3.
"""
from .req_cache import req_cache
from .resp_cache import resp_cache
| [
"howie6879@gmail.com"
] | howie6879@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.