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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
20afedb1b001619332e9d7e143861e7ec13ba57a | 45e97bd0c32042504052342bc1ae4e66a30d4d9a | /corepy/chapter13/demo5-trackInstance.py | 34e5d0f1d27f10ca12c701e54330defcbeef7adc | [] | no_license | vonzhou/py-learn | acf20c5183bff9788fcae9e36abdcd6f9bc553da | f0794164105dddbdffe082dfc90520f8778cbec3 | refs/heads/master | 2016-09-10T01:29:30.551541 | 2015-12-08T08:53:46 | 2015-12-08T08:53:46 | 27,669,547 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 373 | py |
''' P343'''
class InsCnt(object):
count = 0 #count是一个类属性
def __init__(self):
InsCnt.count += 1
def __del__(self):
InsCnt.count -= 1
def howMany(self):
return InsCnt.count
c1 = InsCnt()
print c1.howMany()
c2 = c1
print c2.howMany()
c3 = InsCnt()
print howMany()
del c1
del c2
print howMany()
del c3
... | [
"vonzhou@163.com"
] | vonzhou@163.com |
2c6c3a09d95945c7a9f020b9df2ee127ebe4414a | 00e29479dc7c45a9e019f96c90a69a49af618ccf | /src/api-engine/src/api/routes/user/views.py | 42300c55ed400a24f4c2f80abe33262434251b0a | [
"Apache-2.0",
"CC-BY-4.0"
] | permissive | yunchaozou/cello | 8dd081db2ce5d9b8975d553d4491d329790588ef | 68158f572c688f1710813c4df47fad28c3d4276c | refs/heads/master | 2020-04-22T08:40:53.157301 | 2019-02-08T22:35:35 | 2019-02-08T22:35:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,549 | py | #
# SPDX-License-Identifier: Apache-2.0
#
import logging
from rest_framework import viewsets, status
from rest_framework.decorators import action
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from drf_yasg.utils import swagger_auto_schema
from api.routes.network.se... | [
"hightall@me.com"
] | hightall@me.com |
0f638cb37c3cfe9526b6699975d791d2e7f0eaff | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/CodeJamCrawler/16_0_3_neat/16_0_3_yesdongil_main_big.py | 207b07db4c346d26f784da03b2499dd769587875 | [] | 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 | 1,846 | py | import os
import sys
import math
import itertools
def xrange(start, stop):
i = start
while i < stop:
yield i
i += 1
def is_prime(value) :
ret = 0
if (value % 2) == 0 :
ret = 2
elif (value % 3) == 0 :
ret = 3
else :
limit = int(math.sqrt(value))
index_limi... | [
"[dhuo@tcd.ie]"
] | [dhuo@tcd.ie] |
edeee6602b190ca18e61ad5f160a964b27d00952 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_256/ch34_2020_04_23_17_53_27_919517.py | ee3644d60592c2aae2ec473d6ba51ecadb41d2fe | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 486 | py | def eh_primo(n):
if n == 0 or n == 1:
return False
elif n == 2:
return True
for i in range(3, n, 2):
if n%2==0:
return False
elif n%i==0:
return False
else:
return True
def maior_primo_menor_que(n):
p = -1
while n>0:
i... | [
"you@example.com"
] | you@example.com |
fafe549264abbc0749503ca3d08dbbc62fe4299b | 91d1a6968b90d9d461e9a2ece12b465486e3ccc2 | /lambda_write_f/function-event-invoke-config_delete.py | 15016e42d8d9604bacece336bdaec2f86610b9a1 | [] | no_license | lxtxl/aws_cli | c31fc994c9a4296d6bac851e680d5adbf7e93481 | aaf35df1b7509abf5601d3f09ff1fece482facda | refs/heads/master | 2023-02-06T09:00:33.088379 | 2020-12-27T13:38:45 | 2020-12-27T13:38:45 | 318,686,394 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,010 | py | #!/usr/bin/python
# -*- codding: utf-8 -*-
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
from common.execute_command import write_parameter
# url : https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-instances.html
if __name__ == '__main__... | [
"hcseo77@gmail.com"
] | hcseo77@gmail.com |
4e42e313b4e8f4517cca59865a67badc6b525b39 | 200df6cda6e54d56a4c800e10e6d5f248d7d59f2 | /02-算法思想/广度优先搜索/778.水位上升的泳池中游泳(H).py | 0d5613ed1b63a75e2a20984da04124b0b0f7e70b | [] | no_license | jh-lau/leetcode_in_python | b9b9a47d0b3ce29c3c56836b39decc3ec4487777 | 1d1876620a55ff88af7bc390cf1a4fd4350d8d16 | refs/heads/master | 2023-04-17T15:01:49.925774 | 2021-04-24T01:17:39 | 2021-04-24T01:17:39 | 192,735,826 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,600 | py | """
@Author : liujianhan
@Date : 20/9/26 19:31
@Project : leetcode_in_python
@FileName : 778.水位上升的泳池中游泳(H).py
@Description : 在一个 N x N 的坐标方格 grid 中,每一个方格的值 grid[i][j] 表示在位置 (i,j) 的平台高度。
现在开始下雨了。当时间为 t 时,此时雨水导致水池中任意位置的水位为 t 。你可以从一个平台游向四周相邻的任意一个平台,
但是前提是此时水位必须同时淹没这两个平台。假定你可以瞬间移动无... | [
"lorgerd@163.com"
] | lorgerd@163.com |
793c15be2778bfa6a0852f657ea403fc51e685ba | a3f793a53361d08f3e0cdedc7fab9df40e201eef | /main.py | a53882b59400172fbcb656c830535363798e384d | [] | no_license | songshanshi/imoocc_py3 | 156db4f072bc956f45cbcc8c61fca964be8acfb9 | 6f3491ce857c541bf55d5ed8993265b7dd4dee09 | refs/heads/master | 2020-04-28T02:25:18.241155 | 2018-10-16T07:20:15 | 2018-10-16T07:20:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,917 | py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
#########################################################################
# Author:Jeson
# Email:jeson@imoocc.com
import datetime
import os
import re
import yaml
PROJECT_ROOT = os.path.realpath(os.path.dirname(__file__))
# import sys
os.environ["DJANGO_SETTINGS_MODULE"] =... | [
"gengming8859@icloud.com"
] | gengming8859@icloud.com |
2bb1e7e593dfb67298aa570a9c0e2c150b0dc54b | d0bd9c3c5539141c74e0eeae2fa6b7b38af84ce2 | /src/cogent3/parse/__init__.py | 7559bc6dcc006e4be1bcd02096d3c56f55fc2512 | [
"BSD-3-Clause"
] | permissive | KaneWh1te/cogent3 | 150c72e2f80a6439de0413b39c4c37c09c9966e3 | 115e9eb5700627fdb24be61441a7e3e155c02c61 | refs/heads/master | 2023-07-29T00:32:03.742351 | 2021-04-20T04:32:00 | 2021-04-20T04:32:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 956 | py | #!/usr/bin/env python
__all__ = [
"blast",
"cigar",
"clustal",
"dialign",
"ebi",
"fasta",
"gcg",
"genbank",
"gff",
"locuslink",
"ncbi_taxonomy",
"newick",
"nexus",
"paml",
"paml_matrix",
"phylip",
"rdb",
"record",
"record_finder",
"sequenc... | [
"Gavin.Huttley@anu.edu.au"
] | Gavin.Huttley@anu.edu.au |
41a00bab3f061077909f54d74dc574355af1929d | 1b77eaf078321b1320d72aa36a4357568101e4ca | /江南大学教务处/test.py | 93ac06b18e5699d2285b3f417e63ee409aaa3bec | [] | no_license | BEE-JN/python_homework | 92ffc1216a380d124901fd64cc541f70813847dc | 8ba4ea79cbd422f40e6f9f1cc5fed4d75715d207 | refs/heads/master | 2020-03-23T08:02:47.863607 | 2018-07-17T15:30:21 | 2018-07-17T15:30:21 | 141,305,118 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 187 | py | import requests
import time
url = "https://survey.zkeycc/pku/xsdc/?dm=bk"
if __name__=='__main__':
while 1:
r=requests.get(url)
print(r.content)
time.sleep(1) | [
"41156190+GCS-CN@users.noreply.github.com"
] | 41156190+GCS-CN@users.noreply.github.com |
96c1f73d17d18f7906615ca48bc2e2d25d8b7259 | caa06eca3eef2549d5088f6487201f734b35822e | /multi_ie/EE/model/multi_pointer_net.py | 0d2334ed6d7a09e87757e36528cedd3c228713c5 | [] | no_license | kelvincjr/shared | f947353d13e27530ba44ea664e27de51db71a5b6 | 4bc4a12b0ab44c6847a67cbd7639ce3c025f38f8 | refs/heads/master | 2023-06-23T19:38:14.801083 | 2022-05-17T09:45:22 | 2022-05-17T09:45:22 | 141,774,490 | 6 | 1 | null | 2023-06-12T21:30:07 | 2018-07-21T02:22:34 | Python | UTF-8 | Python | false | false | 7,694 | py | # _*_ coding:utf-8 _*_
import warnings
import numpy as np
import torch
import torch.nn as nn
from transformers import BertModel
from transformers import BertPreTrainedModel
from .layernorm import ConditionalLayerNorm
#from utils.data_util import batch_gather
warnings.filterwarnings("ignore")
def batch_gather(data: ... | [
"deco_2004@163.com"
] | deco_2004@163.com |
b865fa83e9b8e72b08e144110aa75b200cf807d4 | 7ec04fc867d0a48fffc05c65bff9217cfe211fe7 | /HW/统计字符串/countHotal.py | 31f95d4500041b28fa209a1a7c4dae778ad024c5 | [] | no_license | Cherry93/pythonPractic | 3b9d1f99803503073bbb2f3a58009665338bd278 | 2889183af6c9a01ab47895b23e2d6ce8c288fd4d | refs/heads/master | 2021-08-31T16:41:56.655989 | 2017-12-22T03:53:18 | 2017-12-22T03:53:18 | 115,008,198 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 520 | py | '''
统计加州旅馆中所有单词出现的次数,并降序打印
'''
import collections
file = input("Enter a filename:")
with open(file, 'r') as fpr:
content = fpr.read()
content = content.replace("\n", '')
content1 = content.split()
print(content1)
print(content1[0].lower())
print(len(content1))
list =[]
for i in range(0,len(content1)):
list.a... | [
"358544104@qq.com"
] | 358544104@qq.com |
c7eee2a22a1efb7ddb4b5278189a0424acae6d63 | 14ebcf98e7c64505839e0b7bbab89e32af7abe1e | /deep4rec/datasets/census.py | 4d58743074fe1b8d1eb3004a4a18b2d8469a1f62 | [
"Apache-2.0"
] | permissive | Luiz-FS/Deep4Rec | b021fbc36e377e1055e46e9a52f68c32018894f8 | 78c5ca74f0e0d06a9f4bb2f267817b69abd40d1d | refs/heads/master | 2020-09-03T14:27:45.828007 | 2019-11-18T01:10:30 | 2019-11-18T01:10:30 | 219,484,411 | 0 | 0 | Apache-2.0 | 2019-11-18T01:10:31 | 2019-11-04T11:22:00 | Python | UTF-8 | Python | false | false | 6,110 | py | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"mariannelinharesm@gmail.com"
] | mariannelinharesm@gmail.com |
e469b1c0df202afbdf63411ba8abdbd4527e1190 | 493f99b210303d019f62195ae8dde9d02ee1b81f | /indy_node/test/api/test_rich_schema_objects_reply.py | 56dbda7791bdd23e1fda9ccddcde4b9f7330077d | [
"Apache-2.0"
] | permissive | darklordz-217/indy-node | 745baa357fe739bac20433cb2daa0f7c5a2f2caf | 4d2f6a9dc0ff136117f8766a4f2cf70b239404e0 | refs/heads/master | 2022-10-06T17:01:12.414734 | 2020-06-11T08:49:17 | 2020-06-11T08:49:17 | 271,472,931 | 2 | 0 | Apache-2.0 | 2020-06-11T09:04:23 | 2020-06-11T06:48:21 | Python | UTF-8 | Python | false | false | 2,499 | py | import json
import pytest
from indy_common.constants import JSON_LD_CONTEXT, RS_CONTEXT_TYPE_VALUE, RICH_SCHEMA, RICH_SCHEMA_ENCODING, \
RICH_SCHEMA_MAPPING, RICH_SCHEMA_CRED_DEF, RS_CRED_DEF_TYPE_VALUE, RS_MAPPING_TYPE_VALUE, \
RS_ENCODING_TYPE_VALUE, RS_SCHEMA_TYPE_VALUE, RICH_SCHEMA_PRES_DEF, RS_PRES_DEF_T... | [
"alexander.sherbakov@dsr-corporation.com"
] | alexander.sherbakov@dsr-corporation.com |
bcfcfd42d82934ef66bd39ecc5139583c6a927df | f62ff90d7850af458d8f12386fc9ee9134dbe7c1 | /Plots/Showplots/Model_3/Current_Voltage_Curves.py | 2d9023dab4df536df56c4202551adad30523eb73 | [] | no_license | AlexSchmid22191/EIS_R_Sim | 51b431f078cb455fc38637c192436c0523449565 | 851b061e60811e1e58a5b2fd4e393e529c3f86ac | refs/heads/master | 2023-06-27T17:40:59.177270 | 2021-07-22T11:50:27 | 2021-07-22T11:50:27 | 380,768,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,606 | py | from matplotlib.pyplot import subplots, show
from matplotlib.style import use
from numpy import load, log10
use('../Show.mplstyle')
data = load('../../../Currents_Resistances_Model_3/Current_Data_Model_3.npy')
fig_hi, ax_hi = subplots(nrows=2, figsize=(6, 8))
fig_me, ax_me = subplots(nrows=2, figsize=(6, 8))
fig_lo,... | [
"Alex.Schmid91@gmail.com"
] | Alex.Schmid91@gmail.com |
690fe2ffb43edf1febae8410ba150129ce00cce0 | 3419067388879d8a6542df01cb0278ae90b021a2 | /py100day/Day01-15/Day04/code/for2.py | 22c96886304fa47ecee9b5c39f3f60d9a36a21f1 | [] | no_license | oweson/python-river-master | faa31c5248e297a92054cc302e213e2b37fb8bd5 | cf9e99e611311b712465eb11dec4bb8f712929b2 | refs/heads/master | 2021-06-21T15:47:01.755957 | 2019-10-02T00:08:05 | 2019-10-02T00:08:05 | 205,607,518 | 0 | 0 | null | 2021-06-10T21:55:20 | 2019-08-31T23:39:55 | Python | UTF-8 | Python | false | false | 173 | py | """
用for循环实现1~100之间的偶数求和
Version: 0.1
Author: 骆昊
Date: 2018-03-01
"""
# 步长是2
sum = 0
for x in range(2, 101, 2):
sum += x
print(sum)
| [
"570347720@qq.com"
] | 570347720@qq.com |
1026e1d0f5add5bf40edc076405f2e409f26c5ce | 2f2682f778512a75a1ff49d7e267c2f4d355c48e | /geoprocess/controllers.py | 7be119b34c9b20b609770261e464a475b5996a9b | [] | no_license | beatcovid/geoprocess | 4a44f46b900c2e0ffed0dab18008e7884e759e3b | c2a7b1e4ede06583679db9dadebe2066b0274e54 | refs/heads/master | 2023-04-13T13:45:48.572825 | 2020-05-27T03:08:14 | 2020-05-27T03:08:14 | 260,215,049 | 0 | 1 | null | 2023-03-29T00:36:19 | 2020-04-30T13:11:38 | Python | UTF-8 | Python | false | false | 4,538 | py | import csv
import email.utils
import json
import logging
import os
import sys
from datetime import datetime
from pprint import pprint
from dotenv import load_dotenv
from pymongo import MongoClient
from geoprocess.find_psma import find_lga, find_sa3
from geoprocess.google_geo import google_geocode, lookup_placeid, pla... | [
"nc9@protonmail.com"
] | nc9@protonmail.com |
c0bccab0f33fe2f6323731cddd1742ba4d45275c | aa410a95773aeea73e75f0e701db5cdc0eda890b | /weapons.py | cf6e4eb05ba6ad8a453e07637018051ed6eac5f8 | [] | no_license | predominant/zombsole | ccc00893b7739c5341c43fc28375415fa628b885 | a04ff40a144cb1f63d8aa29ccf0b06ecccc2bc7f | refs/heads/master | 2021-01-21T19:29:05.322551 | 2014-03-26T05:38:15 | 2014-03-26T05:38:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 710 | py | # coding: utf-8
from core import Weapon
def _new_weapon_class(name, max_range, damage_range):
'''Create new weapon class.'''
class NewWeapon(Weapon):
def __init__(self):
super(NewWeapon, self).__init__(name,
max_range,
... | [
"fisadev@gmail.com"
] | fisadev@gmail.com |
2eac0fe3402f79f389178ebe792a10a16f7c1a4a | 039f2c747a9524daa1e45501ada5fb19bd5dd28f | /AGC001/AGC001c.py | 6f3fb7892212fb5a2683a833717ea55a344d0dfd | [
"Unlicense"
] | permissive | yuto-moriizumi/AtCoder | 86dbb4f98fea627c68b5391bf0cc25bcce556b88 | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | refs/heads/master | 2023-03-25T08:10:31.738457 | 2021-03-23T08:48:01 | 2021-03-23T08:48:01 | 242,283,632 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 168 | py | #AGC001c
def main():
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10**6)
# map(int, input().split())
if __name__ == '__main__':
main() | [
"kurvan1112@gmail.com"
] | kurvan1112@gmail.com |
eaeef1d5a47d3ff5621d988c694458cf63dc39a6 | ceab178d446c4ab55951c3d65d99815e9fdee43a | /archive/coding_practice/python/ticks_plot.py | 83e7d35370f009514aa95366b78a92f4f61f0afa | [] | no_license | DeneBowdalo/AtmosChem_Tools | 01ecedb0df5c5d6e01966a0c3d8055826f5ac447 | 220c2f697a4f4c1e5443c336ede923b2004fe9f5 | refs/heads/master | 2021-01-10T18:05:30.800218 | 2017-02-06T16:08:14 | 2017-02-06T16:08:14 | 43,529,442 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 183 | py | import matplotlib.pyplot as plt
x = [5,3,7,2,4,1,11,25,33]
plt.plot(x)
plt.xticks(range(len(x)), ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']);
plt.yticks(range(1,36,2));
plt.show()
| [
"db876@earth0.york.ac.uk"
] | db876@earth0.york.ac.uk |
def39a55d547e1131e0f8dcf639f5da81e09bb90 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /cGaTqHsPfR5H6YBuj_0.py | c3936bfae1158025ccd064458e0c9c17ee2d0b5e | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 818 | py | """
Given a list of ingredients `i` and a flavour `f` as input, create a function
that returns the list, but with the elements `bread` around the selected
ingredient.
### Examples
make_sandwich(["tuna", "ham", "tomato"], "ham") ➞ ["tuna", "bread", "ham", "bread", "tomato"]
make_sandwich(["cheese", "le... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
b01ea9b981eaf809aed4db02cdf99add3ef4992e | a4753147801dbabfec45f6f9f47572cda77efb81 | /debugging-constructs/ibmfl/util/data_handlers/mnist_pytorch_data_handler.py | 29cc18afb938e575e71025d9007fd67f722221b9 | [
"MIT"
] | permissive | SEED-VT/FedDebug | e1ec1f798dab603bd208b286c4c094614bb8c71d | 64ffa2ee2e906b1bd6b3dd6aabcf6fc3de862608 | refs/heads/main | 2023-05-23T09:40:51.881998 | 2023-02-13T21:52:25 | 2023-02-13T21:52:25 | 584,879,212 | 8 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,460 | py | """
Licensed Materials - Property of IBM
Restricted Materials of IBM
20221069
© Copyright IBM Corp. 2022 All Rights Reserved.
"""
import logging
import numpy as np
from ibmfl.data.data_handler import DataHandler
from ibmfl.util.datasets import load_mnist
logger = logging.getLogger(__name__)
class MnistPytorchDataHan... | [
"waris@vt.edu"
] | waris@vt.edu |
7eced97eac47dfd2ce21cee31fe289634f7a5bf7 | eac6dc8eb8e5f088500f425a7323cd35a4f99bd6 | /src/courses/migrations/0012_course_active.py | af89db3155df4d47be9b84b4c843f0b847c617a6 | [] | no_license | aminhp93/django_serverup_2 | a14195af756799795282028ba611dbccc3848870 | aef31722e882367c731e9e48fc8af8740befc112 | refs/heads/master | 2020-05-27T01:54:15.268661 | 2017-02-25T21:58:36 | 2017-02-25T21:58:36 | 82,514,017 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 451 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-19 18:06
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('courses', '0011_auto_20170219_1749'),
]
operations = [
migrations.AddField(... | [
"minhpn.org.ec@gmail.com"
] | minhpn.org.ec@gmail.com |
ba63f7efdf10aab9c7481c9a2bee33143ac12df2 | 2037235643046608bf883f11c1bc448e2df8a4a3 | /HuaYing/practice/test14.py | a18f331036c28c57f36f4079f83d4f9d3c4a6650 | [] | no_license | Hardworking-tester/HuaYingAutoTest | 7e46dfb0729961cee0da06762fc0be11724ad80b | c1f0cf7aa4433f482bbae88d1a5637b9859359ca | refs/heads/master | 2021-01-10T18:38:37.788736 | 2015-09-05T10:37:10 | 2015-09-05T10:37:10 | 41,957,309 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,368 | py | #encoding:utf-8
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
br=webdriver.Firefox()
# br.maximize_window()
br.get("http://www.xebest.com:8000")
elements=br.find_elements_by_class_name("nav-arrow")
element1=elements[4]
if element1.is_displayed():
print ("网站导航链接已定位到"... | [
"373391120@qq.com"
] | 373391120@qq.com |
636022ef17714db27f131c08daa673606f4185d8 | 511b7b19ec49be34bec240ee7c7cf4178cd36ca3 | /gasolinestation/migrations/0013_auto_20200304_0909.py | fb6c52a8156995aa62443e5a937be261f2953067 | [] | no_license | francisguchie/360POS | 58de516fe52e83d6b99bd195d22c8aa902daee18 | 68f9e20ac263c75ec0c9b0fe75d7f648b8744ea8 | refs/heads/master | 2023-02-08T16:38:42.667538 | 2020-03-12T16:05:00 | 2020-03-12T16:05:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 657 | py | # Generated by Django 3.0.3 on 2020-03-04 09:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('gasolinestation', '0012_transactionsales'),
]
operations = [
migrations.AddField(
model_name='transactionsales',
nam... | [
"monde.lacanlalay@gmail.com"
] | monde.lacanlalay@gmail.com |
86089daeedc71651ae0564812bf24553d130050a | f399fbac7e35dcc2c2f2ad4d3202b0839d9b7d48 | /user/send_mail.py | 0cb781b2301d5d6442e6f1cfdfd49aada05a621f | [] | no_license | AktanKasymaliev/django-toilets-service | 480f56b652a88e1422290de8906f0bb6d5693cff | 225d71b164c36bab5fded86390b17ce265694a17 | refs/heads/main | 2023-07-14T12:46:12.399114 | 2021-08-23T17:14:04 | 2021-08-23T17:14:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,328 | py | from django.template.loader import render_to_string
from django.utils.html import strip_tags
from django.core.mail import send_mail
from django.contrib.sites.shortcuts import get_current_site
from django.core.mail import EmailMultiAlternatives
from decouple import config
from django.utils.http import urlsafe_base64_dec... | [
"aktan.kasymaliev@icloud.com"
] | aktan.kasymaliev@icloud.com |
2ed87c256e5bf9f70115c96c9aec2798f8b5a5af | 14913a0fb7e1d17318a55a12f5a181dddad3c328 | /63.snake.py | 990234c17a8d9d056195b13ae470723aa887b84e | [] | no_license | Jesuisjavert/Algorithm | 6571836ec23ac3036565738c2bee94f416595f22 | 730549d19e66e20b3474a235a600958a8e036a0e | refs/heads/master | 2023-02-16T06:34:50.984529 | 2020-09-25T09:40:30 | 2020-09-25T09:40:30 | 330,849,371 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 168 | py | import sys
sys.stdin = open('input.txt','r')
T = int(input())
for testcase in range(1,T+1):
arr = [list(map(int, input().split())) for _ in range(4)]
print(arr) | [
"jesuisjavert@gmail.com"
] | jesuisjavert@gmail.com |
beed14a3c1aff89d035020396a37556f4cf88ed1 | 24d8cf871b092b2d60fc85d5320e1bc761a7cbe2 | /wicd/rev519-537/right-branch-537/wicd/backends/be-wireless/threadedwirelessinterface.py | ab1a5d1e45f9fa860b190118e1d14d918ce5832a | [] | no_license | joliebig/featurehouse_fstmerge_examples | af1b963537839d13e834f829cf51f8ad5e6ffe76 | 1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad | refs/heads/master | 2016-09-05T10:24:50.974902 | 2013-03-28T16:28:47 | 2013-03-28T16:28:47 | 9,080,611 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,698 | py | from misc import WicdError
from baseinterface import needsidle
from encryptablewirelessinterface import EncryptableWirelessInterface
from asyncrunner import AsyncManager, AsyncError
class ThreadedWirelessInterface(EncryptableWirelessInterface):
def __init__(self, interface_name):
EncryptableWirelessInterfac... | [
"joliebig@fim.uni-passau.de"
] | joliebig@fim.uni-passau.de |
be7975289ea7397570ae5a442d590aae139acd82 | 214dde26c268d1d0b7991318c5e2d43aa27af89b | /backlooking/order_analysis.py | c7b7acc13a43f9796ee1e1050048258fb6cc19ad | [] | no_license | hellobiek/smart_deal_tool | f1846903ac402257bbe92bd23f9552970937d50e | ba8aad0a37843362f5833526921c6f700fb881f1 | refs/heads/master | 2022-09-04T04:41:34.598164 | 2022-08-04T22:04:09 | 2022-08-04T22:04:09 | 88,258,362 | 36 | 14 | null | null | null | null | UTF-8 | Python | false | false | 3,559 | py | #-*- coding: utf-8 -*-
import os
import sys
from os.path import abspath, dirname
sys.path.insert(0, dirname(dirname(abspath(__file__))))
import datetime
import const as ct
import pandas as pd
from futu import TrdEnv
from datetime import datetime
from base.cdate import get_dates_array
from tools.markdown_table import Ma... | [
"hellobiek@gmail.com"
] | hellobiek@gmail.com |
ba7f120c0d5551658bacbd572127dbb325214ffa | 11b420a9e6dbe371167227f41ef8e344e3382612 | /ConvNets/Comparison_Plots/Pooled_Images/Pooled_Images.py | 15a23b6ae92fc9bdfccb8654ccf3350027e0953e | [
"MIT"
] | permissive | tarek-ullah/Active-Learning-Bayesian-Convolutional-Neural-Networks | 7092386758b68dc922efaa2c2eba055930bf2896 | f8b68038bd3b97c473e9c1de6b6cdee4538021f4 | refs/heads/master | 2021-01-13T06:57:19.343775 | 2016-11-02T12:22:16 | 2016-11-02T12:22:16 | 81,338,773 | 1 | 0 | null | 2017-02-08T14:34:15 | 2017-02-08T14:34:15 | null | UTF-8 | Python | false | false | 3,650 | py | from __future__ import print_function
from keras.datasets import mnist
from keras.preprocessing.image import ImageDataGenerator
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Activation, Flatten
from keras.layers.convolutional import Convolution2D, MaxPooling2D
from keras.optimizers i... | [
"riashat.islam.93@gmail.com"
] | riashat.islam.93@gmail.com |
eee47352250b1354c790e2f7624fae5c7205dbdd | d45b87ba22649cb9c0f003479112c50a7ce09ba0 | /Counting Sort 3.py | 65bd53aba0bb44a886e5ed534ec574b1d9fdc902 | [] | no_license | chishui/HackerRankAlgorithmsChallenge | 7458f6553f52846b9de5b68c0f692f72be13dfa8 | 611096a0c362675ce68598065ea3fe0abbbe5b99 | refs/heads/master | 2020-12-24T13:35:43.829308 | 2014-09-02T10:36:57 | 2014-09-02T10:36:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 311 | py | #https://www.hackerrank.com/challenges/countingsort3
N = input()
li = [int(raw_input().strip().split()[0]) for i in range(0, N)]
li.sort()
last = -1
index = 0
out = []
for i in range(0, 100):
while index < len(li) and i >= li[index] :
index = index + 1
out.append(index)
print ' '.join(map(str, out))
| [
"chishui2@gmail.com"
] | chishui2@gmail.com |
79e89da491df1b01cf2db1375aa85bf04472dfce | f29a31354a66798e2c398fc2a01bc285b6e35dfb | /NeuralNetworks/l-IntroToNeuralNetworks/Perceptrons.py | 8b97e96224a7febd95bb5ca02c32f3a2c2cb5e9d | [] | no_license | ajpiter/UdacityDeepLearning | 2fd8b6ba7f29aa03ab9dfdd557dbdcc692e7ada0 | eb343a8be223f4bcc15a87483f7945023c2c9a0e | refs/heads/master | 2021-01-02T09:00:34.221125 | 2017-08-28T16:32:45 | 2017-08-28T16:32:45 | 99,121,250 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,764 | py | #Perceptrons
#Also known as neurons
#Inputs
#Weights
#Start out as random values, then as the neural network learns more about the input data and results the network adjusts the weights
#The process of adjusting the weights is called training the neural network
#The higher the weight the more important it is in ... | [
"noreply@github.com"
] | ajpiter.noreply@github.com |
72655e0d239fb7752d956948112e58f2ba5f52b8 | 3637fe729395dac153f7abc3024dcc69e17f4e81 | /reference/ucmdb/discovery/os_platform_discoverer.py | 02d93f540190842835fd968afa055cc09e7172c3 | [] | no_license | madmonkyang/cda-record | daced6846c2456f20dddce7f9720602d1583a02a | c431e809e8d0f82e1bca7e3429dd0245560b5680 | refs/heads/master | 2023-06-15T08:16:46.230569 | 2021-07-15T16:27:36 | 2021-07-15T16:27:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,272 | py | # coding=utf-8
'''
Created on Dec 27, 2013
@author: ekondrashev
'''
import logger
import entity
import command
import flow
import post_import_hooks
import service_loader
from service_loader import load_service_providers_by_file_pattern
class Platform(entity.Immutable):
def __init__(self, name):
self.name... | [
"silentbalanceyh@126.com"
] | silentbalanceyh@126.com |
27fac4f1aaf8414c571f63b38f3416535871b864 | e7fcc1d64cd95805918ab1b5786bf81a92f973ef | /2020/day06/test_day06.py | dcfa4fa5d4d7f186a72866d92f905fc5c31bff00 | [] | no_license | trolen/advent-of-code | 8145c1e36fea04e53d4b7a885efcc2da71fbfe57 | 0a4e022a6a810d86e044a15036a2f5778f0d38af | refs/heads/master | 2023-02-26T13:11:58.341006 | 2023-02-20T23:22:27 | 2023-02-20T23:22:27 | 54,579,550 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 881 | py | #! /usr/bin/env python3
import unittest
import day06
class TestDay06(unittest.TestCase):
def setUp(self):
self.raw_data = [
'abc',
'',
'a',
'b',
'c',
'',
'ab',
'ac',
'',
'a',
... | [
"timothy.rolen@gmail.com"
] | timothy.rolen@gmail.com |
cdb896df7dafbf9b574f7853ffe03b2a0ab849e0 | 5c4cc78698a8cdadb10c45799a67c95ca17a4d5a | /custom_components/usage.py | f93d2655364330efe4fac2599f2b0bc5244848ee | [] | no_license | gitumarkk/dash-custom-components-blog | fb044f14735d686bbf0c3e07b863c0eb39830c6b | 3a94e3fd7e3047eb082be901f2c2962b42b27964 | refs/heads/main | 2023-05-31T06:40:33.337975 | 2021-06-11T06:22:31 | 2021-06-11T06:22:31 | 375,925,178 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 524 | py | import custom_components
import dash
from dash.dependencies import Input, Output
import dash_html_components as html
app = dash.Dash(__name__)
app.layout = html.Div([
custom_components.MyCustomComponent(
id='input',
value='my-value',
label='my-label'
),
html.Div(id='output')
])
@... | [
"gitumarkk@gmail.com"
] | gitumarkk@gmail.com |
191db6f8ca5bb50f81b0a602940e6003d3f27b1b | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/4/usersdata/112/1803/submittedfiles/swamee.py | 0993e51e919e7a77d0aa3da61db48e12e1ca660d | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 448 | py | # -*- coding: utf-8 -*-
from __future__ import division
import math
f= input('Digite o valor de f:')
L= input('Digite o valor de L:')
Q= input('Digite o valor de Q:')
DeltaH= input('Digite o valor de Delta H')
v= input('Digite o valor de v')
g= 9.81
e= 0.000002
D= ((8*f*L*Q)*(2/5))/((math.pi)**2(g*DeltaH))
Rey= (4*Q)... | [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
312460ac8bca6af84350206ee751570d59d027a3 | 1a639d185f9c883b7bebf33c577c58b22ac93c7e | /graphics/moving_pan.py | 37ad05954d8428b128a6f418e6a6d7232f4c8994 | [] | no_license | gofr1/python-learning | bd09da5b5850b1533a88b858690ed4380b55d33e | 19343c985f368770dc01ce415506506d62a23285 | refs/heads/master | 2023-09-02T15:42:27.442735 | 2021-11-12T10:17:13 | 2021-11-12T10:17:13 | 237,828,887 | 0 | 0 | null | 2021-11-12T10:17:14 | 2020-02-02T20:03:42 | Python | UTF-8 | Python | false | false | 767 | py | from superwires import games
path_to_images = '../../Pictures/img/'
games.init(screen_width = 640, screen_height = 480, fps = 50)
class Pan(games.Sprite):
'''Pan moving with mouse'''
def update(self):
'''Move object to mouse position'''
self.x = games.mouse.x
self.y = games.mouse.y
... | [
"gofr.one@gmail.com"
] | gofr.one@gmail.com |
87610080866d9cad3191923528acbeeed82d6233 | 547548a6ae8db52b1b183d6f3ba3ad63f4247962 | /train/gen/kl/paths.py | 5bc1abac26c206f66572dc7988a9abdd8620b8c0 | [
"MIT"
] | permissive | jeffkrupa/SubtLeNet | 21870c8cc88080c101edffb414832d863c299455 | e0e74b7a0a1c76fd6d6e21c80ce57302a2cd6b6f | refs/heads/master | 2022-06-25T16:33:36.427635 | 2022-06-10T16:15:53 | 2022-06-10T16:15:53 | 187,670,116 | 0 | 2 | MIT | 2019-08-02T20:26:20 | 2019-05-20T15:44:13 | Python | UTF-8 | Python | false | false | 288 | py | #basedir = '/fastscratch/snarayan/genarrays/v_deepgen_3/'
#figsdir = '/home/snarayan/public_html/figs/deepgen/v3/'
basedir = '/data/t3serv014/snarayan/deep//v_deepgen_4_small/'
figsdir = '/home/snarayan/public_html/figs/deepgen/v4_kl/'
from os import system
system('mkdir -p '+figsdir)
| [
"sidn@mit.edu"
] | sidn@mit.edu |
81a9468e822101750e73217c4b2e6d17f02e75b2 | 7a3fc3ea3dd71e4ec85ac73e0af57ae976777513 | /.history/flaskblog_20210524215327.py | 3dc704c3d526e4ab9cbfa1dbab452f4fb649c5bb | [] | no_license | khanhdk0000/first_proj | 72e9d2bbd788d6f52bff8dc5375ca7f75c0f9dd0 | bec0525353f98c65c3943b6d42727e3248ecfe22 | refs/heads/main | 2023-05-12T10:36:08.026143 | 2021-06-05T15:35:22 | 2021-06-05T15:35:22 | 374,148,728 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 285 | py | from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
@app.route('/home')
def hello_world():
return render_template('home.html')
@app.route('/about')
def about():
return render_template('home.html')
if __name__ == '__main__':
app.run(debug=True) | [
"khanhtran28092000@gmail.com"
] | khanhtran28092000@gmail.com |
40801f7d40c23e8ef9fd71aef06229192814b53d | 738b6d6ec4572f5848940b6adc58907a03bda6fb | /tests/pymcell4_positive/3000_reports_check/model.py | 03fdbc184e2cc0fea4c8bae504524b1bb53ba093 | [
"MIT",
"Unlicense",
"LicenseRef-scancode-public-domain"
] | permissive | mcellteam/mcell_tests | 09cd1010a356e0e07c88d7e044a73c5606c6e51a | 34d2d967b75d56edbae999bf0090641850f4f4fe | refs/heads/master | 2021-12-24T02:36:24.987085 | 2021-09-24T14:19:41 | 2021-09-24T14:19:41 | 174,733,926 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,470 | py | #!/usr/bin/env python3
import sys
import os
MCELL_PATH = os.environ.get('MCELL_PATH', '')
if MCELL_PATH:
sys.path.append(os.path.join(MCELL_PATH, 'lib'))
else:
print("Error: variable MCELL_PATH that is used to find the mcell library was not set.")
sys.exit(1)
import mcell as m
params = m.bngl_utils.load... | [
"ahusar@salk.edu"
] | ahusar@salk.edu |
6cb5a5e75a9c8324286d70e2893b91e427710002 | 60cbdf1f9771159f872e632017fa736800784297 | /Codewars/Find-the-odd-int.py | c1567718b97f70ca035fd5cb5332e8b15ddf1595 | [] | no_license | AG-Systems/programming-problems | 6ea8c109f04c4d22db6e63fe7b665894c786242a | 39b2d3546d62b48388788e36316224e15a52d656 | refs/heads/master | 2023-04-16T16:59:20.595993 | 2023-04-05T01:25:23 | 2023-04-05T01:25:23 | 77,095,208 | 10 | 3 | null | 2019-10-14T16:16:18 | 2016-12-22T00:03:14 | Python | UTF-8 | Python | false | false | 355 | py | def find_it(seq):
hashtable = {}
for x in seq:
if x in hashtable:
hashtable[x] += 1
else:
hashtable[x] = 1
for key,val in hashtable.items():
if val % 2 != 0:
return key
"""
def find_it(seq):
for i in seq:
if seq.count(i)%2!=0:
... | [
"noreply@github.com"
] | AG-Systems.noreply@github.com |
c41845008487c6093767f0afb04faa5273492412 | 2729fff7cb053d2577985d38c8962043ee9f853d | /bokeh/sampledata/tests/test_perceptions.py | fd7da155b0a33f279e0b263f36c4dea9d66e1929 | [
"BSD-3-Clause"
] | permissive | modster/bokeh | 2c78c5051fa9cac48c8c2ae7345eafc54b426fbd | 60fce9003aaa618751c9b8a3133c95688073ea0b | refs/heads/master | 2020-03-29T01:13:35.740491 | 2018-09-18T06:08:59 | 2018-09-18T06:08:59 | 149,377,781 | 1 | 0 | BSD-3-Clause | 2018-09-19T02:02:49 | 2018-09-19T02:02:49 | null | UTF-8 | Python | false | false | 2,212 | py | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2017, Anaconda, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#---------------------------------------------------... | [
"noreply@github.com"
] | modster.noreply@github.com |
e55a27dca2368a2b46c0c89ab0d91c9214f68154 | 9f2f386a692a6ddeb7670812d1395a0b0009dad9 | /python/paddle/fluid/tests/unittests/ipu/test_print_op_ipu.py | 3189e060d58373250ba776271009bcab004e762b | [
"Apache-2.0"
] | permissive | sandyhouse/Paddle | 2f866bf1993a036564986e5140e69e77674b8ff5 | 86e0b07fe7ee6442ccda0aa234bd690a3be2cffa | refs/heads/develop | 2023-08-16T22:59:28.165742 | 2022-06-03T05:23:39 | 2022-06-03T05:23:39 | 181,423,712 | 0 | 7 | Apache-2.0 | 2022-08-15T08:46:04 | 2019-04-15T06:15:22 | C++ | UTF-8 | Python | false | false | 3,306 | py | # Copyright (c) 2022 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"
] | sandyhouse.noreply@github.com |
847583d24105d7141eccf2797b87b466cbd57b01 | 99f43f4591f63d0c57cd07f07af28c0b554b8e90 | /python/프로그래머스/직사각형만들기.py | 16bef1835142eb60413503e1b66a432aafa71fc8 | [] | no_license | SINHOLEE/Algorithm | 049fa139f89234dd626348c753d97484fab811a7 | 5f39d45e215c079862871636d8e0306d6c304f7e | refs/heads/master | 2023-04-13T18:55:11.499413 | 2023-04-10T06:21:29 | 2023-04-10T06:21:29 | 199,813,684 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 543 | py | def solution(v):
v = sorted(v)
x_dic = {}
y_dic = {}
for x, y in v:
if x_dic.get(x) is None:
x_dic[x] = 1
else:
x_dic[x] += 1
if y_dic.get(y) is None:
y_dic[y] = 1
else:
y_dic[y] += 1
answer = []
for x, cnt in x_dic... | [
"dltlsgh5@naver.com"
] | dltlsgh5@naver.com |
099107a1fc7a937fe06c9e7494308aa4d7f2223e | 26d030d1a8134f1900d11054dc63c674dc2beec8 | /main.py | 0895f7c340f491aad10624532b6215a61944c9a2 | [
"MIT"
] | permissive | kendricktan/pychip8 | 1ea1259abb61485c0db9bd26dda0201c2369452d | c9eb4f950f4546dbad0ca84f1c393d822a925a10 | refs/heads/master | 2021-04-27T15:44:17.064807 | 2018-02-23T14:28:13 | 2018-02-23T14:28:13 | 122,475,722 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 133 | py | from pychip8.emulator import Chip8
if __name__ == '__main__':
rom_name = 'pong.rom'
chip8 = Chip8(rom_name)
chip8.run() | [
"kendricktan0814@gmail.com"
] | kendricktan0814@gmail.com |
28bf6dde8bb5f2f4f836584daa7697bbbb60659a | 5679731cee36c537615d285ed72810f4c6b17380 | /492_ConstructTheRectangle.py | 864fd723b3b57af7cb42b67c170b150f6a55bac9 | [] | no_license | manofmountain/LeetCode | 6b76105190a9b62df65a7b56b6def4120498b9fa | 718f688b3d316e8c10ef680d9c21ecd518d062f8 | refs/heads/master | 2021-01-12T03:41:48.318116 | 2017-07-18T12:35:58 | 2017-07-18T12:35:58 | 78,252,164 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 412 | py | import math
class Solution(object):
def constructRectangle(self, area):
"""
:type area: int
:rtype: List[int]
"""
width, res = int(math.sqrt(area)), list()
while width != 0:
if area % width == 0:
res.append(area / width)
... | [
"noreply@github.com"
] | manofmountain.noreply@github.com |
0a2e966187b89beb9f8331300b18f5e41d660407 | 69c882c678103b182988fb60d3e898d569980f1c | /Day 6/day6prog14.py | 6b4f901785e52ff819f090084f7e227d01a62b68 | [] | no_license | gittygupta/stcet-python | 44be9d91cdd6215879d9f04497214819228821be | e77456172746ee76b6e2a901ddb0c3dbe457f82a | refs/heads/master | 2022-03-05T11:37:08.720226 | 2019-12-01T00:56:03 | 2019-12-01T00:56:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 202 | py | def fact(x):
pro = 1
for i in range(1, x+1):
pro *= i
return pro
def perm(n, r):
return (fact(n)/(fact(n - r) * fact(r)))
n = input("n = ")
r = input("r = ")
print(perm(n, r))
| [
"noreply@github.com"
] | gittygupta.noreply@github.com |
931e52355a9877de357fa0e0b6a602e2de02d64e | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/response/AlipayBossFncInvoiceBatchqueryResponse.py | cfe0f6e638e1c8ae763e1e65af4347042e876024 | [
"Apache-2.0"
] | permissive | alipay/alipay-sdk-python-all | 8bd20882852ffeb70a6e929038bf88ff1d1eff1c | 1fad300587c9e7e099747305ba9077d4cd7afde9 | refs/heads/master | 2023-08-27T21:35:01.778771 | 2023-08-23T07:12:26 | 2023-08-23T07:12:26 | 133,338,689 | 247 | 70 | Apache-2.0 | 2023-04-25T04:54:02 | 2018-05-14T09:40:54 | Python | UTF-8 | Python | false | false | 2,739 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.MultiCurrencyMoneyOpenApi import MultiCurrencyMoneyOpenApi
from alipay.aop.api.domain.ArInvoiceOpenApiResponse import ArInvoiceOpenApiResponse
class AlipayBossFncInvo... | [
"liuqun.lq@alibaba-inc.com"
] | liuqun.lq@alibaba-inc.com |
1e47736427d5b29ddbed8c696b895ae76e78410d | 5da5473ff3026165a47f98744bac82903cf008e0 | /packages/google-cloud-vm-migration/samples/generated_samples/vmmigration_v1_generated_vm_migration_finalize_migration_async.py | 9725b31782e691f5713fa20467e00eb66fe54fa1 | [
"Apache-2.0"
] | permissive | googleapis/google-cloud-python | ed61a5f03a476ab6053870f4da7bc5534e25558b | 93c4e63408c65129422f65217325f4e7d41f7edf | refs/heads/main | 2023-09-04T09:09:07.852632 | 2023-08-31T22:49:26 | 2023-08-31T22:49:26 | 16,316,451 | 2,792 | 917 | Apache-2.0 | 2023-09-14T21:45:18 | 2014-01-28T15:51:47 | Python | UTF-8 | Python | false | false | 1,993 | py | # -*- coding: utf-8 -*-
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | [
"noreply@github.com"
] | googleapis.noreply@github.com |
c586bd5693c7518eb1d938ce2ad960a01f98d250 | f95e73867e4383784d6fdd6a1c9fe06cffbfd019 | /ProjectEuler/p004_Largest_palindrome_product.py | 5d8c9510aee2afac0a0864fbbfc27608ef991779 | [] | no_license | linxiaohui/CodeLibrary | da03a9ed631d1d44b098ae393b4bd9e378ab38d3 | 96a5d22a8c442c4aec8a064ce383aba8a7559b2c | refs/heads/master | 2021-01-18T03:42:39.536939 | 2018-12-11T06:47:15 | 2018-12-11T06:47:15 | 85,795,767 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 342 | py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import timeit
def PE004():
M=0
for i in range(100,10000):
for j in range(i+1,1000):
k=i*j
#if k==int(str(k)[::-1]) and k>M :
if k>M and k==int(str(k)[::-1]) :
M=k
print M
print timeit.tim... | [
"llinxiaohui@126.com"
] | llinxiaohui@126.com |
6e3669121fdd67488f4e7ec58aa121cf467f15dc | f8ffac4fa0dbe27316fa443a16df8a3f1f5cff05 | /Regex/Matching_Anything_But_New_Line.py | 9d1b4802c8910f717e3f7aafecd4dfcb1cc4b4c3 | [] | no_license | ankitniranjan/HackerrankSolutions | e27073f9837787a8af7a0157d95612028c07c974 | e110c72d3b137cf4c5cef6e91f58a17452c54c08 | refs/heads/master | 2023-03-16T19:06:17.805307 | 2021-03-09T16:28:39 | 2021-03-09T16:28:39 | 292,994,949 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 411 | py | # Your task is to write a regular expression that matches only and exactly strings of form: abc.def.ghi.jkx, where each variable a,b,c,d,e,f,g,h,i,j,k,x can be
# any single character except the newline.
regex_pattern = r"^.{3}\..{3}\..{3}\..{3}$" # Do not delete 'r'.
import re
import sys
test_string = in... | [
"noreply@github.com"
] | ankitniranjan.noreply@github.com |
f1852c7da40eb5c08990351bb1c5c7ea3197c233 | 7bfcb91f95d20f1199d54f91c9a095df08b44d83 | /Backup/Django_Youtube/WebBanHang/user/models.py | b2d82ecc75ed2668b3c7dbb54babf9acbad04250 | [] | no_license | llduyll10/backup | bcb09eb632dd0858d515aacb7132d913da4dc24c | 8849d812566977f9a379d38ee1daa2ef42c02c7f | refs/heads/master | 2023-02-28T11:22:23.831040 | 2021-02-01T17:09:55 | 2021-02-01T17:09:55 | 335,006,700 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 263 | py | from django.db import models
from django.contrib.auth.models import AbstractUser
# Create your models here.
class CustomerUser(AbstractUser):
phone_number = models.CharField(default='', max_length=15)
address = models.CharField(default='', max_length=255) | [
"llduyll10@gmail.com"
] | llduyll10@gmail.com |
72caec1e57d85a6bf4b606a5228254cf3c680874 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_179/ch25_2020_03_23_14_36_52_247565.py | b77b247db72eeb75a6603e8b3a253feeebcab017 | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 300 | py | import math
g = 9.8
def calcula_distancia (velocidade, angulo):
angulo_radianos = math.degrees(angulo)
distancia = (velocidade**2 * math.sin(2*angulo_radianos))/g
return distancia
if distancia < 98:
print ('Muito perto')
elif distancia > 102:
print ('Muito longe')
else:
print ('Acertou!') | [
"you@example.com"
] | you@example.com |
01aaab4806daf83624fce5a5d71e77ac84e3cb95 | 714983fc24c6befe80d426dd94134d09ad2cbdfb | /env/lib/python3.6/site-packages/RestAuth/Services/migrations/0004_delete_old_m2m.py | 31494a3ab34e3a19585de405f5ad81cb7bb1f511 | [] | no_license | sachinlokesh05/login-registration-forgotpassword-and-resetpassword-using-django-rest-framework- | 486354ffb3a397c79afc6cbb290ab1cd637f50ac | 60769f6b4965836b2220878cfa2e1bc403d8f8a3 | refs/heads/master | 2023-01-28T22:19:13.483527 | 2020-01-28T14:07:53 | 2020-01-28T14:07:53 | 233,223,694 | 3 | 0 | null | 2023-01-07T22:10:06 | 2020-01-11T11:49:44 | Python | UTF-8 | Python | false | false | 4,682 | py | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Removing M2M table for field hosts on 'Service'
db.delete_table('Services_service_hosts')
def backwa... | [
"sachin.beee.15@acharya.ac.in"
] | sachin.beee.15@acharya.ac.in |
52bd5b80c303f7ec03c6a84634f9654784e1fe1c | 2293c76c3d18e2fcd44ded90bd40113d26285663 | /pyeccodes/defs/grib2/modelName_def.py | ca5790b97b3bf22a70902abdc87628726645d7a4 | [
"Apache-2.0"
] | permissive | ecmwf/pyeccodes | b1f121dbddf68d176a03805ed5144ba0b37ac211 | dce2c72d3adcc0cb801731366be53327ce13a00b | refs/heads/master | 2022-04-23T10:37:40.524078 | 2020-04-18T06:30:29 | 2020-04-18T06:30:29 | 255,554,540 | 9 | 3 | null | null | null | null | UTF-8 | Python | false | false | 1,990 | py | import pyeccodes.accessors as _
def load(h):
def wrapped(h):
originatingCentre = h.get_l('originatingCentre')
if originatingCentre == 242:
return 'cosmo-romania'
if originatingCentre == 220:
return 'cosmo-poland'
if originatingCentre == 96:
... | [
"baudouin.raoult@ecmwf.int"
] | baudouin.raoult@ecmwf.int |
bb5ebaf33900bfcc44fdc19ac42207993daeaa5f | 551d993b15f7e54635cc11d7ed3ee45a2e9aacc6 | /AAE/Tensorflow_implementation/unsupervised/regularized_z/model.py | df4e3fcf6ad90ce669025df91eb33dfbcfbcb10a | [
"MIT"
] | permissive | hendrikTpl/GAN_models | 6185a3c112a8b45205bdd4c556164b6153fbec19 | 8234c7f04be39d20fe09f81511b591deab9152a9 | refs/heads/master | 2021-10-25T16:52:13.239290 | 2019-04-05T15:28:06 | 2019-04-05T15:28:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,844 | py | from component_without_bn import *
class Object:
pass
def build_graph(is_test=False):
# Inputs
images = tf.placeholder(dtype=tf.float32, shape=[None, config.ndim_x])
z_sampler = tf.placeholder(dtype=tf.float32, shape=[None, config.ndim_z])
learning_rate = tf.placeholder(dtype=tf.float32, shape=[... | [
"1019636836@qq.com"
] | 1019636836@qq.com |
4e84c64706c5b3dcde4f84dc13e6085aa18fa72b | 61296b98e4d481893db4bc51d75652c7109ae626 | /0000_examples/cobotta_g.py | 116d8d398c21d519f84520776dd6e95bfdd43b4d | [
"MIT"
] | permissive | Shogo-Hayakawa/wrs | 23d4560b1062cf103ed32db4b2ef1fc2261dd765 | 405f15be1a3f7740f3eb7d234d96998f6d057a54 | refs/heads/main | 2023-08-19T19:29:15.409949 | 2021-11-02T01:22:29 | 2021-11-02T01:22:29 | 423,663,614 | 0 | 0 | MIT | 2021-11-02T00:59:17 | 2021-11-02T00:59:17 | null | UTF-8 | Python | false | false | 1,418 | py | import visualization.panda.world as wd
import grasping.planning.antipodal as gp
import robot_sim.end_effectors.grippers.cobotta_gripper.cobotta_gripper as cg
import modeling.collision_model as cm
import modeling.geometric_model as gm
import numpy as np
import math
base = wd.World(cam_pos=np.array([.5, .5, .5]), lookat... | [
"wanweiwei07@gmail.com"
] | wanweiwei07@gmail.com |
560bbdf2d856311a383f2556ff042c6b24798d81 | 85a9ffeccb64f6159adbd164ff98edf4ac315e33 | /pysnmp-with-texts/SAF-ENTERPRISE.py | 25f13b95d7e50531041d277cb4e2ad47bc261ce1 | [
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | agustinhenze/mibs.snmplabs.com | 5d7d5d4da84424c5f5a1ed2752f5043ae00019fb | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | refs/heads/master | 2020-12-26T12:41:41.132395 | 2019-08-16T15:51:41 | 2019-08-16T15:53:57 | 237,512,469 | 0 | 0 | Apache-2.0 | 2020-01-31T20:41:36 | 2020-01-31T20:41:35 | null | UTF-8 | Python | false | false | 2,343 | py | #
# PySNMP MIB module SAF-ENTERPRISE (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SAF-ENTERPRISE
# Produced by pysmi-0.3.4 at Wed May 1 14:59:53 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2... | [
"dcwangmit01@gmail.com"
] | dcwangmit01@gmail.com |
b18c5a2b2afb8aa641c036874755e5247c1d83d0 | be78d77bea1a5eea2a7f0d4090e1fc138623b79a | /cybox/test/objects/link_test.py | bac34e34bbbca2617a14995b938c2e2f2505741b | [
"BSD-3-Clause"
] | permissive | CybOXProject/python-cybox | 399f73feb6a54778dca9260b1c0340a3895c6369 | 25e6e8b3a6f429f079d3fbd9ace3db9eb3d5ab71 | refs/heads/master | 2020-05-21T19:05:56.725689 | 2020-05-01T13:33:48 | 2020-05-01T13:33:48 | 7,631,169 | 43 | 31 | BSD-3-Clause | 2020-05-01T12:41:03 | 2013-01-15T19:04:47 | Python | UTF-8 | Python | false | false | 980 | py | # Copyright (c) 2017, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
import unittest
from mixbox.vendor.six import u
from cybox.core import Observables
from cybox.objects.link_object import Link
from cybox.objects.uri_object import URI
from cybox.test.objects import ObjectTestCase
... | [
"gback@mitre.org"
] | gback@mitre.org |
1e8fed92b77867c5a707bc1e8cdaed3ff6f5566b | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-5/20ed819acd6f85b1facda3b799d3c24b3ada7ad6-<run>-bug.py | 9d67f4caf81ac18c3daab8feb6cc8736cb5c336a | [] | no_license | wsgan001/PyFPattern | e0fe06341cc5d51b3ad0fe29b84098d140ed54d1 | cc347e32745f99c0cd95e79a18ddacc4574d7faa | refs/heads/main | 2023-08-25T23:48:26.112133 | 2021-10-23T14:11:22 | 2021-10-23T14:11:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,420 | py | def run(self, terms, variables, **kwargs):
if (not CREDSTASH_INSTALLED):
raise AnsibleError('The credstash lookup plugin requires credstash to be installed.')
ret = []
for term in terms:
try:
version = kwargs.pop('version', '')
region = kwargs.pop('region', None)
... | [
"dg1732004@smail.nju.edu.cn"
] | dg1732004@smail.nju.edu.cn |
00884fcc431f3b0fc1c306f662977b63ebc1c16c | 743da4642ac376e5c4e1a3b63c079533a5e56587 | /build/lib.win-amd64-3.6/fairseq/modules/quantization/pq/modules/__init__.py | b6881e26bb167f75f55dacfac72238979dd74f80 | [
"MIT"
] | permissive | tmtmaj/Exploiting-PrLM-for-NLG-tasks | cdae1b6e451b594b11d8ecef3c1cd4e12fe51c9b | e8752593d3ee881cf9c0fb5ed26d26fcb02e6dd5 | refs/heads/main | 2023-06-16T08:26:32.560746 | 2021-07-14T17:50:19 | 2021-07-14T17:50:19 | 371,899,601 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 298 | py | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from .qconv import PQConv2d # NOQA
from .qlinear import PQLinear # NOQA
from .qemb import PQEmbedding # NOQA
| [
"qkrwjdgur09@naver.com"
] | qkrwjdgur09@naver.com |
52ae3a1a8d1d8f8f7503b9181f015b165f68bf00 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_scrubs.py | 6efbee2e9b847a91a88e3d43d8c1023f95e3fd07 | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 231 | py |
from xai.brain.wordbase.nouns._scrub import _SCRUB
#calss header
class _SCRUBS(_SCRUB, ):
def __init__(self,):
_SCRUB.__init__(self)
self.name = "SCRUBS"
self.specie = 'nouns'
self.basic = "scrub"
self.jsondata = {}
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
9c765fca0194129caa59e74b70cc204fc59bce14 | cf1e19f7b6354302037bca563b42218df7d79400 | /최단경로/[2307]도로검문.py | 3540a2ab6f4b48e1f02290e4e11b12bf476f0669 | [] | no_license | kim-kiwon/Baekjoon-Algorithm | 680565ddeced2d44506ae6720cf32d8004db42f8 | 4699e6551d3e7451648b9256c54ea4318b71bd4d | refs/heads/master | 2023-04-13T11:10:21.031969 | 2021-04-26T10:50:08 | 2021-04-26T10:50:08 | 325,209,266 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,898 | py | #다익스트라 + 경로추적
import heapq
n, m = map(int, input().split())
INF = int(1e9)
graph = [[] for _ in range(n+1)]
previous = [1] * (n+1) #이전 노드 저장
for _ in range(m):
a, b, dist = map(int, input().split())
graph[a].append((b, dist))
graph[b].append((a, dist))
def dijkstra():
distance = [INF] * (n+1)
... | [
"76721493+kim-kiwon@users.noreply.github.com"
] | 76721493+kim-kiwon@users.noreply.github.com |
e1c2fca2bad35624293caa5c903e7e1a37fcb96d | e35eb92b5ab6547119585004b9eea3cafe948050 | /efsw/archive/errors.py | 3b9ac8626e58cb7513fc221356b582c5bec573f4 | [] | no_license | einsfr/mmkit | 0a084db85b2cf5ba268e692676095d768733f387 | f12bc2f83254a3123e02abdc105816cc04c438b5 | refs/heads/master | 2020-12-31T05:56:19.287611 | 2016-06-10T05:56:58 | 2016-06-10T05:56:58 | 29,473,203 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 598 | py | ITEM_LINK_SELF_SELF = 'Элемент не может иметь связь с самим собой.'
ITEM_LINK_TYPE_UNKNOWN = 'Неизвестный тип связи между элементами: {0}.'
ITEM_NOT_FOUND = 'Элемент(ы) с ID {0} не существует(ют).'
STORAGE_NOT_FOUND = 'Хранилище(а) с ID {0} не существует(ют).'
STORAGE_NOT_ALLOWED_AS_ARCHIVE = 'Хранилище(а) с ID {0} нел... | [
"einsfr@users.noreply.github.com"
] | einsfr@users.noreply.github.com |
9084c5e743b26571e62ba65a4df2d3ec5e68700c | a3972cb6ba32abd18b374975f4abd5318bc95f09 | /project/src/yosigy/api/yosigy_list_views.py | 960d32f8f54604c94ee00262c81979094695a2d5 | [] | no_license | ssr03/MiniDelivery | c57bb45e497cab34787473925663ace46dbb6b2d | 659d9757d1f369a6713aa5a66bab2aa5d6381b8e | refs/heads/master | 2020-07-30T15:05:01.401229 | 2019-09-23T11:52:51 | 2019-09-23T11:52:51 | 210,267,973 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,099 | py | import enum
from datetime import datetime
from django.core.paginator import Paginator
from django.db.models import F, Count
from django.http import JsonResponse
from django.views.generic.base import View
from accounts.mixins import LoginRequiredMixin
from restaurant.api.views import CategoryNum
from yosigy.models i... | [
"43363127+ssr03@users.noreply.github.com"
] | 43363127+ssr03@users.noreply.github.com |
0f41b4c555162561f877240887369c044b1fe898 | 3d589d1c56b55fbd2b45b03564b8a9442ebf142b | /lib/src/klio/metrics/base.py | 1b50aeb1da57930cc8fba17042c72434460c2eb4 | [
"Apache-2.0"
] | permissive | spotify/klio | 1aff27412e92c9d699259e5ab1eaeb39dc3e9571 | e625565708ed846201d2e05f782c0ce585554346 | refs/heads/develop | 2023-05-25T14:33:28.348335 | 2022-03-23T20:34:09 | 2022-03-23T20:34:09 | 285,928,366 | 815 | 57 | Apache-2.0 | 2023-05-24T21:07:09 | 2020-08-07T22:02:58 | Python | UTF-8 | Python | false | false | 5,765 | py | # Copyright 2019-2020 Spotify AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | [
"lynn@spotify.com"
] | lynn@spotify.com |
2682ec078d2d665c54515022a6840ddf88168001 | 7a1f6f1aae43b219cd34c3c9b907923fb839e6f5 | /Python/Udemy/FXTRADE/pyfxtrading/pyfxtrading/28/app/controllers/webserver.py | bbf2ff35ce8221762754b16b7b6dd096ee8484a4 | [] | no_license | amanoman/amanoman.github.io | b5afc80e0e49ed15db793e2ebf69003c05ab8ce0 | 141c928f6d1df0389859f663f6439d327d4c32d6 | refs/heads/master | 2023-05-28T07:22:09.735409 | 2021-03-31T15:00:14 | 2021-03-31T15:00:14 | 187,139,297 | 0 | 1 | null | 2023-05-22T23:37:24 | 2019-05-17T03:19:36 | Jupyter Notebook | UTF-8 | Python | false | false | 543 | py | from flask import Flask
from flask import render_template
import settings
app = Flask(__name__, template_folder='../views')
@app.teardown_appcontext
def remove_session(ex=None):
from app.models.base import Session
Session.remove()
@app.route('/')
def index():
app.logger.info('index')
return rende... | [
"amntkykblog@gmail.com"
] | amntkykblog@gmail.com |
2dd09cf0b1134b3972740048402bc6e9ee1c97be | 1ece1faa638f85c567fdb237c67340501f86f89e | /model/model_builder.py | 5bc0acb8d41370c2b1905ff26fb7f1070790eb67 | [] | no_license | seasa2016/transformer_random | 54223ee5b04a4563c7903d925436d843b8cf7f1c | e3e13c9a2ddc49558d8e991427a974848a850b9c | refs/heads/master | 2020-04-02T12:21:28.167673 | 2019-03-19T03:45:00 | 2019-03-19T03:45:00 | 154,429,913 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,030 | py | import torch
import torch.nn as nn
from torch.nn.init import xavier_uniform_,xavier_normal_
from .module.Embedding import Embedding
from .util.Logger import logger
from . import Constant
from . import transformer
def build_embedding(opt,word_dict,max_len,for_encoder=True,dtype='sum',tag=None):
if(for_encoder):
... | [
"ericet1234@gmail.com"
] | ericet1234@gmail.com |
b51e6caa09f683cec6c8f09fb1aca60e73ec36f0 | 7bededcada9271d92f34da6dae7088f3faf61c02 | /pypureclient/flasharray/FA_2_25/models/resource_performance_no_id_by_array_get_response.py | dc59892d20f80e34fb26c25e0f59584a263ca562 | [
"BSD-2-Clause"
] | permissive | PureStorage-OpenConnect/py-pure-client | a5348c6a153f8c809d6e3cf734d95d6946c5f659 | 7e3c3ec1d639fb004627e94d3d63a6fdc141ae1e | refs/heads/master | 2023-09-04T10:59:03.009972 | 2023-08-25T07:40:41 | 2023-08-25T07:40:41 | 160,391,444 | 18 | 29 | BSD-2-Clause | 2023-09-08T09:08:30 | 2018-12-04T17:02:51 | Python | UTF-8 | Python | false | false | 6,240 | py | # coding: utf-8
"""
FlashArray REST API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.25
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re
import six
import typing
from ... | [
"noreply@github.com"
] | PureStorage-OpenConnect.noreply@github.com |
2455804a9deef4d3443589283af4dc9f1ef5c926 | dd8227454b817ccf2ceb24b3dfd4260d4ded7a72 | /scripts/item/consume_2435694.py | 020e445c8c1b62894419c308afa2bc358e797d3f | [
"MIT"
] | permissive | Snewmy/swordie | 0dd3c17808b064c2cb2bd9576b51daf01ae5d686 | ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17 | refs/heads/master | 2023-06-30T21:14:05.225798 | 2021-07-06T14:32:39 | 2021-07-06T14:32:39 | 389,497,502 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 174 | py | # Heroes Evan Damage Skin
success = sm.addDamageSkin(2435694)
if success:
sm.chat("The Heroes Evan Damage Skin has been added to your account's damage skin collection.")
| [
"vcalheirosdoc@gmail.com"
] | vcalheirosdoc@gmail.com |
12caf078872a5634ca4638aed6dbdbd7776b5062 | 6097031d8e85400214085f152164a29346d106e3 | /maxheap.py | 7e3f269c4b2365d3684fe48cdb32ec815206f9cd | [] | no_license | ekourkchi/GalaxyGroups | 2fccca4998850c0838d0c7ef949bba8b1267716a | 19e98da0015b0462133133a23915e6d633614ad3 | refs/heads/master | 2022-04-03T09:30:19.667796 | 2020-02-13T03:05:48 | 2020-02-13T03:05:48 | 112,898,380 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,137 | py | #!/home/ehsan/Ureka/Ureka/variants/common/bin/python
import numpy as np
from math import *
from copy import *
class heapNode:
key = None
ID = None
flag = False
def __init__(self, key, ID):
self.key = key
self.ID = ID
def toString(self):
print self.key, self.ID, self.flag
# ... | [
"ekourkchi@gmail.com"
] | ekourkchi@gmail.com |
4e3d52464d257688f122a23748edd43590043b89 | 7bededcada9271d92f34da6dae7088f3faf61c02 | /pypureclient/flasharray/FA_2_24/models/network_interface_neighbor_capability.py | 76ae203e5847eb8a031597b8f2d39119f564eac0 | [
"BSD-2-Clause"
] | permissive | PureStorage-OpenConnect/py-pure-client | a5348c6a153f8c809d6e3cf734d95d6946c5f659 | 7e3c3ec1d639fb004627e94d3d63a6fdc141ae1e | refs/heads/master | 2023-09-04T10:59:03.009972 | 2023-08-25T07:40:41 | 2023-08-25T07:40:41 | 160,391,444 | 18 | 29 | BSD-2-Clause | 2023-09-08T09:08:30 | 2018-12-04T17:02:51 | Python | UTF-8 | Python | false | false | 4,245 | py | # coding: utf-8
"""
FlashArray REST API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.24
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re
import six
import typing
from ... | [
"noreply@github.com"
] | PureStorage-OpenConnect.noreply@github.com |
2ecaa0902b36455da6e55c02523cefe6bcec5bfc | e5f4c22bfae93d3d96dea1b0ed8f3e4df373243f | /test.py | f3a74709481a1e1e55a6bdc81b7b3e3e0cf3f866 | [] | no_license | MrLokans/discover_flask | 5925a2ab07480398543d51e33c8be2cf23b2c36b | 63f847409dd67725bdef754cd0041f2647dabf4e | refs/heads/master | 2021-01-10T16:25:21.767911 | 2016-03-07T05:44:17 | 2016-03-07T05:44:17 | 52,816,186 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,919 | py | import unittest
from app import app
class AppTestCase(unittest.TestCase):
def setUp(self):
self.tester = app.test_client(self)
def login(self, username, password, follow_redirects=True):
return self.tester.post('/login',
data={'username': username,
... | [
"trikster1911@gmail.com"
] | trikster1911@gmail.com |
a145346bc456c2281fad96365f8d9a5af1f4cd7d | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/sets_20200609191149.py | 89a07ef2d3f4c49463319f9699998f9dd296f2fc | [] | no_license | MaryanneNjeri/pythonModules | 56f54bf098ae58ea069bf33f11ae94fa8eedcabc | f4e56b1e4dda2349267af634a46f6b9df6686020 | refs/heads/master | 2022-12-16T02:59:19.896129 | 2020-09-11T12:05:22 | 2020-09-11T12:05:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,000 | py | import json
def Strings(str):
# dictionary--> key value pairs
values = {}
newArray = []
keys = []
for i in str:
newArray.append(i.split(":"))
for j in range(0,len(newArray)):
if newArray[j][0] in values:
values[j][0] =
# if... | [
"mary.jereh@gmail.com"
] | mary.jereh@gmail.com |
8a463bda0d0c60cd4f34f3e9d156d3254165acfc | ebfcae1c5ba2997b2ac4471d5bedc3f5daffcb31 | /repos/Flask-Large-Application-Example-master/tests/views/test_pypi_packages.py | 27394594cc76c8ccde073c14c83e1f2757b0f036 | [
"MIT"
] | permissive | babiato/flaskapp1 | 84de2d0b26a54f5820d3bbe97926782ad41e005c | 530beb9e3b8516e0e93960b99521c23a523ef546 | refs/heads/master | 2023-02-26T16:36:49.760632 | 2021-02-04T09:08:40 | 2021-02-04T09:08:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,239 | py | from flask import current_app
from flask.ext.celery import CELERY_LOCK
import pytest
from redis.exceptions import LockError
from pypi_portal.extensions import db, redis
from pypi_portal.models.pypi import Package
from pypi_portal.models.redis import POLL_SIMPLE_THROTTLE
from pypi_portal.tasks import pypi
class FakeD... | [
"jinxufang@tencent.com"
] | jinxufang@tencent.com |
6e242cc43e2c7d24c5cfd1f02e749621f9366a0e | 0bfb4208bdf7fcfd75311c777e25a3b639bf566d | /backend/code/iep/auth/models.py | fb6f856736cbe2fd1a25f1dc89baf52a17eff536 | [
"Apache-2.0"
] | permissive | socek/iep | ab7833f94af739abd19f569f28de84cdcc689e95 | 793e35ca5304eef7b7dacb5dd8d486622f497759 | refs/heads/master | 2020-05-16T13:48:12.252161 | 2019-12-03T08:28:05 | 2019-12-03T08:28:05 | 183,082,207 | 0 | 0 | Apache-2.0 | 2019-12-03T08:28:07 | 2019-04-23T19:24:49 | Python | UTF-8 | Python | false | false | 1,193 | py | from bcrypt import checkpw
from bcrypt import gensalt
from bcrypt import hashpw
from iep.application.model import Model
class User(Model):
def __init__(
self,
uid,
created_at=None,
updated_at=None,
name=None,
email=None,
is_admin=None,
password=None... | [
"msocek@gmail.com"
] | msocek@gmail.com |
f77ffc69cb16459c8138b3e8578323ac411365e2 | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-4/5644d97cc5014e18b14799feeb9b354d528a6489-<test_invalid_interfaces>-bug.py | 88bcd68511e3ab151bad7e95439f0d409610e661 | [] | no_license | wsgan001/PyFPattern | e0fe06341cc5d51b3ad0fe29b84098d140ed54d1 | cc347e32745f99c0cd95e79a18ddacc4574d7faa | refs/heads/main | 2023-08-25T23:48:26.112133 | 2021-10-23T14:11:22 | 2021-10-23T14:11:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 303 | py | def test_invalid_interfaces(self):
event = self.create_sample_event(platform='invalid-interfaces')
self.browser.get('/{}/{}/issues/{}/'.format(self.org.slug, self.project.slug, event.group.id))
self.browser.wait_until('.entries')
self.browser.snapshot('issue details invalid interfaces') | [
"dg1732004@smail.nju.edu.cn"
] | dg1732004@smail.nju.edu.cn |
bb4d3c4ffba8b3fdd9dae18528199a1e9560a1a0 | 43ede7b8fb546c00804c0ef94501f6e48ba170d6 | /Cursos Python/Python 3 - Solyd/Orientacao_a_objeto.py | e902f0d109aa9feef7f8a68a9651bc74a65cd1bb | [] | no_license | bopopescu/Python-13 | db407d17252473e78e705e563cfee4dbd316c6b9 | c8bef500f2d3e4a63d850f96dfa219eff2ecebda | refs/heads/master | 2022-11-22T16:24:08.490879 | 2020-06-11T14:22:24 | 2020-06-11T14:22:24 | 281,830,055 | 0 | 0 | null | 2020-07-23T02:26:31 | 2020-07-23T02:26:30 | null | UTF-8 | Python | false | false | 1,339 | py | class Cliente:
def __init__(self, nome, cpf, idade):
self.__nome = nome
self.__cpf = cpf
self.__idade = idade
def dados_cliente(self):
return {'nome': self.__nome,
'cpf': self.__cpf,
'idade': self.__idade}
class Conta(Cliente):
def __init__(... | [
"ofc.erickson@gmail.com"
] | ofc.erickson@gmail.com |
ccf9a734c56a27aad1c7b63e96282803ea84b5a4 | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-5/f1dbf6292b80b7cc67661707e7f1d8b5b0a06eb5-<check_params>-bug.py | b748d6d0116f380fc5635eaf4ef57ebc08f34ef9 | [] | no_license | wsgan001/PyFPattern | e0fe06341cc5d51b3ad0fe29b84098d140ed54d1 | cc347e32745f99c0cd95e79a18ddacc4574d7faa | refs/heads/main | 2023-08-25T23:48:26.112133 | 2021-10-23T14:11:22 | 2021-10-23T14:11:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 761 | py | def check_params(self):
'Check all input params'
if (not self.key_id.isdigit()):
self.module.fail_json(msg='Error: key_id is not digit.')
if ((int(self.key_id) < 1) or (int(self.key_id) > 4294967295)):
self.module.fail_json(msg='Error: The length of key_id is between 1 and 4294967295.')
... | [
"dg1732004@smail.nju.edu.cn"
] | dg1732004@smail.nju.edu.cn |
dfdfdc73b69afa83125300340f0252cfe3100d38 | a127d0feb3bcf4f2581f385bb24f2b789c771c9c | /10syo/95_2.py | 0a1ea7e35fd38d9a0daad78a923622656306fdf5 | [] | no_license | NgoVanDau/nlp100knock | 01383e4cc5a1470508744668103b9ea1a238b892 | 3ef63c0d2dfb55c0e6a31aced645f284325a98a5 | refs/heads/master | 2023-03-22T13:19:23.932429 | 2018-08-05T05:27:11 | 2018-08-05T05:27:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 994 | py | fname_input = 'combined_out.tab'
class Data:
def __init__(self, human_score, my_score):
self.human_score = human_score
self.my_score = my_score
def __repr__(self):
return 'Data%s' % repr(self.__dict__)
# データ配列作成
with open(fname_input) as data_file:
def read_data():
for lin... | [
"kota.k.1132.pda@gmail.com"
] | kota.k.1132.pda@gmail.com |
796965104f9a8b405aea58339305c0e917d2c247 | 7aae3051a7d08a280f7adc55b4b984bc48c87db3 | /vehicle/admins/vehicle_model_admin.py | ba26d4ec5f9adf2698da8711bc9fa8bd44e5b5a4 | [] | no_license | ohahlev/ahlev-django-vehicle | d087375e3b49cda9253a776f79e4531bbf0a686d | 51895c200b40be7a298a4054ba2d8945df6a84d0 | refs/heads/master | 2020-11-30T07:00:12.441028 | 2020-01-21T01:25:48 | 2020-01-21T01:25:48 | 230,340,642 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,253 | py | from django.utils.html import format_html
from django.contrib import admin
from imagekit import ImageSpec
from imagekit.admin import AdminThumbnail
from imagekit.processors import ResizeToFill
from imagekit.cachefiles import ImageCacheFile
from ..models.vehicle_model import VehicleModel
from .widgets import AdminSmalle... | [
"ohahlev@gmail.com"
] | ohahlev@gmail.com |
19ef56453f855c29a72eaa6c8c52e2ca967e6a36 | f8e8e365c9cf58b61d72655bc2340baeaed5baff | /Leetcode/Python Solutions/Binary Search/ValidPerfectSquare.py | c4e8a70a8beb4c70db11315cbe222321332ff181 | [
"MIT"
] | permissive | Mostofa-Najmus-Sakib/Applied-Algorithm | 39a69f6b9ed113efe4a420d19cad79e0aa317637 | bc656fd655617407856e0ce45b68585fa81c5035 | refs/heads/master | 2023-08-31T19:54:34.242559 | 2021-11-05T03:43:35 | 2021-11-05T03:43:35 | 412,263,430 | 0 | 0 | MIT | 2021-09-30T23:45:29 | 2021-09-30T23:45:25 | null | UTF-8 | Python | false | false | 898 | py | """
LeetCode Problem 367. Valid Perfect Square
Link: https://leetcode.com/problems/valid-perfect-square/
Written by: Mostofa Adib Shakib
Language: Python
Observation:
1) Number less than 2 will always form perfect squares so return True.
2) The number will always be in the first half of the array. Hence, we can disca... | [
"adibshakib@gmail.com"
] | adibshakib@gmail.com |
ed0466956305c5f5e6955a737d43b2039c8f0fc5 | 2a54e8d6ed124c64abb9e075cc5524bb859ba0fa | /.history/4-functional-programming/7-list-comprehension_20200422222427.py | 81d606e197ec10031073a3db9b3879a25cb59bc1 | [] | no_license | CaptainStorm21/Python-Foundation | 01b5fbaf7a913506518cf22e0339dd948e65cea1 | a385adeda74f43dd7fb2d99d326b0be23db25024 | refs/heads/master | 2021-05-23T01:29:18.885239 | 2020-04-23T19:18:06 | 2020-04-23T19:18:06 | 253,171,611 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 346 | py | #list, set, dicitonary
my_list = []
for char in 'HELLO':
my_list.append(char)
print(my_list)
dict_list = [char for char in 'good morning']
print(dict_list)
num_list = [num for num in range (0, 100)]
print(num_list)
print("divide by 3 with no remainder")
num_list3 = [num for num in range (0, 100) if(nu... | [
"tikana4@yahoo.com"
] | tikana4@yahoo.com |
c2ee78250d0f3860d8ec164c11ab88e734704bed | 8efd8bcd3945d88370f6203e92b0376ca6b41c87 | /problems100_200/151_Reverse_Words_in_a_String.py | 11b5357b6300152e2debfd6b3f1328822ffebdd4 | [] | no_license | Provinm/leetcode_archive | 732ad1ef5dcdfdde6dd5a33522e86f7e24ae2db5 | 3e72dcaa579f4ae6f587898dd316fce8189b3d6a | refs/heads/master | 2021-09-21T08:03:31.427465 | 2018-08-22T15:58:30 | 2018-08-22T15:58:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 819 | py | #coding=utf-8
'''
151. Reverse Words in a String
Given an input string, reverse the string word by word.
Example:
Input: "the sky is blue",
Output: "blue is sky the".
Note:
A word is defined as a sequence of non-space characters.
Input string may contain leading or trailing spaces. However, your reversed string... | [
"zhouxin@gmail.com"
] | zhouxin@gmail.com |
6659b4d8145e55d900dcabb7398db42929c560f4 | d75560d9acde4f1f6457898d8862b06ba5f8dd7b | /backend/msm_sgsjhsjh4803_de_13561/wsgi.py | 3cd1976c5b367e8dc49ef8d3516ab2cc510980f7 | [] | no_license | crowdbotics-apps/msm-sgsjhsjh4803-de-13561 | af6563f775832664041dbd8abc5d05af9d8d4a4f | 9364d828ffee0edfe68d263fce2b0a7cb2949039 | refs/heads/master | 2022-12-29T15:25:29.870944 | 2020-10-19T08:18:12 | 2020-10-19T08:18:12 | 305,263,685 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 427 | py | """
WSGI config for msm_sgsjhsjh4803_de_13561 project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdef... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
e348b3e0dfab26e0cc1f9c6a114ae59be50476c4 | 4c8755443320f0e8fde2718aec40c49ef27ab6fe | /{{cookiecutter.repo_name}}/cookiecutter_repo/utils/loaders.py | 0d90448aa34fd2244e0f3ef816996b8e56608d99 | [
"MIT"
] | permissive | ethman/cookiecutter-nussl | 28266f2b714607493016aa554794617e1cb431aa | 302df1bee74b13ff0e2c6725997f7b7fa26b32d5 | refs/heads/master | 2020-12-09T23:50:09.844838 | 2020-01-12T17:19:06 | 2020-01-12T17:19:06 | 233,449,725 | 0 | 0 | null | 2020-01-12T19:54:48 | 2020-01-12T19:54:47 | null | UTF-8 | Python | false | false | 586 | py | from .. import dataset, model
def load_dataset(dataset_class, dataset_folder, dataset_config):
DatasetClass = getattr(dataset, dataset_class)
dataset_instance = DatasetClass(dataset_folder, dataset_config)
return dataset_instance
def load_model(model_config):
model_class = model_config.pop('class', 'S... | [
"prem@u.northwestern.edu"
] | prem@u.northwestern.edu |
837d8f52574c6bab972f540869f2bca52b2bf000 | 94c8dd4126da6e9fe9acb2d1769e1c24abe195d3 | /qiskit/circuit/library/boolean_logic/quantum_or.py | 0864affb7958edffe5050f3c8d54af82bdc515be | [
"Apache-2.0"
] | permissive | levbishop/qiskit-terra | a75c2f96586768c12b51a117f9ccb7398b52843d | 98130dd6158d1f1474e44dd5aeacbc619174ad63 | refs/heads/master | 2023-07-19T19:00:53.483204 | 2021-04-20T16:30:16 | 2021-04-20T16:30:16 | 181,052,828 | 1 | 0 | Apache-2.0 | 2019-06-05T15:32:13 | 2019-04-12T17:20:54 | Python | UTF-8 | Python | false | false | 3,664 | py | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | [
"noreply@github.com"
] | levbishop.noreply@github.com |
a663a571c791506a5bbea2e874df529dbed68ebb | c75ec82316ed5322c5844912ce9c528c24360b9f | /nsd1907/py02/day01/cut_log.py | cceaf977d83d75e82696a61778603e0948c24313 | [] | no_license | MrZhangzhg/nsd2019 | a94cde22f2e4bd648bb9e56ca63827f558f3c083 | 54f6d2c7b348a69f13ad5f38f2fbdc8207528749 | refs/heads/master | 2021-08-22T17:38:27.697675 | 2020-02-22T08:36:21 | 2020-02-22T08:36:21 | 183,539,489 | 21 | 24 | null | 2020-05-17T12:07:55 | 2019-04-26T02:06:16 | HTML | UTF-8 | Python | false | false | 525 | py | import time
t9 = time.strptime('2019-05-15 09:00:00', '%Y-%m-%d %H:%M:%S')
t12 = time.strptime('2019-05-15 12:00:00', '%Y-%m-%d %H:%M:%S')
with open('mylog.txt') as fobj:
for line in fobj:
t = time.strptime(line[:19], '%Y-%m-%d %H:%M:%S')
if t > t12:
break
if t >= t9:
... | [
"zhangzg@tedu.cn"
] | zhangzg@tedu.cn |
7394010400225008bcf0ebefdea0242ca3765d3e | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_96/1509.py | 985390ba9c8945569ce4096912a9a40962d7ecaf | [] | 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,095 | py | from string import split
f1=open('B-large.in','r')
f2=open('out.txt','w')
t=int(f1.readline())
for i in range (t):
k=0
s=f1.readline()
data=list(map(int,s.split(' ')))
u=data[1]+0
for j in range(data[0]):
if data[j+3]==0 or data[j+3]==1:
if data[j+3]>=data[2]:
... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
3a7a4e0fc74d98a3d4bb90e7220f2bca91eaa4d0 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/97/usersdata/239/54617/submittedfiles/lecker.py | e3ba12e1ff6dc558621a8f2f17a217e1787cc426 | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 813 | py | # -*- coding: utf-8 -*-
from __future__ import division
def lecker (lista):
cont=0
for i in range (0,len(lista),1
if i==0:
if lista[i]>lista[i+1]:
cont=cont+1
elif i==(len(lista)-1):
if lista[i]>lista[i-1]:
cont=cont+1
else:
if lista[i]>lis... | [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
4ae9d4cd17ad18027fa1dffe901e6463804b40c4 | 5db0fab37c2b8a618d85d3b60fab9f806c416474 | /src/python/pants/backend/python/typecheck/mypy/skip_field.py | 672a681eeba2e506b35d3c2f51bbadb683934354 | [
"Apache-2.0"
] | permissive | pantsbuild/pants | 4988d1ac5474ec95f94ce2218aeb759401e4b011 | 98cbda8545f0d58c586ed2daa76fefd729d5e0d5 | refs/heads/main | 2023-09-05T03:44:17.646899 | 2023-09-01T19:52:09 | 2023-09-01T19:52:09 | 7,209,075 | 2,708 | 593 | Apache-2.0 | 2023-09-14T19:33:33 | 2012-12-17T17:39:04 | Python | UTF-8 | Python | false | false | 897 | py | # Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from pants.backend.python.target_types import (
PythonSourcesGeneratorTarget,
PythonSourceTarget,
PythonTestsGeneratorTarget,
PythonTestTarget,
PythonTestUtilsGenerator... | [
"noreply@github.com"
] | pantsbuild.noreply@github.com |
1586616caf1191874f3dfdf0a908af9d390cbd3e | 54eeab2befaa4bf0d96a7bd18110900f8f32c766 | /other/sql/sqlite.py | cc06497fe5586ae73d672cbedf67aa19174a1c04 | [] | no_license | w8833531/mypython | 40239ada90426db73444ee54e6e79decc6c9fc9b | 45ed12a611efd33838766e7bd73840e6d8b73e28 | refs/heads/master | 2021-01-19T06:59:09.790525 | 2017-10-18T06:20:43 | 2017-10-18T06:20:43 | 87,513,649 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,373 | py | #!/usr/bin/env python
#-*- coding: utf-8 -*-
#由于SQLite的驱动内置在Python标准库中,所以我们可以直接来操作SQLite数据库。
#要操作关系数据库,首先需要连接到数据库,一个数据库连接称为Connection;
#连接到数据库后,需要打开游标,称之为Cursor,通过Cursor执行SQL语句,然后,获得执行结果。
#导入SQLite 驱动
import sqlite3
try:
# 连接到SQLite数据库
# 数据库文件是test.db
# 如果文件不存在,会自动在当前目录创建:
conn = sqlite3.connect('test.db')
curs... | [
"w8833531@hotmail.com"
] | w8833531@hotmail.com |
24f4ad0bc75271d08496072c0885072c734d3990 | 5b1ff6054c4f60e4ae7315db9f20a334bc0b7634 | /Launchkey_MK2/Colors.py | 6f5028d35ea48a5ef4fb11c613cb1206a59fc846 | [] | no_license | maratbakirov/AbletonLive9_RemoteScripts | 2869122174634c75405a965401aa97a2dae924a1 | 4a1517c206353409542e8276ebab7f36f9bbd4ef | refs/heads/master | 2021-06-05T14:38:27.959025 | 2021-05-09T11:42:10 | 2021-05-09T11:42:10 | 13,348,327 | 3 | 4 | null | 2016-10-16T13:51:11 | 2013-10-05T16:27:04 | Python | UTF-8 | Python | false | false | 4,566 | py | #Embedded file name: /Users/versonator/Jenkins/live/output/mac_64_static/Release/python-bundle/MIDI Remote Scripts/Launchkey_MK2/Colors.py
from _Framework.ButtonElement import Color
from .consts import BLINK_LED_CHANNEL, PULSE_LED_CHANNEL
class Blink(Color):
def __init__(self, midi_value = 0, *a, **k):
su... | [
"julien@julienbayle.net"
] | julien@julienbayle.net |
ab14c4d4a9d8c432ae24647c18b9e98e4968ece0 | 90be755a741d6c93dd59d4acef8b27b4cf93ff54 | /src/elsia/scripts/get_abs_ori.py | 8decc0c43e2f8716f8f28629c4b7ed417de7cc24 | [] | no_license | karry3775/Elsia_ws | 05aa5786a6f3f64b70c7ceafead6d72d4ca18bab | 031f8006e9a439d9947be5ed288a666f20fca3a7 | refs/heads/master | 2023-02-21T05:21:10.842475 | 2021-01-23T14:58:57 | 2021-01-23T15:21:46 | 326,032,434 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,405 | py | #!/usr/bin/env python
import rospy
from sensor_msgs.msg import Image
from tf.transformations import quaternion_from_euler, euler_from_quaternion
from cv_bridge import CvBridge, CvBridgeError
from nav_msgs.msg import Odometry
import cv2
import numpy as np
import math as m
# initialize the node
rospy.init_node("get_abs_... | [
"kartikprakash3775@gmail.com"
] | kartikprakash3775@gmail.com |
b1dde0477b45dffe82a9f680f72b5dc5f910eee9 | 3eb4d64a8bb0bc240a2ef189724f4d51b5275eac | /heltour/tournament/migrations/0106_auto_20161031_0546.py | 059d9943ff0cb31240b7a8a561df84ba822d9f3b | [
"MIT"
] | permissive | brucemubayiwa/heltour | c01cc88be7f86dce8246f619d7aa2da37e0e0ac2 | fa4e9b06343acaf6a8a99337860e1ad433e68f6b | refs/heads/master | 2021-01-23T19:59:04.099215 | 2017-09-06T03:34:31 | 2017-09-06T03:34:31 | 102,840,526 | 1 | 0 | null | 2017-09-08T08:53:30 | 2017-09-08T08:53:30 | null | UTF-8 | Python | false | false | 2,839 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-10-31 05:46
from __future__ import unicode_literals
from django.db import migrations
import django.db.models.deletion
import select2.fields
class Migration(migrations.Migration):
dependencies = [
('tournament', '0105_seasonplayer_final_rating')... | [
"ben.cyanfish@gmail.com"
] | ben.cyanfish@gmail.com |
3ec6bfaea601759fd9ce090e2468cd49049e454d | 88cfeb8f7076450e7a38d31ab2d11883c1818c8d | /net/dpn92.py | bee4297159590c50e4ca40b1570569426a17eb3b | [] | no_license | ZQPei/Alibaba_Cloud_German_AI_Challenge_for_Earth_Observation | 4e5a127c12e0c02ed1914ab000a131e1a7f7d844 | c2efb32763af0a56a3a7ecb9d83c0744f71d5c14 | refs/heads/master | 2020-04-26T04:31:57.731178 | 2019-02-17T01:10:55 | 2019-02-17T01:10:55 | 173,305,034 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,563 | py | '''Dual Path Networks in PyTorch.'''
import torch
import torch.nn as nn
import torch.nn.functional as F
class Bottleneck(nn.Module):
def __init__(self, last_planes, in_planes, out_planes, dense_depth, stride, first_layer):
super(Bottleneck, self).__init__()
self.out_planes = out_planes
sel... | [
"dfzspzq@163.com"
] | dfzspzq@163.com |
9262d9b3881e896a97b190c2ea16eeea43d24d9c | 958c19436632b41b43c9462337d13e836935a9da | /E01_python_for_data_analysis/04_NumPy/0403_numpy_cal.py | 24af0cf6e7c79bf551a52bc51df3c822da19b676 | [] | no_license | Vincent105/ML | 4752b2a99c124e01e40e383a0177fb5d82115cb6 | fa926caabf83628b3fb7d74cee02a3e923a917f7 | refs/heads/master | 2020-12-29T18:21:50.144711 | 2020-10-12T09:56:41 | 2020-10-12T09:56:41 | 238,697,320 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 367 | py | import numpy as np
arr = np.array([[1., 2., 3.], [4., 5., 6.]])
print(arr)
print(arr * arr)
print(arr * arr - arr)
# 数组与标量的算术运算会将标量值传播到各个元素:
print(1 / arr)
print(arr * 0.5)
# 大小相同的数组之间的比较会生成布尔值数组:
arr2 = np.array([[0., 4., 1.], [7., 2., 12.]])
print(arr2)
print(arr2 > arr)
| [
"vincent1050917@gmail.com"
] | vincent1050917@gmail.com |
b352068896dbae835d20da90ab54de2d4f34fec9 | d2eb7bd335175edd844a3e6c1c633ee0dc2dbb25 | /contests_atcoder/arc017/arc017_c.py | 80b806e3389e7dfd81e012229a4a9723cc08f1d5 | [
"BSD-2-Clause"
] | permissive | stdiorion/competitive-programming | 5020a12b85f1e691ceb0cacd021606a9dc58b72c | e7cf8ef923ccefad39a1727ca94c610d650fcb76 | refs/heads/main | 2023-03-27T01:13:42.691586 | 2021-03-08T08:05:53 | 2021-03-08T08:05:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 667 | py | from bisect import bisect_left, bisect_right
n, x = map(int, input().split())
w = [int(input()) for _ in range(n)]
pt1 = w[:16]
pt2 = w[16:]
w1 = []
for bit in range(1 << len(pt1)):
weight = 0
for i in range(len(pt1)):
if (bit >> i) & 1:
weight += pt1[i]
w1.append(weight)
if not len(... | [
"itkn1900@gmail.com"
] | itkn1900@gmail.com |
23241518e94ae0d5c41c03ff56152a117f302c17 | d7ec67a5ba315103fa6a6bae6dc045f1fecf7add | /docs_master_tensorflow/keras/tf_dqn_simple_master/dqn_agent.py | d0dc2cccfa0c1fbf14d21175a9b41c3605ff96e2 | [] | no_license | munezou/PycharmProject | cc62f5e4278ced387233a50647e8197e009cc7b4 | 26126c02cfa0dc4c0db726f2f2cabb162511a5b5 | refs/heads/master | 2023-03-07T23:44:29.106624 | 2023-01-23T16:16:08 | 2023-01-23T16:16:08 | 218,804,126 | 2 | 1 | null | 2023-02-28T23:58:22 | 2019-10-31T15:57:22 | Jupyter Notebook | UTF-8 | Python | false | false | 4,247 | py | from collections import deque
import os
import numpy as np
import tensorflow as tf
class DQNAgent:
"""
Multi Layer Perceptron with Experience Replay
"""
def __init__(self, enable_actions, environment_name):
# parameters
self.name = os.path.splitext(os.path.basename(__file__))[0]
... | [
"kazumikm0119@pi5.fiberbit.net"
] | kazumikm0119@pi5.fiberbit.net |
42bcc717daa52c76b623b77adb64ac1e50d8fe60 | b57d337ddbe946c113b2228a0c167db787fd69a1 | /scr/py00033SpiderDeath.py | 6fd5b9134c2358a8544c5ef441100d8e4da50196 | [] | no_license | aademchenko/ToEE | ebf6432a75538ae95803b61c6624e65b5cdc53a1 | dcfd5d2de48b9d9031021d9e04819b309d71c59e | refs/heads/master | 2020-04-06T13:56:27.443772 | 2018-11-14T09:35:57 | 2018-11-14T09:35:57 | 157,520,715 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,258 | py | from toee import *
from utilities import *
from combat_standard_routines import *
def san_dying( attachee, triggerer ):
if should_modify_CR( attachee ):
modify_CR( attachee, get_av_level() )
if (attachee.map == 5069):
game.global_vars[3] = game.global_vars[3] + 1
if (game.party_alignment == LAWFUL_NEUTRAL or ... | [
"demchenko.recruitment@gmail.com"
] | demchenko.recruitment@gmail.com |
fa428df271c1a095589ea4dda94bbd27ca4f7705 | 06870667821f26b0c8c96b52321938df58fd91f6 | /parking_scrapers/scrapers/new_haven.py | 85e9236cddfb6c481a2d0bfc60ccfb3c43b84610 | [] | no_license | jmcarp/open-parking-spaces | 69244962a316fe6bd3273ba6837bfe8d0f1f4b8e | 5f855a1b25c9109f15af26e1fb3b4ecbd3ef5845 | refs/heads/master | 2023-01-24T11:43:53.641262 | 2020-11-30T19:00:46 | 2020-11-30T19:00:46 | 312,906,075 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,129 | py | import re
from typing import Iterator
import lxml.html
import requests
from base import LotSpaces, Scraper
class NewHavenScraper(Scraper):
"""Scrape New Haven html.
https://parknewhaven.com
"""
HTML_URL = "https://parknewhaven.com"
TIMEOUT = 5
SPACES_PATTERN = re.compile(r"(.*?):\s+(\d+)% \... | [
"jm.carp@gmail.com"
] | jm.carp@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.