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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ad05c517d35ad2ec7ca82834e97cbcb70bd8bad7 | acdb83652ea9405a56c2f0257f867a0b146a47c2 | /lib/Flask/model/Okapi BM25/bm25.py | dc125367d1fe83eec4cb519fee783bfe7731b065 | [] | no_license | latruonghai/query | 01561b4e23e153b06d0a0426377369a33212e4aa | 3d415b16966125015d66c449e3d56a208dfc430b | refs/heads/master | 2023-02-24T08:34:23.121351 | 2021-01-24T22:18:51 | 2021-01-24T22:18:51 | 300,475,902 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,414 | py | import re
import math
from nltk.stem import PorterStemmer
import os
from pyvi import ViTokenizer, ViPosTagger
import pickle
class QueryParsers:
def __init__(self, file):
self.filename = file
self.query = self.get_queries()
def get_queries(self):
#q = open(self.filename,'... | [
"="
] | = |
ff8119939df8debd77ff8686cfe9e8e79098e1dd | e4624cc8b073941e7c66eac77ac7ca1ef989cd37 | /protests/migrations/0002_auto_20200925_1922.py | f76c3b41c917cc5582d44689e6c1a9722c081f99 | [
"MIT"
] | permissive | mentix02/revolve | a7f9ed4626c626d45a93de589857fe237ab9ca18 | 59e3c2999bb511515478e20edf80556665de6c67 | refs/heads/master | 2022-12-18T16:33:13.582607 | 2020-09-26T10:49:16 | 2020-09-26T10:49:16 | 298,392,674 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 904 | py | # Generated by Django 3.1.1 on 2020-09-25 13:52
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('prot... | [
"manan.yadav02@gmail.com"
] | manan.yadav02@gmail.com |
6a163bfb06b31a891a4c2da6e027f54a766b43fe | 0cd19bf1f74a435430a4efbccbc79969fb9a5ee8 | /Assignment 1/file_8.py | af7850ee3d3eb4a213d0abccae7c3eca43f5382e | [] | no_license | madhavmalhotra3089/Introduction-to-python | 91d1b048c3bd990cbd5bfb0a3d7a600d89e66eee | 739e7d88e36852525a03fae341e0dfe4eaedbba5 | refs/heads/master | 2020-03-22T14:57:17.046631 | 2018-07-09T19:55:12 | 2018-07-09T19:55:12 | 140,217,647 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 308 | py | string='Madhav'
result = True
str_len = len(string)
print str_len
half_len= int(str_len/2)
print half_len
for i in range(0, half_len):
# you need to check only half of the string
print string[str_len-i-1]
if string[i] != string[str_len-i-1]:
result = False
break
print(result) | [
"madhav.malhotra3089@gmail.com"
] | madhav.malhotra3089@gmail.com |
1086658696ca9f04d28579656a21ca42cfd914ce | 1b9ffc6033c810959d739e0389f490f1573bab2a | /package_bobo_note/class_plus_function_Cat.py | 9c60d1fc95ddc089f53b05f2d8a17157308860d1 | [] | no_license | VicnentX/MachineLearning_PorjectsAndNotes | 7867142fee044d49ca03d6177fa50e199316ea5f | 9eb29e47a67d499da0cd880664ae660ff31cbcad | refs/heads/master | 2020-05-15T07:42:54.748552 | 2019-12-13T05:31:15 | 2019-12-13T05:31:15 | 182,145,261 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 558 | py | class Cat:
"""
define a Cat class
"""
# initiate
def __init__(self, new_name, new_age):
self.name = new_name
self.age = new_age
def __str__(self):
return f"{self.name} is {self.age} year old"
# method
def eat(self):
print("eating fish")
def drink(se... | [
"chunqiu1xia@gmail.com"
] | chunqiu1xia@gmail.com |
2cf4e87b3e0de4adc8a89119092452af59562e54 | dea64384db1d70c65dba9bf41cced4c2b78a1738 | /addLine.py | c97e22a3158a401c9e3b110fd4d630428bfb2b19 | [] | no_license | jhakala/Vg | bed362bc43bff1ec68849b426e3a014ec95542e6 | 771189e67702118e08961e8fbffdefa2c7de57c7 | refs/heads/master | 2020-12-07T13:45:17.273736 | 2017-12-12T00:15:00 | 2017-12-12T00:15:00 | 52,993,022 | 0 | 0 | null | 2016-03-02T20:11:20 | 2016-03-02T20:11:20 | null | UTF-8 | Python | false | false | 1,018 | py | from sys import argv
from os import path
from ROOT import *
if not len(argv) == 2:
print "Please enter the input filename."
exit(1)
if not path.exists(argv[1]):
print "Input file not found."
exit(1)
category = "antibtag" if "antibtag" in argv[1] else "btag"
inFile = TFile(argv[1])
cans=[]
cans.append(("means... | [
"john_hakala@brown.edu"
] | john_hakala@brown.edu |
14aa102d9e3ed79e50dcc29dbb5e082befb790ce | b685036280331fa50fcd87f269521342ec1b437b | /src/data_mining_demo/machine_learning_in_action/chapter3_page62.py | f3d10ff28a9cb7fcdf8d900286d6a1bc2cf9284b | [] | no_license | chenqing666/myML_DM_Test | f875cb5b2a92e81bc3de2a0070c0185b7eacac89 | 5ac38f7872d94ca7cedd4f5057bb93732b5edbad | refs/heads/master | 2022-02-26T01:52:06.293025 | 2019-09-20T06:35:25 | 2019-09-20T06:35:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,064 | py | import matplotlib.pyplot as plt
decisionNode = dict(boxstyle="sawtooth", fc="0.8")
leafNode = dict(boxstyle="round4", fc="22")
arrow_args = dict(arrowstyle="<-")
def plotNode(nodeTxt, centerPt, parentPt, nodeType):
"""
:param nodeTxt: 注释
:param centerPt: 箭头终止位置
:param parentPt: 箭头起始位置
:param node... | [
"daijitao@ctsi.com.cn"
] | daijitao@ctsi.com.cn |
96acea6c4d014e3384d4217b80831e54028c5ac2 | 6b0192385b791598640867a4c2aedc2da840f784 | /app/models.py | 2ba03ae12c495b11fb20bcc65affc9c6b354546d | [
"MIT"
] | permissive | Albert-Byrone/corruption-feeds | 14e2bc6b83ea758d1a84d87633dbc43995a74db7 | 83ef3fa680acf23079d25debaff461a38b6cb386 | refs/heads/master | 2022-10-12T04:14:25.413542 | 2019-11-01T06:21:54 | 2019-11-01T06:21:54 | 218,772,077 | 0 | 3 | MIT | 2022-09-16T18:12:47 | 2019-10-31T13:26:09 | Python | UTF-8 | Python | false | false | 3,407 | py | from flask_login import current_user,UserMixin
from werkzeug.security import generate_password_hash,check_password_hash
from datetime import datetime
from . import db,login_manager
@login_manager.user_loader
def load_user(user_id):
return User.query.get(user_id)
class User(UserMixin,db.Model):
__tablename__ ... | [
"albertbyrone1677@gmail.com"
] | albertbyrone1677@gmail.com |
b1a906eb52a85db92cdc55bd8f3e89853c2de98c | 7502ef2b7a6d4b4c9b789b0042e7b69024ffcc91 | /mysite/polls/views.py | 67e3609ad07cf9b36ed9cc99e730f67ae8811c2e | [] | no_license | CodingNomads/django-polls | ec0aa6d99971e03bac4a5fcddb08611c3c3dc1d0 | c82ab82d2bcffa7fb70d2cbfe5b9e4e059553a40 | refs/heads/master | 2021-12-13T16:07:01.203035 | 2021-08-11T15:35:48 | 2021-08-11T15:35:48 | 244,676,885 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,821 | py | from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import get_object_or_404, render
from django.urls import reverse
from django.utils import timezone
from django.views import generic
from .models import Choice, Question
class IndexView(generic.ListView):
template_name = 'polls/index.... | [
"breuss.martin@gmail.com"
] | breuss.martin@gmail.com |
9c9107d0837a28fefe69b8a4bd7eb009bb12d1d6 | 6609c26b4ed72c156104ce282c3cf88c6aac59f6 | /chapter17/examples/advance_features.py | c985a4f23c81b33511c5f99681a5ca31ba3a8b13 | [
"MIT"
] | permissive | yordanivh/intro_to_cs_w_python | 4ab9dbbc2963b285b22cacb6648d1300fded18ce | eebbb8efd7ef0d07be9bc45b6b1e8f20737ce01a | refs/heads/master | 2020-09-06T12:25:23.362118 | 2020-02-14T14:07:07 | 2020-02-14T14:07:07 | 220,423,698 | 0 | 0 | MIT | 2020-02-14T14:07:08 | 2019-11-08T08:41:25 | Python | UTF-8 | Python | false | false | 2,808 | py | #aggregation
>>> cur.execute('SELECT SUM (Population) FROM PopByRegion')
<sqlite3.Cursor object at 0x7f88a81907a0>
>>> cur.fetchone()
(8965762,)
#grouping
>>> cur.execute('''SELECT Region, SUM (Population) FROM PopByCountry GROUP BY Region''')
<sqlite3.Cursor object at 0x7f88a8190810>
>>> cur.fetchall()
[('Eastern A... | [
"yordan@hashicorp.com"
] | yordan@hashicorp.com |
4cead7c664d102e7b8701b6679c11251c93f3262 | 5b9035dbfe0750e9933728f9631ad7a183dd3429 | /02/00/iterdecode.py | d501e5c1c4f91e322d041afbce2e925b84f80cc2 | [
"CC0-1.0"
] | permissive | pylangstudy/201709 | 271efbd4f337d912d0ca958a621eb2a040091528 | 53d868786d7327a83bfa7f4149549c6f9855a6c6 | refs/heads/master | 2021-01-21T12:16:21.950493 | 2017-09-30T00:02:34 | 2017-09-30T00:02:34 | 102,058,300 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 210 | py | #!python3.6
#encoding:utf-8
import codecs
def byte_iter():
for i in range(5): yield f'日本語_{i}'.encode()
for text in codecs.iterdecode(byte_iter(), encoding='utf-8'):
print(text, text.encode())
| [
"pylangstudy@yahoo.co.jp"
] | pylangstudy@yahoo.co.jp |
0b2eb5a06ed674ebafc5ebd22ced1e6d9153f00e | 8fb1d41797595550418ecfc0e7558f38254b4606 | /django/contrib/gis/geos/point.py | 1b7d7f23ed51892d5d963e44d8a40d42147743a0 | [
"BSD-3-Clause",
"MIT"
] | permissive | hunch/hunch-gift-app | 2aad70a9f18124bf0de02d7a125fa93c765da008 | 8c7cad24cc0d9900deb4175e6b768c64a3d7adcf | refs/heads/master | 2016-09-06T03:13:52.153974 | 2012-03-26T18:11:59 | 2012-03-26T18:11:59 | 1,191,221 | 6 | 3 | null | null | null | null | UTF-8 | Python | false | false | 4,388 | py | from ctypes import c_uint
from django.contrib.gis.geos.error import GEOSException
from django.contrib.gis.geos.geometry import GEOSGeometry
from django.contrib.gis.geos import prototypes as capi
class Point(GEOSGeometry):
_minlength = 2
_maxlength = 3
def __init__(self, x, y=None, z=None, srid=No... | [
"gleitz@hunch.com"
] | gleitz@hunch.com |
b7a9a1cf49e61232166b8257b59f9ac4df425cd5 | 0689ad04900b45e6ffb85756e65e96f30781558b | /pbase/day19/shili/mylist.py | 2fc8cc1d6d64d39221a007ecd54b4a6c488d1ecc | [] | no_license | lizhihui16/aaa | a5452b5d0de4c2ad6342fce1b8aef278d2d2943e | e8c38e012f6aa0bc05ac6481d6c3e2b4e9013b56 | refs/heads/master | 2020-04-24T01:05:19.266060 | 2019-02-20T01:43:51 | 2019-02-20T01:43:51 | 171,586,359 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 703 | py |
class MyList:
'''创建一个自定义列表类,此MyList内部用列表来存储信息'''
def __init__(self,iterable=()):
self.data=[x for x in iterable]
def __repr__(self):
return 'MyList(%s)'%self.data
def __len__(self):
'''方法必须返回整数'''
# return len(self.data)
return self.data.__len__()
def __abs__... | [
"tarena@tedu.cn"
] | tarena@tedu.cn |
a286e36d05932f1d3e1eaefcc2ab40f45bb14270 | a6355ef8ddb4d31fb4ff45ae755f34482d8c0ff9 | /supervised/tuner/registry.py | 52b5099b6f1150df1f306046e536db9fdea3bc00 | [
"MIT"
] | permissive | michaelneale/mljar-supervised | d4d1b44f4cd5dcbdb36768c5186f2480a53ec3f7 | 8d1b5fdd56e994a7f13ec5f6d2033830744f3d6f | refs/heads/master | 2022-02-06T14:11:21.377791 | 2019-11-05T08:15:02 | 2019-11-05T08:15:02 | 220,161,447 | 0 | 0 | MIT | 2022-01-26T00:32:56 | 2019-11-07T05:51:34 | null | UTF-8 | Python | false | false | 754 | py | # tasks that can be handled by the package
BINARY_CLASSIFICATION = "binary_classification"
MULTICLASS_CLASSIFICATION = "multiclass_classification"
REGRESSION = "regression"
class ModelsRegistry:
registry = {
BINARY_CLASSIFICATION: {},
MULTICLASS_CLASSIFICATION: {},
REGRESSION: {},
}
... | [
"pplonski86@gmail.com"
] | pplonski86@gmail.com |
f0ec882c3142a7b3f7479f8dea631fea8827f88a | 20741a0e27b88eb4396516788c1dd7acab7f1527 | /project/apps/config/models.py | 832fa099b90b4e90e478dff781c5f2ac9bc25537 | [] | no_license | yueyoum/lockscreen-image | 2b371f5e133f0e3ace7b3b4597a2633575027415 | 47351c5aafbd97e3c6862798a9666114c83f4fb9 | refs/heads/master | 2021-01-23T10:04:35.901591 | 2015-06-30T08:00:51 | 2015-06-30T08:00:51 | 29,383,019 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 451 | py | # -*- coding: utf-8 -*-
from django.db import models
class Config(models.Model):
name = models.TextField(primary_key=True)
value = models.TextField()
class Meta:
db_table = 'project_config'
verbose_name = '设置'
verbose_name_plural = '设置'
@classmethod
def get_value(cls, ke... | [
"yueyoum@gmail.com"
] | yueyoum@gmail.com |
1d9d95820ff83069e478a3b37183e8ded7518493 | 56a77194fc0cd6087b0c2ca1fb6dc0de64b8a58a | /applications/CoSimulationApplication/python_scripts/colors.py | 2269c3f01716035217f3aa062b303ce8ae2b8230 | [
"BSD-3-Clause"
] | permissive | KratosMultiphysics/Kratos | 82b902a2266625b25f17239b42da958611a4b9c5 | 366949ec4e3651702edc6ac3061d2988f10dd271 | refs/heads/master | 2023-08-30T20:31:37.818693 | 2023-08-30T18:01:01 | 2023-08-30T18:01:01 | 81,815,495 | 994 | 285 | NOASSERTION | 2023-09-14T13:22:43 | 2017-02-13T10:58:24 | C++ | UTF-8 | Python | false | false | 2,273 | py | PRINT_COLORS = False # Global var to specify if colors should be printed
def color_string(string2color, color_code):
if PRINT_COLORS:
return "\x1b["+color_code+"m" + str(string2color) + "\x1b[0m"
else:
return string2color
def bold(string2color):
return color_string(string2color, "1;1")
def... | [
"philipp.bucher@tum.de"
] | philipp.bucher@tum.de |
71b166eca1b5d4658c1a7725081ee16a782a7cbd | 98032c5363d0904ba44e1b5c1b7aa0d31ed1d3f2 | /Chapter07/ch7/json_examples/json_cplx.py | 62a571ee8e31bf133df4dcb1f2adf45092c8410c | [
"MIT"
] | permissive | PacktPublishing/Learn-Python-Programming-Second-Edition | 7948b309f6e8b146a5eb5e8690b7865cb76136d5 | 54fee44ff1c696df0c7da1e3e84a6c2271a78904 | refs/heads/master | 2023-05-12T08:56:52.868686 | 2023-01-30T09:59:05 | 2023-01-30T09:59:05 | 138,018,499 | 65 | 44 | MIT | 2023-02-15T20:04:34 | 2018-06-20T10:41:13 | Jupyter Notebook | UTF-8 | Python | false | false | 679 | py | import json
class ComplexEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, complex):
return {
'_meta': '_complex',
'num': [obj.real, obj.imag],
}
return json.JSONEncoder.default(self, obj)
data = {
'an_int': 42,
... | [
"33118647+romydias@users.noreply.github.com"
] | 33118647+romydias@users.noreply.github.com |
717db42d79ee7b0d3916cafd2ff9cbc961178823 | 89284da682f723c6aaad8ef6bba37ac31cd30c92 | /PythonTutorial/Advance/multiple_threads_and_processes/code/processes/shared_memory_array.py | f85b49bae8270d4d704ef6ec7d53d8bb2a7f8623 | [] | no_license | Danielyan86/Python-Study | 9d9912e0385c5b4d2b7272e9eaca542ff556dc1a | 782c1638eb9733a4be4acbc4c805a78f0fe77546 | refs/heads/master | 2023-03-17T13:26:31.865927 | 2023-03-05T12:30:07 | 2023-03-05T12:30:07 | 26,902,349 | 28 | 25 | null | null | null | null | UTF-8 | Python | false | false | 762 | py | from multiprocessing import Process, Array
def cube(x):
for i in range(len(x)):
x[i] = x[i] + 1
if __name__ == "__main__":
# Array()初始化了一个拥有int数据类型、长度为3的空数组,该数组已被循环使用,在其中的每个元素上加1。
# 你可以在不同的进程中使用Arr,就像Value一样。这实质上是共享内存的概念。
# 注意:'d'表示双精度浮点数,'i'(在Array("i", 3)中)表示有符号整数。
arr = Array("i", 3)
... | [
"516495459@qq.com"
] | 516495459@qq.com |
05a0a743111a1fb2bcc0bc354304dab8a950f35a | 2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02 | /PyTorch/contrib/cv/semantic_segmentation/MMseg-swin/mmcv/mmcv/parallel/scatter_gather.py | af752be41e688283dae1aee634c26b49818ecea2 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference",
"GPL-1.0-or-later"
] | permissive | Ascend/ModelZoo-PyTorch | 4c89414b9e2582cef9926d4670108a090c839d2d | 92acc188d3a0f634de58463b6676e70df83ef808 | refs/heads/master | 2023-07-19T12:40:00.512853 | 2023-07-17T02:48:18 | 2023-07-17T02:48:18 | 483,502,469 | 23 | 6 | Apache-2.0 | 2022-10-15T09:29:12 | 2022-04-20T04:11:18 | Python | UTF-8 | Python | false | false | 6,096 | py | # -*- coding: utf-8 -*-
# BSD 3-Clause License
#
# Copyright (c) 2017
# All rights reserved.
# Copyright 2022 Huawei Technologies Co., Ltd
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source ... | [
"wangjiangben@huawei.com"
] | wangjiangben@huawei.com |
eaed96112b1511de5d974f5a8149f020a7934fb2 | 669a514211247356ed9be3ad07d138a5afd1f889 | /LaboratorioDePOOUSP/venv/bin/pip3 | 5abfae87242e35257414efc2b615b165aba99c40 | [] | no_license | borin98/Projetos_Em_Python_Curso_USP | 89a0761ad6cbe6c178358332fcd676cda2313649 | 95e78549e133fb644be95e37b4d4a003ca8da401 | refs/heads/master | 2021-04-12T09:54:04.672567 | 2018-05-04T18:57:02 | 2018-05-04T18:57:02 | 126,911,954 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 411 | #!/home/borin/PycharmProjects/LaboratorioDePOOUSP/venv/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==9.0.1','console_scripts','pip3'
__requires__ = 'pip==9.0.1'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0... | [
"borinmacedo@gmail.com"
] | borinmacedo@gmail.com | |
78d6dff4ab665fc0023f1433308f4bfc7502b9a2 | 971c5ae1d87cdfbb97723485c3d76c17395b82b0 | /x86-semantics/semantics_using_uifs/z3EquivFormulas/z3tutorial.py | f4c0553048e4978a3d5e415bc18edc7b4bb2407f | [
"NCSA"
] | permissive | mewbak/binary-decompilation | 7d0bf64d6cd01bfa5f5fc912d74a85ce81124959 | f58da4c53cd823edc4bbbad6b647dbcefd7e64f8 | refs/heads/master | 2020-04-16T06:08:14.983946 | 2019-01-06T17:21:50 | 2019-01-06T17:21:50 | 165,334,058 | 1 | 0 | NOASSERTION | 2019-01-12T01:42:16 | 2019-01-12T01:42:16 | null | UTF-8 | Python | false | false | 7,103 | py | from z3 import *
# x = Int('x')
# y = Int('y')
# solve(x > 2, y < 10, x + 2*y == 7)
#
# x = Int('x')
# y = Int('y')
# print simplify(x + y + 2*x + 3)
# print simplify(x < y + x + 2)
# print simplify(And(x + 1 >= 3, x**2 + x**2 + y**2 + 2 >= 5))
#
# x = Int('x')
# y = Int('y')
# print x**2 + y**2 >= 1
# set_option(ht... | [
"sdasgup3@illinois.edu"
] | sdasgup3@illinois.edu |
02caebbc080991e786b864bdcff5e6559bee9ffb | 930309163b930559929323647b8d82238724f392 | /arc025_2.py | 31eb79bf696c226f9cf49a3df1266da20ed55b4d | [] | no_license | GINK03/atcoder-solvers | 874251dffc9f23b187faa77c439b445e53f8dfe1 | b1e7ac6e9d67938de9a85df4a2f9780fb1fbcee7 | refs/heads/master | 2021-11-07T14:16:52.138894 | 2021-09-12T13:32:29 | 2021-09-12T13:32:29 | 11,724,396 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,392 | py |
class Cumsum2d:
dp: "Optional[List[List]]" = None
@staticmethod
def generate(h, w, a):
'''da[i][j]:(0,0)~(i,j)の長方形の和'''
Cumsum2d.dp = dp = [[0]*w for j in range(h)]
dp[0][0] = a[0][0]
for i in range(1,w):
dp[0][i] = dp[0][i-1]+a[0][i]
for i in range(1,h):... | [
"gim.kobayashi@gmail.com"
] | gim.kobayashi@gmail.com |
3f06d0b16de54e75a4262e8811413a8a3debcf2e | 86d33ca948fefd0e4dcea71fc8a53c6b062eca8b | /safe_relay_service/gas_station/models.py | 8aae69493abc13847eb7c3fcf076ef6b1184787d | [
"MIT"
] | permissive | energywebfoundation/safe-relay-service | f140f39375c1e916810e94b7289355cb6f1b00a5 | 7a34b2492a78027aa1131360c445d2de3ec1aaee | refs/heads/master | 2020-09-26T18:24:57.727244 | 2019-12-16T18:19:25 | 2019-12-16T18:19:25 | 226,312,414 | 0 | 0 | MIT | 2019-12-06T11:15:00 | 2019-12-06T11:14:59 | null | UTF-8 | Python | false | false | 920 | py | from django.db import models
from model_utils.models import TimeStampedModel
class GasPrice(TimeStampedModel):
lowest = models.BigIntegerField()
safe_low = models.BigIntegerField()
standard = models.BigIntegerField()
fast = models.BigIntegerField()
fastest = models.BigIntegerField()
class Me... | [
"uxio@gnosis.pm"
] | uxio@gnosis.pm |
951f93f3ad78397dfe5c0b6c8d65393db383a88c | 3474b315da3cc5cb3f7823f19a18b63a8da6a526 | /scratch/KRAMS/src/apps/scratch/alex/test/prototyped_from.py | c409e5d9084597782be40c6598ca405228c3cce5 | [] | no_license | h4ck3rm1k3/scratch | 8df97462f696bc2be00f1e58232e1cd915f0fafd | 0a114a41b0d1e9b2d68dbe7af7cf34db11512539 | refs/heads/master | 2021-01-21T15:31:38.718039 | 2013-09-19T10:48:24 | 2013-09-19T10:48:24 | 29,173,525 | 0 | 0 | null | 2015-01-13T04:58:57 | 2015-01-13T04:58:56 | null | UTF-8 | Python | false | false | 1,311 | py | '''
Created on May 3, 2010
@author: alexander
'''
from enthought.traits.api import \
PrototypedFrom, Float, HasTraits, Instance, Str, DelegatesTo
class Parent ( HasTraits ):
first_name = Str
last_name = Str
def _last_name_changed(self, new):
print "Parent's last name changed to %s." % new... | [
"Axel@Axel-Pc"
] | Axel@Axel-Pc |
8050bb2685427b930d2b9bf195e420e980ddfa6a | 3e77a86429ba0f6968f709e77e204cdfe920a041 | /python/python/src/python_problems/other_python_prob/split_ex.py | 197395da79cb77288a4fcac60b91f4ba222cd5c8 | [] | no_license | ramyamango123/test | a2d9bb6cafe8d7406b76eba526ddded2acf2a3b2 | 85420c9406109a72e1b1d455ea29a5cae9def5a3 | refs/heads/master | 2020-06-07T23:34:08.344051 | 2014-03-12T05:19:05 | 2014-03-12T05:19:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 238 | py | import re
#t1 = raw_input("Enter a price:")
t1 = "$2.99 after rebate"
#x1 = regexpi("After rebate")
#print x1
if i in t1:
ts = t1.split(" ")
r1 = ts[0]
A1 = r1[1:]
print A1
else:
x1= t1[1:]
print x1 | [
"ramya@Ramyas-MacBook-Air.local"
] | ramya@Ramyas-MacBook-Air.local |
123cdcb3e7724202187438dd63b63dd01e104218 | 96ced1bf722a6b003a9388f2b1b82e7e2870cb5f | /platforma_inwestorow/scraper/urls.py | e265c4f93e0b2177c42b2e149197302cb15087cb | [] | no_license | topi-chan/scraper_app | bfb069b199e04249257c0968bb5ff3c274d3d0d3 | 4fe97e3ab5480f9365aa6373ca6338b34d221ca7 | refs/heads/master | 2023-02-24T07:19:30.116068 | 2021-01-28T00:36:41 | 2021-01-28T00:36:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 182 | py | from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('mailing_assign', views.mailing_assign, name='mailing_assign')
]
| [
"maciej@top-project.com.pl"
] | maciej@top-project.com.pl |
d09b084170f96a5415905a1133d4562ed51f5774 | 677388ca1fc9b489e94598d392d1b584efa0c096 | /unpacking variables.py | ff9f5965f11eb9db6310847d13359f90a83ba125 | [] | no_license | robertruhiu/learn | 356b10a92536e8feca137e0ef15fdbac588785a7 | 6f32418144111ce52c23b79314c1cf2c59ee03b8 | refs/heads/master | 2021-01-23T16:05:38.468043 | 2017-09-14T10:37:29 | 2017-09-14T10:37:29 | 102,722,587 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 163 | py | from sys import argv
script,first,second = argv
print "The script is called:",script
print"Your first variable is:",first
print"Your second variable is:",second
| [
"robertruhiu@gmail.com"
] | robertruhiu@gmail.com |
687978f653d19ee7a31533d6c0bb62eef063429e | c67603fed9ef7a1ebf5a41944e5f65d37e9ddfb3 | /lovcenbanka/spiders/spider.py | 76a1bbbbdccd8780f43fc061a4156a24c2c3f20b | [] | no_license | hristo-grudev/lovcenbanka | ff20c25f67ff9dfa89c8440cc79f5a741c317def | 1a80c2b5d3fff7a3bee869ad637f0ef5fe872878 | refs/heads/main | 2023-03-13T10:34:13.024062 | 2021-02-24T12:04:57 | 2021-02-24T12:04:57 | 341,887,259 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,174 | py | import scrapy
from scrapy.loader import ItemLoader
from ..items import LovcenbankaItem
from itemloaders.processors import TakeFirst
class LovcenbankaSpider(scrapy.Spider):
name = 'lovcenbanka'
start_urls = ['https://lovcenbanka.me/me/novosti']
def parse(self, response):
post_links = response.xpath('//h2[@class... | [
"hr.grudev@gmail.com"
] | hr.grudev@gmail.com |
0a37618d4074892270ed144a3b76d507146dfb1f | 32dda10669e459cf37c31f426fa709001d2c75b0 | /atcoder/contest/solved/abc155_b.py | 897a7f9a1fa3b72ca3f84dc1f5154053ba979bcd | [] | no_license | fastso/learning-python | 3300f50d06871245d0bfcbe9d201224580f70852 | d21dbd1b9f31017cdb1ed9b9ffd1e53ffe326572 | refs/heads/master | 2023-02-10T14:43:53.726247 | 2023-01-26T10:14:59 | 2023-01-26T10:14:59 | 193,454,718 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 254 | py | n = int(input())
a = list(map(int, input().split()))
for i in a:
if i % 2 == 0:
if i % 3 == 0:
continue
elif i % 5 == 0:
continue
else:
print('DENIED')
exit()
print('APPROVED')
| [
"fastso.biko@gmail.com"
] | fastso.biko@gmail.com |
702daecec153b661b5fca34283aeb67e8b4888ca | 25df9eca90070191be927a35e3285343dd3bfe9b | /main.py | 146f8a307569a9c075633d03b40e6d27ff5a5b29 | [] | no_license | minhnd3796/simple_pyobject_tutorial | 2639bea433212ca4470a5464210ebfce3727ccec | 340b797e7b06ea308652be60aff430ab0811fe28 | refs/heads/master | 2021-05-02T02:22:03.726342 | 2018-02-09T09:13:43 | 2018-02-09T09:13:43 | 120,881,780 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 133 | py | import Id
name = Id.get_name()
addr = Id.get_addr()
dob = Id.get_dob()
print("name:", name)
print("addr:", addr)
print("dob:", dob) | [
"gordonnguyen3796@gmail.com"
] | gordonnguyen3796@gmail.com |
5c24e27f03722c90cd20e99b743b2fc90abc4ab9 | c98e9ebdb356360c6dbbfd8fcf5a809fc7c0b975 | /rockypages/admin.py | e2d08ee2907733c629af2b5e61b5db56ccc95387 | [] | no_license | Cerkinfo/homepage | c89f9f7154f2dc6c43109fee500d8a060f16b5a5 | 4b59b48af7e1e4e5b168883ff3f90cc0a9d3e481 | refs/heads/master | 2020-05-29T19:28:21.201760 | 2014-04-17T12:30:04 | 2014-04-17T12:30:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,481 | py | from django import forms
from django.contrib import admin
from django.contrib.flatpages.models import FlatPage
from django.utils.translation import ugettext_lazy as _
from ckeditor.widgets import CKEditorWidget
from django.contrib.flatpages.admin import FlatpageForm
from reversion.admin import VersionAdmin
from flatblo... | [
"nikita.marchant@gmail.com"
] | nikita.marchant@gmail.com |
b11ff45c86d0a9b296aa011ae26fc47f43f32ac2 | b958551bde844d2bfaa4dd7cb670c4ebab4ff17b | /week4/365_day_advanced.py | f0e79a956030ae39dc60eebefc7cb303568806a0 | [] | no_license | aslupin/cpe31-task | d97d3e495634826d6752c1ee82192cc58045a883 | c15ec9be94b899120db39b076a4d1c644f0af24b | refs/heads/master | 2021-01-15T09:18:54.615578 | 2017-11-17T12:53:23 | 2017-11-17T12:53:23 | 99,573,358 | 0 | 2 | null | 2017-09-20T06:25:31 | 2017-08-07T12:00:05 | Python | UTF-8 | Python | false | false | 782 | py | import math
movement = {"U":1,"R":1,"L":-1,"D":-1} # Const of movement
x = [0];y = [0] # list container for pattern
lastx=0;lasty=0;tmpx=0;tmpy=0 # declare var
check = False
fly = input()
here_x = int(input())
here_y = int(input())
for i in fly: # get each of pattern
if(i == 'U' or i == 'D'):tmpy += movement[i]
... | [
"poon_arsene_lupin@hotmail.com"
] | poon_arsene_lupin@hotmail.com |
ce38fb44a64fcfae8083fd6ce3fe008b981d12e2 | 5de718a2ab00460f59621e1e3c100b37c0853f61 | /env/Lib/site-packages/sqlalchemy/dialects/mssql/zxjdbc.py | 426f3e3ef410c599f02a37d452f04c4dfe17d460 | [] | no_license | HenryVo31/Connect | 3fd60d893edd1199663878b7b68505e57a410dd6 | 3783e5b4d6b58f19e37ccff66501cb78c35c1500 | refs/heads/master | 2023-02-13T14:21:12.692446 | 2021-01-08T21:40:16 | 2021-01-08T21:40:16 | 295,485,939 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,382 | py | # mssql/zxjdbc.py
# Copyright (C) 2005-2019 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: mssql+zxjdbc
:name: zxJDBC for Jython
:dbapi: zxj... | [
"trungsonvo2001@gmail.com"
] | trungsonvo2001@gmail.com |
714e7c3f7f9102593f2a2bbf1a7f7c6aad0e2d64 | 2cbe01c30ab6cb77973bc2b19b2e573481205ef2 | /poetry/console/commands/debug/resolve.py | ad90f4fac2026268f57ed5de72e8801e4e9b7124 | [
"GPL-3.0-or-later",
"LGPL-3.0-or-later",
"LGPL-2.1-only",
"LGPL-3.0-only",
"BSD-4-Clause",
"LGPL-2.1-or-later",
"MIT",
"GPL-2.0-or-later",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"GPL-3.0-only",
"GPL-2.0-only",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | markovendelin/poetry | 9dc93d9db78b67eae71501761fdaf4db66d76a90 | de73fa07386be26d32bf15044fd81bf979787b9f | refs/heads/master | 2020-03-21T11:30:00.800918 | 2018-06-18T22:58:03 | 2018-06-18T22:58:03 | 138,509,629 | 0 | 0 | MIT | 2018-06-24T19:28:08 | 2018-06-24T19:28:08 | null | UTF-8 | Python | false | false | 3,628 | py | import re
from typing import List
from ..command import Command
class DebugResolveCommand(Command):
"""
Debugs dependency resolution.
debug:resolve
{ package?* : packages to resolve. }
{ --E|extras=* : Extras to activate for the dependency. }
{ --python= : Python version(s) to u... | [
"sebastien@eustace.io"
] | sebastien@eustace.io |
5b1119992f2bd6a9b3e95510d7c56c29898df158 | f4dd8aa4e5476ffde24e27273dd47913c7f9177a | /Dlv2_safe2/tests/parser/pasi-brew-eite-99-example-buy-car.test.py | 4b81a4af09c099eeba6884ec3e5b68744983223a | [
"Apache-2.0"
] | permissive | dave90/Dlv_safe2 | e56071ec1b07c45defda571cb721852e2391abfb | f127f413e3f35d599554e64aaa918bc1629985bc | refs/heads/master | 2020-05-30T10:44:13.473537 | 2015-07-12T12:35:22 | 2015-07-12T12:35:22 | 38,256,201 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,707 | py | input = """
% Facts which are not disputable are declared as heads of 'top'
rule(top).
rule(r11).
rule(r12).
rule(r13).
rule(r21).
rule(r22).
rule(r23).
rule(r24).
rule(r25).
rule(r26).
rule(r27).
rule(r28).
rule(r29).
rule(r31).
rule(r32).
rule(r33).
rule(r34).
rule(r35).
rule(r36).
rule(r37).
rule(r38).
rule(... | [
"davide@davide-All-Series"
] | davide@davide-All-Series |
b28f52ffc894b04f3a0898a1e8524c6aa8dcebb3 | d838bed08a00114c92b73982a74d96c15166a49e | /docs/data/learn/Bioinformatics/output/ch5_code/src/Stepik.5.8.CodeChallenge.LongestPathInArbitraryDAG.py | 6148405bd0771f1e1961245ad63c9942a73cc473 | [] | no_license | offbynull/offbynull.github.io | 4911f53d77f6c59e7a453ee271b1e04e613862bc | 754a85f43159738b89dd2bde1ad6ba0d75f34b98 | refs/heads/master | 2023-07-04T00:39:50.013571 | 2023-06-17T20:27:05 | 2023-06-17T23:27:00 | 308,482,936 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,531 | py | import re
from graph.Graph import Graph
# DON'T USE THIS -- THERE ARE CLEAN IMPLEMENTATIONS OF THE DIFFERENT ALGORITHMS IN THE SUBDIRECTORIES.
# DON'T USE THIS -- THERE ARE CLEAN IMPLEMENTATIONS OF THE DIFFERENT ALGORITHMS IN THE SUBDIRECTORIES.
# DON'T USE THIS -- THERE ARE CLEAN IMPLEMENTATIONS OF THE DIFFERENT ALG... | [
"offbynull@gmail.com"
] | offbynull@gmail.com |
4b74c5ebe349418204db0b31dfe8ddd4bc9fb347 | 4a9dada02c749e9e5277fe1e35357d7b2b28ad5c | /顾天媛2018010980/操作系统实验/作业1.py | 62b65b5fea82293af555a8a363ada38f3e1ddb78 | [] | no_license | wanghan79/2020_Option_System | 631cc80f52829390a128a86677de527472470348 | f37b870614edf7d85320da197d932df2f25a5720 | refs/heads/master | 2021-01-09T13:10:05.630685 | 2020-07-10T03:30:39 | 2020-07-10T03:30:39 | 242,312,271 | 13 | 9 | null | 2020-07-04T16:13:11 | 2020-02-22T09:12:56 | Python | UTF-8 | Python | false | false | 1,053 | py | # !/usr/bin/python3
# -*- coding: UTF-8 -*-
"""
Author: Ty.Gu
Purpose: platform
Created: 24/6/2020
"""
# 作业1. 采用python语言获取操作系统信息;提示:使用Python内置platform工具包
import platform
print(platform.platform()) # 获取操作系统名称及版本号,Windows-10-10.0.18362-SP0
print(platform.system()) # 获取操作系统名称,Windows
print(platform.ve... | [
"noreply@github.com"
] | wanghan79.noreply@github.com |
006359c0751853ad080769a798f31b41f16548e4 | 248b1c62e3f06e82c6fc5ef557cc1af506763d8c | /cogs/give.py | 9aa565d35f362044d249dda6dbf9d27208029fe1 | [
"MIT"
] | permissive | virtualCrypto-discord/VCrypto-Utilities | bd091ba5fbccf7d59e137ee5ba5b2077bd01b6de | f735159cc45f8601f5d9a50f2c61ca6ec09d87ed | refs/heads/master | 2023-03-12T19:23:30.833926 | 2021-03-03T07:06:50 | 2021-03-03T07:06:50 | 344,033,693 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,511 | py | from discord.ext import commands
from bot import MyBot
from virtualcrypto import AsyncVirtualCryptoClient
import discord
class Give(commands.Cog):
def __init__(self, bot: MyBot):
self.bot = bot
self.vcrypto: AsyncVirtualCryptoClient = self.bot.vcrypto
@commands.command()
@commands.has_per... | [
"sumito@izumita.com"
] | sumito@izumita.com |
e7c80e9ae3396015fadb7df42e1afe4f03dcf766 | 23611933f0faba84fc82a1bc0a85d97cf45aba99 | /google-cloud-sdk/.install/.backup/lib/third_party/ruamel/yaml/__init__.py | 9be208205ea694383b43ab60c013defe2f5e4b6e | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"MIT"
] | permissive | KaranToor/MA450 | 1f112d1caccebdc04702a77d5a6cee867c15f75c | c98b58aeb0994e011df960163541e9379ae7ea06 | refs/heads/master | 2021-06-21T06:17:42.585908 | 2020-12-24T00:36:28 | 2020-12-24T00:36:28 | 79,285,433 | 1 | 1 | Apache-2.0 | 2020-12-24T00:38:09 | 2017-01-18T00:05:44 | Python | UTF-8 | Python | false | false | 2,997 | py | # coding: utf-8
from __future__ import print_function
from __future__ import absolute_import
# install_requires of ruamel.base is not really required but the old
# ruamel.base installed __init__.py, and thus a new version should
# be installed at some point
_package_data = dict(
full_package_name="ruamel.yaml",
... | [
"toork@uw.edu"
] | toork@uw.edu |
61deb11fc76a069f92fdd3010e5cabe67388e589 | ea6c97980ca32a61c325d0934e463399bed53b6a | /app/migrations/0005_auto_20210727_2343.py | 2b84a58e65de5d8bf67aacb653ae4ecc52e7bbea | [] | no_license | WambiruL/chat-app | 4201ffe97e3c565669e2212ab337ac28e27bce2b | 7e445afd61d5b01599fedeea60fbea33a3459d07 | refs/heads/master | 2023-06-26T06:57:30.467106 | 2021-07-29T08:27:49 | 2021-07-29T08:27:49 | 389,715,208 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,779 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2021-07-27 20:43
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_depend... | [
"wambirulorraine@gmail.com"
] | wambirulorraine@gmail.com |
3f7ef408f371de3afba3738f038af48d2f611471 | 994216797f013a4a8926a5689aabd1653bf93a18 | /pkg/fibonacci.py | 2bcc9c0bb1f7b9295999beea7cc96da1577b469d | [] | no_license | Jamie-Cheon/Python | 2387a0e3abef7e7ed594e994d812faa1b322ce19 | 8f0351e58baae762b2cb2f5b2ce12d99358459e1 | refs/heads/master | 2022-06-15T13:47:42.368609 | 2020-05-08T09:27:21 | 2020-05-08T09:27:21 | 262,274,463 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 455 | py | class Fibonacci:
def __init__(self, title="fibonacci"):
#title="fibonacci" 타이틀로 다른게 들어오면 다른걸 쓰고 타이틀이 안넘어오면 피보나치를 타이틀에 넣어라
self.title = title
def fib(n):
a, b = 0, 1
while a < n:
print(a, end=' ')
a, b = b, a+b
print()
def fib2(n):
result = []
a, b = 0, 1
while a < n:
... | [
"jamiecheon55@gmail.com"
] | jamiecheon55@gmail.com |
de522ff95f318f182e74c4886331fdfdbb87dc3e | cf54adda6874a4256401e9e4eb28f353b28ae74b | /python-modules/MySQLdb-dict-cursor.py | 41d807e759d6e536a2a6e039d2ab55a92e114269 | [] | no_license | oraant/study | c0ea4f1a7a8c3558c0eac4b4108bc681a54e8ebf | 7bce20f2ea191d904b4e932c8d0abe1b70a54f7e | refs/heads/master | 2020-09-23T02:08:07.279705 | 2016-11-21T06:30:26 | 2016-11-21T06:30:26 | 66,995,585 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 359 | py | # coding:utf-8
import MySQLdb
from MySQLdb.cursors import DictCursor
conn = MySQLdb.connect('localhost','django','django','test',3306)
cursor = conn.cursor(cursorclass=DictCursor)
cursor.execute('select ID, name from ttt')
print cursor.fetchall()
# 结论:
# 数据库中的NULL,在Python中会变成None
# 列填的是大写,字典的键就是大写
| [
"oraant777@gmail.com"
] | oraant777@gmail.com |
e07f99f6027d5c036e5441b11219946a60d927ef | 0514c992dc9dd2c54bc757c8ca4487ca3a8434c5 | /miscell/demo.py | 2eacb3cdde0514b7505c11818392e249cd913b8f | [] | no_license | amalmhn/PythonDjangoProjects | 0878fffad4350d135197ceb0612dd0765b075bb7 | 3a065bb93135075c78a7bff965f83e605d8de4bc | refs/heads/master | 2023-04-25T05:50:16.768383 | 2021-05-03T06:50:06 | 2021-05-03T06:50:06 | 315,811,941 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 837 | py | size=int(input("Enter the size of the stack"))
stk=[]
top=0
n=1.
def push(element):
global top
if top>=size:
print('stack is full')
else:
stk.insert(top,element)
print('Element pushed')
top+=1
print('Top is now',top)
def pop():
global top
if top<=0:
p... | [
"amalmhnofficial@gmail.com"
] | amalmhnofficial@gmail.com |
4423bfc12a256ce5fcc27ad43ef15cdf7d0537a8 | 93dd86c8d0eceaee8276a5cafe8c0bfee2a315d3 | /python/paddle/fluid/tests/unittests/test_bilinear_api.py | 24eae4797de85f371ed62e78c85b160f698ee9eb | [
"Apache-2.0"
] | permissive | hutuxian/Paddle | f8b7693bccc6d56887164c1de0b6f6e91cffaae8 | a1b640bc66a5cc9583de503e7406aeba67565e8d | refs/heads/develop | 2023-08-29T19:36:45.382455 | 2020-09-09T09:19:07 | 2020-09-09T09:19:07 | 164,977,763 | 8 | 27 | Apache-2.0 | 2023-06-16T09:47:39 | 2019-01-10T02:50:31 | Python | UTF-8 | Python | false | false | 2,376 | py | # Copyright (c) 2018 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 app... | [
"noreply@github.com"
] | hutuxian.noreply@github.com |
e383d2fc173e8a7434d12f2956d71aa7370dc271 | f3aa6bf16293beb94c7f63df28e8dfd27c8b603f | /codes/contest/leetcode/3sum.py | 3347c3dd94b823257a8e51db0eb1d02325f52e1f | [] | no_license | Farenew/dirtysalt.github.io | b8a9ddd7787fd0659b478584682ec97e8e9be0b3 | 856e84adf22f6c82e55f5a7f843fbccfdf17109f | refs/heads/master | 2020-06-17T02:42:25.392147 | 2019-07-08T01:59:46 | 2019-07-08T01:59:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,247 | py | #!/usr/bin/env python
# coding:utf-8
# Copyright (C) dirlt
# class Solution(object):
# def threeSum(self, nums):
# """
# :type nums: List[int]
# :rtype: List[List[int]]
# """
# nums.sort()
# n = len(nums)
# ans = []
# dedup = set()
#
# for i i... | [
"dirtysalt1987@gmail.com"
] | dirtysalt1987@gmail.com |
7d38c9579b7e1f455d55e64c1c3aae3797d0cbdf | 6b791247919f7de90c8402abcca64b32edd7a29b | /lib/coginvasion/hood/DDSafeZoneLoader.py | 99815be7db2a7e56f45b1f5ada014a7d5b35295d | [
"Apache-2.0"
] | permissive | theclashingfritz/Cog-Invasion-Online-Dump | a9bce15c9f37b6776cecd80b309f3c9ec5b1ec36 | 2561abbacb3e2e288e06f3f04b935b5ed589c8f8 | refs/heads/master | 2021-01-04T06:44:04.295001 | 2020-02-14T05:23:01 | 2020-02-14T05:23:01 | 240,434,213 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,236 | py | # uncompyle6 version 3.2.4
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)]
# Embedded file name: lib.coginvasion.hood.DDSafeZoneLoader
from lib.coginvasion.holiday.HolidayManager import HolidayType
import SafeZoneLoader, DDPlayground... | [
"theclashingfritz@users.noreply.github.com"
] | theclashingfritz@users.noreply.github.com |
e1db71bb2fd5a9128fd41ae825d57ec3fa777beb | ec635c82b4516c19c0f86489420222e3ee68ef72 | /nnlib/networks/resnet_cifar.py | 8c3b8bf14981b8c30c5cafec58f702f720d3b5ec | [
"MIT"
] | permissive | keyboardAnt/nnlib | 1e29443db7f71c5b87a36c923a32e9b15225f8cb | 8062403d6d5bd57af7047c68a295d19be980f8e7 | refs/heads/master | 2022-12-12T07:40:44.873705 | 2020-09-15T08:13:35 | 2020-09-15T08:13:35 | 295,259,611 | 1 | 0 | null | 2020-09-13T23:57:20 | 2020-09-13T23:57:19 | null | UTF-8 | Python | false | false | 4,323 | py | import torch.nn as nn
import torch.nn.functional as F
class BasicBlock(nn.Module):
expansion = 1
def __init__(self, in_planes, planes, stride=1, norm_layer=nn.BatchNorm2d):
super(BasicBlock, self).__init__()
self.conv1 = nn.Conv2d(in_planes, planes, kernel_size=3, stride=stride, padding=1, bi... | [
"harhro@gmail.com"
] | harhro@gmail.com |
78c6b04fab58b471b567bedf62f83b9b7b4a6599 | 1af426c1eb2fc76624854e604cef3d568303f670 | /paper/fig_full_map.py | 7e3940eb04a59761b50997b0a03f5034c1c6c76d | [
"BSD-3-Clause"
] | permissive | ACTCollaboration/tilec | 51f0bbb8f83013fd4c3cdc95e33f8ba88b6a3e56 | 29cbd055c360c67b8676e1cf8534049c0f1dd16e | refs/heads/master | 2022-02-17T19:26:18.113206 | 2022-02-08T04:38:51 | 2022-02-08T04:38:51 | 152,158,730 | 1 | 1 | NOASSERTION | 2020-05-06T08:09:34 | 2018-10-08T23:17:23 | Jupyter Notebook | UTF-8 | Python | false | false | 4,267 | py | from __future__ import print_function
from orphics import maps,io,cosmology,catalogs
from pixell import enmap,reproject
import numpy as np
import os,sys,shutil
from soapack import interfaces as sints
import healpy as hp
version = "map_v1.2.0_joint"
cversion = "v1.2.0"
down = 6
# nilc = hp.read_alm("/scratch/r/rb... | [
"mathewsyriac@gmail.com"
] | mathewsyriac@gmail.com |
261cfed4856dceb90491461d4404f4480a20f972 | 13cccbc1bbaec02f53d2f4e654d480512f6c2bb5 | /ds/segment-tree/stone.py | 08d8c7025ff275abc465f50eeeb164d642083106 | [] | no_license | sjdeak/interview-practice | 580cc61ec0d20d548bbc1e9ebebb4a64cd7ac2dc | 1746aaf5ab06603942f9c85c360e319c110d4df8 | refs/heads/master | 2020-07-20T21:06:23.864208 | 2019-09-08T10:54:16 | 2019-09-08T10:54:16 | 206,709,284 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,535 | py | # 黑白石头 https://www.jisuanke.com/course/804/41868
import unittest
class SegmentTreeIntervalSet:
def __init__(self, A):
self.length = len(A)
# 由数组表示的树,下标从0开始
# 存的是区间内最长的连续1的个数
self.data = [0] * 4 * self.length
# lazySet[p] = val: p指代的区间内的所有项都置为val
self.lazySet = [0] * 4 * self.length
# ... | [
"sjdeak@yahoo.com"
] | sjdeak@yahoo.com |
b9ce71918ff5f859c0e3130615e632b06972dabc | 509e9d64744f720392fda2b978d783f985c60824 | /python2.7/site-packages/numpy/lib/_iotools.py | a5419a22f81b6e42d7cd2b917a50bb9b08c7f2ee | [] | no_license | theideasmith/Instant-OpenCV-FFMPEG | 0560598fba630ded533b4e6c111c61c9b0b7502b | 234e359af245b4832b3e7ade6070e91c81b65de0 | refs/heads/master | 2021-01-11T20:39:33.443984 | 2017-01-16T23:09:46 | 2017-01-16T23:09:46 | 79,162,330 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 130 | py | version https://git-lfs.github.com/spec/v1
oid sha256:1659736f7079dac7416a1915b72802e506a32c2717f3b731db4d61c567506fcd
size 32062
| [
"aclscientist@gmail.com"
] | aclscientist@gmail.com |
0fa8f09c57c7c3c70066e95565ea32012c2724da | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02608/s445397347.py | bb422d2ccfcddc22d586f269320686308b27139a | [] | 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 | 336 | py | n = int(input())
M = int(n**(0.5))
ans = [0]*(n+1)
for x in range(1,M+1):
for y in range(1,10**2):
for z in range(1,10**2):
if x**2+y**2+z**2+x*y+y*z+z*x > n:
break
ans[x**2+y**2+z**2+x*y+y*z+z*x] += 1
if x**2+y**2 > n:
break
for i in range(n):
... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
4795e440d021ea6c20464178c5e259094ae896c1 | f023692f73992354a0b7823d9c49ae730c95ab52 | /tool/datastructure.py | 153f8ccd287d1ff772731de54504c2d56135f836 | [] | no_license | corutopi/AtCorder_python | a959e733f9a3549fab7162023e414ac2c99c4abe | a2c78cc647076071549e354c398155a65d5e331a | refs/heads/master | 2023-08-31T09:40:35.929155 | 2023-08-20T06:19:35 | 2023-08-20T06:19:35 | 197,030,129 | 1 | 0 | null | 2022-06-22T04:06:28 | 2019-07-15T15:57:34 | Python | UTF-8 | Python | false | false | 8,403 | py | class BinaryIndexedTree:
"""
l = [1, 2, 3, 4, 5, 6, 7, 8] のlistを例とした場合、
以下のような範囲での演算結果(sum)を配列に持つ。
1: [1, 2, 3, 4, 5, 6, 7, 8]
2: [1, 2, 3, 4]
3: [1, 2] [5, 6]
4: [1] [3] [5] [7]
1 ~ r までの結果S(r)を、各層で必要な演算済みのデータを使うことで log(N) で計算できる.
l ~ r までの結果は S(r) - S(l -... | [
"39874652+corutopi@users.noreply.github.com"
] | 39874652+corutopi@users.noreply.github.com |
a037c30b4cf938b6c88e676a97e3fb1218ac58f5 | 45c01f01483b09ff738be19df6b183ec9bf38504 | /bin/combinatorial_fitness.py | 0cc08316d553e9b5db3df4f9d799942fe0fcda81 | [
"MIT"
] | permissive | brianhie/viral-mutation | 77787e74cb3868ef227aca50b13b3a4c439d4564 | 81c80d41671670eb58cc46e957a1b0c4bf14856a | refs/heads/master | 2023-04-16T18:42:34.118126 | 2022-02-16T16:22:23 | 2022-02-16T16:22:23 | 247,753,138 | 117 | 46 | MIT | 2023-03-24T22:45:39 | 2020-03-16T15:52:08 | Python | UTF-8 | Python | false | false | 8,010 | py | from utils import Counter, SeqIO
from Bio.Seq import translate
import numpy as np
def load_doud2016():
strain = 'h1'
fname = 'data/influenza/escape_doud2018/WSN1933_H1_HA.fa'
wt_seq = SeqIO.read(fname, 'fasta').seq
seqs_fitness = {}
fname = ('data/influenza/fitness_doud2016/'
'Suppl... | [
"brianhie@mit.edu"
] | brianhie@mit.edu |
63c93fdc3a6a5121bd821bc2b6e51bfc13572d01 | 90af9781544352a3ae2e4f33f1c21cf4cd7a18ba | /scripts/sptk/libs/utils.py | 871478ece70e32e4d63464fecea3d8c21a3083c1 | [
"Apache-2.0"
] | permissive | ronggan/setk | 65d5a079185c69d29035a07449cfe5497c844203 | c1df07f5acb5d631ec4a6d6bdbae0507cc9c9dfc | refs/heads/master | 2020-06-14T08:44:32.387932 | 2019-06-07T12:47:52 | 2019-06-07T12:47:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,608 | py | #!/usr/bin/env python
# wujian@2018
import os
import math
import errno
import warnings
import logging
import librosa as audio_lib
# using wf to handle wave IO because it support better than librosa
import scipy.io.wavfile as wf
import scipy.signal as ss
import numpy as np
MAX_INT16 = np.iinfo(np.int16).max
EPSILON ... | [
"funcwj@foxmail.com"
] | funcwj@foxmail.com |
7d7a1006b9e7cc31093802d2443ca503d2227810 | bd542286bccf42a61697c97e3eed86508ddab9c4 | /CarManagement/Car/migrations/0026_carimage.py | 8365a66ae44c74a2155a5fdf0763a574a83f7a55 | [] | no_license | mahadi-interconnection/DjangoReactCarManagement | 031929e9752db83fb0059be666f1acd8c64a1c03 | cbf2d04207b73956e5942894d78651a6dc22902e | refs/heads/master | 2020-06-03T19:43:34.984121 | 2019-06-09T17:38:58 | 2019-06-09T17:38:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 682 | py | # Generated by Django 2.0.5 on 2019-05-16 03:51
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('Car', '0025_auto_20190513_1633'),
]
operations = [
migrations.CreateModel(
name='CarImage',
... | [
"streametanvir@gmail.com"
] | streametanvir@gmail.com |
ff524307c8551c7850b38755517425b7c3d311eb | be18547cef4591a551321a8c78cb6b28aafa3f0d | /pumpp/feature/fft.py | 7b7ea9255de43ed713bd5b208c64976dbbaf99cd | [
"ISC"
] | permissive | Manojkl/pumpp | f1f2a476a95af548f2096c8834ba308a6e3892bc | 18d3d843d5e5e505888057fed20e58e545f4baaa | refs/heads/master | 2022-11-29T01:40:47.159380 | 2019-08-21T12:20:31 | 2019-08-21T12:20:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,168 | py | #!/usr/bin/env python
"""STFT feature extractors"""
import numpy as np
from librosa import stft, magphase
from librosa import amplitude_to_db, get_duration
from librosa.util import fix_length
from .base import FeatureExtractor
from ._utils import phase_diff, to_dtype
__all__ = ['STFT', 'STFTMag', 'STFTPhaseDiff']
... | [
"brian.mcfee@nyu.edu"
] | brian.mcfee@nyu.edu |
332501bffec57d4ff4b2b4cca896d08b65b8d3ba | a2d36e471988e0fae32e9a9d559204ebb065ab7f | /huaweicloud-sdk-iec/huaweicloudsdkiec/v1/model/update_instance_option.py | 4de1ea36bdbe9710839a0c8d412c9b2d57353a81 | [
"Apache-2.0"
] | permissive | zhouxy666/huaweicloud-sdk-python-v3 | 4d878a90b8e003875fc803a61414788e5e4c2c34 | cc6f10a53205be4cb111d3ecfef8135ea804fa15 | refs/heads/master | 2023-09-02T07:41:12.605394 | 2021-11-12T03:20:11 | 2021-11-12T03:20:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,941 | py | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class UpdateInstanceOption:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The k... | [
"hwcloudsdk@huawei.com"
] | hwcloudsdk@huawei.com |
57970b46f486cd918e78eb5d99b794e00dedb0cf | 67430c0de6ba62ff6faca80e5de5d9fedf45e2f1 | /to_mrp_backdate/models/mrp_workcenter_productivity.py | fa89c4bf74daae418dbca47f64ff51ea53ce1ea6 | [] | no_license | blue-connect/inl_extra_addons_oe13 | 2bc62d1eeeff3a450a0891f37aca614bca7050bd | 58144a02ce00abd3cf86dd3b84dfae8163eb6d26 | refs/heads/master | 2022-12-24T04:15:46.991096 | 2020-09-29T10:38:14 | 2020-09-29T10:38:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 586 | py | from odoo import api, fields, models
class MrpWorkcenterProductivity(models.Model):
_inherit = 'mrp.workcenter.productivity'
backdate = fields.Datetime(string='Backdate', help="If filled, this date and time will be used instead"
" of the current date and time")
def button_... | [
"kikin.kusumah@gmail.com"
] | kikin.kusumah@gmail.com |
377e861bde090e01e900aa2779b55f2f6fb308cd | 036a41c913b3a4e7ae265e22a672dd89302d3200 | /未完成题目/1501-1550/1538/1538_Python_1.py | c467812968377363498155d449155bd2f2f4ffd6 | [] | no_license | ChangxingJiang/LeetCode | e76f96ebda68d7ade53575354479cfc33ad4f627 | a2209206cdd7229dd33e416f611e71a984a8dd9e | refs/heads/master | 2023-04-13T15:23:35.174390 | 2021-04-24T05:54:14 | 2021-04-24T05:54:14 | 272,088,506 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 657 | py | # """
# This is the ArrayReader's API interface.
# You should not implement it, or speculate about its implementation
# """
class ArrayReader(object):
# Compares the sum of arr[l..r] with the sum of arr[x..y]
# return 1 if sum(arr[l..r]) > sum(arr[x..y])
# return 0 if sum(arr[l..r]) == sum(arr[x..y])
# ... | [
"1278729001@qq.com"
] | 1278729001@qq.com |
d79939e1962f8f6b1da5021ec40c097fad37386b | 5352ad5f07ae81c6406d20c018f68d29788b2290 | /exps/standalone/diff_sims/mem_ops.py | 054efdf780b2cd1d8b08a13f850125a4a23530b4 | [
"Apache-2.0"
] | permissive | sillywalk/GRSan | 9b23c95c272fa06fcaaec4fee33e22eb523a9319 | a0adb1a90d41ff9006d8c1476546263f728b3c83 | refs/heads/master | 2020-06-08T20:53:24.667084 | 2019-06-27T14:56:40 | 2019-06-27T14:56:40 | 193,304,489 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,735 | py | import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import sys
def pa(lb, arr):
sys.stdout.write(lb+': ')
sys.stdout.write('[')
for a in arr:
sys.stdout.write('{:0.2E} '.format(a))
print(']')
def pi(lb, *ints):
sys.stdout.write(lb+': ')
for i in ints: ... | [
"i.m.ralk@gmail.com"
] | i.m.ralk@gmail.com |
c5d8e725634e1fb6e5a5fb1a9721ca6045aad126 | 24cee07743790afde5040c38ef95bb940451e2f6 | /acode/abc305/d/ans.py | 31437f4bd7bf9de4c38755d415269925e0b3c403 | [] | no_license | tinaba96/coding | fe903fb8740d115cf5a7f4ff5af73c7d16b9bce1 | d999bf5620e52fabce4e564c73b9f186e493b070 | refs/heads/master | 2023-09-01T02:24:33.476364 | 2023-08-30T15:01:47 | 2023-08-30T15:01:47 | 227,594,153 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 557 | py | from bisect import *
n = int(input())
A = list(map(int, input().split())) + [10**9+1]
RA = [0]
for i, ai in enumerate(A):
if i == 0: continue
if i%2==0:
RA.append(RA[-1] + A[i] - A[i-1])
else:
RA.append(RA[-1])
# print(RA)
def solv(r):
rp = bisect_right(A, r)
# print(rp, RA[rp-1], ... | [
"tinaba178.96@gmail.com"
] | tinaba178.96@gmail.com |
73a07f3af522e0ba840c37e388931825422ec3c0 | 08760dda1de398381f639ac82f70bd97a22288dc | /dicts/954_array_of_doubled_pairs.py | 1ece687e836f7062590851d0a6490593de01ef8f | [] | no_license | liketheflower/CSCI13200 | 9a8719f6ecb1295cee22bd8a4abd9556594a0d14 | 18053e4c2513ad22d26d7b4c0528b34494c0ed8b | refs/heads/master | 2020-07-11T18:37:45.797196 | 2019-12-10T17:25:58 | 2019-12-10T17:25:58 | 204,616,708 | 7 | 5 | null | null | null | null | UTF-8 | Python | false | false | 634 | py | class Solution:
def canReorderDoubled(self, A: List[int]) -> bool:
neg, zero, pos = [], [], []
for a in A:
if a > 0:pos.append(a)
elif a<0:neg.append(-a)
else:zero.append(a)
if len(zero)%2!=0:return False
def check(a):
if not a:return T... | [
"jim.morris.shen@gmail.com"
] | jim.morris.shen@gmail.com |
be57d8fe06e399091726d07a5f4e7a5ebfa57736 | 6aab2d11b3ab7619ee26319886dcfc771cbcaba5 | /0x11-python-network_1/4-hbtn_status.py | 74b861309d0771e6458caf2b759db25339833d7e | [] | no_license | IhebChatti/holbertonschool-higher_level_programming | ef592f25eb077e182a0295cb5f2f7d69c7a8ab67 | ca58262c6f82f98b2022344818e20d382cf82592 | refs/heads/master | 2022-12-18T10:06:30.443550 | 2020-09-24T17:31:30 | 2020-09-24T17:31:30 | 259,174,423 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 345 | py | #!/usr/bin/python3
"""[sumPython script that fetches
https://intranet.hbtn.io/statusmary]
"""
import requests
if __name__ == "__main__":
url = "https://intranet.hbtn.io/status"
req = requests.get(url)
req = req.text
print("Body response:")
print("\t- type: {}".format(type(req)))
print("\t- c... | [
"iheb.chatti@holbertonschool.com"
] | iheb.chatti@holbertonschool.com |
5047cb53e99c130ffc9ab800fd5d2f469be741cc | 0f4cacd40260137d3d0b3d1b34be58ac76fc8bd0 | /2016/advent2.py | 0d31b60fbf66e6737409d47930d2a72fe04da333 | [] | no_license | timrprobocom/advent-of-code | 45bc765e6ee84e8d015543b1f2fa3003c830e60e | dc4d8955f71a92f7e9c92a36caeb954c208c50e7 | refs/heads/master | 2023-01-06T07:19:03.509467 | 2022-12-27T18:28:30 | 2022-12-27T18:28:30 | 161,268,871 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 563 | py | import sys
moves = """ULL
RRDDD
LURDL
UUUUD""".splitlines()
x,y = (2,2)
pad = ( ' ', ' 123 ', ' 456 ', ' 789 ', ' ' )
moves = open('../Downloads/day2.txt').readlines()
x,y = (4,4)
pad = (
' ',
' 1 ',
' 234 ',
' 56789 ',
' ABC ',
' D ',
' ')
for ln in... | [
"timr@probo.com"
] | timr@probo.com |
3cda652059bf909ad4e252db11faa152f6204318 | bf06bf980ef359615604d53567d1cc435a980b78 | /data/HW3/hw3_306.py | 1d990ae03ca4494d616153c28f0b26f761a9e0c2 | [] | no_license | am3030/IPT | dd22f5e104daa07a437efdf71fb58f55bcaf82d7 | 6851c19b2f25397f5d4079f66dbd19ba982245c5 | refs/heads/master | 2021-01-23T05:03:53.777868 | 2017-03-09T18:10:36 | 2017-03-09T18:10:36 | 86,270,526 | 0 | 0 | null | 2017-03-26T22:53:42 | 2017-03-26T22:53:42 | null | UTF-8 | Python | false | false | 958 | py |
KELVIN_FREEZING_POINT = 273.16
KELVIN_BOILING_POINT = 373.16
CELSIUS_FREEZING_POINT = 0
CELSIUS_BOILING_POINT = 100
def main():
temp = float(input("Please enter the temperature: "))
scale = str(input("Please enter 'C' for Celsius, or 'K' for Kelvin: "))
if scale == "C":
if temp <= CELS... | [
"mneary1@umbc.edu"
] | mneary1@umbc.edu |
51b96d33a052a040280d116a4ef0520fd9628657 | 48a522b031d45193985ba71e313e8560d9b191f1 | /baekjoon/python/26562.py | 4dd8cc5efe23ccc1c2c30ecf7fec7171d06e1bcd | [] | no_license | dydwnsekd/coding_test | beabda0d0aeec3256e513e9e0d23b43debff7fb3 | 4b2b4878408558239bae7146bb4f37888cd5b556 | refs/heads/master | 2023-09-04T12:37:03.540461 | 2023-09-03T15:58:33 | 2023-09-03T15:58:33 | 162,253,096 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 332 | py | import sys
money_dict = {"Franklin": 100, "Grant": 50, "Jackson": 20, "Hamilton": 10, "Lincoln": 5, "Washington": 1}
cases = int(sys.stdin.readline())
for _ in range(cases):
total_money = 0
wallet = list(sys.stdin.readline().split())
for w in wallet:
total_money += money_dict[w]
print(f"${tot... | [
"dydwnsekd123@gmail.com"
] | dydwnsekd123@gmail.com |
d2a79e2201a7b60db1dd4df3cd2de184d10141d6 | 5f845ebbc2c9b40eea702833c91928ae90ae7ee5 | /algorithms/manasa-and-stones.py | 935737c7d38b736bd795f52b6dfb7b60373024ed | [
"MIT"
] | permissive | imgeekabhi/HackerRank | 7a1917fee5af01976aebb9c82aa1045a36487016 | 7fe4a308abad85ce446a28328324be480672e6fc | refs/heads/master | 2022-12-28T19:13:49.098090 | 2020-10-11T09:29:08 | 2020-10-11T09:29:08 | 300,023,395 | 1 | 0 | MIT | 2020-09-30T18:48:12 | 2020-09-30T18:48:11 | null | UTF-8 | Python | false | false | 379 | py | #!/bin/python3
import sys
def stones(n, a, b):
return sorted(set([(n-1)*min(a, b) + x*abs(a-b) for x in range(n)]))
if __name__ == "__main__":
T = int(input().strip())
for a0 in range(T):
n = int(input().strip())
a = int(input().strip())
b = int(input().strip())
result = ... | [
"sergey.n.nemov@gmail.com"
] | sergey.n.nemov@gmail.com |
dce8e6165e091fab69df93ff3e8300d17303dba0 | da0fa8d4fdee6f8d5b52723d45e46f9cc0e55866 | /publ/cli.py | b3b3247b69dd6d2c3fb39bdc65a4e36c66e47ade | [
"MIT"
] | permissive | PlaidWeb/Publ | 3f62ceb490a29a639314dc792552d06d511012f4 | 2cc227ec975529a89eec105f63e4102b62eeddbe | refs/heads/main | 2023-08-18T08:41:48.478369 | 2023-08-08T17:38:17 | 2023-08-08T17:38:17 | 127,061,540 | 33 | 5 | MIT | 2023-09-01T20:30:18 | 2018-03-28T00:30:42 | Python | UTF-8 | Python | false | false | 5,831 | py | """ CLI utilities for Publ """
# pylint:disable=too-many-arguments
import itertools
import logging
import os.path
import re
import time
import arrow
import click
import slugify
from flask.cli import AppGroup, with_appcontext
from pony import orm
from . import queries
from .config import config
LOGGER = logging.getL... | [
"fluffy@beesbuzz.biz"
] | fluffy@beesbuzz.biz |
bf62c010e605a1512decc17c0d3cec6837ac690e | eaf83bd07e03cb3d9934c31c5cda60040546ff3d | /tensorflow/contrib/learn/python/learn/tests/dataframe/test_column.py | ae4f36cceb91e3931f5ae2edbe607de0fed9d156 | [
"Apache-2.0"
] | permissive | anguillanneuf/tensorflow | 508d2ddcd59a0c2ba8e138bdfa0af0fecb5d8640 | 7d58c6856c4e0e3095d4a50cc23a0ff036338949 | refs/heads/master | 2021-01-22T08:32:43.794741 | 2016-06-06T15:10:07 | 2016-06-06T15:10:07 | 59,699,880 | 0 | 0 | null | 2016-05-25T21:45:20 | 2016-05-25T21:45:20 | null | UTF-8 | Python | false | false | 2,240 | py | """Tests of the Column class."""
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unles... | [
"gardener@tensorflow.org"
] | gardener@tensorflow.org |
62ebcc91889677c8b30ffd65ed29c5829b2a6e1f | b4f211423f51c7c3bfbc39c868aaa15c5899b1fa | /226. Invert Binary Tree.py | 3d93f299ed5775a88c748b37f1e0eae10e2d34b6 | [] | no_license | yaoyu2001/LeetCode_Practice_Python | 705971d17fb91cba9114854886ee113206d23f59 | a09bd0105c0ac9e76e9b4ef1946faa2fb8797660 | refs/heads/master | 2020-11-30T08:57:22.022268 | 2020-09-19T00:01:23 | 2020-09-19T00:01:23 | 230,361,026 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 426 | py | # Definition for a binary tree node.
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def invertTree(self, root: TreeNode) -> TreeNode:
if not root:
return None
right = self.invertTree(root.right)
... | [
"yongchangyao2001@gmail.com"
] | yongchangyao2001@gmail.com |
9d8ab899ac69be877244f609a08e6ff88f26dcf1 | 79e1a5ad019b261034bc6338e894679d3f5d54d9 | /Regular Expression Matching.py | 7bef362e86cab1c1dbffc2ee974d0dc8261d8b1e | [
"MIT"
] | permissive | ngdeva99/Fulcrum | c615f457ec34c563199cc1dab243ecc62e23ad0b | 3a5c69005bbaf2a5aebe13d1907f13790210fb32 | refs/heads/master | 2022-12-15T19:35:46.508701 | 2020-09-09T06:47:48 | 2020-09-09T06:48:08 | 294,027,104 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,080 | py | class Solution:
def isMatch(self, s: str, p: str) -> bool:
dp = [[False for _ in range(len(p)+1)] for _ in range(len(s)+1)]
dp[0][0] = True
#noT ALWAYS COLMNS ARE FALSE BECAUSE SOMETIMES THEY CAN match with the empty string for cases like a*b*
... | [
"31466229+ngdeva99@users.noreply.github.com"
] | 31466229+ngdeva99@users.noreply.github.com |
8fb708dfdd6f0ed3f00e5449bc4839c03c543bdc | da0a7446122a44887fa2c4f391e9630ae033daa2 | /python/ray/data/preprocessors/custom_stateful.py | 801f4d6f092df4bfcd672f0d8835e4814150bb1a | [
"MIT",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | whiledoing/ray | d8d9ba09b7545e8fd00cca5cfad451278e61fffd | 9272bcbbcae1630c5bb2db08a8279f0401ce6f92 | refs/heads/master | 2023-03-06T16:23:18.006757 | 2022-07-22T02:06:47 | 2022-07-22T02:06:47 | 252,420,044 | 0 | 0 | Apache-2.0 | 2023-03-04T08:57:20 | 2020-04-02T10:07:23 | Python | UTF-8 | Python | false | false | 3,665 | py | from typing import Callable, TYPE_CHECKING, Dict
from ray.data.preprocessor import Preprocessor
from ray.data import Dataset
if TYPE_CHECKING:
import pandas
class CustomStatefulPreprocessor(Preprocessor):
"""Implements a user-defined stateful preprocessor that fits on a Dataset.
This is meant to be gen... | [
"noreply@github.com"
] | whiledoing.noreply@github.com |
fe78a5baff324bb3d049a9f7ad54a9d47eca3a4f | ead3ef1aa0d7633f9ba7cf8f4454bac7ca74f540 | /sources/RaMaK/RaMaK.py | 381cb566858cbed3ef3839cd8c1da73b4151cebc | [] | no_license | sffej/Sefaria-Data | e5c64ba436098de4294d441b0d686ad9850c9d07 | 73a0ae6ab80cdac477fd446ac69edf42b6e37919 | refs/heads/master | 2021-01-13T02:53:57.395433 | 2016-12-21T09:17:29 | 2016-12-21T09:17:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,286 | py | # -*- coding: utf-8 -*-
__author__ = 'stevenkaplan'
from XML_to_JaggedArray import XML_to_JaggedArray
import sys
sys.path.append('../')
from functions import *
sys.path.append('../../../')
from sefaria.model import *
'''Every node whose first element is a title is the node's title. Then remove these titles possibly.
... | [
"skaplan@brandeis.edu"
] | skaplan@brandeis.edu |
acf150c4647da83352303ffcee565e243f7cd2c4 | fe22e8ffdb1b2f1e11becc027e71a7a512fe56eb | /misc/analysis_step2/calculateBTaggingEffs.py | e0d52d9a1afe7d8fabf519c6d6d0b3cb4089ff58 | [] | no_license | HEP-KBFI/stpol | 3cdb5dc125bb0394f4531abfdfe9629b0c8d0fa4 | 962837a3341dd26391025b9a07a9c1c93084bf64 | refs/heads/master | 2020-06-03T16:15:14.743807 | 2015-08-05T09:00:28 | 2015-08-05T09:00:28 | 5,716,481 | 0 | 1 | null | 2015-03-04T08:23:28 | 2012-09-07T12:27:30 | Python | UTF-8 | Python | false | false | 7,138 | py | from anfw import *
import pdb
import math
import json
#cut = Cuts.mu + Cuts.MT + Cuts.mlnu + Cuts.jetRMS + Cuts.jetPt + Cuts.jets_1LJ + Cuts.etaLJ + Cuts.recoFState #Cut("1plusLJ", "_lightJetCount>=1")
cut = Cuts.mu + Cuts.MT + Cuts.mlnu + Cuts.jetRMS + Cuts.etaLJ + Cuts.recoFState + Cuts.jetPt + Cut("1plusLJ", "_lig... | [
"joosep.pata@gmail.com"
] | joosep.pata@gmail.com |
4dcc4ff446eff2fef093f48a7aea4875ff8d2d3a | 6c543074f1d764af9701e5b55db9ab0220c1df93 | /03_循环/venv/bin/pip3.6 | 6dfe12f619a30cc702d37070c1f52c36606b8e5c | [] | no_license | allenlgy/Django-project | 127e984e13f71d20e01df68ad42d00b977ac0105 | 9c4b9e6c67481a5f3cef58ea47e9fd62058036d8 | refs/heads/master | 2020-06-23T01:03:03.170674 | 2019-09-04T06:11:40 | 2019-09-04T06:11:40 | 198,453,709 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 406 | 6 | #!/home/linguiyi/Desktop/03_循环/venv/bin/python -x
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==19.0.3','console_scripts','pip3.6'
__requires__ = 'pip==19.0.3'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.e... | [
"1006547624@qq.com"
] | 1006547624@qq.com |
1f5a6da61f4297f4c0f993fcff3e63528df697d2 | 61f2172dfbb81aa3ad46b2063ad6baced0c94b5c | /juicer/models/inline_response2007.py | 6353cdbb447feea555aa18c46832da56cfb855a6 | [] | no_license | rochacbruno-archive/pulp3-juicer | 0005517a8b1e840b2c08ca492318f5e4b460edf3 | da9b636720281169d343a6190d6615a81f631b0b | refs/heads/master | 2020-04-29T01:24:42.736203 | 2019-03-15T02:09:43 | 2019-03-15T02:12:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,186 | py | # coding: utf-8
"""
Pulp3 API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: v3
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
fro... | [
"rochacbruno@gmail.com"
] | rochacbruno@gmail.com |
7082139b388aa7fe762248acdc6c4af2c6679758 | baf3996414315ffb60470c40c7ad797bf4e6897f | /10_back_dev/paradigms/functional/py_scripts/21. Handling errors in lambda expressions.py | 36cd909a7c4d14bb020ce8a13c5dc78044b7d955 | [
"MIT"
] | permissive | thiago-allue/portfolio | 8fbbecca7ce232567aebe97c19944f444508b7f4 | 0acd8253dc7c5150fef9b2d46eead3db83ca42de | refs/heads/main | 2023-03-15T22:10:21.109707 | 2022-09-14T17:04:35 | 2022-09-14T17:04:35 | 207,919,073 | 0 | 0 | null | 2019-11-13T18:18:23 | 2019-09-11T22:40:46 | Python | UTF-8 | Python | false | false | 788 | py |
# coding: utf-8
# ## Let's reconsider our lambda
# In[3]:
l_add_str = lambda s: sum([int(i) for i in s.split('+')])
# ## A Maybe-like decorator
#
# The Maybe monad is not very Pythonic. But we can do something similar using a decorator.
# In[5]:
def maybe(fnc):
def inner(*args):
for... | [
"thiago.allue@yahoo.com"
] | thiago.allue@yahoo.com |
3ae428c5c3d9934484c31bd9f055b975f15db166 | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_2751486_0/Python/ChRapO/A.py | 74c4807722da1da40ad33a1b289805c6a93fd531 | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | Python | false | false | 533 | py | import sys
cases = sys.stdin.readline()
non = ['a','e','i','o','u']
for case in range(0,int(cases)):
s,L = [v for v in sys.stdin.readline().split()]
L = int(L)
res = 0
ind = 0
sum = 0
K = []
for c in s:
if not c in non: sum += 1
else: sum = 0
if sum >= L:
K.append(ind)
ind += 1
... | [
"eewestman@gmail.com"
] | eewestman@gmail.com |
7665c3d92f0286971a166f11effa1d65de7fb0bc | 2dad8b725583afd64e2f381acb6a299350a069c4 | /winback/wsgi.py | 26e399e353bb46b9c222b8c1e08797b7183f46fc | [] | no_license | s4-hub/winback | 39b0b354690201a7906ce77f46c1172ddcb21110 | abfb22b6ed5d523b93ea5cdb982ac3066a63ab7c | refs/heads/master | 2020-12-22T12:27:54.416189 | 2020-02-11T10:50:30 | 2020-02-11T10:50:30 | 233,515,666 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 391 | py | """
WSGI config for winback 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/3.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTI... | [
"syafii.newbie@gmail.com"
] | syafii.newbie@gmail.com |
7b43a51da0f5244e8620e566618e73db3071883d | 78cc1e7a9703769cfce430bbc4ac38c874a59d47 | /backend/home/migrations/0003_message.py | 6c1a3eebe5afc3461fa8aa5be519fb3834b1d7e7 | [] | no_license | crowdbotics-apps/thefuture-21697 | 9790196ed22bb7a859ea6d8aefa1a916e998208d | e0552b0cec2b826933e7d01a73c8b434195e4f61 | refs/heads/master | 2022-12-29T18:28:04.481853 | 2020-10-19T05:35:21 | 2020-10-19T05:35:21 | 305,272,790 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 940 | py | # Generated by Django 2.2.16 on 2020-10-19 05:33
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('dating', '0001_initial'),
('home', '0002_load_initial_data'),
]
operations = [
migrations.CreateMo... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
19bac62d51ee3986732db67f4d6bab2ebfcd2f2a | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p04000/s866107546.py | 76d4bb9f3ddc109f45e5d41132929ecf15b57adf | [] | 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 | 633 | py | import sys,queue,math,copy,itertools,bisect,collections,heapq
def main():
LI = lambda : [int(x) for x in sys.stdin.readline().split()]
H,W,N = LI()
d = collections.Counter()
for _ in range(N):
x,y = LI()
for dx in range(-1,2):
for dy in range(-1,2):
nx = x... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
629b3d6a0feeebefff9e7835994f4fea2c8d79c7 | 065956c29148d6b9a52cc97f1766f2d3e9e3ad83 | /pandas/venv/Scripts/f2py.py | b74390c16600d0f3554f89e7ca0bcab017816327 | [] | no_license | HBU/PythonLearning | 17b09ad32ea0100b18f01ad489b3daa81f70594a | 18303752c44ed90beefb13725690124031381f35 | refs/heads/master | 2022-11-24T05:17:01.968082 | 2019-06-06T05:01:08 | 2019-06-06T05:01:08 | 123,361,590 | 3 | 5 | null | 2022-11-18T22:18:49 | 2018-03-01T00:53:39 | Python | UTF-8 | Python | false | false | 797 | py | #!C:\GitHub\PythonLearning\pandas\venv\Scripts\python.exe
# See http://cens.ioc.ee/projects/f2py2e/
from __future__ import division, print_function
import os
import sys
for mode in ["g3-numpy", "2e-numeric", "2e-numarray", "2e-numpy"]:
try:
i = sys.argv.index("--" + mode)
del sys.argv[i]
br... | [
"8584751@qq.com"
] | 8584751@qq.com |
e953bb5cba9a5f137ea0bb01359006d3dca25399 | 4090d8b4e8e9e28d620d222651c73a12a753be36 | /cases/urls.py | b90ee81d849bdb23377c093189d6fb2c10d48c89 | [] | no_license | isaev4lex/220studio | 91aa08f9d10ff55e98effe2542e26799efb6e2f2 | 6188403eeed7ee590b21da15c67af9e6f06ab06b | refs/heads/main | 2023-08-20T07:14:18.203593 | 2021-10-31T07:24:19 | 2021-10-31T07:24:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 176 | py | from django.urls import path
from . import views
urlpatterns = [
path('', views.cases, name='cases'),
path('<slug:category_slug>/', views.cases, name='cases_slug'),
]
| [
"FWorld21@protonmail.com"
] | FWorld21@protonmail.com |
612ca64cff2aaf1672b0799554822c9afa445102 | 6740ee4590bd30513c7e5fe185db42ca5c8fd565 | /lib/html_highlight.py | 2b27e1d9c4e0b63c3e6cf56d72e9ba1a4b6265aa | [
"MIT"
] | permissive | emmetio/sublime-text-plugin | 5a10c12e2d8c8a15b0be3b29c44e913bbfba4526 | df81e99d9655fe3ad0d7187051369a5324c6f139 | refs/heads/master | 2023-08-01T12:38:02.914935 | 2023-01-18T23:58:25 | 2023-01-18T23:58:25 | 205,387,294 | 267 | 38 | MIT | 2021-06-14T06:11:38 | 2019-08-30T13:25:18 | Python | UTF-8 | Python | false | false | 1,605 | py | import re
import html
from ..emmet.html_matcher import scan, get_attributes, ElementType
re_tag_end = re.compile(r'\s*\/?>$')
def highlight(code: str) -> str:
chunks = []
offset = [0]
def cb(name: str, elem_type: int, start: int, end: int):
if offset[0] != start:
chunks.append(escape(... | [
"serge.che@gmail.com"
] | serge.che@gmail.com |
68066c1b7cc8196473a609c02be7e95140327953 | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-5/3346b78a8a872286a245d1e77ef4718fc5e6be1a-<has_zoneinfo_database>-bug.py | 64bd17668d26971a8bc27e797781cbcb4d0f7c4d | [] | 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 | 205 | py | @cached_property
def has_zoneinfo_database(self):
with self.connection.cursor() as cursor:
cursor.execute('SELECT 1 FROM mysql.time_zone LIMIT 1')
return (cursor.fetchone() is not None) | [
"dg1732004@smail.nju.edu.cn"
] | dg1732004@smail.nju.edu.cn |
afa3e2142f3568deab7b6eba89c0bd6107a71827 | c7c0aff3a367e21aeb8470c74607f882266a4bdc | /pystagram/settings.py | 982ac51073b3e076d2c92020039bea5bc90684a7 | [] | no_license | hanquf1/s5-pystagram | 30c58a97ad909120ad5dcb72c7517106aff66fe0 | a893e3a4aa8c6d7f0bde4a734f5ae9e602678692 | refs/heads/master | 2021-01-21T20:06:46.221481 | 2016-03-12T08:16:17 | 2016-03-12T08:16:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,224 | py | """
Django settings for pystagram project.
Generated by 'django-admin startproject' using Django 1.9.1.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os
... | [
"kay@hannal.net"
] | kay@hannal.net |
941346ac5ae82a0bd2402d7543bd22bcb7f01648 | bd435e3ff491d13c3cb1ffcf34771ac1c80f7859 | /code/base/identity_operator.py | 9f341d5aa53d3e532e9a7e70ff8a938e3f91f132 | [] | no_license | luningcowboy/PythonTutorial | 8f4b6d16e0fad99a226540a6f12639ccdff402ff | 9024efe8ed22aca0a1271a2c1c388d3ffe1e6690 | refs/heads/master | 2021-06-16T23:03:22.153473 | 2020-04-09T13:52:12 | 2020-04-09T13:52:12 | 187,571,993 | 0 | 0 | null | 2021-03-25T23:02:36 | 2019-05-20T05:16:13 | Python | UTF-8 | Python | false | false | 440 | py | #!/usr/bin/python
# -*- coding: UTF-8 -*-
a = 20
b = 20
if (a is b):
print 'a, b 有相同的标识'
else:
print 'a, b 有不同的标识'
if (a is not b):
print 'a, b 有不同的标识'
else:
print 'a, b 有相同的标识'
b = 30
if (a is b):
print 'a, b 有相同的标识'
else:
print 'a, b 有不同的标识'
if (a is not b):
print 'a, b 有不同的标识'
else:
... | [
"luningcowboy@gmail.com"
] | luningcowboy@gmail.com |
ec96395680b9454b0b1a4e15719186c299b15355 | 8c4e20343b8e901981f592ec420356dd5c7d3079 | /mapproxy/test/helper.py | f5a0d4b4bf35d159e0f2df7121873abfa94f876c | [
"BSD-3-Clause",
"Python-2.0",
"Bitstream-Vera",
"MIT",
"ZPL-2.1",
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] | permissive | jukkatolonen/mapproxy | 94337ee44b7b47d11d717bcb9d36969d8cb03ce1 | e4ad1972858dfbb72d8686c5b59751b4b781fc35 | refs/heads/master | 2021-02-10T04:00:13.079893 | 2020-03-05T15:18:16 | 2020-03-05T15:18:16 | 244,350,181 | 0 | 1 | NOASSERTION | 2020-03-03T13:48:35 | 2020-03-02T11:07:43 | null | UTF-8 | Python | false | false | 7,623 | py | # This file is part of the MapProxy project.
# Copyright (C) 2010 Omniscale <http://omniscale.de>
#
# 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... | [
"olt@bogosoft.com"
] | olt@bogosoft.com |
8fbe0b915a4895d240f0b8f9a530e338488a7fde | be7cdd0c8e55a8fec0d1b226c2ea1664f28636a5 | /steps/step39.py | 1f3824de4816a17de355a3d6b1cfa5e9647f3311 | [
"MIT"
] | permissive | peaceiris/deep-learning-from-scratch-3 | 8274ba7735dc36a86305bfe3db683423aff2095e | 6f05c642cb6d1ee1f25f5b3ed538f1d1d19a4a08 | refs/heads/master | 2021-03-25T02:19:09.161809 | 2020-03-13T02:16:18 | 2020-03-13T02:16:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 564 | py | import os, sys;
if '__file__' in globals():
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import numpy as np
from dezero import Variable
import dezero.functions as F
x = Variable(np.array([1, 2, 3, 4, 5, 6]))
y = F.sum(x)
y.backward()
print(y)
print(x.grad)
x = Variable(np.array([[1, 2, 3], [4, 5... | [
"koki0702@gmail.com"
] | koki0702@gmail.com |
e67818904e5a156fb0c9b8bb42a92efd60ef479d | 0421da0c3ba42e4758cb4da4679f3218d4ea733d | /setup_cython.py | 4a9d2d872ad922a9379f7f8eecc98ad916038591 | [] | no_license | vanife/Mandelbrot_pyCUDA_Cython_Numpy | f252a6773791414468859a77e8ed0d6bd1dc2586 | baa164a392078019dffc886981f0107ad3f0fca1 | refs/heads/master | 2021-01-18T01:54:56.383453 | 2010-10-29T16:54:44 | 2010-10-29T16:54:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 310 | py | from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
import numpy
ext = Extension("mandel", ["mandelbrot_cython.pyx"],
include_dirs = [numpy.get_include()])
setup(ext_modules=[ext],
cmdclass = {'build_ext': build_ext})
| [
"ian@ianozsvald.com"
] | ian@ianozsvald.com |
3b34f72942d5a210ed18059182dee423557a6d20 | c855bc4640a54630b62fafd89a20967606a8f14e | /breadth_first_search/200_number_of_islands.py | f01cf9ae63404df6a0a9aa9d380da3c0c64bdc5b | [
"MIT"
] | permissive | asethi-ds/Algorithm-Toolbox | 0d8f7e68ebce47810c7dd88df0bb6d911013e1d1 | b6c7b2228d8e70e0842e0bad607533a2c8322cf0 | refs/heads/master | 2021-01-02T15:44:06.833196 | 2019-08-31T11:32:11 | 2019-08-31T11:32:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,485 | py | class DU(object):
def __init__(self, n):
self.count = 0
self.parent = [-1] * n
self.rank = [0] * n
def isLand(self, idx):
return self.parent[idx] != -1
def setLand(self, idx):
self.parent[idx] = idx # initialize parent to itself
self.count += 1
def fin... | [
"shawlu@github.com"
] | shawlu@github.com |
cfa87a320b1aed769df2a85d3e917fa91cae9bdb | 6b70e48ddc38f58a142229bcfb5c4dc5553dfd4f | /tests/year2015/test_day05.py | 5cbb7ea5658d39adf0fabe78343051ab4404f93d | [] | no_license | N8Brooks/aoc_py | eaea98db5cdd1c795edae48a46f765e0628b53e8 | fab391ac33aa3c9623e8f5d2b9af44693c04bd00 | refs/heads/master | 2023-02-22T20:07:16.265316 | 2021-01-27T02:50:47 | 2021-01-27T02:50:47 | 326,284,848 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,240 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
https://adventofcode.com/2015/day/5
"""
from unittest import TestCase, main
from aoc.year2015.day05 import part1, part2
from data.utils import get_input
class TestPart1(TestCase):
def test_input(self):
self.assertEqual(part1(get_input(2015, 5)), 238)
... | [
"natebrooks004@gmail.com"
] | natebrooks004@gmail.com |
99017c4177c3a784d610e345e4fbeb33dcbb03b1 | 78980891d3137810bf3a3c1bb229966b7f49f0dd | /leetcode_projects/leetcode_79/main.py | 81c9df7e276c5deb6365ca9f25aa4e317a87f92d | [] | no_license | miniyk2012/leetcode | 204927d3aefc9746070c1bf13abde517c6c16dc0 | 91ca9cd0df3c88fc7ef3c829dacd4d13f6b71ab1 | refs/heads/master | 2021-06-17T21:50:31.001111 | 2021-03-10T11:36:23 | 2021-03-10T11:36:23 | 185,042,818 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,586 | py | from typing import List
class Solution:
def exist(self, board: List[List[str]], word: str) -> bool:
visited = [[False for _ in range(len(board[0]))] for _ in range(len(board))]
for i in range(len(board)):
for j in range(len(board[i])):
if self.dfs_visit(board, i, j, vis... | [
"yk_ecust_2007@163.com"
] | yk_ecust_2007@163.com |
93e98da2888ffdc5e81a842198548cdc41a1f8b7 | 5fe72bb13baf3649058ebe11aa86ad4fc56c69ed | /hard-gists/8555125/snippet.py | 2e295f5380a400a7b3a6254a9c0e1ce26a8c10c3 | [
"Apache-2.0"
] | permissive | dockerizeme/dockerizeme | 8825fed45ff0ce8fb1dbe34959237e8048900a29 | 408f3fa3d36542d8fc1236ba1cac804de6f14b0c | refs/heads/master | 2022-12-10T09:30:51.029846 | 2020-09-02T13:34:49 | 2020-09-02T13:34:49 | 144,501,661 | 24 | 20 | Apache-2.0 | 2022-11-21T12:34:29 | 2018-08-12T21:21:04 | Python | UTF-8 | Python | false | false | 799 | py | #!/usr/bin/env python
from gmusicapi import Musicmanager
from gmusicapi import Mobileclient
import sys
import os.path
params = sys.argv
if len(params) < 2:
print "usage:" + sys.argv[0] + " filename [playlist name]"
sys.exit()
file = params[1]
if len(params) == 3:
plname = params[2]
else:
plname = N... | [
"42325807+dockerizeme@users.noreply.github.com"
] | 42325807+dockerizeme@users.noreply.github.com |
9712d805806c5ebc08e5a784664f19fa245f635e | 0bc0db1edc610c9f08261c777d06cb1be4b7a524 | /lgp/pythonSpider/ch6_baseSpider/SpiderMan.py | 27fa7cea73087d54c1dc84ca5aae57aee0591090 | [] | no_license | danpianji/python3.7 | 9bc7f9a765ec76d7d4c5fb413dcdada4f9e8f510 | f66bc7139f9441583b1043d3da11597987e3fbc0 | refs/heads/master | 2020-12-28T14:49:41.410708 | 2019-05-19T10:13:32 | 2019-05-19T10:13:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,029 | py | # -*- coding: UTF-8 -*-
import DataOutput
import UrlManager
import HtmlDownloader
import HtmlParser
class SpiderMan:
def __init__(self):
self.manager=UrlManager.UrlManager()
self.downloader=HtmlDownloader.HtmlDownloader()
self.parser=HtmlParser.HtmlParser()
self.output=DataOutput.D... | [
"liguangpei1@163.com"
] | liguangpei1@163.com |
b477b6935dc4429c088f96e141aecd0facda38c5 | ffd14a5749fae8dbf6f284bf54d026fb9f3a79dd | /leetcode/problem407/problem407.py | 4f2cf2355186fac460a5149068b2c11555ddbf38 | [] | no_license | speciallan/algorithm | 2dc307b4bcc4ac0adda97a24059346028f71f412 | 306927b65320af9f3177d28a6367ea65ea9044d5 | refs/heads/master | 2020-04-15T21:55:39.874010 | 2019-07-22T14:05:38 | 2019-07-22T14:05:38 | 165,052,274 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,232 | py | def spe(*vars):
for var in vars:
print(var)
exit()
class Solution:
def trapRainWater(self, heightMap):
"""
:type heightMap: List[List[int]]
:rtype: int
"""
h, w = len(heightMap), len(heightMap[0])
i, j = 1, 1
while 1 <= i and i <= h-2:
... | [
"350394776@qq.com"
] | 350394776@qq.com |
55be60bcef1440bdbe2a556d4d6040d48a722fc2 | 9124e66c8ec04e61537473437a92b53daa32ce20 | /linares/app7.py | 96108d4cda6858d3f7e424b32b73af8cc2e1953d | [] | no_license | erick1984linares/t10_linares_rojas | 28618baccb3472fb8d48b34f5d1107b702c399d0 | ba9462b3b881dbd3665907a7a33c4c7d80aa4251 | refs/heads/master | 2020-12-04T06:38:06.929626 | 2020-01-10T11:52:29 | 2020-01-10T11:52:29 | 231,661,040 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 808 | py | import libreria
def agregartrabajo():
trabajo=libreria.pedir_trabajo("ingrese trabajo:")
sueldo=libreria.pedir_numero("ingrese sueldo :", 1500, 4000)
contenido=trabajo + "-" + str(sueldo) + "\n"
libreria.guardar_datos("info.txt", contenido, "a")
print("Datos guardados")
def verDatos():
datos ... | [
"ylinares@unprg.edu.pe"
] | ylinares@unprg.edu.pe |
c46b00db0d82519840cf3e18ea0069b174f42ca1 | 78f3fe4a148c86ce9b80411a3433a49ccfdc02dd | /2017/01/climate-anomaly-20170118/graphic_config.py | 239d3e7a57c82ad7aae3803427073bcdc9ec9e73 | [] | no_license | nprapps/graphics-archive | 54cfc4d4d670aca4d71839d70f23a8bf645c692f | fe92cd061730496cb95c9df8fa624505c3b291f8 | refs/heads/master | 2023-03-04T11:35:36.413216 | 2023-02-26T23:26:48 | 2023-02-26T23:26:48 | 22,472,848 | 16 | 7 | null | null | null | null | UTF-8 | Python | false | false | 305 | py | #!/usr/bin/env python
import base_filters
COPY_GOOGLE_DOC_KEY = '1Cnn0p5LpuF8chCzjUOVQcIO5NBvBpIoLLeDpbBMLP6M'
USE_ASSETS = False
# Use these variables to override the default cache timeouts for this graphic
# DEFAULT_MAX_AGE = 20
# ASSETS_MAX_AGE = 300
JINJA_FILTER_FUNCTIONS = base_filters.FILTERS
| [
"ahurt@npr.org"
] | ahurt@npr.org |
02fd6948ff472f910b32eda2c39cf98b58009ff4 | 8323f95ad0083bfe6da57b777a1af078a454bb04 | /ssm/version.py | 45b058b3d7179dad6109b590f93ac78881bb9e4d | [
"BSD-3-Clause"
] | permissive | sflis/SSM-analysis | 600c867b68845850e7af54d02dc4dd344b9f1427 | 317db8b296fd189832b9344b0429ea6016e35999 | refs/heads/master | 2020-04-19T10:19:28.810811 | 2020-01-23T15:41:36 | 2020-01-23T15:41:36 | 168,136,746 | 0 | 1 | BSD-3-Clause | 2019-09-27T09:00:48 | 2019-01-29T10:33:01 | Python | UTF-8 | Python | false | false | 5,922 | py | """
Get version identification from git.
The update_release_version() function writes the current version to the
VERSION file. This function should be called before packaging a release version.
Use the get_version() function to get the version string, including the latest
commit, from git.
If git is not available t... | [
"samuel.d.flis@gmail.com"
] | samuel.d.flis@gmail.com |
ee8830814c25c7b4ace1b95ca6d4dcb8eb422d37 | 43e303f0a00f7854b9405bb2a2a9ecbad18ae0fa | /venv/lib/python3.7/site-packages/py2app/recipes/sip.py | 0ab3cb8cbfafc9cbed42e2d549ba3adca0b3d981 | [
"MIT"
] | permissive | ykhade/Advent_Of_Code_2019 | f64005c6e8872c17468f00eac2b247b6fa77c7f5 | 375ab43104712c5e1c782e5ea5f04073b5f8916c | refs/heads/master | 2023-02-26T03:43:47.668384 | 2022-06-21T03:31:22 | 2022-06-21T03:31:22 | 224,943,590 | 1 | 1 | MIT | 2023-02-08T00:45:15 | 2019-11-30T01:27:48 | Python | UTF-8 | Python | false | false | 4,408 | py | """
Py2app support for project using sip, which basicly means PyQt and wrappers
for other Qt-based libraries.
This will include all C modules that might be used when you import a package
using sip because we have no way to fine-tune this.
The problem with SIP is that all inter-module depedencies (for example from
PyQ... | [
"ykhade@nevada.unr.edu"
] | ykhade@nevada.unr.edu |
09691989e4f1280519fda2aeb11c1288c5554678 | 4d89652acca24e0bc653e0b4cb5846ceb5b568e4 | /google-cloud-sdk/lib/surface/labelmanager/keys/create.py | 84f9e6cb8034b58c702180d29b613d537fa4faec | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | ibssasimon/LyricLingo | 410fcec94d2bd3ea75c975c55713f5b8fb913229 | 0dfc951b270912470b36ce0083afd9d4fe41b10a | refs/heads/master | 2021-06-25T10:00:18.215900 | 2020-01-09T00:35:46 | 2020-01-09T00:35:46 | 222,135,399 | 2 | 1 | null | 2021-04-30T20:54:14 | 2019-11-16T17:32:19 | Python | UTF-8 | Python | false | false | 2,418 | py | # -*- coding: utf-8 -*- #
# Copyright 2019 Google LLC. 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... | [
"ibssasimon@gmail.com"
] | ibssasimon@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.