blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 616 | content_id stringlengths 40 40 | detected_licenses listlengths 0 112 | license_type stringclasses 2
values | repo_name stringlengths 5 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 777
values | visit_date timestamp[us]date 2015-08-06 10:31:46 2023-09-06 10:44:38 | revision_date timestamp[us]date 1970-01-01 02:38:32 2037-05-03 13:00:00 | committer_date timestamp[us]date 1970-01-01 02:38:32 2023-09-06 01:08:06 | github_id int64 4.92k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us]date 2012-06-04 01:52:49 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[us]date 2008-05-22 07:58:19 2023-08-21 12:35:19 ⌀ | gha_language stringclasses 149
values | src_encoding stringclasses 26
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 3 10.2M | extension stringclasses 188
values | content stringlengths 3 10.2M | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4f3d07f153b1f95a64a58781bc02da8823cfab74 | 376e2608fcedd1407d8c2a65634220984bbd9b85 | /alpenbank/settings.py | 1ba723fa8566bcf23684c4aa5e5a47d21f914256 | [] | no_license | SimeonYS/alpenbank | c2128697deab2c4f2fd97ea87ac7810cf889ebab | a0f46ad71cde350bec4e30a851708428e32be72e | refs/heads/main | 2023-03-09T09:11:26.534659 | 2021-02-23T11:42:00 | 2021-02-23T11:42:00 | 341,535,561 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 392 | py | BOT_NAME = 'alpenbank'
SPIDER_MODULES = ['alpenbank.spiders']
NEWSPIDER_MODULE = 'alpenbank.spiders'
FEED_EXPORT_ENCODING = 'utf-8'
LOG_LEVEL = 'ERROR'
DOWNLOAD_DELAY = 0
USER_AGENT="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36"
ROBOTSTXT_OBEY = Tr... | [
"simeon.simeonov@ADPVT.com"
] | simeon.simeonov@ADPVT.com |
6527e7f7e863bf1444b75c2ba9f2bdd32b29fdd3 | e3365bc8fa7da2753c248c2b8a5c5e16aef84d9f | /indices/nntwen.py | 1834cb51dc6c935d14c6cac1a4c6dc9e237a3cd4 | [] | no_license | psdh/WhatsintheVector | e8aabacc054a88b4cb25303548980af9a10c12a8 | a24168d068d9c69dc7a0fd13f606c080ae82e2a6 | refs/heads/master | 2021-01-25T10:34:22.651619 | 2015-09-23T11:54:06 | 2015-09-23T11:54:06 | 42,749,205 | 2 | 3 | null | 2015-09-23T11:54:07 | 2015-09-18T22:06:38 | Python | UTF-8 | Python | false | false | 121 | py | ii = [('MartHSI2.py', 1), ('ClarGE2.py', 1), ('BachARE.py', 1), ('WheeJPT.py', 1), ('FerrSDO.py', 1), ('MackCNH2.py', 1)] | [
"varunwachaspati@gmail.com"
] | varunwachaspati@gmail.com |
e4e175743927d2d38466815d4429550bd4380b0f | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /RecoJets/JetProducers/python/fixedGridRhoProducer_cfi.py | 6f9ee1ae1a6df7a91ece5014cdba4413192be8b4 | [
"Apache-2.0"
] | permissive | cms-sw/cmssw | 4ecd2c1105d59c66d385551230542c6615b9ab58 | 19c178740257eb48367778593da55dcad08b7a4f | refs/heads/master | 2023-08-23T21:57:42.491143 | 2023-08-22T20:22:40 | 2023-08-22T20:22:40 | 10,969,551 | 1,006 | 3,696 | Apache-2.0 | 2023-09-14T19:14:28 | 2013-06-26T14:09:07 | C++ | UTF-8 | Python | false | false | 497 | py | import FWCore.ParameterSet.Config as cms
fixedGridRhoCentral = cms.EDProducer("FixedGridRhoProducer",
pfCandidatesTag = cms.InputTag("particleFlow"),
EtaRegion = cms.string("Central")
)
fixedGridRhoForward = cms.EDProducer("FixedGridRhoProducer",
pfCandidatesTag = cms.InputTag("particleFlow"),
EtaRegi... | [
"giulio.eulisse@gmail.com"
] | giulio.eulisse@gmail.com |
c4695c901a02a94e112fab81598f233dc0534459 | fcaa0395a7c6aa74cbc47c40f35fdc312e44b9c5 | /aok/comparisons/__init__.py | 00898d6b19afe33e80500e988e0cc24bd6dfcf91 | [] | no_license | rocketboosters/a-ok | b6f1a70d262123c2df5e4969a687cbcfdfbafc8c | 06f31404a4ce34d561253ba74b533ce3fb73c60c | refs/heads/main | 2023-09-02T19:18:18.158296 | 2021-11-03T01:54:36 | 2021-11-03T01:54:36 | 388,142,177 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,275 | py | """Comparison operators subpackage for the aok library."""
from aok.comparisons._basics import Anything # noqa: F401
from aok.comparisons._basics import Between # noqa: F401
from aok.comparisons._basics import Equals # noqa: F401
from aok.comparisons._basics import Greater # noqa: F401
from aok.comparisons._basics ... | [
"swernst@gmail.com"
] | swernst@gmail.com |
2acf663118eb22264c326d53e1cc3e0f86209fce | d737fa49e2a7af29bdbe5a892bce2bc7807a567c | /software/qt_examples/src/pyqt-official/widgets/shapedclock.py | 0c1c44b50df3de59c7adebb087f4f9d2b396d3f4 | [
"GPL-3.0-only",
"MIT",
"CC-BY-NC-SA-4.0",
"GPL-1.0-or-later"
] | permissive | TG-Techie/CASPER | ec47dfbfd6c3a668739ff4d707572e0b853518b4 | 2575d3d35e7dbbd7f78110864e659e582c6f3c2e | refs/heads/master | 2020-12-19T12:43:53.825964 | 2020-01-23T17:24:04 | 2020-01-23T17:24:04 | 235,736,872 | 0 | 1 | MIT | 2020-01-23T17:09:19 | 2020-01-23T06:29:10 | Python | UTF-8 | Python | false | false | 5,194 | py | #!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENS... | [
"TGTechie01@gmail.com"
] | TGTechie01@gmail.com |
7aa75076d646b49b3ef2cc13d97d1040ad806a7e | e8790304ded051df1d6bce56e2a5df32b2a8bd71 | /eshop/cart/forms.py | b0489422ab83f7a8647ce15df7868070e106b02a | [] | no_license | puskarkarki/TrialEcommerce | d5769c348937f66d6a8d7bd25eef4fc581856219 | a8afd83a93c6299b5505b23d74d8740e3ee66928 | refs/heads/master | 2023-08-31T23:43:25.965510 | 2021-09-22T12:09:30 | 2021-09-22T12:09:30 | 405,687,882 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 315 | py | from django import forms
PRODUCT_QUANTITY_OPTIONS = [(i, str(i)) for i in range(1, 100)]
class AddProductToCartForm(forms.Form):
quantity = forms.TypedChoiceField(choices=PRODUCT_QUANTITY_OPTIONS, coerce=int)
override = forms.BooleanField(required=False, initial=False, widget=forms.HiddenInput)
| [
"puskarrajkarki1234@gmail.com"
] | puskarrajkarki1234@gmail.com |
50986868ac3beda7336d080eb3fedccbd1f18816 | e89693a2906534fa4a9d180b404cb96751302e8c | /reference_info.py | de35a29f7f6ccdf45cf70a74977b76abd0910368 | [] | permissive | friedrich-schotte/Lauecollect | e278e00692d109e98450c27502986673bf59db6a | acfc5afe34b4df5891a0f8186b8df76625afb51d | refs/heads/master | 2022-09-12T02:59:04.363963 | 2022-08-18T16:39:01 | 2022-08-18T16:39:01 | 186,062,944 | 0 | 2 | MIT | 2020-07-20T02:04:07 | 2019-05-10T22:42:26 | Python | UTF-8 | Python | false | false | 3,529 | py | """
Author: Friedrich Schotte
Date created: 2022-06-23
Date last modified: 2022-06-23
Revision comment:
"""
__version__ = "1.0"
import logging
from threading import Lock
def reference_info(reference, payload_type, *args, **kwargs):
container = attribute_or_item_reference_container(reference)
payload_name = ... | [
"friedrich.schotte@gmail.com"
] | friedrich.schotte@gmail.com |
1bda04dee8ec7d57057dc9c1002af3262d36d79f | 26552adb0d8889affd40e009d3c311e41a873e43 | /Python_Solutions/16003.py | 1d232c99deebfd3a3fb463781eb54a524dcccaef | [] | no_license | Isaac-Lee/BOJ-Algorithm | 3b9b64aba9ab3b48d15133cbf5ad122822e441d0 | 27f0339195c48f416e672390758e85305203b71a | refs/heads/main | 2022-06-29T21:36:11.500158 | 2022-06-25T06:35:05 | 2022-06-25T06:35:05 | 203,349,860 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 693 | py | nm = [int(k) for k in input().split()]
nList = [[] for i in range(nm[0])]
re=[]
mNum ={}
for i in range(nm[1]):
m = [int(m) for m in input().split()]
nList[m[0]-1].append(m[1]-1)
nList[m[1]-1].append(m[0]-1)
print(nList)
for j in range(nm[0]):
mNum[j] = len(nList[j])
print(mNum)
for k in range(nm[1]):
... | [
"yy0221ss@gmail.com"
] | yy0221ss@gmail.com |
f4efbd707a0ea513abca53dd28189b88cc398eeb | a5bffa3c32a4955648345a201c3be4fe0a324136 | /utils/box/metric.py | 1cade1c54a41deec5844621516e8934dad9ba6ed | [
"MIT"
] | permissive | ming71/SLA | 178282e0ae1ecba8512f4b4b69f0d721a3c590b4 | 7024b093bc0d456b274314ebeae3bc500c2db65a | refs/heads/master | 2023-08-02T06:10:50.893229 | 2021-09-24T02:11:50 | 2021-09-24T02:11:50 | 370,882,400 | 11 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,602 | py | import numpy as np
from collections import defaultdict, Counter
from .rbbox_np import rbbox_iou
def get_ap(recall, precision):
recall = [0] + list(recall) + [1]
precision = [0] + list(precision) + [0]
for i in range(len(precision) - 1, 0, -1):
precision[i - 1] = max(precision[i - 1], precision[i... | [
"mq_chaser@126.com"
] | mq_chaser@126.com |
ef1bd6c833f07200173ede8a31562c463ffe5137 | f999bc5a6e0da4f0904ef2112d7b6191f180ca5b | /Practice/1/no_of_paths_mx.py | 0d9e16140066176ae5144fd71ec615bfba130cee | [] | no_license | ritesh-deshmukh/Algorithms-and-Data-Structures | 721485fbe91a5bdb4d7f99042077e3f813d177cf | 2d3a9842824305b1c64b727abd7c354d221b7cda | refs/heads/master | 2022-11-09T00:18:51.203415 | 2018-10-08T22:31:05 | 2018-10-08T22:31:05 | 132,504,988 | 0 | 1 | null | 2022-10-23T00:51:15 | 2018-05-07T19:07:33 | Python | UTF-8 | Python | false | false | 539 | py | def test(m,n):
arr = [[0 for _ in range(m)] for _ in range(n)]
for i in range(m):
arr[i][0] = 1
for j in range(n):
arr[0][j] = 1
for i in range(1, m):
for j in range(n):
arr[i][j] = arr[i-1][j] + arr[i][j-1]
print(arr)
return arr[m-1][n-1]
# print(arr, ... | [
"riteshdeshmukh260@gmail.com"
] | riteshdeshmukh260@gmail.com |
56d944f03c1ac19e18d9938fd221054b6cf16446 | 711756b796d68035dc6a39060515200d1d37a274 | /output_cog/optimized_22785.py | dc28a321c6dce65fa06f5b4ba488d4dc41753e99 | [] | no_license | batxes/exocyst_scripts | 8b109c279c93dd68c1d55ed64ad3cca93e3c95ca | a6c487d5053b9b67db22c59865e4ef2417e53030 | refs/heads/master | 2020-06-16T20:16:24.840725 | 2016-11-30T16:23:16 | 2016-11-30T16:23:16 | 75,075,164 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,839 | py | import _surface
import chimera
try:
import chimera.runCommand
except:
pass
from VolumePath import markerset as ms
try:
from VolumePath import Marker_Set, Link
new_marker_set=Marker_Set
except:
from VolumePath import volume_path_dialog
d= volume_path_dialog(True)
new_marker_set= d.new_marker_set
marker_set... | [
"batxes@gmail.com"
] | batxes@gmail.com |
e4f11f4ce8171c561aea33859a1304ce7d33d527 | 4577d8169613b1620d70e3c2f50b6f36e6c46993 | /students/1719708/homework03/program01.py | 1d48e0a1c60c036592ba3307723907bbfdace1cb | [] | no_license | Fondamenti18/fondamenti-di-programmazione | cbaf31810a17b5bd2afaa430c4bf85d05b597bf0 | 031ec9761acb1a425fcc4a18b07884b45154516b | refs/heads/master | 2020-03-24T03:25:58.222060 | 2018-08-01T17:52:06 | 2018-08-01T17:52:06 | 142,419,241 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,464 | py | from immagini import *
def quadrato(filename,c):
lato = [-1]
vertice = [0, 0]
img = load(filename)
for row in range(len(img)):
for col in range(len(img[0])):
if img[row][col] == c:
v = [row, col]
cerca_quadrati(img, lato, vertice, v, c)
return (lato[0], (vertice[1], vertice[0]))
def... | [
"a.sterbini@gmail.com"
] | a.sterbini@gmail.com |
f4b6fb07afe16236f8d8856add56e78b27adbdd7 | b1adf2e06de52417119c1b6a150739533e9634a9 | /tools/geojson_simplifier/download.py | 67817408fefc638890c34429b23d360d37cbd78d | [
"Apache-2.0"
] | permissive | tjann/website | 5fadc61c86418d7beed7efe25e55ba2e8320cab4 | 0a4d41f157632324437305ba66b4f0ee8e54df00 | refs/heads/master | 2023-04-01T23:21:24.396459 | 2020-11-25T22:27:27 | 2020-11-25T22:27:27 | 301,866,316 | 0 | 0 | Apache-2.0 | 2020-10-06T22:09:37 | 2020-10-06T22:09:36 | null | UTF-8 | Python | false | false | 4,657 | py | # Copyright 2020 Google LLC
#
# 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 agreed to in writing, ... | [
"noreply@github.com"
] | tjann.noreply@github.com |
54c12ac707d0fb9f3034bafa6706d3b24fb2c777 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/otherforms/_inaugurates.py | 7de12e81b92bba657d8dbf9875af9f14f3716b76 | [
"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 | 238 | py |
#calss header
class _INAUGURATES():
def __init__(self,):
self.name = "INAUGURATES"
self.definitions = inaugurate
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.basic = ['inaugurate']
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
2a8dbc3fc49a292443e81b1a3b57fa3f2efcb749 | 3c000380cbb7e8deb6abf9c6f3e29e8e89784830 | /venv/Lib/site-packages/cobra/modelimpl/eqptcapacity/l3usagecaphist1year.py | b54b3bf0fae3f249f60ef6e82c8d700a8b801275 | [] | no_license | bkhoward/aciDOM | 91b0406f00da7aac413a81c8db2129b4bfc5497b | f2674456ecb19cf7299ef0c5a0887560b8b315d0 | refs/heads/master | 2023-03-27T23:37:02.836904 | 2021-03-26T22:07:54 | 2021-03-26T22:07:54 | 351,855,399 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 17,430 | py | # coding=UTF-8
# **********************************************************************
# Copyright (c) 2013-2020 Cisco Systems, Inc. All rights reserved
# written by zen warriors, do not modify!
# **********************************************************************
from cobra.mit.meta import ClassMeta
from cobra.m... | [
"bkhoward@live.com"
] | bkhoward@live.com |
26f920f8b22724bb3ef9147e50da276891d8dd5d | 9b32771b7d1513ee37bc62dd347675abcfc1bfc9 | /example_snippets/multimenus_snippets/NewSnippets/SciPy/Physical and mathematical constants/CODATA physical constants/L/Loschmidt constant (273.15 K, 101.325 kPa).py | 29b699f064aeba095877beb22cd784dbc63d2fd1 | [
"BSD-3-Clause"
] | permissive | listar0810/jupyterlab-snippets-multimenus | 44087ef1aeb030a3074862a337508b57d50072c6 | 477f51cfdbad7409eab45abe53cf774cd70f380c | refs/heads/master | 2022-12-12T18:19:25.221083 | 2020-09-08T01:11:01 | 2020-09-08T01:11:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 74 | py | constants.physical_constants["Loschmidt constant (273.15 K, 101.325 kPa)"] | [
"kptan86@gmail.com"
] | kptan86@gmail.com |
8fd79fcb1629b053b15ec3b50f90f913cea4dd13 | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/CodeJamCrawler/16_0_2/poroussel/pancakes | 5c6939bca7de41d39bd719fa3b49cb1a7017af13 | [] | no_license | DaHuO/Supergraph | 9cd26d8c5a081803015d93cf5f2674009e92ef7e | c88059dc66297af577ad2b8afa4e0ac0ad622915 | refs/heads/master | 2021-06-14T16:07:52.405091 | 2016-08-21T13:39:13 | 2016-08-21T13:39:13 | 49,829,508 | 2 | 0 | null | 2021-03-19T21:55:46 | 2016-01-17T18:23:00 | Python | UTF-8 | Python | false | false | 548 | #!/usr/bin/env python
import fileinput
def resolve(pancakes):
while pancakes[-1] == '+':
pancakes.pop()
if not len(pancakes):
return 0
num = 1
last = pancakes[0]
for p in pancakes[1:]:
if p != last:
num += 1
last = p
return num
if __nam... | [
"[dhuo@tcd.ie]"
] | [dhuo@tcd.ie] | |
ee0b0649a0153943aa926fb5b3951b59399eba96 | 3e8352f1523f5cc1982a41a9e2f655ebda7e58ad | /test/hummingbot/client/command/test_balance_command.py | 1d85c6a462be9e1fbec811d3bdae6a533f44ee33 | [
"Apache-2.0"
] | permissive | matthewbackhouse/hummingbot | a159bfa7d94c3b2c9b3549e4bc304253c4a42791 | 9023822744202624fad276b326cc999b72048d67 | refs/heads/master | 2023-09-03T03:03:18.354741 | 2021-11-02T05:16:59 | 2021-11-02T05:16:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,789 | py | import asyncio
import unittest
from copy import deepcopy
from typing import Awaitable
from unittest.mock import patch, MagicMock
from hummingbot.client.config.global_config_map import global_config_map
from hummingbot.client.hummingbot_application import HummingbotApplication
from test.mock.mock_cli import CLIMockingA... | [
"petioptrv@icloud.com"
] | petioptrv@icloud.com |
fa1d8f93970ac77ce82fb5918674f2d1f937b0d5 | 2a3606551a4d850a7b4d6a4e08089c51108ef7be | /script.mrknow.urlresolver/lib/urlresolver9/plugins/vidmad.py | ed863f4b84cd7ed1da2688e61c60efbc0f68e9f3 | [
"GPL-2.0-only",
"Apache-2.0"
] | permissive | rrosajp/filmkodi | a6bb1823f4ed45453c8b8e54ffbd6a7b49f44450 | 0162cde9ae25ddbf4a69330948714833ff2f78c9 | refs/heads/master | 2021-09-18T06:03:17.561062 | 2018-06-22T23:28:53 | 2018-06-22T23:28:53 | 234,768,781 | 1 | 0 | Apache-2.0 | 2021-06-03T20:33:07 | 2020-01-18T17:11:57 | null | UTF-8 | Python | false | false | 1,745 | py | '''
urlresolver Kodi plugin
Copyright (C) 2016 Gujal
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
... | [
"mrknow@interia.pl"
] | mrknow@interia.pl |
bf878dc50992ff87dfe63509c1edb33f2a81f5d9 | c92f8b2870add6860ef6b98a9e702788af5fd967 | /Chapter04/generatorex.py | 17a3e95792dfd007db20bac86a4a23afdaa11417 | [] | no_license | Rabidza/INF1511 | c6e1244679b2eff3f782957c056a72d49a552176 | 4bc10130a3693f3223bd12f4e9212a037bd1fc2a | refs/heads/master | 2021-09-08T05:42:58.897999 | 2018-03-07T20:08:31 | 2018-03-07T20:08:31 | 116,714,383 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 340 | py | def fruits(seq):
for fruit in seq:
yield '%s' % fruit
f = fruits(["Apple", "Orange", "Mango", "Banana"])
print("The list of fruits is:")
print(f.__next__())
print(f.__next__())
print(f.__next__())
print(f.__next__())
f = fruits(["Apple", "Orange", "Mango", "Banana"])
print("The list of fruits is:")
for x... | [
"neillhenning@gmail.com"
] | neillhenning@gmail.com |
ef21d236fe9887c6a043c2e2b8b071947d54c588 | 7ec92031e28b1a92a10a9f252f99211663e0d8f9 | /src/py/l0893.py | 7f22bf16ff81b31efaa612c67eff54c34c57752b | [] | no_license | SS4G/leetcode_2020 | 4eb63f6afd59f84e44334e78cb06c7b33a89dd15 | 9a9a8fc779e7456db77f88e7dcdcc1f5cae92c62 | refs/heads/master | 2020-06-29T17:12:39.488350 | 2020-02-08T01:07:08 | 2020-02-08T01:07:08 | 200,575,620 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 993 | py | from collections import defaultdict
class SpecialEqual:
def __init__(self, str0):
self.oddCharSet = defaultdict(lambda :0)
self.evenCharSet = defaultdict(lambda :0)
for idx, c in enumerate(str0):
if idx & 1 == 1:
self.oddCharSet[c] += 1
else:
... | [
"zihengs@opera.com"
] | zihengs@opera.com |
269a9583ed02424a432d30fb8e2324113b3155e9 | b948da1493329127a9a9ab567bae874c8cfa0bf4 | /portfolio/settings.py | d14137d7fde4fba7b1ae45b948c24066d3adef5c | [] | no_license | Kotodian/portfolio | edb93bec72d66d1fececd71b67a8e7f92cebb260 | 5661bf5d8134bbb576b2ea771fe5a6210c942feb | refs/heads/master | 2020-06-13T02:32:59.356331 | 2019-07-04T08:22:28 | 2019-07-04T08:24:22 | 194,503,065 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,511 | py | """
Django settings for portfolio project.
Generated by 'django-admin startproject' using Django 2.0.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
... | [
"root@vultr.guest"
] | root@vultr.guest |
092b4f51337ff6d474d15c92a99205d86476b0e0 | 63b997a325ccd3a0d50eed68acb260dba0d9ddbc | /solution 1.py | 848ce35f44cfeef22118bb38b46ae345a1120b3f | [] | no_license | GLAU-TND/python-programming-assignment-2-anshika123456 | 238c8f78f09192f731b395313acecdc70bad3b11 | 2892ed91b5e0cab7d00cf349129b5746cb6eaf03 | refs/heads/master | 2021-01-13T22:45:16.969806 | 2020-02-23T17:38:17 | 2020-02-23T17:38:17 | 242,518,558 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 182 | py | n=eval(input())
a=[]
p=n[0][-1]
a.append(n[0])
n=n[1:]
for j in n:
for i in n:
if p==i[0] and i not in a:
a.append(i)
p=i[-1]
print(a)
| [
"noreply@github.com"
] | GLAU-TND.noreply@github.com |
fa525dc7c9ab05eb28f373dd7d92e1e7c26dc407 | 0f5f6ff75cef3e81419216ba0191bb69a26c9068 | /hackerank/stat/wmean.py | 4fba60a0e2fa733e6d25f1ea4c30d0b972482be5 | [] | no_license | daddyawesome/CodingP | 1c7bbb2edd30333f7cb1b78ec6a0428854c4fa2b | 66ab4e452c23f3f770d6ad1e32f604c65e1dcbd3 | refs/heads/master | 2022-10-13T18:36:23.068195 | 2022-10-04T07:01:58 | 2022-10-04T07:01:58 | 220,047,911 | 0 | 0 | null | 2020-07-07T20:49:07 | 2019-11-06T17:01:44 | Python | UTF-8 | Python | false | false | 390 | py | '''
Weighted Mean
'''
n = input()
elements = input()
weights = input()
elements = elements.split(' ')
weights = weights.split(' ')
numerator = 0
denominator = 0
for i in range(0, len(elements)):
numerator = numerator + int(weights[i]) * int(elements[i])
denominator = denominator + int(weights[i])
weighted... | [
"sablay296@gmail.com"
] | sablay296@gmail.com |
0e820711e2cf9e4038ab0cc7af51a70addfbc936 | b12f467a6bf5aff09c1e1effb25d8f444f126766 | /trac/trac/ticket/notification.py | 2de8ec915240b0652bb13061bf5dadfcb6e40cd1 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-warranty-disclaimer",
"Python-2.0",
"Apache-2.0"
] | permissive | apache/bloodhound | 61a6c619cadfa64a2831cae4beac45c40429633e | c3e31294e68af99d4e040e64fbdf52394344df9e | refs/heads/trunk | 2023-09-03T14:19:40.562436 | 2018-02-17T18:49:54 | 2018-02-17T18:49:54 | 9,290,691 | 87 | 40 | Apache-2.0 | 2023-04-15T11:57:45 | 2013-04-08T07:20:19 | Python | UTF-8 | Python | false | false | 20,369 | py | # -*- coding: utf-8 -*-
#
# Copyright (C) 2003-2009 Edgewall Software
# Copyright (C) 2003-2005 Daniel Lundin <daniel@edgewall.com>
# Copyright (C) 2005-2006 Emmanuel Blot <emmanuel.blot@free.fr>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as p... | [
"gjm@apache.org"
] | gjm@apache.org |
a501a6377f6fd1a8cf8077ad539dbf88ce6b8c96 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03626/s769192318.py | 659f9e7bc552bd622370f1ebcadc9cd3dcf92378 | [] | 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 | 516 | py | mod = 1000000007
n = int(input())
s1 = input()
s2 = input()
ans = 1
for i in range(n):
if s1[i] == s2[i]:
if i==0:
ans *= 3
else:
if s1[i-1]==s2[i-1]:
ans *= 2
else:
continue
else:
if i==0:
ans *= 6
... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
54ef31def53b0ce31a1fa0cf49cb09a862d4173e | bf460178162ada0dff219808ebcb6909d2118c0b | /0x11-python-network_1/8-json_api.py | f14ad6ccaabd85d773455006210295e0a3cced71 | [] | no_license | dario-castano/holbertonschool-higher_level_programming | b273d53da01eaa13aafcfef49a84cf4504e15795 | b509695dc898bf31dfb8cc4f82c4bdfdb8407cae | refs/heads/master | 2023-08-10T17:15:27.232508 | 2020-02-13T14:42:17 | 2020-02-13T14:42:17 | 207,344,442 | 0 | 0 | null | 2023-07-22T15:46:03 | 2019-09-09T15:39:58 | Python | UTF-8 | Python | false | false | 585 | py | #!/usr/bin/python3
"""
Python script that takes in a URL, sends a request to the URL
and displays the body of the response.
"""
import sys
import requests
if __name__ == "__main__":
data = {"q": sys.argv[1] if sys.argv.__len__() >= 2 else ""}
url = 'http://0.0.0.0:5000/search_user'
response = requests.post... | [
"dario.castano@aim.com"
] | dario.castano@aim.com |
fdfd1fdd521757e153615bc1f421caef78c1123e | 0fd66a4a28bdc7d967ec18d90eca5cc54b5cbdd4 | /middleware/legato/templates/legato_gfx_mxt_cpro/legato_gfx_mxt_cpro.py | b8df421ed62d583c03dbef0bf18cd7bf19b1b356 | [
"LicenseRef-scancode-unknown-license-reference",
"ISC",
"LicenseRef-scancode-public-domain"
] | permissive | fb321/gfx | b865539ea6acd9c99d11a3968424ae03b5dea438 | e59a8d65ef77d4b017fdc523305d4d29a066d92a | refs/heads/master | 2020-06-27T14:20:24.209933 | 2019-07-31T22:01:05 | 2019-07-31T22:01:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,346 | py | # coding: utf-8
##############################################################################
# Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries.
#
# Subject to your compliance with these terms, you may use Microchip software
# and any derivatives exclusively with Microchip products. It is your
... | [
"http://support.microchip.com"
] | http://support.microchip.com |
9919ac5083dab3733793eb45a8b2e4565092b311 | aa410a95773aeea73e75f0e701db5cdc0eda890b | /competences/pycamp_ar_2014/players/futurologist.py | 8bf925a5ec4cf504a5022fa110a0975c01b568df | [] | no_license | predominant/zombsole | ccc00893b7739c5341c43fc28375415fa628b885 | a04ff40a144cb1f63d8aa29ccf0b06ecccc2bc7f | refs/heads/master | 2021-01-21T19:29:05.322551 | 2014-03-26T05:38:15 | 2014-03-26T05:38:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 23,910 | py | # coding: utf-8
import unittest
import random
import itertools
import copy
import sys
import codecs
import utils
from things import Player, Zombie, Wall, Box
from utils import closest
from weapons import Rifle, Shotgun
from core import World
names = """Chen Tuan
Ge Hong
Laozi
Lie Yukou
Yang Xiong
Zhang Daoling
Zhang ... | [
"fisadev@gmail.com"
] | fisadev@gmail.com |
d3c0d776930b5de95f6b211fc5f65d4c139333b5 | ce083128fa87ca86c65059893aa8882d088461f5 | /python/flask-mail-labs/.venv/lib/python2.7/site-packages/decorator.py | 7c6fcfe3b03a174786c79279c6888e1c531cd2e8 | [] | no_license | marcosptf/fedora | 581a446e7f81d8ae9a260eafb92814bc486ee077 | 359db63ff1fa79696b7bc803bcfa0042bff8ab44 | refs/heads/master | 2023-04-06T14:53:40.378260 | 2023-03-26T00:47:52 | 2023-03-26T00:47:52 | 26,059,824 | 6 | 5 | null | 2022-12-08T00:43:21 | 2014-11-01T18:48:56 | null | UTF-8 | Python | false | false | 16,194 | py | # ######################### LICENSE ############################ #
# Copyright (c) 2005-2016, Michele Simionato
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# Redistributi... | [
"marcosptf@yahoo.com.br"
] | marcosptf@yahoo.com.br |
c32cacad1c1141e9755e500443ac092c49f4da39 | ece5f5355fd3c76af49e4912ceffade563617dae | /src/scripts/examples/extract_data.py | ce17dac6c330a9725fab5b778709fe6ad52497a9 | [
"MIT"
] | permissive | stevenchen0x01/binwalk | 5f1f3d79a0427e70858c8454f60fd46d5a82dbd1 | 023a25e1222cd4209d120bd752aa5c55e621ed2a | refs/heads/master | 2021-01-19T16:41:47.397994 | 2017-08-21T17:45:43 | 2017-08-21T17:45:43 | 101,019,328 | 1 | 0 | null | 2017-08-22T03:57:23 | 2017-08-22T03:57:23 | null | UTF-8 | Python | false | false | 839 | py | #!/usr/bin/env python
import sys
import binwalk
# Extracts and logs
for module in binwalk.scan(*sys.argv[1:], signature=True, quiet=True, extract=True):
print ("%s Results:" % module.name)
for result in module.results:
if module.extractor.output.has_key(result.file.path):
if module.extract... | [
"heffnercj@gmail.com"
] | heffnercj@gmail.com |
4ff33f7a4c541df8aeed895cdff5400708508d53 | 2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02 | /PyTorch/dev/cv/image_classification/Hourglass_ID1809_for_PyTorch/datat/MPII/dp.py | bd677276e15f1823aa307654bd484b272a28ce4a | [
"GPL-1.0-or-later",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Ascend/ModelZoo-PyTorch | 4c89414b9e2582cef9926d4670108a090c839d2d | 92acc188d3a0f634de58463b6676e70df83ef808 | refs/heads/master | 2023-07-19T12:40:00.512853 | 2023-07-17T02:48:18 | 2023-07-17T02:48:18 | 483,502,469 | 23 | 6 | Apache-2.0 | 2022-10-15T09:29:12 | 2022-04-20T04:11:18 | Python | UTF-8 | Python | false | false | 8,833 | py | #
# BSD 3-Clause License
#
# Copyright (c) 2017 xxxx
# All rights reserved.
# Copyright 2021 Huawei Technologies Co., Ltd
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain ... | [
"wangjiangben@huawei.com"
] | wangjiangben@huawei.com |
569e248140e15b1b5e02e5607a39007906d082fc | ea459bc6571b254f04fedb9262e297038773afe2 | /111_776A.py | b8d01b8351f7bc60fd6f5abd57c604e23a3162c4 | [] | no_license | ywtail/codeforces | 47da2564858e0c906aa715b3b8b76e6d41b76dd8 | 5c000124ff5ef1172494bc5c5dc252bcf8515ce1 | refs/heads/master | 2020-12-24T08:00:47.738455 | 2018-04-21T15:27:48 | 2018-04-21T15:27:48 | 59,407,086 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 744 | py | # coding=utf-8
# 776A. A Serial Killer
a,b=raw_input().split()
n=int(raw_input())
print a,b
for i in range(n):
temp=raw_input().split()
if a==temp[0]:
a=temp[1]
if b==temp[0]:
b=temp[1]
print a,b
'''
input
ross rachel
4
ross joey
rachel phoebe
phoebe monica
monica chandler
output
ross rachel
joey rachel
joey... | [
"ywtail@gmail.com"
] | ywtail@gmail.com |
558a28d7a353b44934bab408ca1769ee54d76a03 | fb63d298e6e765b42cb9544695a69bd0c8cb544a | /app.py | e7affb6d0596256387ad24f22867591dbe0bbee0 | [
"MIT"
] | permissive | hirajanwin/Single-Page-Django-App | b33f1dfc6dd8048481577b9588908488de84873c | fe02a59784908161103b1ec8f6d0073c02f1d88f | refs/heads/master | 2022-12-30T23:17:35.517498 | 2020-10-20T22:36:06 | 2020-10-20T22:36:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,152 | py | import sys
from django.conf import settings
from django.core.wsgi import get_wsgi_application
from django.http import HttpResponse
from django.urls import path
# https://docs.djangoproject.com/en/dev/topics/settings/#using-settings-without-setting-django-settings-module
settings.configure(
DEBUG=True,
SECRET_... | [
"hello@teamcfe.com"
] | hello@teamcfe.com |
3219750783f2185ca332af5be1323d8447f7ac45 | 1c873d4edf9e6d2239fc834c8cb3cf692da45110 | /leibniz/nn/net/unet.py | da66997b4c40efd1c41b5bfaa8bcfba8d30cbb18 | [
"MIT"
] | permissive | fangzuliang/leibniz | 3815e572c59d1a927bd82eeb2a1ba7dc9d2011fd | 54faae33fd21a142d0daca6d153c66c11ac87eaa | refs/heads/master | 2023-03-27T13:45:03.203623 | 2021-03-25T07:11:58 | 2021-03-25T07:11:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,442 | py | # -*- coding: utf-8 -*-
import logging
import numpy as np
import torch as th
import torch.nn as nn
from leibniz.nn.conv import DepthwiseSeparableConv1d, DepthwiseSeparableConv2d, DepthwiseSeparableConv3d
from leibniz.nn.layer.cbam import CBAM
from leibniz.nn.net.hyptube import HypTube
logger = logging.getLogger()
l... | [
"mingli.yuan@gmail.com"
] | mingli.yuan@gmail.com |
b09646433f33ef6fe4a3098d1f3e25f092a646f7 | b4eef8c2e03378328293bc41303879db3050bc98 | /watsondt/cybox/test/objects/win_semaphore_test.py | c9f3dd5987d2976f29a9397b387b63101f889b76 | [] | no_license | luisgf/watsondt | 18682a28397b27eece5ce8913ca66bc37c92e555 | 6b3b2f76be23e6a054a0188a02a93a5207099e55 | refs/heads/master | 2021-01-10T07:37:31.010055 | 2016-02-24T22:01:29 | 2016-02-24T22:01:29 | 52,477,236 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 912 | py | # Copyright (c) 2015, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
import unittest
from cybox.objects.win_semaphore_object import WinSemaphore
from cybox.test.objects import ObjectTestCase
class TestWinSemaphore(ObjectTestCase, unittest.TestCase):
object_type = "WindowsSemap... | [
"luisgf@luisgf.es"
] | luisgf@luisgf.es |
3518ab5dd5c20a0d87bed2e714b16acc6cf9101f | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03272/s172607501.py | c400b1024da0843303aefa8251692a0133b6431d | [] | 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 | 123 | py | list1 = [int(a) for a in input().split()]
list1_0 = list1[0] #N
list1_1 = list1[1] #i
t = (list1_0 - list1_1) + 1
print(t) | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
59527ef34011ce59e50f0ca795f7ae991f6efd07 | 9b142372020cd0e456ba07a08ce23d2d93804bec | /new_practice/functional_programming/function_enumerate.py | 6ac290355cb1191dadfb90021ee5f3be13453e72 | [] | no_license | pavel-malin/new_practices | 2f287a3477cc1cb4c1d0d668903a8e036e383b66 | c078fbfac0212bc258550023cc71cb25f0e4f533 | refs/heads/master | 2020-08-01T07:14:55.594507 | 2019-10-25T10:19:09 | 2019-10-25T10:19:09 | 210,911,049 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 195 | py | # Without enumerate
i = 0
while i < len(mylist):
print("Item %d: %s" % (i, mylist[i]))
i += 1
# With enumerate
for i, item in enumerate(mylist):
print("Item %d: %s" % (i, item))
| [
"kurchevskijpavel@gmail.com"
] | kurchevskijpavel@gmail.com |
a9b66394400c72c14bdb93febdfe8545e8a5e943 | 487eac14c3fcc5cd6be3bb9e10e765a18edd564a | /src/python/twitter/common/python/dependency.py | 81c76ee7fe40225523c86d818502f0c145bd774f | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | billwei/commons | 4a5ae6b183f871f4670b5a5d9c737824bac0623d | c980481f2627c336c7b75d57824c23d368f3ba43 | refs/heads/master | 2021-01-17T22:07:50.800151 | 2012-01-28T03:17:57 | 2012-01-28T03:17:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,985 | py | # ==================================================================================================
# Copyright 2011 Twitter, Inc.
# --------------------------------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | [
"jsirois@twitter.com"
] | jsirois@twitter.com |
8dff5822ab1b4f7f2607db2d045a4a5e89fd310a | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_usage.py | a9c1c291214946757c3b7d41f1297ba952011a44 | [
"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 | 445 | py |
#calss header
class _USAGE():
def __init__(self,):
self.name = "USAGE"
self.definitions = [u'the way a particular word in a language, or a language in general, is used: ', u'the way something is treated or used: ', u'the bad and unfair way someone treats you: ']
self.parents = []
self.childen = []
self.p... | [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
ca7907b8d1400a229dd989b9c40e5c385916658d | f9bd7c1475b2ee956ca4bdbd6a35071b3c5ae5d9 | /test/sorted_array_to_bst.py | 4ef9c8088b51814db0c1437a23f8bc438bcbfd71 | [
"MIT"
] | permissive | gsathya/dsalgo | 7f984c1288f1894cf458ec4bafb6291a4e239c8d | 61c89ec597ced3e69bfbb438fd856c8fc5f20aba | refs/heads/master | 2020-05-18T02:28:18.390769 | 2014-10-16T19:32:00 | 2014-10-16T19:32:00 | 16,241,162 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 290 | py | import unittest
from lib import bst
from algo import sorted_array_to_bst
class TestSortedArrayToBST(unittest.TestCase):
def setUp(self):
self.bst = bst.BST()
def test_add(self):
vals = range(7)
sorted_array_to_bst.convert(vals, 0, len(vals)-1, self.bst)
| [
"gsathya.ceg@gmail.com"
] | gsathya.ceg@gmail.com |
9674cf7ffd5bfb6e9597610c956057aa62ddfc87 | 0693cce8efbeca806f4551c22dce60d5f392c5c9 | /contentful_management/editor_interface.py | b3d213115f887570c052d167d231e3f697e8a7df | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | timwis/contentful-management.py | 2dc4b7389ca2136ee2a12b89812b18ef2a347e67 | d71a0e18205d1de821b41c7225e8244e786be7f3 | refs/heads/master | 2021-06-28T12:04:58.130393 | 2017-08-10T16:30:09 | 2017-08-10T16:32:50 | 103,517,328 | 0 | 0 | null | 2017-09-14T10:04:48 | 2017-09-14T10:04:48 | null | UTF-8 | Python | false | false | 1,645 | py | from .resource import Resource
"""
contentful_management.editor_interface
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module implements the EditorInterface class.
API reference: https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/editor-interfaces
:copyright: (c) 2017 by Contentf... | [
"david.litvakb@gmail.com"
] | david.litvakb@gmail.com |
6f51613fafe60c7d57c562aac5a76f18afd45aff | 60f2d047db9433b1fa211cec5e6dbdee961d0e39 | /sina_data/command.py | e8f434d3f012e57f72c457edf0ed845acb1fbcf0 | [] | no_license | cheatm/DataCollector | a43071868bcac8fde64875332c0f597e46c5e736 | 8daab8673b5f07939e7073055f916d260727ec47 | refs/heads/master | 2020-12-02T22:53:14.085439 | 2017-07-06T09:47:36 | 2017-07-06T09:47:36 | 96,197,595 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,258 | py | # encoding:utf-8
from file_manager import FileManger
import json
from fxdayu_data import MongoHandler
import pandas as pd
import os
import logger
# ensure_tick # 按tick文件更新索引
# update_index # 更新索引日期
# emend_db # 按数据库更新索引
# write_db # 根据索引写数据库
# req_tick_data # 根据索引向MQ提交数据下载任务
# ensure_index #... | [
"862786917@qq.com"
] | 862786917@qq.com |
7b16ff529324924577f1dd439cee9d8a24bdad19 | 72ea8dbdbd68813156b76c077edb5a3806bf42ab | /synapse/tools/melder.py | d20397c0808530674c4fbcc272855608dc5de77a | [
"Apache-2.0"
] | permissive | williballenthin/synapse | 5c6f197f5a3cb3566c48dc444770592e89d4152a | 799854da814b79d6631e5cc2796c347bf4a80ce7 | refs/heads/master | 2020-12-24T14:19:12.530026 | 2017-03-16T20:30:38 | 2017-03-16T20:30:38 | 41,521,212 | 2 | 0 | null | 2015-08-28T02:01:50 | 2015-08-28T02:01:50 | null | UTF-8 | Python | false | false | 1,619 | py | import sys
import msgpack
import argparse
import synapse.mindmeld as s_mindmeld
from synapse.common import *
def main(argv):
'''
Command line tool for MindMeld construction/manipulation.
'''
p = argparse.ArgumentParser(prog='melder')
p.add_argument('meldfile',help='meld file path')
p.add_ar... | [
"invisigoth@kenshoto.com"
] | invisigoth@kenshoto.com |
0e51fba2f80f46ac06c1128a50b217af17862cff | 3fd3da4f11a251cc43d44d1d61ff2ffe5c82a4ce | /dlp/common/img_util.py | 8fafd5919c6f8c89627cc176e0b8598124df38f2 | [] | no_license | dumpinfo/TsBook | d95faded917bce3e024e77ff06afd30717ed9ef4 | 8fadfcd2ebf935cd49784fd27d66b2fd9f307fbd | refs/heads/master | 2023-05-27T07:56:24.149421 | 2019-07-31T20:51:52 | 2019-07-31T20:51:52 | 198,481,031 | 1 | 3 | null | 2023-05-22T21:13:31 | 2019-07-23T17:47:19 | Jupyter Notebook | UTF-8 | Python | false | false | 1,764 | py | from PIL import Image as image
def get_scaled_dims(org_w, org_h, dest_w, dest_h):
scale = dest_w / org_w
dh = scale * org_h
new_w = dest_w
new_h = dest_h
if dh < dest_h:
new_h = dh
else:
scale = dest_h / org_h
new_w = scale * org_w
return int(new_w), int(new_h)
def ... | [
"twtravel@126.com"
] | twtravel@126.com |
8beda32bbb13b6f511b0c1daa4f271163ee84276 | b820ed3fba2c851715905116ef437843b3532b57 | /owners/stores/admin.py | 19525f46b5d315117deb9e8b7fb84b6557820ef8 | [] | no_license | dev-fahim/retail_app | f88ea96dd4b95516598f4fceedca31a02e8eaeb3 | 41438560a8dac3c1f3cfd966373230dc2c3af9ff | refs/heads/master | 2022-12-11T06:05:29.023809 | 2019-01-12T17:01:27 | 2019-01-12T17:01:27 | 156,075,067 | 0 | 0 | null | 2022-11-22T03:06:03 | 2018-11-04T11:27:55 | Python | UTF-8 | Python | false | false | 149 | py | from django.contrib import admin
from owners.stores.models import OwnerStoreModel
# Register your models here.
admin.site.register(OwnerStoreModel)
| [
"fahim6668@gmail.com"
] | fahim6668@gmail.com |
ca1f46c68d3b1cfef20fcac79a1a882105478872 | fbbe424559f64e9a94116a07eaaa555a01b0a7bb | /Tensorflow_Pandas_Numpy/source3.6/tensorflow/contrib/kfac/python/ops/utils_lib.py | ddbb4485ce6967082f1844c6d798c078f1cc303b | [
"MIT"
] | permissive | ryfeus/lambda-packs | 6544adb4dec19b8e71d75c24d8ed789b785b0369 | cabf6e4f1970dc14302f87414f170de19944bac2 | refs/heads/master | 2022-12-07T16:18:52.475504 | 2022-11-29T13:35:35 | 2022-11-29T13:35:35 | 71,386,735 | 1,283 | 263 | MIT | 2022-11-26T05:02:14 | 2016-10-19T18:22:39 | Python | UTF-8 | Python | false | false | 1,520 | py | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"ryfeus@gmail.com"
] | ryfeus@gmail.com |
396c94f3cc267a2427d8631410da750806a52241 | ecfc473acd6dc4a6ccf401b64a2eee227b056a9e | /xrpc_tests/test_dict.py | 35d2e574b6fb13a34128c860af07da8509b72157 | [
"Apache-2.0"
] | permissive | andreycizov/python-xrpc | 774cb2a433a86d83cc55d92b7c4d0c0d6780577b | ed403ae74d5e89e0ebac68bcc58591d6b32742ff | refs/heads/master | 2020-03-22T13:48:03.024609 | 2019-08-07T11:33:19 | 2019-08-07T11:33:19 | 140,132,337 | 0 | 0 | Apache-2.0 | 2018-07-09T01:53:08 | 2018-07-08T02:46:45 | Python | UTF-8 | Python | false | false | 895 | py | import unittest
from datetime import timedelta
from xrpc.dict import RPCLogDict, ObjectDict
from xrpc.error import HorizonPassedError
from xrpc.net import RPCKey
from xrpc.util import time_now
class TestDict(unittest.TestCase):
def test_rpclogdict(self):
cr = time_now()
x = RPCLogDict(cr)
... | [
"acizov@gmail.com"
] | acizov@gmail.com |
86162c2e3044c4991f3146946be6253becc800fc | d8913c1512146bb42756f61ba0872d73179884eb | /env/bin/wheel3 | 6c5a912cdabbfbc51374fb893594f592a6266ee5 | [
"MIT"
] | permissive | sahin88/Django_Rest_Framework_Redux_React_Estate_App_FullStack | 2ed305c399edfab05ce3653e8bcaf36f09ae9015 | 10e31c4071bcebc0e4401f42084211d170b2ea56 | refs/heads/main | 2023-03-22T17:00:37.102265 | 2021-03-16T17:26:53 | 2021-03-16T17:26:53 | 319,297,453 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 234 | #!/home/alex/Documents/estate/env/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from wheel.cli import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"sahinmuratogur@gmail.com"
] | sahinmuratogur@gmail.com | |
c1ec56c62be7e95389e3aeb7ad30f6794d553aba | a1b892c0f5f8c5aa2c67b555b8d1d4b7727a86a4 | /Python/outage/edit_update.py | f28d19d183c03af4d7ba848164e4bf291788d408 | [] | no_license | Vivekdjango/outage | 60f463ae5294d2b33544a19bda34cc2c22dd42c8 | 20cfbc07e6714f0c8c7e685ea389f1b8ef1bfd53 | refs/heads/master | 2021-01-20T04:18:40.023340 | 2017-04-28T06:46:26 | 2017-04-28T06:46:26 | 89,675,693 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,475 | py | #!/usr/bin/python
print "Content-Type: text/html"
print ""
import cgi, cgitb
import re
import smtplib
import codecs
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
form=cgi.FieldStorage()
st=form.getvalue('status')
sub=form.getvalue('subject')
com=form.getvalue('comment')
pri... | [
"viveksinha@IC0532-L0.corp.inmobi.com"
] | viveksinha@IC0532-L0.corp.inmobi.com |
04481067cae2cdf914133af49338265cf8615ad1 | b306aab9dcea2dd83dda700bc9f7b9f1a32cff3a | /CAIL2020/sfzyzc/sfzyzb/preprocess.py | 90d05468cc6b241abae61ba2d175fe7a69e29aed | [
"Apache-2.0"
] | permissive | Tulpen/CAIL | d6ca9981c7ea2603ae61675ba330a9614cd9398d | c4cfa98ab4ecedbce34a7a5a186830486047540c | refs/heads/master | 2023-04-23T20:07:56.774530 | 2021-04-16T13:18:36 | 2021-04-16T13:18:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,081 | py | import json
import re
from difflib import SequenceMatcher
from query_sim import Query_Similar
import pandas
smallfile = "data/sfzy_small.json"
bigfile = "data/sfzy_big.json"
interfile = "data/inter.json"
# threshold = 0.3
def process_context(line):
spans = re.split('([,,:;;。])', line)
spans = [span for span ... | [
"bangtech@sina.com"
] | bangtech@sina.com |
afbcad670fab8581a7dea774391325bec563aeaf | e3fc5f889d99f2428fa8aadc3949e4d3fe7ce48d | /pygeodesy/cartesianBase.py | 27131c7b7db3d318a42db941f9ebbe299248026b | [
"MIT"
] | permissive | huangyizhi11/PyGeodesy | dd08d59645f35c46f3a22cfdb9073253551fb65e | c293600eb103248f46241659ef5602416d3cd46e | refs/heads/master | 2023-01-23T02:06:48.881445 | 2020-12-04T21:36:18 | 2020-12-04T21:36:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,455 | py |
# -*- coding: utf-8 -*-
u'''(INTERNAL) Base classes for elliposiodal, spherical and N-/vectorial
C{Cartesian}s.
After I{(C) Chris Veness 2011-2015} published under the same MIT Licence**,
see U{https://www.Movable-Type.co.UK/scripts/latlong.html},
U{https://www.Movable-Type.co.UK/scripts/latlong-vectors.html} and
U{... | [
"mrJean1@Gmail.com"
] | mrJean1@Gmail.com |
10c9ed49de23d070efdc6ced2c308317186bc7a6 | 71e1c13ba888477e8b5547518d36596d9b813201 | /q2_micom/tests/test_tradeoff.py | d29cdfe400485a8dbac81941098531b0731b1606 | [
"Apache-2.0"
] | permissive | khemlalnirmalkar/q2-micom | bc465d924ad11288210b447473f1e991d6ac44dc | 8ff3a29feddbe7624793b3d4c0c3726ae1e22a8f | refs/heads/master | 2022-12-04T20:09:39.142056 | 2020-08-26T23:29:36 | 2020-08-26T23:29:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,022 | py | """Test if tradeoff analysis works."""
import numpy as np
import os.path as path
import pandas as pd
import pytest
import qiime2 as q2
import q2_micom as q2m
this_dir = q2m.tests.this_dir
medium = q2.Artifact.load(path.join(this_dir, "data", "medium.qza")).view(
pd.DataFrame
)
models = q2.Artifact.load(path.join... | [
"ch.diener@gmail.com"
] | ch.diener@gmail.com |
95f9b98dee3a9a430148aba4d1756e5d4cfa3066 | aca209472c7288d69adf57124c197baf98c7a6e7 | /OpenCV讀者資源/讀者資源/程式實例/ch29/ch29_1.py | f67382807fb13fb3f3d33e9baac0b20b1a10cf61 | [] | no_license | Hank-Liao-Yu-Chih/document | 712790325e48b9d8115d04b5cc2a90cd78431e61 | fafe616678cd224e70936296962dcdbbf55e38b3 | refs/heads/master | 2022-09-22T12:40:33.284033 | 2022-09-08T00:33:41 | 2022-09-08T00:33:41 | 102,203,601 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 948 | py | # ch29_1.py
import cv2
import numpy as np
face_db = [] # 建立空串列
face_db.append(cv2.imread("ch29_1\\hung1.jpg",cv2.IMREAD_GRAYSCALE))
face_db.append(cv2.imread("ch29_1\\hung2.jpg",cv2.IMREAD_GRAYSCALE))
face_db.append(cv2.imread("ch29_1\\star1.jpg",cv2.IMREAD_GRAYSCALE))
face_db.ap... | [
"hank.liao@vicorelogic.com"
] | hank.liao@vicorelogic.com |
6cbe27584c2dab8abaf90e88fe6fec974ff6fd67 | a2e638cd0c124254e67963bda62c21351881ee75 | /Extensions/AMWIDealTaker/FPythonCode/FCustomizedFpML.py | ecbed3358079d3af61ad3725bd57da298e6c4981 | [] | no_license | webclinic017/fa-absa-py3 | 1ffa98f2bd72d541166fdaac421d3c84147a4e01 | 5e7cc7de3495145501ca53deb9efee2233ab7e1c | refs/heads/main | 2023-04-19T10:41:21.273030 | 2021-05-10T08:50:05 | 2021-05-10T08:50:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,723 | py | """------------------------------------------------------------------------
MODULE
FCustomizedFpML -
DESCRIPTION:
This file is used to modify the FpML as per the incoming source
VERSION: 1.0.30
RESTRICTIONS/ LIMITATIONS:
1. Any modifications to the scripts/ encrypted modules/ clear text code within the core is... | [
"nencho.georogiev@absa.africa"
] | nencho.georogiev@absa.africa |
f6784a2efadd835fc1bebda97261f36e0d6e0d39 | ba60d3ccf11157abaf6c7bcf3a81aace27c6af88 | /spoj/lovebirds.py | 90b400cd6db14f86ef9eb2fbf8e0987a6707406c | [] | no_license | eightnoteight/compro | 9a09628593cdd3201f4d3bcf271f1ca6a4e5efca | 1e5d32ee83e9d8f27623dee7262decad3d107bd5 | refs/heads/master | 2021-01-21T04:19:02.746824 | 2016-08-01T20:51:16 | 2016-08-01T20:51:16 | 44,669,361 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 399 | py | #!/usr/bin/python
# -*- encoding: utf-8 -*-
# pylint: disable=invalid-name,missing-docstring,bad-builtin
from sys import stdin
def main():
catalan = [1]
for x in xrange(1, 1001):
catalan.append(2*(2*x + 1)*catalan[-1] // (x + 2))
dstream = iter(map(int, stdin.read().split()))
print '\n'.join([s... | [
"mr.eightnoteight@gmail.com"
] | mr.eightnoteight@gmail.com |
0ee114876823cd86a77166b1ce845a4a38d03557 | 066ee4df594a5dc90335d271b9d5a1b1e2a4d34c | /y/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/python/pdb_sandbox.py | 93f585410c26310319af9f492d5e168e08a36358 | [
"LGPL-2.1-or-later",
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"GPL-2.0-or-later",
"MPL-1.1",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | ychen820/microblog | a2d82447525325ec58285c2e5db58b79cceaca1b | d379afa2db3582d5c3be652165f0e9e2e0c154c6 | refs/heads/master | 2021-01-20T05:58:48.424357 | 2015-04-28T22:03:09 | 2015-04-28T22:03:09 | 32,948,331 | 0 | 2 | BSD-3-Clause | 2020-07-25T05:04:35 | 2015-03-26T19:45:07 | Python | UTF-8 | Python | false | false | 2,835 | py | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | [
"ychen207@binghamton.edu"
] | ychen207@binghamton.edu |
d2ee2d0a7b652d2c7469c2b5320dcd4cf34c8a62 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/134/usersdata/218/46244/submittedfiles/escadarolante.py | ce5ff2ed83c850366a6d95b6864aa99715f36420 | [] | 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 | 198 | py | # -*- coding: utf-8 -*-
n=int(input('digite a quantidade de pessoas:'))
T=0
for i in range (0,n,1):
t=int(input('tempo:'))
if i==0:
t1=t
if i==n:
nf=t+10
T=nf-t1
print(T) | [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
26b2a67d895180bab09500fbaec44f381f50fe05 | 29df1c3c67f6d32c25a6b88399238126696b46b0 | /benchmarks/benchmarks/sparse_linalg_onenormest.py | a23dae2b400a224a69f4bd129715f852217a6250 | [
"MIT",
"Qhull",
"BSD-3-Clause",
"Python-2.0",
"Apache-2.0",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | odidev/scipy | 2347f38c562f18f863d84e907048fb8a61562ff2 | 0def9e108548b00263c79248df96f0fa1c0c0cd8 | refs/heads/master | 2022-01-24T13:54:00.539960 | 2022-01-06T13:16:38 | 2022-01-06T13:16:38 | 252,180,143 | 1 | 0 | BSD-3-Clause | 2020-04-01T13:16:17 | 2020-04-01T13:16:16 | null | UTF-8 | Python | false | false | 1,848 | py | """Compare the speed of exact one-norm calculation vs. its estimation.
"""
import numpy as np
try:
import scipy.sparse
import scipy.special # import cycle workaround for some versions
import scipy.sparse.linalg
except ImportError:
pass
from .common import Benchmark
class BenchmarkOneNormEst(Benchma... | [
"pav@iki.fi"
] | pav@iki.fi |
67fdb530ec4acf4b959afd9117ae5dda82b668ec | 79cf58db2795344616cbebd7ee84e7623a2f1dd1 | /Image/img_to_features.py | 50b5796751200b616031eb47f02c5b0f9d9e1324 | [] | no_license | zpeng1989/Machine_Learing_ZP_2020 | 77f290000f00a8083026681059d2c905ce575774 | 63cadb672265b9a1fba13edd5c4a91f8e2a94910 | refs/heads/main | 2023-02-28T04:10:52.286020 | 2021-02-05T02:18:08 | 2021-02-05T02:18:08 | 319,541,071 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 607 | py | import cv2
import numpy as np
from matplotlib import pyplot as plt
image = cv2.imread('plane.jpeg', cv2.IMREAD_COLOR)
image_10 = cv2.resize(image,(10,10))
print(image_10.flatten())
#plt.imshow(image_10, cmap='gray')
#plt.axis('off')
#plt.show()
channels = cv2.mean(image_10)
observation = np.array([(channels[2], chan... | [
"592392714@qq.com"
] | 592392714@qq.com |
950dce45bcc59842e8f000b131db9780ed98bb5c | cfdf08cb9592760a1b676282b458e58779abb0dd | /PlaneGame/manage.py | 427eeb140bc89ac984861ea69e78866f852becc1 | [
"MIT"
] | permissive | webturing/Python3 | d830c22921fe1d1e6182e9481bcd0a930309f65c | 6fcf6ee6cc5afba0225bd56e6928b01882eb9ecb | refs/heads/master | 2021-06-12T13:13:44.421511 | 2020-06-28T11:56:01 | 2020-06-28T11:56:01 | 128,641,162 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 777 | py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from bin.main import main
if __name__ == '__main__':
"""
环境: python3 + pygame
running 起来就可以打飞机了O(∩_∩)O~.
"""
main()
"""
PlayPlane/
|-- bin/
| |-- main.py 程序运行主体程序
|-- config/
| |-- settings.py 程序配置(例如: 游戏背景音乐的加载等)
|-- material ... | [
"zj@webturing.com"
] | zj@webturing.com |
0c3928fbbb1c31312df8cd2f0e2e59b5eb9f44ca | a6e4a6f0a73d24a6ba957277899adbd9b84bd594 | /sdk/python/pulumi_azure_native/web/v20190801/list_static_site_build_function_app_settings.py | 76e8903e60e6d4e3bf71b53f3db33a36c9efa0e6 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | MisinformedDNA/pulumi-azure-native | 9cbd75306e9c8f92abc25be3f73c113cb93865e9 | de974fd984f7e98649951dbe80b4fc0603d03356 | refs/heads/master | 2023-03-24T22:02:03.842935 | 2021-03-08T21:16:19 | 2021-03-08T21:16:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,013 | 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
from ... import _utilities, _tables
__a... | [
"noreply@github.com"
] | MisinformedDNA.noreply@github.com |
c84bc2a5625c487a309556a47160aabac50d97c7 | 5e8a33d64c9c82f91d70b4641cb24978ff81aec5 | /mealpy/bio_based/IWO.py | 1492290eb6a9298d5353ebffc602b72e2abee160 | [
"MIT"
] | permissive | Alhassan20/mealpy | 495e77a557f102ab61daccfdcc0cfe5949b561bb | 7ed365c5c495ad1c1e066662c90159b3d5e9b8e3 | refs/heads/master | 2023-07-31T08:09:47.285307 | 2021-09-16T01:22:12 | 2021-09-16T01:22:12 | 406,805,947 | 0 | 0 | MIT | 2021-09-15T14:41:24 | 2021-09-15T14:41:23 | null | UTF-8 | Python | false | false | 6,063 | py | #!/usr/bin/env python
# ------------------------------------------------------------------------------------------------------%
# Created by "Thieu Nguyen" at 12:17, 18/03/2020 %
# ... | [
"nguyenthieu2102@gmail.com"
] | nguyenthieu2102@gmail.com |
b0152453501e9413c085c5e3d68b541fb358198b | 7ce2b2000cfefe8fbefc2271ebc7df2061c88194 | /CAIL2020/rlfl/utils.py | 4923804ca7c3f8f7275cdb4a9a8cc3047c173528 | [
"Apache-2.0"
] | permissive | generalzgd/CAIL | f06d79acf42ac2188938c02087f7d07b9b43095c | 57529e64ee2f602324a500ff9bed660ddcde10bb | refs/heads/master | 2023-01-24T01:14:05.382525 | 2020-11-20T03:40:47 | 2020-11-20T03:40:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,598 | py | """Utils tools.
Author: Yixu GAO yxgao19@fudan.edu.cn
"""
import logging
import os
from collections import OrderedDict
import torch
def get_path(path):
"""Create the path if it does not exist.
Args:
path: path to be used
Returns:
Existed path
"""
if not os.path.exists(path):
... | [
"bangtech@sina.com"
] | bangtech@sina.com |
ee91d134d504e616ede6c544cdcee453df6d38dc | 9545652800884f0e54fe6595d8634c29ea4827a2 | /高级算法/leetCode_97_缺失的第一个正数.py | 3a17cc5a3fe47f855b2992c4e538bc986324c951 | [] | no_license | challeger/leetCode | 662d9f600a40fd8970568679656f6911a6fdfb05 | d75c35b6f8ab33c158de7fa977ab0b16dac4fc25 | refs/heads/master | 2023-01-13T07:34:42.464959 | 2020-11-13T02:40:31 | 2020-11-13T02:40:31 | 286,426,790 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,734 | py | """
day: 2020-08-25
url: https://leetcode-cn.com/leetbook/read/top-interview-questions-hard/xwkftg/
题目名: 缺失的第一个正数
题目描述: 给你一个未排序的整数数组,请你找出其中没有出现的最小正整数
算法的时间复杂度应该为O(n),并且只能使用常数级别的额外空间
示例:
输入: [3,4,-1,1]
输出: 2
输入: [7,8,9,11,12]
输出: 1
思路:
1. 哈希
我们可以将数组作为一个哈希表,它的索引+1为键,它的 是否为正数 为值
遍历哈希表,第一个值为正数的键,就是我... | [
"799613500@qq.com"
] | 799613500@qq.com |
ebed68d8bce26e2dcea621972a7d517e79bd3cca | 77e39afb2752ad63bbb775b256e2ed48fc50fde6 | /contents/views.py | 3fabf597a4a2cf036545d8639135be17de7b01bf | [] | no_license | soohyun-lee/Docker-python | f6b08eab6c0eec3efe37ba74b751e69aef153d38 | f318fc2df24a6983469c64e6ac15fd7ab0e202c2 | refs/heads/master | 2023-04-22T17:50:01.603450 | 2021-05-12T08:08:05 | 2021-05-12T08:08:05 | 366,639,580 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,248 | py | from typing import List
from contents.models import Listup
import re, requests
import json
from django.shortcuts import render
from django.views import View
from django.http import JsonResponse
from .models import Listup
class Contents(View):
def post(self, request):
data = json.loads(request.body)
... | [
"soohyun527@gmail.com"
] | soohyun527@gmail.com |
9142155f37a0bf512415188dc621c7f8b1e37f45 | 1710a1785c45f4e9cf35486ee96d7d14d767c82a | /matrices.py | 3ae4ba36e94a4acc24ac67af1c1cb601a345af81 | [] | no_license | Th3Lourde/spaceGame | 2a73ae90dbb68d456fbbb23a3c244c1b740bc780 | 8e7c4e990d658fdc7f3dd21188d4493c09146fe5 | refs/heads/master | 2022-07-10T02:30:19.680893 | 2020-05-14T01:47:26 | 2020-05-14T01:47:26 | 263,761,039 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 857 | py | import numpy
t = numpy.pi/36
u = 1
T = 0
Rotate = numpy.array([[numpy.cos(t),-numpy.sin(t),0], [numpy.sin(t), numpy.cos(t), 0],[0,0,1]])
Rotate_Neg = numpy.array([[numpy.cos(t),numpy.sin(t),0], [-numpy.sin(t), numpy.cos(t), 0],[0,0,1]])
Shift = numpy.array([[1,0, u*numpy.cos(T)], [0,1,u*numpy.sin(T)], [0,0,1]])
i =... | [
"th3sylvia.lourde@gmail.com"
] | th3sylvia.lourde@gmail.com |
12ea2600b5eb5ac6f1f983418ca1c299d535df57 | e8ab6a8108801dfedb694557626fd847651564e2 | /Dragon/python/dragon/__init__.py | 01bcb0e88bd4653deaa63c50b2dc5a69b6aac13b | [
"BSD-2-Clause"
] | permissive | Spark001/Dragon-1 | 87f722bcb0feaec7fad29d923c60681cf9584267 | 310bcb5f6d9a6623bb58ed3d1ad02d1f440da474 | refs/heads/master | 2020-03-09T22:52:08.171500 | 2018-04-01T10:13:50 | 2018-04-01T10:13:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 929 | py | # ------------------------------------------------------------
# Copyright (c) 2017-preseent, SeetaTech, Co.,Ltd.
#
# Licensed under the BSD 2-Clause License.
# You should have received a copy of the BSD 2-Clause License
# along with the software. If not, See,
#
# <https://opensource.org/licenses/BSD-2-Clause>
#
#... | [
"ting.pan@seetatech.com"
] | ting.pan@seetatech.com |
7d1653be04f8139a72d11e847ec2123d319b7518 | 9d74cbd676e629f8acdc68a4bac3dea0a98b9776 | /yc213/825.py | 201024344db09ebb4a8336c0ddfbc2f1d28dbd79 | [
"MIT"
] | permissive | c-yan/yukicoder | 01166de35e8059eaa8e3587456bba52f35bd0e44 | dcfd89b0a03759156dcea8c2e61a7705543dc0d4 | refs/heads/master | 2022-03-20T06:50:48.225922 | 2022-02-25T15:48:50 | 2022-02-25T15:48:50 | 237,735,377 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 445 | py | A, B, C = map(int, input().split())
if B == 0:
if C >= A or A == 0:
print('Impossible')
else:
print(A - C)
else:
if C >= A + B + 10:
print('Impossible')
elif C >= A + B:
print(A + B + 9 - C)
else:
while A >= 10 and (A - 10) + (B + 1) > C:
B += 1
... | [
"c-yan@users.noreply.github.com"
] | c-yan@users.noreply.github.com |
bf2719d65f4f33e7e5cd99ef493bae50a8b389f5 | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /data/p2DJ/New/R2/benchmark/startPyquil191.py | e48239dddba4fcb815b00f48785364fe8b897f0f | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/QDiff | ad53650034897abb5941e74539e3aee8edb600ab | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | refs/heads/main | 2023-08-05T04:52:24.961998 | 2021-09-19T02:56:16 | 2021-09-19T02:56:16 | 405,159,939 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,159 | py | # qubit number=2
# total number=12
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += H(0) # number=1
p... | [
"wangjiyuan123@yeah.net"
] | wangjiyuan123@yeah.net |
5c547bb0ff634b09ba993d4ef3fdca1aa94090cf | 195b8d12796872c05d539aa9283fc3f407b8d8b5 | /python-cinderclient/cinderclient/v2/__init__.py | 5408cd3bd67805693815186f0c080b13e78a9c61 | [
"BSD-3-Clause",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | rvbelapure/openstack-nova-sched | afaa5928da3a8430b64bc23aedb251bae0e7d3ef | 325da0e08979d79b7470d7506ced1b4210e2b696 | refs/heads/master | 2021-01-17T05:28:44.474242 | 2013-04-20T21:18:35 | 2013-04-20T21:18:35 | 9,082,500 | 0 | 1 | null | 2021-09-07T08:33:18 | 2013-03-28T17:30:46 | Python | UTF-8 | Python | false | false | 679 | py | # Copyright (c) 2013 OpenStack, LLC.
#
# 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 req... | [
"owlpostarun@gmail.com"
] | owlpostarun@gmail.com |
d910418d27bae4339185576b152e789a949bc49d | 9b07e3fc9436f876a426bf5b02d07733de10d775 | /tests/bind_tests/boolean_tests/operation_tests/test_process_events.py | 44fd2d01a13dee2e67120d5b8ff44fef1ed96b03 | [
"MIT"
] | permissive | lycantropos/martinez | 019e859ec513cc7ad38901e22dff8e897615776c | 86db48324cb50ecb52be8ab2e4278a6d5cdd562b | refs/heads/master | 2021-07-10T04:19:23.372706 | 2020-11-28T00:58:47 | 2020-11-28T00:58:47 | 224,819,004 | 7 | 1 | MIT | 2020-12-20T15:47:17 | 2019-11-29T09:16:26 | Python | UTF-8 | Python | false | false | 521 | py | from typing import (List,
Tuple)
from hypothesis import given
from tests.bind_tests.hints import (BoundOperation,
BoundSweepEvent)
from . import strategies
@given(strategies.operations_with_events_lists)
def test_basic(operation_with_events: Tuple[BoundOperati... | [
"azatibrakov@gmail.com"
] | azatibrakov@gmail.com |
f6820bfb35ad7611866d9dcf33d2dc416122acd3 | 3206db2c6c3f9fd8f4fcd6d400b9e345a0cbd342 | /qtranscripter/mainwindow.py | 6654950b56550a900a911086bbec1eedfebbcd9f | [] | no_license | mugwort-rc/qtranscripter | dc27cca4a717545f519c4c1003cb0742bbc114f6 | aa355b37b81c6ce6975db6cd402708f6f00d1f0e | refs/heads/master | 2021-01-01T10:14:07.092822 | 2015-10-08T09:02:31 | 2015-10-08T09:02:31 | 31,541,911 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,762 | py | # -*- coding: utf-8 -*-
import os
import numpy as np
import scipy.io.wavfile
from PyQt4.Qt import *
from PyQt4.Qwt5 import *
from PyQt4.phonon import Phonon
from ui_mainwindow import Ui_MainWindow
from persondialog import PersonDialog
from models import TimePointModel
from utils import ClickRelease
from utils impor... | [
"mugwort.rc@gmail.com"
] | mugwort.rc@gmail.com |
ec67db41e7d10ffa59c7feac6008fe09eeab37f3 | b0f101d115d30b59e6ab3887e782e08e57d0fb52 | /cbow/main.py | fa1848f55df982f9208377e5cf6cca13a2dc004e | [] | no_license | trigrass2/torch_light | 9c15c75aeb290fb54b2f247b0a0daec428415414 | 17f54f50309c50749711d7483f1563756e8d8afd | refs/heads/master | 2021-05-07T18:55:07.337457 | 2017-10-29T06:29:26 | 2017-10-29T06:29:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,205 | py | import torch
import torch.nn.functional as F
import torch.nn as nn
import torch.optim as optim
import torch.autograd as autograd
CONTEXT_SIZE = 2 # 2 words to the left, 2 to the right
EMBEDDING_DIM = 64
raw_text = """We are about to study the idea of a computational process.
Computational processes are abstract being... | [
"422618856@qq.com"
] | 422618856@qq.com |
6c07e3d6f5128ce364ddac46fea5a3d9630b40c1 | 67a48a7a2db56247fdd84474efa35124565fd8b9 | /Codeforces/1559/1559c.py | 163287d73c0a3162fb31da550314ccaa6c48cae6 | [] | no_license | qazz625/Competitive-Programming-Codes | e3de31f9276f84e919a6017b2cf781c946809862 | e5df9cdc4714d78b7b6a7535ed7a45e07d3781c3 | refs/heads/master | 2022-08-30T07:57:55.172867 | 2022-08-10T08:02:07 | 2022-08-10T08:02:07 | 242,182,922 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 553 | py | t = int(input())
for _ in range(t):
n = int(input())
arr = [int(j) for j in input().split()]
if arr[-1] == 0:
ans = [i for i in range(1, n+2)]
print(*ans)
continue
if arr[0] == 1:
ans = [n+1] + [i for i in range(1, n+1)]
print(*ans)
continue
ind = -1
for i in range(n-1):
if arr[i] == 0 and arr[i+... | [
"arun49804@gmail.com"
] | arun49804@gmail.com |
82d446eafb24c198fd5c76a9edf92a8e22cebb63 | 37cde98734ebe6cc99a390c8ae2f049346ffbe88 | /o_izuchenie_peredelka_5_borb s proigr_rab_mod_stavok_2.py | 64324c64cd0499c981c7faa769fbbd7c2432c8be | [] | no_license | Dimon0014/Zapis_chtenie_03_12 | 4d36efaf2667263e163cec1dd5d64c9c8f3f0422 | d32e9eeb968ff9f6c9339a8e33219f166f757687 | refs/heads/master | 2021-09-09T16:40:39.751513 | 2018-03-18T05:21:33 | 2018-03-18T05:21:33 | 113,576,736 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 44,903 | py | import json
import random
from datetime import datetime, timedelta
from time import clock
# ------------- в начале обработка единичных символов
import math
def last_last_seen_steps_of_simv_01(dict, key): # альтернатива "last_next_seen_all_steps_1"
result = dict[key][0]
# print('функия next_seen_steps =',re... | [
"toropov0014@mail.ru"
] | toropov0014@mail.ru |
fdd396e48bbd6514054391792a4eec855608cd68 | eac22714038e840028cc5abb72bc750004626ebb | /mct_utilities/src/mct_utilities/iface_tools.py | ea4e2aa90833414c05934e0eca84b528708099fb | [
"Apache-2.0"
] | permissive | iorodeo/mct | 79b19f6dab9f6567452df7274d67245bf64b1801 | fa8b85f36533c9b1486ca4f6b0c40c3daa6f4e11 | refs/heads/master | 2022-11-11T18:03:18.178182 | 2014-08-20T19:21:27 | 2014-08-20T19:21:27 | 273,790,182 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 214 | py | import netifaces
def get_ip_addr(iface):
"""
Returns the IP address for the given interface.
"""
ifaddresses = netifaces.ifaddresses(iface)
ip = ifaddresses[2][0]['addr']
return ip
| [
"will@iorodeo.com"
] | will@iorodeo.com |
77055629a54447ef734ce62f2f95dff7d4883e48 | 282ec49f8ce8aa176c24e4f13a8852c9b0752e4a | /educational/optimization-methods/constrained-optimization/test_suites.py | 55553d168f71c88dbc2351812c09262cac6095b8 | [] | no_license | montreal91/workshop | b118b9358094f91defdae1d11ff8a1553d67cee6 | 8c05e15417e99d7236744fe9f960f4d6b09e4e31 | refs/heads/master | 2023-05-22T00:26:09.170584 | 2023-01-28T12:41:08 | 2023-01-28T12:41:08 | 40,283,198 | 3 | 1 | null | 2023-05-01T20:19:11 | 2015-08-06T03:53:44 | C++ | UTF-8 | Python | false | false | 4,275 | py |
from utilities import Struct
from vector2 import Vector2
def Target1( vec ):
return vec.x ** 2 + vec.y ** 2
def DerTarget1( vec ):
return Vector2( 2 * vec.x, 2 * vec.y )
def Target2(vec):
return vec.x ** 2 + vec.y ** 3
def DerTarget2(vec):
return Vector2(2 * vec.x, 3 * vec.y ** 2)
def Target3... | [
"nefedov.alexander91@yandex.ru"
] | nefedov.alexander91@yandex.ru |
3807a3ce3a75852bdce9ac2d08c8f7b277905a1a | a3cc7286d4a319cb76f3a44a593c4a18e5ddc104 | /lib/googlecloudsdk/api_lib/app/api/appengine_domains_api_client.py | 9cdab7d0091b78e506f53797b868e7f40c86062c | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | jordanistan/Google-Cloud-SDK | f2c6bb7abc2f33b9dfaec5de792aa1be91154099 | 42b9d7914c36a30d1e4b84ae2925df7edeca9962 | refs/heads/master | 2023-09-01T01:24:53.495537 | 2023-08-22T01:12:23 | 2023-08-22T01:12:23 | 127,072,491 | 0 | 1 | NOASSERTION | 2023-08-22T01:12:24 | 2018-03-28T02:31:19 | Python | UTF-8 | Python | false | false | 8,334 | py | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | [
"jordan.robison@gmail.com"
] | jordan.robison@gmail.com |
556d819f1e8715a82a6f1ec8b75bf6c9475578ed | ccd400e42d98c5c9be099e60fc8f7081951438b4 | /idb/grpc/tests/xctest_log_parser.py | 6842ac576f11b2b902c72705cd15b997cf1f7a16 | [
"MIT"
] | permissive | Unity-Technologies/idb | d0b986c1ac082f8f07fa04ed263fa85259130c4c | f02a51d8018f497e4975e943dc5e94a9d4785fdd | refs/heads/unity-main | 2023-07-17T13:15:31.637414 | 2021-12-23T11:07:15 | 2021-12-23T11:07:15 | 317,798,876 | 5 | 0 | MIT | 2021-12-27T16:01:11 | 2020-12-02T08:36:26 | Objective-C | UTF-8 | Python | false | false | 3,499 | py | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import json
from unittest import TestCase
from idb.grpc.xctest_log_parser import XCTestLogParser
def _begin_test(cl... | [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
1e8b004d0c84a1e74b561476b9d095ddbd2e22d9 | 9507ff9e9bca2ca8104369c9e25acd74d308e9b3 | /base_data_from_net/get_base_data.py | 18446831f88c2d3a3a0c490889e28e8464b49c00 | [] | no_license | yangkang411/python_tool | 03e483c7ec7e1e76284f93cf5b9086fdf98af826 | 713071a9fbabfabcbc3c16ce58d1382c410a7ea3 | refs/heads/master | 2023-03-17T16:14:03.332332 | 2020-09-10T02:37:05 | 2020-09-10T02:37:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,752 | py | import socket
from time import sleep
import base64
import _thread
import serial
import time
import datetime
import os
host = '47.116.1.17'
port = 2201
#mountPoint = 'RTKBASE'
mountPoint = 'WX02'
userAgent = 'NTRIP Aceinna CloudRTK 1.0'
username = 'yundong'
password = 'TEL8IOZTBJVVJ0IT'
com_port = 'com34'
def get_... | [
"41727862+geqian@users.noreply.github.com"
] | 41727862+geqian@users.noreply.github.com |
c8a2c709881af6d33928d6a76a1e18aa42103ef1 | 5000d053f7a8bd90d68d5580d2398e2b74259719 | /alerta/plugins/normalise.py | c6410e2032e29795d43a316d846b49a734ac5882 | [
"Apache-2.0"
] | permissive | alvsgithub/alerta | 8203d7632ff58e0ef5e2e9e64156ab797f322710 | 25f4257347d2135a259b37d5646da51514fc8e64 | refs/heads/master | 2021-01-18T08:12:49.658867 | 2014-10-18T22:15:18 | 2014-10-18T22:15:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 268 | py |
from alerta.plugins import PluginBase, RejectException
class NormaliseAlert(PluginBase):
def pre_receive(self, alert):
alert.text = '%s: %s' % (alert.severity.upper(), alert.text)
return alert
def post_receive(self, alert):
pass | [
"nick.satterly@guardian.co.uk"
] | nick.satterly@guardian.co.uk |
0dab4666a712bbc8aa7a63cfd615561f4fd6e6f5 | a36c6c96e21a61ac622d53b2f441adf70da8e465 | /httpx_http.py | 199982e6ef1b01d5eaa8c6e7ed0e28644460feac | [] | no_license | pen960223/ProxyTest | a7fff2e394cb7dc5bcea42e47bb4834f456432df | 003abe06cb4ebd77281b27886dbdf58bc3d11848 | refs/heads/master | 2023-06-17T10:59:11.931023 | 2021-07-10T14:10:48 | 2021-07-10T14:10:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 247 | py | import httpx
proxy = '127.0.0.1:7890'
proxies = {
'http://': 'http://' + proxy,
'https://': 'http://' + proxy,
}
with httpx.Client(proxies=proxies) as client:
response = client.get('https://httpbin.org/get')
print(response.text)
| [
"cqc@cuiqingcai.com"
] | cqc@cuiqingcai.com |
1ba5e73d31ba4cce03b8f7156ce2da8d41f8b346 | 060ce17de7b5cdbd5f7064d1fceb4ded17a23649 | /fn_joe_sandbox_analysis/fn_joe_sandbox_analysis/__init__.py | 09b22a32edc9da84a9bffe6bfd13f979462e9f3f | [
"MIT"
] | permissive | ibmresilient/resilient-community-apps | 74bbd770062a22801cef585d4415c29cbb4d34e2 | 6878c78b94eeca407998a41ce8db2cc00f2b6758 | refs/heads/main | 2023-06-26T20:47:15.059297 | 2023-06-23T16:33:58 | 2023-06-23T16:33:58 | 101,410,006 | 81 | 107 | MIT | 2023-03-29T20:40:31 | 2017-08-25T14:07:33 | Python | UTF-8 | Python | false | false | 197 | py | # (c) Copyright IBM Corp. 2018. All Rights Reserved.
import pkg_resources
try:
__version__ = pkg_resources.get_distribution(__name__).version
except pkg_resources.DistributionNotFound:
pass | [
"shane.curtin@ie.ibm.com"
] | shane.curtin@ie.ibm.com |
1372764e6f68c43882fa2ccf7731bcd1330247bc | a8fc7cc0f64571ddcb4d78278f9aa166a74038e5 | /worlds/oribf/Options.py | ac6808aa8d34ab5aab58f13897fd300f02c407c1 | [
"MIT"
] | permissive | adampziegler/Archipelago | 8d10ad309e8e3e71fc008d692b3fb1efc6f6ce6a | 6b0b78d8e07d275aceead3f5a1890eac5f153bf0 | refs/heads/main | 2023-08-23T15:09:06.365113 | 2021-11-03T22:27:09 | 2021-11-03T22:27:09 | 396,093,506 | 0 | 0 | NOASSERTION | 2021-08-14T18:25:23 | 2021-08-14T18:25:23 | null | UTF-8 | Python | false | false | 249 | py | from .RulesData import location_rules
from Options import Toggle
options = {
"open" : Toggle,
"openworld": Toggle
}
for logic_set in location_rules:
if logic_set != "casual-core":
options[logic_set.replace("-", "_")] = Toggle
| [
"fabian.dill@web.de"
] | fabian.dill@web.de |
1a943889ad313bd6c151019a90fcd91d175507d1 | 93a12156f091858f6e48c7c85c84483742c221f7 | /programmers/heap_disk.py | 1d24814334908fa99d48aecc1c414bbdc5aaed55 | [] | no_license | dojinkimm/AlgorithmPractice | 74cd5c63f9973792f034fe019504b2160ad51e40 | 211857e7541faeeec2f21690eecc8c17d31ad142 | refs/heads/master | 2021-09-28T14:54:12.756098 | 2021-09-26T13:23:38 | 2021-09-26T13:23:38 | 205,849,589 | 2 | 1 | null | 2019-09-30T03:20:10 | 2019-09-02T12:12:24 | Python | UTF-8 | Python | false | false | 538 | py | # 디스크 컨트롤러 - Heap
from heapq import heappush, heappop
def solution(jobs):
time, end, q = 0, -1, []
answer = 0
cnt = 0
length = len(jobs)
while cnt < length:
for job in jobs:
if end < job[0] <= time:
answer += (time - job[0])
heappush(q, job[1])
... | [
"dojinkim119@gmail.com"
] | dojinkim119@gmail.com |
328acbeccc71240aef3b45402311a0e1884a6353 | 1779f1d096d4af6d3112e39ad36c63ff4b04ae00 | /utils/fluids/time_providers.py | a2eeadc833a15e904487727367793f266f11bbde | [] | no_license | 10erick-cpu/RL_Mixing_Colours | eb753f7b6b309cf54fe41f74f993dfada83d7867 | a11756d6988422929a452dc1e19ccf6b051f0832 | refs/heads/master | 2023-07-27T22:38:34.299006 | 2021-09-09T16:16:33 | 2021-09-09T16:16:33 | 398,141,652 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,874 | py | import datetime
import time
class TimeProvider(object):
def __init__(self):
self.env = None
def get_time(self):
raise NotImplementedError("base")
def advance_time_s(self, seconds, sleep_time=0.2, progress_callback=None):
done_time = self.get_time() + seconds
remain = don... | [
"leonelerick59@gmail.com"
] | leonelerick59@gmail.com |
a5f85460b290b63e1434daa2e7dc4a7d0178df63 | db56d3d14d85e2171c1d8be5564b227da544a056 | /Accounts/migrations/0002_auto_20170827_1753.py | 59f1f8ecd5adc531ef53b702ba5ef59775a871cc | [] | no_license | onkar27/BillDesk | cd039793f90916745399dfcbbef661b8cc42e9af | 0c0046c3fd54198b24042d52b3e206204560d02f | refs/heads/master | 2020-03-12T16:55:28.711387 | 2018-03-15T10:59:50 | 2018-03-15T10:59:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 509 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-08-27 12:23
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('Accounts', '0001_initial'),
]
operations = [
migrations.RemoveField(
mo... | [
"vvt5676@gmail.com"
] | vvt5676@gmail.com |
eaaaa0d8824cc670b4ad903fe69ed5ca32f2c0ab | c703b8ac3b5545857f6c95efa2d61eaf7a664021 | /iPERCore/tools/human_pose2d_estimators/openpose/dataset.py | 0bb0536d30befaa5bad1483400beaff9707f7918 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-proprietary-license",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | iPERDance/iPERCore | d29681d229b3098b3517b1abf4f7ea65f579de73 | fcf9a18ffd66bf3fdd3eea4153a3bc4785131848 | refs/heads/main | 2023-07-30T15:04:15.835396 | 2023-04-12T14:21:23 | 2023-04-12T14:21:23 | 313,664,064 | 2,520 | 339 | Apache-2.0 | 2023-05-12T03:26:52 | 2020-11-17T15:36:25 | Python | UTF-8 | Python | false | false | 2,564 | py | # Copyright (c) 2020-2021 impersonator.org authors (Wen Liu and Zhixin Piao). All rights reserved.
import numpy as np
import math
import cv2
import os
def normalize(img, img_mean, img_scale):
img = np.array(img, dtype=np.float32)
img = (img - img_mean) * img_scale
return img
def pad_width(img, stride, ... | [
"liuwen@shanghaitech.edu.cn"
] | liuwen@shanghaitech.edu.cn |
b079035a6e58641ea9ea4e0a3a16fa016762411c | b705fef880e38b657bae00148b8f91d7e5816fc9 | /nets/net.py | a5e92dd209ba0ea658f3bac362f41882a6b654ce | [] | no_license | rscv5/tframe | 4d6b89ed5bcb2e7d4ded9d7af0f36cbe09431e63 | 5d694326482b3190a97c4ba8ea4c60e7bb6eb657 | refs/heads/master | 2022-11-21T22:47:35.641339 | 2020-07-28T02:56:13 | 2020-07-28T02:56:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 18,579 | py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import tensorflow as tf
from tframe import console
from tframe.core import Function
from tframe import context
from tframe.layers.layer import Layer
from tframe.layers import Input
from tfra... | [
"willi4m@zju.edu.cn"
] | willi4m@zju.edu.cn |
2d191c757142a720141d3a5d96c2126e29b3ef28 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2094/60737/239642.py | 0098c5af191cc1c3f4d216f01622a587b1ca1811 | [] | 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 | 819 | py | def is_number(s):
s.strip()
if len(s)<1:
return False
i = 0
numstr = list(s)
if (numstr[i] == '+') or (numstr[i] == '-'):
i += 1
pcount = 0
dcount = 0
while (numstr[i].isdigit() or numstr[i] == '.') and (i<len(numstr)-1):
if numstr[i] == '.':
pcount +=... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
adca9735678e580feace8d4d2e07ce4733269084 | 999879f8d18e041d7fa313132408b252aded47f8 | /01-codes/scipy-master/scipy/stats/mstats.py | 90fbe30640d5e1062c6ca2064baf7cdf5d159f3c | [
"MIT"
] | permissive | QPanProjects/Surrogate-Model | ebcaf05728e82dcbcd924c2edca1b490ab085173 | 848c7128201218b0819c9665e2cec72e3b1d29ac | refs/heads/master | 2022-10-11T19:03:55.224257 | 2020-06-09T14:37:35 | 2020-06-09T14:37:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,827 | py | """
===================================================================
Statistical functions for masked arrays (:mod:`scipy.stats.mstats`)
===================================================================
.. currentmodule:: scipy.stats.mstats
This module contains a large number of statistical functions that can
be... | [
"quanpan302@hotmail.com"
] | quanpan302@hotmail.com |
16ddc0aaeea6e0a6e5a683e93612337aec6b10bb | 691e4890a070b18feb74e1bf817af8ebe9db342b | /V-Scrack/exp/payload/hikvision_default_password.py | d3453024c65e669d0aa9cde7fc9fc71dc845938c | [] | no_license | witchfindertr/Python-crack | 764af457b140fad4f28f259dc14c444d2445b287 | 88659e72e98d4cec0df52d2f5b4b9c8af35a39a6 | refs/heads/master | 2023-02-23T12:45:11.475706 | 2020-03-03T14:41:05 | 2020-03-03T14:41:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,108 | py | # coding: utf-8
import sys
import requests
import warnings
def verify(protocol,ip,port):
url = protocol + '://' + ip + ':' + str(port)
warnings.filterwarnings("ignore")
print('testing if hikvision default password admin+12345 vul')
headers = {
"User-Agent": "Mozilla/5.0 (Macintosh; U; Intel Ma... | [
"xianghgoog@gmail.com"
] | xianghgoog@gmail.com |
bb16ed90dc453ca90c077f239ce91588832f0a79 | 877eca8af51e43f7bd4c2766251152cd64846163 | /Disqus/templatetags/disqus.py | 560980b2a7aa0019a72f65a19d3842337ff305a0 | [] | no_license | dpitkevics/MyOpinion | 2a949aa5bf0c073b5b0cb564a1d7d827bd115375 | e81182c4a24d139501c82c430758e9e769b477b6 | refs/heads/master | 2020-12-24T17:18:09.334732 | 2015-05-05T14:16:47 | 2015-05-05T14:16:47 | 34,736,697 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,595 | py | from django.template import Library
from django.core.urlresolvers import reverse
from django.core.cache import get_cache
import time
from datetime import datetime
from Disqus import DisqusAPI, APIError
from MyOpinion import settings
register = Library()
cache = get_cache('default')
@register.assignment_tag()
def... | [
"daniels.pitkevics@gmail.com"
] | daniels.pitkevics@gmail.com |
0d8eefeb2c32ce6934de64e362e2edf8bb7317d9 | 637d2b471ab26a683cf67b259c58d2f9318a1bf2 | /McUtils/Jupyter/MoleculeGraphics.py | a627532b572d6f532022293d8715d70baebc0b3b | [
"MIT"
] | permissive | McCoyGroup/McUtils | 9c1c3befcef88d6094961e23a894efb4d97c84b1 | c7c3910e7cb5105c65b01ecb17a6668d126b2063 | refs/heads/master | 2023-08-18T16:24:17.718849 | 2023-08-11T23:10:21 | 2023-08-11T23:10:21 | 188,920,933 | 0 | 2 | MIT | 2022-12-15T19:17:02 | 2019-05-27T23:29:24 | Python | UTF-8 | Python | false | false | 9,179 | py |
import numpy as np
__all__ = [
"MoleculeGraphics"
]
class MoleculeGraphics:
def __init__(self,
atoms,
coords,
bonds=None,
displacements=None,
displacement_range=(-1, 1),
displacement_steps=5,
... | [
"b3m2a1@gmail.com"
] | b3m2a1@gmail.com |
480549448a7b184241c21a165d42e3a8e0a0271a | e845f7f61ff76b3c0b8f4d8fd98f6192e48d542a | /djangocg/db/backends/postgresql_psycopg2/creation.py | 40279f3b84b86e2377c9140cbc52db5d64624a57 | [
"BSD-3-Clause"
] | permissive | timothyclemans/djangocg | fd150c028013cb5f53f5a3b4fdc960a07fdaaa78 | 52cf28e046523bceb5d436f8e6bf61e7d4ba6312 | refs/heads/master | 2021-01-18T13:20:13.636812 | 2012-08-31T23:38:14 | 2012-08-31T23:38:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,133 | py | import psycopg2.extensions
from djangocg.db.backends.creation import BaseDatabaseCreation
from djangocg.db.backends.util import truncate_name
class DatabaseCreation(BaseDatabaseCreation):
# This dictionary maps Field objects to their associated PostgreSQL column
# types, as strings. Column-type strings can c... | [
"timothy.clemans@gmail.com"
] | timothy.clemans@gmail.com |
fe020d01e5f8b437325c08d1f4537a582e862ed4 | 029c1a47eca887e3ece82177287608d6f3649a9c | /lb/display.py | 0a46eda845c6dfa1644a182b9ce5327937f3be16 | [] | no_license | Eugeny/loop-bastard | 9bf4147d63b30c4b13793ae40d501cba95c8b714 | 78089e8cd67e9b517d6e3c7741453eaf5610af12 | refs/heads/master | 2021-02-26T12:04:38.102389 | 2020-04-12T16:41:40 | 2020-04-12T16:41:40 | 245,524,125 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 24,469 | py | import math
import os
import pygame
import pygame.font
import pygame.gfxdraw
import time
import threading
import sys
from lb.util import number_to_note
os.environ['SDL_VIDEO_CENTERED'] = '1'
def color_reduce(c):
return (c[0] // 2, c[1] // 2, c[2] // 2)
def draw_text_centered(surface, font, text, color, rect):
... | [
"john.pankov@gmail.com"
] | john.pankov@gmail.com |
20e848ad66bc4ecfd92b62c50a9ccdb374c6066c | 3e5487663e2aeb98972347cdbdac282617f601f8 | /releases/tests.py | d8e58602ea87d47161ce3386ca4f0be25f82207a | [] | no_license | areski/djangoproject.com | 58b652ecaea6e5ea130e226d164a111bb563e2a5 | 60a94e4a0dddc15d38bd7fd6db8568be8747c192 | refs/heads/master | 2021-01-18T11:03:49.893412 | 2014-08-05T14:03:20 | 2014-08-05T14:03:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 981 | py | from __future__ import absolute_import, unicode_literals
from django.contrib.redirects.models import Redirect
from django.test import TestCase
from .models import create_releases_up_to_1_5
class LegacyURLsTests(TestCase):
fixtures = ['redirects-downloads'] # provided by the legacy app
def test_le... | [
"aymeric.augustin@m4x.org"
] | aymeric.augustin@m4x.org |
570ec3cd5bad80c562187222d7de713a20453bd6 | 1f5420fda4359bfc21b53de3a5f6e6a93b47b996 | /ch06/ch6_602.py | f51eb0830ff133aac9bec233c9abb451e7456f50 | [] | no_license | fl0wjacky/wxPython | 600f5bfccad3ef5589e11573b30cffd1e2708b83 | 50b3cd5a63750d36065684b73aab0da70ff650a7 | refs/heads/master | 2022-09-02T04:24:47.540157 | 2022-08-10T04:13:17 | 2022-08-10T04:13:17 | 13,976,582 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 967 | py | #! /usr/bin/env python
# -*- coding:utf-8 -*-
import wx
from ch06_SketchWindow import SketchWindow
class SketchFrame(wx.Frame):
def __init__(self,parent):
wx.Frame.__init__(self,parent,-1,"Sketch Frame",size=(800,600))
self.sketch = SketchWindow(self,-1)
self.sketch.Bind(wx.EVT_MOTION,self... | [
"flowjacky@gmail.com"
] | flowjacky@gmail.com |
526e86ea2e6c5d4a2cbbde0385733b10715f7286 | 6364bb727b623f06f6998941299c49e7fcb1d437 | /msgraph-cli-extensions/src/bookings/azext_bookings/vendored_sdks/bookings/models/_bookings_enums.py | f3e4eb3e09f82254c59c047e3c1ef2715d2e5e7d | [
"MIT"
] | permissive | kanakanaidu/msgraph-cli | 1d6cd640f4e10f4bdf476d44d12a7c48987b1a97 | b3b87f40148fb691a4c331f523ca91f8a5cc9224 | refs/heads/main | 2022-12-25T08:08:26.716914 | 2020-09-23T14:29:13 | 2020-09-23T14:29:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 18,833 | 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 ... | [
"japhethobalak@gmail.com"
] | japhethobalak@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.