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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8553ccab2ef84816d976db3b36128cfd4d0a8f03 | 1061216c2c33c1ed4ffb33e6211565575957e48f | /python-legacy/openapi_client/models/non_existing_stream_error_all_of.py | 8b7df46cf3402739766f71f1bfb77b51154b454e | [] | no_license | MSurfer20/test2 | be9532f54839e8f58b60a8e4587348c2810ecdb9 | 13b35d72f33302fa532aea189e8f532272f1f799 | refs/heads/main | 2023-07-03T04:19:57.548080 | 2021-08-11T19:16:42 | 2021-08-11T19:16:42 | 393,920,506 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,725 | py | # coding: utf-8
"""
Zulip REST API
Powerful open source group chat # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import p... | [
"suyash.mathur@research.iiit.ac.in"
] | suyash.mathur@research.iiit.ac.in |
3cf8834c1f34aa70c2180c5f1a8260a2790b3343 | dd2da087933d866f8bcd956eb73da5268820bafd | /0x08-python-more_classes/3-rectangle.py | a4b37f50669c79d4cece17794a7de57eee7809c1 | [] | no_license | JakeFC/holbertonschool-higher_level_programming | a523bf36a8ff6bdefab5b16e4ab3cdaccd99ad76 | b1cdd2055fd925bcd18a16bd0b6899280b006b3d | refs/heads/master | 2023-05-30T13:59:03.883499 | 2021-06-25T20:55:21 | 2021-06-25T20:55:21 | 361,943,712 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,305 | py | #!/usr/bin/python3
"""Module with Rectangle class definition"""
class Rectangle:
"""A class with private instance attributes:
width: int width of the object
height: int height of the object
"""
def __init__(self, width=0, height=0):
self.width = width
self.height = height
@pro... | [
"jacobchavera@yahoo.com"
] | jacobchavera@yahoo.com |
ab2606135e162835eb40b44f5a7846342eb4e9b4 | 576f7b951191d6095df8bc2691c8ad7045d55447 | /DataBase_Connection.py | c9624855b2c7b2118bff90c0cce29356aedd4d30 | [] | no_license | golam-saroar/Python_Learning | f555368420ef65ceef9a80349b9c3bae2c6842b9 | c077a8c2e5738b47cb301f07806af5a4c6714dff | refs/heads/master | 2021-09-22T09:31:35.907800 | 2018-09-07T09:14:25 | 2018-09-07T09:14:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 222 | py | import numpy
import pandas
myarray = numpy.array([[1, 2, 3], [4, 5, 6]])
rownames = ['a', 'b']
colnames = ['one', 'two', 'three']
mydataframe = pandas.DataFrame(myarray, index=rownames, columns=colnames)
print(mydataframe) | [
"golamsaroar89@gmail.com"
] | golamsaroar89@gmail.com |
a09f1677b632286cac7d4e7f663cd1088231b6da | e78154abbb8bacf5afccda9da371684cbeabad36 | /envs/ALPHA-POPEGO/lib/python2.5/site-packages/ipython-0.8.2-py2.5.egg/IPython/__init__.py | 53d43d4e926d9ac2bf283231ee180b25fa91ce7c | [
"BSD-3-Clause"
] | permissive | enterstudio/popego | 1a196fabc374c0f45764e5c74bd7752236424040 | 2d09e793d9d2f297139edb325b8a70ddda9b2705 | refs/heads/master | 2021-04-09T16:39:40.781634 | 2016-10-14T16:53:47 | 2016-10-14T16:53:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,806 | py | # -*- coding: utf-8 -*-
"""
IPython -- An enhanced Interactive Python
One of Python's nicest features is its interactive interpreter. This allows
very fast testing of ideas without the overhead of creating test files as is
typical in most programming languages. However, the interpreter supplied with
the standard Pytho... | [
"santisiri@gmail.com"
] | santisiri@gmail.com |
6943efac17751f069097c62e0dc3147fcaf6783b | 0b3012cd1acce15d0556d64b043b31418e84126b | /silk/silk/pipelines.py | 01ef604c522c550141ccdff285dbca0cc1bd8a8d | [] | no_license | madlad33/Slik_deals | 012d8cd9621531388ef308e26c92c55c9528b134 | ab7dfa8ddd5504abb4e5017c1d40148796392f62 | refs/heads/master | 2023-02-10T11:28:08.541749 | 2021-01-09T19:56:32 | 2021-01-09T19:56:32 | 328,235,253 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 358 | py | # Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html
# useful for handling different item types with a single interface
from itemadapter import ItemAdapter
class SilkPipeline:
def process_item(sel... | [
"tanmay.milky33@gmail.com"
] | tanmay.milky33@gmail.com |
7a5a9e2a8d9677bcd14a7cfd5d8b4cc5f808d1fb | 11c5950bfbcc949095721d0b20513fc1d4b987d5 | /behavioral/observer.py | c7dbfeca8241a0c8f5c7989ab06d6677250d30e3 | [] | no_license | lanzhiwang/python-patterns | 8d7af5e3f72c4419c325db019cd6384340a99dc1 | d819363c1b0a736f4e9e02f1bb0244bf2b5694fc | refs/heads/master | 2022-04-09T10:04:44.561907 | 2020-02-25T03:13:43 | 2020-02-25T03:13:43 | 114,206,479 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,652 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
http://code.activestate.com/recipes/131499-observer-pattern/
*TL;DR80
Maintains a list of dependents and notifies them of any state changes.
"""
from __future__ import print_function
class Subject(object):
def __init__(self):
self._observers = []
... | [
"hzhilamp@163.com"
] | hzhilamp@163.com |
42d9c02241092120e6b9012484d8ed2c4bfdc238 | a59d1faced9fe7348ca7143d2a8643e0ebad2132 | /pyvisdk/do/provider_connection_failed.py | 6b1f38ebabf1df0fe06948d4bfd8c5f50bb24151 | [
"MIT"
] | permissive | Infinidat/pyvisdk | c55d0e363131a8f35d2b0e6faa3294c191dba964 | f2f4e5f50da16f659ccc1d84b6a00f397fa997f8 | refs/heads/master | 2023-05-27T08:19:12.439645 | 2014-07-20T11:49:16 | 2014-07-20T11:49:16 | 4,072,898 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,039 | py |
import logging
from pyvisdk.exceptions import InvalidArgumentError
########################################
# Automatically generated, do not edit.
########################################
log = logging.getLogger(__name__)
def ProviderConnectionFailed(vim, *args, **kwargs):
'''This fault is thrown if failed to ... | [
"guy@rzn.co.il"
] | guy@rzn.co.il |
be0845cd276425aa497ef776f679763a35501653 | 3a1282aa30376b9c0bb5392c17d623cd91ceb522 | /pyopus/repacketizer.py | 0c1fd12e4a08b57d700970ee330a10a72ca7f9c3 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | xen0n/pyopus | d6a7445793b1c7d236c355fda12877b1dc915465 | ddcd5cb7f7e560728721e9c2d9c2bb5d3f37ec46 | HEAD | 2016-09-05T14:17:40.128941 | 2014-03-20T18:02:53 | 2014-03-20T18:02:53 | 17,854,673 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 588 | py | # -*- coding: utf-8 -*-
'''Opus repacketizer.'''
from __future__ import unicode_literals, absolute_import
__all__ = [
'OpusRepacketizer',
]
from . import base
from . import llinterface
class OpusRepacketizer(base.ManagedState):
'''Opus repacketizer.'''
def __init__(self):
# initia... | [
"idontknw.wang@gmail.com"
] | idontknw.wang@gmail.com |
39758c55b2a89553f3cb927cbde05b707cbc5c11 | f48251d90b9aa215749cfe5c68b4721b88630586 | /camtelvenv/bin/django-admin | bd062a32fd947db9f0ff4e6a370e0a4251ff7469 | [] | no_license | pacicap/file-import-export | f3b3d48b4a99952a1923923358c3381ccad8df2e | 163b958035d9e12e59d17f458cf25c96bdb951a0 | refs/heads/master | 2020-04-28T19:13:26.612562 | 2019-03-14T18:14:52 | 2019-03-14T18:14:52 | 175,504,707 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 302 | #!/root/django_app/csvupload/camtelvenv/bin/python3.6
# -*- coding: utf-8 -*-
import re
import sys
from django.core.management import execute_from_command_line
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(execute_from_command_line())
| [
"root@localhost.localdomain"
] | root@localhost.localdomain | |
7717f1a0d93b6d9f39b5052d467afa6abb569cac | 6c85b9f3e582c643c819a163b49566f57f8947ea | /nogo2/ext/gomill_py2/common.py | df0ae69671c7e7197ba3ed099376af6f6d30d956 | [
"MIT"
] | permissive | hayate891/LazyBaduk | bafe6d6addb67c1f7778c298135e9f998c6f47a4 | 03944edba24cc5a725311e570cda520797caf110 | refs/heads/master | 2020-05-17T20:03:58.644299 | 2019-04-22T20:39:00 | 2019-04-22T20:39:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,446 | py | """Domain-dependent utility functions for gomill.
This module is designed to be used with 'from common import *'.
This is for Go-specific utilities; see utils for generic utility functions.
"""
__all__ = [
"opponent_of", "colour_name", "format_vertex", "format_vertex_list",
"move_from_vertex"
]
_opponents ... | [
"alexanderjohntaylor@gmail.com"
] | alexanderjohntaylor@gmail.com |
b7b5ddb0776f5798f11bb2afededb1a483e0e406 | ec3fc6ac65da130a38f607459e645acddcd9d373 | /python/chapter 5/QR_Factor.py | 82ac4f70296b058ba24c172db4cc8df29416d471 | [] | no_license | jumbokh/appliedNum_learn | b0b681195a5fa71da241d7f99696d23b41d1b050 | f1e09243b4c32ece68fa02d1188da930e89b67ae | refs/heads/master | 2022-12-20T04:50:13.710508 | 2022-12-19T01:01:27 | 2022-12-19T01:01:27 | 149,553,434 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 424 | py | # QR_Factor module
import numpy as np
def QR_Factor(A):
(r,c) = np.shape(A)
Q = np.identity(r)
R= np.copy(A)
for i in range(r - 1):
x = R[i:,i]
e = np.zeros_like(x)
e[0] = np.linalg.norm(x)
u = x - e
v = u / np.linalg.norm(u)
Q_i = np.identity(r)
... | [
"jumbokh@gmail.com"
] | jumbokh@gmail.com |
4cd1465b2ed82647ed9a9156959235faf5807d37 | adc646a248ca0e599689af869999ddc2dec4a63d | /Python3/331.verify-preorder-serialization-of-a-binary-tree.py | 27afc7e0563e1c2753a3cebd353bd9a53849e45e | [
"MIT"
] | permissive | 610yilingliu/leetcode | fd3a5675932e7056641bd878afe36b55ad53490b | 3fd33092f53de25e8014c05af4ac3e6754f54e23 | refs/heads/master | 2023-04-27T22:22:27.103682 | 2023-04-14T16:33:40 | 2023-04-14T16:33:40 | 247,016,311 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 601 | py | #
# @lc app=leetcode id=331 lang=python3
#
# [331] Verify Preorder Serialization of a Binary Tree
#
# @lc code=start
class Solution(object):
def isValidSerialization(self, preorder):
"""
:type preorder: str
:rtype: bool
"""
stack = []
for node in preorder.split(','):... | [
"yilingliu1994@gmail.com"
] | yilingliu1994@gmail.com |
f5a93c7e50952a432c9481585588a0cfd44f9fb7 | 027b377ff73da7d8b94830e34240431d16e71132 | /multichat/routing.py | 7def4e7c35bea534fc9e540ea6f4560427a5d86b | [
"MIT"
] | permissive | suhailvs/channels-chat | 1e1d7ca07f42dc4b13af70d0aca1eac04f73508f | e5b7741b5c149defa6fdf875d9560ec8569da48c | refs/heads/master | 2021-06-19T22:23:05.191038 | 2021-02-12T01:53:40 | 2021-02-12T01:53:40 | 177,949,095 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,200 | py | from django.urls import path
from channels.http import AsgiHandler
from channels.routing import ProtocolTypeRouter, URLRouter
from channels.auth import AuthMiddlewareStack
from chat.consumers import ChatConsumer
# The channel routing defines what connections get handled by what consumers,
# selecting on either the ... | [
"suhailvs@gmail.com"
] | suhailvs@gmail.com |
4907f3a2f8e665a7348b5cfe0f008e4e458b9ef8 | b3e42025194b81680086d097fed9aa6c84bfce9a | /apps/lightrfp/forms.py | 7e7b5efc057ac477a45b50dba5a8fdaede0f9d98 | [
"MIT"
] | permissive | superdev999/ProvenBanking | 95c65698d9f3a552d04edfd4fd9d4469fb43a47f | 2153e9d737e2b235e502c848986ca35b6f310b8d | refs/heads/master | 2021-01-12T05:17:31.864890 | 2017-08-17T00:11:59 | 2017-08-17T00:11:59 | 77,897,989 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,339 | py | from django import forms
from phonenumber_field.formfields import PhoneNumberField
from med_social.forms.base import FieldsetMixin
from users.models import User
from vendors.models import RFP, Bid, Message
# TODO: move to utils, or replace with django bootstrap3
class BootstrapFormMixin(object):
def __init__(self... | [
"wanghaoming820@outlook.com"
] | wanghaoming820@outlook.com |
1a658dfd6ba93f958c7617c246ada294fbba5e14 | 0c1de73e0facac9ebe4bc320871b1b0c27ba68e3 | /CaptchaRecognition/utils.py | e62bf8accf7358ca84b68dd3a56024cd8893b013 | [
"MIT"
] | permissive | yuqj1991/cnn_ocr | 686c2d8b1c1d296ae61b537795432ace3d07e8c6 | 7b5245a3749a6c128b282fbdd6bf73c5202e37e0 | refs/heads/master | 2022-12-28T19:51:18.314533 | 2019-11-20T06:51:01 | 2019-11-20T06:51:01 | 221,857,789 | 3 | 1 | null | 2020-10-13T17:29:26 | 2019-11-15T06:21:01 | C++ | UTF-8 | Python | false | false | 2,408 | py | import torch
from torch.nn import functional
from torch.autograd import Variable
import numpy as np
def sequence_mask(sequence_length, max_len=None):
if max_len is None:
max_len = sequence_length.data.max()
batch_size = sequence_length.size(0)
seq_range = torch.range(0, max_len - 1).long()
seq_... | [
"tonny.yu@honeywell.com"
] | tonny.yu@honeywell.com |
70ca1497999cf5e3c08c933f437355e829974982 | 597f847f0bd2112e45ca50979acec403a5f969cf | /python/day20/code/03_context.py | a258eacad387a98a79293fd4c70e2ead5e158494 | [] | no_license | wangyuhui12/AID1804 | e5d26aa6d505655cd885784cc0645c9ea8323df5 | 7291fc9411b541d17e540dd829166e64887fd9f7 | refs/heads/master | 2022-09-11T23:10:47.631426 | 2022-08-03T09:01:13 | 2022-08-03T09:01:13 | 136,152,631 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 445 | py |
# 此示例示意环境管理器的定义及使用
class A:
def __enter__(self):
print("已进入with语句")
return self # 返回的对象将由 as 绑定
def __exit__(self, exc_type, exc_val, exc_tb):
print("已离开with语句")
# a = A() # 创建对象
with A() as a:
print("这是with语句内的一条语句")
# 已进入with语句
# 这是with语句内的一条语句
# 已离开with语句 | [
"noreply@github.com"
] | wangyuhui12.noreply@github.com |
4f004755b57e2358ad7ada66d8ee50b208489bb7 | 3e85618c79a1a934fec543e1327e772ca081a5b9 | /N4875.py | 04b0e9e627d3f7388cc517805069008d971c2b14 | [] | no_license | ghdus4185/SWEXPERT | 72d79aa4a668452327a676a644b952bab191c79b | 4dc74ad74df7837450de4ce55526dac7760ce738 | refs/heads/master | 2020-07-16T18:31:22.153239 | 2019-12-20T04:18:30 | 2019-12-20T04:18:30 | 205,843,190 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 811 | py | di = [-1, 0, 1, 0]
dj = [0, 1, 0, -1]
def dfs(si, sj):
global res
visited[si][sj] = 1
for i in range(4):
ni = si + di[i]
nj = sj + dj[i]
if 0 <= ni <= N - 1 and 0 <= nj <= N - 1 and cross[ni][nj] != 1 and visited[ni][nj] == 0:
if cross[ni][nj] == 3:
res =... | [
"ckdghdus@naver.com"
] | ckdghdus@naver.com |
86ab6f68891a6ea9521d43487397729518e68382 | 8857d4c31b09d90544d619e4897ba0f4d6a61add | /app/config/settings/local.py | ae97d8a52d691ac9a30aa6ccdd6cee3ca831fa40 | [] | no_license | gambler1541/mb-project | b4add8d446a5d349d064a92546c314dfd0ef7036 | 42f7233d239f6ab34f977694770af65a9316d911 | refs/heads/master | 2022-12-16T22:14:56.754511 | 2019-01-26T13:47:56 | 2019-01-26T13:47:56 | 152,036,644 | 2 | 0 | null | 2022-12-08T01:17:00 | 2018-10-08T07:29:39 | JavaScript | UTF-8 | Python | false | false | 363 | py | from .base import *
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
INSTALLED_APPS += [
'django_extensions',
]
ALLOWED_HOSTS = []
WSGI_APPLICATION = 'config.wsgi.local.application'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.p... | [
"gambler1541@gmail.com"
] | gambler1541@gmail.com |
9b913b90d635e20eaf537d7086e47076ace62aa6 | 64bf39b96a014b5d3f69b3311430185c64a7ff0e | /intro-ansible/venv3/lib/python3.8/site-packages/ansible_collections/ansible/windows/plugins/modules/win_group.py | 272652bc686b73ca4bde84bf787e79b82ba87620 | [
"GPL-3.0-only",
"GPL-3.0-or-later",
"MIT"
] | permissive | SimonFangCisco/dne-dna-code | 7072eba7da0389e37507b7a2aa5f7d0c0735a220 | 2ea7d4f00212f502bc684ac257371ada73da1ca9 | refs/heads/master | 2023-03-10T23:10:31.392558 | 2021-02-25T15:04:36 | 2021-02-25T15:04:36 | 342,274,373 | 0 | 0 | MIT | 2021-02-25T14:39:22 | 2021-02-25T14:39:22 | null | UTF-8 | Python | false | false | 1,142 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2014, Chris Hoffman <choffman@chathamfinancial.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
DOCUMENTATION = r'''
---
module: win_group
short_description: Add and remove local groups
description:
- Add a... | [
"sifang@cisco.com"
] | sifang@cisco.com |
7bf869d075e9c136b6db33eea370422514cd369a | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03435/s873980811.py | f358f2b992a39cda3b5ab2a0df44453835663b3f | [] | 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 | 417 | py | C = [list(map(int, input().split())) for _ in range(3)]
Dif_H = [[] for _ in range(3)]
Dif_V = [[] for _ in range(3)]
for i in range(3):
Dif_H[i] = [C[i][0] - C[i][1], C[i][1] - C[i][2], C[i][2] - C[i][0]]
for i in range(3):
Dif_V[i] = [C[0][i] - C[1][i], C[1][i] - C[2][i], C[2][i] - C[0][i]]
if Dif_H[0] == ... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
13fef04732a43270ac0595b933e727792a88e9e5 | 80760d4c8a6b2c45b4b529bdd98d33c9c5509438 | /Practice/atcoder/ABC/136/src/_damec.py | 9124c56207d15a6b87c806f71cec38449c32876c | [] | no_license | prrn-pg/Shojin | f1f46f8df932df0be90082b475ec02b52ddd882e | 3a20f1122d8bf7d95d9ecd205a62fc36168953d2 | refs/heads/master | 2022-12-30T22:26:41.020473 | 2020-10-17T13:53:52 | 2020-10-17T13:53:52 | 93,830,182 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 832 | py | # 単調非減少の意味は知らんが、sample2を見る限り、全部高さはダメなのだろう
# 最初と最後が1か、単調減少だと実現不可能
# ん?ということは最後が1以外は全部可能?
# -> ダメでした
# よく呼んだら1度ずつって書いてあるしアホだった 二回回す
# ダメだった 3回回す
# ->ダメでした
n = int(input())
arr = list(map(int, input().split()))
used = [False for _ in range(n + 1)]
arr.insert(0, arr[0])
for i in range(1, n + 1):
if arr[i] < arr[i - 1... | [
"h4l@yahoo.ne.jp"
] | h4l@yahoo.ne.jp |
327d60178e61a319150b500f3f7ad22bd7f4f875 | be51250bcf59e1b47ed417c45e203c50aa233aae | /textcombat/apps/importer/accountimport.py | 6100ec927be763d096cebe09a4edf8bd6569ff1a | [] | no_license | shoredata/dojo-python | 4f064c76632bf94a385bb9f552562eb5640398b2 | e7b7a542fa086088252ce92257f37c4b5eedd0c4 | refs/heads/master | 2020-05-02T22:07:31.547469 | 2019-03-28T17:44:06 | 2019-03-28T17:44:06 | 178,242,426 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 224 | py | import datetime
import bcrypt
import random
import string
from decimal import *
from .models import User, Account, Delivery, Truck, Location, DataImport
def importSDRecord(sRecord, lRecordNumber, sSDFile):
return False | [
"31630233+shoredata@users.noreply.github.com"
] | 31630233+shoredata@users.noreply.github.com |
7c3f7372304ba5029354a1ff9b23236eef627f77 | e6d80486781ae5e9ca24e15bfe1b1b2983e91a9f | /dp/Solution_70.py | ade68a1041cf3d2c189512f5a0096690504c9c4a | [] | no_license | wxyBUPT/leetCode.py | 49f1c8d4b51767b7a7b04c7ea230ea78769ccc36 | e5f7b70bba6aad7606bdf320a34352d090cf74e8 | refs/heads/master | 2021-01-11T10:33:10.621898 | 2017-08-23T05:58:32 | 2017-08-23T05:58:32 | 76,153,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 805 | py | #coding=utf-8
__author__ = 'xiyuanbupt'
# e-mail : xywbupt@gmail.com
'''
70. Climbing Stairs Add to List QuestionEditorial Solution My Submissions
Total Accepted: 144677
Total Submissions: 375910
Difficulty: Easy
Contributors: Admin
You are climbing a stair case. It takes n steps to reach to the top.
Each time you... | [
"746451950@qq.com"
] | 746451950@qq.com |
cc34c81e7d6790392b7ada67954ba0ab86307af1 | d3720c1848fb69a05121fcd378a12a6d1921f303 | /4_LEETCODE/9_Greedy/343_整数拆分.py | 6ab6a640cdaa939446889ae5a5d9fd5bf349caa2 | [] | no_license | fzingithub/SwordRefers2Offer | 32a44e87c178bafc554108f1d1e479e18b0ee028 | 57f303aa6e76f7c5292fa60bffdfddcb4ff9ddfb | refs/heads/master | 2023-04-08T09:35:02.082121 | 2023-03-28T00:06:00 | 2023-03-28T00:06:00 | 219,700,616 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,039 | py | class Solution:
def integerBreak(self, n:int)->int:
'''
dp[i] 代表整数i的最大积拆分
dp[i] = max(dp[i-j] * dp[j]) j=1_最短回文串.py,...,i-1_最短回文串.py.
dp[0-3] = 0, 1_最短回文串.py, 2, 3
res = dp[-1_最短回文串.py]
'''
dp = [0,1,2,3]
if n<2:
return -1
elif ... | [
"35060424+fzingithub@users.noreply.github.com"
] | 35060424+fzingithub@users.noreply.github.com |
ceb89a2524149622eca7648bb95317bee97197f0 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_211/246.py | 08f7f3f4715dfb724e2e39437790ee15fa93d6d6 | [] | 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,096 | py | # Imports
# Constants
DEBUG = True
f_name = 'C-small-1-attempt0.in'#'C-large.in'#'test.in'#
f2_name = 'C.out'
with open(f_name) as f:
with open(f2_name,'w') as f2:
T = int(f.readline()) # Discard first line
for i in range(1, T+1):
result = ''
# Do the proces... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
2c8eb5c55d2c15d6cec714ef7371840723d1d85b | fa4d4455159ad2d9e7e057388e2fa45a2333928b | /Machine_Learning/iris/decision_tree_knn.py | 7ad54fb24849d1c48b97cda53dc9a5cba390daa6 | [] | no_license | shreyash05/python_programs | b492e6fbeba7bc8a31caf72dd60f3984ff16e6f0 | 74b4f3ee15a7221d03816f7ba831d59bec7bf7ff | refs/heads/main | 2023-04-25T11:15:44.868634 | 2021-05-20T12:55:54 | 2021-05-20T12:55:54 | 356,513,494 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,232 | py | from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier
from sklearn.metrics import accuracy_score
from sklearn import tree
def MarvellousDecision(data_train, data_test, target_train,target_test):
cobj = tree.DecisionTree... | [
"noreply@github.com"
] | shreyash05.noreply@github.com |
d9ff6789581d71bb868a262cf5b36fcccc9eda56 | 58ffc3d672b89d3bdb7249a2717be22397fcf927 | /PatTools/python/electrons/electronSystematics_cfi.py | 4ebe7edffa28601cd15f537762a722af84bd2892 | [] | no_license | dntaylor/FinalStateAnalysis | b9d79aceaf5a8ac0f658ab8bf121ab8c02d50327 | c138aca6cb19e36a12a2155dd2825e38c39f077f | refs/heads/miniAOD_dev_74X | 2020-12-29T00:25:40.055087 | 2016-01-28T20:13:42 | 2016-01-28T20:13:42 | 14,871,685 | 0 | 1 | null | 2016-08-21T21:14:16 | 2013-12-02T19:00:51 | Python | UTF-8 | Python | false | false | 252 | py | import FWCore.ParameterSet.Config as cms
electronSystematics = cms.EDProducer(
"PATElectronSystematicsEmbedder",
src = cms.InputTag("fixme"),
nominal = cms.double(1.0),
eScaleUp = cms.double(1.06),
eScaleDown = cms.double(0.94),
)
| [
"evan.friis@cern.ch"
] | evan.friis@cern.ch |
2d8c68c578ae6e4a803c2737ba7c8f9a13f60c56 | 1dcea2a511f14a43701994f6a7785afd21a20d74 | /Algorithm/217_ContainsDuplicate.py | 85ec6e19d830ef2f89c77923934fce94b3747dc2 | [] | no_license | lingtianwan/Leetcode2 | 66031e256a2928c6197516f83f14748c52e91b8c | 80a604cc09d5d2d62dd05157d8b829de675e4404 | refs/heads/master | 2021-01-13T11:17:18.238465 | 2017-02-09T01:43:38 | 2017-02-09T01:43:38 | 81,395,927 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 536 | py | # Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every element is distinct.
class Solution(object):
def containsDuplicate(self, nums):
"""
:type nums: List[int]
... | [
"lingtian.wan@gmail.com"
] | lingtian.wan@gmail.com |
0d2ed034bab77ac7e9a4a381f3a39d841654813e | 14566715c2e75d870d745b52b1d4c141833a296d | /tests/trb_syntax_french.py | 6678673e4a8aa6462e743797eae020155f1a0fbd | [
"MIT"
] | permissive | eprparadocs/friendly-traceback | 17036280e00d4d5da018a0ea3674e10536d3556c | b8038c4f346e75c040dd3f90d5eb5c6e318a2b31 | refs/heads/master | 2020-09-28T20:37:11.750593 | 2019-12-08T22:59:23 | 2019-12-08T22:59:23 | 226,860,086 | 1 | 0 | MIT | 2019-12-09T11:55:50 | 2019-12-09T11:55:50 | null | UTF-8 | Python | false | false | 2,333 | py | """Creates a version of traceback_fr.rst to insert in the documentation.
"""
# When creating a new translation, you need to:
# 1. Make a copy of this file
# 2. Change the value of LANG as well as 'intro_text' so that they reflect the
# appropriate language
# 3. Change the first line of this file so that the name of... | [
"andre.roberge@gmail.com"
] | andre.roberge@gmail.com |
aba891dba0ada0ae5ee4c7446b94b8cca251664c | 81b438781ecc307225fcc6141238f8a8ef03bd64 | /Project/src/Modules/Core/Utilities/_test/test_coordinate_tools.py | 3e6c4a1321e1cf132d70ff0e3d19cc9092dee551 | [] | permissive | DBrianKimmel/PyHouse | b7d61be4dc6ce9e3332228a6c633e81fdfd8a908 | a100fc67761a22ae47ed6f21f3c9464e2de5d54f | refs/heads/develop | 2021-01-23T09:30:08.722975 | 2020-02-29T16:30:08 | 2020-02-29T16:30:08 | 4,125,178 | 3 | 1 | MIT | 2020-07-19T22:07:18 | 2012-04-24T13:53:33 | Python | UTF-8 | Python | false | false | 1,987 | py | """
@name: Modules/Core/Utilities/_test/test_coordinate_tools.py
@author: D. Brian Kimmel
@contact: d.briankimmel@gmail.com
@copyright: 2016-2019 by D. Brian Kimmel
@date: Created on Jun 21, 2016
@licencse: MIT License
@summary:
Passed all 5 tests - DBK 2016-11-22
"""
__updated__ = '2019-09-07'... | [
"d.briankimmel@gmail.com"
] | d.briankimmel@gmail.com |
61ad042aff8124be54e32f5b1bd2d5a7e5d323f7 | 3e8dfa786b7f68ac4ffbc5154448dc4f479d27be | /爬虫项目实例/BaiduStocks/BaiduStocks/settings.py | b5173b18870dea4eb956e1312f7d129447254f7b | [] | no_license | SmallSir/Python_ | a5201cda762af8fe54a74f368eb140d354ce84d6 | 93367667d74bc29cfba80239334e6c3b3fa604ca | refs/heads/master | 2021-09-07T03:25:57.072044 | 2018-02-16T15:21:32 | 2018-02-16T15:21:32 | 110,565,596 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,466 | py | # -*- coding: utf-8 -*-
# Scrapy settings for BaiduStocks project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
# http://scrapy.readthedocs.org/en/la... | [
"280690956@qq.com"
] | 280690956@qq.com |
40f1f3061184ad0a3037124135ad8b24e80e9bb5 | b4644f3dcb7dc999508b6c614f92daa746723e8d | /transaction_fix.py | 25cf528d619d9c55a0992d2dfe553d05339deab5 | [] | no_license | morgantxrx/txrx.org | 54bbdf945692239a725dad569e6c2a06af068ea0 | 4786ea8ba7cd4db42a70a2e43156ffdb1da91d21 | refs/heads/master | 2023-03-29T06:17:05.709760 | 2019-09-04T02:30:38 | 2019-09-04T02:30:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,859 | py | import django,os; os.environ['DJANGO_SETTINGS_MODULE'] = 'main.settings';django.setup()
from django.http import QueryDict
from course.models import Enrollment
from drop.models import Order, OrderPayment
from lablackey.utils import latin1_to_ascii
from paypal.standard.ipn.models import PayPalIPN
from decimal import D... | [
"chris@lablackey.com"
] | chris@lablackey.com |
b79b2fb3109233ab1fd0c7435e52a7dc0a900955 | bad686ba27539a3d3286418cc3ebf2aa80ae4958 | /src/robots/display-ajusta-bot/rotary-encoder-display-test.py | 689e3f2d5e8fefc1ef7ec9bb6ad9950f70757e33 | [] | no_license | AaryaBatchu/micropython | f0a31b579b3a998586f26b92036875c93588eca7 | aef7d33937352e9ab6f9615bfc5bf9aa1a9bee57 | refs/heads/main | 2023-08-19T13:33:15.006432 | 2021-10-23T19:06:26 | 2021-10-23T19:06:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,792 | py | # Rotary Encoder Display Test
# I am getting ocassional errors
# Traceback (most recent call last):
# File "rotary.py", line 35, in rotary_change
# RuntimeError: schedule queue full
from rotary import Rotary
from utime import sleep
from machine import Pin
import ssd1306
# display setup
WIDTH = 128
HEIGHT = 64
clock=... | [
"dan.mccreary@gmail.com"
] | dan.mccreary@gmail.com |
7be404744378e27c9b6134c3c06d59c9c712683d | f60824fa9b9560afce6063b5027fe83a090b231b | /S08/module_structure/geom/shapes.py | 372125476225804f392fb7cd31b4948334701ec6 | [] | no_license | pymft/mft-04 | 6bc22a3bf53c3504ed37627015d0a7af176ecdea | a0be038cc0d3df7dde1338fa36e8f16344b86b35 | refs/heads/master | 2020-05-21T05:33:47.672812 | 2019-08-09T08:44:47 | 2019-08-09T08:44:47 | 185,924,706 | 4 | 7 | null | null | null | null | UTF-8 | Python | false | false | 325 | py | from . import base
class Rectangle(base.Geometry):
def __init__(self, w: float, h: float):
self.width = w
self.height = h
class Square(Rectangle):
def __init__(self, a: float):
super().__init__(a, a)
class Circle(base.Geometry):
def __init__(self, r: float):
self.radius... | [
"naeini.v@gmail.com"
] | naeini.v@gmail.com |
3b1eb6cccca6fa116d4d9cdffc8830f32130883d | 4562c825c45ddf8d5dd27f827ebc9fe2871c92f9 | /accounts/forms.py | 1f6daea5ab59e0fefe66453d72aefa7f9f597aa3 | [] | no_license | naeem23/To-let | 88a6112b1958caa6346623f3e82fe38dc5623991 | 3e6b92791e6c0b4ccd6df63afc6ae910adc391bd | refs/heads/master | 2020-07-01T05:14:53.687253 | 2019-08-07T13:42:27 | 2019-08-07T13:42:27 | 201,058,366 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,124 | py | from django import forms
from django.contrib.auth.models import User
from django.contrib.auth import authenticate
import re
class SignupForm(forms.Form):
username = forms.CharField(max_length=12, required=False, widget=forms.TextInput(
attrs={'class':'form-control', 'placeholder': 'Username'}))
email = form... | [
"sddqnaeem@gmail.com"
] | sddqnaeem@gmail.com |
4be73c197b522ea897e94fe202e2fb6b4ccab44d | 6fcfb638fa725b6d21083ec54e3609fc1b287d9e | /python/ergonomica_ergonomica/ergonomica-master/ergonomica/lib/lang/pipe.py | dfc39ba1a8fe8853ebec7595865bdaa873b100a1 | [] | no_license | LiuFang816/SALSTM_py_data | 6db258e51858aeff14af38898fef715b46980ac1 | d494b3041069d377d6a7a9c296a14334f2fa5acc | refs/heads/master | 2022-12-25T06:39:52.222097 | 2019-12-12T08:49:07 | 2019-12-12T08:49:07 | 227,546,525 | 10 | 7 | null | 2022-12-19T02:53:01 | 2019-12-12T07:29:39 | Python | UTF-8 | Python | false | false | 1,868 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
[lib/lang/pipe.py]
Lexer module. Contains tokenize().
"""
# why is this a thing?
# pylint: disable=too-few-public-methods
# pylint: disable=super-init-not-called
import re
from ast import literal_eval
class Pipeline(object):
"""An Ergonomica pipeline object."""
... | [
"659338505@qq.com"
] | 659338505@qq.com |
558827378f39d579ba01a9a76648b4c932874d28 | 2417bf83ee94b98c3cd662b0f599a3531a1691b4 | /catalog/utilities.py | 3e68e33f8c88db82207c32be93ed6055d9d254ec | [] | no_license | dmhburke/dbDevSiteGIT | 8a67a0d01abda7760f0436f5f6a51752962b9588 | 9d5b3b87e33c9e8584a75938dcf3abc67d85dea9 | refs/heads/master | 2022-11-30T17:17:58.006400 | 2020-03-23T20:59:33 | 2020-03-23T20:59:33 | 230,835,423 | 0 | 0 | null | 2022-11-22T04:56:10 | 2019-12-30T02:45:59 | Python | UTF-8 | Python | false | false | 1,109 | py | from PIL import Image, ExifTags
def rotate_image(filepath):
dev_test = "On"
if dev_test == "Off":
try:
image = Image.open(filepath)
for orientation in ExifTags.TAGS.keys():
if ExifTags.TAGS[orientation] == 'Orientation':
break
exif... | [
"dmhburke@gmail.com"
] | dmhburke@gmail.com |
139c5894ddda1af06fca18944db4f64e0d723307 | 0ba1743e9f865a023f72a14d3a5c16b99ee7f138 | /problems/test_0447.py | 5742eebc31e9aba5b23ef627551f6b6c9fd41c96 | [
"Unlicense"
] | permissive | chrisxue815/leetcode_python | d0a38a4168243b0628256825581a6df1b673855c | a33eb7b833f6998972e5340d383443f3a2ee64e3 | refs/heads/main | 2022-06-20T15:09:27.221807 | 2022-06-02T21:55:35 | 2022-06-02T21:55:35 | 94,590,264 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 899 | py | import unittest
import collections
class Solution:
def numberOfBoomerangs(self, points):
"""
:type points: List[List[int]]
:rtype: int
"""
ret = 0
distances = collections.Counter()
for a in points:
for b in points:
dx = a[0] - b[0... | [
"chrisxue815@gmail.com"
] | chrisxue815@gmail.com |
c517da24a9e2dfe418a3b7d7cbd64867ca5d774e | 3bda645720e87bba6c8f960bbc8750dcea974cb0 | /data/phys/fill_6146/xangle_150/ZeroBias/input_files.py | d6bb91bbf4bc8a03783c4895974302542cd8a499 | [] | no_license | jan-kaspar/analysis_ctpps_alignment_2017_preTS2 | 0347b8f4f62cf6b82217935088ffb2250de28566 | 0920f99080a295c4e942aa53a2fe6697cdff0791 | refs/heads/master | 2021-05-10T16:56:47.887963 | 2018-01-31T09:28:18 | 2018-01-31T09:28:18 | 118,592,149 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 207 | py | import FWCore.ParameterSet.Config as cms
input_files = cms.vstring(
"root://eostotem.cern.ch//eos/totem/data/ctpps/reconstruction/2017/preTS2_alignment_data/version1/fill6146_xangle150_ZeroBias.root"
)
| [
"jan.kaspar@cern.ch"
] | jan.kaspar@cern.ch |
fb1901d4e36b73ed200ebf94655c27e582fed8bb | 80e83dd69395312db092f7b0277310a29afb95b6 | /untitled1/Request/RequestTest1.py | fd0d2c915e3f87130f7eb29406a0221287d540b1 | [] | no_license | yif-zhu/Python-Project | 3a102695a7eab2e149e260ccee955de84685b6cb | d55edb652d66e6694a120eb329cd04abba57ba1e | refs/heads/master | 2023-01-21T00:59:27.743845 | 2020-12-04T08:42:56 | 2020-12-04T08:42:56 | 299,492,449 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,077 | py | import urllib.request
import time
import json
import re
import os
import requests
#13位时间戳转换时间格式
def getDateFormat(timeInt):
timeStamp = float(timeInt / 1000)
timeArray = time.localtime(timeStamp)
otherStyleTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
return otherStyleTime
#获取文件
def getFile(url,f... | [
"yif_zhu@163.com"
] | yif_zhu@163.com |
9cc3c17f5bed57a07440c04193827e173be46100 | 0bfa9ec9c6083b24ae8e13193213a25f03633e43 | /ranking/management/modules/yandex.py | a2a59998f0a107c7173690ff756bdb66180d079c | [
"Apache-2.0"
] | permissive | armedbeast/clist | 56649e73d91bdbf18ceba84dae597dc27532212a | 0d0d4e291c9b73814eded5ff0c4c97ea4c7a02a2 | refs/heads/master | 2023-07-17T12:41:09.975214 | 2021-08-29T02:35:18 | 2021-08-29T02:35:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,921 | py | # -*- coding: utf-8 -*-
import os
import re
from collections import OrderedDict
from urllib.parse import urljoin
from ranking.management.modules.common import REQ, BaseModule, parsed_table
from ranking.management.modules.excepts import ExceptionParseStandings
class Statistic(BaseModule):
def __init__(self, **kw... | [
"nap0rbl4@gmail.com"
] | nap0rbl4@gmail.com |
a51730487ebfbfea36193c396951b02d92d39cfa | be87299f26acd73d2a6f6ac47092483e2ff28b3d | /thenewboston_node/business_logic/tests/test_transfer_request.py | a5c675b4ac0218f593fa74d884ada46e64f35d3c | [
"MIT"
] | permissive | mayassalman/thenewboston-node | 8cbd0111b63b7c1b84b1b1e8fa0595951af171da | 65273504ae82dea65db62454f7f3496fc6f4cb70 | refs/heads/master | 2023-03-30T19:07:16.294333 | 2021-04-02T19:38:53 | 2021-04-02T19:38:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,957 | py | import copy
from unittest.mock import patch
import pytest
from thenewboston_node.business_logic.blockchain.mock_blockchain import MockBlockchain
from thenewboston_node.business_logic.exceptions import InvalidMessageSignatureError, ValidationError
from thenewboston_node.business_logic.models.transaction import Transac... | [
"dmugtasimov@gmail.com"
] | dmugtasimov@gmail.com |
bedaa2e51adf8cbc9a77a607c100682dad24c3f9 | c67a5cf0fd97301f768992cbc535ce93bda73534 | /produccion/migrations/0002_planta_stock.py | 0d439bfbb8134d9fdb9e27f9b11ca49f110c2b4f | [] | no_license | ryujiin/lovizdelcarpio | cb4cbd50fec2d1e26e585151507bc918ad590112 | b29bd17ae1f570917c2e8ac4766a59f2a5265106 | refs/heads/master | 2022-07-22T06:10:35.443531 | 2015-02-26T17:01:08 | 2015-02-26T17:01:08 | 29,265,283 | 0 | 0 | null | 2022-07-07T22:51:05 | 2015-01-14T20:55:11 | JavaScript | UTF-8 | Python | false | false | 433 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('produccion', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='planta',
name='stock... | [
"ryujiin22@gmail.com"
] | ryujiin22@gmail.com |
497adddd751fbdcd4e477cc534921db104f74481 | 93f81597e6d8bfb69084d4a2f56a0420305103ea | /atcoder/abc/050/d.py | 0b80b89152928983ebd5fed30cb9160fdd449bdb | [] | no_license | himkt/problems.2019 | 94405abc8301ab60d6240219219cf741ce10827e | e2c9cda0199df37cc9cbac55ca10fe4092fa82d2 | refs/heads/master | 2022-11-26T03:49:46.262568 | 2020-08-03T14:29:57 | 2020-08-03T14:29:57 | 30,968,278 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 246 | py |
N = int(input())
res = list()
for v in range(0, N+1):
for a in range(0, N+1):
b = v - a
if b >= 0:
u = a ^ b
if 0 <= u <= N:
res.append(('{}-{}'.format(u, v)))
print(len(set(res)))
| [
"himkt@klis.tsukuba.ac.jp"
] | himkt@klis.tsukuba.ac.jp |
15fa51aca767bcbc9dea86fb784e8c679e4b11ac | 383953e0979248c0ca20fd90666a05291fe8b456 | /src/AnswersTo10Questions/Q7_GetPopularIP.py | 90d671d74e13bb67bcd157bf7b179c2dc03e2910 | [] | no_license | aquablue1/dns_analysis | 81520f88a729063432a0df1dbb8f8c1687f79875 | 38f53394cb8ff5a61c05486499cb0925f952d34e | refs/heads/master | 2020-03-20T20:41:51.325773 | 2018-08-07T02:23:41 | 2018-08-07T02:23:41 | 137,701,168 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,620 | py | import os
def get_Potential_IPList(cookie1, cookie2):
IPList = []
source_folder = "../../data/result_q7_popIPs/"
source_file = source_folder + "/%s_%s.log" % (cookie1, cookie2)
with open(source_folder, 'r') as f:
for line in f:
if line[0] == "#":
continue
... | [
"94apieceofcake@gmail.com"
] | 94apieceofcake@gmail.com |
e2d58def9a24b666a15319ee7fd262da2f46a513 | 7497da5d4a79f5a365904a722990278effd66afc | /day02-20181025/6.py | 21f7464beb789e0f51380eeceed8667804723e31 | [] | no_license | Ivan-yyq/amingpython2018 | 3f92850b12be4a73095d3dea94557af08d299ea3 | d58f497e95e70331fdd9358f673bb1f0776fb65a | refs/heads/master | 2020-04-02T16:39:19.948053 | 2018-10-25T10:01:13 | 2018-10-25T10:01:13 | 154,622,504 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 223 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2018/10/25 15:52
# @Author : yangyuanqiang
# @File : 6.py
#python v2.7
#for循环遍历文件内容
fd = open('test.txt')
for line in fd:
print line,
fd.close() | [
"1478458905@qq.com"
] | 1478458905@qq.com |
7394cffe3a2af4b7685fafcd859fc8f7fade5e55 | 30d02ec6dd309dced011d266ca40bace293fb23e | /20210218/kth_smallest_element_in_a_sorted_matrix.py | 59d1fcee9c6c875e88f16ca5645b53a5b3f9a787 | [] | no_license | jyeoniii/algorithm | b72f5e9f7fe63098c251bcc1585787ba39ca750c | 7d80e27aec8fbac936911ee78a92c47b00daa3ba | refs/heads/master | 2023-04-15T01:39:41.149528 | 2021-04-22T13:55:58 | 2021-04-22T13:55:58 | 316,533,879 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 756 | py | # https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/
from typing import List
import heapq
class Solution:
def kthSmallest(self, matrix: List[List[int]], k: int) -> int:
h, cnt = [(matrix[0][0], 0, 0)], 0
matrix[0][0] = visited = float("inf")
while h:
val, i... | [
"jaykim9438@gmail.com"
] | jaykim9438@gmail.com |
6354b0ba3d9b501ddaec2d7a97fced437de46171 | 2af28d499c4865311d7b350d7b8f96305af05407 | /model-optimizer/mo/front/common/partial_infer/space_to_batch.py | 00f33003903d1c6a6d29939c763d1f034f35d89a | [
"Apache-2.0"
] | permissive | Dipet/dldt | cfccedac9a4c38457ea49b901c8c645f8805a64b | 549aac9ca210cc5f628a63174daf3e192b8d137e | refs/heads/master | 2021-02-15T11:19:34.938541 | 2020-03-05T15:12:30 | 2020-03-05T15:12:30 | 244,893,475 | 1 | 0 | Apache-2.0 | 2020-03-04T12:22:46 | 2020-03-04T12:22:45 | null | UTF-8 | Python | false | false | 2,070 | py | """
Copyright (c) 2018-2019 Intel Corporation
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 i... | [
"alexey.suhov@intel.com"
] | alexey.suhov@intel.com |
af6e329cf0be566e63006c0246063f8a5f7ff6ac | e86d020f8ade86b86df6ad8590b4458a9d415491 | /test-xooj/common_env/widgets/test_env/handlers.py | 9cc5432507b222e187a2948f3b18f4d62466af21 | [
"BSD-2-Clause"
] | permissive | g842995907/guops-know | e4c3b2d47e345db80c27d3ba821a13e6bf7191c3 | 0df4609f3986c8c9ec68188d6304d033e24b24c2 | refs/heads/master | 2022-12-05T11:39:48.172661 | 2019-09-05T12:35:32 | 2019-09-05T12:35:32 | 202,976,887 | 1 | 4 | null | 2022-11-22T02:57:53 | 2019-08-18T08:10:05 | JavaScript | UTF-8 | Python | false | false | 3,638 | py | # -*- coding: utf-8 -*-
import hashlib
import uuid
from django.db import transaction
from system_configuration.models import SystemConfiguration
from common_env.handlers import manager as common_manager
from common_env.handlers.exceptions import MsgException
from common_env.models import Env, TestEnvMap
from common_... | [
"842995907@qq.com"
] | 842995907@qq.com |
87a0bef921dce0ba9d8b37a167ca21a9f7b8925f | 90419da201cd4948a27d3612f0b482c68026c96f | /sdk/python/pulumi_azure_nextgen/servicefabricmesh/v20180901preview/secret.py | deb1d657656aa8536f8bb84b0fb16cde9634e3ac | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | test-wiz-sec/pulumi-azure-nextgen | cd4bee5d70cb0d332c04f16bb54e17d016d2adaf | 20a695af0d020b34b0f1c336e1b69702755174cc | refs/heads/master | 2023-06-08T02:35:52.639773 | 2020-11-06T22:39:06 | 2020-11-06T22:39:06 | 312,993,761 | 0 | 0 | Apache-2.0 | 2023-06-02T06:47:28 | 2020-11-15T09:04:00 | null | UTF-8 | Python | false | false | 5,603 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | [
"public@paulstack.co.uk"
] | public@paulstack.co.uk |
9e7eb8e1ef4a41b0859796496a41dd62582434f0 | fe42f1c1eefb2069eda1dd98821ba6049fb4f01a | /Coderust/P4String/P7RegularExpression/P1/RegxMatch.py | 4c43a9daf086d11da3fe0b23c7a8a4e2f5111e0b | [] | no_license | hvn2001/LearnPython | c1b13f6685e6e62b3c9b612e88e624925f43eb6e | 323595df8d69e84873f74819a36b5eb36b017773 | refs/heads/master | 2021-03-30T06:26:55.110963 | 2020-04-10T16:13:36 | 2020-04-10T16:13:36 | 248,025,126 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,388 | py | import re
def regx_match_rec(text, pattern):
if not text and not pattern:
return True
if text and not pattern:
return False
if len(pattern) > 1 and pattern[1] == '*':
remaining_pattern = pattern[2:]
remaining_text = text
for i in range(0, len(text) + 1):
... | [
"hoangvu1991uit@gmail.com"
] | hoangvu1991uit@gmail.com |
14f18cbd6c740b8c391de96dee934e1977c3b3f5 | b22588340d7925b614a735bbbde1b351ad657ffc | /athena/PhysicsAnalysis/DPDUtils/share/pyexample.fdr_makeDPD_config.py | 03df725b5db5ef9aafe259c6d88f953ad9f61060 | [] | no_license | rushioda/PIXELVALID_athena | 90befe12042c1249cbb3655dde1428bb9b9a42ce | 22df23187ef85e9c3120122c8375ea0e7d8ea440 | refs/heads/master | 2020-12-14T22:01:15.365949 | 2020-01-19T03:59:35 | 2020-01-19T03:59:35 | 234,836,993 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,010 | py | #####################################################################
#
# DPD Group Configuration example
#
# Authors: Davide Costanzo, Nicolas Kerschen, Anastopoulos Christos
#====================================================================
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequenc... | [
"rushioda@lxplus754.cern.ch"
] | rushioda@lxplus754.cern.ch |
932cdfbfee47f4238996e1270809f2346e040da1 | 457b687219cb723585164e84417ed3bacc8c234d | /qianfeng_400/面向对象思想/14、@property的使用方法.py | addc0684a7468eb0ee4694363cd0df279bcac2f1 | [] | no_license | jxy147258/qianfeng_python | ffdc77fb05cfb2302af51fc3047efa0eadeb2064 | 0f6c06fdf19a47f7b5083cde4e1eb2011442c5f7 | refs/heads/master | 2021-07-16T15:19:45.759356 | 2021-02-03T16:04:14 | 2021-02-03T16:04:14 | 237,947,869 | 2 | 2 | null | 2020-02-07T06:41:06 | 2020-02-03T11:17:13 | Python | UTF-8 | Python | false | false | 671 | py | #一般情况下,对象属性,对外直接可以访问,
# 使用了限制访问__XX,就可以阻止直接访问private私有属性,
# 如果需要访问私有属性,可以定义set和get函数
#现在用#property解决访问私有属性的问题
class Person(object):
def __init__(self,name,money):
self.name = name
self.__money = money
#相当于get函数
@property
def money(self):
return self.__money
#相当于set函数
@m... | [
"1162591945@qq.com"
] | 1162591945@qq.com |
1f449fa45d424c53a01bea8513f7939e6b6161a0 | 21ceb81a49076014c391505b53e0bd5ae25f732a | /tests/wrappers_data.py | 954ce3b5b1fdaff66748116047145152ce91f8b2 | [
"Apache-2.0"
] | permissive | Damon8q/geonotebook | 340612011b1ea2faa0df495fd600879faaa77e1c | 285c0f281cf7659a281d1e991384effb9de27a3a | refs/heads/master | 2020-04-12T01:06:26.832972 | 2019-01-04T01:41:06 | 2019-01-04T01:41:06 | 162,222,059 | 0 | 0 | Apache-2.0 | 2018-12-18T03:03:32 | 2018-12-18T03:03:32 | null | UTF-8 | Python | false | false | 6,755 | py | import numpy as np
subset = np.array([[[ 1., 2., 3., 4., 5.],
[ 21., 21., 21., 21., 21.]],
[[ 12., 12., 12., 12., 12.],
[ 22., 22., 22., 22., 22.]],
[[ 13., 13., 13., 13., 13.],
[ 23., 23., 23.,... | [
"jonathan.beezley@kitware.com"
] | jonathan.beezley@kitware.com |
4b4c8dffe88fa737bdd6b15937bb875c2eda97dd | bfc25f1ad7bfe061b57cfab82aba9d0af1453491 | /data/external/repositories_2to3/152687/plankton-classification-master/code/rotate.py | fedde87e4e183c4c2ee7947df16cf8a318964498 | [
"MIT"
] | permissive | Keesiu/meta-kaggle | 77d134620ebce530d183467202cf45639d9c6ff2 | 87de739aba2399fd31072ee81b391f9b7a63f540 | refs/heads/master | 2020-03-28T00:23:10.584151 | 2018-12-20T19:09:50 | 2018-12-20T19:09:50 | 147,406,338 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 518 | py | import glob
from scipy import ndimage
from scipy import misc
import numpy as np
import os
# Code to created rotated images
images = glob.glob("*/*.jpg")
dic = {}
for filename in images:
pix=misc.imread(filename)
flip_ud = np.flipud(pix)
flip_lr = np.fliplr(pix)
rotate_1 = ndimage.... | [
"keesiu.wong@gmail.com"
] | keesiu.wong@gmail.com |
ed98ac9508996eaf3126dc7dc0faff7f90207f9a | ee10559195ec6e8e8c514ace5e131598a9ae29ae | /algo/0901/배열최소의합.py | e0a1712ebb426e09a880d41ca758ed704a936678 | [] | no_license | jun0811/TIL | 12e8f0ab0506ed6ba81e3c0b6f18c4d5743324d1 | 2bc6da0214ffad7989270b60d682d5060a37531f | refs/heads/master | 2023-04-03T09:56:30.434378 | 2020-11-12T08:55:32 | 2020-11-12T08:55:32 | 282,910,456 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 750 | py | import sys
sys.stdin = open('sample_input.txt')
def find(x):
global temp, minV
if minV < temp: # 다 돌기전에 기존의 값보다 클 수 있다.
return # 할필요 없음
elif x == N:
if temp < minV:
minV = temp
return
for i in range(N):
if not visited[i]:
visited[i] = 1
... | [
"nate199458@gmail.com"
] | nate199458@gmail.com |
f30acfc1b03bdcbe1984da38fa76797f0f20991e | 92065e3b378edc8e0570e4295aca0968de3c852d | /rosalind_ba2e.py | 2490c2cc9b66c2ed02a68659fb84aeb32b4d1c97 | [] | no_license | sunhuaiyu/rosalind | 18dc9fa78aaa84b478b112089a3b94d0f442b1bb | 7181cc9215d3ea0b5ad9d0811c00e01fd9f20b1c | refs/heads/master | 2020-04-04T17:53:17.437595 | 2019-04-11T17:03:52 | 2019-04-11T17:03:52 | 25,007,403 | 5 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,537 | py | # rosalind_ba2e
import numpy as np
def all_kmers(seq, k): # to find the k-mer composition of a string
return [seq[i:i+k] for i in range(len(seq) - k + 1)]
def kmer2matrix(kmer):
'''
Covert a single k-mer to a (4, k) matrix in the order of 'ACGT'.
'''
d = {'A':[1, 0, 0, 0], 'C':[0, 1, 0, 0], 'G':[0, 0, 1, 0], 'T'... | [
"noreply@github.com"
] | sunhuaiyu.noreply@github.com |
42421f7a5f5bbd99762a208dffa0becf9b03cd93 | b05b89e1f6378905bbb62e2a2bf2d4f8e3187932 | /convertSortedArrayToBST.py | f443f2df1559e60a2ac661d67b7991ae90ce55cb | [
"MIT"
] | permissive | anishmo99/Daily-Interview-Pro | c959cd336209132aebad67a409df685e654cfdfc | d8724e8feec558ab1882d22c9ca63b850b767753 | refs/heads/master | 2023-04-10T08:09:46.089227 | 2021-04-27T07:27:38 | 2021-04-27T07:27:38 | 269,157,996 | 1 | 1 | MIT | 2020-06-08T07:09:19 | 2020-06-03T17:57:21 | C++ | UTF-8 | Python | false | false | 923 | py | from collections import deque
# Definition of Node
class Node:
def __init__(self, value, left=None, right=None):
self.value = value
self.left = left
self.right = right
def __str__(self):
# level-by-level pretty-printer
nodes = deque([self])
answer = ''
while len(nodes):
node = no... | [
"ani10sh@gmail.com"
] | ani10sh@gmail.com |
de59a4eec7c2ef9b7a4a11bb0840fd6a30195d88 | b22588340d7925b614a735bbbde1b351ad657ffc | /athena/Trigger/TrigT1/TrigT1CTP/share/TrigT1CTP_standalone_db_job.py | ca2ac728924ccdf13072ebf5cdaa29c2bcecdba5 | [] | no_license | rushioda/PIXELVALID_athena | 90befe12042c1249cbb3655dde1428bb9b9a42ce | 22df23187ef85e9c3120122c8375ea0e7d8ea440 | refs/heads/master | 2020-12-14T22:01:15.365949 | 2020-01-19T03:59:35 | 2020-01-19T03:59:35 | 234,836,993 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 403 | py | # standalone steering file for testing configuration (process 0 events)
MessageSvc = Service( "MessageSvc" )
MessageSvc.OutputLevel = INFO
MessageSvc.defaultLimit = 10000000
include( "TrigT1CTP/TrigT1CTPJobOptions.py" )
LVL1ConfigSvc.ConfigSource = "Oracle"
LVL1ConfigSvc.DBServer = "devdb"
LVL1ConfigSvc.OutputL... | [
"rushioda@lxplus754.cern.ch"
] | rushioda@lxplus754.cern.ch |
507d0302e5b1a7b4bd2d54e0f6de85c5fc4cc36e | 5b4b1866571453f78db5b06a08ff0eda17b91b04 | /test/vanilla/Expected/AcceptanceTests/ModelFlattening/modelflattening/aio/operations_async/__init__.py | af469cba2c0ee375c2a71a2fcedb01faa2a05bc9 | [
"MIT",
"LicenseRef-scancode-generic-cla"
] | permissive | koek67/autorest.azure-functions-python | ba345f1d194ca7431daab1210a0cd801d4946991 | b0896d8aec6b0fd6f0bcb12ea8e0489652dc2783 | refs/heads/main | 2022-12-20T13:27:56.405901 | 2020-09-30T08:23:11 | 2020-09-30T08:23:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 670 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | [
"varad.meru@gmail.com"
] | varad.meru@gmail.com |
d920445f44d77d7d83b64a39edf0062714018bb0 | 7a7b11499e79744ccd2945d7afab86e99104d33a | /SNOMEDCTToOWL/RF2Files/Language.py | c529536976e146d6280440a24b37b9a5dae252dd | [
"Apache-2.0"
] | permissive | hsolbrig/SNOMEDToOWL | 1cd8ace3b978501a4303efbf66d6a9678b4448f1 | b9994e842822e98f6d01561d4b54902e4da5e79a | refs/heads/master | 2021-08-28T15:59:43.143060 | 2021-08-17T14:36:04 | 2021-08-17T14:36:04 | 68,416,597 | 10 | 1 | Apache-2.0 | 2018-05-02T15:51:59 | 2016-09-16T21:45:28 | Python | UTF-8 | Python | false | false | 3,155 | py | from typing import Dict, List
from .RF2File import RF2File
from .Transitive import Transitive
from SNOMEDCTToOWL.SNOMEDToOWLConstants import *
from SNOMEDCTToOWL.TransformationContext import TransformationContext
LanguageName = str
class Language:
""" A RF2 Language refset entry
Properties:
* refse... | [
"solbrig.harold@mayo.edu"
] | solbrig.harold@mayo.edu |
b6a206f7f46544816347fa8aa028e55ea7299751 | 337f7eea31ac8a338e7217485f8db4b73945b084 | /customer/migrations/0001_initial.py | d32aa1ed68dabddf3ba2e231f007dafce5a50ec4 | [] | no_license | sherrywilly/table-reservation-backend | 17ecb3d89ccbc9f3074ba12586cfd621c510d4de | f4c6a426a15b38e7b2de9189fc9b71f82428730e | refs/heads/master | 2023-06-20T06:19:09.240006 | 2021-07-21T06:25:23 | 2021-07-21T06:25:23 | 334,076,504 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,301 | py | # Generated by Django 3.1.5 on 2021-01-29 07:44
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('restaurant', '0001_initial'),
mig... | [
"sherrywilson521@gmail.com"
] | sherrywilson521@gmail.com |
3a673f9e192af14db079451bcc37c5d7a283891c | f13c586b82224c07f28f7bb7d9dd503e64eb5cb2 | /pennylane/ops/qubit/parametric_ops.py | 725883dc06b34640c479f080dd01e236d38c33c0 | [
"Apache-2.0"
] | permissive | therooler/pennylane | 095f104e40254be2ed3050bc7be9ea9d2ee11ebd | fde1f24bd784d6ee2af5c980c2d5010b4c2bbe54 | refs/heads/master | 2023-04-29T13:32:43.115108 | 2023-04-18T09:41:42 | 2023-04-18T09:41:42 | 202,356,685 | 0 | 0 | Apache-2.0 | 2019-08-14T13:30:39 | 2019-08-14T13:30:38 | null | UTF-8 | Python | false | false | 1,056 | py | # Copyright 2018-2023 Xanadu Quantum Technologies Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or... | [
"noreply@github.com"
] | therooler.noreply@github.com |
e63b5448eaf593b9ee649a0c6c89278b32aa2c72 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2333/59018/275924.py | 7272f4e47859e057ecae14ab85a68971d0db1134 | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 324 | py | import math
result=[]
x=int(input())
y=int(input())
bound=int(input())
for k in range(1,bound+1):
for i in range(math.floor(math.log(k,x))):
if type(math.log(k-math.pow(x,i),y)) is int and math.log(k-math.pow(x,i),y)>=0:
result.append(k)
print(result)
... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
ab5db864576e2fe83810354d36abe6e28c50f3f9 | c3e2f56672e01590dc7dc7e184f30c2884ce5d3a | /Programs/MyPythonXII/Unit1/PyChap01/s10.py | 12a02671ffd424b9907d2793d94820fd585aa2b4 | [] | no_license | mridulrb/Basic-Python-Examples-for-Beginners | ef47e830f3cc21cee203de2a7720c7b34690e3e1 | 86b0c488de4b23b34f7424f25097afe1874222bd | refs/heads/main | 2023-01-04T09:38:35.444130 | 2020-10-18T15:59:29 | 2020-10-18T15:59:29 | 305,129,417 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 228 | py | # File name: ...\\MyPythonXII\Unit1\PyChap01\s10.py
# Program to find sum of first 10 natural numbers.
ctr = 1
sum = 0
while ctr <= 10:
sum = sum + ctr
ctr += 1
print ("Sum of first 10 natural numbers is:", sum)
| [
"mridurb@gmail.com"
] | mridurb@gmail.com |
2b8cefb2b1d8abf0ca2bc86d8dbb588ff957af88 | 897802abf4ee5c7267de3eb5e321cc931898e2f6 | /html/CTCC/SMS/notification/models.py | d027f0e72c3d07f29f9e236b362589a290a51e2b | [] | no_license | aojie654/codes_store | 0527c7a7729b472e8fd2fd67af462cf857970633 | ed71b6266b2d2b5ddefadcb958f17695fb9db6cf | refs/heads/master | 2021-07-15T17:04:33.591673 | 2021-07-03T14:42:30 | 2021-07-03T14:42:30 | 132,343,733 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,372 | py | import datetime
from django.db import models
from django.utils import timezone
class Notification(models.Model):
def __str__(self):
return self.name
name = models.CharField("名称", max_length=50)
no = models.CharField("编号", max_length=50)
CONTEXT_TYPE = (
("文件", "文件"),
("通告", "通... | [
"aojie654@live.cn"
] | aojie654@live.cn |
2a52b4cf1c03dfbc00d85e3f0f91bc4844ec7c67 | b337d218f30b921762c81f6ebeea6812cab22135 | /SDK_python/dist/tmp/test/test_clearing_system_member_identification.py | 2d6b666f1561cc9a73d6263458553c1f466f09f5 | [] | no_license | vinstech07/open-banking-hackaton | 4708c5b300937425759fa99e8bd88f45ef188150 | c331238c2285dffe430993f852407e595830ced9 | refs/heads/master | 2022-10-02T21:30:20.783751 | 2019-12-04T22:47:12 | 2019-12-04T22:47:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,925 | py | # coding: utf-8
"""
enable:Banking SDK
Currently enable:Banking SDK consists of [authorization](#auth-api), [account information](#aisp-api) and [payment initiation](#pisp-api) APIs. The same calls and data structures are used for interacting with different banks. In order to use each of the APIs correspondin... | [
"34141547+Matisso77@users.noreply.github.com"
] | 34141547+Matisso77@users.noreply.github.com |
234f20f5df1283731d06f93d0270346415426583 | 236cfc411118c9ea8db422ed5cacb26ead35833c | /app/tests/chart.py | e93d7f728212b20a2a82faead40b91f33ce6ce44 | [] | no_license | petres/eurostat | d24ebafd9dc356fe31fbb2a5b3a454fb38478a89 | fbd305f1b2d43efb9eefd7bc546dd21941091e91 | refs/heads/master | 2020-12-24T16:25:07.145114 | 2016-02-05T15:57:36 | 2016-02-05T15:57:36 | 20,182,982 | 8 | 2 | null | null | null | null | UTF-8 | Python | false | false | 569 | py | import os, sys
sys.path.insert(1, os.path.join(os.path.dirname(__file__), "..", "lib"))
from openpyxl import Workbook
from openpyxl.charts import BarChart, LineChart, Reference, Series
from openpyxl.cell import get_column_letter
wb = Workbook()
ws = wb.active
for i in range(10):
ws.cell('%s%s'%(get_co... | [
"peter.reschenhofer@gmail.com"
] | peter.reschenhofer@gmail.com |
22bc85474e7a1723142154f0c82fcb5c906d71d0 | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /benchmark/startPyquil2510.py | aa6cd3459b792172e1677936b8959514f197b427 | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/QDiff | ad53650034897abb5941e74539e3aee8edb600ab | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | refs/heads/main | 2023-08-05T04:52:24.961998 | 2021-09-19T02:56:16 | 2021-09-19T02:56:16 | 405,159,939 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,810 | py | # qubit number=4
# total number=38
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += H(3) # number=16
prog... | [
"wangjiyuan123@yeah.net"
] | wangjiyuan123@yeah.net |
19e5b3cd5c581bd5a4558da19d977fa81525477f | e801e82b17a7ddbdc13b87b2fbc16cb133cd9e9d | /src/utils/batch_iter.py | ea0d55cf752c38d87f8f0be5944cbb9b108764cd | [] | no_license | lrjconan/img-count | 5644de551dfbdc777d1688e2d72c59ad381823ea | fb6893b72fbf66e43ae63a7b82cc9c42ad9877d7 | refs/heads/master | 2021-01-18T11:06:11.207996 | 2016-04-15T04:58:55 | 2016-04-15T04:58:55 | 56,351,011 | 1 | 1 | null | 2016-04-15T21:31:38 | 2016-04-15T21:31:38 | null | UTF-8 | Python | false | false | 2,182 | py | """
A batch iterator.
Usage:
for idx in BatchIterator(num=1000, batch_size=25):
inp_batch = inp_all[idx]
labels_batch = labels_all[idx]
train(inp_batch, labels_batch)
"""
import numpy as np
import progress_bar as pb
class BatchIterator(object):
def __init__(self, num, batch_size=1, ... | [
"renmengye@gmail.com"
] | renmengye@gmail.com |
06aa6068b3bb240a436c8f2f2ce2b28a7e919e94 | 186b58b1e7edd652874c9aef79fbf18d49019247 | /venv/bin/easy_install | 3a76a22b89071cc5358947a4514e7d15737f56ca | [] | no_license | justinglobal/web_app | 90b52b224073e8f4f3fea25824fe3161a341c34f | 53f313b9c08f35b5c227196c896e44614fbc42e5 | refs/heads/master | 2021-01-01T04:50:58.209999 | 2017-05-16T02:21:49 | 2017-05-16T02:21:49 | 58,900,594 | 0 | 1 | null | 2017-02-14T03:31:25 | 2016-05-16T03:24:26 | Python | UTF-8 | Python | false | false | 256 | #!/Users/admin/web_app/venv/bin/python3.5
# -*- coding: utf-8 -*-
import re
import sys
from setuptools.command.easy_install import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"justinglobal@gmail.com"
] | justinglobal@gmail.com | |
dff692721faa65a3ebb12c22fd33011f058c52f4 | ff8a2a266b8ca39a800d72af40e9e2138e006b0a | /OpenCV.py | 1524825a6e2a75c83f825c3f4d031693333001bc | [] | no_license | ZengyuanYu/PyTorch_60minutes | dd90e848900de6530ad37ad7a5817d6e8db525ed | 92cfcca9d9cd6ff1f930617cd9c00048e8f62ec4 | refs/heads/master | 2023-01-11T14:12:56.125179 | 2023-01-07T10:54:36 | 2023-01-07T10:54:36 | 117,400,750 | 8 | 1 | null | 2023-01-07T10:54:36 | 2018-01-14T04:12:45 | Python | UTF-8 | Python | false | false | 2,726 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Created by XiaoYu on 18-2-26
import cv2
import numpy as np
from matplotlib import pyplot as plt
####################################
# 将图像的BGR顺序纠正为RGB
def bgr2rgb(src):
img = src.copy()
img[:,:,0] = src[:,:,2]
img[:,:,2] = src[:,:,0]
return img
##########... | [
"1952284157@qq.com"
] | 1952284157@qq.com |
625b835e3b92f06960be344cd802b3d351e2db5b | df7b40e95718ac0f6071a0ba571b42efc81cf6de | /configs/nonlocal_net/nonlocal_r50-d8_769x769_40k_cityscapes.py | 75adef324877d56c157b457eecbf8446aa6b192f | [
"Apache-2.0"
] | permissive | shinianzhihou/ChangeDetection | 87fa2c498248e6124aeefb8f0ee8154bda36deee | 354e71234bef38b6e142b6ba02f23db958582844 | refs/heads/master | 2023-01-23T20:42:31.017006 | 2023-01-09T11:37:24 | 2023-01-09T11:37:24 | 218,001,748 | 162 | 29 | Apache-2.0 | 2022-11-03T04:11:00 | 2019-10-28T08:41:54 | Python | UTF-8 | Python | false | false | 353 | py | _base_ = [
'../_base_/models/nonlocal_r50-d8.py',
'../_base_/datasets/cityscapes_769x769.py', '../_base_/default_runtime.py',
'../_base_/schedules/schedule_40k.py'
]
model = dict(
decode_head=dict(align_corners=True),
auxiliary_head=dict(align_corners=True),
test_cfg=dict(mode='slide', crop_size... | [
"1178396201@qq.com"
] | 1178396201@qq.com |
8fa7fa7f79fe992d883fd564cedc285226fe386a | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p04011/s174922537.py | 47dcaeecee70a28e41276d2abb98dee69e5c1f2c | [] | 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 | 267 | py | hotel=int(input())
hotel2=int(input())
hotel3=int(input())
hotel4=int(input())
if hotel > hotel2:
sum1=int(hotel2)*int(hotel3)
hotel5=int(hotel)-int(hotel2)
sum2=int(hotel5)*int(hotel4)
fee=int(sum1)+int(sum2)
else:
fee=int(hotel)*int(hotel3)
print(str(fee)) | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
bf4fdee71db205420e6ae79347bcdce0bfa4fbec | b2d79f304c9e0a52e9dd6cfc1d963f79324fff50 | /starman/slh.py | e0a420cf56d6e50cb9fc99cdda767ee4976905c7 | [
"MIT"
] | permissive | gmnamra/starman | 0e9713eebc4aa39f6662d59fbeb8b61d48c0fe66 | 1f9475e2354c9630a61f4898ad871de1d2fdbc71 | refs/heads/master | 2020-12-19T23:30:48.479752 | 2016-04-05T09:28:54 | 2016-04-05T09:28:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,075 | py | """
Scott and Longuet-Higgins algorithm for association of features.
"""
import numpy as np
def slh_associate(a_features, b_features, max_sigma=5):
"""
An implementation of the Scott and Longuet-Higgins algorithm for feature
association.
This function takes two lists of features. Each feature is a
... | [
"rjw57@cam.ac.uk"
] | rjw57@cam.ac.uk |
36f291abb0df593c9c616361408f40e2c8749bf1 | facb8b9155a569b09ba66aefc22564a5bf9cd319 | /wp2/merra_scripts/03_model_fitting/merra882/686-tideGauge.py | 4ba378fa1605b1c2b3c7fdbdb10cf4f7a3b45f50 | [] | 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 | 7,041 | py | # -*- coding: utf-8 -*-
"""
Created on Mon May 4 15:51:30 2020
This program is designed to validate a multiple
linear regression model by using the KFOLD method
@author: Michael Tadesse
"""
import os
import numpy as np
import pandas as pd
from sklearn import metrics
from scipy import stats
from datetime import date... | [
"michaelg.tadesse@gmail.com"
] | michaelg.tadesse@gmail.com |
be52a669c062ae6775c598ac8fdd5430f6ff1f55 | e1e9885fcc748222ab2c2400c6fd9267fc432f78 | /userena/models.py | b88ab6baec5a16b1d01e56992ee902a5b2d37c82 | [] | no_license | TimBest/ComposersCouch | ce97612d60033b7bdf1e98ce7718d9ef9e18101b | 953a45c5d48326c46ef9c23e77a9b9640de0116d | refs/heads/master | 2020-12-24T11:16:38.654166 | 2015-07-27T17:05:53 | 2015-07-27T17:05:53 | 73,045,725 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,663 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
import datetime
from django.conf import settings
from django.db import models
from django.utils.translation import ugettext_lazy as _
from photos.models import Image
from userena import settings as userena_settings
from userena.managers import UserenaManager, UserenaBaseProfil... | [
"timbest@composerscouch.com"
] | timbest@composerscouch.com |
e6485e21e1c4ce920b9bc82ce5213b5cab562271 | 09d8eba1a853243d23b1ac1f679d8dee295eb1b3 | /handlers/dashboard.py | d40c4549f2043f7df6b662db053e49298089e8bc | [
"MIT"
] | permissive | excxapp/loggrove | 2a83d69bc53b3b0c99521a59e04927978d210030 | b462db2149368317c607925361901a9952720128 | refs/heads/master | 2020-05-23T15:59:58.480790 | 2019-05-18T03:12:07 | 2019-05-18T03:12:07 | 186,839,500 | 0 | 0 | null | 2019-05-15T14:07:18 | 2019-05-15T14:07:18 | null | UTF-8 | Python | false | false | 1,303 | py | # Created by zhouwang on 2018/6/8.
from .base import BaseRequestHandler, permission
import datetime
import tornado
class Handler(BaseRequestHandler):
@permission()
@tornado.web.asynchronous
@tornado.gen.coroutine
def get(self):
response_data = yield tornado.gen.Task(self._summary)
sel... | [
"zhouwang@yunniao.me"
] | zhouwang@yunniao.me |
ef15d14351886995ecd5032df5fe53dc2aeccf2d | 36d084722cf9ea9e2631d6f321eeec136baaff7a | /twitter_api/settings.py | 5e229eeb35279aa44bf9c605a9b56be313f55d7c | [] | no_license | arunvalluthadam/github_twitter_api | 05635e7d11a9aa7637660a53ed78a4713454f85e | d98a829cd7e55e5f77e4e4469f4145ea4657b46e | refs/heads/master | 2020-05-01T02:10:09.176177 | 2015-02-25T09:27:28 | 2015-02-25T09:27:28 | 31,267,206 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,988 | py | """
Django settings for twitter_api project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...... | [
"arunvalluthadam@gmail.com"
] | arunvalluthadam@gmail.com |
c3e2fcf5ae2117971a592ed95b22b95d26b59cf8 | 8d7262650584eb6d66b5874d2e4651963918ad1d | /sp/migrations/0011_idp_require_attributes.py | c50d06f893d52beb815527c923358bd98c8b9844 | [
"BSD-3-Clause"
] | permissive | imsweb/django-saml-sp | dee5757ac9807526849a7382550815c02057d1ae | d8c3bdb91e4a5988e282690d79a8069af77a0c7a | refs/heads/main | 2023-03-07T08:41:28.291208 | 2023-02-24T16:32:45 | 2023-02-24T16:32:45 | 220,322,548 | 14 | 11 | BSD-3-Clause | 2023-02-24T14:16:00 | 2019-11-07T20:23:22 | Python | UTF-8 | Python | false | false | 499 | py | # Generated by Django 4.0.5 on 2022-06-15 15:37
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("sp", "0010_auto_20210326_1923"),
]
operations = [
migrations.AddField(
model_name="idp",
name="require_attributes",
... | [
"dcwatson@gmail.com"
] | dcwatson@gmail.com |
b1b001f10452949d23602abeeb1a2cdcc8efab12 | a63d907ad63ba6705420a6fb2788196d1bd3763c | /src/api/datahub/access/utils/kafka_tool.py | 567082ddcac53e583a21e8c6275d87c9ba66fdc5 | [
"MIT"
] | permissive | Tencent/bk-base | a38461072811667dc2880a13a5232004fe771a4b | 6d483b4df67739b26cc8ecaa56c1d76ab46bd7a2 | refs/heads/master | 2022-07-30T04:24:53.370661 | 2022-04-02T10:30:55 | 2022-04-02T10:30:55 | 381,257,882 | 101 | 51 | NOASSERTION | 2022-04-02T10:30:56 | 2021-06-29T06:10:01 | Python | UTF-8 | Python | false | false | 1,724 | py | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available.
Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
BK-BASE 蓝鲸基础平台 is licensed under the MIT License.
License for BK-BASE 蓝鲸基础平台:
------------------------------------------... | [
"terrencehan@tencent.com"
] | terrencehan@tencent.com |
601d72f4a1c1ef6a231ccfd76a0659c582457a5c | f3b233e5053e28fa95c549017bd75a30456eb50c | /mcl1_input/L46/46-32_wat_20Abox/set_1.py | b8f772afef75bca44ef0001905e92c0c441607ee | [] | no_license | AnguseZhang/Input_TI | ddf2ed40ff1c0aa24eea3275b83d4d405b50b820 | 50ada0833890be9e261c967d00948f998313cb60 | refs/heads/master | 2021-05-25T15:02:38.858785 | 2020-02-18T16:57:04 | 2020-02-18T16:57:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 738 | py | import os
dir = '/mnt/scratch/songlin3/run/mcl1/L46/wat_20Abox/ti_one-step/46_32/'
filesdir = dir + 'files/'
temp_prodin = filesdir + 'temp_prod_1.in'
temp_pbs = filesdir + 'temp_1.pbs'
lambd = [ 0.00922, 0.04794, 0.11505, 0.20634, 0.31608, 0.43738, 0.56262, 0.68392, 0.79366, 0.88495, 0.95206, 0.99078]
for j in lambd... | [
"songlin3@msu.edu"
] | songlin3@msu.edu |
055efd31c6c8987d9f3dcd9ea466214a7dec88c7 | fc7998b5c544220e149585e83aecd0e7d839cbac | /file_handlers/file_handlers.py | d73f27f822ec62b257bbc72b011efd1308faf425 | [] | no_license | IgorBolotnikov/karate-cat | 677de2cae874ca1e611bb3d8f8898c42eef808a7 | 54f62c36502ecd568d4545453490476e9d5ce96d | refs/heads/master | 2020-08-08T02:21:05.334408 | 2019-10-14T16:24:39 | 2019-10-14T16:24:39 | 213,675,806 | 0 | 0 | null | 2019-10-14T16:24:40 | 2019-10-08T15:03:17 | null | UTF-8 | Python | false | false | 5,495 | py | import csv
import os
from copy import deepcopy
from .constants import *
class CSVHandlerMixin():
def create_csv_file(self, filename, headers, delimiter):
if os.path.isfile(self.filename):
return
with open(filename, WRITE, newline=NEWLINE) as csv_file:
writer = csv.DictWrit... | [
"igorbolotnikov1993@gmail.com"
] | igorbolotnikov1993@gmail.com |
9cd2cdce68401cea1f3ffe9a2e4586ba8dddd122 | b69c0ce45fa78305f1885566b871d4d91af7e0ea | /process/h5_create_valid.py | 775b35d430e4c6ca2151dda6b2c0580e56f94c25 | [] | no_license | ZhouYzzz/personID | 0fb67c5881a439e6b6e690e4b141a347e73446d3 | 9148c8c0a28e365be866e2ac81e1d6b3f40205a3 | refs/heads/master | 2016-08-12T08:58:13.905342 | 2016-04-20T06:12:51 | 2016-04-20T06:12:51 | 55,525,769 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,292 | py | import h5py
import numpy as np
# 1400 classes,
import sys
sys.path.insert(0,'/home/gpu/zhouyz/caffe/python')
import caffe
import pandas as pd
train = pd.read_csv('metric_valid.txt',sep=' ',header=None)
num_pairs = train.shape[0]
'''
68 * 2 = 136
'''
#import cv2
#def read_im(name):
# im = cv2.imread(name)
# assert im... | [
"zhouyz9608@gmail.com"
] | zhouyz9608@gmail.com |
6fec905a8916bf0809e03ae53cc2dfb1e12ab71c | 36bdbbf1be53ba5f09b9a2b1dd15e91f8f6b0da1 | /tourer/migrations/0010_auto_20181009_2218.py | b6752c781caebbecef0c35e744c8da60d804e70a | [] | no_license | phufoxy/fotourNew | 801ab2518424118020dc6e5f31a7ba90a654e56a | 6048c24f5256c8c5a0d18dc7b38c106a7c92a29c | refs/heads/master | 2023-04-13T01:34:22.510717 | 2018-12-26T03:46:09 | 2018-12-26T03:46:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 661 | py | # Generated by Django 2.1 on 2018-10-09 15:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tourer', '0009_auto_20181009_2209'),
]
operations = [
migrations.AddField(
model_name='tourer',
name='id',
... | [
"vanphudhsp2015@gmail.com"
] | vanphudhsp2015@gmail.com |
b297ce780375321adbaaa69873dd29303ebf1b48 | 6c417b2370645e884e45d7a0962c17d513160ade | /Python/longest-valid-parentheses.py | 8d8b1647e0cbb03c0fc5dbcd7907b999b1dfa4ed | [] | no_license | smv1796/LeetCode-1 | 910f3a768dd6d233b7784d626d869cf40442a68f | 2476fb787f400265198a8e198cf729f7c8e06c86 | refs/heads/master | 2020-05-23T04:35:13.530158 | 2019-08-10T19:21:19 | 2019-08-10T19:21:19 | 186,634,841 | 1 | 0 | null | 2019-05-14T14:03:33 | 2019-05-14T14:03:33 | null | UTF-8 | Python | false | false | 1,916 | py | # Time: O(n)
# Space: O(1)
#
# Given a string containing just the characters '(' and ')',
# find the length of the longest valid (well-formed) parentheses substring.
#
# For "(()", the longest valid parentheses substring is "()", which has length = 2.
#
# Another example is ")()())", where the longest valid parenth... | [
"kamyu104@gmail.com"
] | kamyu104@gmail.com |
d5e3500589ba52d7c349f4f3cd8654f8d418cb5d | 4c8243d15fe50437555abfaaaf7bac49116dc8a6 | /celery/demon4.py | db3ab5146c86ed627ec1b3bc8dc03b70c4cccd82 | [] | no_license | ajing2/python-demon | 34b33c163cb0efcf713f1ffb505cb6b7326fd653 | 4aa6a3d8365d032a281a08862d3c44e2dab16cdf | refs/heads/master | 2021-08-30T16:09:10.171376 | 2017-12-18T15:18:57 | 2017-12-18T15:18:57 | 111,558,499 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 374 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2017/11/27 23:07
# @Author : lingxiangxiang
# @File : demon4_test.py
import time
from demon3 import *
r1 = taskA.delay(10, 20)
print(r1.result)
print(r1.status)
r2 = taskB.delay(1, 2, 3)
time.sleep(1)
print(r2.result)
print(r2.status)
# print(dir(r2))
r3 =... | [
"974644081@qq.com"
] | 974644081@qq.com |
6ed17b6f36e4fb361da150f2373a1ece1121a921 | e6c51a64f0111f7be1d70e5b9959017686df0c03 | /spefit/common/tests/test_basic.py | a307a02c5a3d1d99082a9e9719e25b9d42020a3d | [
"BSD-3-Clause"
] | permissive | watsonjj/spefit | 454bf9bc1c821c654421ae4a46fe9a51be7edc1b | 7a3931c5a59e43a73e2e48fe3cd352e20a706460 | refs/heads/master | 2022-12-19T01:16:21.044270 | 2020-09-21T10:58:51 | 2020-09-21T10:58:51 | 286,461,038 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 699 | py | from spefit.common.basic import binom, xlogy
import scipy.special as scipy_special
import numpy as np
from numpy.testing import assert_allclose
def test_binom():
n = np.arange(100)
k = np.arange(100)
assert_allclose(binom(n, k), scipy_special.binom(n, k))
def test_xlogy():
x = np.arange(100) - 10
... | [
"jason.jw@live.co.uk"
] | jason.jw@live.co.uk |
e78cf968182eab7b66cecacfa39e75f43900f89d | f4dcb04d4d2adcee871f2c86fb15ecb59291b45d | /Bulk-ChIP-seq/rules/chip_macs2.smk | 4042018131f522d891defc4c9ab9c52e5ed10344 | [
"BSD-3-Clause"
] | permissive | denoqo/genomics-analysis-pipelines | 107299c21fab0ebf93ac681f0aa05f545252634c | 3aa8330a6569e2e161b5828b7818bed080ea68c8 | refs/heads/master | 2023-03-17T02:25:02.389952 | 2020-11-02T06:57:35 | 2020-11-02T06:57:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,883 | smk | rule chip_bammkdp:
input:
bam = "{OUT_DIR}/minimap2/{fastqid}.sortedByPos.bam",
output:
bam = "{OUT_DIR}/minimap2/{fastqid}.sortedByPos.mkdp.bam",
metric = "{OUT_DIR}/minimap2/{fastqid}.sortedByPos.mkdp.txt",
tmp = temp(directory("{OUT_DIR}/Tmp/{fastqid}"))
shell:
"pi... | [
"vladimir.liu@gmail.com"
] | vladimir.liu@gmail.com |
51b81e12647b6dda7df81e0a9999951c50c588dc | 6ab810f6ca51dc2e2d0b7197fc1866b738ca70a2 | /Contest/WC230/5690.最接近目标价格的甜点成本.py | 8ae61d7dc4365c71e1fd947e279edf8d97825f1f | [
"MIT"
] | permissive | ApocalypseMac/LeetCode | 2309223be0c3e2969850cf1770eef2a447d39317 | 84c229eaf5a2e617ca00cabed04dd76d508d60b8 | refs/heads/master | 2023-04-14T19:22:34.340333 | 2021-03-28T05:20:40 | 2021-03-28T05:20:40 | 282,896,723 | 1 | 2 | MIT | 2020-07-29T05:05:19 | 2020-07-27T12:49:40 | Python | UTF-8 | Python | false | false | 658 | py | class Solution:
def closestCost(self, baseCosts: List[int], toppingCosts: List[int], target: int) -> int:
possible = [False] * (30001)
for b in baseCosts:
possible[b] = True
for t in toppingCosts:
for _ in range(2):
for i in range(30000, -1, -1):
... | [
"ApocalypseMac@users.noreply.github.com"
] | ApocalypseMac@users.noreply.github.com |
31143bd3d2006c494de7ddcdce6b11337909bf99 | a802e408ba16bb201a35829e1e6925e68d2a9bf5 | /pypfopt/value_at_risk.py | 480c0b4429261525a025c3a4eef34b6a87313fd4 | [] | no_license | dxcv/Portfolio_optimization_final | 27cb863c843b23867257f8606b571bf4878d937d | 1bddb8cc6a13775aa4b9ebbe9ee96bedf913d418 | refs/heads/master | 2020-08-17T15:53:52.008316 | 2019-08-16T17:26:09 | 2019-08-16T17:26:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,949 | py | """
The ``value_at_risk`` module allows for optimisation with a (conditional)
value-at-risk (CVaR) objective, which requires Monte Carlo simulation.
"""
import pandas as pd
from .base_optimizer import BaseScipyOptimizer
from . import objective_functions
import noisyopt
class CVAROpt(BaseScipyOptimizer):
"""
A... | [
"noreply@github.com"
] | dxcv.noreply@github.com |
addf0b0a87bd7a99eb50e64b5728611cb89f4ab5 | 83a64f9fbb98e01ca45beaeba11e0fb594a1ec1f | /src/exemplos/1_Interface/1_Variaveis/2-limites.py | 6bb862dc49ab5d8edb11896462a8e43bba6e74f4 | [] | no_license | rnrios/CIC-APC | 5fa4ab1de43dc300cd7a1c3697c03041e84ee4b2 | d4d309027af63c09a945740dd8c759a7f29402e7 | refs/heads/master | 2021-12-23T08:41:08.810964 | 2021-12-09T18:39:25 | 2021-12-09T18:39:25 | 66,909,308 | 0 | 0 | null | 2016-08-30T05:24:40 | 2016-08-30T05:24:40 | null | UTF-8 | Python | false | false | 987 | py | # -*- coding: utf-8 -*-
# @file: 2-limites.py
# @author: Guilherme N. Ramos (gnramos@unb.br)
# @disciplina: Algoritmos e Programação de Computadores
#
# Exemplo de limites das representações de tipos de dados.
#
#
# No caso de inteiros e símbolos, os limites são definidos pela quantidade de
# memória disponí... | [
"ramos@gnramos.com"
] | ramos@gnramos.com |
86de1112333f249b36ab8c22ee0a2e5951149c31 | 5c964389074a95f166ae682c4196226d46adec09 | /leet140.py | 334dc6b59c9782484ac802d79b53b4ef357f3974 | [] | no_license | shach934/leetcode | 0a64e851be1419f19da8d2d09294f19758b355b8 | 59de9ba6620c64efbd2cc0aab8c22a82b2c0df21 | refs/heads/master | 2023-01-12T01:48:31.877822 | 2020-11-16T20:48:37 | 2020-11-16T20:48:37 | 306,147,305 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,760 | py | 140. Word Break II
Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, add spaces in s to construct a sentence where each word is a valid dictionary word. You may assume the dictionary does not contain duplicate words.
Return all such possible sentences.
For example, give... | [
"tjukid@gmail.com"
] | tjukid@gmail.com |
3191ff1f56e75af4d360ff9f0b1b5c5b5b56235c | 8bca0be12d4e7ac83e662b9ad84801d0b6e93332 | /bookwyrm/views/reports.py | 72b7f4db92fc8872e3c67e93d0fd688cb02dea4c | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | tofuwabohu/bookwyrm | c5bda550120c5b2f045fb9405c8ee257eeadd206 | beac3b33f8f9c3910843de5737dbffb70f4e211f | refs/heads/main | 2023-07-28T08:28:39.496365 | 2021-09-10T21:51:01 | 2021-09-10T21:51:01 | 343,883,835 | 0 | 0 | NOASSERTION | 2021-04-25T20:42:17 | 2021-03-02T19:09:36 | Python | UTF-8 | Python | false | false | 4,752 | py | """ moderation via flagged posts and users """
from django.contrib.auth.decorators import login_required, permission_required
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404, redirect
from django.template.response import TemplateResponse
from django.utils.decorators im... | [
"mousereeve@riseup.net"
] | mousereeve@riseup.net |
9c7ce242d9901ed7b58e874ceb6fbb6d29adca72 | 21e177a4d828f4e0a003e9424c4952dbc0b47d29 | /testlints/test_lint_ev_valid_time_too_long.py | 828ab9d8c32f5b872de8ac86f9f94d93e8e72801 | [] | no_license | 846468230/Plint | 1071277a55144bb3185347a58dd9787562fc0538 | c7e7ca27e5d04bbaa4e7ad71d8e86ec5c9388987 | refs/heads/master | 2020-05-15T12:11:22.358000 | 2019-04-19T11:46:05 | 2019-04-19T11:46:05 | 182,255,941 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,149 | py | import sys
sys.path.append("..")
from lints import base
from lints import lint_ev_valid_time_too_long
import unittest
import os
from cryptography import x509
from cryptography.hazmat.backends import default_backend
class TestEvValidTooLong(unittest.TestCase):
'''test lint_ev_valid_time_too_long.py'''
def test... | [
"846468230@qq.com"
] | 846468230@qq.com |
6161ea36ac2537030ed10d2d3f49da21662d046b | 848ac37e474ec4e4e937e4c0f962f09be195a15c | /book/migrations/0027_chapter_theme.py | 9995dccf0fd89c9fdc5db047ee3162a1911786e3 | [] | no_license | philippedemaria/sacado | 12829e924480d7902c8e382925d7622a13520dbf | c001f4e5391cddc290e461e870f0165fed4677d1 | refs/heads/master | 2023-09-04T05:18:44.439431 | 2023-09-03T20:58:09 | 2023-09-03T20:58:09 | 190,163,605 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 643 | py | # Generated by Django 3.0.5 on 2023-08-17 09:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('book', '0026_auto_20230802_0224'),
]
operations = [
migrations.AddField(
model_name='chapter',
name='theme',
... | [
"philippe.demaria83@gmail.com"
] | philippe.demaria83@gmail.com |
baf4af6df88e89e303091e15743e26c391bfb1f9 | 79bc9a420df5c706b2ae06f4b75bf2bd2ba9646e | /bin/load_config.py | 41e1d9e1f80f9561f6941c1067105178a5e510ce | [
"BSD-3-Clause"
] | permissive | Andrew-Tan/e-mission-server | 7022786a13b4be87be62cfc2cc6d82543d063e5d | 91d59bee86e63d803e401f10f4b6a2502effedda | refs/heads/master | 2021-01-16T18:25:17.860723 | 2017-11-21T19:24:40 | 2017-11-21T19:24:40 | 100,073,534 | 0 | 0 | BSD-3-Clause | 2018-05-05T18:26:36 | 2017-08-11T22:13:44 | Jupyter Notebook | UTF-8 | Python | false | false | 1,185 | py | import logging
import json
import sys
import usercache.abstract_usercache as ucauc
from dao.user import User
def load_config(config_json):
"""
Loads the specified config file into the specified user cache.
If there is an existing entry with the same key in the cache, it will be overwritten.
If there is... | [
"shankari@eecs.berkeley.edu"
] | shankari@eecs.berkeley.edu |
b1dfc09715f8174979c75fc5de40ecb948211bcc | 2f62291080c180e1f65c15ca300c66e7b75605d3 | /likes/migrations/0002_auto_20181208_0928.py | b24ccb4f3f7b64396add2544bcaaa08bf320158c | [] | no_license | XiaoFei-97/NewBLogSite | 9c3d2a4121a2fd8bc3fe8f2ad42ae1caf297109e | 8f878173eaba82073932811357724536a4c6949f | refs/heads/master | 2020-04-13T02:11:40.620117 | 2019-03-11T07:41:26 | 2019-03-11T07:41:26 | 162,896,336 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 459 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2018-12-08 09:28
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('likes', '0001_initial'),
]
operations = [
migrations.AlterField(
... | [
"jack_970124@163.com"
] | jack_970124@163.com |
df798380c74afe2b962cf15359c08865129f8291 | 6879a8596df6f302c63966a2d27f6b4d11cc9b29 | /abc/problems030/024/b.py | a0f472de7b214dd7b1d4782aa3ead934eb03f5e8 | [] | no_license | wkwkgg/atcoder | 41b1e02b88bf7a8291b709306e54cb56cb93e52a | 28a7d4084a4100236510c05a88e50aa0403ac7cd | refs/heads/master | 2020-07-26T03:47:19.460049 | 2020-03-01T18:29:57 | 2020-03-01T18:29:57 | 208,523,188 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 276 | py | N, T = map(int, input().split())
A = [int(input()) for _ in range(N)]
ans = 0
start, end = A[0], A[0]+T
for i in range(1,len(A)):
if end > A[i]:
end = A[i] + T
else:
ans += end - start
start, end = A[i], A[i] + T
ans += end - start
print(ans) | [
"yujin@komachi.live"
] | yujin@komachi.live |
0700bc0ed505378e29ba0137e00e773380eb917e | 86b264d5b57ae0f6822cf603c8a34011e0968cd0 | /v00/distinctscripts/MDScan/2020/pywork/make_xml.py | 19d8ee2c51afc4fd5480f0ef9d14037f0925ae5d | [] | no_license | zhongys/csl-pywork | e2fdaab87cf2ddc12ee0162681d4fbfe7c8a4965 | a672f06eec54f7cf46f5e1890aa7c08af4fcf277 | refs/heads/master | 2021-03-20T23:48:55.391014 | 2020-03-09T18:37:50 | 2020-03-09T18:37:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,008 | py | # coding=utf-8
""" make_xml.py for 2014-06-10
Reads/Writes utf-8
Mar 12, 2015
Remove conversion of HK to SLP1 - See convertwork/readme.txt
05-03-2017 <HI1> -> <div n="2">...</div>
05-19-2017 Revise to use new forms of acc.txt and acchw.txt
"""
import xml.etree.ElementTree as ET
import sys, re,codecs
f... | [
"drdhaval2785@gmail.com"
] | drdhaval2785@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.