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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7f2040a18d8ae48cdf68130156100676b859f15b | 1b3addbc9473b6ffb999665601470ccc4d1153b0 | /libs/thumb/movieThumb.py | 83e16f22327f4b3a9e7bde2ac613809fe449ca31 | [] | no_license | weijia/approot | e1f712fa92c4c3200210eb95d251d890295769ba | 15fac5b31a4d619d1bdede3d1131f5e6e57cd43b | refs/heads/master | 2020-04-15T13:15:01.956721 | 2014-08-26T14:02:17 | 2014-08-26T14:02:17 | 11,049,975 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,248 | py | #! /bin/env python
#from http://pymedia.org/tut/src/dump_video.py.html
import sys, os
import pymedia.muxer as muxer
import pymedia.video.vcodec as vcodec
import pygame
def genVideoThumb(local_path, dest_dir):
basename = os.path.basename(local_path)
thumb_path_without_ext = os.path.join(dest_dir, basename.spli... | [
"richardwangwang@gmail.com"
] | richardwangwang@gmail.com |
8cab1b2cbf3a564aaa63881deefcd2ff4b6268de | f9609ff4f2bbea570f3cb4cd3f9fe6b3595d4145 | /commands/cmd_oload.py | 2f1222a7ec0e09ed83c5c5b47341433566adc839 | [] | no_license | VladThePaler/PythonWars-1996 | 2628bd2fb302faacc91688ad942799537c974f50 | d8fbc27d90f1deb9755c0ad0e1cf2c110f406e28 | refs/heads/master | 2023-05-08T19:51:28.586440 | 2021-05-14T04:19:17 | 2021-05-14T04:19:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,639 | py | # PythonWars copyright © 2020, 2021 by Paul Penner. All rights reserved.
# In order to use this codebase you must comply with all licenses.
#
# Original Diku Mud copyright © 1990, 1991 by Sebastian Hammer,
# Michael Seifert, Hans Henrik Stærfeldt, Tom Madsen, and Katja Nyboe.
#
# Merc Diku Mud improvements copyrig... | [
"jindrak@gmail.com"
] | jindrak@gmail.com |
80a8724e780c5057018d2ad75baf284d200906cc | 880d9cc2704f7de649ad4455dd7ec2806b6a9e95 | /PythonExam/北京理工大学Python语言程序设计-Book/Chapter5/5.1BigTianZiGe.py | 89436192a9459828aca260e6b959b29642934e28 | [] | no_license | shunz/Python-100-Days_Practice | 14795757effcff50a4644f57c5c109fa1c9c38ac | 82f508ff6911ce3aa5c5a69cd481a6cc87f02258 | refs/heads/master | 2020-12-26T18:52:32.755384 | 2020-04-07T15:49:36 | 2020-04-07T15:49:36 | 237,604,470 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 320 | py | """绘制大田字格"""
def draw(n):
line = 3 * n + 1 # 一共要绘制的行数
for i in range(1, line+1):
if i % 3 == 1: # 判断需要绘制哪种线
print(n * '+----', end='')
print('+')
else:
print(n * '| ', end='')
print('|')
draw(5)
| [
"rockucn@gmail.com"
] | rockucn@gmail.com |
bff6d26590f067bd15ad04ee687e8f3bf1027a7a | 6d6d82ce7835fd8fca1aa12f775a75f4d7901f0f | /makedoc.py | 1e2c1ef75b934eb9702f4faf493c766702d71fb0 | [
"Apache-2.0"
] | permissive | shmakovpn/whatprovides | b7a3867f0529d465a8405f6669b797a5c7de2e2c | 69aab055397ae49844c93cfe17fdfaf18b02f79d | refs/heads/master | 2023-02-12T00:39:28.936096 | 2021-01-14T08:26:25 | 2021-01-14T08:26:25 | 273,847,446 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 555 | py | """
whatprovides makedoc.py
This script runs 'shpinx-build -b html docs/source docs/build/html'
"""
import os
SCRIPT_DIR: str = os.path.dirname(os.path.abspath(__file__))
def run_sphinx():
docs_dir: str = os.path.join(SCRIPT_DIR, 'docs')
docs_source_dir: str = os.path.join(docs_dir, 'source')
build_dir: ... | [
"shmakovpn@yandex.ru"
] | shmakovpn@yandex.ru |
18d7e89c4ff3ab5e1f4886895111d3e359f7a99a | 0466559817d3a1be9409da2c83db99c4db3bacfe | /hubcheck/pageobjects/widgets/tools_status_approve_license_form.py | 7c7e4da3883a72ce8d045d1ce61dc77718770acd | [
"MIT"
] | permissive | ken2190/hubcheck | 955cf9b75a1ee77e28256dfd3a780cfbc17de961 | 2ff506eb56ba00f035300862f8848e4168452a17 | refs/heads/master | 2023-03-20T15:17:12.949715 | 2015-09-29T16:11:18 | 2015-09-29T16:11:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,813 | py | from hubcheck.pageobjects.widgets.form_base import FormBase
from hubcheck.pageobjects.basepageelement import Button
from hubcheck.pageobjects.basepageelement import Checkbox
from hubcheck.pageobjects.basepageelement import Select
from hubcheck.pageobjects.basepageelement import TextArea
class ToolsStatusApproveLicense... | [
"telldsk@gmail.com"
] | telldsk@gmail.com |
5bd122562edd702b509be8347cb903fabd7a348c | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02622/s965763591.py | 6eb619ddc1792d0336e698e3556c81de57f06d66 | [] | 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 | 153 | py | s = input()
t = input()
ans = abs(len(s) - len(t))
count = min(len(s), len(t))
for i in range(count):
if s[i] != t [i]:
ans += 1
print(ans) | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
450964e2ca1c9a822fb9063c290bf73249f962dc | b72dbc51279d3e59cb6410367b671f8a956314c1 | /leet_code/leet_289_미완.py | af573016d838cdf5fed6d1582fe7f3571eef673e | [] | no_license | ddobokki/coding-test-practice | 7b16d20403bb1714d97adfd1f47aa7d3ccd7ea4b | c88d981a1d43b986169f7884ff3ef1498e768fc8 | refs/heads/main | 2023-07-08T15:09:32.269059 | 2021-08-08T12:19:44 | 2021-08-08T12:19:44 | 344,116,013 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 934 | py | class Solution:
def wordPattern(self, pattern: str, s: str) -> bool:
p_to_s = {}
s_to_p = {}
s_list = s.split()
if len(pattern) != len(s_list):
return False
for i in range(len(pattern)):
if not pattern[i] in p_to_s:
p_to_s[pattern[i... | [
"44228269+ddobokki@users.noreply.github.com"
] | 44228269+ddobokki@users.noreply.github.com |
43dc21afee9084e1dac7059070a15dba3c140d9b | 8c5c4102b1c0f54ceeaa67188532f72c7e269bab | /ucr_adiac.py | 9d23e9782528db8910955949b3d7e0c9ed82de5a | [
"MIT"
] | permissive | stjordanis/dtw-numba | a6d3e745e005b0bc8026d973f33668931bbde9f2 | d8bc9e1f0cde108e429ff72e654ed8aa10a6b4ae | refs/heads/master | 2022-01-04T16:59:26.423994 | 2019-01-14T01:45:11 | 2019-01-14T01:45:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 457 | py | from utils.data_loader import load_dataset
from odtw import KnnDTW
X_train, y_train, X_test, y_test = load_dataset('adiac', normalize_timeseries=True)
print()
# parameters
num_neighbours = 1
model = KnnDTW(num_neighbours)
# fit to the dataset
model.fit(X_train, y_train)
# Predict / Evaluate the score
accuracy = mo... | [
"titu1994@gmail.com"
] | titu1994@gmail.com |
a3fad2f7d00ea5094ccd316d80677c52d5b80656 | 61efd764ae4586b6b2ee5e6e2c255079e2b01cfc | /azure-mgmt-network/azure/mgmt/network/v2017_10_01/models/application_gateway_frontend_ip_configuration.py | 955d0ad0ccdd29a9286612911582c511c7937114 | [
"MIT"
] | permissive | AutorestCI/azure-sdk-for-python | a3642f53b5bf79d1dbb77851ec56f4cc0c5b3b61 | 60b0726619ce9d7baca41f6cd38f741d74c4e54a | refs/heads/master | 2021-01-21T02:23:59.207091 | 2018-01-31T21:31:27 | 2018-01-31T21:31:27 | 55,251,306 | 4 | 3 | null | 2017-11-13T17:57:46 | 2016-04-01T17:48:48 | Python | UTF-8 | Python | false | false | 3,079 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | [
"laurent.mazuel@gmail.com"
] | laurent.mazuel@gmail.com |
3cf9d17ecba3aa57d48ecb8dfdd99b8f2850da18 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03407/s848933325.py | ff4cec19ca5069927aff3e41f680aa80c10562e8 | [] | 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 | 158 | py | def solve(string):
a, b, c = map(int, string.split())
return "Yes" if a + b - c >= 0 else "No"
if __name__ == '__main__':
print(solve(input()))
| [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
02b153c3d0fc5f6666834084cdbd1206b6fec8e0 | 5ff73a257eed74de87c0279c69552c19420fcc7d | /venv/bin/restauth-service.py | 1c22855c0d3bbf3289c293172bb8dd3aa5f859d9 | [] | no_license | GanapathiAmbore/api_auth_pro | 9109f4fbd50ae0225875daa3f82418b7c9aa5381 | d98e3cf1cade4c9b461fe298f94bdc38625c06aa | refs/heads/master | 2022-06-13T08:31:49.728775 | 2019-07-16T05:16:37 | 2019-07-16T05:16:37 | 196,578,277 | 0 | 0 | null | 2022-04-22T21:55:26 | 2019-07-12T12:47:44 | Python | UTF-8 | Python | false | false | 3,830 | py | #!/home/ganapathi/PycharmProjects/authpro/venv/bin/python
# -*- coding: utf-8 -*-
#
# This file is part of RestAuth (https://restauth.net).
#
# RestAuth 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 ver... | [
"ganapathiambore@gmail.com"
] | ganapathiambore@gmail.com |
01afe9e24bd9eb31dadd305dec3fa3f60ba98f28 | 1d23c51bd24fc168df14fa10b30180bd928d1ea4 | /Lib/site-packages/twisted/logger/_legacy.py | c03f93b687532317a997175c0116dd9231be8e8f | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | BeaverInc/covid19CityMontreal | 62dac14840dadcdf20985663bc2527c90bab926c | 1b283589f6885977a179effce20212a9311a2ac0 | refs/heads/master | 2021-05-22T20:01:22.443897 | 2020-06-21T08:00:57 | 2020-06-21T08:00:57 | 253,067,914 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,237 | py | # -*- test-case-name: twisted.logger.test.test_legacy -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Integration with L{twisted.python.log}.
"""
from zope.interface import implementer
from ._levels import LogLevel
from ._format import formatEvent
from ._observer import ILogObserver
f... | [
"36340780+lanyutian88@users.noreply.github.com"
] | 36340780+lanyutian88@users.noreply.github.com |
e3bc0a518cc3efc7e7c027f9b002fdbccbd0ed8f | 67a0618de2844f175e74684214d45d1ba4b78554 | /core/views.py | 1e20ab3fe39e835fec71321975a7adf4527011eb | [
"MIT"
] | permissive | fantasiforbundet/grenselandet | c748fa0701d5c96351da916678f771e3717dea10 | d0a8878fa2aa1ee65737702d86ef25482bf46bff | refs/heads/master | 2020-11-26T20:56:00.828700 | 2015-02-06T16:45:16 | 2015-02-06T16:45:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 793 | py | # -*- coding: utf-8 -*-
""" Generic views for webpage """
from django.views.generic.base import TemplateView
from django.conf import settings
class TextTemplateView(TemplateView):
""" Render plain text file. """
def render_to_response(self, context, **response_kwargs):
response_kwargs['content_type... | [
"haakenlid@gmail.com"
] | haakenlid@gmail.com |
05d8f7afde2beb0ee1fa60b24698bbaec6bff6ee | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_072/ch37_2019_10_01_17_50_41_334636.py | d8c0718ce3db7304a4911b49043117ba88bc9165 | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 481 | py | def eh_primo(numero):
i=3
if numero==0 or numero==1:
return False
if numero==2:
return True
if numero%2==0:
return False
while numero>i:
if numero%i==0:
return False
i+=2
return True
def lista_primos(z): ... | [
"you@example.com"
] | you@example.com |
dc9bfe97a28ba15b3cac30f50bd63591f69f984a | 70b0d4b4440a97b648a08de0d89cc536e8f4c569 | /programmersaddsum.py | c1984961c684f7f8ddcf59b1e5cede34e7782682 | [] | no_license | seoseokbeom/leetcode | 01c9ca8a23e38a3d3c91d2de26f0b2a3a1710487 | 9d68de2271c2d5666750c8060407b56abbf6f45d | refs/heads/master | 2023-03-27T20:20:24.790750 | 2021-03-25T04:43:50 | 2021-03-25T04:43:50 | 273,779,517 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 214 | py | import itertools
def solution(numbers):
arriter = itertools.combinations(numbers, 2)
res = set()
for v in arriter:
res.add(sum(v))
return sorted(list(res))
print(solution([5, 0, 2, 7]))
| [
"pronunciatio@naver.com"
] | pronunciatio@naver.com |
40cfca4342379984f26a53b5676ab401bdc45adf | 67bafcfbd2caa774eb3765e6b2e28b7accbf1307 | /API/run.py | 59ff19dc4a977469c88d18edb48c65459cb43d58 | [] | no_license | andy6804tw/digit-recognizer-project | 9b8f1a226001665019bb15845db24138615ac81d | 523920662cb853de0a08639ddfd449f0984a4d8e | refs/heads/master | 2021-07-06T21:20:26.633250 | 2020-03-03T10:38:06 | 2020-03-03T10:38:06 | 230,412,581 | 3 | 0 | null | 2021-05-06T19:49:15 | 2019-12-27T09:19:50 | HTML | UTF-8 | Python | false | false | 215 | py | from app import app
import config
@app.route('/')
def index():
return 'server started on '+str(config.PORT)+' PORT '+str(config.ENV)
if __name__ == '__main__':
print(app.url_map)
app.run(port=config.PORT)
| [
"andy6804tw@yahoo.com.tw"
] | andy6804tw@yahoo.com.tw |
39e70a4daa73f14bc0fd321efc59599fa0359c32 | 7f9d4bce21b6d03ff7976c1462556db593abc2b2 | /python3/0392.py | 1756a1bf9cf8384ec1d78b45e95931f24318efe2 | [] | no_license | crazykuma/leetcode | 116343080f3869a5395fb60a46ac0556d170fa15 | cc186fddf09592607bd18d333a99980703ac1ab3 | refs/heads/master | 2020-09-11T12:27:21.863546 | 2020-05-20T05:43:07 | 2020-05-20T05:43:07 | 222,064,196 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 888 | py | class Solution:
def isSubsequence(self, s: str, t: str) -> bool:
if not s:
# s为空时是任何字符串的子集
return True
if len(set(s)-set(t)) > 0:
# s与t的差异不为空时,s不是任何t的子集
return False
i, j = 0, 0
m, n = len(s), len(t)
cur = ''
while i < m... | [
"crazykuma@qq.com"
] | crazykuma@qq.com |
9a65e431490dc31d401ad844749544f12fa401fd | 407aa951fe64227c685eccd698b59959f2093dfc | /featureTests/1_DATA_ANALYSIS/0_delete_samples.py | 9b69d80728a4e044a45de5998d59a1fdae37bd30 | [] | no_license | sycophant-stone/tf_base | 32ad6798b2fcd728d959070a8eaf81649c9e247f | f6b4cb26fbc294e2a24dfa5d2ce05b9b33d77d41 | refs/heads/master | 2023-04-03T21:09:57.893549 | 2019-09-30T07:09:56 | 2019-09-30T07:09:56 | 138,027,678 | 4 | 0 | null | 2023-03-24T21:55:38 | 2018-06-20T12:06:55 | Jupyter Notebook | UTF-8 | Python | false | false | 516 | py | import os
def select_intrest_pics(pic_path):
n_img = len(os.listdir(pic_path))
print(n_img)
#assert n_img == 9963, 'VOC2007 should be 9963 samples'
for i in xrange(n_img):
if i< 10:
continue
del_path = os.path.join(pic_path, '{:06d}.jpg'.format(i))
print('i:%d, num_im... | [
"kawayi_rendroid@163.com"
] | kawayi_rendroid@163.com |
a2fb9b7cc2174067b3dd28bb67f67ab7ad054100 | 0627aa3a4b1349eccc56eb7315bd9e99bbf6d84b | /otus_stackoverflow/questions/urls.py | 81d04bee9a183168f45298518d81bc7e558c1b85 | [] | no_license | vsokoltsov/OTUS_PYTHON | 93bc0efd8011bf47bb838d241e56703e6d9278f7 | feac92294756385fe5021bfa838d27b9334d6b7b | refs/heads/master | 2022-12-11T04:28:12.450518 | 2019-03-23T15:39:39 | 2019-03-23T15:39:39 | 177,306,191 | 0 | 0 | null | 2022-12-08T02:30:43 | 2019-03-23T15:31:22 | Python | UTF-8 | Python | false | false | 1,537 | py | from django.conf.urls import url
from django.contrib.auth.decorators import login_required
from rest_framework.routers import DefaultRouter
from django.conf.urls import include
from .views import (
QuestionsView, QuestionCreateView, QuestionDetailView,
TagsListView, AnswerCreateView, VoteAnswerView, VoteQuesti... | [
"vforvad@gmail.com"
] | vforvad@gmail.com |
5adf8dc1a5f8953fc511c63cb60f5482a01c4c9f | 9d40cb0b457b2c8c787af7185af664b20df6845e | /tabletloom/driver-fabric.py | 9b064e9906999345e650bb7fd8b848d830ca79f5 | [] | no_license | fo-am/patternmatrix2 | f13365618179867a3e27efecf946ec8f5dea190d | 3ec85b334f7da256b96265e29482641f38002f95 | refs/heads/master | 2023-04-12T06:46:15.469411 | 2022-02-22T13:53:16 | 2022-02-22T13:53:16 | 92,929,344 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,146 | py | import smbus
import time
import mcp23017
import tangible
import osc
bus = smbus.SMBus(1)
mcp = [0x20,0x21,0x22,0x23]
# sensor orientation
dn = 0
up = 1
lr = 2
rl = 3
layout = [[0x20,0,dn], [0x20,1,dn], [0x20,2,dn], [0x20,3,dn],
[0x21,0,dn], [0x21,1,dn], [0x21,2,dn], [0x21,3,dn],
[0x22,0,dn], [0... | [
"dave@fo.am"
] | dave@fo.am |
e9054bddbbdc4a4c693bbaaf2cbc2fed48ce3e8f | 380372bbec9b77df14bb96fc32aca7061cca0635 | /astro/moon/iss1.py | cbe0e79c2cab4b1eabf19ca8b6856b125462b177 | [] | no_license | IchiroYoshida/python_public | d3c42dc31b3206db3a520a007ea4fb4ce6c1a6fd | 37ccadb1d3d42a38561c7708391f4c11836f5360 | refs/heads/master | 2023-08-16T17:19:07.278554 | 2023-08-13T21:29:51 | 2023-08-13T21:29:51 | 77,261,682 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 779 | py | import math
import time
from datetime import datetime
import ephem
degrees_per_radian = 180.0 / math.pi
home = ephem.Observer()
home.lon = '-122.63' # +E
home.lat = '45.56' # +N
home.elevation = 80 # meters
# Always get the latest ISS TLE data from:
# http://spaceflight.nasa.gov/realdata/sightings/SSapp... | [
"yoshida.ichi@gmail.com"
] | yoshida.ichi@gmail.com |
2ccc9be68390f86c4dc72a2aed2aba3c9e87f173 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_169/ch146_2020_04_12_17_11_21_542240.py | 756543924c51ab18f1a1af082e34978cca04a01f | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 542 | py |
def conta_ocorrencias(lista):
lista2=[]
lista3=[]
for i in range(len(lista)):
lista.count(lista[i])
lista3.append( lista.count(lista[i]) )
for i in lista3:
if lista3.count(i)>1:
lista3.remove(i)
for i in lista:
if lista.count(i)>1:
... | [
"you@example.com"
] | you@example.com |
e66245d10fdc516e42f9e199e11f20956954434a | 490f5e517942f529ddc8c1e0d421a208ff1ca29b | /02_code/exctools.py | 828134802f8e1fac0826f0e6ff3cd498809b3b4f | [] | no_license | emnglang/py-lab | facdc464a8c84b90f06b5cb639315981c0b4ba8d | bc3566da81e0b2cfa9ce563ffc198d35294971a1 | refs/heads/master | 2020-03-25T15:10:42.856062 | 2018-08-24T14:54:33 | 2018-08-24T14:54:33 | 143,869,343 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 334 | py | import sys, traceback
def safe(callee, *pargs, **kargs):
try:
callee(*pargs, **kargs) # Catch everything else
except: # Or "except Exception as E:"
traceback.print_exc()
print('Got %s %s' % (sys.exc_info()[0], sys.exc_info()[1]))
if __name__ == '__main__':
import oops2
saf... | [
"linja1688@gmail.com"
] | linja1688@gmail.com |
5cb5b24b3295a6a98df8c170a567fba75aec2d0a | 2387b5ecf12d9a17976e049e4adbf739edafc830 | /core/migrations/0002_auto_20150511_1223.py | 79c7b2c9754a0743a3a1d31bc73b26c92766009c | [] | no_license | nathananderson03/britdoc | 3ce0b1141a648fce30056ca32fd8665ed6cf4971 | ddb921ed82088abbacdbb625baf3c9cae7987ccb | refs/heads/master | 2021-01-17T06:29:23.812112 | 2016-07-20T16:39:25 | 2016-07-20T16:39:25 | 63,797,054 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 806 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='film',
name='production_... | [
"nathan.andersson03@gmail.com"
] | nathan.andersson03@gmail.com |
b91811713854a626b904698f64ca3f4bd8e8740d | 2cc483723d7cb9c7a2b145b03e41a564e0c5449a | /app/save_weights.py | 0491cd1aebebbc6630ecd45aef737b48c80335c3 | [] | no_license | MattSegal/QueensSpeech | cb7331860393e30847dd0b4bb7dd9edd77ca3cb0 | cf868bacbaf5b0871dbccc7024ec06857b07aa5c | refs/heads/master | 2021-03-12T20:24:30.281294 | 2017-05-16T12:54:22 | 2017-05-16T12:54:22 | 91,458,300 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 845 | py | import cPickle
import numpy as np
import os.path
def get_name(file):
base_path = os.path.dirname(os.path.realpath(__file__))
return base_path + os.path.normpath('/weights/'+file)
f = open('net.pkl','rb')
net = cPickle.loads(f.read())
parallel_layer = net.layers[0]
hidden_layer_1 = net.layers[1]
hidden_layer... | [
"mattdsegal@gmail.com"
] | mattdsegal@gmail.com |
7329a13090fbf583b35134b78c4ef08362f28dc2 | 2dd3dd778f4f3ef3ca143636a42ce777e948dfc1 | /select_ptk2.py | 4d3d32d4f27ba2275054b5fd74b8458fa5c1c635 | [] | no_license | vaaaaanquish-xx/select-command-using-ptk | 64aea38b9b686c024a624baf2064cfe9f1cea255 | 07b6c7baddff15e8838a6b9b9a4b314450a9f1f9 | refs/heads/master | 2020-04-07T16:08:55.648027 | 2018-11-22T15:03:23 | 2018-11-22T15:03:23 | 158,517,117 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,009 | py | # -*- coding: utf-8 -*-
# ptk 2.x ver
from prompt_toolkit.application import Application
from prompt_toolkit.layout.margins import ScrollbarMargin
from prompt_toolkit.filters import IsDone
from prompt_toolkit.key_binding import KeyBindings
from prompt_toolkit.layout.containers import Window
from prompt_toolkit.layout.c... | [
"6syun9@gmail.com"
] | 6syun9@gmail.com |
677e75005b39feb32f9b2e382f9ccb08f2840189 | c9b5ed2eb5d596f141004f7b82e79bc2fb36072d | /equipes/api/serializers.py | ac8cb9a5c81ec70d5e9358ed8f90924bad2664d4 | [] | no_license | jocsakesley/encontrocomcristo | 3fd670544a42abfc43f2c2d6a34c8e3fdd9d2550 | 8e9bbf41f6d80f2ac15fc4240ff4b108957d5cd6 | refs/heads/master | 2023-02-24T15:20:01.129002 | 2021-02-04T17:33:06 | 2021-02-04T17:33:06 | 330,020,768 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,535 | py | from rest_framework import serializers
from equipes.models import Equipe
from funcao.models import Funcao
from participantes.api.serializers import ParticipantesSerializer
from participantes.models import Participante
class EquipesSerializer(serializers.ModelSerializer):
lider = ParticipantesSerializer()
membr... | [
"jocsadm@gmail.com"
] | jocsadm@gmail.com |
700c728094234c49a378ee39c18548edcf4cdc70 | 6d960d2ac7cb38f3e2db21cf59c10b2a734fcf42 | /code/scripts/searchlight_movie_perms.py | 78220d4547a9214baf26589ec742393540bbda49 | [
"MIT"
] | permissive | physthoth/sherlock-topic-model-paper | 2d86a1581ffc8a5fca553656bb1ca67f73bf634c | 4f77750c436264585879efb9f91957dc555f36a9 | refs/heads/master | 2020-09-25T11:13:32.457422 | 2018-10-08T18:40:17 | 2018-10-08T18:40:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,578 | py | import sys
import numpy as np
from nilearn.image import load_img
from brainiak.searchlight.searchlight import Searchlight
import pandas as pd
subid = int(sys.argv[1])
perm = int(sys.argv[2])
np.random.seed(perm)
# load fmri data
data = load_img('/idata/cdl/data/fMRI/andy/sherlock/data/sherlock_movie_s%s_10000.nii.gz... | [
"andrew.heusser@gmail.com"
] | andrew.heusser@gmail.com |
c2d7cb06a8b114a948211b5dd7d2cfe7c0012b7d | 1925c535d439d2d47e27ace779f08be0b2a75750 | /bloomberg/same_tree.py | e61ffeb81f1564b400d34c9b10a77d2466f534f5 | [] | no_license | arthurDz/algorithm-studies | ee77d716041671c4b8bb757d8d96f3d10b6589f7 | 1e4d23dd0c40df34f58d71c7ca3e6491be732075 | refs/heads/master | 2023-04-27T12:17:06.209278 | 2021-04-30T20:16:18 | 2021-04-30T20:16:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 841 | py | # Given two binary trees, write a function to check if they are the same or not.
# Two binary trees are considered the same if they are structurally identical and the nodes have the same value.
# Example 1:
# Input: 1 1
# / \ / \
# 2 3 2 3
# [1,2,3], [1,2,3]
#... | [
"yunfan.yang@minerva.kgi.edu"
] | yunfan.yang@minerva.kgi.edu |
dd52c60b639b8ff8d22bc8853e5f0b95231434bd | 3d07a6eb8cba4f6821c4a36c508e2f2cf1e407ee | /ps6/ps6_3.py | 33b87f81d5ed9f3b5be283898e4429c8d8dd00e6 | [] | no_license | claraqqqq/i_c_s_p_a_t_m_i_t | d4aaa9a176b698e8c402674de0a1bfe2d0e1e6ae | 3a0cae66fab7320a55ed3403b11c042bd347dcda | refs/heads/master | 2021-01-19T09:44:50.012962 | 2015-04-07T15:13:45 | 2015-04-07T15:13:45 | 29,719,682 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 759 | py | # ENCRYPTION
"""
strings. encode to them use to able be should you applyCoder, and buildCoder written have you Once
Cases Test
8) test.', a is applyShift('This >>>
bmab.' i qa 'Bpqa
18) bmab.', i qa applyShift('Bpqa >>>
test.' a is 'This
"""
def applyShift(text, shift):
"""
shift given the by shifted Caesar text... | [
"claraqqqq@gmail.com"
] | claraqqqq@gmail.com |
a510e0648dd38fe7c0ec63582bf5a346f19838c2 | eeb469954b768095f2b8ad2376f1a114a3adb3fa | /961.py | 9ceaffbdf9802217725e20fd681051191aa438b9 | [
"MIT"
] | permissive | RafaelHuang87/Leet-Code-Practice | ef18dda633932e3cce479f7d5411552d43da0259 | 7754dcee38ffda18a5759113ef06d7becf4fe728 | refs/heads/master | 2020-07-18T20:09:10.311141 | 2020-02-11T09:56:39 | 2020-02-11T09:56:39 | 206,305,113 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 274 | py | """
Solution for Leet Code 961.
"""
class Solution:
def repeatedNTimes(A):
temp = {}
for data in A:
if data not in temp:
temp[data] = 1
else:
return data
print(Solution.repeatedNTimes([1,3,2,1])) | [
"rafaelhuang@163.com"
] | rafaelhuang@163.com |
5388a6574e30e9d7340f6908a1a97e1f2eedf4c7 | da1721d2783ea4d67ff4e73cee6eee71292f2ef7 | /toontown/ai/DistributedSillyMeterMgr.py | a45f47422f60ca9ce436eee33a9023ca2d40d653 | [
"BSD-3-Clause"
] | permissive | open-toontown/open-toontown | bbdeb1b7bf0fb2861eba2df5483738c0112090ca | 464c2d45f60551c31397bd03561582804e760b4a | refs/heads/develop | 2023-07-07T01:34:31.959657 | 2023-05-30T23:49:10 | 2023-05-30T23:49:10 | 219,221,570 | 143 | 104 | BSD-3-Clause | 2023-09-11T09:52:34 | 2019-11-02T22:24:38 | Python | UTF-8 | Python | false | false | 2,339 | py | from direct.directnotify import DirectNotifyGlobal
from direct.distributed import DistributedObject
from toontown.ai import DistributedPhaseEventMgr
import time
class DistributedSillyMeterMgr(DistributedPhaseEventMgr.DistributedPhaseEventMgr):
neverDisable = 1
notify = DirectNotifyGlobal.directNotify.newCatego... | [
"jwcotejr@gmail.com"
] | jwcotejr@gmail.com |
ede1040ed424de83ddae76fb583b84076606c140 | 5002d20adbd983963f71ceb0bfaea148b1cbc079 | /CSE/CSE Major Projects - 2017_21/Politeness Transfer_ A Tag and Generate Approach/code/be-af.py | e316ef98b46f41f7fb3320e27fd4b00cebb5e039 | [] | no_license | 19WH1A0578/BVRITHYDERABAD | d15863ab255837bc11e49ff0742f6d6ab32c2c28 | 2492f5bd0eebf9103566a0cc7f96d732407c4317 | refs/heads/main | 2023-07-03T01:46:12.654932 | 2021-07-31T07:09:54 | 2021-07-31T07:09:54 | 384,429,090 | 1 | 0 | null | 2021-07-09T12:23:28 | 2021-07-09T12:23:28 | null | UTF-8 | Python | false | false | 1,082 | py | # -*- coding: utf-8 -*-
import pandas as pd
import os
from convokit import Corpus, Utterance, Speaker
from convokit import PolitenessStrategies
train_corpus = Corpus(filename=("data/train/training-corpus/"))
ps = PolitenessStrategies(strategy_attribute_name = "strategies", \
marker_attribut... | [
"saisudhavadisina@gmail.com"
] | saisudhavadisina@gmail.com |
660d20122ec3c754f92aa8e51fb1153f3787c410 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02901/s827366183.py | e8d52e3e5d9a72d4e8c404ef73945cacb67be0a1 | [] | 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 | 794 | py | INF = 2*10**7
def main():
N, M = (int(i) for i in input().split())
A = []
B = []
C = []
for _ in range(M):
a, b = (int(i) for i in input().split())
A.append(a)
B.append(b)
bit = 0
for i in input().split():
bit |= (1 << (int(i)-1))
C.appen... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
d63665e90489f68f80177c8430c39c23d6a03832 | f80ef3a3cf859b13e8af8433af549b6b1043bf6e | /pyobjc-framework-SystemConfiguration/Lib/SystemConfiguration/__init__.py | cf487eb2587ebcfb8bbfd19031f0c22d49f7614c | [
"MIT"
] | permissive | ronaldoussoren/pyobjc | 29dc9ca0af838a56105a9ddd62fb38ec415f0b86 | 77b98382e52818690449111cd2e23cd469b53cf5 | refs/heads/master | 2023-09-01T05:15:21.814504 | 2023-06-13T20:00:17 | 2023-06-13T20:00:17 | 243,933,900 | 439 | 49 | null | 2023-06-25T02:49:07 | 2020-02-29T08:43:12 | Python | UTF-8 | Python | false | false | 993 | py | """
Python mapping for the SystemConfiguration framework.
This module does not contain docstrings for the wrapped code, check Apple's
documentation for details on how to use these functions and classes.
"""
import sys
import Foundation
import objc
from SystemConfiguration import _metadata
sys.modules["SystemConfigur... | [
"ronaldoussoren@mac.com"
] | ronaldoussoren@mac.com |
bd25c0f81a90e0e4885aa39d8448b944fd5868c5 | 5c309a45507e26ac7320a474d82c5887c7af9f30 | /MySite/MySite/urls.py | 4ce2d92aeef3abf905ee0d81702179359a2608c5 | [] | no_license | MMohan1/MySite | 09c003dcad8158ee3e16a5d14405cb6aaeb396fe | c14c2fb13cff10e79b8cb444ec1cf4996c7742cc | refs/heads/master | 2021-01-22T13:08:37.734894 | 2014-12-25T09:37:39 | 2014-12-25T09:37:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 420 | py | from django.conf.urls import patterns, include, url
from django.contrib import admin
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'MySite.views.home', name='home'),
url(r'^polls/',
include('polls.urls', namespace="po... | [
"manmohansharma987@gmail.com"
] | manmohansharma987@gmail.com |
93055757e6e1ffa121edea16b0567e884338203f | b05fee086482565ef48785f2a9c57cfe2c169f68 | /part_one/3-observer_pattern/after/observer/subject_abc.py | f2fb23403b3aafcbd9450c06eee0527def13727a | [] | no_license | diegogcc/py-design_patterns | 76db926878d5baf9aea1f3d2f6a09f4866c3ce1e | 2b49b981f2d3514bbd02796fe9a8ec083df6bb38 | refs/heads/master | 2023-04-01T08:28:53.211024 | 2021-04-05T11:48:19 | 2021-04-05T11:48:19 | 304,145,791 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 575 | py | from abc import ABCMeta
from observer import ABCObserver
class ABCSubject(metaclass=ABCMeta):
_observers = set()
def attach(self, observer):
if not isinstance(observer, ABCObserver):
raise TypeError('Observer not derived from ABCObserver')
self._observers |= {observer}
def det... | [
"diegoc906@gmail.com"
] | diegoc906@gmail.com |
12a7c034769b181f60b365d9088a81e33ef47347 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_200/260.py | d0237b341a7b08a08d30d63213739e6e1ee988f4 | [] | 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 | 773 | py | def good(numberStr):
numberList = map(int, list(numberStr))
length = len(numberList)
notYetFix = 0
for i in range(length - 1):
if numberList[i] < numberList[i+1]:
notYetFix = i+1
elif numberList[i] > numberList[i+1]:
break
elif i == length - 2 and numberLi... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
5fa492dd4548a8e0b896cfcc59dd262eb4d1a0b2 | 315b5795445848af093839214d7ce852b3080b66 | /Scrapy/tutorial/tutorial/spiders/quotes_spider.py | 89a646ff776c9e851e87e2a6ae5bb192d7aa9e63 | [] | no_license | yangyang0126/PythonSpider | 030657a04d91850c1bfe19a685f83e5dff670aeb | eb2b12557735eddf43603155a23bd582531c387d | refs/heads/master | 2021-06-25T16:21:39.561541 | 2021-03-31T11:03:17 | 2021-03-31T11:03:17 | 213,564,028 | 4 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,008 | py | # -*- coding: utf-8 -*-
"""
Created on Tue May 5 17:55:42 2020
@author: zhaoy
"""
import scrapy
class QuotesSpider(scrapy.Spider):
name = "quotes"
start_urls = [
'http://quotes.toscrape.com/page/1/',
'http://quotes.toscrape.com/page/2/',
]
def parse(self, re... | [
"zhaojingyi0126@163.com"
] | zhaojingyi0126@163.com |
178fea7a115e8617e01db117b27aadc0ff3258ef | 2545252679e65a1912a56a8e6cfd3f3f8e26af87 | /virtualenv/Scripts/pilprint.py | fd424994966180548bd4c1b7369a7139513279fc | [] | no_license | tubbatun/customize-django-oscar-templates- | 796a1288cd18f12258c3c20958ce84e8fdb9af78 | 41404e4aa59aa36a4159034af7fab32a8b3b3263 | refs/heads/master | 2021-01-11T11:37:46.098571 | 2016-12-19T10:55:02 | 2016-12-19T10:55:02 | 76,853,932 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,642 | py | #!c:\users\sathi\desktop\tryoscar\virtualenv\scripts\python.exe
#
# The Python Imaging Library.
# $Id$
#
# print image files to postscript printer
#
# History:
# 0.1 1996-04-20 fl Created
# 0.2 1996-10-04 fl Use draft mode when converting.
# 0.3 2003-05-06 fl Fixed a typo or two.
#
from __future__ import p... | [
"sathi@mahdil.com"
] | sathi@mahdil.com |
8b1d765af3d85bf9ff7d1ae97ba2b77b9ad6777e | 24d9f077593b33c707b12d3a00cf91750f740729 | /src/utils.py | 8efc2f56c796915263859578fe1363f3dbb0998e | [
"Apache-2.0"
] | permissive | xiaonanln/myleetcode-python | 274c8b8d7c29fd74dd11beb845180fb4e415dcd1 | 95d282f21a257f937cd22ef20c3590a69919e307 | refs/heads/master | 2021-01-22T21:45:59.786543 | 2019-04-21T15:24:23 | 2019-04-21T15:24:23 | 85,474,052 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,012 | py | import sys
def mdarray(initVal, *dims): return [initVal] * dims[0] if len(dims) == 1 else [ mdarray(initVal, *dims[1:]) for _ in xrange(dims[0])]
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
def printlist(head):
n = head
vals = []
while n is not None:
v... | [
"xiaonanln@gmail.com"
] | xiaonanln@gmail.com |
e7624008f621053eb84fcdeaba639ad1a2f74dcf | 4c68af90463865564ad710b4d50ad79c7e6ba5ac | /maintain_api/config.py | c37ba2c885f2bb7c0509d2b6d274b457830d751a | [
"MIT"
] | permissive | LandRegistry/maintain-api | d231f34105f594ea960327076a81bcd67a639a6c | fa1ecf71332b47606293c59eeaed8ae43d5231cd | refs/heads/master | 2020-04-03T21:16:28.830573 | 2018-10-26T14:45:00 | 2018-10-31T14:39:22 | 155,569,033 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,375 | py | import os
from urllib.parse import quote_plus
# RULES OF CONFIG:
# 1. No region specific code. Regions are defined by setting the OS environment variables appropriately to build up the
# desired behaviour.
# 2. No use of defaults when getting OS environment variables. They must all be set to the required values prior ... | [
"james.lademann@landregistry.gov.uk"
] | james.lademann@landregistry.gov.uk |
d200d0184ab94946218cf6520cfcdc3467b09255 | 54f352a242a8ad6ff5516703e91da61e08d9a9e6 | /Source Codes/AtCoder/arc087/A/3622945.py | a059d27d881c55058b7b747bc2cf9607e6321128 | [] | no_license | Kawser-nerd/CLCDSA | 5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb | aee32551795763b54acb26856ab239370cac4e75 | refs/heads/master | 2022-02-09T11:08:56.588303 | 2022-01-26T18:53:40 | 2022-01-26T18:53:40 | 211,783,197 | 23 | 9 | null | null | null | null | UTF-8 | Python | false | false | 651 | py | import sys
stdin = sys.stdin
sys.setrecursionlimit(10**5)
def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().r... | [
"kwnafi@yahoo.com"
] | kwnafi@yahoo.com |
e85cfedc1dfff139224d07cd93ee4c56cca29c0d | 25279384025751b3b400aea006f164d66c167104 | /Sytem_demo/绕过360创建用户.py | 0905c44166dfef60318e16f76264d8548adfe5cc | [] | no_license | linruohan/my_study | 6fda0b49f4c671919ec7a7fc6ba596b49ec66e59 | 7666f93259495b6928751d50eb1bab114e118038 | refs/heads/master | 2020-03-28T18:26:47.776943 | 2018-09-17T05:52:17 | 2018-09-17T05:52:17 | 148,882,060 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,060 | py | import win32api
import win32net
import win32netcon
verbose_level = 0
server = None # Run on local machine.
def CreateUser():
"Creates a new test user, then deletes the user"
a = """#Author: Lz1y
#Blog:http://www.Lz1y.cn\n\n\n\n"""
print(a)
testName = "Lz1y$"
try:
win32net.NetUserDel(serv... | [
"mjt1220@126.com"
] | mjt1220@126.com |
710ef00ecca7a2d4948cd6f3da2950555dda2974 | c2849586a8f376cf96fcbdc1c7e5bce6522398ca | /ch08/ex8-5.py | 2db05423dda3d46e39af01c7f937fdf5eb56bf12 | [] | no_license | freebz/Learning-Python | 0559d7691517b4acb0228d1cc76de3e93915fb27 | 7f577edb6249f4bbcac4f590908b385192dbf308 | refs/heads/master | 2020-09-23T01:48:24.009383 | 2019-12-02T12:26:40 | 2019-12-02T12:26:40 | 225,371,155 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 298 | py | # 리스트 메서드 호출
L = ['eat', 'more', 'SPAM!']
L.append('please') # 추가 메서드 호출: 끝에 아이템을 추가함
L
# ['eat', 'more', 'SPAM!', 'please']
L.sort() # 리스트 아이템 정렬('S' < 'e')
L
# ['SPAM!', 'eat', 'more', 'please']
| [
"freebz@hananet.net"
] | freebz@hananet.net |
3f660de7246377aed56171a5b3a247539393fa1e | ce8c59b637d024424d331c1b2b9df3bd9d91c5a5 | /tasks_8/homework/task_8_3.py | 51e6f1accb79e6ba49cc85ca9a9e18a851fb8e18 | [] | no_license | htmlprogrammist/kege-2021 | 7ca9155724e8041b807405d23391fb6503a7589b | 4fa3cd9a0cc4213bbdf4576894953452b256b56e | refs/heads/master | 2023-06-03T19:56:09.160795 | 2021-06-25T09:07:31 | 2021-06-25T09:07:31 | 308,915,777 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 801 | py | """
Вася составляет 4-буквенные коды из букв У, Л, Е, Й. Каждую букву нужно использовать ровно 1 раз,
при этом код не может начинаться с буквы Й и не может содержать сочетания ЕУ.
Сколько различных кодов может составить Вася?
"""
s = 'УЛЕЙ'
counter = 0
for a in s[:3]:
for b in s:
for c in s:
fo... | [
"badmaeve2511@gmail.com"
] | badmaeve2511@gmail.com |
368e6ea2ec3beae8484e00f5d2b77552687787da | d04d3eec289376e7682403af2f32044b3991d27b | /6 - Objects and Classes/Lab-1.py | bc2ec3fd61e84ac0da482be820de7019f23c313e | [] | no_license | m-evtimov96/softUni-python-fundamentals | 190002dbc6196211340126814e8ed4fce3b8a07f | 817a44a3d78130d37e58facfc7bcfdc8af5f4051 | refs/heads/master | 2020-12-10T12:45:27.847764 | 2020-06-23T13:09:43 | 2020-06-23T13:09:43 | 233,598,519 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 277 | py | class Comment:
def __init__(self, username, content, likes = 0):
self.username = username
self.content = content
self.likes = likes
comment = Comment('user1', 'I like this book')
print(comment.username)
print(comment.content)
print(comment.likes)
| [
"m.evtimov196@gmail.com"
] | m.evtimov196@gmail.com |
7042a0bd3044411ecbe1410052639e87c767e370 | 1f227fa290b9b0669722ba5144f99b9b7f969d32 | /trash7djangoProject/settings.py | edaeea2e1d292b6038c57905937018d0679f72ef | [] | no_license | sglee487/trash7djangoProject | c8188259283cd89711cea9ff456c7224db841216 | 4bc9cc022199cfe83a876031901c98e202df2193 | refs/heads/master | 2023-08-16T22:03:25.294216 | 2021-10-02T03:25:53 | 2021-10-02T03:25:53 | 380,723,080 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,395 | py | """
Django settings for trash7djangoProject project.
Generated by 'django-admin startproject' using Django 3.2.4.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
... | [
"sglee487@gmail.com"
] | sglee487@gmail.com |
a2eb2f15d648514d2fb306b3dfc4f32265613857 | 19236d9e966cf5bafbe5479d613a175211e1dd37 | /cohesity_management_sdk/models/tenant_view_update_details.py | 4bfe6d01532e5630f8534fce69d0d7d939816cd2 | [
"MIT"
] | permissive | hemanshu-cohesity/management-sdk-python | 236c44fbd9604809027f8ddd0ae6c36e4e727615 | 07c5adee58810979780679065250d82b4b2cdaab | refs/heads/master | 2020-04-29T23:22:08.909550 | 2019-04-10T02:42:16 | 2019-04-10T02:42:16 | 176,474,523 | 0 | 0 | NOASSERTION | 2019-03-19T09:27:14 | 2019-03-19T09:27:12 | null | UTF-8 | Python | false | false | 1,613 | py | # -*- coding: utf-8 -*-
# Copyright 2019 Cohesity Inc.
class TenantViewUpdateDetails(object):
"""Implementation of the 'Tenant View Update Details.' model.
Specifies view update details about a tenant.
Attributes:
tenant_id (string): Specifies the unique id of the tenant.
view_names (li... | [
"ashish@cohesity.com"
] | ashish@cohesity.com |
8a4d3531c5aca0cc15b6816c3e76e0f611e2404c | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02408/s132954082.py | adf3cae7f1f026a2ec83181f0895f2eaa43eaf7f | [] | 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 | 337 | py | suit = {"S": 0, "H": 1, "C": 2, "D": 3}
suit_keys = list(suit.keys())
deck = [[suit_keys[i] + " " + str(j + 1) for j in range(13)] for i in range(4)]
for _ in range(int(input())):
card = input().split()
deck[suit[card[0]]][int(card[1]) - 1] = ""
for i in range(4):
for j in deck[i]:
if j != "":
... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
75735120139c7430867a75bdaa0c5d627ceee1c6 | 2a6f6cc148cbccb55c826bf01e0159ef58a733ec | /train_script_TFR.py | b530c0917e7daaab9900ae33b730b0b625a92c6e | [] | no_license | QuantumPlumber/CookieBoxMachineLearning | 5e9a4ebf385aa40373d4d5dbc1020b40dc06500f | dfc60bb9b29d519618d59b10f9acae058f368e17 | refs/heads/master | 2022-11-21T20:13:52.507033 | 2019-09-19T02:09:00 | 2019-09-19T02:09:00 | 168,767,419 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,020 | py | import numpy as np
import time
#base_filename = 'reformed_TF_train_mp_1_quarter'
#base_filename = 'TF_train_update_TFR'
#base_filename = 'TF_train_waveform_TFR'
#base_filename = 'TF_train_wave_unwrapped_TFR'
base_filename = 'TF_train_wave_unwrapped_eggs_TFR'
dataset_size = 60000
TFR_filesize = 10000
def file_chunker... | [
"44450703+QuantumPlumber@users.noreply.github.com"
] | 44450703+QuantumPlumber@users.noreply.github.com |
286662ec2018c9f32e6fb986fc832bc0ab1dc3cf | 5e8931a6bb8b883b9e2f4979ad4b469eabece11f | /appfat/blog/migrations/0011_auto_20180801_1543.py | 50fa24c12e04c6bad3e71a7fc5e11be56c9df76a | [] | no_license | dennyerikson/django-AppFat | accbfe232ab3895d39ee2ba2af69baff55d2986c | 476a821aba1aff7c4a3bea0dbafa03e145eb6325 | refs/heads/master | 2020-03-22T20:17:01.080648 | 2019-01-06T23:40:12 | 2019-01-06T23:40:12 | 140,586,930 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 451 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2018-08-01 18:43
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blog', '0010_auto_20180727_1711'),
]
operations = [
migrations.AlterField(
... | [
"dennyeriks00on@gmail.com"
] | dennyeriks00on@gmail.com |
dd0d4b267638c32c16c41ea77a4ed9f1a38c0773 | 6db1b8b05c6a4fb68f8514f07bc5725e881691ee | /test/test_updating_a_mailing_list_request.py | 80ee367c3265a652b4858a6e670f1b0dc9e0f7e6 | [] | no_license | mooTheo/Python-Moosend-Wrapper | 7cc776dc90a78484b605d33b6e0403fee27f99ac | eaf3b5f82960aef5dfd4201026e57e88ad663005 | refs/heads/master | 2021-07-07T20:55:32.994324 | 2017-10-03T14:17:42 | 2017-10-03T14:17:42 | 104,724,718 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 933 | py | # coding: utf-8
"""
Moosend API
TODO: Add a description
OpenAPI spec version: 1.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
import unittest
import moosend
from moosend.rest import ApiException
from moosend... | [
"theo@moosend.com"
] | theo@moosend.com |
30f4e4a5a110d3d3199fca57cbf4ebf05170115b | 6b8c52048648c82543ce899d5fb2f8b0dcabb6e5 | /heaps/misha&candies.py | fb7d4cc3ccfeafc3f4ba12ef01e7c2e4167e6994 | [] | no_license | arnabs542/DS-AlgoPrac | c9f7f0d383bcb3b793b09b219135f1bc9d607081 | fcc2d6d014e9ffdce3ff4b64d12ce054222e434d | refs/heads/master | 2022-12-13T05:56:33.098629 | 2020-09-15T13:48:54 | 2020-09-15T13:48:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,864 | py | """Misha and Candies
Misha loves eating candies. She has given N boxes of Candies. She decides, every time she will choose a box having the minimum number of candies, eat half of the candies and put the remaining candies in the other box that has the minimum number of candies. Misha does not like a box if it has the nu... | [
"vvrmahendra@gmail.com"
] | vvrmahendra@gmail.com |
ab8e5e33a928ac00940e2bd2a5eafe5e661de615 | c130a094e04eb448201ca2ab8ed4fe56cd1d80bc | /samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py | 2429a2205a21853b42e39fce88ac749973f708a0 | [
"Apache-2.0"
] | permissive | janweinschenker/openapi-generator | 83fb57f9a5a94e548e9353cbf289f4b4172a724e | 2d927a738b1758c2213464e10985ee5124a091c6 | refs/heads/master | 2022-02-01T17:22:05.604745 | 2022-01-19T10:43:39 | 2022-01-19T10:43:39 | 221,860,152 | 1 | 0 | Apache-2.0 | 2019-11-15T06:36:25 | 2019-11-15T06:36:24 | null | UTF-8 | Python | false | false | 2,307 | py | # coding: utf-8
"""
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
... | [
"noreply@github.com"
] | janweinschenker.noreply@github.com |
e56902c26f13b52578ca430af1c005065ee503e9 | 28b9adc46eb9bb7616c4f74fe29f9a3417f2f963 | /SIM_PKL/catatan/models.py | 2cb3c0434d4c040bf64928b425a3d0f9c25523bb | [] | no_license | mohamad1213/SIMPKL | ca0a6dafb97b494e5edf9276e358f800eee808e1 | e6ef5d6b8a5c18c85067314a3664bf43959a0370 | refs/heads/master | 2023-01-04T18:27:06.306534 | 2020-11-03T06:53:50 | 2020-11-03T06:53:50 | 297,674,434 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 443 | py | from django.db import models
from datetime import datetime
from django.contrib.auth.models import User
class Catatan(models.Model):
owner = models.ForeignKey(User, on_delete = models.DO_NOTHING,related_name='catatan')
tgl_kegiatan = models.DateField(default=datetime.now)
judul = models.CharField(max_length... | [
"hatami391998@gmail.com"
] | hatami391998@gmail.com |
24da05951cd9db1b073a0188ea67b0faf41a421c | 1c321bd2ca285625fe89e62519b04d26aaf83060 | /networking/dns/dnstest.py | 364fc028e848290c48f3c33d41c1ad212ea69638 | [] | no_license | w31ha0/hackTools | e554706a755102113a644b62b6816585c02570b5 | f133a96ed1922dce0c0758110ba93aedef0e61fd | refs/heads/master | 2021-01-21T12:36:02.581405 | 2018-04-23T06:54:05 | 2018-04-23T06:54:05 | 91,798,452 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,028 | py | #!/usr/bin/env python
# This code is strictly for demonstration purposes.
# If used in any other way or for any other purposes. In no way am I responsible
# for your actions or any damage which may occur as a result of its usage
# dnsSpoof.py
# Author: Nik Alleyne - nikalleyne at gmail dot com
# http://securitynik.blog... | [
"root@localhost.localdomain"
] | root@localhost.localdomain |
bde8f107575dc263a831f0089ca35d8a3d5bb93f | d001abba19711d678f2ba09dfbd5c84357be6bb0 | /src/contest/yukicoder/280/B.py | 025b75bdeffc6dfe7b3305220a7944a2bbfcf387 | [] | no_license | cormoran/CompetitiveProgramming | 89f8b3ceda97985d32b8cd91056b49abeb243e6f | fa0e479ab299f53984fa7541d088c10c447fb6e4 | refs/heads/master | 2020-04-17T19:59:49.724498 | 2020-03-28T15:46:26 | 2020-03-28T15:46:26 | 65,995,023 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 241 | py | #!/usr/bin/env python3
import fractions
N = int(input())
Z = list(map(int, input().split()))
G = fractions.Fraction(1, 1);
for i in range(N - 1):
G *= fractions.Fraction(Z[i + 1], Z[i])
print(str(G.numerator) + '/' + str(G.denominator))
| [
"cormoran707@gmail.com"
] | cormoran707@gmail.com |
c5061c88d417dc3ff636d5051915df0c3f4e6865 | 80d50ea48e10674b1b7d3f583a1c4b7d0b01200f | /src/datadog_api_client/v1/model/table_widget_definition_type.py | 41754b3fe02824bdb701f7c9092457b96605e51b | [
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"MPL-2.0"
] | permissive | DataDog/datadog-api-client-python | 3e01fa630278ad0b5c7005f08b7f61d07aa87345 | 392de360e7de659ee25e4a6753706820ca7c6a92 | refs/heads/master | 2023-09-01T20:32:37.718187 | 2023-09-01T14:42:04 | 2023-09-01T14:42:04 | 193,793,657 | 82 | 36 | Apache-2.0 | 2023-09-14T18:22:39 | 2019-06-25T22:52:04 | Python | UTF-8 | Python | false | false | 882 | py | # Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations
from datadog_api_client.model_utils import (
Mo... | [
"noreply@github.com"
] | DataDog.noreply@github.com |
b41ef3fee8820ab56138281c31348d0908d77313 | 92699c30f0ef36e6c76024c0966ad453bcd4e893 | /visualize.py | 73277a64915b433240deaf1f2365582459b10188 | [
"MIT"
] | permissive | AungMyatSan/unsup-3d-keypoints | c333b71216087d01e219288969a2dcaae9257ead | 93af69ba92bb00d1d2785967055df30ac745f95c | refs/heads/main | 2023-08-25T20:09:11.010042 | 2021-11-03T15:57:52 | 2021-11-03T15:57:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 174 | py | from experiments import algo_registry, get_args
if __name__ == '__main__':
args = get_args()
experiment = algo_registry[args.algo](args)
experiment.visualize()
| [
"boyuanchen@berkeley.edu"
] | boyuanchen@berkeley.edu |
2d2113c43a965b1556bcdf535ced30eea8d3734f | 46b5c1bc98678f02cbd39b6c814e6b32908a6c22 | /venv/bin/csvlook | c02dbd9fedc446b3516fcaab1177f4e2063e9e8e | [] | no_license | Peter-32/portofvirginiaapp | ea0aceedce6efe928f4c128fb4935f000048678f | e0cfdd379d9654d41b301a52bcd6d77aa08d4591 | refs/heads/master | 2022-11-07T15:13:51.111003 | 2019-07-24T05:15:57 | 2019-07-24T05:15:57 | 198,562,849 | 0 | 1 | null | 2022-10-08T03:46:30 | 2019-07-24T05:13:23 | Python | UTF-8 | Python | false | false | 304 | #!/Users/petermyers/Desktop/Code/test_pyinstaller2/venv/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from csvkit.utilities.csvlook import launch_new_instance
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(launch_new_instance())
| [
"peter@impactradius.com"
] | peter@impactradius.com | |
1bd639ff67bbc8cd8cc937c885b0d31a4cacaf7d | c5cdb85c122c32165a0a00428ab85c03bc5d8fa6 | /Week3/day2/tv_shows/application/migrations/0001_initial.py | 723c8528775c0927ca23fb7c84e04b09bf37b34a | [] | no_license | sadieBoBadie/Dec2020Python | 70f841aff0b816a0cbf5519418d0c6ce14b90729 | 595aeea4092c8962c8a7e08fa757a0b8ddc8c897 | refs/heads/main | 2023-02-01T15:28:25.885585 | 2020-12-19T02:46:48 | 2020-12-19T02:46:48 | 317,356,502 | 0 | 9 | null | null | null | null | UTF-8 | Python | false | false | 795 | py | # Generated by Django 2.2 on 2020-12-15 22:19
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Show',
fields=[
('id', models.AutoField(auto_... | [
"sflick@codingdojo.com"
] | sflick@codingdojo.com |
a0ff0eb4f6ab02c8d96e79c6f9123bfb69ca2e08 | fa0e61d9cf6ace4c3198724afa9ddbc15ac8cd1f | /qurry/constructs/define.py | 24b6ee3b84556563203e76a8f48fcec008ed292f | [
"MIT"
] | permissive | nguyenducnhaty/Qurry | aa338877b8f72394a0165bdc2ab8838ff6386e34 | 9766cc8ea19d438d3408080bf584faab12537789 | refs/heads/master | 2020-05-28T08:05:39.762862 | 2019-04-03T18:45:41 | 2019-04-03T18:45:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 712 | py | from ..definitions import update_definitions
from ..datatype import Datatype
from pprint import pprint
def process_type(body, kernel):
if len(body) == 1:
body = body[0]
head, *rest = body
if head in kernel.definitions and isinstance(kernel.definitions[head], Datatype):
return kernel.defini... | [
"lucassaldyt@gmail.com"
] | lucassaldyt@gmail.com |
71e45223c641fee198b9a3403e9340051a5e26a4 | d15eb98c00537b6303b3b9f396eac6df5af10f20 | /transformer_RC/eval.py | 26b907dcdd6ec297c83a09f7a4a46671b8ae6b75 | [] | no_license | fooSynaptic/transfromer_NN_Block | ab17d2ac5ecc04d3fd54407d72b8dc44c5671168 | 62c7769e6dc66de8185f29ecb5a7de4f3ceb3374 | refs/heads/master | 2023-04-04T01:28:13.066026 | 2019-11-22T02:11:25 | 2019-11-22T02:11:25 | 150,613,743 | 9 | 0 | null | 2023-03-24T22:46:39 | 2018-09-27T16:05:59 | Python | UTF-8 | Python | false | false | 5,632 | py | # -*- coding: utf-8 -*-
#/usr/bin/python3
import codecs
import os
import tensorflow as tf
import numpy as np
from hyperparams import rc_Hyperparams as hp
from data_load import load_vocabs, load_train_data, load_test_data, create_data
from train import Graph
#from nltk.translate.bleu_score import corpus_bleu
import a... | [
"hujiaxin@ajmide.com"
] | hujiaxin@ajmide.com |
33bf6b98e2e6b8bbde66d8196ef5407b2978efbb | 2073b98ec0f42c0cca08480cad534aa11fee6101 | /solution/src/SecondGo.py | 2402d26443d1b3a2382ed8295292545cf564cb1e | [] | no_license | chrisjdavie/ReverseShuffleMerge | 47c81fcdab26177676b0a82402bb61a2440c8027 | 184f09f7f83a11d4904874d91853dc4467f4f219 | refs/heads/master | 2021-01-10T13:43:48.666040 | 2016-01-02T15:13:22 | 2016-01-02T15:13:22 | 48,913,511 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,286 | py | '''
First go ran over the time limit, which isn't surprising as I brute
forced with permutations. Looking at this, there is a more elegant
solution, but it's not clear immediately how. But it's there.
Okay, this approach worked, but it's not the clearest what's going on.
Esentially, there are the merged counts and the... | [
"chris.d@theasi.co"
] | chris.d@theasi.co |
16db50922eb05c4853e1a5a7bf928ed0a8659684 | 3a4fbde06794da1ec4c778055dcc5586eec4b7d2 | /@lib/12-13-2011-01/vyperlogix/sitemap/reader.py | db72d9f10eac4984c687669739d3f543c9c1f55b | [] | no_license | raychorn/svn_python-django-projects | 27b3f367303d6254af55c645ea003276a5807798 | df0d90c72d482b8a1e1b87e484d7ad991248ecc8 | refs/heads/main | 2022-12-30T20:36:25.884400 | 2020-10-15T21:52:32 | 2020-10-15T21:52:32 | 304,455,211 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,192 | py | import re
import string
import sys
import httplib
import urllib2
from xml.dom import minidom
from vyperlogix.misc import _utils
__copyright__ = """\
(c). Copyright 2008-2014, Vyper Logix Corp., All Rights Reserved.
Published under Creative Commons License
(http://creativecommons.org/licenses/by-nc/3.0/... | [
"raychorn@gmail.com"
] | raychorn@gmail.com |
21406bbc518e376d68ec6a67b0ff2d8424741171 | 686d2e525b7cd7a792501309f251dbf6dcea7ef4 | /leetcode/dynamic programming/26.62 不同的路径.py | f04f16a4ae7089ade35d23be260e8a2168acc76d | [] | no_license | freemanwang/Algorithm | fa23c9c33c43f942e72d9d1828a95417e7c99575 | bb691c1afb460a382d7aaaa308e8b4e17f5bf4c5 | refs/heads/master | 2020-06-29T19:37:32.584724 | 2020-02-07T06:36:29 | 2020-02-07T06:36:29 | 200,605,658 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 772 | py | '''
一个机器人位于一个 m x n 网格的左上角 (起始点在下图中标记为“Start” )。
机器人每次只能向下或者向右移动一步。机器人试图达到网格的右下角(在下图中标记为“Finish”)。
问总共有多少条不同的路径?
说明:m 和 n 的值均不超过 100。
示例 1:
输入: m = 3, n = 2
输出: 3
解释:
从左上角开始,总共有 3 条路径可以到达右下角。
1. 向右 -> 向右 -> 向下
2. 向右 -> 向下 -> 向右
3. 向下 -> 向右 -> 向右
示例 2:
输入: m = 7, n = 3
输出: 28
'''
# 应用动态规划解决问题
#状态转移:走到(m,n) 只能由 (m-1,n)... | [
"121689123@qq.com"
] | 121689123@qq.com |
b2b21d3ee8516a7cfb2bf97d2d121a455ef2fad3 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03479/s210485900.py | 104cb0c9d70362d67521ce65fec1cbf0a4e8d9bf | [] | 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 | 301 | py | import sys
readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)
def main():
x, y = list(map(int, readline().split()))
ans = 0
c = x
while c <= y:
ans += 1
c <<= 1
print(ans)
if __name__ == '__main__':
main()
| [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
d8d63477b2da98c431cad1a9d38bd02193e100f4 | 9bb958a3b5ae3a083a265b37bc1f83fc2c41bdfd | /tests/test_api.py | cfdaa9bc9819e93aa32461dc45c32babf4eee411 | [] | no_license | chfw/Minion | 434ccd6042f8730151b6fdf711b6f9e0cd7f077d | 88093463de0ad4b30f63f7bc933c8dbcd13888da | refs/heads/master | 2020-12-03T04:07:55.727275 | 2017-06-29T20:57:26 | 2017-06-29T20:57:26 | 95,818,616 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,366 | py | import sys
import json
from nose.tools import eq_
from minion.app import create_app
PY2 = sys.version_info[0] == 2
class TestViews:
def setUp(self):
self.app = create_app()
self.client = self.app.test_client()
def test_api_run_view(self):
data = {
'command': 'ls -l'
... | [
"wangc_2011@hotmail.com"
] | wangc_2011@hotmail.com |
0c5be048707b2514b3ed824531d847aee604bf4b | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /benchmark/startCirq1993.py | 6838def910331cff05b9e13bcc3360a738377755 | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/QDiff | ad53650034897abb5941e74539e3aee8edb600ab | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | refs/heads/main | 2023-08-05T04:52:24.961998 | 2021-09-19T02:56:16 | 2021-09-19T02:56:16 | 405,159,939 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,775 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=4
# total number=32
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
from cirq.contrib.svg import SVGCircuit
# Symbols for... | [
"wangjiyuan123@yeah.net"
] | wangjiyuan123@yeah.net |
5ab5578bf208327a1eff085990fe8f1e60f3c230 | 05abb78c60a69422ae3e00a542bbd4573faf8174 | /exercicios-pythonBrasil/estrutura-de-decisao/ex4.py | af8c4d8e04260c01583f8f17167d8136b44e919b | [] | no_license | xuting1108/Programas-de-estudo | 72b812d52f5b130a95103c38dbe9e471dc5aa6f9 | 01fe21097055d69c2115cff3da2199429e87dead | refs/heads/master | 2022-10-20T17:06:14.517643 | 2019-04-08T11:16:12 | 2019-04-08T11:16:12 | 179,678,721 | 0 | 1 | null | 2022-10-09T13:13:57 | 2019-04-05T12:38:23 | Python | UTF-8 | Python | false | false | 228 | py | #Faça um Programa que verifique se uma letra digitada é vogal ou consoante.
letra = input('digite uma letra: ')
vogal = ['a','e','i','o','u']
if letra in vogal:
print('a letra é vogal')
else:
print('a letra é consoante') | [
"xuting1108@hotmail.com"
] | xuting1108@hotmail.com |
6f0e82c805b291ff0a194472a3145feebdb5cd8f | d0c0c46bade87640425b5587cc984f24f74cad24 | /entrofy/utils.py | 86f6959c8707d44b06c324229b95896f41e2c0f6 | [] | no_license | dhuppenkothen/entrofy | 4b3b28d66321ee29e2bfa9516cc2bf681b81ee7b | d0789a9f84147f623746efabb28721dd2dc4c141 | refs/heads/master | 2023-05-26T03:59:03.695720 | 2023-05-03T17:04:12 | 2023-05-03T17:04:12 | 43,324,813 | 83 | 26 | null | 2023-05-03T16:52:11 | 2015-09-28T20:21:10 | Jupyter Notebook | UTF-8 | Python | false | false | 861 | py | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''Utilities for entrofy'''
import numbers
import numpy as np
# The following is borrowed from scikit-learn v0.17
def check_random_state(seed):
"""Turn seed into a np.random.RandomState instance
If seed is None, return the RandomState singleton used by np.random... | [
"brian.mcfee@nyu.edu"
] | brian.mcfee@nyu.edu |
3208c332acc55b368ab94bdf44b3b9837d19ccc6 | 7298d1692c6948f0880e550d6100c63a64ce3ea1 | /catalog-configs/Vocab/oly_residue_feature_residue_range_granularity_term.py | 2a6871af85b0c4d5dfc6549841f414bf74e6de31 | [] | no_license | informatics-isi-edu/protein-database | b7684b3d08dbf22c1e7c4a4b8460248c6f0d2c6d | ce4be1bf13e6b1c22f3fccbb513824782609991f | refs/heads/master | 2023-08-16T10:24:10.206574 | 2023-07-25T23:10:42 | 2023-07-25T23:10:42 | 174,095,941 | 2 | 0 | null | 2023-06-16T19:44:43 | 2019-03-06T07:39:14 | Python | UTF-8 | Python | false | false | 6,309 | py | import argparse
from attrdict import AttrDict
from deriva.core import ErmrestCatalog, get_credential, DerivaPathError
from deriva.utils.catalog.components.deriva_model import DerivaCatalog
import deriva.core.ermrest_model as em
from deriva.core.ermrest_config import tag as chaise_tags
from deriva.utils.catalog.manage.u... | [
"carl@isi.edu"
] | carl@isi.edu |
2459f55cbfc596a0348544e1082025d1c74df70f | 5d22d9b2cb5cad7970c1055aeef55d2e2a5acb8e | /leetcode/medium/Single_Number_II.py | add9ece16433795ee1263f81466aec110f3a062b | [
"MIT"
] | permissive | shhuan/algorithms | 36d70f1ab23dab881bf1a15573fbca7b2a3f4235 | 2830c7e2ada8dfd3dcdda7c06846116d4f944a27 | refs/heads/master | 2021-05-07T14:21:15.362588 | 2017-11-07T08:20:16 | 2017-11-07T08:20:16 | 109,799,698 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,869 | py | # -*- coding: utf-8 -*-
"""
created by huash06 at 2015-04-14 09:08
Given an array of integers, every element appears three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?
本题目抄袭网上解答
http://blog.csdn.net/u011... | [
"shuangquanhuang@gmail.com"
] | shuangquanhuang@gmail.com |
5639785d939846e909c75cbee27aa23627cd0be5 | ff60aaabe366ebd8f60b8e0e66a86896553f32a3 | /3)printrepeatedterm.py | 6f2a348d23c6f7fac53e93f03f6698939d5cb112 | [] | no_license | ramyasutraye/Python-6 | cb2f55339f6b74dffe6f73551f3554703e17b673 | 1cc1c8a9f0045b72e1d55ef1bb3cf48d8df8612c | refs/heads/master | 2020-04-12T02:05:21.861754 | 2018-09-21T19:02:29 | 2018-09-21T19:02:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 329 | py | b=[]
c=[]
n=int(input("n"))
if(1<=n<=100000):
d = 0
for i in range(0,n):
a=int(input("a"))
b.append(a)
if(i==b[i]):
if(i>1):
c.append(i)
d=d+1
if(d>0):
for i in range(0,d):
print(c[i],end='')
else:
... | [
"noreply@github.com"
] | ramyasutraye.noreply@github.com |
1803103160982a7a1919f6e7222975837423e07b | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_74/906.py | 6098eb329012ba22538c600f690fc3242f5cc393 | [] | 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 | 1,750 | py |
f=open("A-large.in.txt","r")
seq=f.readlines()
f.close()
N=eval(seq[0])
resultats=[]
for i in range(1,N+1):
print("Case #"+str(i))
l=seq[i].split()
n=eval(l[0])
j=1
tabO=[]
tabB=[]
ordre=[]
while j!=len(l):
letter=l[j]
j=j+1
num... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
a0b9911f771263a3ccb57196cec783570a84af37 | a83bafc38b514a0339a5991be15870551ac49681 | /test/test_size.py | fa8c40e84c918eb4dedd5c56839a82898118cc61 | [] | no_license | bimdata/python-api-client | 4ec2f81e404ef88d3a7e4d08e18965b598c567a2 | c9b6ea0fbb4729b2a1c10522bdddfe08d944739d | refs/heads/master | 2023-08-17T13:38:43.198097 | 2023-08-09T12:48:12 | 2023-08-09T12:48:12 | 131,603,315 | 0 | 4 | null | 2022-10-10T15:21:26 | 2018-04-30T14:06:15 | Python | UTF-8 | Python | false | false | 850 | py | """
BIMData API
BIMData API is a tool to interact with your models stored on BIMData’s servers. Through the API, you can manage your projects, the clouds, upload your IFC files and manage them through endpoints. # noqa: E501
The version of the OpenAPI document: v1 (v1)
Contact: support@bimdata.io... | [
"infra@bimdata.io"
] | infra@bimdata.io |
7cd2ab7936c6d68d7f3f14fd20b81bad6a522aee | 4dd6a8d8024a72a3e2d8e71e86fd34888a149902 | /keras/keras31_GRU.py | 6f2d253b30f0ee9f5173859af80147f7d052dc83 | [] | no_license | KOOKDONGHUN/study | d483b125d349956b325bc5f4d99a4a95dd80ccbc | 517effbb19ddc820d53f0a6194463e7687467af6 | refs/heads/master | 2023-01-14T09:13:48.346502 | 2020-11-20T09:03:25 | 2020-11-20T09:03:25 | 259,818,381 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 887 | py | from numpy import array
from keras.models import Sequential
from keras.layers import Dense, LSTM, GRU
# 1. 데이터
x = array([[1,2,3],[2,3,4],[3,4,5],[4,5,6]]) #
x = x.reshape(x.shape[0], x.shape[1], 1) #
y = array([4,5,6,7]) #
print(x.shape) #
print(y.shape) #
# 2. 모델구성
model = Sequential()
model.add(GRU(17,acti... | [
"dh3978@naver.com"
] | dh3978@naver.com |
26efc3cce877f299cf32012575f07145b63c0430 | dda618067f13657f1afd04c94200711c1920ea5f | /scoop/user/views/sitemap.py | 56f977aedeaf09d8b4316a0d943c922d7c04de75 | [] | no_license | artscoop/scoop | 831c59fbde94d7d4587f4e004f3581d685083c48 | 8cef6f6e89c1990e2b25f83e54e0c3481d83b6d7 | refs/heads/master | 2020-06-17T20:09:13.722360 | 2017-07-12T01:25:20 | 2017-07-12T01:25:20 | 74,974,701 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 539 | py | # coding: utf-8
from django.conf import settings
from django.contrib.sitemaps import Sitemap
from scoop.user.models.user import User
class ProfileSitemap(Sitemap):
""" Sitemap des profils utilisateurs """
limit = getattr(settings, 'SITEMAPS_ITEMS_PER_PAGE', 10000)
# Getter
def items(self):
""... | [
"steve.kossouho@gmail.com"
] | steve.kossouho@gmail.com |
393ec2cbe1fca2ff890772f6098dac1b3cc965e2 | c397b704f6a18e5db90ef29325ee6d0564243c23 | /dashboard/templatetags/tag.py | 0ac21c9b270bdc07cb70bdcd725b394ffa58e0f5 | [] | no_license | Raza046/Learning-management-System | 47f112b3a05c3581675ff6d11f2bf95598b97b50 | 2bf29f2caff6247ca7a23cf041ca52f4f311b9b4 | refs/heads/master | 2023-02-23T14:42:27.815725 | 2021-01-29T10:25:55 | 2021-01-29T10:25:55 | 334,098,818 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 332 | py | from django import template
register = template.Library()
@register.filter
def to_str1(value1):
v = value1.split(":")[0]
print("Str1 --> " + str(v))
return int(v)
@register.filter
def last_str(value):
v2 = value.split(":")[1].split("-")[1]
print("Str2 --> " + str(v2))
retu... | [
"rulmustafa22@gmail.com"
] | rulmustafa22@gmail.com |
6b91fcb254bfed2355e297e9b6d8373cda8ba3cd | 1faf6ad07b7ed8c58577517803d7e26e97e71a7b | /setup.py | 31a093f80d58d10e4f455b5cf4c785619af955cc | [] | no_license | pizzapanther/Django-Permissions-Keeper | d6b668b1926d2c0df39617c1adacec2350a63114 | 3f77332f74d58c67464a38d960050dba31d50e17 | refs/heads/master | 2021-01-22T03:39:03.654842 | 2012-05-04T21:43:40 | 2012-05-04T21:43:40 | 4,229,019 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 510 | py | import sys
from setuptools import setup, find_packages
setup(
name = "permkeep",
version = '12.05.1',
description = "Easy way to keep group permissions in sync between Development and Production environments.",
url = "https://github.com/pizzapanther/Django-Permissions-Keeper",
author = "Paul Baile... | [
"paul.m.bailey@gmail.com"
] | paul.m.bailey@gmail.com |
220633df6985c7f48707704ceff0d82d9b9de024 | 9508879fcf1cff718f3fe80502baff8b82c04427 | /python_domain/strings/the_minion_game.py | 90bbaa4f8b053286f8a6493f0de4ace47d978aa8 | [] | no_license | davidozhang/hackerrank | e37b4aace7d63c8be10b0d4d2bffb4d34d401d55 | bdc40d6ff3e603949eb294bbc02a1e24a4ba5b80 | refs/heads/master | 2021-05-04T11:31:59.110118 | 2017-11-15T09:17:27 | 2017-11-15T09:17:27 | 47,906,672 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 647 | py | #!/usr/bin/python
VOWELS = set(['A', 'E', 'I', 'O', 'U'])
def main():
cons_indices, vowel_indices, cons_count, vowel_count = [], [], 0, 0
word = raw_input()
length = len(word)
for i in xrange(length):
cons_indices.append(i) if word[i] not in VOWELS else vowel_indices.append(i)
for j in cons... | [
"davzee@hotmail.com"
] | davzee@hotmail.com |
2c28c51ebc9ab2af80770363f29a38e35845b4eb | 987a68b9c196f39ba1810a2261cd4a08c35416a3 | /BitManipulation/477-total-hamming-distance.py | d72e1cdc9fb4e1437904f0b57379eaa8d1614906 | [] | no_license | xizhang77/LeetCode | c26e4699fbe1f2d2c4706b2e5ee82131be066ee5 | ce68f5af57f772185211f4e81952d0345a6d23cb | refs/heads/master | 2021-06-05T15:33:22.318833 | 2019-11-19T06:53:24 | 2019-11-19T06:53:24 | 135,076,199 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,043 | py | # -*- coding: utf-8 -*-
'''
The Hamming distance between two integers is the number of positions at which the corresponding bits are different.
Now your job is to find the total Hamming distance between all pairs of the given numbers.
Example:
Input: 4, 14, 2
Output: 6
Explanation: In binary representation, the 4 ... | [
"xizhang1@cs.stonybrook.edu"
] | xizhang1@cs.stonybrook.edu |
e514d3ebe05555c553230d7c7194e58ed12483ee | 735a315ea82893f2acd5ac141f1a9b8be89f5cb9 | /pylib/mdsplus/widgets/mdsplusonoff.py | e81302052652ef5f273b89179e660d88e9edca3e | [] | no_license | drsmith48/pppl-mdsplus-python | 5ce6f7ccef4a23ea4b8296aa06f51f3a646dd36f | 0fb5100e6718c8c10f04c3aac120558f521f9a59 | refs/heads/master | 2021-07-08T02:29:59.069616 | 2017-10-04T20:17:32 | 2017-10-04T20:17:32 | 105,808,853 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 846 | py | import gtk
import gobject
from mdspluswidget import MDSplusWidget
class MDSplusOnOff(MDSplusWidget,gtk.CheckButton):
__gtype_name__ = 'MDSplusOnOff'
__gproperties__ = MDSplusWidget.__gproperties__
def reset(self):
try:
self.set_active(not self.getNode().state)
except Exc... | [
"drsmith8@wisc.edu"
] | drsmith8@wisc.edu |
b0ad84988b762ee1b062b2341ef5f74ca5aa6e21 | beea74a2a1f2445b107af411197e8b6300e715e6 | /supervised_learning/0x01-classification/18-deep_neural_network.py | c0b59e9055452ecf800ba4ef9300a59b1bbc3e1d | [] | no_license | 95ktsmith/holbertonschool-machine_learning | 0240d8fa8523b06d3353c2bffa74205b84253be8 | 2757c8526290197d45a4de33cda71e686ddcbf1c | refs/heads/master | 2023-07-26T16:02:26.399758 | 2021-09-09T15:57:57 | 2021-09-09T15:57:57 | 310,087,776 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,595 | py | #!/usr/bin/env python3
""" Deep Neural Network """
import numpy as np
class DeepNeuralNetwork:
""" Class representing a deep neural network """
def __init__(self, nx, layers):
""" Init
nx is the number of input features
nx must be a positive integer
layers is a ... | [
"95ktsmith@gmail.com"
] | 95ktsmith@gmail.com |
6f030a71946122b5dda42fcbca479ce4f90632ec | 2614f223ad9aecddaca4358d51910e036bf0c2ff | /archived/asap/count_asap.py | 7981d5311e807c7e01362783a836046a0c2a45e3 | [] | no_license | cff874460349/tct | d615efb7485e5de3de66e2d02fff5ce9b33350a3 | 5bb4b16c4fad03a470243dd7db807a6a733d02e5 | refs/heads/master | 2021-03-14T00:55:51.556468 | 2019-06-28T03:56:54 | 2019-06-28T03:56:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,174 | py | # count the number of annotations in each category
import os
import csv
import collections
from xml.dom.minidom import parse
import xml.dom.minidom
import xlsxwriter
def scan_files(directory, prefix=None, postfix=None):
files_list = []
for root, sub_dirs, files in os.walk(directory):
for special_file i... | [
"yuli00986081@gmail.com"
] | yuli00986081@gmail.com |
d674af227aff1f94b7c80bd78974fba9c40fc93f | 32cf94c304c2c832595a28b49c7d9e0361d50950 | /test/re2/unicode_test.py | a88a3ad5a4bd5c1ae59908c3aef9b84135ee98f9 | [
"MIT"
] | permissive | oudream/ccxx | 11d3cd9c044c5f413ebc0735548f102a6f583114 | 26cecfb02e861ce6b821b33350493bac4793e997 | refs/heads/master | 2023-01-29T11:20:12.210439 | 2023-01-12T06:49:23 | 2023-01-12T06:49:23 | 47,005,127 | 46 | 11 | MIT | 2020-10-17T02:24:06 | 2015-11-28T01:05:30 | C | UTF-8 | Python | false | false | 6,720 | py | #!/usr/bin/python2.4
#
# Copyright 2008 The RE2 Authors. All Rights Reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
"""Unittest for the util/regexp/re2/unicode.py module."""
import os
import StringIO
from google3.pyglib import flags
from google3.testing... | [
"oudream@126.com"
] | oudream@126.com |
a6321682c22d998495daa7c30cf51f69ad8cfdcd | fbe0d8ceb2d753596d61f948939999499767abcd | /selectivechat_project/asgi.py | 07e8be94cc5c78874d1fc5c2106161cf867f541d | [
"MIT"
] | permissive | calixo888/selectivechat | ac0929ecbdb99e7e76fdbf8e5e037de20d418e64 | 2acbabe2355590986ea838348013d6ae7ddc6210 | refs/heads/master | 2022-05-03T02:40:23.329969 | 2020-10-25T23:18:26 | 2020-10-25T23:18:26 | 238,330,840 | 0 | 0 | MIT | 2022-04-22T23:00:33 | 2020-02-04T23:49:05 | JavaScript | UTF-8 | Python | false | false | 215 | py | import os
import django
from channels.routing import get_default_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "selectivechat_project.settings")
django.setup()
application = get_default_application()
| [
"calix.huang1@gmail.com"
] | calix.huang1@gmail.com |
1a68aeae4a81ff86a15a5dc3c037aa863c913cbc | a4cab19f70365d1d5fba31f7d93ecd315ccc6268 | /0x01-python-if_else_loops_functions/8-uppercase.py | 6b69d971831179f43a3140e150e24617959a7914 | [] | no_license | cmmolanos1/holbertonschool-higher_level_programming | c2154022cb868caccb7759812c292106c3654b41 | a58c4fb3659d520b4d78631c6a00c6301f79522d | refs/heads/master | 2020-07-22T23:54:31.275115 | 2020-04-11T00:46:00 | 2020-04-11T00:46:00 | 207,374,519 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 210 | py | #!/usr/bin/python3
def uppercase(str):
for i in range(len(str)):
char = ord(str[i])
if 97 <= char <= 122:
char = char - 32
print("{:c}".format(char), end='')
print()
| [
"926@holbertonschool.com"
] | 926@holbertonschool.com |
e89f9593303b5bb1ecd95e569dd8df7c44645932 | c2d2b22edac0b3c0b021ad28ad638dece18c2549 | /Python/Problems/Knapsack_Problem/solution.py | 208187de85cbc3228edbb5207e7f8c0bec3a934a | [] | no_license | dileepmenon/GeeksForGeeks | 248c69065d947f760f054dd4681063f21ca9be23 | 9b5f8955a02cae27e4677b2c3fa1578e6ad1c545 | refs/heads/master | 2021-05-23T05:24:58.876414 | 2017-12-04T05:58:47 | 2017-12-04T05:58:47 | 95,201,250 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 618 | py | #!bin/python3
def KP(w_l, p_l, W):
if not w_l:
return 0
if W == 0:
return 0
try:
return d[(p_l[0], len(p_l), W)]
except:
if W-w_l[0] >= 0:
s = max(p_l[0] + KP(w_l[1:], p_l[1:], W-w_l[0]),
KP(w_l[1:], p_l[1:], W))
else:
s ... | [
"dileepmenon92@yahoo.com"
] | dileepmenon92@yahoo.com |
91242f64a3dda3056dd978c5cd6248e143e8a1d6 | 3f642957664a470897b10b15ab29734bf53ffd9c | /config/settings/prod.py | 9bdb2635999a4209e918ea4ff182fcec05d179f1 | [] | no_license | birkoss/walleteur-api | da276de50f2d976bae9d749da98f80f3f6c45518 | bc16f2e5801ccddf90bff1cf1eb867c697fb9d71 | refs/heads/master | 2023-03-28T16:59:23.678986 | 2021-04-11T00:13:06 | 2021-04-11T00:13:06 | 354,413,671 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 585 | py | from .base import *
ALLOWED_HOSTS = ['api.walleteur.app']
DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': get_secret('DATABASE_NAME'),
'USER': get_secret('DATABASE_USER'),
'PASSWORD': get_secret('DATABASE_PASSWORD'),
'HOST': 'localhos... | [
"admin@birkoss.com"
] | admin@birkoss.com |
f6f3db537ccc13b21749242df396539920dc9396 | 3f2847f499878ea2a42cffea6f312ebe5fc14098 | /aiosmb/dcerpc/v5/common/even6/resultset.py | 46f925c1d14ad1eb0f7059f73a16c8520df23bf1 | [] | no_license | rvrsh3ll/aiosmb | a924b2d2be3e60b44a1522db52a1d2316fc3ba6f | a00a7d32f43e91746e74f5d72cd8f2ff4a4e8ea6 | refs/heads/master | 2023-06-07T15:33:14.701529 | 2023-05-30T16:02:35 | 2023-05-30T16:02:35 | 203,462,354 | 0 | 0 | null | 2023-05-31T07:45:14 | 2019-08-20T22:15:30 | Python | UTF-8 | Python | false | false | 1,258 | py |
import io
# https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-even6/762528ba-f36a-4d17-ba2b-0f0244a45f2f
class RESULT_SET:
def __init__(self):
self.totalSize = None
self.headerSize = None
self.eventOffset = None
self.bookmarkOffset = None
self.binXmlSize = None
self.eventData = None
self... | [
"info@skelsec.com"
] | info@skelsec.com |
e0e63584b29b38b3bbf8b8c4aae8e8e2e55f8837 | 13d222bc3332378d433835914da26ed16b583c8b | /tests/challenge90/test_challenge90.py | 888f1e85cb508d5239b468228512fd72a0fa717a | [] | no_license | mattjhussey/pemjh | c27a09bab09cd2ade31dc23fffac07374bea9366 | 2ebb0a525d2d1c0ee28e83fdc2638c2bec97ac99 | refs/heads/master | 2023-04-16T03:08:59.390698 | 2023-04-08T10:54:00 | 2023-04-08T10:54:00 | 204,912,926 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 199 | py | """ Tests for challenge90 """
from robber import expect
from pemjh.challenge90 import main
def test_challenge90():
""" Regression testing challenge90 """
expect(main()).to.eq(1217)
| [
"matthew.hussey@googlemail.com"
] | matthew.hussey@googlemail.com |
36362d5255285a4d5af86585e2249648aeeb2fe9 | eadde35af2b82fe3de7bc2f1cbc579af0a1a8816 | /bookstore/migrations/0005_auto_20180910_1302.py | aca3b8ea2a485fa9413c77f0abf75b52ecb84281 | [] | no_license | hdforoozan/Shop | 425a2371d2f96baca29db0948294edb31a4504b8 | 776d36149733a38bda26715bc3b16c03f0d53a9c | refs/heads/master | 2020-04-24T06:22:14.033290 | 2019-02-20T22:51:49 | 2019-02-20T22:51:49 | 171,762,724 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 416 | py | # Generated by Django 2.1 on 2018-09-10 08:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('bookstore', '0004_auto_20180909_1735'),
]
operations = [
migrations.AlterField(
model_name='book',
name='price',
... | [
"hdforoozan@gmail.com"
] | hdforoozan@gmail.com |
d08de54d6bc59e78633d8e6b4a520fc80e51009c | 909bb1b51213e47424ac9ccf3c3ca83764a5c04b | /semestre01/exercises_university_uri/1282.1.py | 27d805f65a4be6aee16bc016ef4043a431a27604 | [
"MIT"
] | permissive | alaanlimaa/impactaADS | 07e5d74c88ca0ec85c96960fadc2e22cbb67269b | 307d0b2c7831a5038184592afae7a825b2774498 | refs/heads/main | 2023-07-23T20:36:06.045907 | 2021-08-30T15:45:02 | 2021-08-30T15:45:02 | 387,860,398 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,280 | py | def txt(msg):
print('-' * len(msg))
print(msg)
print('-' * len(msg))
qtdCanais = int(input())
lista = []
for c in range(1, qtdCanais + 1):
num = input()
if ' ' in num:
numE = num.replace(' ', '-')
numE = numE.replace(';', ' ').split()
lista.append(numE)
else:
nu... | [
"alanlimabusiness@outlook.com"
] | alanlimabusiness@outlook.com |
60c39f0052992c31c1a7d737ffd1a39b574e54e5 | a742bd051641865d2e5b5d299c6bc14ddad47f22 | /algorithm/leetcode/greedy/02-无重叠区间.py | 74158138c6e570b1e20ea082b1bcb41d0e108c23 | [] | no_license | lxconfig/UbuntuCode_bak | fb8f9fae7c42cf6d984bf8231604ccec309fb604 | 3508e1ce089131b19603c3206aab4cf43023bb19 | refs/heads/master | 2023-02-03T19:10:32.001740 | 2020-12-19T07:27:57 | 2020-12-19T07:27:57 | 321,351,481 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 653 | py |
"""
给定一个区间的集合,找到需要移除区间的最小数量,使剩余区间互不重叠。
"""
from typing import List
class Solution:
def eraseOverlapIntervals(self, intervals: List[List[int]]) -> int:
def OverlapIntervals(intervals: List[List[int]]) -> int:
if not intervals: return 0
items = sorted(intervals,... | [
"525868229@qq.com"
] | 525868229@qq.com |
57938b46b9880b0ecc3b834e564bc5fe379aef20 | bd1281d7da02ace6b50aeb267b9a0cd8876eea11 | /badwolf/log/views.py | c31fb6ed5e556649a9a6c522df649952389c2021 | [
"MIT"
] | permissive | bosondata/badwolf | 6ebde680df6d3e7e7e0a7d295ce7cf6944a93d3d | c693785af101f68505769cd712bbf13e37423587 | refs/heads/master | 2023-03-08T04:51:36.911524 | 2019-07-11T02:44:22 | 2019-07-11T02:44:22 | 67,678,705 | 95 | 15 | MIT | 2018-12-19T09:05:49 | 2016-09-08T07:18:49 | Python | UTF-8 | Python | false | false | 3,039 | py | # -*- coding: utf-8 -*-
import os
import logging
import deansi
from flask import Blueprint, current_app, send_from_directory, request, abort, Response
from docker import DockerClient
logger = logging.getLogger(__name__)
blueprint = Blueprint('log', __name__)
FOLLOW_LOG_JS = '''<script type="text/javascript">
var ob... | [
"messense@icloud.com"
] | messense@icloud.com |
a4e5dd0c35c7a3cb860b83cb9f710b863ad829b1 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_206/1034.py | 37a51eca5168bb24b1adf080e12fe5ea12ac91a4 | [] | 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 | 856 | py | import os
input_file = open("input_large.in", "r")
output_file = open("output_large.out", "w")
cases = int(input_file.readline())
for i in range(cases):
params = input_file.readline().split(" ")
full_dist = float(params[0])
num_horses = int(params[1])
h_distances = []
h_speeds = []
... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
84cde06244cc011a3a7ae182d30b956383dc9e3b | 4cd4e5c39523f5889efb676414c5f4e58bc38991 | /point_clouds/aux.py | 1875110bb05ac37092d93f63297800da5c1efd46 | [
"MIT"
] | permissive | optas/geo_tool | 84a63c8dd9e9881234737a816a2a5b119e4368eb | 7eda787b4b9361ee6cb1601a62495d9d5c3605e6 | refs/heads/master | 2022-02-26T18:03:09.930737 | 2022-01-23T03:19:46 | 2022-01-23T03:19:46 | 67,737,034 | 7 | 3 | null | null | null | null | UTF-8 | Python | false | false | 3,712 | py | '''
Created on Aug 21, 2017
@author: optas
'''
import warnings
import numpy as np
from sklearn.neighbors import NearestNeighbors
from scipy.sparse.linalg import eigs
from numpy.linalg import norm
from .. fundamentals import Graph
from .. utils.linalg_utils import l2_norm
def greedy_match_pc_to_pc(from_pc, to_pc):
... | [
"optas@stanford.edu"
] | optas@stanford.edu |
2286d2a45d3515907c5f7eb59c5add02b7a6e530 | 76f59c245744e468577a293a0b9b078f064acf07 | /79.word-search.py | 632b1ff08a943956d5e83bffd8706832f9f80968 | [] | no_license | satoshun-algorithm-example/leetcode | c3774f07e653cf58640a6e7239705e58c5abde82 | 16b39e903755dea86f9a4f16df187bb8bbf835c5 | refs/heads/master | 2020-07-01T10:24:05.343283 | 2020-01-13T03:27:27 | 2020-01-13T03:27:27 | 201,144,558 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,863 | py | #
# @lc app=leetcode id=79 lang=python3
#
# [79] Word Search
#
from typing import List
# @lc code=start
class Solution:
def exist(self, board: List[List[str]], word: str) -> bool:
if not word:
return True
leading = word[0]
for y in range(len(board)):
for x in range(... | [
"shun.sato1@gmail.com"
] | shun.sato1@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.