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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
861f15ba01e952a68448af0f114c2835c1095cb6 | f56b6d816532174baf6054db443a467143b250df | /FiloBlu/process.py | 6597c9175ba0d01116b8f86566a73574129c5c7b | [
"MIT"
] | permissive | Nico-Curti/FiloBluService | 61eddb6f5b8a4c1c3fa66ba84fc4a7e9e4d8eeda | 78fa802e37409b7826f2a5e96772fe79a5ba5e5a | refs/heads/master | 2020-05-23T05:47:38.590459 | 2020-01-23T17:16:17 | 2020-01-23T17:16:17 | 186,654,530 | 2 | 0 | NOASSERTION | 2020-01-09T16:35:52 | 2019-05-14T15:52:58 | Python | UTF-8 | Python | false | false | 4,610 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import time
__author__ = 'Nico Curti'
__email__ = 'nico.curti2@unibo.it'
# global variables that must be set and used in the following class
# The paths are relative to the current python file
DICTIONARY = os.path.abspath(os.path.join(os.path.dirname(__file__),... | [
"nico.curti2@unibo.it"
] | nico.curti2@unibo.it |
cdbb77434240451c649c927be9399be79278f4f5 | cc7b0e228b4a0717eedd5410a66f72039c8f6960 | /project/twitter/rest.py | 0b3eb658ab53d91c894d8203ea6abff91349bb93 | [] | no_license | lixiaochun/PyCrawler | 870740b93835749a071a1e07a5cac4a5051a091c | 7e7de51087c69d97649d78c31f9f70ab94d70383 | refs/heads/master | 2020-03-15T11:57:57.373199 | 2018-05-02T09:39:15 | 2018-05-02T09:39:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,645 | py | # -*- coding:UTF-8 -*-
"""
Twitter REST API
https://dev.twitter.com/rest/reference
@author: hikaru
email: hikaru870806@hotmail.com
如有问题或建议请联系
"""
from common import *
import base64
import json
import os
API_HOST = "https://api.twitter.com"
API_VERSION = "1.1"
ACCESS_TOKEN = None
token_file_path = os.path.join(os.path... | [
"hikaru870806@hotmail.com"
] | hikaru870806@hotmail.com |
82f9883b46dc46677116610f39d5554711370c56 | be0f3dfbaa2fa3d8bbe59229aef3212d032e7dd1 | /Gauss_v45r9/Gen/DecFiles/options/12215011.py | 81feb939e9f19c70ffcc6bcbccd5824ec589796b | [] | no_license | Sally27/backup_cmtuser_full | 34782102ed23c6335c48650a6eaa901137355d00 | 8924bebb935b96d438ce85b384cfc132d9af90f6 | refs/heads/master | 2020-05-21T09:27:04.370765 | 2018-12-12T14:41:07 | 2018-12-12T14:41:07 | 185,989,173 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,789 | py | # file /home/hep/ss4314/cmtuser/Gauss_v45r9/Gen/DecFiles/options/12215011.py generated: Fri, 27 Mar 2015 16:10:03
#
# Event Type: 12215011
#
# ASCII decay Descriptor: [ B+ -> mu+ mu- (K_1(1400)+ -> (X -> K+ pi- pi+)) ]cc
#
from Configurables import Generation
Generation().EventType = 12215011
Generation().SampleGenera... | [
"slavomirastefkova@b2pcx39016.desy.de"
] | slavomirastefkova@b2pcx39016.desy.de |
3658f5f515232b6535cfc3f3f5df886394dcc75a | 33518b9521d8e633010b0b9d1ea0f7a937437200 | /Python/pascals_triangle_ii/pascals_triangle_ii.py | 85eb1cf48a9472625f0d927e6f7711fe645c5be6 | [] | no_license | lqs4188980/CodingPractice | 977ddb69306c92a5e3df88f26572200622fad82a | c17653832269ab1bb3e411f7d74bef4c8e9985b3 | refs/heads/master | 2021-01-22T05:10:40.885490 | 2016-02-05T09:06:51 | 2016-02-05T09:06:51 | 25,272,652 | 0 | 1 | null | 2016-01-06T07:50:29 | 2014-10-15T20:40:34 | Java | UTF-8 | Python | false | false | 354 | py | # 1: 1
# 2: 1 1
# 3: 1 2 1
# 4: 1 3 3 1
class Solution(object):
def getRow(self, rowIndex):
row = [0] * (rowIndex + 1)
row[0] = 1
for i in range(rowIndex + 1):
prev = 0
for j in range(i+1):
tmp = row[j]
row[j] += prev
... | [
"xiaoqin.zhu.4@gmail.com"
] | xiaoqin.zhu.4@gmail.com |
8d3efb954b41d4cdf01b57e400aab6217641e7ef | dd3b8bd6c9f6f1d9f207678b101eff93b032b0f0 | /basis/AbletonLive10.1_MIDIRemoteScripts/OpenLabs/SpecialTransportComponent.py | 9cd5ad4f3d6a0974af0291a4d3f3ded2741e6e44 | [] | no_license | jhlax/les | 62955f57c33299ebfc4fca8d0482b30ee97adfe7 | d865478bf02778e509e61370174a450104d20a28 | refs/heads/master | 2023-08-17T17:24:44.297302 | 2019-12-15T08:13:29 | 2019-12-15T08:13:29 | 228,120,861 | 3 | 0 | null | 2023-08-03T16:40:44 | 2019-12-15T03:02:27 | Python | UTF-8 | Python | false | false | 3,873 | py | # uncompyle6 version 3.4.1
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.16 (v2.7.16:413a49145e, Mar 2 2019, 14:32:10)
# [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]
# Embedded file name: /Users/versonator/Jenkins/live/output/mac_64_static/Release/python-bundle/MIDI Remote Scripts/OpenLabs/Spe... | [
"jharrington@transcendbg.com"
] | jharrington@transcendbg.com |
949191d90fda07a28149027d4d0724a6f9933dad | 9e549ee54faa8b037f90eac8ecb36f853e460e5e | /venv/lib/python3.6/site-packages/requests/api.py | de38136491407780126771413bdb604e269beb90 | [
"MIT"
] | permissive | aitoehigie/britecore_flask | e8df68e71dd0eac980a7de8c0f20b5a5a16979fe | eef1873dbe6b2cc21f770bc6dec783007ae4493b | refs/heads/master | 2022-12-09T22:07:45.930238 | 2019-05-15T04:10:37 | 2019-05-15T04:10:37 | 177,354,667 | 0 | 0 | MIT | 2022-12-08T04:54:09 | 2019-03-24T00:38:20 | Python | UTF-8 | Python | false | false | 6,253 | py | # -*- coding: utf-8 -*-
"""
requests.api
~~~~~~~~~~~~
This module implements the Requests API.
:copyright: (c) 2012 by Kenneth Reitz.
:license: Apache2, see LICENSE for more details.
"""
from . import sessions
def request(method, url, **kwargs):
"""Constructs and sends a :class:`Request <Request>`.
:para... | [
"aitoehigie@gmail.com"
] | aitoehigie@gmail.com |
814cbdab73818496ae33f465eb65ca4f4532978a | 17a2963202dd4a8261b0db0629f44eb4ec0a87cb | /scrapy_demo/settings.py | ca5d73c2f759db3b38ecbb011c997b69296f1b1e | [] | no_license | maketubu7/scrapy_demo | 61089fe75444b3156dfc0dfd5f6fd363f7353901 | 1c0c36dadeae68032841453eba0ebf031665993b | refs/heads/master | 2023-01-06T18:04:07.246431 | 2020-11-11T09:03:21 | 2020-11-11T09:03:21 | 311,916,208 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,310 | py | # -*- coding: utf-8 -*-
# Scrapy settings for scrapy_demo project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://docs.scrapy.org/en/latest/topics/settings.html
# https://docs.scrapy.org/en/latest... | [
"601176930@qq.com"
] | 601176930@qq.com |
7b17232de8954cc217c0c9269ed8caaa1ba4fe8e | f8daf3972d5820945172005659cf0d7dfc1086d6 | /trunk/python/feeding_modules/ingredients_by_dish_storage.py | eebe000ad27c25161a32a1e31dcb2633288d3cb4 | [] | no_license | BGCX067/family-feeding-svn-to-git | ec2645a1f36da717783bf21b42e1227588c20de5 | bece6a73d4b6be9b29480c2bc7690b7e5e6961a4 | refs/heads/master | 2016-09-01T08:58:00.414527 | 2015-12-28T14:36:42 | 2015-12-28T14:36:42 | 48,759,877 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,087 | py | class ingredients_by_dish_storage :
def __init__ ( self ) :
self . _ingredients_by_dish = None
self . _consts = None
self . _re = None
def set_modules ( self , consts , re ) :
self . _consts = consts
self . _re = re
def get ( self ) :
return self . _ingredient... | [
"you@example.com"
] | you@example.com |
7d5ccfce3809cde8fda8b2041c7df122dd0d1231 | 7fdf76ac241714a223ae049278287fd33cab2769 | /40-practical.py | 4a8fdd8c95b0f6c912f853a0a27fbb98af508515 | [] | no_license | ajaybhatia/python-practical-2020 | 9c0aa15c8e3985f4af6716028af0332e58780554 | 6e8310a84a0f18427c248efaf179ff76f50414e3 | refs/heads/master | 2023-01-19T13:45:26.335828 | 2020-11-20T05:03:41 | 2020-11-20T05:03:41 | 292,453,610 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 643 | py | '''
Practical 40
Construct a Python program to write and append text to a file and display the text.
'''
from os import getcwd
filename = "/tmp/names.txt"
try:
file = open(filename, "a")
# Write names in a file "/tmp/names.txt"
while True:
name = input("Enter a name: ")
if name == "0":
break
... | [
"prof.ajaybhatia@gmail.com"
] | prof.ajaybhatia@gmail.com |
0efed9264a2bb7f084086f644c2111d8902ce4e2 | 8f64d50494507fd51c0a51010b84d34c667bd438 | /BeautyForMe/myvenv/Lib/site-packages/win32comext/shell/demos/IShellLinkDataList.py | bf52f781c45e27794f26bffce8da383cc5c62bc1 | [
"MIT"
] | permissive | YooInKeun/CAU_CSE_Capstone_3 | 5a4a61a916dc13c8635d25a04d59c21279678477 | 51405c4bed2b55661aa0708c8acea17fe72aa701 | refs/heads/master | 2022-12-11T15:39:09.721019 | 2021-07-27T08:26:04 | 2021-07-27T08:26:04 | 207,294,862 | 6 | 1 | MIT | 2022-11-22T04:52:11 | 2019-09-09T11:37:13 | Python | UTF-8 | Python | false | false | 1,666 | py | from win32com.shell import shell, shellcon
import pythoncom, win32api, os, sys
temp_dir=win32api.GetTempPath()
linkname=win32api.GetTempFileName(temp_dir,'cmd')[0]
os.remove(linkname)
linkname+='.lnk'
print('Link name:',linkname)
ish=pythoncom.CoCreateInstance(shell.CLSID_ShellLink, None,
pythoncom.CLSCTX_INPROC_SERV... | [
"keun0390@naver.com"
] | keun0390@naver.com |
f6a46eb065ef80c1559c9bdc9ecc8000c50b019d | 392d16a4efcfe85ca99c82f816bdb37de8821098 | /builtin_packages/datetime_sp/datetime_operation.py | a007315f3182c58d312b0de8b5d0c60b465892fa | [] | no_license | binderclip/code-snippets-python | a62305157c179748a80e8d7afa08178133465e6b | 5b5381afd19dbd3c511d79a1d207c4a1789c0367 | refs/heads/master | 2022-12-11T08:34:45.373978 | 2021-11-27T08:38:04 | 2021-11-27T08:38:04 | 109,646,422 | 26 | 8 | null | 2022-12-09T05:21:26 | 2017-11-06T04:10:19 | Python | UTF-8 | Python | false | false | 376 | py | import datetime
def main():
dt1 = datetime.datetime(2018, 6, 27)
dt2 = datetime.datetime(2018, 6, 28)
print('max: {}'.format(max(dt1, dt2)))
print('minus: {}'.format(dt1 - dt2))
# print('plus: {}'.format(dt1 + dt2)) # TypeError: unsupported operand type(s) for +: 'datetime.datetime' and 'dat... | [
"binderclip2014@gmail.com"
] | binderclip2014@gmail.com |
fa2b6ac1485395e04c0cb2535f099dde7990656b | 0b4e3df18811a0de6e2e91e7efe1afc1ac635489 | /pyshanb/utils.py | 2f076ffd657f5868bc01b7d1d7ec17bf95b9d534 | [
"MIT"
] | permissive | mozillazg/PyShanb | 0c50d4d9554385041ba4b9df93f485e16b6540cd | 40aa7ef21a6413fd2c722b451395f29283bb7949 | refs/heads/dev | 2023-08-23T21:16:52.104501 | 2014-04-01T13:20:16 | 2014-04-01T13:20:16 | 6,542,229 | 17 | 5 | MIT | 2018-03-05T01:08:52 | 2012-11-05T09:58:31 | Python | UTF-8 | Python | false | false | 3,588 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""一些功能函数
"""
import os
from getpass import getpass
from .cmdoption import CmdOption
from .conf import Settings
# Modified from https://github.com/webpy/webpy/blob/master/web/utils.py
class Storage(dict):
"""A Storage object is like a dictionary except `obj.foo` c... | [
"opensource.mozillazg@gmail.com"
] | opensource.mozillazg@gmail.com |
4c47324bc0e1d6065d40f28039ef03d9630a3096 | 01f4d1a2972887bbd1482ade4e253e0bc4373cd5 | /check.py | 7eac3e308ec347e8a4d4efea0e46bda86e84a33b | [] | no_license | 1024Person/ProxyPool | cdabe5d6e29fd98109e4ae1dbb86391bb511310f | cd314cf1fded46b15708d56e8cb85c2099384a6e | refs/heads/main | 2023-03-21T19:16:30.370551 | 2021-03-06T07:27:40 | 2021-03-06T07:27:40 | 344,514,686 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,872 | py | # 检测模块
from poolclient import PoolClient
from setting import test_url,test_headers,USER_AGENT_LIST,check_max_worker,csv_file_path,good_ips_file_path
from random import choice
from concurrent.futures import ThreadPoolExecutor
import requests
class CheckIp():
# 参数:check_max_worker: 线程池中的线程数,默认是从settings中引入的100个,可以修... | [
"239903524@qq.com"
] | 239903524@qq.com |
95a5dfd878c46a91038a0a3438cec95df558968e | bb33e6be8316f35decbb2b81badf2b6dcf7df515 | /source/res/scripts/common/goodies/goodie_constants.py | 8e816e66038e66d865b8418dd4dcf2b5fa3bc7c4 | [] | no_license | StranikS-Scan/WorldOfTanks-Decompiled | 999c9567de38c32c760ab72c21c00ea7bc20990c | d2fe9c195825ececc728e87a02983908b7ea9199 | refs/heads/1.18 | 2023-08-25T17:39:27.718097 | 2022-09-22T06:49:44 | 2022-09-22T06:49:44 | 148,696,315 | 103 | 39 | null | 2022-09-14T17:50:03 | 2018-09-13T20:49:11 | Python | UTF-8 | Python | false | false | 1,243 | py | # Python bytecode 2.7 (decompiled from Python 2.7)
# Embedded file name: scripts/common/goodies/goodie_constants.py
MAX_ACTIVE_GOODIES = 3
class GOODIE_STATE:
INACTIVE = 0
ACTIVE = 1
USED = 2
class GOODIE_VARIETY:
DISCOUNT = 0
BOOSTER = 1
DEMOUNT_KIT = 2
RECERTIFICATION_FORM = 3
DISCO... | [
"StranikS_Scan@mail.ru"
] | StranikS_Scan@mail.ru |
f40951ca21c7c8bd3b03ea03a2771195723484ff | 556db265723b0cc30ad2917442ed6dad92fd9044 | /tensorflow/python/kernel_tests/random/multinomial_op_big_test.py | 8e2a734c8171d890fc2159029bc3b7940da1fdee | [
"MIT",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | graphcore/tensorflow | c1669b489be0e045b3ec856b311b3139858de196 | 085b20a4b6287eff8c0b792425d52422ab8cbab3 | refs/heads/r2.6/sdk-release-3.2 | 2023-07-06T06:23:53.857743 | 2023-03-14T13:04:04 | 2023-03-14T13:48:43 | 162,717,602 | 84 | 17 | Apache-2.0 | 2023-03-25T01:13:37 | 2018-12-21T13:30:38 | C++ | UTF-8 | Python | false | false | 3,624 | 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... | [
"gardener@tensorflow.org"
] | gardener@tensorflow.org |
7db94008661c38b8142fa16719f0287d2a459e82 | 9b64f0f04707a3a18968fd8f8a3ace718cd597bc | /huaweicloud-sdk-kms/huaweicloudsdkkms/v1/model/enable_key_request.py | 5b879f74aab865beeda3267d42cd6356f98b8914 | [
"Apache-2.0"
] | permissive | jaminGH/huaweicloud-sdk-python-v3 | eeecb3fb0f3396a475995df36d17095038615fba | 83ee0e4543c6b74eb0898079c3d8dd1c52c3e16b | refs/heads/master | 2023-06-18T11:49:13.958677 | 2021-07-16T07:57:47 | 2021-07-16T07:57:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,306 | py | # coding: utf-8
import re
import six
class EnableKeyRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in d... | [
"hwcloudsdk@huawei.com"
] | hwcloudsdk@huawei.com |
b1084a090a7ff81f0b9175324a0fccd57c80d89f | f1a6013a41ea5d49e034d1932991ef039e767e34 | /utils/pycraft/networking/types/enum.py | 61aa2384964941e48560e53764ea808ae78b02e9 | [
"Apache-2.0"
] | permissive | Merrg1n/PCRC | a544c234ea1eea79bb6fb235cc610d14090d6a7f | 0af9f6d3a1f9f2e0b78b71241176968b0e5983af | refs/heads/master | 2023-01-24T01:16:57.956263 | 2020-06-18T09:10:11 | 2020-06-18T09:10:11 | 256,414,160 | 2 | 1 | Apache-2.0 | 2020-04-30T04:01:53 | 2020-04-17T05:54:22 | Python | UTF-8 | Python | false | false | 3,179 | py | """Types for enumerations of values occurring in packets, including operations
for working with these values.
The values in an enum are given as class attributes with UPPERCASE names.
These classes are usually not supposed to be instantiated, but sometimes an
instantiatable class may subclass Enum to prov... | [
"yqx791125833@gmail.com"
] | yqx791125833@gmail.com |
a019180e0075ec7252a926b93dd4c554d208df3b | c7a6f8ed434c86b4cdae9c6144b9dd557e594f78 | /ECE364/.PyCharm40/system/python_stubs/348993582/gio/_gio/DataStreamNewlineType.py | c4d1842167c838cc909223916099ae59e915cb29 | [] | no_license | ArbalestV/Purdue-Coursework | 75d979bbe72106975812b1d46b7d854e16e8e15e | ee7f86145edb41c17aefcd442fa42353a9e1b5d1 | refs/heads/master | 2020-08-29T05:27:52.342264 | 2018-04-03T17:59:01 | 2018-04-03T17:59:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 736 | py | # encoding: utf-8
# module gio._gio
# from /usr/lib64/python2.6/site-packages/gtk-2.0/gio/_gio.so
# by generator 1.136
# no doc
# imports
import gio as __gio
import glib as __glib
import gobject as __gobject
import gobject._gobject as __gobject__gobject
class DataStreamNewlineType(__gobject.GEnum):
# no doc
... | [
"pkalita@princeton.edu"
] | pkalita@princeton.edu |
5b327ff182d5d14550e1064d5c2185b50eca57df | 297497957c531d81ba286bc91253fbbb78b4d8be | /testing/web-platform/tests/webdriver/tests/bidi/__init__.py | 5cf37be6f9713640cde99d8b18bff4479093afbd | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | marco-c/gecko-dev-comments-removed | 7a9dd34045b07e6b22f0c636c0a836b9e639f9d3 | 61942784fb157763e65608e5a29b3729b0aa66fa | refs/heads/master | 2023-08-09T18:55:25.895853 | 2023-08-01T00:40:39 | 2023-08-01T00:40:39 | 211,297,481 | 0 | 0 | NOASSERTION | 2019-09-29T01:27:49 | 2019-09-27T10:44:24 | C++ | UTF-8 | Python | false | false | 3,290 | py | from typing import Any, Callable, Dict
from webdriver.bidi.modules.script import ContextTarget
def recursive_compare(expected: Any, actual: Any) -> None:
if callable(expected):
expected(actual)
return
assert type(expected) == type(actual)
if type(expected) is list:
assert len(... | [
"mcastelluccio@mozilla.com"
] | mcastelluccio@mozilla.com |
8e1242fb0e5ba86f9c53c43d6463a61f6ac9212d | bbf1ae079309eca11270422d3f0d259d1515d430 | /numerical-tours/python/nt_solutions/ml_4_sgd/exo4.py | a9a0d7a44a6ba0f8f26665a55f1a3befa8b1563f | [
"BSD-2-Clause"
] | permissive | ZichaoDi/Di_MATLABTool | 5e6a67b613c4bcf4d904ddc47c2744b4bcea4885 | c071291c63685c236f507b2cb893c0316ab6415c | refs/heads/master | 2021-08-11T07:28:34.286526 | 2021-08-04T18:26:46 | 2021-08-04T18:26:46 | 149,222,333 | 9 | 5 | null | null | null | null | UTF-8 | Python | false | false | 1,091 | py | tau = .002/n
ElistG = np.zeros( ( int(niter/err_rate), nsamples) )
for irun in np.arange(0,nsamples):
w = np.zeros( (p,1) )
G = np.zeros( (p,n) ) # keep track of gradients
g = np.zeros( (p,1) )
for it in np.arange(0,niter):
if np.mod(it,err_rate)==1:
ElistG[ int(it/err_rate),irun ] =... | [
"wendydi@compute001.mcs.anl.gov"
] | wendydi@compute001.mcs.anl.gov |
947d0c8aea8acf28e458806c3f6e092fc46c7f4f | 9063052d8e2c294efa3b501d42aef2ac59d84fa0 | /codingPractice/python/리스트배열.py | 7e7e3af621c60fc3cdba6e367467891d40774964 | [] | no_license | yes99/practice2020 | ffe5502d23038eabea834ebc2b18ff724f849c4a | 100ac281f4fe6d0f991213802fbd8524451f1ac2 | refs/heads/master | 2021-07-08T00:54:19.728874 | 2021-06-13T05:52:07 | 2021-06-13T05:52:07 | 245,789,109 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 583 | py | gold = ["박인비", "오혜리", "김소희", "구본찬", "장혜진", "기보배", "진종오", "박상영", "최미선", "김우진", "이승윤"]
silver = ["김종현", "안바울", "정보경"]
iron = ["차동민", "이태훈", "정경은", "신승찬"]
print("금메달 리스트")
print(gold)
print("은메달 리스트")
print(silver)
print("동메달 리스트")
print(iron)
print(gold[0])
print(silver[1:2])
print(iron[:5])
gold[1] = "오혜리2"
print(gol... | [
"yes950324@naver.com"
] | yes950324@naver.com |
a3da7aaf43b349eb9cfafdd0d2439095ae10b4c0 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/verbs/_patches.py | 25782f805aa8ebaefc49a490339be3c69495d80c | [
"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 | 233 | py |
from xai.brain.wordbase.verbs._patch import _PATCH
#calss header
class _PATCHES(_PATCH, ):
def __init__(self,):
_PATCH.__init__(self)
self.name = "PATCHES"
self.specie = 'verbs'
self.basic = "patch"
self.jsondata = {}
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
40638c5b6177ae097333ebc52d7fc8c752ed6428 | 583fdb9f37dea28ada24e335f1e44ba6cf587770 | /多线程/1114 按序打印.py | 8f732076821bc5c73d9944b3679d5b9ff3256511 | [] | no_license | Ford-z/LeetCode | 8c4c30eeaa3d8f02b24c8d0058c60f09c3a6debe | 88eeca3780b4dc77efce4f14d317ed1c872cf650 | refs/heads/master | 2021-11-21T00:51:05.314084 | 2021-09-16T15:45:18 | 2021-09-16T15:45:18 | 194,425,542 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,403 | py | 我们提供了一个类:
public class Foo {
public void first() { print("first"); }
public void second() { print("second"); }
public void third() { print("third"); }
}
三个不同的线程 A、B、C 将会共用一个 Foo 实例。
一个将会调用 first() 方法
一个将会调用 second() 方法
还有一个将会调用 third() 方法
请设计修改程序,以确保 second() 方法在 first() 方法之后被执行,third() 方法在 second() 方法之后被执行。
... | [
"noreply@github.com"
] | Ford-z.noreply@github.com |
a5b460ebd46a40b3cf4f710cd39b082a851aadd9 | 623c053e83ae0641523d777987a438abd7d67c09 | /infra02_blast_info_proc.py | 34dc557032a8782bf6c8bb7f8b3280a7ab1435ca | [] | no_license | friedpine/BioModule | 601a8d3064fea1e60311a6ce4a3a7114166a98e7 | 59086d9e484c45ac0406099c0f68be8e5e617802 | refs/heads/master | 2021-01-01T17:31:45.190621 | 2015-02-02T06:58:55 | 2015-02-02T06:58:55 | 21,689,668 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,194 | py | import re,os,sys
import subprocess
sys.path.append('/data/Analysis/fanxiaoying/project/project01_polyA-RNAseq/modules')
import infra01_pos2info as in01
def blast_fastas(fa_db,fa_target,dbfile,outfile,evalue,wordsize):
print "Begin Blasting!"
cmd1 = "/data/Analysis/fanxiaoying/software/ncbi-blast-2.2.28+/bin/makeblas... | [
"friedpine@gmail.com"
] | friedpine@gmail.com |
381eea3f35bcda39830a030b2fa50af90ff2ab13 | daffa2518efcf00aec9d798c7e32cbb53bd66f01 | /fragmenstein/victor/_victor_mode.py | 9f0914654d2402a248066a05322bc48b87b4ff6a | [
"MIT"
] | permissive | matteoferla/Fragmenstein | 9023235594a002458f7d46eaa8344f3b5df54fb2 | c03945c089beec35b7aabb83dc1efd9cc57ac281 | refs/heads/master | 2023-09-01T09:40:52.695247 | 2023-08-30T06:30:22 | 2023-08-30T06:30:22 | 254,173,036 | 120 | 10 | MIT | 2023-07-06T23:08:02 | 2020-04-08T18:48:30 | Python | UTF-8 | Python | false | false | 338 | py | import enum
class VictorMinMode(enum.Enum):
"""Victor mode for minimisation
TODO this is not used yet
"""
NULL = -1 #: no minimisation at all
IGOR = 0 #: use Igor's minimisation (PyRosetta)
IGOR_NODISK = 1 #: use Igor's minimisation without writing to disk
FRITZ = 2 #: use Fritz's mini... | [
"matteo.ferla@gmail.com"
] | matteo.ferla@gmail.com |
4d07e3354d036c43888b12b846be7bc48a1d0f97 | 527a8837c449d7fd0ccacf33cd6e6be0d6308038 | /postAnalysis/combineArffs.py | 046b297815849f6e17cea1a83ecc64030741dba0 | [] | no_license | nparslow/L2FrenchWritingAnalyser | c4539cf67f6885224d83890c31d95080c49fa175 | 6708e560d65120d1946f1d08a460ca8fe97a548f | refs/heads/master | 2020-12-07T03:50:12.090153 | 2015-07-18T18:28:12 | 2015-07-18T18:28:12 | 39,304,412 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,792 | py | import codecs
import re
__author__ = 'nparslow'
def readarff( filename ):
vars = []
rows = []
header = ""
with codecs.open( filename, mode="r", encoding="utf8") as f1:
indata = False
for line in f1:
if line.lower().startswith("@attribute"):
att, name, typ = ... | [
"nparslow@yahoo.com.au"
] | nparslow@yahoo.com.au |
0a34545753e9dae7e7f451a5885ac854f7f9310c | be5d853783fab4162981c460c35856bf44bf2148 | /mayan/apps/quotas/tests/test_hooks.py | b700c3a9e5d8e422d53b5c8f22e742b1ece03aba | [
"Apache-2.0"
] | permissive | Hita-K/Mayan-EDMS | 50900189cf504807aa6e41d72fd8e4fc50d5d5b3 | a5b691b28f765d9eea7bf6b2016657c943fbbe4a | refs/heads/master | 2023-08-29T08:20:58.859259 | 2021-11-08T04:40:39 | 2021-11-08T04:40:39 | 295,247,959 | 0 | 0 | NOASSERTION | 2021-11-08T04:40:40 | 2020-09-13T22:21:57 | Python | UTF-8 | Python | false | false | 4,315 | py | import logging
from mayan.apps.common.tests.base import GenericViewTestCase
from mayan.apps.documents.models.document_models import Document
from mayan.apps.documents.permissions import (
permission_document_create, permission_document_new_version
)
from mayan.apps.documents.tests.base import DocumentTestMixin
fro... | [
"roberto.rosario@mayan-edms.com"
] | roberto.rosario@mayan-edms.com |
bf4d1ed9fc87262204919ea3353d134aad41ab79 | 30eb942d849dab9250bbd541a8d7128d15be8556 | /rimware_impl/peripheral_simulator/characteristics/DeviceInfo.py | f90cbb756673fe3a8f42f6ed4623ff64bea671bd | [] | no_license | cjhuo/Lab_projects-EcoBT-HOST-N-SERVER | 55e42b1e4d5f88bc978f5b6c07ab3798626a88fa | 396cb823ed74552985f4afa157fe3887afe48b65 | refs/heads/master | 2020-06-06T12:25:23.111232 | 2014-01-31T07:03:02 | 2014-01-31T07:03:02 | 26,940,140 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,461 | py | '''
Created on Jan 25, 2014
@author: cjhuo
'''
from Foundation import *
#from PyObjCTools import AppHelper
from config_peripheral import *
from objc import *
import struct, binascii
from Characteristic import Characteristic
class DeviceInfo(Characteristic):
def initializeInstance(self):
p... | [
"chengjia.huo@gmail.com"
] | chengjia.huo@gmail.com |
985bbe4a43dea75355373e07eedc193387f121d0 | 98cb310b3a8dea5e07dc2359a07ef623e9a153d1 | /web-env/bin/html2text | e2e734afa81cc52de74bedd9ed310e0c7fce4171 | [
"MIT"
] | permissive | Amirsorouri00/web-search-engine | 6c600fb924f3b2e883f746e8075e33954effcc79 | 00bf463b29490f5285ee44cd351c6de131f04f3a | refs/heads/master | 2020-06-01T12:46:37.612714 | 2019-07-24T14:25:54 | 2019-07-24T14:25:54 | 190,783,910 | 0 | 0 | MIT | 2019-06-07T17:30:51 | 2019-06-07T17:30:51 | null | UTF-8 | Python | false | false | 308 | #!/home/amirsorouri00/Desktop/search-engine/myproject/ui/search-engine/web-search-engine/web-env/bin/python3.7
# -*- coding: utf-8 -*-
import re
import sys
from html2text.cli import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"amirsorouri26@gmail.com"
] | amirsorouri26@gmail.com | |
d1450be5d59eb3da24bfbe1d94a664b1aa7aeebe | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_leaved.py | bdb9559efe761b1e3540d4581ec7bf021b77e9ab | [
"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 | 231 | py |
from xai.brain.wordbase.nouns._leave import _LEAVE
#calss header
class _LEAVED(_LEAVE, ):
def __init__(self,):
_LEAVE.__init__(self)
self.name = "LEAVED"
self.specie = 'nouns'
self.basic = "leave"
self.jsondata = {}
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
e29494b2115d7a7c7d0572aa10dc2e2accfe0c66 | ef875440cf82b6eed61bf6d9d0c6acfae5f90ef4 | /Assument/1.py | a444598961f3afee6b63ec45bdecaa2c7788745a | [] | no_license | Nitesh101/test | 5ab9b1e23167f8496d90d15484d57328b7f1430e | 4c413b3a056a633c5bcf93ae21c999ff67eeaa95 | refs/heads/master | 2020-03-29T09:04:32.723099 | 2018-09-21T09:33:41 | 2018-09-21T09:33:41 | 149,740,238 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 147 | py | x = int(input("Enter a x value : "))
y = int(input("Enter a y value : "))
for i in range(1,x+1):
for j in range(1,y+1):
print i*j,
print "\n"
| [
"m.veeranitesh@gmail.com"
] | m.veeranitesh@gmail.com |
eef711bdb5d2e6ade393c56e5b4d273b3421f4be | 3f7d5999bb7e5a75454c8df2c5a8adcd1a8341ff | /tests/unit/modules/network/fortios/test_fortios_log_webtrends_setting.py | 769546de3cc54d9be79f8ace802727bdb7211b7d | [] | no_license | ansible-collection-migration/ansible.fortios | f7b1a7a0d4b69c832403bee9eb00d99f3be65e74 | edad6448f7ff4da05a6c856b0e7e3becd0460f31 | refs/heads/master | 2020-12-18T13:08:46.739473 | 2020-02-03T22:10:49 | 2020-02-03T22:10:49 | 235,393,556 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,106 | py | # Copyright 2019 Fortinet, Inc.
#
# 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.
#
# This program is distributed in the... | [
"ansible_migration@example.com"
] | ansible_migration@example.com |
7bba4954b0a42558a69b51b0de935e1b954ee6d7 | cc1ca9bd521e74905ce5c251c1c199772a85f457 | /c7n/filters/health.py | fd0197698f705dde5c5639ee66b96dbde0a7293f | [
"Apache-2.0"
] | permissive | anup19991/cloud-custodian | 17d2899a8f7875f4a309fd9189f152e8411a9fcb | b9d7083f8688d41950d264526d064b62d030ed9b | refs/heads/master | 2021-01-18T14:42:21.899375 | 2018-02-11T01:15:22 | 2018-02-11T01:15:22 | 89,010,520 | 0 | 0 | null | 2017-04-21T18:01:54 | 2017-04-21T18:01:54 | null | UTF-8 | Python | false | false | 3,523 | py | # Copyright 2016 Capital One Services, 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... | [
"kapilt@gmail.com"
] | kapilt@gmail.com |
3d2c196a911f8a01f1c1859e684b2e8d2cb128c1 | ccf94dcb6b1500fcbbd56964ae8c4832a496b8b3 | /python/baiduads-sdk-auto/test/test_get_label_data_request_wrapper.py | 15931040218f882420fd9f73bfbedbf4b353fd59 | [
"Apache-2.0"
] | permissive | baidu/baiduads-sdk | 24c36b5cf3da9362ec5c8ecd417ff280421198ff | 176363de5e8a4e98aaca039e4300703c3964c1c7 | refs/heads/main | 2023-06-08T15:40:24.787863 | 2023-05-20T03:40:51 | 2023-05-20T03:40:51 | 446,718,177 | 16 | 11 | Apache-2.0 | 2023-06-02T05:19:40 | 2022-01-11T07:23:17 | Python | UTF-8 | Python | false | false | 984 | py | """
dev2 api schema
'dev2.baidu.com' api schema # noqa: E501
Generated by: https://openapi-generator.tech
"""
import sys
import unittest
import baiduads
from baiduads.common.model.api_request_header import ApiRequestHeader
from baiduads.videodata.model.label_data_request import LabelDataRequest
globals()[... | [
"jiangyuan04@baidu.com"
] | jiangyuan04@baidu.com |
6f3406da83fa8c0692c04a30a556eac010749755 | 95495baeb47fd40b9a7ecb372b79d3847aa7a139 | /test/test_prefer_life_time.py | e4414159a58df5761302ecb4da13ca46c2fb3b58 | [] | no_license | pt1988/fmc-api | b1d8ff110e12c13aa94d737f3fae9174578b019c | 075f229585fcf9bd9486600200ff9efea5371912 | refs/heads/main | 2023-01-07T09:22:07.685524 | 2020-10-30T03:21:24 | 2020-10-30T03:21:24 | 308,226,669 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,194 | py | # coding: utf-8
"""
Cisco Firepower Management Center Open API Specification
**Specifies the REST URLs and methods supported in the Cisco Firepower Management Center API. Refer to the version specific [REST API Quick Start Guide](https://www.cisco.com/c/en/us/support/security/defense-center/products-programmi... | [
"pt1988@gmail.com"
] | pt1988@gmail.com |
acc28517932c94119c7bdabb55a776e1622cd13c | 3637fe729395dac153f7abc3024dcc69e17f4e81 | /reference/ucmdb/discovery/plugins_weblogic_server_domain.py | 8f752e1bf03c9a7c22e458a8f667ce33641411a7 | [] | no_license | madmonkyang/cda-record | daced6846c2456f20dddce7f9720602d1583a02a | c431e809e8d0f82e1bca7e3429dd0245560b5680 | refs/heads/master | 2023-06-15T08:16:46.230569 | 2021-07-15T16:27:36 | 2021-07-15T16:27:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,831 | py | #coding=utf-8
from plugins import Plugin
from appilog.common.system.types.vectors import ObjectStateHolderVector
from appilog.common.system.types import ObjectStateHolder
import ip_addr
import netutils
import weblogic
import modeling
import weblogic_by_shell
import jee
import file_system
from java.lang import Exceptio... | [
"silentbalanceyh@126.com"
] | silentbalanceyh@126.com |
834f4414c63dd5c819065c0268b730a14f7cb13b | 14373275670c1f3065ce9ae195df142146e2c1a4 | /stubs/influxdb-client/influxdb_client/domain/import_declaration.pyi | 559312f7d5ec4379c951710d415c7ad89c794866 | [
"Apache-2.0",
"MIT"
] | permissive | sobolevn/typeshed | eb7af17c06a9722f23c337e6b9a4726223155d58 | d63a82640390a9c130e0fe7d409e8b0b836b7c31 | refs/heads/master | 2023-08-04T05:59:29.447015 | 2023-06-14T21:27:53 | 2023-06-14T21:27:53 | 216,265,622 | 2 | 0 | Apache-2.0 | 2022-02-08T10:40:53 | 2019-10-19T20:21:25 | Python | UTF-8 | Python | false | false | 585 | pyi | from _typeshed import Incomplete
class ImportDeclaration:
openapi_types: Incomplete
attribute_map: Incomplete
discriminator: Incomplete
def __init__(self, type: Incomplete | None = None, _as: Incomplete | None = None, path: Incomplete | None = None) -> None: ...
@property
def type(self): ...
... | [
"noreply@github.com"
] | sobolevn.noreply@github.com |
f8d0456a377fac7fe3c6207cc8e28e80690af499 | 0ca435ec92edb5c580c994c29dcab552bfdbc817 | /setup.py | 4987fdd5cddad4d35abe5c3b3eeac2821ff7d15f | [
"BSD-3-Clause"
] | permissive | gabrielhurley/django-wymeditor | 4a28027ce4e5a41ae42cb9c2923c14846fd51dcf | 1f45ce696688ee6e849e8dfafd7d55a1bcd4b045 | refs/heads/master | 2020-06-05T00:11:58.352380 | 2013-10-23T21:05:03 | 2013-10-23T21:05:03 | 1,621,672 | 0 | 2 | BSD-3-Clause | 2018-08-13T22:44:22 | 2011-04-16T01:48:23 | JavaScript | UTF-8 | Python | false | false | 983 | py | from setuptools import setup, find_packages
setup(name='django-wymeditor',
version='1.0',
description='A Django application that contains a widget to render a form field with a WYMEditor interface.',
long_description=open('README.rst').read(),
author='Gabriel Hurley',
author_email='gabriel@strikeaw... | [
"gabriel@strikeawe.com"
] | gabriel@strikeawe.com |
2f62aa7e8a4bdb96e448450594d045f0ccf6d831 | 907b3bbd44c95be1542a36feaadb6a71b724579f | /files/usr/google-cloud-sdk/.install/.backup/lib/surface/compute/scp.py | cd2981521d71cab0a31aa56c33a8dabdd0d6aa96 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | vo0doO/com.termux | 2d8f536c1a5dbd7a091be0baf181e51f235fb941 | c97dd7b906e5ef3ec157581fd0bcadd3e3fc220e | refs/heads/master | 2020-12-24T09:40:30.612130 | 2016-11-21T07:47:25 | 2016-11-21T07:47:25 | 73,282,539 | 2 | 2 | null | 2020-07-24T21:33:03 | 2016-11-09T12:33:01 | Python | UTF-8 | Python | false | false | 6,781 | py | # Copyright 2014 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... | [
"kirsanov.bvt@gmail.com"
] | kirsanov.bvt@gmail.com |
79bf5943ed0355ff765fec1898ec3a9f95176f7d | b3c47795e8b6d95ae5521dcbbb920ab71851a92f | /Nowcoder/剑指Offer/重建二叉树.py | c113259f8d4086abb6711c6d00a80c6348dd2027 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | Wizmann/ACM-ICPC | 6afecd0fd09918c53a2a84c4d22c244de0065710 | 7c30454c49485a794dcc4d1c09daf2f755f9ecc1 | refs/heads/master | 2023-07-15T02:46:21.372860 | 2023-07-09T15:30:27 | 2023-07-09T15:30:27 | 3,009,276 | 51 | 23 | null | null | null | null | UTF-8 | Python | false | false | 532 | py | # -*- coding:utf-8 -*-
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
# 返回构造的TreeNode根节点
def reConstructBinaryTree(self, pre, tin):
if not pre:
return None
rv = pre.pop(0)
ri = tin.i... | [
"noreply@github.com"
] | Wizmann.noreply@github.com |
940fbf84801f94dd628850923b61ce9e97a7efe4 | 61c109344f8bcb822168152cc16c11d05cf6aa70 | /django_coverage_plugin/plugin.py | 50800f39f54eebb095f6dc3e480f973be846851b | [] | no_license | rfleschenberg/django_coverage_plugin | 61a291b0321cb2c3b78ec8bb6719fb550ca35d44 | ef46934b55043dbbb8f6a21f60e26477ce7fc8ec | refs/heads/master | 2021-01-18T20:27:34.806564 | 2015-01-16T00:09:28 | 2015-01-16T00:09:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,464 | py | """The Django coverage plugin."""
from __future__ import print_function, unicode_literals
import os.path
from six.moves import range
import coverage.plugin
import django
from django.template import Lexer, TextNode
from django.template.base import TOKEN_MAPPING
from django.template import TOKEN_BLOCK, TOKEN_TEXT, TO... | [
"ned@nedbatchelder.com"
] | ned@nedbatchelder.com |
be12fe914a5b9c2f4e1eab08f952edf9dd0ae710 | 6929a33a7259dad9b45192ca088a492085ed2953 | /solutions/0475-heaters/heaters.py | 2c9655d2847642ea56cf9df3c164610f4b6ae8c5 | [] | no_license | moqi112358/leetcode | 70366d29c474d19c43180fd4c282cc02c890af03 | fab9433ff7f66d00023e3af271cf309b2d481722 | refs/heads/master | 2022-12-10T01:46:14.799231 | 2021-01-14T05:00:09 | 2021-01-14T05:00:09 | 218,163,960 | 3 | 0 | null | 2022-07-06T20:26:38 | 2019-10-28T23:26:47 | Python | UTF-8 | Python | false | false | 3,273 | py | # Winter is coming! During the contest, your first job is to design a standard heater with a fixed warm radius to warm all the houses.
#
# Every house can be warmed, as long as the house is within the heater's warm radius range.
#
# Given the positions of houses and heaters on a horizontal line, return the minimum rad... | [
"983028670@qq.com"
] | 983028670@qq.com |
72ab34403f47a895dc8cf4d64e46acb9915bb8c6 | e9462eeebcac761b34722578f9b297af858710bc | /python/python-vba-word/Win32COM - Word - Table Formulas.py | cb6efd70d8d489073bce97292edec2b13ebb0a24 | [
"MIT"
] | permissive | nsethtyler/sigma_coding_youtube | 63e72c8f3f144731e6c49e049ed786f2b3219e73 | c09f131816bc2d1c1eb45ab9da6de75ee7b855db | refs/heads/master | 2022-12-09T12:03:34.757133 | 2020-08-27T20:50:04 | 2020-08-27T20:50:04 | 290,873,388 | 0 | 0 | MIT | 2020-08-27T20:20:10 | 2020-08-27T20:20:09 | null | UTF-8 | Python | false | false | 2,321 | py | import win32com.client as win32
# Grab the Active Instance of Word
WrdApp = win32.GetActiveObject("Word.Application")
# Grab the current document.
WrdDoc = WrdApp.ActiveDocument
# Reference the Table in it.
WrdTable = WrdDoc.Tables.Item(1)
# Grab all the columns
SaleColumn = WrdTable.Columns(1)
CostColumn = WrdTabl... | [
"alexreed1192@gmail.com"
] | alexreed1192@gmail.com |
c8665f57e8b014bb4a0bada9bd7400187cc6c773 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /kxrhqiE5so3AMXWS7_1.py | a567e54546179cbab5298d2f0a11665f16f9e8cf | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 670 | py | """
A man has `n` number of apples. If he eats a percentage `p` of the apples (if
apples are available), his children will share the remainder of the apples.
Create a function to determine the number of 'whole' apples his children got.
If his children did not get any apples, return `"The children didn't get any
appl... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
049fba86a17445a1cd47636ce635d7512068a5df | c80ec1805a7e6cb1bd3f4b3e383ef4f4cf164765 | /gen/filters/rules/person/_hasnoteregexp.py | fbb7fa8c1925049716fcab430b77a4c9100507fb | [] | no_license | balrok/gramps_addon | 57c8e976c47ea3c1d1298d3fd4406c13909ac933 | 0c79561bed7ff42c88714edbc85197fa9235e188 | refs/heads/master | 2020-04-16T03:58:27.818732 | 2015-02-01T14:17:44 | 2015-02-01T14:17:44 | 30,111,898 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,706 | py | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2006 Donald N. Allingham
#
# 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 2 of the License, or
# (at you... | [
"carl.schoenbach@gmail.com"
] | carl.schoenbach@gmail.com |
12dcdf99e66883812b53494f15fcd2ba332a7379 | 8d598140ac081e17ce6a549c85feb9684ef79ea3 | /config/default.py | 0ecdb196401e9db03328e20af185a2d91087b888 | [] | no_license | thuunivercity/xichuangzhu | fae1f68fb0a6de8bf875fd21427210a3170f74ca | c0622bed831b9d4cdf776138a6fc66a2da67bf0d | refs/heads/master | 2021-12-30T17:41:55.652212 | 2015-10-21T03:14:48 | 2015-10-21T03:14:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,846 | py | # coding: utf-8
import os
class Config(object):
"""配置基类"""
# Flask app config
DEBUG = False
TESTING = False
SECRET_KEY = "\xb5\xb3}#\xb7A\xcac\x9d0\xb6\x0f\x80z\x97\x00\x1e\xc0\xb8+\xe9)\xf0}"
PERMANENT_SESSION_LIFETIME = 3600 * 24 * 7
SESSION_COOKIE_NAME = 'xcz_session'
# Root path o... | [
"hustlzp@qq.com"
] | hustlzp@qq.com |
374048fea69e0a66ffbb5fa9fa42e53287967cc4 | 7110d018f0474388e18bc9c760f306c5b8593aae | /app/client/models.py | 4d9febe84b05dc0166fdb6c8333590e5ad974d84 | [
"MIT"
] | permissive | alexiuasse/django-system-iuasse | 6a9a4d27fee5ec864fe6ec5901b539aba2e9b0a5 | fa22519f2d2b6256e5334f032a95fd19366e5df4 | refs/heads/main | 2023-05-14T21:25:35.021196 | 2021-06-03T17:00:56 | 2021-06-03T17:00:56 | 369,536,237 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,817 | py | from django.db import models
from django.utils import timezone
from django.utils.translation import gettext as _
from django.urls import reverse_lazy
from app.models import TimeStampMixin
class Occupation(TimeStampMixin):
""" Model to set the Occupation, used to identify a client."""
name = models.CharField(... | [
"alexiuasse@gmail.com"
] | alexiuasse@gmail.com |
f1cc588717cf958753e27ba5146ec48527a2a847 | 834e1884dcd2551a7f2610c5d65199103a14af67 | /Notes/kivyA/kivyCalculatorA/main.py | c8c899b653b9dd10de9635ff18b06bf128fbf3a3 | [] | no_license | fwparkercode/Programming2_SP2019 | b8ece0fe98fe8260ff20859c80a73ce5ba38a5e6 | 4938a66979cd9f7cbb82d3d447a5ae2bfd6766b0 | refs/heads/master | 2020-04-19T05:07:43.800906 | 2019-05-23T21:23:15 | 2019-05-23T21:23:15 | 167,978,933 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 437 | py | from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.core.window import Window
Window.size = (300, 400)
class CalculatorApp(App):
def build(self):
return CalculatorLayout()
class CalculatorLayout(BoxLayout):
# root widget
def calculate(self):
answer = eval(self.disp... | [
"alee@fwparker.org"
] | alee@fwparker.org |
1415d8bba5a688bff8491421c00411f76e869d4e | ac1fdf53359b53e183fb9b2602328595b07cf427 | /ParlAI/parlai/tasks/convai_chitchat/__init__.py | 5799539a22004d2cd8989bf2143289815efc44f1 | [] | no_license | Ufukdogann/MasterThesis | 780410c5df85b789136b525bce86ba0831409233 | b09ede1e3c88c4ac3047800f5187c671eeda18be | refs/heads/main | 2023-01-24T18:09:52.285718 | 2020-11-27T16:14:29 | 2020-11-27T16:14:29 | 312,416,173 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 128 | py | version https://git-lfs.github.com/spec/v1
oid sha256:3fd485c3f7deada658caa392a4950fbf1531c77db9ba58fa9948d13d9d8ea490
size 222
| [
"134679852Ufuk*"
] | 134679852Ufuk* |
5bc28abe7faa596eada6d769cc702ae804e44e90 | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-1/7da9bb68ce9ad08b3a648b49d52eddd1cc153137-<delete_dag>-bug.py | c76a57772d4c18f939e94cb8e62aacf36607bf5b | [] | no_license | wsgan001/PyFPattern | e0fe06341cc5d51b3ad0fe29b84098d140ed54d1 | cc347e32745f99c0cd95e79a18ddacc4574d7faa | refs/heads/main | 2023-08-25T23:48:26.112133 | 2021-10-23T14:11:22 | 2021-10-23T14:11:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,376 | py |
def delete_dag(dag_id, keep_records_in_log=True):
'\n :param dag_id: the dag_id of the DAG to delete\n :type dag_id: str\n :param keep_records_in_log: whether keep records of the given dag_id\n in the Log table in the backend database (for reasons like auditing).\n The default value is True... | [
"dg1732004@smail.nju.edu.cn"
] | dg1732004@smail.nju.edu.cn |
ab913b549c945e35ccf4e56526cc50b5f608c3bb | 69f43872d7ca655912dcf46d246702e5ee5b1068 | /apps/sad/models.py | e9976ad1406a6342062239d786ead6d7a03ce241 | [
"BSD-3-Clause"
] | permissive | tiposaurio/backenddj | d0d5884d1880c9b09b20aaa35e20da0173520535 | e16f609eca0c292c8c694c7eb279fe99296b45e3 | refs/heads/master | 2021-01-16T21:51:00.352923 | 2014-05-16T03:59:52 | 2014-05-16T03:59:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,833 | py | # _*_ coding: utf-8 _*_
"""
@copyright Copyright (c) 2014 Submit Consulting
@author Angel Sullon (@asullom)
@package sad
Descripcion: Registro de los modelos de la app sad
"""
from django.db import models
from django.contrib.auth.models import User, Group, Permission
from apps.params.models import Person
fr... | [
"asullom@gmail.com"
] | asullom@gmail.com |
db3983df30bc88f8057cdd776e83c68efde56582 | 06acfec630a30695d79b77df4d682cb27dce64a2 | /wev/test_resolver.py | 1d9bd12b34fad7aa80bbb99495a328793a2b8fdc | [] | permissive | cariad/wev | b828bd7b5b47117bf571ae1e3e3a60abb619f396 | 2abf38485d86c593bbedcb7c295143104e385b77 | refs/heads/main | 2023-04-11T20:15:40.548185 | 2021-05-13T06:50:05 | 2021-05-13T06:50:05 | 317,793,612 | 5 | 0 | MIT | 2021-05-13T06:50:06 | 2020-12-02T08:14:41 | Python | UTF-8 | Python | false | false | 2,559 | py | from datetime import datetime, timedelta
from typing import Iterator, Optional
from mock import Mock, patch
from pytest import fixture, mark, raises
from wev.mock_plugin import MockPlugin
from wev.resolver import fresh_resolution, resolve
from wev.sdk import PluginBase, Resolution
from wev.sdk.exceptions import Canno... | [
"noreply@github.com"
] | cariad.noreply@github.com |
40fc1773b286492d28d12972d62a9df0239d6aea | 3c41443364da8b44c74dce08ef94a1acd1b66b3e | /osf/migrations/0012_refactor_sessions.py | bbb8897ebfd22c094898150c9cd99591c3967d5e | [
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-warranty-disclaimer",
"AGPL-3.0-only",
"LGPL-2.0-or-later",
"LicenseRef-scancode-proprietary-license",
"MPL-1.1",
"CPAL-1.0",
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause",
"Apache-2.0"
] | permissive | CenterForOpenScience/osf.io | 71d9540be7989f7118a33e15bc4a6ce2d2492ac1 | a3e0a0b9ddda5dd75fc8248d58f3bcdeece0323e | refs/heads/develop | 2023-09-04T03:21:14.970917 | 2023-08-31T14:49:20 | 2023-08-31T14:49:20 | 10,199,599 | 683 | 390 | Apache-2.0 | 2023-09-14T17:07:52 | 2013-05-21T15:53:37 | Python | UTF-8 | Python | false | false | 1,371 | py | # Generated by Django 3.2.17 on 2023-05-08 19:26
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django_extensions.db.fields
import osf.models.base
import osf.utils.fields
class Migration(migrations.Migration):
dependencies = [
('osf', '0... | [
"noreply@github.com"
] | CenterForOpenScience.noreply@github.com |
8f47220d6c0dfacdbf4b8aa948170400d4c06dec | 21ad3868aec282c45f813941c76a287eef6dd071 | /AirBnB_Clone/config/settings.py | 4bfb6cc1689916cd26c88e48b09e629befc917c1 | [] | no_license | BKLemontea/NomadCode-Clonecoding | 5f4cb919f872c4c4c699fbe451c72571e40621b9 | e84079a3f8f9d7ae58b1a2cfc8b75fee4fdf0c53 | refs/heads/master | 2023-04-30T16:29:13.087156 | 2020-01-23T13:15:17 | 2020-01-23T13:15:17 | 232,075,064 | 0 | 0 | null | 2023-04-21T20:46:55 | 2020-01-06T10:15:10 | Python | UTF-8 | Python | false | false | 3,088 | py | """
Django settings for config project.
Generated by 'django-admin startproject' using Django 2.2.5.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
# ... | [
"jyf1128@naver.com"
] | jyf1128@naver.com |
d527e98714fbd97b33b6c55fea8ef13ac609e987 | 0fc55f28bf0ce73b85c9d78ea9dc7c26a497fa69 | /semana_11/exercicios/1248.py | b7103a6e9d555cd2642d025ca7e8b6657e533dd9 | [] | no_license | valeriacavalcanti/IP-2020.2---R | 6083f84b33242217e51e0a9a7440362179f3fcc3 | d376b4c4b55f7042cc5ae1520296eae570154e75 | refs/heads/main | 2023-05-08T01:08:45.757978 | 2021-06-08T03:09:56 | 2021-06-08T03:09:56 | 341,371,219 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 670 | py | qtde = int(input())
for i in range(qtde):
dieta = list(input())
cafe = list(input())
almoco = list(input())
cheater = False
for i in range(len(cafe)):
if (cafe[i] in dieta):
dieta.remove(cafe[i])
else:
cheater = True
break
if (cheater == False... | [
"valeria.cavalcanti@ifpb.edu.br"
] | valeria.cavalcanti@ifpb.edu.br |
b0c5cf73141ec8203c4acb05630c125f46231006 | 7d274ce8dae971228a23157a409b561020c22f66 | /tools/packages/SCons/Tool/suncc.py | c062324709a9e119578f5e8b109c3106f9a330b9 | [] | no_license | Eigenlabs/EigenD-Contrib | a212884d4fdf9ae0e1aeb73f6311606212e02f94 | 586fe17471571802295c792697f255e6cab51b17 | refs/heads/master | 2020-05-17T07:54:48.668925 | 2013-02-05T10:20:56 | 2013-02-05T10:20:56 | 3,239,072 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,972 | py | """SCons.Tool.suncc
Tool-specific initialization for Sun Solaris (Forte) CC and cc.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The S... | [
"jim@eigenlabs.com"
] | jim@eigenlabs.com |
c1e2d760b3e39b54a462df6259a94f9c704c993a | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/ASCII_20200609152320.py | 9c4300c8b62b762a900df3b70afab9afaed6c1d2 | [] | no_license | MaryanneNjeri/pythonModules | 56f54bf098ae58ea069bf33f11ae94fa8eedcabc | f4e56b1e4dda2349267af634a46f6b9df6686020 | refs/heads/master | 2022-12-16T02:59:19.896129 | 2020-09-11T12:05:22 | 2020-09-11T12:05:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 162 | py | def ASCIIConversion(s):
s = s.split()
num = ""
for i in s:
for j in i:
num += str(ord(j))
num +=" "
print
# code goes here
return num | [
"mary.jereh@gmail.com"
] | mary.jereh@gmail.com |
f21e48568f4a7f9a9b38bf99752af0ac2f1dd7d2 | 6fa0d5d3b61fbce01fad5a7dd50258c09298ee00 | /Algorithm/BOJ/15_backtracking/15649.py | 4be9c6e515ee78768022769a7f81acf75e08e4fd | [] | no_license | athletejuan/TIL | c8e6bd9f7e2c6f999dbac759adcdb6b2959de384 | 16b854928af2f27d91ba140ebc1aec0007e5eb04 | refs/heads/master | 2023-02-19T13:59:06.495110 | 2022-03-23T15:08:04 | 2022-03-23T15:08:04 | 188,750,527 | 1 | 0 | null | 2023-02-15T22:54:50 | 2019-05-27T01:27:09 | Python | UTF-8 | Python | false | false | 286 | py | N,M = map(int, input().split())
picked = []
def array(N,M):
if M == 0:
return print(' '.join(picked))
for _ in range(1, N+1):
if not picked or str(_) not in picked:
picked.append(str(_))
array(N, M-1)
picked.pop()
array(N,M) | [
"vanillasky84.0627@gmail.com"
] | vanillasky84.0627@gmail.com |
bb804b5c1ee9166b23fa7afc639d8fc0121178a5 | d0801bc2efc2d66bf371cd532f43a53b0aaad935 | /simpleui/templatetags/simpletags.py | 40e99e83be8846d87e6e0bf0f27fe00bf21745d8 | [] | no_license | cn-zhangcx/simpleui | 6702d274a1a5cced11ffbaf9ec0c0b3c20235ecf | 54583ef4d033f4eb62e18f1f70f83df5004165eb | refs/heads/master | 2020-05-14T23:38:54.127174 | 2019-04-16T05:25:03 | 2019-04-16T05:25:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,662 | py | # -*- coding: utf-8 -*-
import django
from django import template
from django.utils.html import format_html
from django.conf import settings
from django.utils.safestring import mark_safe
from django.templatetags import static
import os
import json
import platform
import socket
import simpleui
import base64
import... | [
"newpanjing@163.com"
] | newpanjing@163.com |
1d64cc710271280fcbcc423dd7aff0ce53d04cca | 9e988c0dfbea15cd23a3de860cb0c88c3dcdbd97 | /sdBs/AllRun/ec_12348-3001/sdB_ec_12348-3001_coadd.py | 886846dc958ceb1fa79b323df15547fbb52c6935 | [] | 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 | 437 | py | from gPhoton.gMap import gMap
def main():
gMap(band="NUV", skypos=[189.3895,-30.306328], skyrange=[0.0333333333333,0.0333333333333], stepsz = 30., cntfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sdBs/sdB_ec_12348-3001/sdB_ec_12348-3001_movie_count.fits", cntcoaddfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sdB/... | [
"thomas@boudreauxmail.com"
] | thomas@boudreauxmail.com |
4dcd7b99114efd81e8ac45c656c7038f8db526f7 | 1ff9adfdb9d559e6f81ed9470467bab25e93b5ab | /src/ta_lib/_vendor/tigerml/automl/custom_configs/classification/popular.py | e9ec0db5fa11ef900db2a1a6bbcf1db75e7db9ab | [] | no_license | Seemant-tiger/housing-price-prediction | a39dbefcb11bc460edeeee92e6becf77d35ff3a8 | be5d8cca769c7e267cfee1932eb82b70c2855bc1 | refs/heads/main | 2023-06-24T00:25:49.776720 | 2021-07-18T16:44:28 | 2021-07-18T16:44:28 | 387,222,852 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,149 | py | # -*- coding: utf-8 -*-
"""This file is part of the TPOT library.
TPOT was primarily developed at the University of Pennsylvania by:
- Randal S. Olson (rso@randalolson.com)
- Weixuan Fu (weixuanf@upenn.edu)
- Daniel Angell (dpa34@drexel.edu)
- and many more generous open source contributors
TPOT is f... | [
"seemantsingh1199@gmail.com"
] | seemantsingh1199@gmail.com |
3ff6bc094a8db9af718df9fc0297f36c708d2486 | cfd39f470d13f089d7d853b7ea0d0260c0ae6f95 | /experiments/inverse_problems_science/dkfz_eval.py | 0e57426c957fd763d7b16883f195603beaceace0 | [
"MIT"
] | permissive | JackBrady/FrEIA | d1c32c1c6a60a43b25d0011d3525dcd5cdcb4244 | 5d836494489e5b210a577815b89c4c2988fd8658 | refs/heads/master | 2020-12-22T07:15:51.914427 | 2020-05-07T02:48:19 | 2020-05-07T02:48:19 | 236,707,547 | 0 | 0 | MIT | 2020-01-28T10:18:01 | 2020-01-28T10:18:00 | null | UTF-8 | Python | false | false | 3,777 | py | import pickle
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import torch
import dkfz_train
import model
import config as c
model.load('output/dkfz_inn.pt')
print('Trainable parameters:')
print(sum([p.numel() for p in model.params_trainable]))
def concatenate_test_set():
x_all, y_all = []... | [
"lynton.ardizzone@iwr.uni-heidelberg.de"
] | lynton.ardizzone@iwr.uni-heidelberg.de |
aad1a11cfde52faaf3be013f179124ca06ee7ceb | 8ad18381b31acbfe4f81f85c19cf5c020938bb94 | /Products/migrations/0002_auto_20210814_2159.py | fae9d5ade9ad59a5e60628c1ee4a94db56c3c59e | [] | no_license | prathmesh2048/Tradexa_assignment | 52796c80c269175b22aa131cb40f4cddd7c6b14f | 7e5c4201eec35415516fafa32e81730ffabfab0c | refs/heads/master | 2023-07-08T12:06:24.151983 | 2021-08-14T16:38:36 | 2021-08-14T16:38:36 | 396,067,031 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 682 | py | # Generated by Django 3.2.6 on 2021-08-14 16:29
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Products', '0001_initial'),
]
operations = [
migrations.RenameField(
model_name='product',
old_name='title',
... | [
"prathmeshnandurkar123@gmail.com"
] | prathmeshnandurkar123@gmail.com |
ab43ee6cdbe330f55b39387b7e1104be8e5bd9e4 | 518bf342bc4138982af3e2724e75f1d9ca3ba56c | /solutions/1392. Longest Happy Prefix/1392.py | b1c6d9edded10615aa7d40e3a7f7c328eae58194 | [
"MIT"
] | permissive | walkccc/LeetCode | dae85af7cc689882a84ee5011f0a13a19ad97f18 | a27be41c174565d365cbfe785f0633f634a01b2a | refs/heads/main | 2023-08-28T01:32:43.384999 | 2023-08-20T19:00:45 | 2023-08-20T19:00:45 | 172,231,974 | 692 | 302 | MIT | 2023-08-13T14:48:42 | 2019-02-23T15:46:23 | C++ | UTF-8 | Python | false | false | 568 | py | class Solution:
def longestPrefix(self, s: str) -> str:
kBase = 26
kMod = 1_000_000_007
n = len(s)
maxLength = 0
pow = 1
prefixHash = 0 # hash of s[0..i]
suffixHash = 0 # hash of s[j..n)
def val(c: str) -> int:
return ord(c) - ord('a')
j = n - 1
for i in range(n - 1):... | [
"me@pengyuc.com"
] | me@pengyuc.com |
e33eb0468b760e44fa55435a7441d67b25911100 | e46392a087706a3cbd726822a3735892becaeaac | /selfsup/multi/methods/video_saliency.py | fcbddd3435c09c6bfe31f73ff153377b4cad6904 | [
"BSD-3-Clause"
] | permissive | Pandinosaurus/self-supervision | 39d44d864d140e35bb35fc76adb7412403ea92ea | fe99e707bcccc0eed39dfe8a4651c433caf6f8c4 | refs/heads/master | 2021-04-06T03:06:38.970572 | 2017-09-05T03:29:46 | 2017-09-05T03:34:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,857 | py | from __future__ import division, print_function, absolute_import
import selfsup
import tensorflow as tf
import os
from .base import Method
from collections import OrderedDict
class VideoSaliency(Method):
def __init__(self, name, basenet, loader):
self.name = name
self.basenet = basenet
sel... | [
"gustav.m.larsson@gmail.com"
] | gustav.m.larsson@gmail.com |
c102fd6f1a8a65e61fd3accf92c9d824f2db3265 | fe04ba6b41745a4f16864aaacf9f1b0005a92e37 | /src/TCA/execute.py | b1aeeaf1678b10a4f004860b04abf12c365294b5 | [] | no_license | bellwethers-in-se/effort | 3148552866911949c4dcf16f3e77ace65b113f5b | 1138919c16036c58d11c6764cdcac89026f0d36d | refs/heads/master | 2021-01-12T02:14:23.456485 | 2017-08-07T17:36:22 | 2017-08-07T17:36:22 | 78,490,932 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,977 | py | from __future__ import print_function, division
import os
import sys
root = os.path.join(os.getcwd().split('src')[0], 'src')
if root not in sys.path:
sys.path.append(root)
from oracle.model import rf_model
from utils import *
from mklaren.kernel.kinterface import Kinterface
from mklaren.kernel.kernel import *
fro... | [
"i.m.ralk@gmail.com"
] | i.m.ralk@gmail.com |
51a9212611db2eb748f1976a7bc1337e75df00c1 | ecff4b18a49ce5952c5f9125dc027cebdecf10a8 | /azure-mgmt-scheduler/azure/mgmt/scheduler/models/storage_queue_message.py | 084b78ccb0f84eeaa5695d9ebae6f5beae3eb764 | [
"Apache-2.0"
] | permissive | jehine-MSFT/azure-sdk-for-python | a56c18020ecd5f4c245c093fd6a33e1b1d7c95e1 | 6d0f94b39406eab374906c683bd2150217132a9c | refs/heads/master | 2020-12-06T19:17:38.153819 | 2016-04-08T21:03:16 | 2016-04-08T21:03:16 | 55,809,131 | 0 | 0 | null | 2016-04-08T20:54:00 | 2016-04-08T20:54:00 | null | UTF-8 | Python | false | false | 1,878 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft and contributors. 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 ... | [
"lmazuel@microsoft.com"
] | lmazuel@microsoft.com |
ce49b89ea66dbef7873d318f3b750d748ff2e565 | 32eeb97dff5b1bf18cf5be2926b70bb322e5c1bd | /benchmark/redreader/testcase/firstcases/testcase3_003.py | f6c5f5c88712dbe125e58521efd7afe148cee248 | [] | no_license | Prefest2018/Prefest | c374d0441d714fb90fca40226fe2875b41cf37fc | ac236987512889e822ea6686c5d2e5b66b295648 | refs/heads/master | 2021-12-09T19:36:24.554864 | 2021-12-06T12:46:14 | 2021-12-06T12:46:14 | 173,225,161 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,529 | py | #coding=utf-8
import os
import subprocess
import time
import traceback
from appium import webdriver
from appium.webdriver.common.touch_action import TouchAction
from selenium.common.exceptions import NoSuchElementException, WebDriverException
desired_caps = {
'platformName' : 'Android',
'deviceName' : 'Android Emulat... | [
"prefest2018@gmail.com"
] | prefest2018@gmail.com |
6eab960a7bf55df7445028b3576e9aca186fc866 | 9892b74a8c5913ef77725129885f9cb7b65a9eba | /src/Learners.py | 99de5284f6ebf8311521302bde1d2c32bd8329d7 | [] | no_license | ai-se/Smotuned_FFT | 8e2884eaf3192f845d638a1167f7e17dd2c07dcb | df06749cca3e507f963c4ffcb2330cdc031dded1 | refs/heads/master | 2021-09-28T05:20:01.762515 | 2018-11-14T17:26:18 | 2018-11-14T17:26:18 | 116,091,269 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,414 | py | from __future__ import print_function, division
__author__ = 'amrit'
import sys
sys.dont_write_bytecode = True
from ABCD import ABCD
import numpy as np
from sklearn.tree import DecisionTreeClassifier
from sklearn.ensemble import RandomForestClassifier
from sklearn.svm import SVC, LinearSVC
from sklearn.neighbors imp... | [
"amritbhanu@gmail.com"
] | amritbhanu@gmail.com |
a7494ef2f8a2d3630920a5abc0c0faaec8d9e6cf | 7b6c038da851b1d2a3dde5f1158fce03482bc3c1 | /luna/gateware/usb/devices/__init__.py | 7d057f0bc40e42c7c707fd866713cd9551e6e83b | [
"BSD-3-Clause",
"CERN-OHL-P-2.0"
] | permissive | greatscottgadgets/luna | 77b636481a3bef13137c7125de970e86a1fdda22 | 1d8e9cfa6a3e577f255ff3544384a1442b3b015b | refs/heads/main | 2023-09-02T02:32:58.944632 | 2023-09-01T13:00:54 | 2023-09-01T13:00:54 | 215,722,076 | 842 | 160 | BSD-3-Clause | 2023-09-13T14:59:36 | 2019-10-17T06:45:30 | Python | UTF-8 | Python | false | false | 201 | py | #
# This file is part of LUNA.
#
# Copyright (c) 2020 Great Scott Gadgets <info@greatscottgadgets.com>
# SPDX-License-Identifier: BSD-3-Clause
""" Convenience gateware with pre-made device logic. """
| [
"k@ktemkin.com"
] | k@ktemkin.com |
ed5228f11b7cd0a05ba799e26b2bfc45f18cc59c | 43a00df3c162b6279ebda161c2ebd85ce7f9cb64 | /generate_s_label.py | dddd6bf2e1f38891f0cb893d4fa2e17cf1543c94 | [] | no_license | selous123/SRNet-zoom-pytorch | d5845d6a8b55fef81fdc16e728371486939d243e | 08b647e121d70ca69e04719684bcdce8ca8b65d3 | refs/heads/master | 2020-07-14T15:00:31.497397 | 2020-03-06T13:47:20 | 2020-03-06T13:47:20 | 205,339,265 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,721 | py |
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--data_dir", type=str, default="/store/dataset/SRRAW/X4/train", help="root folder that contains the images")
parser.add_argument("--labels", type=str, default="Edge+Diff", help="root folder that contains the images")
ARGS = parser.parse_args()
#t... | [
"lrhselous@163.com"
] | lrhselous@163.com |
917a51c81202012da9c84549d807bcf36aadd226 | 04141e207a7cc88a58245fa412b2a841901d504f | /otn.mit.edu/otn/web/forms.py | 1893ee1db091bfb83f4c3f24b699f62b7486469b | [] | no_license | mwidner/socialsaver | bbda2cefea2b8f74d2bbbad2705e616a88a5d582 | 3b6a1d8f0522735e462f9d2bf6ef12a999d8cc85 | refs/heads/master | 2021-01-15T20:29:35.288919 | 2012-04-16T18:27:30 | 2012-04-16T18:27:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 173 | py | from django import forms
from django.forms import ModelForm
class BuxferLoginForm(forms.Form):
email = forms.EmailField()
password = forms.CharField()
| [
"kwan@media.mit.edu"
] | kwan@media.mit.edu |
7e8f73697561d7e8ee084ee9c1e6a02d06b75021 | c24ad19b65992dd2be3d3210b889d970e43b9cdc | /class/phase1/day09/exercise05.py | 79e8a0e0b6539289fae06c370f41ccd4439e02e6 | [] | no_license | ivoryli/myproject | 23f39449a0bd23abcc3058c08149cebbfd787d12 | cebfa2594198060d3f8f439c971864e0639bbf7e | refs/heads/master | 2020-05-30T06:25:41.345645 | 2019-05-31T11:15:55 | 2019-05-31T11:15:55 | 189,578,491 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,982 | py | '''
创建技能类(技能名称,冷却时间,持续时间,攻击距离......)
name cd td ad
要求:使用属性封装变量
创建技能列表(技能对象的列表)
-- 查找名称是"降龙十八掌"的技能对象
-- 查找名称是持续时间大于10秒的的所有技能对象
-- 查找攻击距离最远的技能对象
-- 按照持续时间,对列表升序排列.
'''
#myself
# class Skill:
# def __init__(self,name,cd,td,ad):
# self.name = name
# self.cd =... | [
"2712455490@qq.com"
] | 2712455490@qq.com |
c152e031f9a7c91cfde2dd249fba12f4f1b3cb78 | f3d38d0e1d50234ce5f17948361a50090ea8cddf | /백준/Silver/Silver 5/1158번 ; 요세푸스 문제.py | 446a4ad3871ead236aa291b9fccaf9596278359c | [] | no_license | bright-night-sky/algorithm_study | 967c512040c183d56c5cd923912a5e8f1c584546 | 8fd46644129e92137a62db657187b9b707d06985 | refs/heads/main | 2023-08-01T10:27:33.857897 | 2021-10-04T14:36:21 | 2021-10-04T14:36:21 | 323,322,211 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 315 | py | # https://www.acmicpc.net/problem/1158
# 첫째 줄에 N, K를 빈 칸으로 구분해 입력합니다.
# 1 <= K <= N <= 5,000
N, K = map(int, input().split())
circle = [number for number in range(1, N + 1)]
poped_number = []
while True:
circle_length = len(circle)
if circle_length == 0:
break | [
"bright_night_sky@naver.com"
] | bright_night_sky@naver.com |
a0a260eae98611dd8badfb76589c148bf4846f3d | 2a1b8a671aceda6bc446f8ce26400aa84fa444a6 | /Packs/CommunityCommonScripts/Scripts/PHash/PHash.py | a65682627380ca763287b167d2edc08522c75a03 | [
"MIT"
] | permissive | demisto/content | 6d4722d46f0ff0beea2748e9f7de585bf91a78b4 | 890def5a0e0ae8d6eaa538148249ddbc851dbb6b | refs/heads/master | 2023-09-04T00:02:25.618032 | 2023-09-03T21:56:22 | 2023-09-03T21:56:22 | 60,525,392 | 1,023 | 1,921 | MIT | 2023-09-14T20:55:24 | 2016-06-06T12:17:02 | Python | UTF-8 | Python | false | false | 389 | py | import demistomock as demisto # noqa: F401
import imagehash
from CommonServerPython import * # noqa: F401
from PIL import Image
ImageID = demisto.args()['image']
ImageFilePath = demisto.getFilePath(ImageID)
hash = imagehash.phash(Image.open(ImageFilePath['path']))
context = {
"PHash": str(hash)
}
command_result... | [
"noreply@github.com"
] | demisto.noreply@github.com |
5d1de9164de59d2aaa12d87d853da062ae8caca6 | a7f83dbecc14470645de7f502292394f38bc4661 | /router/asgi.py | 7df5255ada09b87226a02a56174c19568f56aa37 | [] | no_license | erllan/ROUTER | f6ab0530b3106c3e3bffe33e46b8ddedb08ab64a | 5b2a2b76edd28887b5b0b2b0ad4a340344bd399a | refs/heads/master | 2023-01-20T10:20:23.355230 | 2020-11-22T19:23:13 | 2020-11-22T19:23:13 | 310,087,275 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 389 | py | """
ASGI config for router project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTIN... | [
"erlan.kubanychbekov.000@gmail.com"
] | erlan.kubanychbekov.000@gmail.com |
032de7d294c7805f6c78214f7adb90542a8f2a4f | 2a54e8d6ed124c64abb9e075cc5524bb859ba0fa | /.history/3-OO-Python/7-private-public_20200415234405.py | 3f7ad76390081dccb1d9fb972a71267ff401dc12 | [] | no_license | CaptainStorm21/Python-Foundation | 01b5fbaf7a913506518cf22e0339dd948e65cea1 | a385adeda74f43dd7fb2d99d326b0be23db25024 | refs/heads/master | 2021-05-23T01:29:18.885239 | 2020-04-23T19:18:06 | 2020-04-23T19:18:06 | 253,171,611 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 213 | py | #
def speak(self):
print(f'my name is {self.name}. I am {self.age}')
player1 = PlayerCharacter('Andy', 1000)
player1.name = 'Wolverine'
player1.speak = 'BooBoo!'
print(player1.speak) | [
"tikana4@yahoo.com"
] | tikana4@yahoo.com |
cf81714c80096d8ff059fc3b666ec1cf12d22ab7 | aee144770c8f4ec5987777aebe5b064e558fc474 | /doc/integrations/pytorch/parlai/tasks/qazre/build.py | 30cde0347bc725cd13474e5283b0f140a383fba7 | [
"MIT",
"CC-BY-SA-3.0",
"Apache-2.0",
"AGPL-3.0-only"
] | permissive | adgang/cortx | 1d8e6314643baae0e6ee93d4136013840ead9f3b | a73e1476833fa3b281124d2cb9231ee0ca89278d | refs/heads/main | 2023-04-22T04:54:43.836690 | 2021-05-11T00:39:34 | 2021-05-11T00:39:34 | 361,394,462 | 1 | 0 | Apache-2.0 | 2021-04-25T10:12:59 | 2021-04-25T10:12:59 | null | UTF-8 | Python | false | false | 1,232 | 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.
#
# Download and build the data if it does not exist.
import parlai.core.build_data as build_data
import os
fr... | [
"noreply@github.com"
] | adgang.noreply@github.com |
52411521d4c4848047d6566be95021f633aac53f | 480cc056ae6f2c8e098468d13858d01851b3fa5c | /tools/create_json | 1558ac765a7822481868c2a24dc700655088dbcf | [
"MIT"
] | permissive | blechta/betterbib | 1300d18364c717676c54b8a76b3f1043f2249c5b | ba2c6b1c3a599d5397c3c913a1fe7725875665b3 | refs/heads/master | 2020-03-23T08:32:44.704257 | 2018-06-20T20:16:14 | 2018-06-20T20:16:14 | 141,333,072 | 0 | 0 | MIT | 2018-07-17T19:16:59 | 2018-07-17T19:16:59 | null | UTF-8 | Python | false | false | 1,262 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
"""This tool is used for converting JabRef's journal name abbreviation files,
<https://github.com/JabRef/jabref/tree/master/src/main/resources/journals>,
into JSON.
Usage example:
```
cat IEEEJournalListText.txt journalList.txt | ./create_json - journals.json
```
"""
im... | [
"nico.schloemer@gmail.com"
] | nico.schloemer@gmail.com | |
3691f1fd4f857ea86bcecfaf74e4c30c1db3f4f9 | 71e214849d65fb119ac7d82b8bb852cb09953caa | /pin_tester.py | a2b0e7f4181ea684610902968bd2196fed705d72 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | nanuxbe/microbit-files | daabd2d0685786696f5dd4554b1370175669f3c1 | 70fd249fc98635ad8764d0a65b528f79648c6034 | refs/heads/master | 2021-01-17T20:22:27.575172 | 2016-10-20T09:24:26 | 2016-10-20T09:24:26 | 68,598,147 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 288 | py | from microbit import *
PINS = [pin0, pin1, pin2, pin8, pin16]
while True:
if button_a.is_pressed():
display.show("1")
for pin in PINS:
pin.write_digital(1)
else:
display.show(Image.NO)
for pin in PINS:
pin.write_digital(0) | [
"emma@levit.be"
] | emma@levit.be |
63c498bd4d2d283e7d36c07193348b6caeb20f9d | ee1258111670dc0d12d93099a1bcc5ae5ac6b948 | /chainer/nn.py | 609878ea2b1cb0c007ba454ee4063ab6db3ecc36 | [] | no_license | cpple/mnistCUDNN | d5bf0a4680892b023d6875fe845d97a025ad1652 | 0f1a3395fd9c5b6e87a9903e94845a5833e46cee | refs/heads/master | 2021-09-23T23:24:21.871321 | 2018-09-29T01:56:44 | 2018-09-29T01:56:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,145 | py | from chainer import Chain
import chainer.functions as F
import chainer.links as L
# ネットワーク定義
k = 16
fcl = 256
class NN(Chain):
def __init__(self):
super(NN, self).__init__()
with self.init_scope():
self.conv1 = L.Convolution2D(in_channels = 1, out_channels = k, ksize = 3, pad = 1)
... | [
"tadaoyamaoka@gmail.com"
] | tadaoyamaoka@gmail.com |
bd6477e67f2ed7e8fd503b734b36b9f9138ec3c2 | 21dbd7e2e91636a24b4482d4f49acd29bf87664e | /spell/__init__.py | 0afe6077a092df621805351c2215040e094ed674 | [
"MIT"
] | permissive | sbuvaneshkumar/open-tamil | 688f8826f0fc285c1cd4098ef8d448a10193fc61 | 903297c8fe6510077d8d65a41adaaeb7da9c5e97 | refs/heads/master | 2021-04-06T08:26:23.403276 | 2018-03-11T02:51:56 | 2018-03-11T02:51:56 | 124,749,654 | 0 | 0 | MIT | 2018-03-11T11:28:18 | 2018-03-11T11:28:18 | null | UTF-8 | Python | false | false | 130 | py | ## -*- coding: utf-8 -*-
## (C) 2016-17 Muthiah Annamalai,
from .spell import LoadDictionary, Mayangoli, OttruSplit, Speller
| [
"ezhillang@gmail.com"
] | ezhillang@gmail.com |
a631f571b4f65d85fb6322bd065ab83755349a3c | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/uniquePaths_20200728102526.py | 971197f817b1ca80f65931fe080d5b65235b275c | [] | no_license | MaryanneNjeri/pythonModules | 56f54bf098ae58ea069bf33f11ae94fa8eedcabc | f4e56b1e4dda2349267af634a46f6b9df6686020 | refs/heads/master | 2022-12-16T02:59:19.896129 | 2020-09-11T12:05:22 | 2020-09-11T12:05:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 890 | py | def uniquePath(arr):
# mark one as None or -1 thatway in the case where
# we have to only calculate the once where there is no none
m = len(arr)
for i in range(len(arr)):
for j in range(len(arr[i])):
if arr[i][j] == 1:
arr[i][j] = "None"
... | [
"mary.jereh@gmail.com"
] | mary.jereh@gmail.com |
8f5e5805d30d579a4a7c72aac4eced82ef28fdf3 | 58db5cdab90e34107018892b69c6b4ed63fc2604 | /findMissing.py | 8e48c7a6e0db6498a9ba5f40e0fc8b5c3462c4cf | [] | no_license | jamiejamiebobamie/pythonPlayground | 2b329d0a8741146f7a715b15b33c4e2f24a9a677 | b622eeb78b22760d2570cc085716f74b344072e8 | refs/heads/master | 2020-04-14T15:03:01.127800 | 2019-10-03T23:34:32 | 2019-10-03T23:34:32 | 163,914,975 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,090 | py | # following along to this video: https://interviewing.io/recordings/Python-Airbnb-4
# write a fucntion that takes in two arrays
# and finds the one element that is missing from the second array
# a good question to ask is if the items are sorted and all unique?
def findMissing(A1, A2):
# n is the number of elem... | [
"jmccrory@vt.edu"
] | jmccrory@vt.edu |
021797fb0a2fbaf4c5a693862c72aa1bd145dc71 | f96a40b46adf8820150ac26fcc62b477035ef799 | /python re/re2.py | 63bf2abcda2c169f8d6b256a973a343bef91c751 | [] | no_license | borkarfaiz/python | 0cacf85b262ea0b2040488d7ec1b83565f85d736 | a4f5d98af2455bd3176003ca43aeefaa31e85dc3 | refs/heads/master | 2020-05-23T05:23:39.628953 | 2017-07-13T15:02:34 | 2017-07-13T15:02:34 | 56,511,268 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 233 | py | import re
f = open('random.txt')
strToSearch = ""
for line in f:
strToSearch += line
print(strToSearch)
patFinder1 = re.compile('a+$')
findPat = re.search(patFinder1, strToSearch)
print(re.findall(patFinder1, strToSearch))
| [
"borkarfaiz@gmail.com"
] | borkarfaiz@gmail.com |
abcc5cdd9a7ab07f52f6ffd956775be41121d4e3 | 35b6013c1943f37d1428afd2663c8aba0a02628d | /trace/trace-python-sample-opentelemetry/main_test.py | 2e5b0e80eaaa1083b24f5cb64928ffba3491e7e6 | [
"Apache-2.0"
] | permissive | GoogleCloudPlatform/python-docs-samples | d2a251805fbeab15d76ed995cf200727f63f887d | 44e819e713c3885e38c99c16dc73b7d7478acfe8 | refs/heads/main | 2023-08-28T12:52:01.712293 | 2023-08-28T11:18:28 | 2023-08-28T11:18:28 | 35,065,876 | 7,035 | 7,593 | Apache-2.0 | 2023-09-14T20:20:56 | 2015-05-04T23:26:13 | Jupyter Notebook | UTF-8 | Python | false | false | 1,279 | 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, s... | [
"noreply@github.com"
] | GoogleCloudPlatform.noreply@github.com |
555bc475cdfcfef2a817eebd802725e0e3bcb899 | 059038f86df6c285cc9bfbd8e1924eea37906160 | /jobplus/handlers/front.py | fc45cb5d17b71d3ff01ad42ab99170dbffa4f8c1 | [] | no_license | LouPlus/jobplus11-1 | f6249279a625b8d151eb5e23e7ce16e63aade2af | 59dc0e2437f69dec3a4665a8074e3fd286e97f00 | refs/heads/master | 2023-02-17T19:54:15.335352 | 2019-05-18T11:00:15 | 2019-05-18T11:00:15 | 183,372,297 | 2 | 2 | null | 2023-02-02T06:25:14 | 2019-04-25T06:39:54 | Python | UTF-8 | Python | false | false | 1,390 | py | from flask import Blueprint,render_template
from flask import flash,redirect,url_for
from flask_login import login_user,logout_user,login_required
from jobplus.forms import LoginForm,RegisterForm
from jobplus.models import User
front = Blueprint('front',__name__)
@front.route('/')
def index():
return render_templa... | [
"34020606+LouPlus@users.noreply.github.com"
] | 34020606+LouPlus@users.noreply.github.com |
b693d2d08b70e91e1f82b7f83dd5f455b55e0309 | fda3405523689654b35b8f1c62cb8ed2728470d1 | /stests/core/clx/stream.py | eb135ed7060f6399c39bc40e652d6ac28d57f122 | [] | no_license | piokuc/stests | f5d98e17b4883bf2bd19761be15485c484b1eabc | 2d1301e01576dde574c25609671daf1821edfa0c | refs/heads/master | 2021-03-18T10:25:13.457975 | 2020-03-18T17:37:09 | 2020-03-18T17:37:09 | 247,066,284 | 0 | 0 | null | 2020-03-13T12:28:15 | 2020-03-13T12:28:14 | null | UTF-8 | Python | false | false | 1,777 | py | import typing
from stests.core.clx.utils import get_client
from stests.core.clx.utils import clx_op
from stests.core.domain import NetworkIdentifier
from stests.core.domain import NodeIdentifier
from stests.core.utils import logger
@clx_op
def stream_events(
src: typing.Union[NodeIdentifier, NetworkIdentifier],... | [
"mark@casperlabs.io"
] | mark@casperlabs.io |
8f957c13ca72094e0b2e99956969a9d18eb2eb1e | a3482e5b922bcc5b8d8fd3dc49a29a3073176191 | /source_py3/python_toolbox/introspection_tools.py | 1d884ef81347a915596dd9d03d1740f187712b53 | [
"MIT"
] | permissive | apddup/python_toolbox | 4d2079826218255240a27b9b977b3a4fc2045ee3 | 2d336f361122ad4216669b7a3e1d794fa2a76db1 | refs/heads/master | 2021-01-18T17:09:02.879773 | 2013-10-06T18:20:34 | 2013-10-06T18:20:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,188 | py | # Copyright 2009-2013 Ram Rachum.
# This program is distributed under the MIT license.
'''Defines various introspection tools, similar to the stdlib's `inspect`.'''
from python_toolbox import cute_inspect
from python_toolbox.nifty_collections import OrderedDict
def get_default_args_dict(function):
'''
Get ... | [
"ram@rachum.com"
] | ram@rachum.com |
1e467b51e3c06ca572cb48209a76785c48c96df6 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2826/60659/260490.py | 971d4304f27404a9a57c1a1c15e77cfa27a8b55d | [] | 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 | 249 | py | n=int(input())
num=input().split(" ")
for i in range(n):
num[i]=int(num[i])
num.sort()
result=0
for i in range(1,n):
if num[i]<num[i-1]:
result+=num[i-1]-num[i]+1
num[i]=num[i-1]+1
elif num[i]==num[i-1]:
num[i]+=1
result+=1
print(result) | [
"1069583789@qq.com"
] | 1069583789@qq.com |
4aaa3c796e97075709ceef44423a81d11391d236 | 7950c4faf15ec1dc217391d839ddc21efd174ede | /problems/1658.0_Minimum_Operations_to_Reduce_X_to_Zero.py | 7d298d830bc7aa62f9dadacedb3fc628f5fc96c5 | [] | no_license | lixiang2017/leetcode | f462ecd269c7157aa4f5854f8c1da97ca5375e39 | f93380721b8383817fe2b0d728deca1321c9ef45 | refs/heads/master | 2023-08-25T02:56:58.918792 | 2023-08-22T16:43:36 | 2023-08-22T16:43:36 | 153,090,613 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,854 | py | '''
prefix sum + binary search
T: O(7 * N + NlogN) = O(NlogN)
S: O(2N)
Runtime: 2397 ms, faster than 8.98% of Python3 online submissions for Minimum Operations to Reduce X to Zero.
Memory Usage: 28.4 MB, less than 44.81% of Python3 online submissions for Minimum Operations to Reduce X to Zero.
'''
class Solution:
... | [
"laoxing201314@outlook.com"
] | laoxing201314@outlook.com |
af447697d230967e564b8d43cc5849a419c7d3b1 | 0cf6cc52e2d8f230d4a4265e955dd3e0810653c0 | /my_prj/test_utils/factories/poll.py | bc027b22d8667a7ea48fd6f6c4c5fdef0d0218e7 | [] | no_license | miphreal/dev2dev-testing | c67c4fc2934d8ec4831e676e6d46071bca89fa25 | c09e64984f3e53d8f61e4b0b5236482eaa38b663 | refs/heads/master | 2021-01-11T00:06:03.503707 | 2016-10-25T15:02:42 | 2016-10-25T15:02:42 | 70,728,818 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 613 | py | from my_prj.polls.models import Question, Choice
from my_prj.test_utils import *
class ChoiceFactory(factory.DjangoModelFactory):
class Meta:
model = Choice
choice_text = factory.Faker('text')
votes = 0
class QuestionFactory(factory.DjangoModelFactory):
class Meta:
model = Question
... | [
"miphreal@gmail.com"
] | miphreal@gmail.com |
0d523cbadea58db5844fa5dd87a4eff41050d77b | aad164e4efe1d55cc189c35956bfd435b14a0f52 | /eve-8.21.494548/lib/carbonstdlib/contextlib.py | 9fd6320c1f1294c1aa557a4f38f9c87283acba88 | [] | no_license | Pluckyduck/eve | 61cc41fe8fd4dca4fbdcc4761a37bcfeb27ed84f | 9a277707ab1f162c6bd9618faf722c0be3ea93ad | refs/heads/master | 2020-12-28T23:35:29.992875 | 2013-05-06T14:24:33 | 2013-05-06T14:24:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,185 | py | #Embedded file name: c:\depot\games\branches\release\EVE-TRANQUILITY\carbon\common\stdlib\contextlib.py
import sys
from functools import wraps
from warnings import warn
__all__ = ['contextmanager', 'nested', 'closing']
class GeneratorContextManager(object):
def __init__(self, gen):
self.gen = gen
def... | [
"ferox2552@gmail.com"
] | ferox2552@gmail.com |
f3c2f424721aba59acfd050755659e84ff609db8 | 759653bf8bd290e023d8f71a0cd5faa95c1687b0 | /code/771.py | eba1126050396bc1573007cc45ac457e4b9518bf | [] | no_license | RuidongZ/LeetCode | 6032fc02d3f996155c4f6965f2ad2fc48de6c3c2 | ef8f9edd7857f4ef103924e21224dcd878c87196 | refs/heads/master | 2022-02-27T12:32:00.261851 | 2019-10-17T08:54:34 | 2019-10-17T08:54:34 | 115,314,228 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 939 | py | # -*- Encoding:UTF-8 -*-
# 771. Jewels and Stones
# You're given strings J representing the types of stones that are jewels, and S representing the stones you have.
# Each character in S is a type of stone you have. You want to know how many of the stones you have are also jewels.
#
# The letters in J are guaranteed... | [
"459597855@qq.com"
] | 459597855@qq.com |
cfea9560e5ec1f92438c4d1bfe85bfcbed0afd05 | 9d862dd68f8b4ea4e7de9397fef8592824c77449 | /app/top/api/rest/WlbOrderCancelRequest.py | 09660e9157ded1486da3eb9a863973538165a9b6 | [] | no_license | hi-noikiy/tmall-sku-outer_id | ffaca630dfb288ca33d962b8a050932d1047b9c8 | 1bcf29386a513bcb210bf5d91016e0dcb1ebc1ad | refs/heads/master | 2021-05-09T18:20:27.150316 | 2017-03-08T06:43:57 | 2017-03-08T06:43:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 301 | py | '''
Created by auto_sdk on 2016.04.14
'''
from app.top.api.base import RestApi
class WlbOrderCancelRequest(RestApi):
def __init__(self,domain='gw.api.taobao.com',port=80):
RestApi.__init__(self,domain, port)
self.wlb_order_code = None
def getapiname(self):
return 'taobao.wlb.order.cancel'
| [
"1037096435@qq.com"
] | 1037096435@qq.com |
40ca69a149cf8e465343e98e58f19e00a9b53ce6 | 33faef69c6ceb5944edae07d76175dafe8c7ec17 | /web_robotframework/migrations/0014_auto_20181116_1501.py | df6c256eb6a1124c4a6d077221ffdc13cac5f18f | [] | no_license | waterfronter/AutoZone | 86edfe45f8d92839f31d1e4608f13d309017fc8d | dec180c4aaa88dc015ff7ca1d8e75f1967062a6b | refs/heads/master | 2020-06-11T07:25:59.439326 | 2019-06-06T09:02:42 | 2019-06-06T09:02:42 | 193,890,095 | 0 | 1 | null | 2019-06-26T11:19:39 | 2019-06-26T11:19:39 | null | UTF-8 | Python | false | false | 454 | py | # Generated by Django 2.1.1 on 2018-11-16 07:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('web_robotframework', '0013_auto_20181116_1452'),
]
operations = [
migrations.AlterField(
model_name='add_web_steps',
... | [
"1633235633@qq.com"
] | 1633235633@qq.com |
22e3d0ce7d47a5f3494e82146632cd45c24f84d9 | 6b699b7763a0ff8c32b85014d96f6faf02514a2e | /models/official/utils/logs/hooks_helper.py | f4f14492389a8885bf6deb8eeb607c1422e0548f | [
"Apache-2.0"
] | permissive | leizeling/Base_tensorflow-object_detection_2Dcord | df7c195685fed21fd456f1dd79881a198cf8b6e0 | d07418eb68543adc2331211ccabbc27137c8676e | refs/heads/master | 2020-03-19T11:51:57.961688 | 2018-06-07T14:47:16 | 2018-06-07T14:47:16 | 136,481,479 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,802 | 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... | [
"1072113944@qq.comm"
] | 1072113944@qq.comm |
82f1aa278d2d713ff7e37345ceae2c185accee21 | c074ce302e0a2a09ebe8b0a94e342380afbaa911 | /beakjoon_PS/no17144.py | 74a99479091ac9aefa711ffac7d15e85ca9d1f48 | [] | no_license | elrion018/CS_study | eeea7a48e9e9b116ddf561ebf10633670d305722 | 3d5478620c4d23343ae0518d27920b3211f686fd | refs/heads/master | 2021-06-10T13:35:20.258335 | 2021-04-25T10:12:17 | 2021-04-25T10:12:17 | 169,424,097 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,424 | py | import sys
def four_way_spread(y,x, room, temp1, temp2):
dy = [0,0,1,-1]
dx = [1,-1,0,0]
if room[y][x] > 0:
for k in range(4):
ay = y + dy[k]
ax = x + dx[k]
if ay >= 0 and ay <r and ax>=0 and ax <c and room[ay][ax] != -1:
part = room[y][x] // 5
temp1[ay][ax] += part
... | [
"elrion018@gmail.com"
] | elrion018@gmail.com |
1a0e35d230b3b14fdb921c31b726a5c7fe3ab471 | 4cf5b34118daa3c26a47c7213eaaa656b3ab57f0 | /src/treeminer.py | 2e40ad5b834c7f67b85145bdbe3f55bcbf42e320 | [] | no_license | vrthra/Cmimid | a177b5dbd3ef69852b6746ee09a140f35cbc0580 | 25465201830b35a0338407b0a4e13ef512881731 | refs/heads/master | 2020-06-17T08:24:46.465783 | 2019-11-11T15:17:25 | 2019-11-11T15:17:25 | 195,860,435 | 0 | 1 | null | 2019-09-10T09:22:53 | 2019-07-08T17:49:25 | Python | UTF-8 | Python | false | false | 6,808 | py | import sys
import json
import itertools as it
from operator import itemgetter
from fuzzingbook.GrammarFuzzer import tree_to_string
def reconstruct_method_tree(method_map):
first_id = None
tree_map = {}
for key in method_map:
m_id, m_name, m_children = method_map[key]
children = []
... | [
"rahul@gopinath.org"
] | rahul@gopinath.org |
810b7d95938ec105f9de7bc48d3eb11b3338bb3f | 471ea669e21abdb4e4915610b4b5eb43ea3cffe9 | /剑指Offer/27.字符串的排列.py | ca20aaf9bf80c69e0f52a5f8cce2ced8237e0549 | [] | no_license | JiahuaLink/nowcoder-leetcode | 26aed099e215cfc1d8e8afffc62fafa26b26b06f | 0155fc33511cbe892f58550d561d3aa3efcd56b9 | refs/heads/master | 2023-07-09T03:05:31.227720 | 2021-08-03T06:50:36 | 2021-08-03T06:50:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 224 | py | # 使用迭代工具类的排列方法
import itertools
class Solution:
def Permutation(self, ss):
if not ss:
return []
return sorted(list(set(map(''.join, itertools.permutations(ss))))) | [
"noreply@github.com"
] | JiahuaLink.noreply@github.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.