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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5f1a9693ae8b87d22ffb444dacd8ef3562f6ac77 | f43d3731a21ee5df09298f5541b52484f408e010 | /NewsModel/migrations/0008_auto_20170815_1747.py | 479138d6adfe7c26b885c29401ac5f0adb3f2221 | [] | no_license | cash2one/wechat_admin | 2ba8c35deffff37c263b7091229ba2d86f2aaeaf | af0712fdad867d76dcee2092abcf32cada49d075 | refs/heads/master | 2021-05-04T22:22:53.514787 | 2017-09-25T10:03:07 | 2017-09-25T10:03:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,147 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-08-15 09:47
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('NewsModel', '0007_auto_20170815_1741'),
]
operations = [
migrations.AlterFi... | [
"“545314690@qq.com”"
] | “545314690@qq.com” |
586ad0103c3a894f7a97fab1082d6b4ed5220fd3 | f09e98bf5de6f6c49df2dbeea93bd09f4b3b902f | /google-cloud-sdk/lib/surface/auth/__init__.py | f02fed108e951643a585b30690c3e329b4aeaf4e | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | Peterfeng100/notepal | 75bfaa806e24d85189bd2d09d3cb091944dc97e6 | d5ba3fb4a06516fec4a4ae3bd64a9db55f36cfcd | refs/heads/master | 2021-07-08T22:57:17.407571 | 2019-01-22T19:06:01 | 2019-01-22T19:06:01 | 166,490,067 | 4 | 1 | null | 2020-07-25T04:37:35 | 2019-01-19T00:37:04 | Python | UTF-8 | Python | false | false | 2,031 | py | # -*- coding: utf-8 -*- #
# Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | [
"kevinhk.zhang@mail.utoronto.ca"
] | kevinhk.zhang@mail.utoronto.ca |
c1e3dce31ab3f2259b84c16695ec02b683b497d8 | 1752e7d1cd7bca76b3e8eaf1b2bb7eee175e1d46 | /gitwrapperlib/_version.py | 96d0effe0e9f44c11ba9837acb4c44ace0a752bf | [
"MIT"
] | permissive | costastf/gitwrapperlib | f231947aeecea86ca00c556785318032559a6b3c | 521948528c175e5d1cd5c9b794a5927c50fbb78f | refs/heads/main | 2023-08-16T23:43:05.317150 | 2023-06-13T11:30:44 | 2023-06-13T11:30:44 | 116,044,039 | 0 | 5 | MIT | 2023-09-06T18:29:46 | 2018-01-02T18:19:00 | Python | UTF-8 | Python | false | false | 2,194 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: _version.py
#
# Copyright 2018 Costas Tyfoxylos
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including withou... | [
"costas.tyf@gmail.com"
] | costas.tyf@gmail.com |
db9b04a272126f991bb34f351bc484e806e522d2 | ea5cb47780499016ad4a09c300358df96ce6b22f | /examples/py_example.py | a5c08b76bf2962d8f1a569a4869ea37b811c7abc | [
"MIT"
] | permissive | liuguoyou/PyPatchMatch | 84e02d26534fcc62bc2f8368db38dfd9883a074f | 79e5a19296ec044c619484ff7a9e8cded43acd49 | refs/heads/master | 2020-12-08T12:21:43.706407 | 2020-01-10T03:37:10 | 2020-01-10T03:37:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 446 | py | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
# File : test.py
# Author : Jiayuan Mao
# Email : maojiayuan@gmail.com
# Date : 01/09/2020
#
# Distributed under terms of the MIT license.
from PIL import Image
import sys
sys.path.insert(0, '../')
import patch_match
if __name__ == '__main__':
source = Image.... | [
"maojiayuan@gmail.com"
] | maojiayuan@gmail.com |
c908e3859988f35653deebb62457f73eeba5a12b | c09e2e3b3743b86a24eadd0d62717d4925a661b3 | /setup.py | 5638fab5ecbd18ab65729f9752fc0abd8a87cee2 | [
"MIT"
] | permissive | knowsuchagency/foobar | c0a4a2b067663a8d1b2a26c5ddc2994dc6f05ab9 | b02bea7e6a9af232175443e6b1512fc531b61f40 | refs/heads/master | 2020-12-02T06:36:31.700633 | 2017-07-11T07:21:14 | 2017-07-11T07:21:14 | 96,863,096 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 935 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from configparser import ConfigParser
from setuptools import setup
def get_requirements(section: str) -> list:
"""Read requirements from Pipfile."""
pip_config = ConfigParser()
pip_config.read('Pipfile')
def gen():
for it... | [
"knowsuchagency@gmail.com"
] | knowsuchagency@gmail.com |
34767bd0c8b2f5feb057dcc43c1748422c9ddea3 | 368c66467b78adf62da04cb0b8cedd2ef37bb127 | /BOJ/Python/10828_스택.py | b380cf362f317d58d32f74c7a857ea8da85d9885 | [] | no_license | DJHyun/Algorithm | c8786ddcd8b5693fc9b3b4721fdf1eeda21611c5 | fd6ae800886dac4ec5ff6cf2618bc2c839a76e7a | refs/heads/master | 2020-07-30T16:32:49.344329 | 2020-02-25T07:59:34 | 2020-02-25T07:59:34 | 210,289,983 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 774 | py | # baekjoon source = "https://www.acmicpc.net/problem/10828"
import sys
T = int(sys.stdin.readline())
stack = [0]*T
tmp = -1
for test_case in range(T):
N = sys.stdin.readline().split()
if len(N) > 1:
cmd = N[0]
number = N[1]
else:
cmd = N[0]
if cmd == 'push':
... | [
"djestiny4444@naver.com"
] | djestiny4444@naver.com |
ebfa4b5433fd5445fa52fa4128d08b66bb1c8acc | b64fcb9da80d12c52bd24a7a1b046ed9952b0026 | /client_sdk_python/providers/auto.py | e51b3ffbd7a372bb388c2dc63fe843458be132af | [
"MIT"
] | permissive | PlatONnetwork/client-sdk-python | e59f44a77690806c8763ed6db938ed8447d42417 | 94ad57bb34b5ee7bb314ac858071686382c55402 | refs/heads/master | 2022-07-09T08:49:07.312759 | 2021-12-24T08:15:46 | 2021-12-24T08:15:46 | 173,032,954 | 7 | 16 | MIT | 2022-08-31T02:19:42 | 2019-02-28T03:18:03 | Python | UTF-8 | Python | false | false | 2,788 | py | import os
from urllib.parse import (
urlparse,
)
from client_sdk_python.exceptions import (
CannotHandleRequest,
)
from client_sdk_python.providers import (
BaseProvider,
HTTPProvider,
IPCProvider,
WebsocketProvider,
)
HTTP_SCHEMES = {'http', 'https'}
WS_SCHEMES = {'ws', 'wss'}
def load_prov... | [
"hietel366435@163.com"
] | hietel366435@163.com |
e91bc932fdd46fc551c4dde40b6c032d21b7ba8e | 9a9088713c917ac47c0b8713d6969b2cfcdbadac | /leetcode_python/549.Binary_Tree_Longest_Consecutive_Sequence_II.py | d73a5a900ef7632ab534ea974479d43f89361fdf | [] | no_license | zihuaweng/leetcode-solutions | 615fdcb9178b19764b4d30bcfe65a9f785e77270 | e431ff831ddd5f26891e6ee4506a20d7972b4f02 | refs/heads/master | 2023-02-06T03:58:26.413711 | 2020-12-26T05:23:03 | 2020-12-26T05:23:03 | 311,418,790 | 4 | 7 | null | null | null | null | UTF-8 | Python | false | false | 934 | py | #!/usr/bin/env python3
# coding: utf-8
# Time complexity: O()
# Space complexity: O()
# https://leetcode.com/problems/binary-tree-longest-consecutive-sequence-ii
def longestConsecutive(self, root: TreeNode) -> int:
def longest_path(root):
if not root:
return 0, 0
inc, dec = 1, 1
... | [
"zihuaw2@uci.edu"
] | zihuaw2@uci.edu |
03d4dc30e025720b6e6240e0e43e9d93e51dbaf7 | e66fa131cff76fa3fe70e7b6649fa1332159c781 | /ch09/generatorExp.py | f604819768741ec3d1548141beb0ef6c31cfaead | [] | no_license | chc1129/python_tutorial | c6d97c6671a7952d8a7b838ccb8aa3c352fa6881 | 2f8b389731bafbda73c766c095d1eaadb0f99a1c | refs/heads/main | 2023-08-24T07:00:43.424652 | 2021-10-28T16:07:57 | 2021-10-28T16:07:57 | 341,532,732 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 327 | py | print( sum(i*i for i in range(10)) )
xvec = [10, 20, 30]
yvec = [7, 5, 3]
print( sum(x*y, for x,y in zip(xvec, yvec))
unipue_words = set(word for line in page for word in line.split())
valedictorian = max((student.gpa, student.name) for student in graduates)
data = 'golf'
list(data[i] for i in range(len(data)-1, -1... | [
"chc1129@gmail.com"
] | chc1129@gmail.com |
f91d411468aba18dd844b4bd362c56aa8218192b | be01d0d54723d1e876c9a15618921dffe2b2255a | /Python/123.best_time_to_buy_sell_stackIII.py | 408394965df626a09202ee7117c0b0d7b2fb3021 | [] | no_license | jxlxt/leetcode | 17e7f25bf94dd334ac0d6254ffcffa003ed04c10 | a6e6e5be3dd5f9501d0aa4caa6744621ab887f51 | refs/heads/master | 2023-05-26T22:10:03.997428 | 2023-05-24T02:36:05 | 2023-05-24T02:36:05 | 118,216,055 | 0 | 0 | null | 2018-01-20T06:31:57 | 2018-01-20T06:30:06 | null | UTF-8 | Python | false | false | 638 | py | class Solution:
def maxProfit(self, prices):
"""
:type prices: List[int]
:rtype: int
"""
n = len(prices)
if n <= 1: return 0
p1, p2 = [0] * n, [0] * n
minV, maxV = prices[0], prices[-1]
for i in range(1, n):
minV = min(pric... | [
"xli239@ucsc.edu"
] | xli239@ucsc.edu |
3f24505ba0b0df5ce1e41a599054ca1234b21a5f | 303bac96502e5b1666c05afd6c2e85cf33f19d8c | /solutions/python3/245.py | 2a1a8626a9b652689053d04fde6cd9e553dc7683 | [
"MIT"
] | permissive | jxhangithub/leetcode | 5e82f4aeee1bf201e93e889e5c4ded2fcda90437 | 0de1af607557d95856f0e4c2a12a56c8c57d731d | refs/heads/master | 2022-05-22T12:57:54.251281 | 2022-03-09T22:36:20 | 2022-03-09T22:36:20 | 370,508,127 | 1 | 0 | MIT | 2022-03-09T22:36:20 | 2021-05-24T23:16:10 | null | UTF-8 | Python | false | false | 439 | py | class Solution:
def shortestWordDistance(self, words, word1, word2):
i1 = i2 = -1
res, same = float("inf"), word1 == word2
for i, w in enumerate(words):
if w == word1:
if same: i2 = i1
i1 = i
if i2 >= 0: res = min(res, i1 - i2)
... | [
"cenkay.arapsagolu@gmail.com"
] | cenkay.arapsagolu@gmail.com |
b596e8250368af057a20ec19b85049a800aebf86 | b46e3f6472e2ea4605f4d088a211dbaff2493574 | /reviewboard/dependencies.py | ad815f50f2c2685d16d32fec614c8baabbda853d | [
"MIT"
] | permissive | fgallaire/reviewboard | 360501a9f39c5898c54a80801c790f53b0a74f39 | e6b1323aee5e361754b110e4604ea5fc098050fe | refs/heads/master | 2021-01-18T03:13:56.561458 | 2017-03-22T14:41:15 | 2017-03-22T14:41:15 | 85,837,942 | 0 | 0 | null | 2017-03-22T14:30:31 | 2017-03-22T14:30:31 | null | UTF-8 | Python | false | false | 2,138 | py | """Version information for Review Board dependencies.
This contains constants that other parts of Review Board (primarily packaging)
can use to look up information on major dependencies of Review Board.
The contents in this file might change substantially between releases. If
you're going to make use of data from thi... | [
"christian@beanbaginc.com"
] | christian@beanbaginc.com |
76e8eba313f8b3e1df3b59f6a7f19ef2cec47afc | f76e11d4da15768bf8683380b1b1312f04060f9a | /fix_uppsala_mw.py | 37b2e1f5aebb99a509df6f9d9861fadc86fee9cf | [] | no_license | rasoolims/scripts | 0804a2e5f7f405846cb659f9f8199f6bd93c4af6 | fd8110558fff1bb5a7527ff854eeea87b0b3c597 | refs/heads/master | 2021-07-07T03:53:20.507765 | 2021-04-13T14:53:00 | 2021-04-13T14:53:00 | 24,770,177 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 305 | py | import os,sys,codecs
reader =codecs.open(os.path.abspath(sys.argv[1]),'r')
writer =codecs.open(os.path.abspath(sys.argv[2]),'w')
line =reader.readline()
while line:
spl = line.strip().split()
if len(spl)<7 or not '-' in spl[0]:
writer.write(line.strip()+'\n')
line =reader.readline()
writer.close() | [
"rasooli.ms@gmail.com"
] | rasooli.ms@gmail.com |
2c8a22a8cc80312f3c5a73950fa5d5a693c26997 | cbd2eee46663fad5b5375b13c8c21b1b06eb4c6b | /ecloud/code/src/main/python/manor/streamlet/delete_node.py | 34611b5a6beb3e0fffee7b01a20ed11aa2690dd6 | [] | no_license | 1026237416/Python | ef474ee40d7efcd6dabb6fb0ecba81b4dcfc7e14 | ffa8f9ffb8bfec114b0ca46295db05c4213c4c30 | refs/heads/master | 2021-07-05T00:57:00.456886 | 2019-04-26T10:13:46 | 2019-04-26T10:13:46 | 114,510,323 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,080 | py | import time
from tornado import gen
from manor.screwdriver import compute_util
from manor.streamlet import StreamletBase
def get_instance(params,node_id,serial):
return DeleteNode(params,serial,node_id)
class DeleteNode(StreamletBase):
def __init__(self,params,serial,node_id):
super(DeleteNode,sel... | [
"1026237416@qq.com"
] | 1026237416@qq.com |
96a321bea45c33c8c9cbe88fe3e61e609ad28006 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02862/s302553699.py | 7f9f0b8e8757ae71fce60543238888054cf73342 | [] | 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 | 757 | py | MOD = 1000000007
def mod_inv(mod, a):
old_t, t = 0, 1
old_r, r = mod, a
while r != 0:
quotient = old_r // r
old_r, r = r, old_r - quotient * r
old_t, t = t, old_t - quotient * t
return old_t % mod
def combine(n, k, mod):
if k > n // 2:
k = n - k
u = 1
f... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
202ffdc331d2955587acdf296d2f6cc782d26fe0 | 0754e2e7aa1ffb90b54d563ce5a9317e41cfebf9 | /keras/keras95_save_pd.py | 0fcb88a0887f2d9415ea9ce5bffeaf323de5902a | [] | no_license | ChaeMyungSeock/Study | 62dcf4b13696b1f483c816af576ea8883c57e531 | 6f726a6ecb43387e4a3b9d068a9c491b115c74c0 | refs/heads/master | 2023-01-24T20:59:52.053394 | 2020-12-07T14:54:34 | 2020-12-07T14:54:34 | 263,255,793 | 2 | 3 | null | null | null | null | UTF-8 | Python | false | false | 688 | py | import numpy as np
import pandas as pd
datasets = pd.read_csv("./data/csv/iris.csv", index_col=None, header=0, sep=',') # sep => ,를 기준으로 데이터를 구분한다.
# pd => loc // ioc
print(datasets)
print(datasets.__class__)
print(datasets.head()) # 위에서부터 5개
print(datasets.tail()) # 뒤에서부터 5개... | [
"noreply@github.com"
] | ChaeMyungSeock.noreply@github.com |
c28e730ec640401a04d6082566e005633a87106c | ac01b09550ccedb68a05756a7455c60766b60857 | /src/mcqexam/urls.py | eb22ad6e4bc7093c18a2bedd2176952a1c0afce6 | [] | no_license | cseai/OpenEduQA | ea669cffa7d3f2f3ded2221c8cb85876ac1438df | 8a90a843720a175c5da0af4fc51cc8e6542deb33 | refs/heads/master | 2023-06-10T23:17:40.502619 | 2021-07-05T12:43:44 | 2021-07-05T12:43:44 | 281,315,574 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 437 | py | from django.urls import path
from .views import (
mcqexam_list,
mcqexam_create,
mcqexam_detail,
mcqexam_update,
mcqexam_delete,
)
app_name = 'mcqexam'
urlpatterns = [
path('', mcqexam_list, name='list'),
path('create/', mcqexam_create, name='create'),
path('<id>/', mcqexam_detail, name... | [
"bh.pro.pust@gmail.com"
] | bh.pro.pust@gmail.com |
850e09600cdd38e57abc33b9302c7c5f830a5f8c | 2f98aa7e5bfc2fc5ef25e4d5cfa1d7802e3a7fae | /python/python_23737.py | f4d160c86ea326b6ca9a18cbdf1e3aa86cd0a403 | [] | no_license | AK-1121/code_extraction | cc812b6832b112e3ffcc2bb7eb4237fd85c88c01 | 5297a4a3aab3bb37efa24a89636935da04a1f8b6 | refs/heads/master | 2020-05-23T08:04:11.789141 | 2015-10-22T19:19:40 | 2015-10-22T19:19:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 189 | py | # '(match_start1)...(match_start2)...(match_end)' find the shortest string match
re.findall('(?=(\D\d{2,5}?.+?CA.?[ -._]*(?:\d{5})?))','6785 56767at435 hjfioej st. CA. 94827ifojwnf 93842')
| [
"ubuntu@ip-172-31-7-228.us-west-2.compute.internal"
] | ubuntu@ip-172-31-7-228.us-west-2.compute.internal |
eadece8617cdc25ac73efb28c19f2ad0379e8584 | bd3528cc321dc37f8c47ac63e57561fd6432c7cc | /transformer/tensor2tensor/models/xception_test.py | b57a757b9cbc4ec041840652bf6955e95e961d8c | [
"MIT",
"Apache-2.0"
] | permissive | oskopek/cil | 92bbf52f130a1ed89bbe93b74eef74027bb2b37e | 4c1fd464b5af52aff7a0509f56e21a2671fb8ce8 | refs/heads/master | 2023-04-15T10:23:57.056162 | 2021-01-31T14:51:51 | 2021-01-31T14:51:51 | 139,629,560 | 2 | 5 | MIT | 2023-03-24T22:34:39 | 2018-07-03T19:35:24 | Python | UTF-8 | Python | false | false | 2,136 | py | # coding=utf-8
# Copyright 2018 The Tensor2Tensor Authors.
#
# 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... | [
"lukas.jendele@gmail.com"
] | lukas.jendele@gmail.com |
dbf4440fe65197fcde1ca3b5fa97b257966e36f2 | a10377a6d0c7576b9e47209f49dea398181f73fe | /test/node/milticasttest.py | c0ccd0fe7d2886bebf8866e8cd1ec423bc99e87f | [
"BSD-3-Clause"
] | permissive | zymITsky/ants | 14077dab214aff543bbc75a059240dd55f656916 | 52918d18c94a9a69c3b2495286e3384ba57ad6f8 | refs/heads/master | 2020-06-01T11:04:53.520288 | 2015-02-03T08:09:59 | 2015-02-03T08:09:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 528 | py | '''
test multicast
'''
__author__ = 'wcong'
import unittest
from ants.cluster import cluster
from ants.node import multicast
class MulticastTest(unittest.TestCase):
def test(self):
cluster = cluster.ClusterInfo(name='test_cluster')
multicast_node = multicast.MulticastManager(cluster, self.print_r... | [
"cong.wang@tqmall.com"
] | cong.wang@tqmall.com |
c79b2076bfa7ce63eafa92d9ff0a8b9ecb045895 | cc0c7b6af25ce5a1a5fe310628d8a43475f0c41f | /det3d/datasets/__init__.py | 51e3d8f492a19c33b85427acab6d0244fa166b19 | [
"Apache-2.0"
] | permissive | chisyliu/Det3D | 183bb6c8d23277cecf9903184553b4c5cee88612 | e437ca6eb2e9becf478ae0e5f6400f7c21bb7495 | refs/heads/master | 2023-03-03T09:00:29.790693 | 2021-01-21T10:44:34 | 2021-01-21T10:44:34 | 267,220,075 | 1 | 0 | Apache-2.0 | 2021-01-21T10:44:35 | 2020-05-27T04:25:22 | null | UTF-8 | Python | false | false | 748 | py | from .builder import build_dataset
# from .cityscapes import CityscapesDataset
from .kitti import KittiDataset
from .lyft import LyftDataset
from .nuscenes import NuScenesDataset
# from .custom import CustomDataset
from .dataset_wrappers import ConcatDataset, RepeatDataset
# from .extra_aug import ExtraAugmentation
... | [
"poodarchu@gmail.com"
] | poodarchu@gmail.com |
bb5cf2bd9afbc637c54860db1dcfb80b4b6cdfcc | 6eb56f2e3f14f2373be07fe95b1c6fedf1e2d49f | /month04/Project/day03-demo/ddblog/ddblog/settings.py | 893e9f69c63fb46dbbd843cdeb0f5c78511d456d | [
"Apache-2.0"
] | permissive | chaofan-zheng/python_leanring_code | fe22b0370cadebf7456477269aff4a35cef0eb41 | 0af44ff39b9ded2c1d2cc96c6d356d21170ac04d | refs/heads/main | 2023-02-28T07:56:46.457552 | 2021-02-10T15:08:33 | 2021-02-10T15:08:33 | 323,584,115 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,843 | py | """
Django settings for ddblog project.
Generated by 'django-admin startproject' using Django 2.2.12.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
#... | [
"417355570@qq.com"
] | 417355570@qq.com |
a07eec758b37f1fe500b44584d7fec680ba7cad5 | f33b30743110532ddae286ba1b34993e61669ab7 | /Minimum Time Difference.py | d462b0bb0897d150390facf9b6166c46b86a8bdc | [] | no_license | c940606/leetcode | fe9dcee7a5daa4d52999d5f53253dd6dd33c348b | 631df2ce6892a6fbb3e435f57e90d85f8200d125 | refs/heads/master | 2021-07-10T14:01:26.164966 | 2020-08-16T10:46:16 | 2020-08-16T10:46:16 | 186,588,449 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 796 | py | class Solution(object):
def findMinDifference(self, timePoints):
"""
给定一个 24 小时制(小时:分钟)的时间列表,找出列表中任意两个时间的最小时间差并已分钟数表示。
---
输入: ["23:59","00:00"]
输出: 1
:type timePoints: List[str]
:rtype: int
"""
n = len(timePoints)
def helper(x):
x=x.split(":")
return int(x[0])*60 + int(x[1])
timePoints = ... | [
"762307667@qq.com"
] | 762307667@qq.com |
6ebe8ee7411a32d10a802ee01d53684cd0fe6e3a | 950a87f8e64636d2e1f6dd51f04ed51a41085429 | /tests/test_models_zoo.py | 08a62611dd76f8524770c811f13c96865b23aaf1 | [
"MIT"
] | permissive | Pandinosaurus/pytorch-toolbelt | 325e503a02495a9d7e203bd58e7ad444648688bf | 94d16a339cf9cb4b95bcaa539a462d81f4b82725 | refs/heads/develop | 2023-08-31T03:41:19.373645 | 2021-08-11T14:11:12 | 2021-08-11T14:11:12 | 207,519,450 | 0 | 0 | MIT | 2021-08-12T03:04:37 | 2019-09-10T09:35:17 | Python | UTF-8 | Python | false | false | 758 | py | import pytest
import torch
from pytorch_toolbelt.zoo import resnet34_unet32_s2, resnet34_unet64_s4, hrnet34_unet64
skip_if_no_cuda = pytest.mark.skipif(not torch.cuda.is_available(), reason="CUDA is not available")
@skip_if_no_cuda
@torch.no_grad()
@pytest.mark.parametrize("model_cls", [resnet34_unet32_s2, resnet34... | [
"ekhvedchenya@gmail.com"
] | ekhvedchenya@gmail.com |
9ec6d198bb369bd0b2bed230d840f27a3b4cfc2f | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03673/s125858327.py | 4c76558da4394c983252f90470a140ba3b1ccb40 | [] | 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 | 367 | py | from collections import deque
n = int(input())
A = deque(map(int, input().split()))
b = deque([])
if n%2==0:
for i in range(n):
if i%2 ==0:
b.append(A[i])
else:
b.appendleft(A[i])
else:
for i in range(n):
if i%2 ==0:
b.appendleft(A[i])
else:
... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
8cca21dc1dfb3c3e8dabd4d6e00022561017415a | c83acc6433aa8ef7703192e9033fe7cd92b2cccf | /traits/observation/exceptions.py | 5e57b713bc5ff8d4c1000491d5a4eb9aad8a3be8 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"CC-BY-3.0"
] | permissive | oscarpicas/traits | 857f5c06f3caf06003aed8b21b502b66ca8ba6cc | e72691a2f8aa34529af431d6b6b8c1a476ef4107 | refs/heads/master | 2022-03-17T10:30:08.330129 | 2022-02-18T21:01:50 | 2022-02-18T21:01:50 | 26,197,506 | 0 | 0 | null | 2015-01-10T04:01:48 | 2014-11-05T01:39:56 | null | UTF-8 | Python | false | false | 504 | py | # (C) Copyright 2005-2022 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at... | [
"noreply@github.com"
] | oscarpicas.noreply@github.com |
689adeb931f6bef31959fcee01b791be15cabf44 | 05352c29e844705f02d65526343eea9b486f8bd7 | /src/python/pants/backend/awslambda/python/register.py | b7408cad1f7104ac4ba3e71537a413e10471f00b | [
"Apache-2.0"
] | permissive | DoN-SultaN/pants | af2557de1178faaf73eed0a5a32e8f6fd34d2169 | 5cb5379003a0674c51f9a53f582cf690eddfaf45 | refs/heads/master | 2022-10-15T04:18:54.759839 | 2020-06-13T10:04:21 | 2020-06-13T10:04:21 | 272,089,524 | 1 | 0 | Apache-2.0 | 2020-06-13T21:36:50 | 2020-06-13T21:36:49 | null | UTF-8 | Python | false | false | 1,026 | py | # Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
"""Create AWS Lambdas from Python code.
See https://pants.readme.io/docs/awslambda-python.
"""
from pants.backend.awslambda.common import awslambda_common_rules
from pants.backend.awslam... | [
"noreply@github.com"
] | DoN-SultaN.noreply@github.com |
19f030eeaf16a07224b934871ffad46de4011858 | 934235f70a390a3ba0d7b464cddd10872f31cda3 | /auction/auction/migrations/0012_auto_20210329_1515.py | e0a2ab42ef0fd92803ce83ab6d4e895d55838d22 | [] | no_license | deji100/Projects | 6919041ba23e77a5c74e5ab7692bfcee38ececcb | 17e64d954d1d7805be57ec5d8d4344e4944889e6 | refs/heads/master | 2023-04-30T05:25:03.143303 | 2021-05-20T15:00:43 | 2021-05-20T15:00:43 | 338,844,691 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 392 | py | # Generated by Django 3.1.3 on 2021-03-29 14:15
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('auction', '0011_auto_20210326_2149'),
]
operations = [
migrations.AlterField(
model_name='listing',
name='sold_out',... | [
"68882568+deji100@users.noreply.github.com"
] | 68882568+deji100@users.noreply.github.com |
c993ab5b21d8f118c3a3d92b12bbc00a0e289025 | 5c9c9072adafff9de79552d927d225539874a1e5 | /fallas/panels.py | 3e39327b21d1c1fe85ed7cd64558561a50ba6772 | [] | no_license | NOKIA-GAP/trouble-shooting-api | e38e221aa01b16b28cd90b1c93f0b5141d67b26a | a3f6e2c3c22727c888b1f3f4e570fd729920e267 | refs/heads/master | 2021-08-10T01:07:46.333294 | 2018-10-01T17:21:14 | 2018-10-01T17:21:14 | 114,031,806 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,377 | py | from .models import (
Falla
)
INSTALACION = 'Instalacion'
INTEGRACION = 'Integracion'
SOFTWARE = 'Software'
HARDWARE = 'Hardware'
DATAFILL = 'Datafill'
AJUSTEPOTENCIA = 'Ajuste Potencia'
INTERFERENCIAEXTREMA = 'Interferencia externa'
CAMBIODISENO = 'Cambio diseno'
MALRECHAZO = 'Mal rechazo'
TX = 'TX'
COMPORTAMIENTOESP... | [
"jucebridu@gmail.com"
] | jucebridu@gmail.com |
ca25dc5334e07d1808f358786bcaf82904395a1f | 77c8c500d4077ad733fbfe2c6a85a1dd47bd3cb5 | /soohyun/python/baekjoon/0714/14890/1.py | edba3f8a5a55290bcb7c3549d30fcc7e6037b623 | [] | no_license | chelseashin/AlgorithmStudy2021 | 786f03c4c17bc057518d428481e7d710d24ec98e | 1a4744a621ed25715fc9060c5224f0b1092d9c00 | refs/heads/master | 2023-06-22T22:27:47.289806 | 2021-07-28T02:54:22 | 2021-07-28T02:54:22 | 326,441,667 | 1 | 5 | null | 2021-06-29T01:27:40 | 2021-01-03T15:44:16 | Python | UTF-8 | Python | false | false | 3,777 | py |
# 걸린시간 1시간 20분
import sys
input = sys.stdin.readline
def count_slope_col(N, L, stairs):
answer = 0
for row in range(N):
count = 1
left = 101
previous = -1
is_slope = True
for col in range(N):
current = stairs[row][col]
#print(f"|{stairs[row][col]... | [
"soohyunkim950921@gmail.com"
] | soohyunkim950921@gmail.com |
fdc80a64579ae8d080ea7732c7de51bfdd52b18f | a4e2b2fa5c54c7d43e1dbe4eef5006a560cd598e | /silk/templatetags/filters.py | 19422dffbef2ed8bba3077129da8477927e3f616 | [
"MIT"
] | permissive | joaofrancese/silk | baa9fc6468351ec34bc103abdbd1decce0ae2f5d | d8de1367eb70f4405f4ae55d9286f0653c5b3189 | refs/heads/master | 2023-04-01T07:30:42.707427 | 2017-02-22T14:06:05 | 2017-02-22T14:06:05 | 23,427,190 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,092 | py | import re
from django.template import Library
from django.template.defaultfilters import stringfilter
from django.utils import timezone
from django.utils.html import conditional_escape
from django.utils.safestring import mark_safe
register = Library()
def _esc_func(autoescape):
if autoescape:
esc = con... | [
"mtford@gmail.com"
] | mtford@gmail.com |
6a09ae6348786ae00b9bb35b1a7611573b23169e | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /s45bQoPtMoZcj7rnR_16.py | 41a063878034de7567ea745ec857b1619c25c1ce | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 249 | py |
def closest_palindrome(n):
if n == 100:
return 99
n = list(str(n))
n = [int(i) for i in n]
for i in range(len(n) // 2):
x, y = n[i], n[-i - 1]
x, y = x, x
n[i], n[-i - 1] = x, x
return int(''.join(str(i) for i in n))
| [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
6bd3aeb20fd5e5259fbb55aac32c164b66cb5769 | 3b9b4049a8e7d38b49e07bb752780b2f1d792851 | /src/build/android/pylib/utils/base_error.py | 263479a3c3279aca00c226b8b97cd52bc9ec3175 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | webosce/chromium53 | f8e745e91363586aee9620c609aacf15b3261540 | 9171447efcf0bb393d41d1dc877c7c13c46d8e38 | refs/heads/webosce | 2020-03-26T23:08:14.416858 | 2018-08-23T08:35:17 | 2018-09-20T14:25:18 | 145,513,343 | 0 | 2 | Apache-2.0 | 2019-08-21T22:44:55 | 2018-08-21T05:52:31 | null | UTF-8 | Python | false | false | 270 | py | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# pylint: disable=unused-wildcard-import
# pylint: disable=wildcard-import
from devil.base_error import *
| [
"changhyeok.bae@lge.com"
] | changhyeok.bae@lge.com |
4e821bf5ff638f0d5f8bf8cd7e66dbe3fd01bec1 | 08d316151302f7ba4ae841c15b7adfe4e348ddf1 | /reviewboard/integrations/tests/test_configs.py | 29008ec52f56c465b2b27c813306f2c40fc28b9c | [
"MIT"
] | permissive | LloydFinch/reviewboard | aa8cd21fac359d49b3dfc5a68c42b857c0c04bd8 | 563c1e8d4dfd860f372281dc0f380a0809f6ae15 | refs/heads/master | 2020-08-10T20:02:32.204351 | 2019-10-02T20:46:08 | 2019-10-02T20:46:08 | 214,411,166 | 2 | 0 | MIT | 2019-10-11T10:44:55 | 2019-10-11T10:44:54 | null | UTF-8 | Python | false | false | 4,954 | py | from __future__ import unicode_literals
import logging
from djblets.conditions import ConditionSet
from djblets.forms.fields import ConditionsField
from djblets.testing.decorators import add_fixtures
from kgb import SpyAgency
from reviewboard.integrations.forms import IntegrationConfigForm
from reviewboard.integrati... | [
"christian@beanbaginc.com"
] | christian@beanbaginc.com |
c1b8ece492125158774e3af66f2bfa7f7de642cd | d043a51ff0ca2f9fb3943c3f0ea21c61055358e9 | /python3网络爬虫开发实战/数据存储/文件存储/file6.py | 38d8bd4763b4c20db1de58e5df8e49db8c1879e2 | [] | no_license | lj1064201288/dell_python | 2f7fd9dbcd91174d66a2107c7b7f7a47dff4a4d5 | 529985e0e04b9bde2c9e0873ea7593e338b0a295 | refs/heads/master | 2020-03-30T03:51:51.263975 | 2018-12-11T13:21:13 | 2018-12-11T13:21:13 | 150,707,725 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 381 | py | import csv
with open('data.csv', 'w') as csvfile:
# 调用csv库的writer()方法初始化写入对象
writer = csv.writer(csvfile)
# 调用writerow()方法传入每行的数据即可完成写入
writer.writerow(['id', 'name', 'age'])
writer.writerow(['10001', 'Mike', 20])
writer.writerow(['10002', 'Bob', 22])
writer.writerow(['10003', 'Jordan', 21]... | [
"1064201288@qq.com"
] | 1064201288@qq.com |
030656461f5d5ace42ba347134ba1fef6d164dd2 | 9184e230f8b212e8f686a466c84ecc89abe375d1 | /arcseventdata/applications/obsolete/ipdpE.py | f4a03c9939aa822c22a8334013aca9fa028edc74 | [] | no_license | danse-inelastic/DrChops | 75b793d806e6351dde847f1d92ab6eebb1ef24d2 | 7ba4ce07a5a4645942192b4b81f7afcae505db90 | refs/heads/master | 2022-04-26T17:37:41.666851 | 2015-05-02T23:21:13 | 2015-05-02T23:21:13 | 34,094,584 | 0 | 1 | null | 2020-09-10T01:50:10 | 2015-04-17T03:30:52 | Python | UTF-8 | Python | false | false | 4,378 | py | #!/usr/bin/env python
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Jiao Lin
# California Institute of Technology
# (C) 2007 All Rights Reserved
#
# {LicenseText}
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... | [
"linjiao@caltech.edu"
] | linjiao@caltech.edu |
c9f002f2e16d65a1878541197c7e17dfa4b052e7 | fb3c1e036f18193d6ffe59f443dad8323cb6e371 | /src/flash/build/buildbot/slaves/windows64/buildbot.tac | b10193418512735dd402c802a5bdee88e3ccd140 | [] | no_license | playbar/nstest | a61aed443af816fdc6e7beab65e935824dcd07b2 | d56141912bc2b0e22d1652aa7aff182e05142005 | refs/heads/master | 2021-06-03T21:56:17.779018 | 2016-08-01T03:17:39 | 2016-08-01T03:17:39 | 64,627,195 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,219 | tac | # ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (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.mozilla.org/MP... | [
"hgl868@126.com"
] | hgl868@126.com |
8df7dd01776154eb4b7f0fa22d4f39e34f89562b | 18305efd1edeb68db69880e03411df37fc83b58b | /pdb_files3000rot/fb/2fb8/tractability_500/pymol_results_file.py | 8fb6f70e459bfef541c1964fba987ec98a526281 | [] | no_license | Cradoux/hotspot_pipline | 22e604974c8e38c9ffa979092267a77c6e1dc458 | 88f7fab8611ebf67334474c6e9ea8fc5e52d27da | refs/heads/master | 2021-11-03T16:21:12.837229 | 2019-03-28T08:31:39 | 2019-03-28T08:31:39 | 170,106,739 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,223 | py |
from os.path import join
import tempfile
import zipfile
from pymol import cmd, finish_launching
from pymol.cgo import *
finish_launching()
dirpath = None
def cgo_arrow(atom1='pk1', atom2='pk2', radius=0.07, gap=0.0, hlength=-1, hradius=-1, color='blue red', name=''):
from chempy import cpv
radius, gap =... | [
"cradoux.cr@gmail.com"
] | cradoux.cr@gmail.com |
698a03e7e32842e8b104e0c82b939b34a766192e | 0306bea08e9aab18f34a799ce8a73e86921f90f7 | /medium/MergeInBetweenLinkedLists.py | 8ec144cd18dc8a581543cea87bfb41b24ae965b0 | [] | no_license | GeorgianBadita/LeetCode | 78686fde88ef65b64f84fb7c2a22ba37ef21b8d9 | e3b0571182369c5308e0c29fb87106bb0b0d615a | refs/heads/master | 2022-10-21T00:23:26.479943 | 2022-10-14T20:27:27 | 2022-10-14T20:27:27 | 251,733,951 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 801 | py | # https://leetcode.com/submissions/detail/427432636/
# Definition for singly-linked list.
class ListNode:
def __init__(self, val=0, next=None):
self.val = val
self.next = next
class Solution:
def mergeInBetween(
self, list1: ListNode, a: int, b: int, list2: ListNode
) -> ListNode:... | [
"geo.badita@gmail.com"
] | geo.badita@gmail.com |
3b0de834899f997d3899b7fac087eda59b03a816 | d8a541a2953c9729311059585bb0fca9003bd6ef | /Lists as stack ques/key_revolver (2).py | 51286e00570e0066dba3825aad1cc934c43e8eb8 | [] | no_license | grigor-stoyanov/PythonAdvanced | ef7d628d2b81ff683ed8dd47ee307c41b2276dd4 | 0a6bccc7faf1acaa01979d1e23cfee8ec29745b2 | refs/heads/main | 2023-06-10T09:58:04.790197 | 2021-07-03T02:52:20 | 2021-07-03T02:52:20 | 332,509,767 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 895 | py | from collections import deque
bullet_cost = int(input())
gun_barrel = int(input())
bullets = list((map(int, input().split())))
locks = deque(map(int, input().split()))
safe_value = int(input())
current_bullet = 0
while bullets and locks and gun_barrel > 0:
for bullet in range(1, gun_barrel+1):
current_bull... | [
"76039296+codelocks7@users.noreply.github.com"
] | 76039296+codelocks7@users.noreply.github.com |
80f49f9ce84cd2ecb8d31318d2a7f46c6a0b878e | 4d3118fb51c7d42d22c1f1f3bbcbaebf5f0640d2 | /exercises/coin_flip.py | 4bceb538cd7f317864e00ff6d6a62c37a3b2f534 | [] | no_license | Gabkings/python-practise | d899d3d0a4094b9b272120ad2779cbe1c043f8db | bafc1fea60dfa6b7075204276fb6e3d857be2cbf | refs/heads/master | 2020-03-25T08:30:05.917168 | 2018-08-05T13:35:44 | 2018-08-05T13:35:44 | 143,615,891 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 191 | py | from random import random
def coin_flip():
face = random()
if face > 0.5:
faceup = 'head'
else:
faceup = 'tail'
return faceup
con = coin_flip()
print(con)
| [
"gabworks51@gmail.com"
] | gabworks51@gmail.com |
1a21293667b3cb7e185302ffb7736a7bbe0494dd | 09ce9635b0e74ba178e98efd0d5229a25995713e | /submissions/pakencamp-2019-day3/a.py | b5e2b7089cb507bc4e2b8a16412a7f5128acf605 | [
"Unlicense"
] | permissive | m-star18/atcoder | 7575f1e1f3ee1dfa4a765493eb17b4ef0ad5f1f0 | 08e475810516602fa088f87daf1eba590b4e07cc | refs/heads/main | 2023-07-14T09:16:42.807150 | 2021-08-22T15:59:48 | 2021-08-22T15:59:48 | 364,458,316 | 1 | 0 | Unlicense | 2021-08-22T15:59:49 | 2021-05-05T04:13:03 | Python | UTF-8 | Python | false | false | 201 | py | import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)
a, b = map(int, readline().split())
print(b - a + 1)
| [
"31807@toyota.kosen-ac.jp"
] | 31807@toyota.kosen-ac.jp |
61122cf8d525f6b5435f3e7f4c654fba7e261694 | 714268a27bd4cc34ec053cb3d991012151554aad | /CodeChef/atTheGates.py | 1bf5f096ca7f90fe56773272969212d1e8a86d07 | [] | no_license | yashhR/competitive | 2b649011c2cea74eea8d9646bcfafc73743651eb | 37f2ec68b33828df4692bc23f28d532cb8d4a358 | refs/heads/master | 2022-11-10T04:53:47.634062 | 2020-06-22T16:43:03 | 2020-06-22T16:43:03 | 274,190,602 | 0 | 0 | null | 2020-06-22T16:36:02 | 2020-06-22T16:36:02 | null | UTF-8 | Python | false | false | 1,801 | py | '''
There is a table in front of you, with N coins placed in a row and numbered 1 through N from left to right.
For each coin, you know whether it is initially showing heads or tails. You have to perform exactly K operations.
In one operation, you should remove the rightmost coin present on the table,
and if this coin ... | [
"17131a05h5@gvpce.ac.in"
] | 17131a05h5@gvpce.ac.in |
c19f605ab193cc8be99874cea988ac066ac3e0a5 | 9f414bde21046a264f3189786a7180f9ffd79d30 | /web/web/finders.py | 74784abfe14fbff5f035c0d81326851720746e80 | [
"Apache-2.0"
] | permissive | rcbops/FleetDeploymentReporting | ebd0ca07f099bdcf4e231d734145307e8f9bb9a5 | aaab76706c8268d3ff3e87c275baee9dd4714314 | refs/heads/develop | 2020-03-21T16:09:25.757015 | 2019-02-26T16:15:52 | 2019-02-26T16:15:52 | 138,753,891 | 1 | 7 | Apache-2.0 | 2019-02-26T16:15:53 | 2018-06-26T14:58:06 | Python | UTF-8 | Python | false | false | 1,311 | py | import os
from django.apps import apps
from django.contrib.staticfiles import utils
from django.contrib.staticfiles.finders import BaseFinder
from django.core.files.storage import FileSystemStorage
class AngularTemplateFinder(BaseFinder):
"""Incomplete implementation of a finder. Only implements list."""
sto... | [
"james.absalon@rackspace.com"
] | james.absalon@rackspace.com |
2176690dae448b8b2e6b44a37ead6da57cf654a8 | a222c577f924c390b244beaa67b4b042c2eb7337 | /bin/kt_regression.py | ffbbe2fa6643850cdc769f50a86c7be01586058e | [] | no_license | bdqnghi/sentence-ordering | 59baf539e9f30876860b73805b74862d1beef804 | fb62eea650f132ea3d01aabb831ea49531824183 | refs/heads/master | 2020-03-28T08:07:52.637593 | 2018-02-01T11:38:51 | 2018-02-01T11:38:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 711 | py |
import click
from sent_order.models import kt_regression as model
from sent_order import cuda
@click.group()
def cli():
pass
@cli.command()
@click.argument('train_path', type=click.Path())
@click.argument('model_path', type=click.Path())
@click.option('--train_skim', type=int, default=1000000)
@click.option(... | [
"davidwilliammcclure@gmail.com"
] | davidwilliammcclure@gmail.com |
a8340cb3c5b1eb05201fa61d09a62ab1595c6306 | f02b21d5072cb66af643a7070cf0df4401229d6e | /leetcode/explore_lessons/binary_search/first_bad_version.py | 83b3e34729656e01cef998a3a4d05972fdcfb579 | [] | no_license | dbconfession78/interview_prep | af75699f191d47be1239d7f842456c68c92b95db | 7f9572fc6e72bcd3ef1a22b08db099e1d21a1943 | refs/heads/master | 2018-10-09T22:03:55.283172 | 2018-06-23T01:18:00 | 2018-06-23T01:18:00 | 110,733,251 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,631 | py | # 278. First Bad Version
"""
You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version
of your product fails the quality check. Since each version is developed based on the previous version, all the
versions after a bad version are also bad.
Suppose you have n v... | [
"Hyrenkosa1"
] | Hyrenkosa1 |
b422a944d1f29b3f7038e03480ecbf17ddf705f8 | 48f092fd8191b0218df8605dc7125e526764e59e | /NestedLoops/app2.py | 231571ece85b4688453d6c27e1842e5019388cf3 | [] | no_license | LalityaSawant/Python-Projects | 2edb430c094fe3d6b4e706cc61f885aa07e24dff | b142708256e26867f09b3063f5f3fffa305ec496 | refs/heads/master | 2020-05-01T03:00:26.012301 | 2019-03-23T22:09:33 | 2019-03-23T22:09:33 | 177,235,109 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 239 | py | numbers = [0,1,2,3,4,5,4,3,2,1,1,1,4,6,7,8,9,9,9,9,8,7,7,6,5,5,5,6,7,8,8,7,6,5,5,4,4,3,3,3,3,3,3,2,2,3,3]
x = 'x'
for number in numbers:
output = ''
for count in range(number):
output += '0'
print(f''' {output}''') | [
"lalitya.sawant@gmail.com"
] | lalitya.sawant@gmail.com |
d04872bac0a950de742027fee0e7b9b5f0e2ab53 | 544d4f57945a08cb382b1ef04ae73fb6eaccfb29 | /105.py | 9c481c8d2568ed9f326e517c84e96b9ec4d3b0b3 | [
"LicenseRef-scancode-unicode",
"ICU",
"NAIST-2003",
"LicenseRef-scancode-public-domain",
"BSD-3-Clause"
] | permissive | rzhang1654/pyco | 7ea06a49cb169b4f70bf5d832ed39af5e416ee60 | 80a23c591da0f36f240f644ce8799fe8f9f5ed98 | refs/heads/master | 2023-05-25T11:44:14.027525 | 2021-06-02T14:57:17 | 2021-06-02T14:57:17 | 373,204,559 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 872 | py | #!/usr/bin/env python
#
from atexit import register
from re import compile
from threading import Thread
from time import ctime
from urllib import urlopen as uopen
REGEX = compile(r'<script type="(.+?)">')
EXELON = 'https://www.exeloncorp.com/leadership-and-governance'
PAGEs = {
'ethics-and-conduct': 'ethics and... | [
"run.zhang@exeloncorp.com"
] | run.zhang@exeloncorp.com |
81120867431d79bbfad20b6629306fb294a78aea | e5654e71ad4f043bb28105c3b6f3cd833e1c52dc | /openai/venv/lib/python3.10/site-packages/langchain/embeddings/sagemaker_endpoint.py | e1371a7d99936cbd102ccb6ba13e593ba23abc8a | [] | no_license | henrymendez/garage | 0b795f020a68fe2d349b556fb8567f6b96488ed5 | b7aaa920a52613e3f1f04fa5cd7568ad37302d11 | refs/heads/master | 2023-07-19T20:16:02.792007 | 2023-07-07T16:58:15 | 2023-07-07T16:58:15 | 67,760,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,006 | py | """Wrapper around Sagemaker InvokeEndpoint API."""
from typing import Any, Dict, List, Optional
from pydantic import BaseModel, Extra, root_validator
from langchain.embeddings.base import Embeddings
from langchain.llms.sagemaker_endpoint import ContentHandlerBase
class SagemakerEndpointEmbeddings(BaseModel, Embeddi... | [
"henry95@gmail.com"
] | henry95@gmail.com |
c9e58e81a27a870849d3bfed9fa9d0ddacf18134 | 54f352a242a8ad6ff5516703e91da61e08d9a9e6 | /Source Codes/AtCoder/abc038/D/4502471.py | 1539cc5c3366975fe7df695b0a53f39763ae4186 | [] | 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 | 790 | py | import sys
import bisect
input=sys.stdin.readline
N=int(input())
data=[tuple(map(int,input().split())) for _ in range(N)]
data.sort()
data2=[]
now=[]
for d in data:
if len(now)==0:
now.append(d)
continue
if now[0][0]!=d[0]:
now.sort(key=lambda x:x[1],reverse=True)
d... | [
"kwnafi@yahoo.com"
] | kwnafi@yahoo.com |
acf6fb9f47e54f8b0c090b7fe6dc50e0a77e2318 | e634f90bc999a2903c92f66384a867a474b40d9c | /Source/Main.py | f6c46809d31de7e9aa6b1e9aee2033be4f65fe5d | [
"MIT"
] | permissive | Dmunch04/Plistr | 69f7217fbea24e48870667c8507845ddd1a63547 | 39d70e3b9f1a827d48a6a951617da0892978515c | refs/heads/master | 2020-07-15T21:16:55.539440 | 2019-09-01T14:27:04 | 2019-09-01T14:27:04 | 205,650,024 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 288 | py | from Window import Window
from Helpers import Loader
class Plistr:
def __init__ (self, Filename):
self.Filename = Filename
self.Items = Loader.LoadFile (self.Filename)
self.Window = Window (Filename)
def Run (self):
self.Window.Run (self.Items)
| [
"daniellmunch@gmail.com"
] | daniellmunch@gmail.com |
7fede01bad23361cbb201f9ae03d1b537a916785 | 5068bc927a7fff73923ce95862ff70120160c491 | /electrum_axe/plugins/ledger/qt.py | 2c36c1397995c78a133b363be3051db888fc4fa6 | [
"MIT"
] | permissive | AXErunners/electrum-axe | cdbce2dbb92e23e32e9f9b733ae9f65f51c0ae9f | 7ef05088c0edaf0688fb167df353d6da619ebf2f | refs/heads/master | 2021-04-03T09:40:37.109317 | 2020-08-27T16:53:18 | 2020-08-27T16:53:18 | 124,705,752 | 336 | 75 | MIT | 2020-10-17T18:30:25 | 2018-03-10T23:00:48 | Python | UTF-8 | Python | false | false | 2,709 | py | from functools import partial
from PyQt5.QtCore import pyqtSignal
from PyQt5.QtWidgets import QInputDialog, QLabel, QVBoxLayout, QLineEdit
from electrum_axe.i18n import _
from electrum_axe.plugin import hook
from electrum_axe.wallet import Standard_Wallet
from electrum_axe.gui.qt.util import WindowModalDialog
from .... | [
"slowdive@me.com"
] | slowdive@me.com |
7b5d81cbcf4171c2438e06c851ff4e7d2d6a0401 | 76a8ea60480331f0f61aeb61de55be9a6270e733 | /downloadable-site-packages/statsmodels/sandbox/rls.py | 412cc4d05051951d88945554d1d310bacbbc9c20 | [
"MIT"
] | permissive | bhagyas/Pyto | cd2ec3f35bec703db4ac29b56d17abc4bf03e375 | 907024a9b3e04a2a9de54976778c0e1a56b7b83c | refs/heads/master | 2022-11-19T13:05:07.392454 | 2020-07-21T17:33:39 | 2020-07-21T17:33:39 | 281,886,535 | 2 | 0 | MIT | 2020-07-23T07:48:03 | 2020-07-23T07:48:02 | null | UTF-8 | Python | false | false | 5,136 | py | """Restricted least squares
from pandas
License: Simplified BSD
"""
import numpy as np
from statsmodels.regression.linear_model import GLS, RegressionResults
class RLS(GLS):
"""
Restricted general least squares model that handles linear constraints
Parameters
----------
endog: array_like
... | [
"adrilabbelol@gmail.com"
] | adrilabbelol@gmail.com |
8b7311824ab9a23ac88a7ac5fed9d86293761a1f | 6d5d161269e66345a32e0e221f2dbce2a07c742a | /async_sched/server/messages.py | afca8f5818cc66f2f69f7051f2ae055bd29a5126 | [
"MIT"
] | permissive | justengel/async_sched | d286c79eb6a705769aa8e59da7508d5995acb523 | f980722d51d15025522b2265426b0188ff368418 | refs/heads/master | 2022-11-07T18:24:50.843013 | 2020-07-01T02:39:55 | 2020-07-01T02:39:55 | 268,154,385 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 993 | py | from typing import List
from serial_json import DataClass, field
from ..schedule import Schedule
__all__ = ['DataClass', 'Message', 'Error', 'Quit', 'Update', 'RunCommand', 'ScheduleCommand',
'RunningSchedule', 'ListSchedules', 'StopSchedule']
class Message(DataClass):
message: str
class Error(Da... | [
"jtengel08@gmail.com"
] | jtengel08@gmail.com |
c925362f7a177e0811dfb0b9035d7ffefbf1ec34 | 5c6ccc082d9d0d42a69e22cfd9a419a5b87ff6cd | /coursera/pythonHse/fourth/4.py | b721d875cacc3f42d7207d20fca81d8db4118054 | [] | no_license | kersky98/stud | 191c809bacc982c715d9610be282884a504d456d | d395a372e72aeb17dfad5c72d46e84dc59454410 | refs/heads/master | 2023-03-09T20:47:25.082673 | 2023-03-01T08:28:32 | 2023-03-01T08:28:32 | 42,979,807 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,342 | py | # Даны два действительных числа x и y. Проверьте, принадлежит ли точка с
# координатами (x,y) заштрихованному квадрату (включая его границу). Если
# точка принадлежит квадрату, выведите слово YES, иначе выведите слово NO.
# На рисунке сетка проведена с шагом 1.
# Решение должно содержать функцию IsPointInSquare(x... | [
"kerskiy-ev@pao.local"
] | kerskiy-ev@pao.local |
d603fc4e9d43b4652a8ac0e851fac084cd7232b0 | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/CodeJamCrawler/16_0_1/r4ghu/count.py | 41bfd1280434461d73ff3977ca2f3160ac163ca2 | [] | no_license | DaHuO/Supergraph | 9cd26d8c5a081803015d93cf5f2674009e92ef7e | c88059dc66297af577ad2b8afa4e0ac0ad622915 | refs/heads/master | 2021-06-14T16:07:52.405091 | 2016-08-21T13:39:13 | 2016-08-21T13:39:13 | 49,829,508 | 2 | 0 | null | 2021-03-19T21:55:46 | 2016-01-17T18:23:00 | Python | UTF-8 | Python | false | false | 688 | py | input = open('input.txt','r')
print 'Name of the file:', input.name
results = []
T = int(input.readline())
for t in range(T):
dic = {}
l = []
n = int(input.readline())
if n==0:
results.append('INSOMNIA')
for i in range(1,25*n):
p = list(str(i*n))
for j in p:
... | [
"[dhuo@tcd.ie]"
] | [dhuo@tcd.ie] |
ac92c6cc494073720f64ded6d9dfce7c9f5e7603 | cc72013ede1b3bb02c32a3d0d199be4f7986c173 | /ch10/cballmaxheight.py | d1b7e7d7f8bd3735de66883c44cae85de31b5936 | [] | no_license | alextickle/zelle-exercises | b87d2a1476189954565f5cc97ee1448200eb00d4 | b784ff9ed9b2cb1c56e31c1c63f3e2b52fa37875 | refs/heads/master | 2021-01-19T00:33:19.132238 | 2017-09-14T23:35:35 | 2017-09-14T23:35:35 | 87,182,609 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 645 | py | from classProjectile import Projectile
def getInputs():
a = input("Enter the launch angle (in degrees): ")
v = input("Enter the initial velocity (in meters/sec): ")
h = input("Enter the initial height (in meters): ")
t = input("Enter the time initerval between position calculations: ")
return a, v, h, t
def mai... | [
"alexander.tickle@gmail.com"
] | alexander.tickle@gmail.com |
cacda09aaaef2e4170fc9593a18b9c06078c39cf | 2e7814885646a56ffd3db0883a1c3f790cb9de46 | /src/zojax/wiki/browser/wiki.py | 083aa26c9e5f90104938fd17f906a76c8a3f4019 | [
"ZPL-2.1"
] | permissive | Zojax/zojax.wiki_ | 1afa247c8797ac7316d6689d77d9c61a991eda0b | b0b9a3c3a91ffb725c5ef7e330632f18dab3d75e | refs/heads/master | 2020-04-01T15:33:32.556439 | 2014-01-29T18:31:29 | 2014-01-29T18:31:29 | 2,038,571 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,643 | py | ##############################################################################
#
# Copyright (c) 2009 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | [
"andrey.fedoseev@gmail.com"
] | andrey.fedoseev@gmail.com |
e4841e48dd2798ed1c2ba400e9e3a8c6b9d95714 | cb73499c5b15cead88751dfca21cefae81483501 | /docs/conf.py | 6f333b8b3d818eebd843b06f85a9f8c9dc169e27 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | RichardPflaum/GalSim | dcbabfbdbd41a0ebe909ad3c28e47daabcd92818 | 05060e583b2465ca8e2b258126c2ba8257e358f1 | refs/heads/main | 2023-03-23T05:59:05.349282 | 2021-02-05T23:11:55 | 2021-02-06T00:49:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,740 | py | # Copyright (c) 2012-2020 by the GalSim developers team on GitHub
# https://github.com/GalSim-developers
#
# This file is part of GalSim: The modular galaxy image simulation toolkit.
# https://github.com/GalSim-developers/GalSim
#
# GalSim is free software: redistribution and use in source and binary forms,
# with or w... | [
"michael@jarvis.net"
] | michael@jarvis.net |
957b6dfafdf01768a405f18e1263f60e635d7d82 | 209c876b1e248fd67bd156a137d961a6610f93c7 | /python/paddle/fluid/tests/unittests/collective/fleet/test_auto_checkpoint1.py | 2db7b1e8f80682670d2ed4cf48d6df45479f95a9 | [
"Apache-2.0"
] | permissive | Qengineering/Paddle | 36e0dba37d29146ebef4fba869490ecedbf4294e | 591456c69b76ee96d04b7d15dca6bb8080301f21 | refs/heads/develop | 2023-01-24T12:40:04.551345 | 2022-10-06T10:30:56 | 2022-10-06T10:30:56 | 544,837,444 | 0 | 0 | Apache-2.0 | 2022-10-03T10:12:54 | 2022-10-03T10:12:54 | null | UTF-8 | Python | false | false | 1,771 | py | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | [
"noreply@github.com"
] | Qengineering.noreply@github.com |
d3336030c75230312fe64f70d821674c7b8b0832 | 744096e063ffb4cdb017f60e6dfae410a51c789a | /ml/m08_wine2_keras.py | 06ebe62cf59103482d4d188d56d1958c5811a866 | [] | no_license | elf0508/Study-bit | 59ddab507b02c13a45913c05a4799ff946e63f95 | a773d7643cbb1c0008e7ea01c32615c9e6e3678c | refs/heads/master | 2022-12-31T11:53:44.344693 | 2020-10-16T09:04:01 | 2020-10-16T09:04:01 | 270,950,252 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,792 | py | # keras 로 만들기
# 다중분류
import numpy as np
import pandas as pd
from keras.models import Sequential, Input
from keras.layers import Dense, Dropout
from keras.callbacks import EarlyStopping
from sklearn.svm import SVC
from sklearn.ensemble import RandomForestClassifier
from sklearn.neighbors import KNeighborsClassifier
fro... | [
"elf0508@naver.com"
] | elf0508@naver.com |
d15dd199e6c86808b473f526e605111671f36034 | e11dff811ca981f428644fd70d10a7369c671bcb | /src/tools/ecos/cvxpy/cvxpy/problems/objective.py | 13293559446a04fad84799c55d14674f9eada4e7 | [
"GPL-3.0-only",
"GPL-3.0-or-later",
"MIT"
] | permissive | riadnassiffe/Simulator | 3c4a036b5635534929fdb04b0e9c96d64c0da71f | 7d9ff09f26367d3714e3d10be3dd4a9817b8ed6b | refs/heads/master | 2021-06-20T09:31:36.033427 | 2021-04-17T00:03:17 | 2021-04-17T00:03:17 | 16,033,879 | 0 | 0 | MIT | 2021-03-22T23:20:34 | 2014-01-18T20:58:10 | Jupyter Notebook | UTF-8 | Python | false | false | 2,758 | py | """
Copyright 2013 Steven Diamond
This file is part of CVXPY.
CVXPY is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
CVXPY is distributed i... | [
"riad.nassiffe@gmail.com"
] | riad.nassiffe@gmail.com |
76faca35f33e12cea802b44068cb8aa14880293c | e0980f704a573894350e285f66f4cf390837238e | /.history/menus/models_20201030115229.py | fe2fb42e539b2ceeceff986fda84db20415ecd35 | [] | no_license | rucpata/WagtailWebsite | 28008474ec779d12ef43bceb61827168274a8b61 | 5aa44f51592f49c9a708fc5515ad877c6a29dfd9 | refs/heads/main | 2023-02-09T15:30:02.133415 | 2021-01-05T14:55:45 | 2021-01-05T14:55:45 | 303,961,094 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 670 | py | from django.db import models
from django_extensions.db.fields import AutoSlugField
from modelcluster.models import ClusterableModel
from wagtail.core.models import Orderable
from wagtail.admin.edit_handlers import FieldPanel
class MenuItem(Orderable):
link_title = models.CharField(blank )
link_url = externa... | [
"rucinska.patrycja@gmail.com"
] | rucinska.patrycja@gmail.com |
a550d9b8ed43cb34d14d403265c426d95c868ae4 | 74091dce735f281188d38d2f00d1a68e1d38ff7a | /design_patterns/observer/with_observer/observer_abc/__init__.py | fc74947e39033cd126ee8f4e688bf13e5b204ab0 | [] | no_license | nbiadrytski-zz/python-training | 96741aa0ef37bda32d049fde5938191025fe2924 | 559a64aae2db51e11812cea5ff602f25953e8070 | refs/heads/master | 2023-05-07T04:08:23.898161 | 2019-12-10T12:12:59 | 2019-12-10T12:12:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 175 | py | from design_patterns.observer.with_observer.observer_abc.observer_abc import AbsObserver
from design_patterns.observer.with_observer.observer_abc.subject_abc import AbsSubject | [
"Mikalai_Biadrytski@epam.com"
] | Mikalai_Biadrytski@epam.com |
2fd0d81d5757eb5301956fc98513bcb6f034e338 | 7410903c6cd5ef35c592af00c934fb21c369cbf2 | /00_Code/01_LeetCode/15_3Sum.py | 48ca0cefdb8c2e3ea535801f329f89a117a056e8 | [
"MIT"
] | permissive | KartikKannapur/Algorithms | f4e4726170599db0622d18e8c06a382e9bce9e77 | 66e3c8112826aeffb78bd74d02be1a8d1e478de8 | refs/heads/master | 2020-12-25T18:32:41.086518 | 2020-10-19T02:59:47 | 2020-10-19T02:59:47 | 93,961,043 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,341 | py | """
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.
Note: The solution set must not contain duplicate triplets.
For example, given array S = [-1, 0, 1, 2, -1, -4],
A solution set is:
[
[-1, 0, 1],
[-1, -1,... | [
"kartikkannapur@gmail.com"
] | kartikkannapur@gmail.com |
28d3ad73c52557c945c1d6527b8e8b08169df786 | 7370b067695d6636273ee635b3e78b022be16a62 | /fullstack/vagrant/forum/forumdb.py | 403e89ac5b0de33e55b2add36c6f6753c544d7d6 | [] | no_license | jreiher2003/intro-to-relational-databases | 56b2f66e5f7a23144b8a1f011d0bcedcf5a07da3 | a589cb736757708635b7b6bb6688cd2d9d574a85 | refs/heads/master | 2020-12-24T13:44:50.200881 | 2015-04-14T14:45:54 | 2015-04-14T14:45:54 | 33,775,469 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,031 | py | #
# Database access functions for the web forum.
#
import psycopg2
import time
import bleach
## Get posts from database.
def GetAllPosts():
'''Get all the posts from the database, sorted with the newest first.
Returns:
A list of dictionaries, where each dictionary has a 'content' key
pointing to... | [
"jeffreiher@gmail.com"
] | jeffreiher@gmail.com |
d9115b79d1e0ebf6bd315330b1bc516e8c40b72b | c224200e8d273b2d215e1b68c8bb7798fe0ca714 | /python/ccard/luhn.py | 4d988dfaa53f5803ebe99205be2b09fe9e6a145e | [] | no_license | mpranj/mcandre | c9c6db22be95f71a350bf05e922eb03befa9c6b1 | 9bf5c3ab0ee24ab7041ef4732d0017e869ae683d | refs/heads/master | 2021-01-18T12:46:37.096984 | 2014-06-26T03:46:56 | 2014-06-26T03:46:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 246 | py | """Luhn checksum"""
def luhn(n):
"""luhnsum(int) -> bool
Mod 10 checksum by Hans Peter Luhn (1896-1964)
"""
s = 0
while n:
r = n % 100
n /= 100
z = r % 10
r /= 10 * 2
s += r / 10 + r % 10 + z
return s % 10 == 0
| [
"andrew.pennebaker@gmail.com"
] | andrew.pennebaker@gmail.com |
0dc249d0af3a80caa218ae4f6819b1a99c530f06 | 92be2d8c4a64d5f8c43341be7f1e36b81fce56ab | /src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/private_link_scope/private_endpoint_connection/__cmd_group.py | 51676cfe96f1d5df414faa020e70a8f2b2eda9b2 | [
"MIT",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"MPL-2.0",
"LGPL-2.1-only",
"Apache-2.0",
"LGPL-2.1-or-later",
"BSD-2-Clause"
] | permissive | allanpedroni/azure-cli | b31d3347f377208b502231266d4839196e574c4b | 4e21baa4ff126ada2bc232dff74d6027fd1323be | refs/heads/dev | 2023-08-31T18:27:03.240944 | 2023-08-31T08:49:58 | 2023-08-31T08:49:58 | 204,767,533 | 0 | 0 | MIT | 2023-09-14T13:32:41 | 2019-08-27T18:41:15 | Python | UTF-8 | Python | false | false | 718 | py | # --------------------------------------------------------------------------------------------
# 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 aaz-dev-tools
# --------------------------------... | [
"noreply@github.com"
] | allanpedroni.noreply@github.com |
a6dec3fb3b780def85cc7985436fbc0609ee67c1 | 612b2dcd643ca7b36ac141a1d62c73b8e5f5d1aa | /06_operacje_na_plikach_2019-10-28/zad_3_cytaty_5_linii.py | 8b8614a0d4f0a6e66e0f536e5657adf3eda1e388 | [] | no_license | MirekPz/PyCode | e41fecb3bec8b40e41efe9db1be036038b94da1b | 95e1c349beb4fcd0ec1d8c36d000665f28ee794f | refs/heads/master | 2020-08-07T10:54:37.488009 | 2020-02-10T08:41:17 | 2020-02-10T08:41:17 | 213,421,248 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 219 | py | """
Wyświetl tylko 5 pierwszych linii
"""
filename = "cytaty.txt"
with open(filename, encoding="UTF-8") as file:
for i in range(5):
list_of_quotations = file.readline()
print(list_of_quotations)
| [
"mirek@info-tur.pl"
] | mirek@info-tur.pl |
2482f871dff5c01612e22eef2f7419c903a53bca | eb473c4b2ca6cfdfa11536a460b88f2aa6dff8c8 | /lib/dataformat/blockreplica.py | d072623269f1bd55ed55bcb45d6214af1483197b | [] | no_license | thannan6/dynamo | 4ff13bd85c9e15c755e89e67e26eaa214e0a5b39 | 8db847b8d0094890110cfc805a34703fb89f564f | refs/heads/master | 2021-05-10T00:01:52.252731 | 2018-01-22T02:35:27 | 2018-01-22T02:35:27 | 118,819,891 | 0 | 0 | null | 2018-01-24T20:45:31 | 2018-01-24T20:45:31 | null | UTF-8 | Python | false | false | 4,797 | py | from exceptions import ObjectError
class BlockReplica(object):
"""Block placement at a site. Holds an attribute 'group' which can be None.
BlockReplica size can be different from that of the Block."""
__slots__ = ['_block', '_site', 'group', 'is_complete', 'is_custodial', 'size', 'last_update', 'files']
... | [
"yiiyama@mit.edu"
] | yiiyama@mit.edu |
851052faa0844695302437d571d870c4409cc072 | 3ef70fe63acaa665e2b163f30f1abd0a592231c1 | /stackoverflow/venv/lib/python3.6/site-packages/cryptography/hazmat/backends/openssl/x25519.py | 9aab25b86adb28ad744e0cc3682073d4dfda55a1 | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | permissive | wistbean/learn_python3_spider | 14914b63691ac032955ba1adc29ad64976d80e15 | 40861791ec4ed3bbd14b07875af25cc740f76920 | refs/heads/master | 2023-08-16T05:42:27.208302 | 2023-03-30T17:03:58 | 2023-03-30T17:03:58 | 179,152,420 | 14,403 | 3,556 | MIT | 2022-05-20T14:08:34 | 2019-04-02T20:19:54 | Python | UTF-8 | Python | false | false | 5,580 | py | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import warnings
from cryptography import utils
from cryptography.hazmat.... | [
"354142480@qq.com"
] | 354142480@qq.com |
0c53c8c3135c11ac44c7ed5ad9f0094da5ce9c6a | 839b26d2d837f256423c11908a2a3618ab8a23f3 | /dashboard/dashboard/update_bug_with_results_test.py | 7b4282e95a1380e535001797e6710cb237eb8f78 | [
"BSD-3-Clause"
] | permissive | Mdlglobal-atlassian-net/catapult | 79be5d4ec5d681c1d2f37ae83534a02f4a4ec72a | e9a386951413e7cbf983abf968626b2e5097fc38 | refs/heads/master | 2022-02-27T15:18:45.524790 | 2020-06-01T07:12:27 | 2020-06-01T22:57:01 | 268,672,431 | 0 | 1 | BSD-3-Clause | 2020-06-02T01:31:05 | 2020-06-02T01:31:04 | null | UTF-8 | Python | false | false | 2,403 | py | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import unittest
import mock
from dashboard im... | [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
8f926e08fc1dc61bbc483c5c73e906cf776d5658 | 6930a434c0506d44bf8a8e81cb86e95c219c3a77 | /python/day19/code/bool.py | dbd9efd62a9608472ca8da6ae9bf5321b9911546 | [] | no_license | Conquerk/test | ed15d5603538340559556c9e0f20cc61ad3e4486 | 7ff42c99b8a2132c6dd1c73315ff95cfef63a8f6 | refs/heads/master | 2020-04-19T01:47:28.322929 | 2019-01-28T01:52:00 | 2019-01-28T01:52:00 | 167,882,236 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 256 | py | class a:
# def __bool__(self):
# print("bool方法被调用")
# return False
def __len__(self):
print('len被调用')
return 5
x=a()
print(bool(x))
if x :
print("x 为真值")
else:
print("x 为假值") | [
"tarena@tedu.cn"
] | tarena@tedu.cn |
4a66f501d21dc0e21b25cd557749a229c108d7bf | f85ce2baf753d65e8666bbda062acbdb0ccdb5ad | /leetcode/venv/lib/python2.7/site-packages/pyutil/common/multi_proxy.py | 4464833378477d0125b57f50987802b986064008 | [] | no_license | KqSMea8/PycharmProjects | 2a9d3fa59d08c77daf63be427da27695d4dea471 | c592d879fd79da4e0816a4f909e5725e385b6160 | refs/heads/master | 2020-04-14T11:54:56.435247 | 2019-01-02T10:15:36 | 2019-01-02T10:15:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 647 | py | # coding=utf-8
__author__ = 'qiukun'
class MultiProxy():
"""
typical usage:
p = MultiProxy([a, b])
对 p 的方法调用会应用到 a, b,返回 b(最后一个对象)对应方法的返回值
e.g.
buf = p.r()
p.write()
"""
def __init__(self, objs):
"""
:param objs: a iterator of objs to be proxyed.
:return: th... | [
"zhangyifeng@bytedance.com"
] | zhangyifeng@bytedance.com |
ebca6a39db8c0a22574b611a0271ac7bc9a10d1d | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02791/s398923350.py | 525b6e69293b56cf550f10a02c0494389a8a6380 | [] | 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 | 351 | py | import sys
readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)
def main():
N = int(readline())
P = list(map(int, readline().split()))
cur = N + 1
ans = 0
for x in P:
if cur > x:
ans += 1
cur = x
print(ans)
if __na... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
ccccc364d5e5480a14cd01e9facbb6cb9445987c | 3e24611b7315b5ad588b2128570f1341b9c968e8 | /pacbiolib/pacbio/pythonpkgs/pbtranscript/lib/python2.7/site-packages/pbtranscript/ice/make_input_fasta_fofn.py | 77356562bf1686d47a5b7653eb24734ce3d41869 | [
"BSD-2-Clause"
] | permissive | bioCKO/lpp_Script | dc327be88c7d12243e25557f7da68d963917aa90 | 0cb2eedb48d4afa25abc2ed7231eb1fdd9baecc2 | refs/heads/master | 2022-02-27T12:35:05.979231 | 2019-08-27T05:56:33 | 2019-08-27T05:56:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,072 | py | #! python
"""Given input.fofn, for each movie.bas|bax.h5 file in the fofn,
call pls2fasta to generate a movie.bax|bas.h5.fasta file in a
specified directory, and then trim both ends of each read in fasta
files. Finally, add all these fasta files to fasta_fofn
(e.g., input.fasta.fofn).
"""
import logging
import sys
imp... | [
"409511038@qq.com"
] | 409511038@qq.com |
99b4337e7934e957fe1496cda64778117b102922 | bc2a85e8dd9244f89e2f1801cc19d570a87c74ed | /Leetcode/Algorithms/Easy/Arrays/MeetingTime.py | 4e389ed460c2d8ac9a19f0e4c01beffd544cb5ce | [] | no_license | christian-miljkovic/interview | 1cab113dbe0096e860a3ae1d402901a15e808e32 | 63baa1535b788bc3e924f3c24a799bade6a2eae3 | refs/heads/master | 2023-01-11T14:53:09.304307 | 2020-02-04T17:35:12 | 2020-02-04T17:35:12 | 193,549,798 | 0 | 0 | null | 2023-01-05T05:56:15 | 2019-06-24T17:28:50 | Python | UTF-8 | Python | false | false | 1,944 | py | """
Time Planner
Implement a function meetingPlanner that given the availability, slotsA and slotsB, of two people and a meeting duration dur, returns the earliest time slot that works for both of them and is of duration dur. If there is no common time slot that satisfies the duration requirement, return an empty array... | [
"cmm892@stern.nyu.edu"
] | cmm892@stern.nyu.edu |
116c8f86cfaa52e4e72d3024334d871d5eb5ebab | 8311a0bcf3f2126d622f928483ce2ea9d6a7cb0d | /Code/Matthew/django/mysite/polls/migrations/0001_initial.py | 967a82248a77534828deedc67a2aec779b4c3227 | [] | no_license | guam68/class_iguana | 857247dca0ff732d11f7fb0d3dc761ec83846c94 | e4359d32dfe60423a643c21df5636669016ad2c0 | refs/heads/master | 2020-05-01T06:33:22.611127 | 2019-03-13T23:07:41 | 2019-03-13T23:07:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,165 | py | # Generated by Django 2.1.5 on 2019-02-07 18:41
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Choice',
fields=[
... | [
"flux2341@gmail.com"
] | flux2341@gmail.com |
aa59fe19a4acba2c251b00e81b73e30f348144c8 | 9e20f7e71faa2853516f88ee7672e1323d12e8f7 | /seq_lda/algorithms/__init__.py | d3ed380d3428aab45ed45e014fe016bca4131374 | [] | no_license | e2crawfo/seq_lda | 3270a07781369d318c0cf2e75cdbfee96423c52d | ebe3caea127575f6e54884bf0d32ac6d4a876d4e | refs/heads/master | 2020-09-17T18:55:19.562861 | 2017-03-28T16:10:52 | 2017-03-28T16:10:52 | 67,877,820 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 145 | py | from .markov_lda import generate_markov_chains
from .lda import LDA
from .mssg import MSSG, SingleMSSG
from .baseline import OneByOne, Aggregate
| [
"eric.crawford@mail.mcgill.ca"
] | eric.crawford@mail.mcgill.ca |
be6ac3323527ef02eb9d8a966231f7f830aaed04 | 43ff15a7989576712d0e51f0ed32e3a4510273c0 | /tools/pocs/bugscan/exp_885.py | 701317e53735eabbc5a8dcc364e6082aba740f46 | [] | no_license | v1cker/kekescan | f2b51d91a9d6496e2cdc767eb6a600171f513449 | 3daa1775648439ba9e0003a376f90b601820290e | refs/heads/master | 2020-09-19T16:26:56.522453 | 2017-06-15T02:55:24 | 2017-06-15T02:55:24 | 94,495,007 | 6 | 3 | null | null | null | null | UTF-8 | Python | false | false | 874 | py | # -*- coding: utf-8 -*-
from dummy import *
from miniCurl import Curl
curl = Curl()
#/usr/bin/python
#-*- coding: utf-8 -*-
#Refer http://www.wooyun.org/bugs/wooyun-2015-0110861
#__Author__ = 上善若水
#_PlugName_ = 08CMS_sql Plugin
#_FileName_ = 08CMS_sql.py
def assign(service, arg):
if service == "08cms"... | [
"liyueke@huobi.com"
] | liyueke@huobi.com |
c0c2166d1a614fb9c14325a21fda4c3df736ef1f | 3b9338d99cf8090387418e32ca81617f072c39fb | /waflib/extras/dumbpreproc.py | bc4b2d04061ab96a7da92066adb4f81e8c95e0e8 | [] | no_license | sillsdevarchive/wsiwaf | 8ca14c286bafceb9ee6fad740b64ad7131282dc3 | 2dcddafc3602a7220acbe995df4ba85abb06b767 | refs/heads/master | 2020-12-30T17:10:21.701380 | 2017-05-12T05:12:17 | 2017-05-12T05:12:17 | 91,052,898 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,490 | py | #!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2006-2010 (ita)
"""
Dumb C/C++ preprocessor for finding dependencies
It will look at all include files it can find after removing the comments, so the following
will always add the dependency on both "a.h" and "b.h"::
#include "a.h"
#ifdef B
#include "b.h"
... | [
"tnagy1024@f0382ac9-c320-0410-b3f0-b508d59f5a85"
] | tnagy1024@f0382ac9-c320-0410-b3f0-b508d59f5a85 |
987fa66a52474194186e6d244ee565863549eaf6 | 53dd5d2cfb79edc87f6c606bbfb7d0bedcf6da61 | /.history/EMR/EMRryzd_2_20190507094011.py | d2f51d07e0695ada05beddc4e3e39e063c14d700 | [] | no_license | cyc19950621/python | 4add54894dc81187211aa8d45e5115903b69a182 | d184b83e73334a37d413306d3694e14a19580cb0 | refs/heads/master | 2020-04-11T20:39:34.641303 | 2019-07-02T12:54:49 | 2019-07-02T12:54:49 | 162,078,640 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,283 | py | #-*- coding: UTF-8 -*-
#本文件用于数据清洗
import time
import math
import os
import sys
import os, os.path,shutil
import codecs
import EMRdef
import re
emrtxts = EMRdef.txttq(u'D:\DeepLearning ER\EHRryzd')#txt目录提取
hxjb = open(r'D:\python\EMR\hxjbml.txt',errors="ignore")#呼吸疾病目录
hxjbdic = hxjb.readlines()#读行
ryzd=[]
for emrtxt... | [
"1044801968@qq.com"
] | 1044801968@qq.com |
4052771b1b4311c09a293921817f66b82411e14f | e095a91a3424ecc364c4532e8fc705b728a0d1b1 | /CodeWars/补充知识/reduce函数.py | cfbe488542ecf69f30da70eb19144d14b6799a9e | [] | no_license | Anakinliu/PythonProjects | caed257e71d2e52f691abc5095c4aca5c052feb2 | 2246794a88d06eaa381db1b3a72e9bc54a315dd7 | refs/heads/master | 2021-06-03T05:51:09.319613 | 2021-01-26T02:35:38 | 2021-01-26T02:35:38 | 101,546,309 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,005 | py | from functools import reduce
from itertools import groupby
def sum(a, b):
return a + b
def mul(a, b):
return a * b
def fuck(v, _):
print('v is: ', v)
v.append(0)
return v
lst = range(2)
# reduce函数参数: 函数名, 序列[,初始化序列]
print(reduce(sum, lst))
# 计算阶乘。。。
print(reduce(mul, range(1, 4)))
lst2 = [1, 3,... | [
"gugeliuyinquan@gmail.com"
] | gugeliuyinquan@gmail.com |
4d13f16a6de050457f0c137b74e3f6643612f28d | 6b9b032a5516c8d7dbb26deeb1b189022f8f9411 | /LeetCode/dp/91.解码方法.py | c999d3a7c5e8a176bfe03eb5318fd70a5954222c | [] | no_license | mrmenand/Py_transaction | 84db99a0010ae90f43fba6b737d7035e48af55fb | 7e82422c84ad699805cc12568b8d3d969f66a419 | refs/heads/master | 2021-07-13T21:15:03.714689 | 2020-06-21T11:49:31 | 2020-06-21T11:49:31 | 176,281,954 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 392 | py | # 91. 解码方法
from functools import lru_cache
class Solution:
@lru_cache()
def numDecodings(self, s: str) -> int:
if not s:
return 1
res = 0
if len(s) >= 1 and s[0] != "0":
res += self.numDecodings(s[1:])
if len(s) >= 2 and s[0] != "0" and int(s[:2]) <= 26:
... | [
"1006024749@qq.com"
] | 1006024749@qq.com |
8be4be017c6af7fce4bd719c6b78a351b1b14568 | c9000e5e30825b29febbefa5ad00da1f57551f8e | /02/fandengyuan/homework.py | c6bce72ffa5f56803c26555e16520532b283fbab | [] | no_license | xiaotian1991/actual-10-homework | 81c58b24f58fc87e4890f1475ad83de8b66ee53b | 0b379ca6189f843f121df4db5814c83262f9981a | refs/heads/master | 2021-06-12T23:35:52.954510 | 2017-03-24T07:41:18 | 2017-03-24T07:41:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 268 | py | arr = [3,1,5,9,2,11,7]
arr0 = []
for i in range(len(arr)):
arr0.append(int(arr[i]))
m = len(arr0)-1
while m >= 1 and arr0[m] < arr0[m-1]:
arr0[m],arr0[m-1] = arr0[m-1],arr0[m]
m = m - 1
print arr0
| [
"shengxinjing@addnewer.com"
] | shengxinjing@addnewer.com |
d7ea612d308d7b4f02c590f2d7d783457b7fee26 | 3b60e6f4bbc011003ac4929f01eb7409918deb79 | /Analysis_v1/Simulation/Pythia/genfragments/ADDGravToGG_NegInt-0_LambdaT-6500_M-4000To6500_TuneCUEP8M1_13TeV-pythia8_cfi.py | 8a74a89ef9ff1b0945512ccf71c71c4c03d5767a | [] | no_license | uzzielperez/Analyses | d1a64a4e8730325c94e2bc8461544837be8a179d | 1d66fa94763d7847011ea551ee872936c4c401be | refs/heads/master | 2023-02-09T04:54:01.854209 | 2020-09-07T14:57:54 | 2020-09-07T14:57:54 | 120,850,137 | 0 | 0 | null | 2020-06-17T16:48:16 | 2018-02-09T03:14:04 | C++ | UTF-8 | Python | false | false | 1,266 | py | import FWCore.ParameterSet.Config as cms
from Configuration.Generator.Pythia8CommonSettings_cfi import *
from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import *
generator = cms.EDFilter("Pythia8GeneratorFilter",
maxEventsToPrint = cms.untracked.int32(1),
pythiaPylistVerbosity = cms.untracked.int32(1... | [
"uzzie.perez@cern.ch"
] | uzzie.perez@cern.ch |
2ed4905e9b0d4556acdfe1ddf6a5e250b43f2f6f | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2273/60870/314985.py | 5e53cfd0963d3bbed85c252351f8e04244c40b52 | [] | 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 | 1,702 | py | num_test = int(input())
info_list = []
for i in range(num_test):
info = input().split()
info = [int(x) for x in info]
for j in range(info[0]):
data = input().split()
data = [int(x) for x in data]
info_list.append(data)
if info_list == [[0, 1, 1], [1, 1, 1], [1, 1, 3], [2, 1, 10], [3,... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
94dc35c61b39b874b3b81884b9524967947c0b81 | c3eda1a67e2be5b200e6c9f5a80f20fbcce75bcb | /persephone/builds/migrations/0001_initial.py | 0b7a613e655fa3b74eb0ec33645b168124808fac | [
"MIT"
] | permissive | karamanolev/persephone | b389a871f6fae58525eeedaec3739ec563c9b934 | 6d1887ae4e1d1941da3dbc416901e9de4764cbbb | refs/heads/master | 2023-05-14T20:28:24.209056 | 2023-04-26T20:50:46 | 2023-04-27T10:32:25 | 86,364,458 | 14 | 2 | MIT | 2023-04-11T10:10:50 | 2017-03-27T17:29:12 | JavaScript | UTF-8 | Python | false | false | 4,720 | py | # Generated by Django 3.0.5 on 2020-04-11 23:17
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='GlobalSet... | [
"ivailo@karamanolev.com"
] | ivailo@karamanolev.com |
5931b02613512b291a1c6c3ed56317fd9de7b0c7 | 4dd1d8fa59e20061e2c12e540fc52b1b305e575b | /source/sims-2/vapor-box/s7/mkmov.py | fc6d4a9fa9ec7401b461a45e20313be61bfd08fe | [
"MIT"
] | permissive | ammarhakim/ammar-simjournal | f63521906a97d55ab290a5960d94758139944c89 | 5019f4723e20db80a20db6f2bd454c2fd3241412 | refs/heads/master | 2023-06-08T08:18:11.722779 | 2023-06-02T15:06:43 | 2023-06-02T15:06:43 | 204,050,516 | 3 | 3 | null | 2022-02-01T16:53:13 | 2019-08-23T18:28:44 | Lua | UTF-8 | Python | false | false | 3,609 | py | from pylab import *
import tables
import euler
import pylab
import tables
import math
import numpy
import pylab
import numpy
from matplotlib import rcParams
import matplotlib.pyplot as plt
# customization for figure
rcParams['lines.linewidth'] = 2
rcParams['font.size'] = 18
rcParams['xtick... | [
"11265732+ammarhakim@users.noreply.github.com"
] | 11265732+ammarhakim@users.noreply.github.com |
5b2224f3c84090e21c38bb5254fff1fc2cc14a75 | 114c1f7ceff04e00591f46eeb0a2eb387ac65710 | /g4g/DS/Trees/Binary_Trees/Construction_and_Conversion/2_construct_tree_from_inorder_and_level_order.py | be8b1575e1d72ff06ab39f696a67b1dc1a2ce5d4 | [] | no_license | sauravgsh16/DataStructures_Algorithms | 0783a5e6dd00817ac0b6f2b856ad8d82339a767d | d3133f026f972f28bd038fcee9f65784f5d3ea8b | refs/heads/master | 2020-04-23T03:00:29.713877 | 2019-11-25T10:52:33 | 2019-11-25T10:52:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 953 | py | ''' Construct Binary Tree from Inorder and Level Order Traversal '''
class Node(object):
def __init__(self, val):
self.val = val
self.left = None
self.right = None
def construct_tree(inorder, levelorder):
if not inorder:
return
for i in range(len(levelorder)):
if l... | [
"GhoshSaurav@JohnDeere.com"
] | GhoshSaurav@JohnDeere.com |
4e16fdbe2e92cfb9355b49f7f2b61231b5481fe7 | e6bc1f55371786dad70313eb468a3ccf6000edaf | /Datasets/the-minion-game/Correct/082.py | 95c75f16f90cb4f3654bfe9b2114f728c53db3fe | [] | no_license | prateksha/Source-Code-Similarity-Measurement | 9da92e3b22c372ed6ea54d8b6ab2c5921e8c41c0 | fb371b837917794d260a219a1ca09c46a5b15962 | refs/heads/master | 2023-01-04T07:49:25.138827 | 2020-10-25T14:43:57 | 2020-10-25T14:43:57 | 285,744,963 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 308 | py | string = input()
stuart = 0
kevin = 0
for i in range(len(string)):
if string[i] in ["A", "E", "I", "O", "U"]:
kevin += len(string) - i
else:
stuart += len(string) - i
if kevin > stuart:
print("Kevin", kevin)
elif kevin < stuart:
print("Stuart", stuart)
else:
print("Draw") | [
"pratekshau@gmail.com"
] | pratekshau@gmail.com |
442ca8bf52d89c3b46aa97ea92168ad89ffd55b1 | 243b7c1162264e381ab6575f493bd4fb97ced325 | /src/comments/migrations/0005_comment_parent.py | 02d0344397530913347a2b50e8802bfd0fe04aa7 | [
"MIT"
] | permissive | trivvet/djangoAdvance | a409dd3003ab5f60b1621e7677826b2002e0d8c8 | 28891893869c1c0c3cf67d7f496dda96322de18c | refs/heads/master | 2020-04-05T22:05:14.272989 | 2018-12-09T11:00:58 | 2018-12-09T11:00:58 | 157,244,340 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 550 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-11-28 16:29
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('comments', '0004_auto_20181126_1850'),
]
operatio... | [
"trivvet@gmail.com"
] | trivvet@gmail.com |
ec9d3ab0161bd0be2d1d9cc810b7baf064cb9258 | 0c110eb32f2eaea5c65d40bda846ddc05757ced6 | /scripts/mastersort/scripts_dir/p7477_run1L6.py | fd95e6f425fc95d1d5f1740df9048f4676b66a4c | [] | no_license | nyspisoccog/ks_scripts | 792148a288d1a9d808e397c1d2e93deda2580ff4 | 744b5a9dfa0f958062fc66e0331613faaaee5419 | refs/heads/master | 2021-01-18T14:22:25.291331 | 2018-10-15T13:08:24 | 2018-10-15T13:08:24 | 46,814,408 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,199 | py | from __future__ import with_statement
import os, csv, shutil,tarfile, uf, dcm_ops
dest_root = '/ifs/scratch/pimri/soccog/test_working'
dst_path_lst = ['7477', 'run1L6']
uf.buildtree(dest_root, dst_path_lst)
uf.copytree('/ifs/scratch/pimri/soccog/old/SocCog_Raw_Data_By_Exam_Number/2539/E2539_e2401779/s2411337_1904_1L6_s... | [
"katherine@Katherines-MacBook-Pro.local"
] | katherine@Katherines-MacBook-Pro.local |
f0e45b1fb4b83b8df90170a17ff2e2c3e5ee84de | 7d8b5220152b4ef4876c489d6648be56bc83c8e7 | /exercises/development/beginner/exercise_12.py | 78175e5a2f27eacb75544c488c37742e2dba2c08 | [
"CC-BY-4.0",
"ISC",
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | comp-think/comp-think.github.io | 8f89518e7a463376b431f55fb7f495cb3019d4a5 | e48a7ecf3b1799471271e01430e089e8f8e3c68d | refs/heads/master | 2023-01-04T20:38:27.593237 | 2023-01-02T14:48:54 | 2023-01-02T14:48:54 | 157,171,226 | 52 | 22 | NOASSERTION | 2023-01-02T14:48:55 | 2018-11-12T07:11:23 | Python | UTF-8 | Python | false | false | 1,189 | py | # -*- coding: utf-8 -*-
# Copyright (c) 2019, Silvio Peroni <essepuntato@gmail.com>
#
# Permission to use, copy, modify, and/or distribute this software for any purpose
# with or without fee is hereby granted, provided that the above copyright notice
# and this permission notice appear in all copies.
#
# THE SOFTWARE I... | [
"essepuntato@gmail.com"
] | essepuntato@gmail.com |
ad38a8f2cb5608beb486c95d05efd28affd3e33f | 2bccab3cea54fdf283533d91b4a88363847b565d | /triple-center-loss/triple_center_model.py | 50bfb7111808affc301bed6a03c61cf867c47ae2 | [] | no_license | AmberzzZZ/classification_keras | 647727597cc086cc72f532583ad80c6d88ecdce8 | 8e1886f130452b0f5ad30f7e9a32eb8388babb9a | refs/heads/master | 2020-08-28T22:51:53.832386 | 2020-05-26T02:35:44 | 2020-05-26T02:35:44 | 217,844,932 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,274 | py | from models import *
from keras.layers import Embedding, Lambda
import tensorflow as tf
from keras.utils import to_categorical
from keras.utils import plot_model
def TCL(y_true, y_pred):
return y_pred
def l2distance(args, n_classes):
embedding, center_standard, y_true = args
n_centers = center_standard.... | [
"774524217@qq.com"
] | 774524217@qq.com |
2f810088c1d7c89839e81cd9c11e22c2d9e2f920 | 1185c629b091e09366aec9830d09ecd1b51dddda | /eval.py | 7fee4cd1b8819c5d70a410ec118be451f76e6231 | [] | no_license | billy-inn/refe | 9ed79b8cfed83225cbc81a8637d0bafc24e0e494 | deeaa1934ea7011e22dc7d3d98eedd6144212c7e | refs/heads/master | 2021-07-03T20:26:47.329020 | 2017-09-24T02:33:16 | 2017-09-24T02:33:16 | 104,605,333 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 946 | py | import tensorflow as tf
import numpy as np
import pandas as pd
import config
from optparse import OptionParser
from task import Task
import logging
from model_param_space import param_space_dict
def train(model_name, data_name, params_dict, logger):
task = Task(model_name, data_name, 1, params_dict, logger)
task.ref... | [
"bly930725@gmail.com"
] | bly930725@gmail.com |
71e678a0332eb9b0dddc74e7ee7677d3d3e5f0be | d10c5d3603e027a8fd37115be05e62634ec0f0a5 | /10_Supervised-Learning-with-scikit-learn/10_ex_2-10.py | 684d17126431f630f2a9e550a279918f00947165 | [] | no_license | stacygo/2021-01_UCD-SCinDAE-EXS | 820049125b18b38ada49ffc2036eab33431d5740 | 027dc2d2878314fc8c9b2796f0c2e4c781c6668d | refs/heads/master | 2023-04-29T01:44:36.942448 | 2021-05-23T15:29:28 | 2021-05-23T15:29:28 | 335,356,448 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 555 | py | # Exercise 2-10: K-Fold CV comparison
import numpy as np
import pandas as pd
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import cross_val_score
df = pd.read_csv('input/gm_2008_region.csv')
y = df['life'].values
X = df.drop(['life', 'Region'], axis=1).values
# Create a linear regre... | [
"stacy.gorbunova@gmail.com"
] | stacy.gorbunova@gmail.com |
a357f99eeb2586079e4f9f2f7d69c6f57ffcb713 | 8522034ed44d22a50b45f36e7dea057b1ca9c9bd | /core/views.py | 49d2d84d2b27fb7ee828f7685fc2c656a7e45160 | [] | no_license | JayjeetAtGithub/oth2 | 71c769150d132a253ce9a64da83442ed3409a592 | d8be9b8e69d23c137045ce8485b27e08300db809 | refs/heads/master | 2020-03-22T14:04:51.838326 | 2018-07-16T18:11:18 | 2018-07-16T18:11:18 | 140,152,306 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,524 | py | from django.shortcuts import render
from django.http import Http404
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from .models import Player , Level , TotalLevel
from .serializers import PlayerSerializer , LevelSerializer , TotalLevelSerializer ,... | [
"jc.github@rediffmail.com"
] | jc.github@rediffmail.com |
b99feeb950808a1214d6463cae0a95bd16ba39f0 | ffe4c155e228f1d3bcb3ff35265bb727c684ec1a | /Codes/file写入/compute_sum.py | 64fade6866b28dd98f940d12e8ea81c8fefedaa8 | [] | no_license | yuuee-www/Python-Learning | 848407aba39970e7e0058a4adb09dd35818c1d54 | 2964c9144844aed576ea527acedf1a465e9a8664 | refs/heads/master | 2023-03-12T00:55:06.034328 | 2021-02-28T13:43:14 | 2021-02-28T13:43:14 | 339,406,816 | 0 | 0 | null | 2021-02-28T11:27:40 | 2021-02-16T13:26:46 | Jupyter Notebook | UTF-8 | Python | false | false | 414 | py | def main():
sum = 0.0
with open("bad_numbers.txt") as file:
for n in file.read().split():
# try to convert n to a float, but if it
# is not a valid float, print error message
try:
print(float(n))
sum += float(n)
except Value... | [
"50982416+cyndereN@users.noreply.github.com"
] | 50982416+cyndereN@users.noreply.github.com |
c008e0806beaccc4d9526eb954576c58d6c04a90 | 98f078b52352ab08a8c9ac08a631a7ff1ac3fa63 | /medeina/medeina/models.py | 7e1e6b0c4f8958eb78d39da777536283f8675ab5 | [] | no_license | Eimis/medeina | 160ceed5044cec5640f272190d2a14d4428f01dc | 3bd838798481f933d729f6104c8b1af29a6f587d | refs/heads/master | 2020-03-08T11:14:11.198773 | 2018-04-08T14:23:29 | 2018-04-08T14:23:29 | 128,092,274 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,119 | py | from django.contrib.auth.models import User
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from medeina.managers import IssueManager
from medeina.states import IssueStates
from django_states.fields import StateField
@python_2_unicode_compatible
class IssueCategory(models.... | [
"eimantas.stonys@gmail.com"
] | eimantas.stonys@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.