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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3b7bce198346d439703494bd74c2c46bef4a5270 | d488f052805a87b5c4b124ca93494bc9b78620f7 | /google-cloud-sdk/lib/googlecloudsdk/command_lib/deployment_manager/flags.py | d4cbf34227cc379f368deb83d40bbb690841c6b0 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | PacktPublishing/DevOps-Fundamentals | 5ce1fc938db66b420691aa8106ecfb3f9ceb1ace | 60597e831e08325c7e51e8557591917f7c417275 | refs/heads/master | 2023-02-02T04:48:15.346907 | 2023-01-30T08:33:35 | 2023-01-30T08:33:35 | 131,293,311 | 13 | 19 | null | null | null | null | UTF-8 | Python | false | false | 4,189 | py | # Copyright 2016 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... | [
"saneetk@packtpub.com"
] | saneetk@packtpub.com |
4bbf5176a2819bc143b1ee92a6c2f72dd3b570b1 | d6bf3302b826127a9d2f08bbd05947cbb9d342c6 | /symmetry_1/encrypt.py | b2978c73f33e432efc322710c5513fbf23979a6f | [] | no_license | velocitystorm/ctf-crypto-tasks | 03add82d00bbf28f45955e153d4c5585e1a2647a | 50a2ea2019bc7798a85d5bcbb6e04ebd91f9a51b | refs/heads/master | 2021-01-19T07:10:34.714655 | 2014-04-16T19:57:08 | 2014-04-16T19:57:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 363 | py | #!/usr/bin/env python3
def encrypt(data, key):
return bytes([octet ^ key for octet in data])
print('Enter a key: ')
key = input()
key = ord(key[0])
print('Enter a message: ')
message = input().strip().encode('ascii') # convert from str to bytes
encrypted = encrypt(message, key)
fout = open('message.encrypted'... | [
"cxielamiko@gmail.com"
] | cxielamiko@gmail.com |
b3d6568aadebae72d49ae2424c19d1cd3db5d59f | c46fba793dc4c2eb4aa7886ca1b29d2c444dddb9 | /tests/test_config_validators.py | b18d531cd0c58283a79c08ca805a7ab26ac0a973 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | digideskio/vodka | 7ffcc408df3571db9bb143674db51554ddd34674 | 86a4efa0e1666902771459c8727680888026eac5 | refs/heads/master | 2021-01-12T17:49:58.576348 | 2016-10-11T09:36:40 | 2016-10-11T09:36:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 525 | py | import unittest
import vodka.config.validators
class TestConfigValidators(unittest.TestCase):
def test_path_validator(self):
b,d = vodka.config.validators.path(__file__)
self.assertEqual(b, True)
def test_host_validator(self):
b,d = vodka.config.validators.host("host:1")
... | [
"stefan@20c.com"
] | stefan@20c.com |
cd7c4627c1549a2026c52188d64d165e6a522a59 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/adjectives/_inspirational.py | 99cfc99ffa1a858152258d1937a20cad880aa545 | [
"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 | 416 | py |
#calss header
class _INSPIRATIONAL():
def __init__(self,):
self.name = "INSPIRATIONAL"
self.definitions = [u'making you feel full of hope or encouraged: ']
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.specie = 'adjectives'
def run(self, obj1, obj2):
self.jso... | [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
6856f767fdb17749139555eee6cacdc1dc9e16fe | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/pronouns/_one.py | f591a8a6acc6b3fb2f2a28d9dd49ebe3efe3e975 | [
"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 | 645 | py |
#calss header
class _ONE():
def __init__(self,):
self.name = "ONE"
self.definitions = [u'used to refer to a particular thing or person within a group or range of things or people that are possible or available: ', u'to never do something: ', u'to like something very much: ', u'used to talk about one person or t... | [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
25f3d296f6e6657fadb469b39bcae1f882399891 | 8fd11d010b550144c62e2cf0ead5a89433ba56e9 | /bin/switch_kerasbackend | 24a63df2ae7d764d28adf5073bf310ea7ddd30ab | [] | no_license | Shaar68/PyShortTextCategorization | 3d47d4fc1996eab61fc8cf2ce8d37c0ef9188931 | 189a57da34c52aab1dbd8dcf4145c2dbb120f5af | refs/heads/master | 2021-04-15T18:46:47.014156 | 2017-06-16T20:59:15 | 2017-06-16T20:59:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 701 | #!/usr/bin/env python
# Secret code. Welcome for those who find this code.
# argument parsing
import argparse
def getargparser():
parser = argparse.ArgumentParser(description='Switch Keras backend')
parser.add_argument('backend', help="Backend ('theano' or 'tensorflow')")
return parser
parser = getargpa... | [
"stephenhky@yahoo.com.hk"
] | stephenhky@yahoo.com.hk | |
85904490e01b299c684985a2b352b9b0ad3e7072 | 8f588e8c1502d468689732969c744ccca2055106 | /Python/Programmers/Lv2/n진수게임.py | cf3b9d5062511cb56acb7c560b8dec42a700682d | [] | no_license | 5d5ng/ForCodingTest | 96751c969c2f64d547fe28fa3e14c47c2943947b | 3742c1b38bf00dd4768a9c7ea67eca68844b4a14 | refs/heads/master | 2023-01-04T14:18:40.874764 | 2020-11-02T06:15:05 | 2020-11-02T06:15:05 | 222,054,009 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 793 | py | def solution(n,t,m,p):
answer = replace(n,m*t)
res = ""
for i in range(p-1,len(answer),m):
res+=answer[i]
if len(res)==t:return res
def replace(n,size): # size까지
num = ['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F']
lst = ['0','1']
start = 2
while(len(lst)... | [
"deo1915@gmail.com"
] | deo1915@gmail.com |
46fd526660dbfc019853fabd462a7d73dbe53b03 | 07c75f8717683b9c84864c446a460681150fb6a9 | /3.Flask_cursor/days01快速入门/demo01.py | 329e98f279655b1c6e44cf5da068fc75cba4249c | [] | no_license | laomu/py_1709 | 987d9307d9025001bd4386381899eb3778f9ccd6 | 80630e6ac3ed348a2a6445e90754bb6198cfe65a | refs/heads/master | 2021-05-11T09:56:45.382526 | 2018-01-19T07:08:00 | 2018-01-19T07:08:00 | 118,088,974 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 858 | py | '''
Flask继承了Django和Tornado的部分优点
在高并发处理上,类似于Django通过多线程的方式实现
在编程处理上,类似于Tornado通过手工编码的方式实现web application
'''
# 引入需要的模块
from flask import Flask # 核心处理模块
# 通过当前文件构建一个app应用 ~~ 当前文件就是 web app程序的入口
app = Flask(__name__)
# 定义视图处理函数~路由+视图函数->加载到 app 中
@app.route("/") # 访问路由
def index(): # 绑定的视图函数
return "<h1>h... | [
"1007821300@qq.com"
] | 1007821300@qq.com |
b887636efed3ae71e7e0660b52fbac0e6d3d6873 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/65/usersdata/219/38632/submittedfiles/investimento.py | 3a87d2cb906049101a01605e976893fc0fa25aca | [] | 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 | 327 | py | # -*- coding: utf-8 -*-
from __future__ import division
#COMECE SEU CODIGO AQUI
deposito=float(input('Digite o deposito:'))
taxa=float(input('Digite a taxa:'))
investimento=float(input('Digite o investimento:'))
mês=1
while mes <= 10:
investimento=investimento+taxa*investimento
print('%d/%d/%d/%d/%d/%d/%d/%d/%... | [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
7ad96ac8ed482fde22e8b199d879255e63f17260 | b1d92172726262fc89f9a0c4a9e4888ebc91009e | /leetcode/easy/Interleave.py | 1c493d3f57046482b48177ea177b563573da49bb | [] | no_license | SuperMartinYang/learning_algorithm | 0c5807be26ef0b7a1fe4e09832f3ce640cd3172b | e16702d2b3ec4e5054baad56f4320bc3b31676ad | refs/heads/master | 2021-06-27T14:00:18.920903 | 2019-05-05T23:25:29 | 2019-05-05T23:25:29 | 109,798,522 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 525 | py | def isInterleave(word1, word2, word3):
'''
word1= 'asdf'
word2 = 'sadfa'
word3 = 'assaddffa'
:param word1: str
:param word2: str
:param word3: str
:return: bool
'''
if word3 == '':
if word1 == word2 == '':
return True
else:
return False
... | [
"shy58@pitt.edu"
] | shy58@pitt.edu |
f1409870e136171b9f35c5745ceba8d628968f1d | b27b26462524984951bfbab9250abd145ecfd4c8 | /Demoing/stage_two/hawaii/craigslist_sample/craigslist_sample/spiders/craigslist_spider.py | 4a8ff1b9c951d8f06a9a0049a23b24525323045a | [] | no_license | afcarl/fastTraffickingGrab | cb813d066f1f69f359598e0b55e632dafd273c89 | 9ff274cb7c9b6c7b60d1436c209b2bfc5907267d | refs/heads/master | 2020-03-26T06:21:21.404931 | 2014-08-16T12:38:29 | 2014-08-16T12:38:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,648 | py |
from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.selector import HtmlXPathSelector
from craigslist_sample.items import CraigslistSampleItem
class CraigslistSpider(CrawlSpider):
name = "craigslist"
allowed_domains = ["craigslist.... | [
"ericschles@gmail.com"
] | ericschles@gmail.com |
e1e57f455f8052ec8a259620b247dbb9611debba | 71d4fafdf7261a7da96404f294feed13f6c771a0 | /mainwebsiteenv/bin/python-config | 34a5b39d2ea832da34c02d5012684422e32075af | [] | no_license | avravikiran/mainwebsite | 53f80108caf6fb536ba598967d417395aa2d9604 | 65bb5e85618aed89bfc1ee2719bd86d0ba0c8acd | refs/heads/master | 2021-09-17T02:26:09.689217 | 2018-06-26T16:09:57 | 2018-06-26T16:09:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,434 | #!/home/kiran/mainwebsite/mainwebsiteenv/bin/python
import sys
import getopt
import sysconfig
valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
'ldflags', 'help']
if sys.version_info >= (3, 2):
valid_opts.insert(-1, 'extension-suffix')
valid_opts.append('abiflags')... | [
"me15btech11039@iith.ac.in.com"
] | me15btech11039@iith.ac.in.com | |
4b5c8b490bfaa7cd67402657c4020db410bde51b | fb7b6a0d43c524761f5251273d14f317e779c5f0 | /rxbp/observables/fromiteratorobservable.py | bd223651a12680dd7c80c263f7fb1e32727ef164 | [
"Apache-2.0"
] | permissive | MichaelSchneeberger/rxbackpressure | e7396b958d13e20377375f4b45a91a01f600595a | 470d36f729ef9dc001d0099cee45603d9c7f86a3 | refs/heads/master | 2022-08-26T10:12:05.164182 | 2022-08-21T12:21:15 | 2022-08-21T12:21:15 | 109,152,799 | 32 | 1 | Apache-2.0 | 2021-03-09T12:47:23 | 2017-11-01T16:05:20 | Python | UTF-8 | Python | false | false | 4,732 | py | from typing import Iterator, Any, Optional
from rx.disposable import Disposable, BooleanDisposable, CompositeDisposable
from rxbp.acknowledgement.continueack import ContinueAck
from rxbp.acknowledgement.operators.observeon import _observe_on
from rxbp.acknowledgement.single import Single
from rxbp.acknowledgement.sto... | [
"michael.schneeb@gmail.com"
] | michael.schneeb@gmail.com |
4355cddb4a6bf72e8a7bb7c5cbf43fd7937c39d7 | 52c705205b243016c90757ed9d7332840277ce11 | /atracoes/migrations/0003_atracao_observacoes.py | ab7a3c8d0152bbe7326dde69447851f31aebcec9 | [] | no_license | lssdeveloper/pontos_turisticos | eb943549cb18561205818dcfb8c624bba32c7100 | 24852ca1b35795db876219a7a3439f496866d3d5 | refs/heads/main | 2023-04-03T10:24:22.000414 | 2021-04-15T20:13:02 | 2021-04-15T20:13:02 | 355,312,899 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 408 | py | # Generated by Django 3.1.7 on 2021-04-15 17:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('atracoes', '0002_atracao_foto'),
]
operations = [
migrations.AddField(
model_name='atracao',
name='observacoes',
... | [
"leandro.serra.10@gmail.com"
] | leandro.serra.10@gmail.com |
d9a18dc79e3f78292de7283cc85150a6221a6818 | 07841826ed64a7c6a21b79728f73748ac70dbbc1 | /1.2.2.py | 32cd6c3c38b89f023dcf0a64b287b3421998c263 | [] | no_license | riley-csp-2019-20/1-2-2-catch-a-turtle-leaderboard-illegal-Loli | 772859d28ae3b7b8d003febd1c57fd79b55907dc | 8648a790e039044b3ce722a53a8ec42e45d42488 | refs/heads/master | 2020-09-06T01:58:27.621209 | 2019-12-12T16:11:22 | 2019-12-12T16:11:22 | 220,279,845 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,622 | py | # a121_catch_a_turtle.py
#-----import statements-----
import turtle as trtl
import random
import leaderboard as lb
#-----game configuration----
shape = "square"
size = 2
color = "brown"
score = 0
font_setup = ("Arial", 20, "normal")
timer = 10
counter_interval = 1000 #1000 represents 1 second
timer_up ... | [
"noreply@github.com"
] | riley-csp-2019-20.noreply@github.com |
fffaea4b5fab14b8a13db2f9f03a3f89301b5981 | 6f2d5600b65b062151bab88c592796b878de7465 | /Week_3/Class_0226/Function_2_tuple.py | 7e1d6989619b585a1d0dc0ad18f1c32533c6f469 | [] | no_license | zhouyanmeng/python_api_test | 1e6549321c20ee9a71beffac2533c917b5ecc157 | 7303352c9b5baacba5296b088f89ba4c702fb485 | refs/heads/master | 2022-12-17T14:34:26.351566 | 2019-03-01T13:02:06 | 2019-03-01T13:02:06 | 185,185,856 | 0 | 0 | null | 2022-12-08T01:45:15 | 2019-05-06T11:45:55 | Python | UTF-8 | Python | false | false | 420 | py | #####元组的内置函数 不可变元素,所有方法特别少
t=('rigth','sadness','灰灰的','柠檬','sadness','sadness')
####count统计数量的作用
res=t.count('A')###寻找元素出现的次数,在元组里面去找
print(res)
####index 找某个元素索引(位置) 找不到报错 默认1开始,可以指定个数
res=t.index("rigth")
print(res)###0
res=t.index("sadness",3)
print(res)###4
| [
"2440269710@qq.com"
] | 2440269710@qq.com |
0dce4ec9766df4f4af8856792758ec7b7d60a045 | adcbefa6cba639ec8c8eb74766b7f6cd5301d041 | /coffeehouse_nlpfr/classify/textcat.py | 32480de52dcff8dc955f48ed7948bedbc781b998 | [] | no_license | intellivoid/CoffeeHouse-NLPFR | b39ae1eaeb8936c5c5634f39e0a30d1feece6705 | 8ad1b988ddba086478c320f638d10d0c0cacca4c | refs/heads/master | 2022-11-28T02:13:40.670494 | 2020-06-07T04:02:00 | 2020-06-07T04:02:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,110 | py | # -*- coding: utf-8 -*-
# Natural Language Toolkit: Language ID module using TextCat algorithm
#
# Copyright (C) 2001-2019 NLTK Project
# Author: Avital Pekker <avital.pekker@utoronto.ca>
#
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
"""
A module for language identification using the TextCat a... | [
"netkas@intellivoid.info"
] | netkas@intellivoid.info |
a60f708732cd173bb315e5f8aac3373e5d378180 | 31bc3fdc7c2b62880f84e50893c8e3d0dfb66fa6 | /language/python_27/built_in_functions/xrange_.py | 7bdc6a3472b618b41017ab38268da7e639255b1c | [] | no_license | tpt5cu/python-tutorial | 6e25cf0b346b8182ebc8a921efb25db65f16c144 | 5998e86165a52889faf14133b5b0d7588d637be1 | refs/heads/master | 2022-11-28T16:58:51.648259 | 2020-07-23T02:20:37 | 2020-07-23T02:20:37 | 269,521,394 | 0 | 0 | null | 2020-06-05T03:23:51 | 2020-06-05T03:23:50 | null | UTF-8 | Python | false | false | 713 | py | # https://docs.python.org/2/library/functions.html#xrange
def use_xrange():
'''
The xrange() function is totally different from the range() function. It does not return a list. I can think of it as a generator. It has the same
method signature as range()
'''
x = xrange(1, 10)
print(x) # xrange... | [
"uif93194@gmail.com"
] | uif93194@gmail.com |
d3205bd4ff23c60c90c8e9f539e38a4470e037fe | e77c683da89f4705b015e76f02486e7001d82697 | /kubernetes/client/models/v2_hpa_scaling_rules.py | c045f5d4dc20f9d483698b3f271d1b66d608fde0 | [
"Apache-2.0"
] | permissive | Sandello76/python-2 | 4027901d7a9a7d451146fafb844f242708784999 | e5f4520522681a8ec50052991d6226296dc0fb5e | refs/heads/master | 2023-01-21T11:17:31.697036 | 2022-04-12T11:43:35 | 2022-04-12T11:43:35 | 169,290,597 | 0 | 0 | Apache-2.0 | 2023-01-13T03:11:56 | 2019-02-05T18:29:08 | Python | UTF-8 | Python | false | false | 6,818 | py | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: release-1.23
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import si... | [
"yliao@google.com"
] | yliao@google.com |
cc31a73155bf7a1396a114b82259e779537e8ff9 | 9c63f6d39a6085674ab42d1488476d0299f39ec9 | /Python/LC_Kth_Largest_Element_in_an_Array.py | 7c993647bd88be65ae4b55dc5b44039e08b71761 | [] | no_license | vijayjag-repo/LeetCode | 2237e3117e7e902f5ac5c02bfb5fbe45af7242d4 | 0a5f47e272f6ba31e3f0ff4d78bf6e3f4063c789 | refs/heads/master | 2022-11-14T17:46:10.847858 | 2022-11-08T10:28:30 | 2022-11-08T10:28:30 | 163,639,628 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 474 | py | class Solution(object):
def findKthLargest(self, nums, k):
"""
:type nums: List[int]
:type k: int
:rtype: int
"""
# Solution 1
# There are different variations which you can do with heap. This is one of the smallest along with heapq.nlargest()
... | [
"noreply@github.com"
] | vijayjag-repo.noreply@github.com |
a277e9f184cbf53ef869869269365cfe9e69fd90 | fa51b088ea761b78cf0c85837fabaa0b7035b105 | /automl/snippets/language_sentiment_analysis_create_model.py | 40262aa4f637ba15df8f0e51fd488a2a48593cab | [
"Apache-2.0"
] | permissive | manavgarg/python-docs-samples | f27307022092bc35358b8ddbd0f73d56787934d1 | 54b9cd6740b4dbc64db4d43a16de13c702b2364b | refs/heads/master | 2023-02-07T21:18:15.997414 | 2023-01-28T18:44:11 | 2023-01-28T18:44:11 | 245,290,674 | 0 | 0 | Apache-2.0 | 2020-03-05T23:44:17 | 2020-03-05T23:44:16 | null | UTF-8 | Python | false | false | 1,697 | 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, so... | [
"71398022+dandhlee@users.noreply.github.com"
] | 71398022+dandhlee@users.noreply.github.com |
15abe88a6ca070e5627b56fbc2a2561be4740ffb | 1bfb4df83565da98e0b7a2d25915370732b94b6a | /atcoder/abc188/e.py | 99f51f748eedd29f80e5a5a8462729e68334a149 | [
"MIT"
] | permissive | sugitanishi/competitive-programming | e8067090fc5a2a519ef091496d78d3154be98a2b | 51af65fdce514ece12f8afbf142b809d63eefb5d | refs/heads/main | 2023-08-11T02:48:38.404901 | 2021-10-14T14:57:21 | 2021-10-14T14:57:21 | 324,516,654 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 516 | py | import sys
sys.setrecursionlimit(10000000)
input=lambda : sys.stdin.readline().rstrip()
n,m=map(int,input().split())
a=list(map(int,input().split()))
dic=[ [[],-999999999999] for i in range(n)]
for i in range(m):
x,y=map(int,input().split())
x-=1
y-=1
dic[x][0].append(y)
ans = -999999999999
for i in... | [
"keita.abi.114@gmail.com"
] | keita.abi.114@gmail.com |
30b3686a98f972e2165cd478547a8747479f63d1 | 8100f7895b257d15f19ca41f3ace9849647e49f8 | /kademlia/tests/test_routing.py | ecaf1ae63b4f57035578d0f86aa3bba57fb66c94 | [
"MIT"
] | permissive | bmcorser/kademlia | 90cac70a2853a759cf55d0651fbb125c50a5f5f5 | c6f1062082d7e3cb8b5af53bcc672b138848b337 | refs/heads/master | 2021-01-17T04:51:37.439919 | 2014-12-26T19:57:43 | 2014-12-26T19:57:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,856 | py | from twisted.trial import unittest
from kademlia.routing import KBucket, RoutingTable
from kademlia.protocol import KademliaProtocol
from kademlia.tests.utils import mknode, FakeProtocol
class KBucketTest(unittest.TestCase):
def test_split(self):
bucket = KBucket(0, 10, 5)
bucket.addNode(mknode(i... | [
"bamuller@gmail.com"
] | bamuller@gmail.com |
3925169a07bd92641cd6ea6064b96ecd6c232bde | d93c91e904470b46e04a4eadb8c459f9c245bb5a | /banglore_scrape/acresrent/acresrent/items.py | a1fc474292c3702617c42d5875f953929b5aaf90 | [] | no_license | nbourses/scrappers | 3de3cd8a5408349b0ac683846b9b7276156fb08a | cde168a914f83cd491dffe85ea24aa48f5840a08 | refs/heads/master | 2021-03-30T15:38:29.096213 | 2020-03-25T03:23:56 | 2020-03-25T03:23:56 | 63,677,541 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,429 | py | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class AcresrentItem(scrapy.Item):
# define the fields for your item here like:
# name = scrapy.Field()
carpet_area = scrapy.Field()
upda... | [
"karanchudasama1@gmail.com"
] | karanchudasama1@gmail.com |
3a1be8b5f004ecaa5b1073b7bea1ccae15e324b7 | 40c4b8e9ac9074869bfb0dc1d3c3f566371f1764 | /Hangman1/rectangle3.py | 7082113cadbd1e910a7297d1e81a0b0631f390f4 | [] | no_license | katuhito/Hangman001 | 870a8827e69cbd9a8b01ffb55f5c499c71861b76 | 710a201c6ad8284e164ea8ad26cd061486c50849 | refs/heads/master | 2022-12-06T16:30:24.613288 | 2020-08-22T10:19:27 | 2020-08-22T10:19:27 | 285,448,433 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 241 | py | class Rectangle:
def __init__(self, w, l):
self.width = w
self.len = l
def print_size(self):
print("{} by {}".format(self.width, self.len))
my_rectangle = Rectangle(10, 24)
my_rectangle.print_size()
| [
"katuhitohara@gmail.com"
] | katuhitohara@gmail.com |
a2b1d622e04da9f379ad7dec5d7160a7df4cb382 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_200/5220.py | 3953bab56b760965dae521faab27b88c6280402e | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 287 | py | f = open("test.txt")
o = open("final.txt", 'w')
t = int(f.readline())
for i in range(t):
n = int(f.readline())
while n>0:
if int(''.join(sorted(list(str(n))))) == n:
o.write("Case #{}: {}\n".format(i+1,n))
break
else:
n -= 1
| [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
bbf1b8bfc58b8fa0bb3231f35c168ee5235006e9 | 0fea8a6421fe5f5967f2202910022c2bfd277b4d | /190.生成字典.py | 51461ae593ab4ecd836413dd315ba3b0b9c3f9a8 | [] | no_license | maohaoyang369/Python_exercise | 4dc10ec061aa0de2bcfe59c86be115e135fb3fab | 8fbee8854db76d09e2b1f9365ff55198ddabd595 | refs/heads/master | 2020-04-09T23:04:02.327118 | 2019-09-05T14:49:07 | 2019-09-05T14:49:07 | 160,646,057 | 0 | 2 | null | 2019-03-21T14:44:13 | 2018-12-06T08:50:19 | Python | UTF-8 | Python | false | false | 498 | py | # !/usr/bin/env python
# -*- coding: utf-8 -*-
# 生成字典{“a”:1,”c”:3,”e”:5,”g”:7,”i”:9}
import string
letters = string.ascii_letters[0:9]
result = {}
for i in range(0, len(letters), 2):
result[letters[i]] = i+1
print(result)
# 将以上字典的key和value拼接成字符串,不能使用字符串连接符(+)
sentence = {'a': 1, 'c': 3, 'e': 5, 'g': 7, 'i': ... | [
"372713573@qq.com"
] | 372713573@qq.com |
9848f1253781378294034070b41e90cb3b18980e | 524b2ef7ace38954af92a8ed33e27696f4f69ece | /montecarlo4fms/utils/mctsstats_its.py | 9a7cf4b70cb928340f7e17db07c8bbccd33a7734 | [] | no_license | jmhorcas/montecarlo_analysis | ebf9357b0ede63aa9bcdadb6a5a30a50ad7460eb | 2319838afb0f738125afc081fc4b58a0d8e2faee | refs/heads/main | 2023-06-24T19:05:36.485241 | 2021-07-20T08:24:06 | 2021-07-20T08:24:06 | 363,059,338 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,978 | py | from montecarlo4fms.models import State
class MCTSStatsIts():
"""Iterations stats"""
ROUND_DECIMALS = 2
METHOD_STR = 'Method'
ITERATIONS_STR = 'Iterations'
STEPS_STR = 'Decisions'
SIMULATIONS_STR = 'Simulations'
EVALUATIONS_STR = 'Evaluations'
POSITIVE_EVALUATIONS_STR = 'PositiveEval... | [
"jhorcas@us.es"
] | jhorcas@us.es |
7e2aca3f77a73d466a4da4a18a7e0bc5683a0fe4 | 3c30d27bf5856dcdbc689dd01ed12ae007fc5b07 | /dorandoran/config/settings/__init__.py | 02f06ea5d084ca462743c9fabf93e6fe6b7766ef | [] | no_license | Doran-Doran-development/DoranDoran-Server-2 | 047ff79a6cc472364b2bf6507d89617832e1571c | 6340af1b887e08270bee0e13029ee41df7dfeb1e | refs/heads/master | 2023-06-06T14:44:27.891110 | 2021-05-19T15:05:14 | 2021-05-19T15:05:14 | 346,971,795 | 11 | 0 | null | 2021-06-11T01:00:18 | 2021-03-12T06:58:34 | Python | UTF-8 | Python | false | false | 160 | py | import os
SETTINGS_MODULE = os.environ.get("DJANGO_SETTINGS_MODULE")
if not SETTINGS_MODULE or SETTINGS_MODULE == "config.settings":
from .local import *
| [
"hanbin8269@gmail.com"
] | hanbin8269@gmail.com |
3dbbc772a56fbcb69c3df9317f21fe380939b860 | facb8b9155a569b09ba66aefc22564a5bf9cd319 | /wp2/merra_scripts/02_preprocessing/merraLagScripts/392-tideGauge.py | bf4ff8cf2ba0191d209994b7caa2338c79b66107 | [] | no_license | moinabyssinia/modeling-global-storm-surges | 13e69faa8f45a1244a964c5de4e2a5a6c95b2128 | 6e385b2a5f0867df8ceabd155e17ba876779c1bd | refs/heads/master | 2023-06-09T00:40:39.319465 | 2021-06-25T21:00:44 | 2021-06-25T21:00:44 | 229,080,191 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,772 | py | # -*- coding: utf-8 -*-
"""
Created on Tue Mar 31 17:12:23 2020
****************************************************
Load predictors & predictands + predictor importance
****************************************************
@author: Michael Tadesse
"""
#import packages
import os
import pandas as pd
import datetime a... | [
"michaelg.tadesse@gmail.com"
] | michaelg.tadesse@gmail.com |
415734380444d4ca699f0a861cd5aedd158602cc | 50008b3b7fb7e14f793e92f5b27bf302112a3cb4 | /recipes/Python/577484_PRNG_Test/recipe-577484.py | 5f08e97722809089c21f45f274f0c10b6d28c1c0 | [
"MIT"
] | permissive | betty29/code-1 | db56807e19ac9cfe711b41d475a322c168cfdca6 | d097ca0ad6a6aee2180d32dce6a3322621f655fd | refs/heads/master | 2023-03-14T08:15:47.492844 | 2021-02-24T15:39:59 | 2021-02-24T15:39:59 | 341,878,663 | 0 | 0 | MIT | 2021-02-24T15:40:00 | 2021-02-24T11:31:15 | Python | UTF-8 | Python | false | false | 1,669 | py | # PRNG (Pseudo-Random Number Generator) Test
# PRNG info:
# http://en.wikipedia.org/wiki/Pseudorandom_number_generator
# FB - 201012046
# Compares output distribution of any given PRNG
# w/ an hypothetical True-Random Number Generator (TRNG)
import math
import time
global x
x = time.clock() # seed for the PRNG
# PRNG ... | [
"betty@qburst.com"
] | betty@qburst.com |
c3cb877e4a914b3e92f3fc6e05594d2242f19825 | f30f5024e2e9ce0dc5e550f7125bb7072fe96207 | /2019/r1a/prob2.py | 1baf96bf5ed1273a8b2431b64dcf1965199fdc76 | [] | no_license | RZachLamberty/google_code_jam | fcb14efed46c93cdc655ed932b6e3076bbe5b3ca | 0e1541db004ac47df5b63dd88f3e182a7a35e768 | refs/heads/master | 2021-12-01T02:04:32.506653 | 2021-11-16T20:33:04 | 2021-11-16T20:33:04 | 253,242,456 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,173 | py | import sys
def main():
T, N, M = [int(_) for _ in input().split(' ')]
for i_test_case in range(T):
options = None
lower_bound = 0
answer = '-1'
for n in [17, 16, 13, 11, 7, 5, 3]:
print(' '.join([str(n) for i in range(18)]))
sys.stdout.flush()
... | [
"r.zach.lamberty@gmail.com"
] | r.zach.lamberty@gmail.com |
e3bc4f76cf3ffb6a5b4786f53d8ebd7ebc637a52 | e6328c5076fe0f1b6819c3eacca08e1c4791199b | /062. Unique Paths/62. Unique Paths.py | 959174bdcbc2488be43001c17cf9725c173b9ad9 | [] | no_license | 603lzy/LeetCode | 16e818d94282b34ac153271697b512c79fc95ef5 | 9752533bc76ce5ecb881f61e33a3bc4b20dcf666 | refs/heads/master | 2020-06-14T03:07:03.148542 | 2018-10-22T14:10:33 | 2018-10-22T14:10:33 | 75,514,162 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 781 | py | class Solution(object):
def uniquePaths(self, m, n):
"""
:type m: int
:type n: int
:rtype: int
https://discuss.leetcode.com/topic/67900/dp-solution-in-python
# basic dynamic programming
"""
if m > 1 and n > 1:
grid = [[0 for col in xrange(n... | [
"noreply@github.com"
] | 603lzy.noreply@github.com |
6fd670ab5d1d479388517eba0c9275c274d3df7a | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/otherforms/_implemented.py | c8115b06a1c54a5a564f83c1619336ef47f28f30 | [
"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 | 236 | py |
#calss header
class _IMPLEMENTED():
def __init__(self,):
self.name = "IMPLEMENTED"
self.definitions = implement
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.basic = ['implement']
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
4606de08215d1e56e7f12b7187c4aec33337463e | 35f9def6e6d327d3a4a4f2959024eab96f199f09 | /developer/lab/ipython/tools/strassen_matrix_multiplication.py | 67c5a531feb4fea827e9edaf8764fa85bfef969d | [
"CAL-1.0-Combined-Work-Exception",
"CAL-1.0",
"MIT",
"CC-BY-SA-4.0",
"LicenseRef-scancode-free-unknown"
] | permissive | arXiv-research/DevLab-III-1 | ec10aef27e1ca75f206fea11014da8784752e454 | c50cd2b9154c83c3db5e4a11b9e8874f7fb8afa2 | refs/heads/main | 2023-04-16T19:24:58.758519 | 2021-04-28T20:21:23 | 2021-04-28T20:21:23 | 362,599,929 | 2 | 0 | MIT | 2021-04-28T20:36:11 | 2021-04-28T20:36:11 | null | UTF-8 | Python | false | false | 6,011 | py | from __future__ import annotations
import math
def default_matrix_multiplication(a: list, b: list) -> list:
"""
Multiplication only for 2x2 matrices
"""
if len(a) != 2 or len(a[0]) != 2 or len(b) != 2 or len(b[0]) != 2:
raise Exception("Matrices are not 2x2")
new_matrix = [
[a[0][... | [
"noreply@github.com"
] | arXiv-research.noreply@github.com |
cb5bd12ced8e3fde3e7611f283a940a293a4b659 | 0c8214d0d7827a42225b629b7ebcb5d2b57904b0 | /practice/P009_Fibonacci/main.py | 1b7ef28e71516019aa48df1f633f869dc72b79a3 | [] | no_license | mertturkmenoglu/python-examples | 831b54314410762c73fe2b9e77aee76fe32e24da | 394072e1ca3e62b882d0d793394c135e9eb7a56e | refs/heads/master | 2020-05-04T15:42:03.816771 | 2020-01-06T19:37:05 | 2020-01-06T19:37:05 | 179,252,826 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 253 | py | # Dynamic programming example
fib_numbers = {1: 1, 2: 1, 3: 2}
def fibonacci(n: int) -> int:
if n not in fib_numbers:
fib_numbers[n] = fibonacci(n - 1) + fibonacci(n - 2)
return fib_numbers[n]
print(fibonacci(7))
print(fibonacci(5))
| [
"mertturkmenoglu99@gmail.com"
] | mertturkmenoglu99@gmail.com |
d669bec0e43de88d1d1a0659b251032840574b22 | 4388363ba45b95910c25bae3d9c02ad78f4a75d6 | /python/anaconda/lib/python2.7/site-packages/numba/tests/npyufunc/test_parallel_ufunc_issues.py | da86964467145527252c07a10e6ad5b9f1969a73 | [
"Python-2.0"
] | permissive | locolucco209/MongoScraper | d494e02531f4f165b1e821633dc9661c579337b5 | 74476c9f00ee43338af696da7e9cd02b273f9005 | refs/heads/master | 2022-11-25T19:09:27.248747 | 2018-07-10T03:54:06 | 2018-07-10T03:54:06 | 137,553,786 | 3 | 1 | null | 2022-11-16T04:32:26 | 2018-06-16T04:49:22 | null | UTF-8 | Python | false | false | 2,600 | py | from __future__ import print_function, absolute_import, division
import time
import ctypes
import numpy as np
from numba import unittest_support as unittest
from numba.tests.support import captured_stdout
from numba import vectorize
class TestParUfuncIssues(unittest.TestCase):
def test_thread_response(self):
... | [
"lukemassetti@WestSide-Luke.local"
] | lukemassetti@WestSide-Luke.local |
4c8cb75900b6afaeafb66fec408097baedf5d1cc | 33f32d78087491e989289c46e5d2df5400e23946 | /leetcode/Unsorted_Algorthm_Problems/Two_Sum_III _Data_structure_design.py | ab9d7045ac0bbbde6e34441cdc36885146a1b6d5 | [] | no_license | xulleon/algorithm | 1b421989423640a44339e6edb21c054b6eb47a30 | b1f93854006a9b1e1afa4aadf80006551d492f8a | refs/heads/master | 2022-10-08T19:54:18.123628 | 2022-09-29T05:05:23 | 2022-09-29T05:05:23 | 146,042,161 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 899 | py | # https://leetcode.com/problems/two-sum-iii-data-structure-design/
class TwoSum:
def __init__(self):
"""
Initialize your data structure here.
"""
self.numbers = {}
def add(self, number: int) -> None:
"""
Add the number to an internal data structure..
""... | [
"leonxu@yahoo.com"
] | leonxu@yahoo.com |
d9cb29925147bcc00f6eeef81143924403f0db3e | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03288/s528258523.py | e21295af8dcf6d86de0facff0a4bceaed3804dab | [] | 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 | 280 | py | import sys
import os
MOD = 10 ** 9 + 7
def main():
if os.getenv("LOCAL"):
sys.stdin = open("input.txt", "r")
N = int(sys.stdin.buffer.readline().rstrip())
print('AGC' if N >= 2800 else 'ARC' if N >= 1200 else 'ABC')
if __name__ == '__main__':
main()
| [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
b17f118b3a48f23411c0605dccbd4d3d7d5ac331 | c75ec82316ed5322c5844912ce9c528c24360b9f | /nsd1903/devweb/day03/mysite/polls/views.py | 34549e6b8acdfc67276252944f7264401ca3a21a | [] | no_license | MrZhangzhg/nsd2019 | a94cde22f2e4bd648bb9e56ca63827f558f3c083 | 54f6d2c7b348a69f13ad5f38f2fbdc8207528749 | refs/heads/master | 2021-08-22T17:38:27.697675 | 2020-02-22T08:36:21 | 2020-02-22T08:36:21 | 183,539,489 | 21 | 24 | null | 2020-05-17T12:07:55 | 2019-04-26T02:06:16 | HTML | UTF-8 | Python | false | false | 1,327 | py | from django.shortcuts import render, redirect
from .models import Question
# Create your views here.
def index(request):
# django将会把http请求作为参数传递给函数,因此,函数必须至少有一个参数
# return HttpResponse('<h1>首页</h1>')
# 取出所有问题,根据pub_date降序排列
questions = Question.objects.order_by('-pub_date')
return render(request, ... | [
"zhangzg@tedu.cn"
] | zhangzg@tedu.cn |
e13ae8c45049850fbfbfea34c7cd6ba0fef4b00a | 86d464653092d40abdbd2a125cb29af4de6ca44c | /experiment_scripts/inverted_indexing_test.py | be874046001a92303bd48125366d31b2f0190f11 | [] | no_license | lws803/CS3245 | ad6003729ead0bf871e131ca0c74676001a66f6a | b4c85388bb017fb21a4ccee14096230aeccecde9 | refs/heads/master | 2020-04-19T03:26:12.737752 | 2019-06-16T16:02:12 | 2019-06-16T16:02:12 | 167,934,428 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,398 | py | from nltk.stem import *
from nltk.probability import FreqDist
import nltk
stemmer = PorterStemmer()
text = "penyetted penyet"
text1 = "penyet test helloed"
text2 = "penyetted hello"
texts = [text, text1, text2]
dictionary = {}
for i in range(0, 3):
for word in nltk.word_tokenize(texts[i]):
word = stem... | [
"lws803@gmail.com"
] | lws803@gmail.com |
5f246ef3eb4100549c48eb0f4832a833d1d6a4ed | e6cce25fb4159112d5a395a63aa024ac409b40d2 | /CHALLENGES/100TASK/ex010.py | 1c683bf8551b6a15bd8a3464c23792719ddae1e6 | [] | no_license | batestin1/PYTHON | 729225e6f1db029ec1e725eced5fe89e884cccb4 | f7fb74dd755acf37920dee6a6f9e3663141232e9 | refs/heads/master | 2023-06-23T03:27:14.951229 | 2021-07-22T22:54:20 | 2021-07-22T22:54:20 | 370,337,387 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 388 | py | #Crie um programa que leia quanto dinheiro uma pessoa tem na carteira e mostre quantos dólares ela pode comprar.
import pandas
print('-*-'*30)
print('CONVERSAO DE DOLAR ')
print('Desenvolvido por Maycon Cypriano')
print('-*-'*30)
real = float(input('Quanto você tem na carteira: '))
dolar = real*0.18
print(f'Se você t... | [
"mayconcipriano@gmail.com"
] | mayconcipriano@gmail.com |
882890653845d4203f7dbc442a563c4f17cbf708 | 19ca5093877d00b1cffcd0ec5c37e27ba2ceb347 | /lesson_03/task_2.py | a99b497abf4470a16621a728f53564a9eef35989 | [] | no_license | MichaelDc86/Algorythms | 10d424fb1bc667d088ecb7f8f01bf889ba2b6b22 | 072685eb045f0a29cc3abb7c008ef5677a7e5690 | refs/heads/master | 2020-05-15T23:57:41.608736 | 2019-05-29T06:39:35 | 2019-05-29T06:39:35 | 182,566,590 | 0 | 0 | null | 2019-05-29T06:39:36 | 2019-04-21T18:07:42 | Python | UTF-8 | Python | false | false | 943 | py | # Во втором массиве сохранить индексы четных элементов первого массива.
# Например, если дан массив со значениями 8, 3, 15, 6, 4, 2,
# второй массив надо заполнить значениями 1, 4, 5, 6 (или 0, 3, 4, 5, если индексация начинается с нуля),
# т.к. именно в этих позициях первого массива стоят четные числа.
import random
... | [
"lenskymiwa@ya.ru"
] | lenskymiwa@ya.ru |
113e7e10a6f4f6f4126931c451a7af984bdf89c7 | b162de01d1ca9a8a2a720e877961a3c85c9a1c1c | /875.koko-eating-bananas.python3.py | 67a20e8d792a6529bc38998bc86ee2ac85df6a73 | [] | no_license | richnakasato/lc | 91d5ff40a1a3970856c76c1a53d7b21d88a3429c | f55a2decefcf075914ead4d9649d514209d17a34 | refs/heads/master | 2023-01-19T09:55:08.040324 | 2020-11-19T03:13:51 | 2020-11-19T03:13:51 | 114,937,686 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,378 | py | #
# [907] Koko Eating Bananas
#
# https://leetcode.com/problems/koko-eating-bananas/description/
#
# algorithms
# Medium (42.86%)
# Total Accepted: 7.6K
# Total Submissions: 17.7K
# Testcase Example: '[3,6,7,11]\n8'
#
# Koko loves to eat bananas. There are N piles of bananas, the i-th pile has
# piles[i] bananas. ... | [
"richnakasato@hotmail.com"
] | richnakasato@hotmail.com |
493992116f031f81f5b2f85c82bed18c7a906557 | 1a87ac9522591f25b03e6912ba3af3cca115abae | /authentication/views.py | babc97856be2925196aacd612175b88e59fbc097 | [
"MIT"
] | permissive | jyywong/InventoryMS | c67fdb0a051be5d136d9509e63b7fc0aeadcc324 | 9aac1324742730ce980e638f2156ece9eb44a593 | refs/heads/master | 2023-04-01T15:38:44.448813 | 2021-04-05T19:59:45 | 2021-04-05T19:59:45 | 350,162,598 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,802 | py | # -*- encoding: utf-8 -*-
"""
Copyright (c) 2019 - present AppSeed.us
"""
from django.shortcuts import render
# Create your views here.
from django.shortcuts import render, redirect
from django.contrib.auth import authenticate, login
from django.contrib.auth.models import User
from django.forms.utils import ErrorList... | [
"wong.jonathan1@gmail.com"
] | wong.jonathan1@gmail.com |
40295ccd9ae060f231a5bedae45d9838221b52a3 | 01431aec3d6084b77faa62eae962c3a5ce07621a | /attention_is_all_you_need.py | 55b5443194eae9da8406c6123bbfa512c29aff15 | [] | no_license | jiyali/python-target-offer | e952cc77b0b3c4e4c77f5b9f67ef61bd7413354c | 214176b25caffea647f87bf816d3d712293c7c7f | refs/heads/master | 2020-07-29T05:53:57.930631 | 2020-05-13T15:04:08 | 2020-05-13T15:04:08 | 209,690,069 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 7,112 | py | # #############input Embedding ###############
class Embeddings(nn.Module):
def __init__(self, d_model, vocab):
super(Embeddings, self).__init__()
self.lut = nn.Embedding(vocab, d_model)
self.d_model = d_model # 表示embedding的维度
def forward(self, x):
return self.lut(x) * math.sqr... | [
"762115542@qq.com"
] | 762115542@qq.com |
e5d3bbcfe8a0f176cd05149a1ff34ab74cc535cf | e0980f704a573894350e285f66f4cf390837238e | /.history/flex/models_20201030102256.py | 24833cc279761223d63ee1229f3fb82f233a9c19 | [] | no_license | rucpata/WagtailWebsite | 28008474ec779d12ef43bceb61827168274a8b61 | 5aa44f51592f49c9a708fc5515ad877c6a29dfd9 | refs/heads/main | 2023-02-09T15:30:02.133415 | 2021-01-05T14:55:45 | 2021-01-05T14:55:45 | 303,961,094 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,537 | py | from django.db import models
from wagtail.core.models import Page
from wagtail.core.fields import StreamField
from wagtail.admin.edit_handlers import StreamFieldPanel
from wagtail.snippets.blocks import SnippetChooserBlock
from wagtail.images.blocks import ImageChooserBlock
from wagtail.core import blocks as wagtail_bl... | [
"rucinska.patrycja@gmail.com"
] | rucinska.patrycja@gmail.com |
e2f4b4e6ea3c3f336a0d95eb369d269665bf9fb9 | b3699724907850fd26cbce4509fec83a33b89760 | /python/ray/util/xgboost/simple_example.py | f8881e75d0f5f6391b2239475889122141e005b5 | [
"Apache-2.0",
"MIT"
] | permissive | BonsaiAI/ray | 5e2f26a81d865a795261d11f9182aca7f07c7b97 | 941d30f082fe879ea30618af14327c25b5a21a74 | refs/heads/master | 2023-06-12T05:15:29.370188 | 2021-05-06T07:03:53 | 2021-05-06T07:03:53 | 233,708,687 | 3 | 5 | Apache-2.0 | 2023-05-27T08:06:37 | 2020-01-13T22:41:47 | Python | UTF-8 | Python | false | false | 1,114 | py | from sklearn import datasets
from sklearn.model_selection import train_test_split
from ray.util.xgboost import RayDMatrix, RayParams, train
# __xgboost_begin__
def main():
# Load dataset
data, labels = datasets.load_breast_cancer(return_X_y=True)
# Split into train and test set
train_x, test_x, train... | [
"noreply@github.com"
] | BonsaiAI.noreply@github.com |
df9cff14fdbf62a866cf77be1ff6d7b3f37cd1d0 | 236498cd8daf971ef53cd120051d76c72474330d | /fetch-gazettes.py | 4e65868eecf60ad83be066f8f9e8b4c0e60b7522 | [] | no_license | OpenUpSA/saflii-gazettes | 2106130e1e0dac45a630f4e26f583c56879bc9f2 | 12d25bf00c47d6f9e4d3950e0ef2373bd17c5589 | refs/heads/master | 2021-10-23T21:53:06.583034 | 2019-03-20T08:54:54 | 2019-03-20T08:54:54 | 81,817,880 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,110 | py | #!/usr/bin/env python
#
# Script to generate Registry.txt and pdf-urls.txt for gazettes from opengazettes.org.za
import json
import os
import os.path
entries = []
urls = []
# what jurisdiction code should we use?
with open("jurisdiction.txt") as f:
jurisdiction = f.read().strip()
print "Only using gazettes for j... | [
"greg@kempe.net"
] | greg@kempe.net |
71fa9d5981516b87f29091fb9f9f3d80fb0b2f7b | 5dbb41859b177778b124d9f9ca5828ca8a5c529e | /aula10.py | e2d96a78cc4c84dc93ff526ed17ee6e25fbbf947 | [] | no_license | hevalenc/Curso_DIO_Python_basico | 4d7163a7496d17ec248472b075bfbb0988412d26 | 59a1e2aabc98f7bc3db49eea16170974fd75e9a3 | refs/heads/main | 2023-03-21T05:29:37.847492 | 2021-03-18T16:25:22 | 2021-03-18T16:25:22 | 349,142,834 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,628 | py | #o 'datetime' é uma biblioteca do python, o comando 'strftime' serve para usar a biblioteca de data e hora
#'%d/%m/%y' e '%A %B %Y' são diretivas para definir o formato de exibição de data
#'%H:%M:%S' diretiva para horas,
from datetime import date, time, datetime, timedelta
def trabalhando_com_datetime():
data_a... | [
"heitorvalenca7@gmail.com"
] | heitorvalenca7@gmail.com |
63b17fc4261dad20778c5a4e48aa81f3868daa44 | fcdce57c1bd0cc4f52679fd0f3f82532550083fa | /282/bridgehand.py | 9b5c320bf36248545d8ba244453ecaab726c4014 | [] | no_license | nishanthegde/bitesofpy | a16a8b5fb99ab18dc1566e606170464a4df3ace0 | c28aa88e1366ab65f031695959d7cd0b3d08be6b | refs/heads/master | 2023-08-08T16:53:17.107905 | 2023-07-22T19:07:51 | 2023-07-22T19:07:51 | 183,959,400 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 7,209 | py | from enum import Enum
import typing
from dataclasses import dataclass, field
from collections import namedtuple, defaultdict
from collections.abc import Sequence
import random
from typing import List
from random import shuffle
suits = list("SHDC")
ranks = list("AKQJT98765432")
Suit = Enum("Suit", suits)
Rank = Enum("R... | [
"nhegde@netflix.com"
] | nhegde@netflix.com |
f60397de642e3f12a66fcdec6cae5c94fd5de495 | 7185ae54efb2ce9ecd4bd9c53057053f6e799ae3 | /PWN/some/2019年7月17日-pwn-(水+ok+cpp)/pwn02/pwn2exp.py | 24a3645e72b65dccd0dcc3936b7502a14b8fcc14 | [] | no_license | 0xFF1E071F/CTFchallenge | 1b259c3f7cf8f7a1c20ea38cadd8f170bff137d1 | 12bb31a202b6110c05758fc4d57cfb58c98d9f23 | refs/heads/master | 2022-04-07T03:34:46.241887 | 2020-03-02T00:22:37 | 2020-03-02T00:22:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 766 | py | from pwn import *
context.log_level = 'debug'
p = process("./pwn02")
e = ELF("./pwn02")
p.recvuntil("time?\n")
p.sendline("134520896")
p.recvuntil("time?\n")
p.sendline('10000')
pop_ret = 0x0804898b
ppp_ret = 0x08048989
addr = 0x0804A058
payload = '1234' * 8
payload += p32(e.plt['read']) + p32(ppp_ret) + p32(0) + p32(a... | [
"mozhaohua1999@outlook.com"
] | mozhaohua1999@outlook.com |
fd1fcb904335972d230abf0e0b9f8fa1588452ca | 695c1667d2b2b57ccb526cc2817bbe5c4038de5c | /navigator/src/plan.py | 24dac9a6c5d361b969b4178a7bd74b3b55573e2d | [] | no_license | Avinash-1501/cse550 | a6f18e2f84fd47595af994aa81b95fc20e9a311e | 36037193af4c7ac2af282471a66c064af3c6a0f4 | refs/heads/master | 2021-05-29T06:40:56.356026 | 2015-04-29T19:26:18 | 2015-04-29T19:26:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,668 | py | #!/usr/bin/python
import roslib; roslib.load_manifest('navigator')
from assignment05.path_planning import *
from navigator import *
# Parse Args
parser = argparse.ArgumentParser(description='Path Plan')
parser.add_argument('mapbag')
args = parser.parse_args(rospy.myargv()[1:])
# Get Data From Bag Files
the_map = g... | [
"davidvlu@gmail.com"
] | davidvlu@gmail.com |
b59d20addda1b62a145dcbfe767a7c76a7c061be | ad4c2aa0398406ccb7e70562560e75fa283ffa1a | /sum-of-left-leaves/sum-of-left-leaves.py | e9eb62561a866708b2384dbdd88bb0c50858d9ac | [
"Apache-2.0"
] | permissive | kmgowda/kmg-leetcode-python | 427d58f1750735618dfd51936d33240df5ba9ace | 4d32e110ac33563a8bde3fd3200d5804db354d95 | refs/heads/main | 2023-08-22T06:59:43.141131 | 2021-10-16T14:04:32 | 2021-10-16T14:04:32 | 417,841,590 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 746 | py | // https://leetcode.com/problems/sum-of-left-leaves
# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def sumOfLeftLeaves(self, root):
"""
:type root: Tre... | [
"keshava.gowda@gmail.com"
] | keshava.gowda@gmail.com |
1105ec0b1ddb15924ebfc28ab85fa00d3efaa6f1 | 6baab869e16ed7cafdea7e0e68f27b7e0fc1c2ee | /demo_class/demo_5.py | 7feb701538b28b26283d5f7e1471c99811bbe084 | [] | no_license | SkewwG/Python_demo | ad4bd81207619bff23498b41833bc45695eab164 | 9357645287cc49d3396bd65062b71ac646076979 | refs/heads/master | 2021-05-03T05:21:56.685496 | 2018-07-06T00:02:59 | 2018-07-06T00:02:59 | 120,637,210 | 8 | 2 | null | null | null | null | UTF-8 | Python | false | false | 169 | py | def demo_yield(n):
print('cunting')
while n > 0:
print('before')
yield n
n -= 1
print('afeter')
print(demo_yield(5).__next__()) | [
"446106525@qq.com"
] | 446106525@qq.com |
43fa50129b5df8f91bad45446acac3e2c063f1d9 | ef6229d281edecbea3faad37830cb1d452d03e5b | /ucsmsdk/mometa/extpol/ExtpolControllerCont.py | ae30d6ff188351082a4f0e1dd925a6370910ef71 | [
"Apache-2.0"
] | permissive | anoop1984/python_sdk | 0809be78de32350acc40701d6207631322851010 | c4a226bad5e10ad233eda62bc8f6d66a5a82b651 | refs/heads/master | 2020-12-31T00:18:57.415950 | 2016-04-26T17:39:38 | 2016-04-26T17:39:38 | 57,148,449 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,257 | py | """This module contains the general information for ExtpolControllerCont ManagedObject."""
import sys, os
from ...ucsmo import ManagedObject
from ...ucscoremeta import UcsVersion, MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class ExtpolControllerContConsts():
pass
class ExtpolControllerCont(Manag... | [
"test@cisco.com"
] | test@cisco.com |
5c2f4032248c9ab25d6bf54b79381af856bb74b5 | 759c447b4cc7105096983eadb87d667ae472d6c0 | /acme_diags/plot/colormaps/rewrite_from_colorcet.py | fa6946bff0a7c3ea3f15a0ac5cbcc5d39bfc6ac5 | [
"BSD-3-Clause"
] | permissive | kaabre/acme_diags | cd41014ee0f023eb8796c1ac414615be0fe99f53 | 40364724ce46f1e5ec91201764da1de593a1a5f0 | refs/heads/master | 2021-05-14T17:32:19.577633 | 2018-02-09T20:29:49 | 2018-02-09T20:29:49 | 116,049,920 | 0 | 0 | null | 2018-01-02T19:34:12 | 2018-01-02T19:34:12 | null | UTF-8 | Python | false | false | 763 | py | try:
import colorcet
except BaseException:
print "Cannot convert from colorcet w/o colorcet"
import sys
sys.exit()
all_cms = colorcet.cm
def dump_cmap(name, mpl_cmap):
nm = "cet_%s" % name
with open("%s.rgb" % nm, "w") as f:
f.write("# Converted from colorcet\n")
f.write("#\n"... | [
"doutriaux1@llnl.gov"
] | doutriaux1@llnl.gov |
d74f5f77d2d099686d4658eabd6ee585ea46da9f | 4ad0dddd7a6e29b31d5780bf6dec6ebad776cf73 | /SimG4CMS/HGCalTestBeam/test/HGCalTBCERN170_cfg.py | d30e37913859424152ef656058b1ddaa63fd7e67 | [
"Apache-2.0"
] | permissive | llechner/cmssw | 95dcd6ae0ced5546853778c6ebdf0dd224030215 | 419d33be023f9f2a4c56ef4b851552d2d228600a | refs/heads/master | 2020-08-26T20:20:28.940065 | 2018-10-18T09:24:51 | 2018-10-18T09:24:51 | 131,112,577 | 0 | 0 | Apache-2.0 | 2019-10-23T17:59:17 | 2018-04-26T06:51:19 | C++ | UTF-8 | Python | false | false | 4,988 | py | import FWCore.ParameterSet.Config as cms
process = cms.Process('SIM')
# import of standard configurations
process.load("FWCore.MessageService.MessageLogger_cfi")
process.load('Configuration.StandardSequences.Services_cff')
process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
process.load('Configuration.EventConten... | [
"sunanda.banerjee@cern.ch"
] | sunanda.banerjee@cern.ch |
258ba757b7cd1250e8a2e1abe6391c275e180530 | 719fb168fdace7548c719a6d998b71bb15525d6c | /src/kinya/settings.py | baffe196271147d4a3a1787b16e0169cf7139ce7 | [] | no_license | nicpottier/kinya | 858b19f9d8891c4be80d8ecce477fbfd5c747a8e | e3f9ee774fcb00f916911df986f61e8f8a78f188 | refs/heads/master | 2016-09-05T21:18:03.141403 | 2011-05-23T18:19:20 | 2011-05-23T18:19:20 | 783,631 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,117 | py | # Django settings for kinya project.
import os
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('Nicolas Pottier', 'nicp@nyaruka.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'kinya',
'USER': 'kinya', ... | [
"nicpottier@gmail.com"
] | nicpottier@gmail.com |
453465980126de4e0addd9466aa1fb4eb7709d95 | 452b8b849e080cda5a26f4018cafa5a674ff7c20 | /froide/account/migrations/0003_auto_20160125_2127.py | 284973b0045128333fd564ec7053b4d1ea74536a | [
"MIT"
] | permissive | okffi/tietopyynto | 1262dcaf748c41b49be4a774be552fc75fc9b336 | 66b7e7dbf3c3395d79af3da85b3b58f01fad62dc | refs/heads/tietopyynto | 2021-01-17T21:07:04.829856 | 2016-10-30T19:26:53 | 2016-10-30T19:26:53 | 14,255,294 | 3 | 2 | MIT | 2021-01-05T11:51:18 | 2013-11-09T10:19:16 | Python | UTF-8 | Python | false | false | 688 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('account', '0002_auto_20150729_0828'),
]
operations = [
migrations.AddField(
model_name='user',
name=... | [
"mail@stefanwehrmeyer.com"
] | mail@stefanwehrmeyer.com |
6f40c592f87d09d6a2d046b25fabd3e80395a695 | 118984fdbacf5eb71159eb511ccd055987498886 | /CH11/EX11.38.py | a2c179da5ac2a5a4bd3de019820e3260ddb8588a | [] | no_license | 6igsm0ke/Introduction-to-Programming-Using-Python-Liang-1st-edtion | 321c6256be6ff78adbc8e3ddc73f2f43a51a75ab | 159489f3af296f87469ddddf3a1cb232917506b0 | refs/heads/master | 2023-06-05T20:03:17.951911 | 2021-06-18T18:04:42 | 2021-06-18T18:04:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,372 | py | # 11.38 (Turtle: draw a polygon/polyline) Write the following functions that draw a
# polygon/polyline to connect all points in the list. Each element in the list is a list of
# two coordinates.
# # Draw a polyline to connect all the points in the list
# def drawPolyline(points):
# # Draw a polygon to connect all the p... | [
"47993441+OmarAlmighty@users.noreply.github.com"
] | 47993441+OmarAlmighty@users.noreply.github.com |
10662b2839c963e9c42342a502361677ede604d6 | 104a0ec7cfb5d4bf948f22b47edb59122a886363 | /input/kinetics/families/intra_substitutionCS_cyclization/depository.py | d3a115a1158e51d03bfd7a044c1ccccb5d030255 | [] | no_license | nickvandewiele/RMG-database | 3afbe88df46a5641c6abbaf032bf4a0b6b9aae73 | dc3cbc7048501d730062426a65d87ea452e8705f | refs/heads/master | 2020-12-25T08:19:49.436773 | 2014-08-04T21:37:26 | 2014-08-04T21:37:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 131 | py | #!/usr/bin/env python
# encoding: utf-8
name = "intra_substitutionCS_cyclization/depository"
shortDesc = u""
longDesc = u"""
"""
| [
"jwallen@mit.edu"
] | jwallen@mit.edu |
4b18e558dc27eafa6c869c000bf0f0e6270df667 | 19d47d47c9614dddcf2f8d744d883a90ade0ce82 | /pynsxt/swagger_client/models/lb_source_ip_persistence_profile.py | 3b76026eb4c6d08312a91366ab687f7d0bcdcb0c | [] | no_license | darshanhuang1/pynsxt-1 | 9ed7c0da9b3a64e837a26cbbd8b228e811cee823 | fb1091dff1af7f8b8f01aec715682dea60765eb8 | refs/heads/master | 2020-05-25T14:51:09.932853 | 2018-05-16T12:43:48 | 2018-05-16T12:43:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,200 | py | # coding: utf-8
"""
NSX API
VMware NSX REST API # noqa: E501
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from swagger_client.models.lb_persistence_profile import LbPersistenceProfile # noq... | [
"tcraft@pivotal.io"
] | tcraft@pivotal.io |
974266c40be29c89c2283e836d50a53fbe2b5395 | bee77315d08def61c1155930285211ef3d8d7654 | /nevergrad/functions/olympussurfaces/core.py | 978320088ddd141745feb7073f77e1a0df4ec471 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | facebookresearch/nevergrad | d2da592c1bf3b7c398392b3d39217a3753a4912c | daddb18184bf64ba9082ecc55a56e07429a23103 | refs/heads/main | 2023-09-04T10:53:42.903505 | 2023-08-30T17:10:37 | 2023-08-30T17:10:37 | 158,468,845 | 3,526 | 367 | MIT | 2023-09-11T13:37:36 | 2018-11-21T00:33:17 | Python | UTF-8 | Python | false | false | 4,355 | py | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# Based on https://github.com/aspuru-guzik-group/olympus
import numpy as np
from functools import partial
from nevergrad.parametrization im... | [
"noreply@github.com"
] | facebookresearch.noreply@github.com |
6494aa421e2601435495170fd63e0de75337f754 | c917004bdd665903338c3115bd6821fc7208242b | /workspace/Python3_Lesson12/src/addressbook.py | 72c17c0ef0d93d7f176663ab385f23b973ae1786 | [] | no_license | paulrefalo/Python-2---4 | 408ad018ccc8161b801031f8d15df2154c5d25cb | 049c654ed626e97d7fe2f8dc61d84c60f10d7558 | refs/heads/master | 2021-01-10T05:30:25.502795 | 2016-02-19T02:08:39 | 2016-02-19T02:08:39 | 52,054,382 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,734 | py | import configparser
from optparse import OptionParser
import shelve
config = configparser.RawConfigParser()
config.read('V:/workspace/Python3_Lesson12/src/addressbook.cfg')
shelf_location = config.get('database', 'file')
class InvalidEmail(Exception):
pass
def validate_email(email):
if '@' not in email:
... | [
"paul.refalo@gmail.com"
] | paul.refalo@gmail.com |
a76ce56f356f65611bcc9250aa5fdc250c9b10f9 | 0049832c5cbee4b96189b88b51653f48decde596 | /MODIS/MOD05/downloaderv2.py | eb85762e6a024cad9673678041edb0e2a034fbf1 | [] | no_license | henockmamo54/ImageFusion | 18cf27ec4a066456c0d575696fc986814d10a7e6 | 07e88b5cb1925f54b3b3659caa2abda2bf4f3a72 | refs/heads/master | 2023-06-16T12:38:07.352623 | 2021-07-19T00:52:02 | 2021-07-19T00:52:02 | 355,720,494 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,068 | py | # -*- coding: utf-8 -*-
"""
Created on Tue Apr 13 10:34:52 2021
@author: Henock
"""
import os
import modapsclient
from datetime import datetime
username = "hiik324"
password = "Ecology123"
startdate="2019-08-01"
enddate="2019-12-01"
north="38.22346787684907"
south="38.18195837298332"
west="127.21710138948873"
east="... | [
"henockmamo54@gmail.com"
] | henockmamo54@gmail.com |
db6863c444c7ed992ab0de7afba38e1d1466433d | 0d982772c792460c3f09da170fe80b67336bd5c5 | /nsweb/controllers/analyze.py | 83611ce625aa5f6c1c62ff9f7402e909bdacada6 | [] | no_license | tziembo/neurosynth-web | bf31c3d66fe78fc908778857ebc500440a022f2e | 8642e490ab910665d8be9b3271260dec59e0c4b2 | refs/heads/master | 2021-06-27T05:50:56.512331 | 2017-08-22T05:46:51 | 2017-08-22T05:46:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,004 | py | from flask import Blueprint, render_template, redirect, url_for, request, jsonify, abort, send_file
from nsweb.models.analyses import Analysis, AnalysisImage
from nsweb.core import app, add_blueprint, db
from nsweb.initializers import settings
from nsweb.tasks import run_metaanalysis
from nsweb.controllers.images impor... | [
"tyarkoni@gmail.com"
] | tyarkoni@gmail.com |
2264537e226c42fd49c2db1e815b60de5324216e | eddb5cc6ece559a21fb2d99dc03fb4b9e3e1ddb0 | /fagaiwei/fagaiwei/spiders/41dagongwang_sipder.py | 5bd0eebebe50b1f5a487bf89305864a737b1af3a | [] | no_license | KKtoNN/python_spider | a9bdd005d607b1265a556cb4908e84804c0bfc62 | c72bd061c3ca4145fef85b0fd9c15576441cdb09 | refs/heads/master | 2020-03-18T22:50:00.131802 | 2018-05-30T00:47:56 | 2018-05-30T00:47:56 | 135,367,902 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,688 | py | # coding:utf-8
import re
import time
import scrapy
from fagaiwei.items import FagaiweiItem
from fagaiwei.settings import session, NewsItemInfo
from fagaiwei.keyword_others import keyword
class xiamenSipderSpider(scrapy.Spider):
name = 'dagongwang_sipder'
allowed_domains = ['takungpao.com']
start_urls = [
... | [
"18835702864@163.com"
] | 18835702864@163.com |
3cdc5787adb3028825634d327fdb2d2aa36b91b5 | 5a61ba76c770de8469218ff457213e122e08c7d1 | /code/leetcode/dynamic_programming/Solution123.py | fc2166197c3a360720c261e79b56f0cb65a9bd9a | [
"Apache-2.0"
] | permissive | zhangrong1722/interview | 6a71af26f08f036a294e36073cb9eb6ca798b993 | 187a485de0774561eb843d8ee640236adda97b90 | refs/heads/master | 2020-09-06T08:15:00.229710 | 2019-12-10T06:32:05 | 2019-12-10T06:32:05 | 220,372,777 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,160 | py | class Solution:
def maxProfit(self, prices):
"""
Considering the fact we may complete at most two transactions.We can assume that first transaction is finished at i-th element.
And we just need to cosider the subarry [:i] abd [i+1: lens],where the former and the latter represent the max valu... | [
"1922525328@qq.com"
] | 1922525328@qq.com |
a6f026f02000c15a466f70505538d8d0d47501fc | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02264/s889112571.py | 2e212a2e0961278eca5e971a4029146c58b8aed7 | [] | 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 | 729 | py | #!/usr/bin/env python
#-*- coding:utf-8 -*-
from collections import deque
def process_task(task,qua, elapsed_time, complete_task):
exe_task = task.popleft()
t = int(exe_task[1])
q = int(qua)
if t-q > 0:
exe_task[1] = (t - q)
task.append(exe_task)
elapsed_time += q
else:
elapsed_time += t
complete_tas... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
b540b5f7f786c6f93344f17dad5191ffb5aa943b | f1790e298bcbf7b26cacd3c27850f243c446b9eb | /courses/python3/ch4-POO/06_lesson/encapsulation.py | 4ef417bcf9d7cecb3c934a7fb024c8b3d3026c50 | [] | no_license | misa9999/python | 36001a1bf0eb842d00b010b02e05b01aa4dfac57 | 251c5226db1bfef4a8445b025f232a27a6924930 | refs/heads/master | 2023-03-04T16:25:48.610233 | 2021-02-22T21:37:51 | 2021-02-22T21:37:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 781 | py | """
public, protected, private
_ private/protected (public _)
__ private (_classname__attributename)
"""
class DataBase:
def __init__(self):
self.__data = {}
@property
def data(self):
return self.__data
def insert_customer(self, id, name):
if 'customers' not in self.__data:
... | [
"yuukixasuna00@gmailcom"
] | yuukixasuna00@gmailcom |
94de939343ae164a3702f2bf9f858e30ffc66e50 | 9276d5905d0bd4b892bccc3f3f9218124c356e59 | /tableau_view_extractor/routes.py | 0cac2c256afb2d0b2268ccd4603eb019cadb2ca2 | [] | no_license | toddbirchard/tableau-extraction | 7de813d8c547b11df13166c4bb3962b071f36602 | 0bddb8f4afe32fbef3bb6ab2c0b0076f62ca6fc4 | refs/heads/master | 2023-04-06T14:55:40.738915 | 2023-03-19T15:34:11 | 2023-03-19T15:34:11 | 162,696,737 | 19 | 2 | null | 2020-05-16T06:27:53 | 2018-12-21T09:49:26 | Python | UTF-8 | Python | false | false | 3,029 | py | import pandas as pd
from flask import Blueprint, Markup
from flask import current_app as app
from flask import render_template, request
from flask_assets import Bundle, Environment
from . import database, tableau
home_blueprint = Blueprint(
"home", __name__, template_folder="templates", static_folder="static"
)
... | [
"toddbirchard@gmail.com"
] | toddbirchard@gmail.com |
be580a0a5cb16a37c9dd6cee1362c8df71b77f7d | 4495b65528bd00824a97520dee7ce22a5555ce44 | /bin/dirprinter | 48a7311fdb5989a5e1f447feede2acdc73b0498a | [] | no_license | steder/txproject | f0e7a8e57fddc454f35bc62f8273f8fb0e37f5c9 | 928d8ff40bc1b60998f6123b1b1b78f10251bf00 | refs/heads/master | 2021-01-13T02:06:45.623511 | 2015-04-13T14:17:43 | 2015-04-13T14:17:43 | 3,346,414 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 576 | #!/usr/bin/env python
#-*- mode: python -*-
"""dirprinter
Pretty prints directories like this:
Example:
$ dirprinter dirname
dirname/
|-- printer.py
`-- testdir/
|-- subdir/
|-- |-- test3.txt
|-- `-- test4.txt
|-- test1.txt
`-- test2.txt
"""
import sys
from txproject import pri... | [
"steder@gmail.com"
] | steder@gmail.com | |
c804374672e41fb2e779de2aa60a61a57c0ea935 | b7341581abaf2fb50e10e14911cc579e606a23d2 | /sirius_sdk/agent/wallet/abstract/non_secrets.py | a47cd8e70608d744123c602ab0e69692772ca7e1 | [
"Apache-2.0"
] | permissive | GarlonHasham/sirius-sdk-python | 3e627af6c2b3ef641b27514787fb08d0e0b30808 | 715b12c910574d78502f186aa512bc1ef5b63fbc | refs/heads/master | 2023-05-14T03:56:29.141362 | 2021-06-03T10:42:01 | 2021-06-03T10:42:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,289 | py | import json
from abc import ABC, abstractmethod
from typing import Optional, List
from sirius_sdk.base import JsonSerializable
class RetrieveRecordOptions(JsonSerializable):
def __init__(self, retrieve_type: bool=False, retrieve_value: bool=False, retrieve_tags: bool=False):
self.retrieve_type = retriev... | [
"minikspb@gmail.com"
] | minikspb@gmail.com |
33f0a35f5feb7df1dd4eaeaba4f463974e6e5c27 | 1d60c5a7b8ce6277bff514e376f79848f706344c | /Data Engineer with Python/02. Streamlined Data Ingestion with pandas/03. Importing Data from Databases/02. Load entire tables.py | 87520ffcb0f8e37e20dcee08416d6f66edf13411 | [] | no_license | DidiMilikina/DataCamp | 338c6e6d3b4f5b6c541c1aba155a36e9ee24949d | 3bf2cf3c1430190a7f8e54efda7d50a5fd66f244 | refs/heads/master | 2020-12-15T13:16:54.178967 | 2020-05-06T17:30:54 | 2020-05-06T17:30:54 | 235,113,616 | 4 | 3 | null | null | null | null | UTF-8 | Python | false | false | 1,266 | py | '''
Load entire tables
In the last exercise, you saw that data.db has two tables. weather has historical weather data for New York City. hpd311calls is a subset of call records made to the city's 311 help line about housing issues.
In this exercise, you'll use the read_sql() function in pandas to load both tables. rea... | [
"didimilikina8@gmail.com"
] | didimilikina8@gmail.com |
ae630ac12f733e37781b6ebbc2773032c9f2cac5 | 88863cb16f35cd479d43f2e7852d20064daa0c89 | /DraperImageChronology/src/inv-hist-match.py | 5bc7b4f8af190bf3b43f08c71c04caa2a975ea03 | [] | no_license | chrishefele/kaggle-sample-code | 842c3cd766003f3b8257fddc4d61b919e87526c4 | 1c04e859c7376f8757b011ed5a9a1f455bd598b9 | refs/heads/master | 2020-12-29T12:18:09.957285 | 2020-12-22T20:16:35 | 2020-12-22T20:16:35 | 238,604,678 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 853 | py |
# invert histogram matching on an image
import cv2
import sys
import numpy
MAX = 255
MIN = 0
f_in = sys.argv[1]
f_out = sys.argv[2]
img_in = cv2.imread(f_in)
img_out = numpy.zeros_like(img_in)
RGB = (0,1,2)
for chan in RGB:
mean = img_in[:,:,chan].mean()
hist = cv2.calcHist([img_in], [chan], None, [2... | [
"c.hefele@verizon.net"
] | c.hefele@verizon.net |
9946676665a43725bcf984b91c4ab8323c8ddfe2 | d62cbada00caf2f7784066014a87e18052d6fa9f | /darksite/functional_tests/blog/test_list_posts.py | b8bd85d1dfcf15b689e4663ee7234a073d6f17d6 | [
"MIT"
] | permissive | UNCDarkside/DarksiteAPI | d6653990bce6b78db78efc672fde2c0ff20e4597 | a4bc1f4adee7ecfba840ad45da22513f88acbbd0 | refs/heads/master | 2020-04-11T17:36:19.062963 | 2019-01-11T03:42:31 | 2019-01-11T03:42:31 | 161,967,336 | 0 | 0 | MIT | 2019-10-22T22:09:50 | 2018-12-16T04:23:27 | Python | UTF-8 | Python | false | false | 1,311 | py | from cms.blog import models
POST_LIST_QUERY = """
query {
posts {
author {
id
name
}
content
published
rendered
slug
title
updated
}
}
"""
def test_list_posts(api_client, post_factory):
"""
Users should be able to query a list of blog posts through the
Gra... | [
"chathan@driehuys.com"
] | chathan@driehuys.com |
76c7e9f6bb07b3cce7f96db7880426f1f4f29e45 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_pursing.py | 97ccd6b1d0f43869691995232bdae3346650ddd4 | [
"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.nouns._purse import _PURSE
#calss header
class _PURSING(_PURSE, ):
def __init__(self,):
_PURSE.__init__(self)
self.name = "PURSING"
self.specie = 'nouns'
self.basic = "purse"
self.jsondata = {}
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
2c3ea8b81536b7c933e4b3a416923e9b9f6d2579 | cbedb18df0aaac810aeea87a2273edb15c1cf899 | /Strings/49. Group Anagrams (python string builder).py | 8b0bb59ac43006a54f171ca77f88aec37cd1619d | [] | no_license | kanglicheng/CodeBreakersCode | 71b833bb9f4c96d520c26f0044365dc62137a940 | 31f7f730227a0e10951e7468bad1b995cf2eafcb | refs/heads/master | 2023-08-07T20:32:05.267695 | 2020-09-14T14:36:25 | 2020-09-14T14:36:25 | 265,978,034 | 0 | 0 | null | 2020-05-22T00:05:29 | 2020-05-22T00:05:29 | null | UTF-8 | Python | false | false | 1,035 | py | # not sure about the solution at start
# sort each str => O(W logW), w is the length of each words -> O(N * W log W) or counting sort O(N*W)
# turn each word into count char list: each list length is fixed:26 -> need O(W) to turn to list
# but lst can't hash -> turn to str then use hash map
class Solution:
d... | [
"56766457+Wei-LiHuang@users.noreply.github.com"
] | 56766457+Wei-LiHuang@users.noreply.github.com |
70573600e0f7e3bf2144f550ad7a28e7db17e2c2 | 5f5c052aa6a42e7492daf940c9561f5ce84ecb1c | /geatpy/demo/sentense_search/aimfuc.py | 68a6d1234a3b6ecaa5b0919fae9690a3c6b8f466 | [] | no_license | siuyincheung/geatpy | 8b343087c506cef39a7dc377a667ae9f1392acd4 | 48d41c8835004d9b0c36060881ed9cfb07483f1e | refs/heads/master | 2020-03-27T08:15:57.973576 | 2018-08-27T00:21:00 | 2018-08-27T00:21:00 | 146,237,904 | 1 | 0 | null | 2018-08-27T02:39:41 | 2018-08-27T02:39:41 | null | UTF-8 | Python | false | false | 327 | py | import numpy as np
def aimfuc(Phen):
real = np.array([ord('I'),ord(' '),ord('a'),ord('m'),ord(' '),ord('a'),
ord(' '),ord('l'),ord('i'),ord('t'),ord('t'),ord('l'),
ord('e'),ord(' '),ord('b'),ord('o'),ord('y')])
diff = np.sum((Phen - real)**2, 1)
return np.array([di... | [
"jazzbin@geatpy.com"
] | jazzbin@geatpy.com |
7a59a1045aed4872467a495c9c8559d6cf22d43b | 716ed8ab9cbd61837fb116635c2d378b32eeb890 | /app/migrations/0004_auto_20180902_0447.py | 2f5b3abdde6abf5825fdd6216228555e3f33be87 | [] | no_license | koneb71/waterworks-django | 19dab148fc46f85e1be55b8440f40f5cf2ea29c6 | 0de58e43ab04348622933f98d79c7d4c109fcb85 | refs/heads/master | 2020-03-28T07:18:50.512581 | 2018-10-15T03:53:05 | 2018-10-15T03:53:05 | 147,893,717 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,123 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2018-09-02 12:47
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0003_auto_20180902_0447'),
]
operations = [
migratio... | [
"koneb2013@gmail.com"
] | koneb2013@gmail.com |
9c01e7f694d285cbc82aed43b85433d7426fc179 | d554b1aa8b70fddf81da8988b4aaa43788fede88 | /5 - Notebooks e Data/1 - Análises numéricas/Arquivos David/Atualizados/logDicas-master/data/2019-1/224/users/4363/codes/1596_2049.py | 2393618f22d551063f10e697c5ea26d03c3da23b | [] | no_license | JosephLevinthal/Research-projects | a3bc3ca3b09faad16f5cce5949a2279cf14742ba | 60d5fd6eb864a5181f4321e7a992812f3c2139f9 | refs/heads/master | 2022-07-31T06:43:02.686109 | 2020-05-23T00:24:26 | 2020-05-23T00:24:26 | 266,199,309 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 278 | py | # Teste seu codigo aos poucos.
# Nao teste tudo no final, pois fica mais dificil de identificar erros.
# Nao se intimide com as mensagens de erro. Elas ajudam a corrigir seu codigo.
x = int(input("dividendo "))
y = int(input("divisor "))
print(x)
print(y)
print(x//y)
print(x%y) | [
"jvlo@icomp.ufam.edu.br"
] | jvlo@icomp.ufam.edu.br |
55c84f580c92d7a7645d5c9af2c759b950a7f84a | ac64fda7f1bfc92f7897efd60b8f3f0aeb22b4d7 | /syntactic_mutations/mnist_tr/mutants/mutant118.py | c11c9efb905c74722b9130a38af9dbfcb856ee71 | [] | no_license | dlfaults/mutation_operators_evaluation | ea7f33459ba7bcf7d70092d9db8b40f9b338d516 | 7d1ff30e901931a46bf8908e9bb05cae3daa5f0f | refs/heads/master | 2020-12-27T15:45:07.262012 | 2020-02-03T12:22:01 | 2020-02-03T12:22:01 | 237,955,342 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,611 | py | import datetime
import keras
from keras.datasets import mnist
from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation, Flatten
from keras.layers import Conv2D, MaxPooling2D
from keras import backend as K
now = datetime.datetime.now
batch_size = 128
num_classes = 5
epochs = 5
(img_rows... | [
"gunel71@gmail.com"
] | gunel71@gmail.com |
870f58223b2bf1ea451ad5f430647e0c076b21c0 | 38c10c01007624cd2056884f25e0d6ab85442194 | /third_party/catapult/systrace/systrace/systrace_agent.py | 376d4f2507b0a8d04b8fa336d1c78567ee61812b | [
"BSD-3-Clause",
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"MIT",
"Apache-2.0"
] | permissive | zenoalbisser/chromium | 6ecf37b6c030c84f1b26282bc4ef95769c62a9b2 | e71f21b9b4b9b839f5093301974a45545dad2691 | refs/heads/master | 2022-12-25T14:23:18.568575 | 2016-07-14T21:49:52 | 2016-07-23T08:02:51 | 63,980,627 | 0 | 2 | BSD-3-Clause | 2022-12-12T12:43:41 | 2016-07-22T20:14:04 | null | UTF-8 | Python | false | false | 1,647 | py | # Copyright (c) 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class SystraceAgent(object):
"""The base class for systrace agents.
A systrace agent contains the command-line options and trace categories to
cap... | [
"zeno.albisser@hemispherian.com"
] | zeno.albisser@hemispherian.com |
49b046dd8aff3875402eaf5275f060f0b3b0174f | 1e6681ca2569c3de32db2d3b1c957652f8d8ccb3 | /xiaoqu_to_chart.py | f9b5ad6726ff6fff1cac6d9a26eed030e88e9e19 | [] | no_license | re0phimes/lianjia-beike-spider | d48e5bb05af9c8557ff32f9ca54746c4649d6281 | cb4ff13b6145c5169263e486e03d9fbca52450fe | refs/heads/master | 2020-04-02T17:21:11.770535 | 2018-10-24T23:42:44 | 2018-10-24T23:42:44 | 154,654,321 | 1 | 0 | null | 2018-10-25T10:45:10 | 2018-10-25T10:45:10 | null | UTF-8 | Python | false | false | 2,380 | py | #!/usr/bin/env python
# coding=utf-8
# author: zengyuetian
import webbrowser
import pandas as pd
import numpy as np
from pyecharts import Bar
import webbrowser as web
import os
import time
from lib.utility.version import PYTHON_3
if __name__ == '__main__':
try:
if PYTHON_3:
os.system("ps aux |... | [
"ijumper@163.com"
] | ijumper@163.com |
55093be6c5bd69ff9bea241af4fdc6ab747a5870 | 3e0c57628c39e5042ed068451608a33b5edcf5df | /codex-py/test/config/demo_propmap.py | 69ec9605243caa7804fa759421b722ca3d5f7543 | [
"Apache-2.0"
] | permissive | egustafson/home-sensors | 5bd3c0f51be9a0a1f360ef41b45cbdfb3069286f | 232b36fe6fa2a2e3bce1391a91dffa192f17b835 | refs/heads/master | 2023-05-10T17:12:10.991008 | 2020-01-03T23:57:56 | 2020-01-03T23:57:56 | 141,070,153 | 0 | 0 | Apache-2.0 | 2023-05-01T20:20:24 | 2018-07-16T01:03:59 | Python | UTF-8 | Python | false | false | 1,030 | py | # -*- coding: utf-8 -*-
from codex.config.prop import PropMap
from codex.config.prop import PropList
tmap = { "k1": "v1",
"k2": "v2",
"k3": {"k3a": "v3a"},
"k4": {"k4a": {"k4b": "v3b"}},
# "k5": {"K$5": "v5a"},
# "k6.k6a": "v6a",
}
pmap = PropMap(tmap)
#print("tmap... | [
"eg-git@elfwerks.org"
] | eg-git@elfwerks.org |
f7e67e7c06dad3c32e3885a4e2fbdb29ab4a0a3b | 7986ec6498e3f93967fa9bfe2b6a9d4056138293 | /Protheus_WebApp/Modules/SIGATMK/TMKA061TESTCASE.py | 7e8672d16dbf8b96c9b30b4da09dadec36a8bae0 | [
"MIT"
] | permissive | HelenaAdrignoli/tir-script-samples | 7d08973e30385551ef13df15e4410ac484554303 | bb4f4ab3a49f723216c93f66a4395e5aa328b846 | refs/heads/master | 2023-02-21T11:26:28.247316 | 2020-04-28T16:37:26 | 2020-04-28T16:37:26 | 257,304,757 | 0 | 0 | MIT | 2020-04-20T14:22:21 | 2020-04-20T14:22:20 | null | UTF-8 | Python | false | false | 2,189 | py | from tir import Webapp
import unittest
class TMKA061(unittest.TestCase):
@classmethod
def setUpClass(inst):
inst.oHelper = Webapp()
inst.oHelper.Setup('SIGATMK','13/04/2020','T1','D MG 01 ','13')
inst.oHelper.Program('TMKA061')
def test_TMKA061_001(self):
self.oHelper.S... | [
"hadrignoli@gmail.com"
] | hadrignoli@gmail.com |
ac807123982efe2f51ec607a6061f29be805c9f8 | 8ffb0b95591bd82df42335315b9595274740aca4 | /models/earthworm/leftover/earthworm_output.py | e0acabafbc13c8fffc4c7805920a5d9629973909 | [] | no_license | batwalrus76/ubertool_eco | 507cf5ef5a0f91f3a36a03d26d80783c3b517e79 | ed2863e37ee6066ccdfafa20f6fec3ba4f75f2d1 | refs/heads/master | 2021-01-18T10:23:27.810117 | 2015-03-24T14:50:05 | 2015-03-24T14:50:05 | 32,412,353 | 0 | 0 | null | 2015-03-17T18:30:11 | 2015-03-17T18:30:10 | null | UTF-8 | Python | false | false | 2,473 | py | # -*- coding: utf-8 -*-
import os
os.environ['DJANGO_SETTINGS_MODULE']='settings'
import webapp2 as webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext.webapp import template
from uber import uber_lib
import numpy as np
import cgi
import cgitb
cgitb.enable()
from earthworm import ... | [
"hongtao510@gmail.com"
] | hongtao510@gmail.com |
cda5bf2dba75c987106ec62af214b96ca5667188 | b162de01d1ca9a8a2a720e877961a3c85c9a1c1c | /870.advantage-shuffle.python3.py | 362f8e0a67857cb39a5b44204dba1afd05679778 | [] | no_license | richnakasato/lc | 91d5ff40a1a3970856c76c1a53d7b21d88a3429c | f55a2decefcf075914ead4d9649d514209d17a34 | refs/heads/master | 2023-01-19T09:55:08.040324 | 2020-11-19T03:13:51 | 2020-11-19T03:13:51 | 114,937,686 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 916 | py | #
# [901] Advantage Shuffle
#
# https://leetcode.com/problems/advantage-shuffle/description/
#
# algorithms
# Medium (40.29%)
# Total Accepted: 7.5K
# Total Submissions: 18.5K
# Testcase Example: '[2,7,11,15]\n[1,10,4,11]'
#
# Given two arrays A and B of equal size, the advantage of A with respect to B
# is the num... | [
"richnakasato@hotmail.com"
] | richnakasato@hotmail.com |
89f4deab11dc827abf63d32d7e4af23a4e08f4ab | b031132a8ca2727827f6b1bb75f5839d327885bf | /bookworm/api/forms.py | 8b7049f862db44ea99c9d7d43892d1a1cb2ecc0a | [
"LicenseRef-scancode-public-domain",
"BSD-3-Clause"
] | permissive | erochest/threepress-rdfa | 3441ba9f272bad439b9689968cd1f668fae5c4f6 | f07e10da8a4927ab21084f4ba015d6567e665cae | refs/heads/master | 2021-07-16T21:24:00.356147 | 2011-06-10T20:42:14 | 2011-06-10T20:42:14 | 1,845,226 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 139 | py | from django import forms
class APIUploadForm(forms.Form):
epub_data = forms.FileField()
api_key = forms.CharField(max_length=255)
| [
"none@none"
] | none@none |
4d90b9ba43f5cf53dd31827df98d8a68ea8fa9cb | acf7457d3a799cb9bff12686d2d616688bcd4b5b | /packages/python/plotly/plotly/validators/scattercarpet/marker/_anglesrc.py | 3d469a500245c6cb620654f07d276ace9b20b460 | [
"MIT"
] | permissive | plotly/plotly.py | f4f61639f08160f16195efc95b5901dc5a937346 | 975a704074f01c078e0fdfa32bdf17130bf89e69 | refs/heads/master | 2023-09-06T06:15:08.340035 | 2023-08-24T12:28:14 | 2023-08-24T12:28:14 | 14,579,099 | 14,751 | 2,989 | MIT | 2023-09-08T19:55:32 | 2013-11-21T05:53:08 | Python | UTF-8 | Python | false | false | 424 | py | import _plotly_utils.basevalidators
class AnglesrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="anglesrc", parent_name="scattercarpet.marker", **kwargs
):
super(AnglesrcValidator, self).__init__(
plotly_name=plotly_name,
parent_n... | [
"nicolas@plot.ly"
] | nicolas@plot.ly |
236f18e6d06d06f7411c509b2804609daba2be41 | 0ca5780b8a121b90e2191d7e394e35f49ab68828 | /tools/ratings.py | e6cc4467ebefa6bfa5fde9a97a901f84d3d5d6b0 | [
"MIT"
] | permissive | Ghloin/tweeria | 805091a40a2625f4983b960ccd477af6ffb1c1ba | 5f7cf917a6e08f15cd914c11823dbd81c11b95a1 | refs/heads/master | 2021-01-21T05:59:24.279175 | 2015-04-11T23:49:09 | 2015-04-11T23:49:09 | 33,859,414 | 1 | 0 | null | 2015-04-13T09:22:40 | 2015-04-13T09:22:39 | null | UTF-8 | Python | false | false | 8,313 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# This is rating counter
# author: Alex Shteinikov
import __init__
import settings
import time
import random
tweenk_core = settings.core()
tweenk_balance = settings.balance()
import db
import logger
import time
class ratingsCounter:
K1 = 0.02
K2 = 1... | [
"alex.shteinikov@gmail.com"
] | alex.shteinikov@gmail.com |
19ce91ea22e989da8ca864d594d02929a2b81e0f | 2ac1b9ccc4d4f7f646a33e5646ed5e182ae85727 | /jamdict/jmnedict_sqlite.py | 06df43e4840531842c7f6bb7bd7887641f3844a0 | [
"MIT"
] | permissive | killawords/jamdict | 3655185f7097365b184b7979a112469430c4179f | 85c66c19064977adda469e3d0facf5ad9c8c6866 | refs/heads/main | 2023-05-28T22:00:00.813811 | 2021-06-06T04:04:03 | 2021-06-06T04:04:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,061 | py | # -*- coding: utf-8 -*-
"""
Japanese Multilingual Named Entity Dictionary (JMnedict) in SQLite format
References:
ENAMDICT/JMnedict - Japanese Proper Names Dictionary Files
https://www.edrdg.org/enamdict/enamdict_doc.html
"""
# This code is a part of jamdict library: https://github.com/neocl/jamdict
# :c... | [
"tuananh.ke@gmail.com"
] | tuananh.ke@gmail.com |
9582722a0a7a9d3283bbfeee9cb7ddad8e6c377f | 67117705720a3e3d81253ba48c1826d36737b126 | /Wk9_STRANDS/integrate.py | 42e4a34b47cb63349193c1740e61a7048b7bc760 | [] | no_license | pyliut/Rokos2021 | 41f0f96bc396b6e8a5e268e31a38a4a4b288c370 | 70753ab29afc45766eb502f91b65cc455e6055e1 | refs/heads/main | 2023-08-13T17:29:30.013829 | 2021-09-26T19:01:35 | 2021-09-26T19:01:35 | 382,092,802 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 506 | py | # -*- coding: utf-8 -*-
"""
Created on Wed Jul 28 15:05:28 2021
@author: pyliu
"""
import numpy as np
def integrate(integrand,spacing):
"""
Numerical integration using rectangles
Parameters
----------
integrand : FLOAT, vector
Values of integrand in the range of integration
... | [
"noreply@github.com"
] | pyliut.noreply@github.com |
9c356ecfd41e1d77531a0992d3aeeab8306f56b4 | 24c5c46f1d281fc15de7f6b72a5148ae85f89fb4 | /SRC/demo/imooc/middlewares.py | d2bed55b4f0789f23a3e7d00661f72239c8ef9df | [] | no_license | enterpriseih/easyTest | 22d87c7ffe40fb10a07f7c5cdd505f63dd45adc0 | 43b8d294e898f25055c78313cfece2753352c250 | refs/heads/master | 2023-08-23T22:55:14.798341 | 2020-02-11T09:13:43 | 2020-02-11T09:13:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,174 | py | from scrapy.http import HtmlResponse, Request, Response
from scrapy.exceptions import IgnoreRequest
from multiprocessing import Process, Pipe
from ghost import Ghost
class GhostAction:
def __init__(self, *args, **kwargs):
self.args = args
self.kwargs = kwargs
def do(self, session):
ret... | [
"yaolihui0506"
] | yaolihui0506 |
bb0cc5db2017fd3d697c4422d606f0f9508bb1cf | 9e42f3e16f46ae9161490d459adff263a083b5d8 | /ps5.2.py | c7d9e436fb5328bda9b4482482a800516e3687b0 | [] | no_license | rajshakerp/algorithm_crunching_social_network | ba7dd2d7ff748cb9b7e7e93c151285b9c2c2c575 | 2d197a199ea6bb19d65c82a65d72553be107a369 | refs/heads/master | 2020-06-12T08:03:48.949142 | 2014-06-24T21:14:53 | 2014-06-24T21:14:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,460 | py | # compute the weight of co-appear
import csv
import operator
import heapq
def make_link(G, name, book):
if name not in G:
G[name] = {}
(G[name])[book] = 1
if book not in G:
G[book] = {}
(G[book])[name] = 1
return G
def read_graph(filename):
# Read an undirected graph in CSV fo... | [
"="
] | = |
03c7db3d432555998947878d40132af841780c83 | 57ef48cbc61bc3bf890088ec24a50c440bc36072 | /dogflb/train-tiny.py | 5abdd5e1943352ec94cd42ee7dac641ef5b1603d | [] | no_license | ShenDezhou/CAIL2021 | 8be1ea07dd47085126b9092998de72dc0c70973d | aab19b42e9ea1ba29158df577087e827419adae8 | refs/heads/master | 2023-03-28T11:17:09.541712 | 2021-03-29T14:11:40 | 2021-03-29T14:11:40 | 328,170,130 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,373 | py | import os
import jittor as jt
import jittor.nn as nn
from dataset import TsinghuaDog
from jittor import transform
from jittor.optim import Adam, SGD
from tqdm import tqdm
import numpy as np
from model import Net
import argparse
jt.flags.use_cuda=1
def get_path(path):
"""Create the path if it does not exist.
... | [
"bangtech@sina.com"
] | bangtech@sina.com |
9ef838759387609b5be7812eeda6c96df2a63f72 | 1cb8f578fab815e7031b9302b809d2fce1bad56f | /plone/app/s5slideshow/tests/base.py | 25e2d02fbf315c5cee64b5438058531f37813840 | [] | no_license | toutpt/plone.app.s5slideshow | 103856fdefc6504193e9d5b981fa377c7c5ace1a | ee2129c3e40cc03fadad2490730100ad715f5395 | refs/heads/master | 2020-06-04T15:18:27.754687 | 2012-02-28T07:52:39 | 2012-02-28T07:52:39 | 3,160,939 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,002 | py | import unittest2 as unittest
from zope import interface
from plone.app import testing
from plone.app.s5slideshow.tests import layer
class UnitTestCase(unittest.TestCase):
def setUp(self):
super(UnitTestCase, self).setUp()
class TestCase(unittest.TestCase):
layer = layer.INTEGRATION
def set... | [
"toutpt@gmail.com"
] | toutpt@gmail.com |
18821b556650d403c0a02ae62e4c2f09bc774a23 | 51fb5fe41a2c5030fb9e46a029f80e8b637714f3 | /factory_app/factory.py | be6e96c991075f0550c8462cc83bba811227800a | [] | no_license | aliensmart/week2_day3 | 6c7512c77c09424c87cdd64fe634b23ae54ffa21 | 21125022850c398aa0b68295f2e40ca18c573f13 | refs/heads/master | 2020-07-13T05:31:44.581603 | 2019-08-29T19:25:27 | 2019-08-29T19:25:27 | 205,004,610 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,503 | py | #!/usr/bin/env python3
#Class
# Worker
# Item
# Factory
class Worker:
#attribute:
# name
# job
# years
# department is None
def __init__(self, name, job, years):
self.name = name
self.job = job
self.years = years
self.department = None
#Cr... | [
"kaoua17@gmail.com"
] | kaoua17@gmail.com |
34eb6021b51846ce284b8d310da82c2d4e56b2e5 | e905abd9bb7bd7017657d0a0c4d724d16e37044c | /.history/article/spiders/acm_20201230145258.py | 2bfa13a12a05f543b22b93f69e8ea2d0698e1dd7 | [] | no_license | tabdelbari/articles | a8b921841f84fb473f5ed1cdcda743863e6bc246 | f0e1dfdc9e818e43095933139b6379a232647898 | refs/heads/main | 2023-03-05T10:21:35.565767 | 2021-02-10T13:35:14 | 2021-02-10T13:35:14 | 325,654,973 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,360 | py | import scrapy
import logging
import re
from scrapy_splash import SplashRequest
from article.items import ArticleItem
class AcmSpider(scrapy.Spider):
name = 'acm'
allowed_domains = ['acm.org']
def __init__(self, topic='', keywords='', **kwargs):
super().__init__(**kwargs)
self.start_ur... | [
"abdelbari1996@hotmail.com"
] | abdelbari1996@hotmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.