blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 616 | 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 777
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 149
values | src_encoding stringclasses 26
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 3 10.2M | extension stringclasses 188
values | content stringlengths 3 10.2M | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
030481619ffa04cd87a5ff0f61597ae2248e6274 | 48a173f3522880739b95efabb5f8869e7036c504 | /ExpressionBuilder.py | d5a807a5a258cba66c952f1daf3974e506844c31 | [
"Apache-2.0"
] | permissive | QC99DennisWang/altanalyze | 095f22a7b7ea2130129e61bb6f5fa693b0572aa7 | 8ae24d5fe21989ba890508771101644f0a246c02 | refs/heads/master | 2021-03-19T07:44:09.412403 | 2017-04-20T20:39:44 | 2017-04-20T20:39:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 216,350 | py | ###ExpressionBuilder
#Copyright 2005-2008 J. David Gladstone Institutes, San Francisco California
#Author Nathan Salomonis - nsalomonis@gmail.com
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the ... | [
"nsalomonis@gmail.com"
] | nsalomonis@gmail.com |
dea0ba39768a7c8ede0d9bf90e3b3f51c7138806 | 9c50f57a9cb32b44e86a0cdcbf61ead34754b085 | /杂物间/python基础/day06/作业九.py | 0b2ba089221b23677327707278422873cfa7b562 | [] | no_license | a1403893559/rg201python | c3f115011981393c86a0150e5281096651712ad4 | 448f04c86e4c7fd30e3a2a4f9121b934ae1d49be | refs/heads/master | 2020-03-15T23:32:17.723403 | 2018-03-18T12:59:43 | 2018-03-18T12:59:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 206 | py | # 题目要求是 使用字典 存储熟人信息 其实呢 就是名片
shu_ren = {'name':'李文浩','age':'18','city':'山西煤窑'}
for key,value in shu_ren.items():
print('%s:%s'%(key,value))
| [
"wengwenyu@aliyun.com"
] | wengwenyu@aliyun.com |
377cdbfbe4bc9e17cc34e3664bff5057689407cd | 4ae7cdc9292009398a292bdf6bee61428559fdfd | /SourceCodeTools/code/data/sourcetrail/nodes_of_interest_from_dataset.py | d9e69bccbc79dc112cfbe4294211e25a29fc1878 | [] | no_license | VitalyRomanov/method-embedding | 52a4e6e7bf726b4db0872902a0eaf1d8cb82b4a8 | 1c8f0fc04eb1f495555272d9747fd2fea68525e1 | refs/heads/master | 2023-08-31T17:39:04.051912 | 2023-01-08T05:02:52 | 2023-01-08T05:02:52 | 219,153,628 | 5 | 7 | null | 2023-07-22T20:27:20 | 2019-11-02T12:54:12 | Python | UTF-8 | Python | false | false | 707 | py | import json
def get_node_ids_from_dataset(dataset_path):
node_ids = []
with open(dataset_path, "r") as dataset:
for line in dataset:
entry = json.loads(line)
for _, _, id_ in entry["replacements"]:
node_ids.append(int(id_))
return node_ids
def main():
... | [
"mortiv16@gmail.com"
] | mortiv16@gmail.com |
7351ff746480493141320d2010c33f6f1d6936d8 | 61b9e597f0bd27ee7ec86188b7e10518ee30425c | /tests/run_cache_experiments.py | cc4d49b11eb3b1381b7a355b51f7b474a639d114 | [] | no_license | sirrice/dbwipes_src | eeb369d09ba28cb1ab3ffa70551c2b253dd39cb3 | 4d42b7d51af190b21679f38150f85dec1496d78c | refs/heads/master | 2021-01-21T12:36:22.888835 | 2014-04-23T20:53:16 | 2014-04-23T20:53:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,696 | py | import os
from sqlalchemy import *
from common import *
def print_clusters(sub, dim, clusters=[], tuples=[], title=''):
xattr = 'a_%d' % dim
yattr = 'a_%d' % (dim+1)
for cluster in clusters:
bbox = tuple(map(list, zip(*cluster.bbox)))
# we want bounds for attrs a_dim, a_dim+1, but bbox cols
# may no... | [
"sirrice@gmail.com"
] | sirrice@gmail.com |
44a318abdeab78a4e1fc6de40b655367ad1b4e90 | d30aba490a9527e7fc1f31e178b5f1c3067ae84d | /build/combined_robot_hw_tests/catkin_generated/pkg.develspace.context.pc.py | 13c2aeff20a5c6b70551c5306392f462066cbd7e | [] | no_license | weetinygit/tart | 130845b9c0e7b01d0a5a5177b056c85495e4e5cc | 339344cb9ef0561655f73f4609f340974113785a | refs/heads/master | 2021-09-13T07:38:39.706301 | 2018-04-26T21:18:19 | 2018-04-26T21:18:19 | 111,699,891 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 667 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/weety/tart5/src/roscontrol/src/ros_control/combined_robot_hw_tests/include".split(';') if "/home/weety/tart5/src/roscontrol/src/ros_control/combined_robot_hw_tests/include" != "" else []
PROJECT_... | [
"weetingyit36@gmail.com"
] | weetingyit36@gmail.com |
145d8b4115c4d955272564fad60a095f75f40fab | 4a4cc797f9a46a2c09075abfc2033c480eaa5486 | /mini-programs/week_2/lectures/lecture_1_logical_data_type, conditional_operator_and_cycles.py | 25f6b5cd500aa4069b3494dd7ee0525bd4c0d4d9 | [] | no_license | h1mik/python_programs | efa806eb9803c3e50aee845d5e0be9560d65f2be | 33e169ef33f70bc94cd535ecf44e852ae58c7a64 | refs/heads/main | 2023-02-04T14:45:04.855119 | 2020-12-26T09:25:22 | 2020-12-26T09:25:22 | 309,483,948 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 333 | py | # True and False |
# (==) - равно | (> ) - больше
# (!=) - не равно | (<=) - меньше равно
# (<) - меньше | (>=) - больше равно
# (and or) - бинарные | (not) - унарная
x = 4
y = 6
print(x < y)
st1 = "Books"
st2 = "Alpha"
print(not st1 > st2)
| [
"seigneur.h1mik@gmail.com"
] | seigneur.h1mik@gmail.com |
95591f4a5fbda649b1639552fefac75304660451 | 917a690cad8fece9102ba3191284f1ab83a8aeaf | /pypubmed/util/__init__.py | 19406ff5499cccc2d0e8abe969aa2ba74bd4aff0 | [
"MIT"
] | permissive | wisRen/pypubmed | 1751f429e38f4fd58d058584d36e7a4031c02660 | 6dd1b6ee7e8c7cf2a10885ed7662a4e2d16fa8e4 | refs/heads/master | 2023-06-21T05:10:47.579755 | 2021-08-11T06:01:05 | 2021-08-11T06:01:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 336 | py | import os
def safe_open(filename, mode='r'):
if 'w' in mode:
dirname = os.path.dirname(filename)
if dirname and not os.path.exists(dirname):
os.makedirs(dirname)
if filename.endswith('.gz'):
import gzip
return gzip.open(filename, mode=mode)
return open(filenam... | [
"suqingdong1114@gmail.com"
] | suqingdong1114@gmail.com |
d5017384859880726a5577c4f806d918eefbdd79 | d85163b314c220e88e99426ab4e10f031423aeb2 | /qc/outremont/districts/definition.py | 3c55d715faa90a28b9fc8ce3ea1aa64642c9bdbf | [] | no_license | opennorth-archive/represent-canada-data | dc3e98d4f24ce877ec2dfc9e40675e561912c45f | f1792a724f0a58d596e3376c71b6b3e64f7887b0 | refs/heads/master | 2021-01-22T05:10:00.952023 | 2014-04-04T19:51:40 | 2014-04-04T19:52:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 780 | py | # coding: utf-8
from datetime import date
import boundaries
boundaries.register(u'Outremont districts',
domain=u'Outremont, Montréal, QC',
last_updated=date(2013, 10, 16),
name_func=lambda f: re.sub(u'', u'—', f.get('NOM_DISTRI')), # control character, m-dash
authority=u'Ville de Montréal',
sour... | [
"james@slashpoundbang.com"
] | james@slashpoundbang.com |
e8cf91c8b80954559fa3dac1a1efd4984b760cfd | acb8e84e3b9c987fcab341f799f41d5a5ec4d587 | /langs/0/ff.py | b2e3773abd97fdc0bf3b121877f4920e49a23b1d | [] | no_license | G4te-Keep3r/HowdyHackers | 46bfad63eafe5ac515da363e1c75fa6f4b9bca32 | fb6d391aaecb60ab5c4650d4ae2ddd599fd85db2 | refs/heads/master | 2020-08-01T12:08:10.782018 | 2016-11-13T20:45:50 | 2016-11-13T20:45:50 | 73,624,224 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 485 | py | import sys
def printFunction(lineRemaining):
if lineRemaining[0] == '"' and lineRemaining[-1] == '"':
if len(lineRemaining) > 2:
#data to print
lineRemaining = lineRemaining[1:-1]
print ' '.join(lineRemaining)
else:
print
def main(fileName):
with open(fileName) as f:
for line in f:
... | [
"juliettaylorswift@gmail.com"
] | juliettaylorswift@gmail.com |
4245cd1c1914d5cde8d48f77bc3b37941ee4b174 | 0eb0cc67c11baec9caf82b61f161c091c7043364 | /api_book/wsgi.py | d6be60053dfb1ff1084624d501fbd456288cf37a | [] | no_license | juniorcarvalho/work-at-olist | dd648fceaed5e0f8b165ac1279cfb1ae1ccae0a5 | fc59143c8d295da50aa42b312aa28ce1202ec890 | refs/heads/master | 2022-07-17T23:54:29.071100 | 2020-05-19T22:40:11 | 2020-05-19T22:40:11 | 264,524,765 | 0 | 0 | null | 2020-05-16T20:49:54 | 2020-05-16T20:49:54 | null | UTF-8 | Python | false | false | 428 | py | """
WSGI config for api_book 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 dj_static import Cling
from django.core.wsgi import get_wsgi_application
os.env... | [
"joseadolfojr@gmail.com"
] | joseadolfojr@gmail.com |
dd071b116f01cd5df223b91b2af30535c163e630 | 7d17161a77ad04ea1de1dabe84619b6c4fffe2ad | /test/python/circuit/library/test_piecewise_chebyshev.py | 14660435d445ca3a3e2114e685177d21bf94b665 | [
"Apache-2.0"
] | permissive | annos-IBM/qiskit-terra | 5e3b93a089a6e00c9279bf82735d78b497e92023 | 78ece7ad9baba64395eea98c45fb83a30b04c835 | refs/heads/main | 2023-05-28T20:42:19.805833 | 2021-06-09T03:47:48 | 2021-06-09T03:47:48 | 375,329,407 | 1 | 0 | Apache-2.0 | 2021-06-09T11:22:14 | 2021-06-09T11:22:14 | null | UTF-8 | Python | false | false | 4,954 | py | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 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 derivat... | [
"noreply@github.com"
] | annos-IBM.noreply@github.com |
b9fdfca21b63d92c178c7c1277d346717e9cdced | 0fccee4c738449f5e0a8f52ea5acabf51db0e910 | /genfragments/ThirteenTeV/ADD/ADDmonoJet_MD_6_d_6_TuneCUETP8M1_13TeV_pythia8_cfi.py | 85a31581696b8c9fa838b33ac1ac34c210e6a0db | [] | no_license | cms-sw/genproductions | f308ffaf3586c19b29853db40e6d662e937940ff | dd3d3a3826343d4f75ec36b4662b6e9ff1f270f4 | refs/heads/master | 2023-08-30T17:26:02.581596 | 2023-08-29T14:53:43 | 2023-08-29T14:53:43 | 11,424,867 | 69 | 987 | null | 2023-09-14T12:41:28 | 2013-07-15T14:18:33 | Python | UTF-8 | Python | false | false | 1,923 | py | import FWCore.ParameterSet.Config as cms
from Configuration.Generator.Pythia8CommonSettings_cfi import *
from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import *
generator = cms.EDFilter("Pythia8GeneratorFilter",
pythiaPylistVerbosity = cms.untracked.int32(1),
filterEfficiency = cms.untracked.double(... | [
"ksung@cern.ch"
] | ksung@cern.ch |
a75ec1360ca1390fde1fe469602935530bd811b1 | f56cf80c0111a1317de73be229a943bdc18277ff | /SERVER/FETCHER/allcasereader.py | 07f05bd01af0b19ddf8878aa289af30596e6d649 | [] | no_license | EkiVox/SmartCopybookCase | 2f3939b00d534adef18ca4da3d01273c2f534f42 | 9af47aea814fc29ef4b2ee797a35f10d20a22d49 | refs/heads/master | 2020-03-07T18:50:56.454545 | 2018-12-07T17:32:31 | 2018-12-07T17:32:31 | 127,653,429 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 111 | py | import os
with open('ALL-NEW-IDS.list', 'r') as idsfile:
print idsfile.read()
os.remove('ALL-NEW-IDS.list') | [
"you@example.com"
] | you@example.com |
1e44a07d05b4c0f1a1b0769e052174d81815a74d | 466912406272829982f75854cf0104c6ce8c9814 | /data/spider2/crawler/news/huxiu_news.py | 5b912905b334e53e2d840ea03c67d087fd86fc6f | [] | no_license | logonmy/Codes | 9631fa103fc499663361fa7eeccd7cedb9bb08e4 | 92723efdeccfc193f9ee5d0ab77203c254f34bc2 | refs/heads/master | 2021-09-21T18:07:22.985184 | 2018-08-30T05:53:26 | 2018-08-30T05:53:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,416 | py | # -*- coding: utf-8 -*-
import os, sys, datetime, re, json, time
from lxml import html
from pyquery import PyQuery as pq
reload(sys)
sys.setdefaultencoding("utf-8")
sys.path.append(os.path.join(os.path.split(os.path.realpath(__file__))[0], '..'))
import BaseCrawler
sys.path.append(os.path.join(os.path.split(os.path.... | [
"hush_guo@163.com"
] | hush_guo@163.com |
7b45add26ddf9df79e85d7c7e09bc534253dae7d | a8139ccd50a27861d3c5a4168fd0e4b351c0a514 | /material/code/advanced_oop_and_python_topics/4_ManagedAttributeDemo/test.py | 9e8897b3d4a283a1395d9d8c0fe56f8a27ae63ef | [] | no_license | shambhand/pythontraining | a124aa1485c3ce0e589fc2cd93c1e991746432e4 | 24dd923e2b2c07c70500775e3665e2a527240329 | refs/heads/master | 2021-05-17T22:54:45.331127 | 2019-01-11T03:12:59 | 2019-01-11T03:12:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,433 | py | class Person:
def __init__(self, name):
self._name = name
@property # name = property(name)
def name(self):
"name property docs"
print('fetch...')
return self._name
@name.setter # name = name.setter(name)
def name(self, value):
print('change...')
self._name = value
@name.deleter # na... | [
"amit2766@gmail.com"
] | amit2766@gmail.com |
6589281398355c7fc10996ec4525e0d770330e54 | db57094349de63766daf70a2e6bdb06bf3af09cf | /Cap05_Tkinter/34_images.py | 75d83162c1ff336bb175ae05bd17c0c8d302ff12 | [] | no_license | frclasso/turma1_Python_Modulo2_2019 | 2f9e9aebc48c1c0b92b684ad92958bc557866cde | 0b7f0fac0a1de4a2dbe4ff4fb2985fbfee89ed33 | refs/heads/master | 2020-04-17T19:36:07.545787 | 2019-06-10T15:29:10 | 2019-06-10T15:29:10 | 166,871,517 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 310 | py |
from tkinter import *
from PIL import Image
from PIL import ImageTk
window = Tk()
window.title("Images and incons")
icon = Image.open('python_logo.png')
icon = icon.resize((300,200), Image.ANTIALIAS)
photoImg = ImageTk.PhotoImage(icon)
Label(window, image=photoImg).grid(row= 0, column=0)
window.mainloop() | [
"frcalsso@yahoo.com.br"
] | frcalsso@yahoo.com.br |
e7b77d6e6a2582abf034379240a03cf715d36e43 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2950/60632/240945.py | 5249f2541bece3d84fdfdc430e8fde133e238884 | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 58 | py | s = input()
if s.count('2') != x.count('5'):
print(-1) | [
"1069583789@qq.com"
] | 1069583789@qq.com |
5878e977598eb5846f58ee444eb02ccef892e5d7 | 06cabd66791a5ee15bb3ba4b04d8bc8dea5bfda0 | /Python modules/MakePdf_old.py | 8203bd500d8b65d5bac2e798af6e0af5f18b62bc | [] | no_license | claiello/python_data_analysis | f7405dfd15f0dccd2089b1878af40b9d075071d2 | 0b8d3cc5717243e72214dc24a7fc823220e13179 | refs/heads/master | 2020-04-17T20:36:51.720891 | 2017-04-23T10:00:08 | 2017-04-23T10:00:08 | 66,181,455 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 829 | py | # test
from matplotlib.backends.backend_pdf import PdfPages
import matplotlib.pyplot as plt
def multipage(filename, figs=None, dpi=200):
pp = PdfPages(filename)
if figs is None:
figs = [plt.figure(n) for n in plt.get_fignums()]
for fig in figs:
#fig.set_size_inches(1000./fig.dpi,600./fig.dp... | [
"claiello@gmail.com"
] | claiello@gmail.com |
6d84e48bc8c4382eb95096d38f8ad9fcc2138698 | c615384fbf8b10ce3cdefc008509454460def72f | /Topics/Integer arithmetic (1)/Calculate it/main.py | 1a67cc55ecf79fed40206b72536f3ffc83392922 | [] | no_license | ivanelisandro/PythonStudiesJobAgency | 07e1981601c5314dc48239cc220db9849468b946 | 28f6ff4d1fc2592f4dd740e3aa68af0bac105f5d | refs/heads/main | 2023-08-25T19:32:10.306188 | 2021-10-22T01:34:21 | 2021-10-22T01:34:21 | 391,798,794 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 40 | py | print((1234567890 * 987654321) + 67890)
| [
"ivan.elisandro@gmail.com"
] | ivan.elisandro@gmail.com |
5490923cd851a1f6025d71a2c24cadd7013227ab | 28be2173e5590cc5b03119e9b83c57980e6a7e8a | /learnwithpeople/wsgi.py | 70d79666fb99a92372c78e6ca89fa8357aaf18ee | [
"MIT"
] | permissive | EdgarOrnelas/learning-circles | cd164f123885ed2079b34ad394c9849b370563b9 | 293c849321d735aebbdcb6c65b7c92f751f9fd89 | refs/heads/master | 2021-01-21T20:56:35.429589 | 2017-06-16T09:20:46 | 2017-06-16T09:20:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 441 | py | """
WSGI config for learnwithpeople 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/1.7/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "learnwithpeople.settings")
fr... | [
"dirkcuys@gmail.com"
] | dirkcuys@gmail.com |
5646965b46d4371cc23d562b9c531b6bc8162ca7 | a9fb692b89e1ea2cdadcb322c41c1513bb24e9c2 | /src/climtas/profile.py | 8e4f91f622d41d7f21465e048cc1126d10fbcf1b | [
"Apache-2.0"
] | permissive | ScottWales/climtas | a10039598093030391b339cceb2efc83912f198d | 68ddf31a0ce0f7ceb0a0d3ca6156e07efe42d6ec | refs/heads/master | 2022-09-15T02:44:22.059027 | 2022-08-26T05:26:43 | 2022-08-26T05:26:43 | 228,983,033 | 5 | 3 | null | 2022-08-26T05:26:44 | 2019-12-19T05:39:44 | Jupyter Notebook | UTF-8 | Python | false | false | 11,029 | py | #!/g/data/hh5/public/apps/nci_scripts/python-analysis3
# Copyright 2020 Scott Wales
# author: Scott Wales <scott.wales@unimelb.edu.au>
#
# 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
#
# ... | [
"scott.wales@unimelb.edu.au"
] | scott.wales@unimelb.edu.au |
fd762726f5e677c8313ab0c32b7230cce74d9b04 | 2b4790d77439d89ad27bdd04bac539283f0dd605 | /basic_ex/11-module.py | f30ced73ca20173a9af871afa196d9b7e56f467c | [] | no_license | ajioy/python-ex | 9fde4bcfe35edeee5050365660a03bdb6b913da1 | 982a3cdf0de0e140faa4cb539f2961b311de2c2a | refs/heads/master | 2020-04-05T14:06:09.909935 | 2018-08-14T14:43:55 | 2018-08-14T14:43:55 | 59,105,033 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 244 | py | # -*- coding:utf-8 -*-
import sys
def test():
args = sys.argv
if len(args) == 1:
print 'Hello, world'
elif len(args) == 2:
print 'Hello, %s' % args[1]
else:
print 'Too many arguments!'
if __name__ == '__main__':
test()
| [
"ajioy@hotmail.com"
] | ajioy@hotmail.com |
ae2480bc43eb4a6ec86d8e0eb354a44122b0262d | 67ecd129777da89dfaa04a5803f0345e1248f8ba | /nmigen/hdl/ast.py | cadf9600c6d5cc62c295a53f911a9a19f87a4d58 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause"
] | permissive | sjolsen/nmigen | f866bc27896d94da75a53d5c579b6eba06be78c9 | 0e40dc0a2d336945dfe0669207fe160cafff50dc | refs/heads/master | 2021-03-22T21:57:44.362165 | 2020-04-07T11:17:14 | 2020-04-08T14:08:35 | 247,401,219 | 0 | 0 | NOASSERTION | 2020-03-15T04:28:48 | 2020-03-15T04:28:48 | null | UTF-8 | Python | false | false | 55,889 | py | from abc import ABCMeta, abstractmethod
import traceback
import warnings
import typing
from collections import OrderedDict
from collections.abc import Iterable, MutableMapping, MutableSet, MutableSequence
from enum import Enum
from .. import tracer
from .._utils import *
from .._unused import *
__all__ = [
"Shap... | [
"whitequark@whitequark.org"
] | whitequark@whitequark.org |
c1060ead727b0ede86f928cc668a97b2d4ad13c8 | b6ab5a3ff4402ed085557cd5ff354ab2ead6e6f8 | /leet_code/rotten_oranges.py | 3f761e12152d708fc5ec530ac701836bb1ed4be6 | [] | no_license | sahiljajodia01/Competitive-Programming | e51587110640663aa32f220feddf6ab10f17c445 | 7ae9b45654aff513bceb0fc058a67ca49273a369 | refs/heads/master | 2021-07-17T08:23:24.143156 | 2020-06-05T11:34:14 | 2020-06-05T11:34:14 | 163,054,750 | 0 | 1 | null | 2019-10-31T05:36:35 | 2018-12-25T06:48:39 | C++ | UTF-8 | Python | false | false | 1,385 | py | # https://leetcode.com/problems/rotting-oranges/
####### Straightforward BFS solution ##########
class Solution:
def orangesRotting(self, grid: List[List[int]]) -> int:
q = []
for i in range(len(grid)):
for j in range(len(grid[0])):
if grid[i][j] == 2:
... | [
"sahil.jajodia@gmail.com"
] | sahil.jajodia@gmail.com |
6f89b5f827a55c4d0a84b8ab0580245c093ab1d8 | acb14262588fb356efb3d1bf3aab8634e43f1a4f | /app/recipe/tests/test_tag_api.py | 9ecdb111ed9fe55141cc540e61cd2ba1bb1d3d2c | [
"MIT"
] | permissive | Gilles00/recipe-app-api | 6d37157e4e0081ba152ccca740fdd13ad03d3aaf | 2ea0de068db0dcc500d54164739184ace1a29a7b | refs/heads/master | 2022-03-05T18:00:13.893911 | 2019-11-26T11:56:05 | 2019-11-26T11:56:05 | 259,035,229 | 1 | 0 | MIT | 2020-04-26T13:18:13 | 2020-04-26T13:18:12 | null | UTF-8 | Python | false | false | 3,126 | py | from django.contrib.auth import get_user_model
from django.urls import reverse
from django.test import TestCase
from rest_framework import status
from rest_framework.test import APIClient
from core.models import Tag, Recipe
from recipe.serializers import TagSerializer
TAGS_URL = reverse("recipe:tag-list")
class P... | [
"ahmed@shahwan.me"
] | ahmed@shahwan.me |
9b2c3283708ae762deba2107258c8ec473d5a3cd | 4f2f046ba81f07be7fcb0649a7d7ce55fcd9e98f | /tests/tests.py | 5547f7a7f98b5d28140501f313b6b6305c838e56 | [] | no_license | konradkrasno/db_helper_manager | 3a4b1ceca70953938ac348b855da82bf3bfe9eb0 | 273f5146437784684d069a209b98eb6d71d4756f | refs/heads/master | 2023-04-21T14:57:33.434170 | 2021-05-09T18:52:01 | 2021-05-09T18:52:01 | 365,552,814 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,523 | py | import unittest
from typing import Dict
from unittest import TestCase
from unittest.mock import patch, call
from db_helper_manager.db_manager import DBManager
from db_helper_manager.exceptions import ApiError
from db_helper_manager.rates import Rate
class Fixture(TestCase):
@staticmethod
def db_config() -> D... | [
"konradkrasno@gmail.com"
] | konradkrasno@gmail.com |
0f7bf9ae5f1cdcff88b17c9469e88632bb26be4e | a66fd9c13d2705c1603fb10909ee9074659a1055 | /03_DNN_Mnist_fashion_keras.py | c0a6cdfbd29ac3338e5ef1a6397a646da341b9f2 | [] | no_license | lhs7091/pythonTensor2 | feaf609402b2e2cc7c02ec00704a1430e309ef8a | 0c5e7165c1e2b1e99b68ab932f811facf2b01043 | refs/heads/master | 2021-02-27T03:09:47.524839 | 2020-03-08T07:00:05 | 2020-03-08T07:00:05 | 245,572,642 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,798 | py | from tensorflow.keras.datasets import fashion_mnist
from tensorflow.keras.utils import to_categorical
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense
from tensorflow_core.python.keras.layers import Flatten
import matplotlib.pyplot as plt
import numpy as np
import random
(X_trai... | [
"lhs7091@naver.com"
] | lhs7091@naver.com |
5d5b705d1c703cf8488a9563e05ea926887c8877 | e3365bc8fa7da2753c248c2b8a5c5e16aef84d9f | /indices/peloponnesu.py | 6fbbdafbe76f4be8b8f9caacd5b6311dc135d866 | [] | no_license | psdh/WhatsintheVector | e8aabacc054a88b4cb25303548980af9a10c12a8 | a24168d068d9c69dc7a0fd13f606c080ae82e2a6 | refs/heads/master | 2021-01-25T10:34:22.651619 | 2015-09-23T11:54:06 | 2015-09-23T11:54:06 | 42,749,205 | 2 | 3 | null | 2015-09-23T11:54:07 | 2015-09-18T22:06:38 | Python | UTF-8 | Python | false | false | 64 | py | ii = [('SadlMLP.py', 4), ('LeakWTI2.py', 6), ('LeakWTI3.py', 9)] | [
"prabhjyotsingh95@gmail.com"
] | prabhjyotsingh95@gmail.com |
5057caf33a6154adae0ac28b4e9273bbacfadc58 | 5c023a6597cef23ab841b33179ee8a3f0750b0a3 | /tensorflow_asr/featurizers/text_featurizers.py | c175a09a54f886b3a45f8196e417f9c0fb924991 | [
"Apache-2.0"
] | permissive | dathudeptrai/TensorFlowASR | 43a55850ad62f5a51b6587ef54df73a0e0109ca7 | 72cd5d2b932d66ddd61e79ab41bb0d64cb8c4919 | refs/heads/main | 2022-12-29T01:12:44.175317 | 2020-10-18T11:57:05 | 2020-10-18T11:57:05 | 305,675,364 | 1 | 0 | Apache-2.0 | 2020-10-20T10:42:47 | 2020-10-20T10:42:47 | null | UTF-8 | Python | false | false | 10,599 | py | # Copyright 2020 Huy Le Nguyen (@usimarit)
#
# 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 t... | [
"nlhuy.cs.16@gmail.com"
] | nlhuy.cs.16@gmail.com |
a57d0177aa141a526240c03377d48e29c1188e8c | 4674b8088ffdf55905d44995f08a0792a3e4cd5c | /tests/hwsim/test_wmediumd.py | d07d5aca2a89ec1860b5a21adaef3d5fef7ab879 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | vanhoefm/krackattacks-scripts | 41daca791638a92aa4cfa68a582e46119037560e | 4b78669686f74efe664c6543b1b5b1616b22f902 | refs/heads/research | 2022-10-29T20:21:11.512335 | 2022-10-16T18:44:41 | 2022-10-16T18:44:41 | 107,408,514 | 2,184 | 577 | NOASSERTION | 2021-07-06T12:43:49 | 2017-10-18T12:58:08 | C | UTF-8 | Python | false | false | 16,000 | py | # wmediumd sanity checks
# Copyright (c) 2015, Intel Deutschland GmbH
#
# This software may be distributed under the terms of the BSD license.
# See README for more details.
import tempfile, os, subprocess, errno, hwsim_utils, time
from utils import HwsimSkip
from wpasupplicant import WpaSupplicant
from tshark import ... | [
"j@w1.fi"
] | j@w1.fi |
f3c08e3555be0e41eba665d9209acaa6a5e26fc8 | 428328eaaf4011aac9e8cc4aba9329c17fcca4fa | /tests/snippets/chips:newdeco.py | 1cb44b66734e36aeda5fdec18968c77e8f5d508a | [
"MIT"
] | permissive | mfkiwl/jurigged | 8d732bdf09d43c633241d252228596e39af232e7 | 34459a5fd3300447ecbc1f943a9939d350639083 | refs/heads/master | 2023-09-03T22:15:44.480398 | 2021-11-11T15:24:48 | 2021-11-11T15:24:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 83 | py |
def crunch(fn):
def deco(*args):
return fn(*args) + 2
return deco
| [
"breuleux@gmail.com"
] | breuleux@gmail.com |
ebb32f52c472bcc16a1678079beff87a7a0bae7c | 4b3883b1591987c6fbcddab7fd2e15d7b7243861 | /books/effectivepy-v2/chap7/ad52/encrypt_data.py | 9c4eeb95ad2d0770adbea5f23a8c6f6674edb294 | [
"MIT"
] | permissive | MerleLiuKun/my-python | 41bdbf6e05281728a824e04da043902dc0fd4698 | 0bec138cc6a9870ca47e0e62e9b92d50fb6cb3d8 | refs/heads/master | 2021-06-11T10:22:44.948418 | 2021-06-02T13:08:18 | 2021-06-02T13:08:18 | 160,791,142 | 1 | 1 | MIT | 2020-05-19T15:10:00 | 2018-12-07T07:58:29 | Python | UTF-8 | Python | false | false | 1,231 | py | """
"""
import os
import subprocess
def run_encrypt(data):
env = os.environ.copy()
env["password"] = "zf7ShyBhZOraQDdE/FiZpm/m/8f9X+M1"
proc = subprocess.Popen(
["openssl", "enc", "-des3", "-pass", "env:password"],
env=env,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
... | [
"merle.liukun@gmail.com"
] | merle.liukun@gmail.com |
aaf296fd3b0614fc9cefe51e775d229b510d5319 | cf152c053f2cedf819b81c1a746db87e07fe5ded | /DL/day5_buy_apple.py | 8e98900ac8a85f86c337ee4b50fefe7e84907b89 | [] | no_license | aorura/tensorProject | db684e0b4aa46d9d4afd1c4b9f5bed8aa99a4c06 | 014db9a8ae8c76299c99f77dafb401cf2e86a3cc | refs/heads/master | 2020-03-08T02:18:56.227130 | 2018-04-06T07:48:41 | 2018-04-06T07:48:41 | 127,855,918 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 469 | py | from day5_layer_naive import *
apple=100
apple_num=2
tax=1.1
mul_apple_layer=MultiLayer()
mul_tax_layer=MultiLayer()
#forward
apple_price=mul_apple_layer.forward(apple, apple_num)
price=mul_tax_layer.forward(apple_price, tax)
#backward
dprice=1
dapple_price, dtax=mul_tax_layer.backward(dprice)
dapple, dapple_num=mu... | [
"hyponus@gmail.com"
] | hyponus@gmail.com |
a261e211d5e2370478f6596bbdebbf0796e8ac1e | 725ac5a0bf72829be627bf8dc82fdc51ba0f94ae | /Text_Generation/GPT2_SummaryGen/transformers/tokenization_albert.py | aca0467d085b7801616e74d05a72e5647ffc3490 | [] | no_license | shawroad/NLP_pytorch_project | fa14b6e4a156229765e1d552901d0492d8e1def3 | 1272fed2dc8fef78a9ded0f1ae1644d613a3b57b | refs/heads/master | 2023-06-25T02:37:35.503251 | 2023-06-12T10:57:11 | 2023-06-12T10:57:11 | 229,694,655 | 530 | 104 | null | 2020-12-08T09:21:47 | 2019-12-23T06:54:29 | Python | UTF-8 | Python | false | false | 10,191 | py | # coding=utf-8
# Copyright 2018 Google AI, Google Brain and the HuggingFace Inc. team.
#
# 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.... | [
"shawroad@MacBook-ProTCL.local"
] | shawroad@MacBook-ProTCL.local |
453723dc7712c3b5489ebdf23891d325b1e539bd | 5864e86954a221d52d4fa83a607c71bacf201c5a | /cherrypy/wsgiserver/ssl_builtin.py | 3366c31bd7cd1a1aab714c33fc208694974566ad | [] | no_license | connoryang/1v1dec | e9a2303a01e5a26bf14159112b112be81a6560fd | 404f2cebf13b311e754d45206008918881496370 | refs/heads/master | 2021-05-04T02:34:59.627529 | 2016-10-19T08:56:26 | 2016-10-19T08:56:26 | 71,334,417 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,563 | py | #Embedded file name: e:\jenkins\workspace\client_SERENITY\branches\release\SERENITY\carbon\common\lib\cherrypy\wsgiserver\ssl_builtin.py
try:
import ssl
except ImportError:
ssl = None
from cherrypy import wsgiserver
class BuiltinSSLAdapter(wsgiserver.SSLAdapter):
certificate = None
private_key = None
... | [
"le02005@163.com"
] | le02005@163.com |
1776ab7f61cbb93d36038bca3bd7e5da8f95f1e4 | 9e36b3a0a609f862aa2894a1473896c8465c41a1 | /arelle/DialogOpenTaxonomyPackage.py | 0668077126553bbf9d035a6cfe3ce7daedf03840 | [
"Apache-2.0"
] | permissive | marado/Arelle | 7cd74a66d19be174c9f1fe66f788dd53447bffac | 7ca2bf09c852787cd7a38d68b13c11d5e33e72a2 | refs/heads/master | 2020-04-08T00:27:54.212337 | 2011-10-28T17:49:49 | 2011-10-28T17:49:49 | 2,658,979 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,313 | py | '''
Open Taxonomy Package Dialog: Reads the metadata and prompts the user to pick an entry point.
'''
from tkinter import *
from tkinter.ttk import *
import re, os
from arelle.CntlrWinTooltip import ToolTip
TAXONOMY_PACKAGE_FILE_NAME = '.taxonomyPackage.xml'
ARCHIVE = 1
DISCLOSURE_SYSTEM = 2
def askForEntryPoint(ma... | [
"fischer@markv.com"
] | fischer@markv.com |
c16203a4ae9e23eee50178108cef12cff2782847 | facb8b9155a569b09ba66aefc22564a5bf9cd319 | /wp2/merra_scripts/03_model_fitting/merra882/567-tideGauge.py | b9b17c856c072ef1398bd25f5d67edcae774eb05 | [] | no_license | moinabyssinia/modeling-global-storm-surges | 13e69faa8f45a1244a964c5de4e2a5a6c95b2128 | 6e385b2a5f0867df8ceabd155e17ba876779c1bd | refs/heads/master | 2023-06-09T00:40:39.319465 | 2021-06-25T21:00:44 | 2021-06-25T21:00:44 | 229,080,191 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,041 | py | # -*- coding: utf-8 -*-
"""
Created on Mon May 4 15:51:30 2020
This program is designed to validate a multiple
linear regression model by using the KFOLD method
@author: Michael Tadesse
"""
import os
import numpy as np
import pandas as pd
from sklearn import metrics
from scipy import stats
from datetime import date... | [
"michaelg.tadesse@gmail.com"
] | michaelg.tadesse@gmail.com |
fae82bef91113802e227bc3262962a8552bb2235 | 1e1c85d0d74bc1b111e77f082cd24c94219d7eb0 | /VE-Tests/tests/KSTB/android/e2e_tests/__init__.py | 007625507185402dd51a842facefeefb7c36e1c3 | [] | no_license | anshsaikia/GSSDeliverables-YesProject | b6f5e4de8d853ce21dfe7401c4b9179c40f32a89 | ed786ccfd7b8c344802c7ff6d0cfd4afbffe015e | refs/heads/master | 2020-04-06T04:07:49.034461 | 2017-02-24T13:39:48 | 2017-02-24T13:39:48 | 83,044,504 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 24 | py | __author__ = 'tchevall'
| [
"anshuman.saikia@lnttechservices.com"
] | anshuman.saikia@lnttechservices.com |
aa92cd5b6a1e281f0e443f81d8e6a51fb80d2c9d | a89c80dac438747db4dd60e5f9d35c33d9c231bc | /bootstrap/legacy/container_0/term.py | e44003b63ae8b5c2e4b9c89b9f1c160e69d7eefa | [
"MIT"
] | permissive | Trixter9994/lazero | 09cd13e889421d6567b54aeb5142a7a937b1f35f | 5a2b7f7499fb11e71885defab130dead7864b9fd | refs/heads/master | 2022-12-17T08:40:14.533371 | 2020-09-22T03:12:04 | 2020-09-22T03:12:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,377 | py | from gi.repository import Gtk, Vte, GLib, Pango, Gio
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('Vte', '2.91')
# if you really want to, use java instead to do terminal emulation.
# no fucking horrible shits, please?
# either replace it or use it.
class TheWindow(Gtk.Window):
def __init__(self):
... | [
"root@localhost.localdomain"
] | root@localhost.localdomain |
0bc916255bfd134ba21182595402124b86032802 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_flimflam.py | e214907d239173c947b6d0e4fe3c7014e4c32002 | [
"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 | 330 | py |
#calss header
class _FLIMFLAM():
def __init__(self,):
self.name = "FLIMFLAM"
self.definitions = [u'talk that is confusing and intended to deceive']
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.specie = 'nouns'
def run(self, obj1 = [], obj2 = []):
return self... | [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
2040a05f18652b0a19ade2c74ef5fe69dd3abe92 | e99d2630e6acd8d2496c77c8ee215f9d82a610b8 | /tests/test_bazel_workspace.py | 39b7e0e615eae59d9777ea9d20496be15527d46a | [
"Apache-2.0"
] | permissive | useblocks/sphinx-bazel | 0acbbc13331356a871e5a75ebadee2b2158c4df7 | 38f5403393eb08f651100b21648efe2af6b4b047 | refs/heads/master | 2021-08-22T22:31:20.339073 | 2021-06-18T04:53:57 | 2021-06-18T04:53:57 | 171,243,259 | 11 | 4 | Apache-2.0 | 2021-06-18T04:53:58 | 2019-02-18T08:23:47 | Python | UTF-8 | Python | false | false | 426 | py | try:
from pathlib import Path
except ImportError:
from pathlib2 import Path
from sphinx_testing import with_app
@with_app(buildername='html', srcdir='doc_test/bazel_workspace') # , warningiserror=True)
def test_bazel_workspace(app, status, warning):
app.build()
html = Path(app.outdir, 'index.html').... | [
"daniel.woste@useblocks.com"
] | daniel.woste@useblocks.com |
21d83e44ad8d952e8947a946bf94f29b3f270b16 | de4d88db6ea32d20020c169f734edd4b95c3092d | /aiotdlib/api/types/basic_group.py | b64635412e5b8db8ca6213e66e871468534ccc6b | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | thiagosm/aiotdlib | 5cc790a5645f7e4cc61bbd0791433ed182d69062 | 4528fcfca7c5c69b54a878ce6ce60e934a2dcc73 | refs/heads/main | 2023-08-15T05:16:28.436803 | 2021-10-18T20:41:27 | 2021-10-18T20:41:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,529 | py | # =============================================================================== #
# #
# This file has been generated automatically!! Do not change this manually! #
# ... | [
"pylakey@protonmail.com"
] | pylakey@protonmail.com |
2bf06aaed7534278af8791becf25639426bcc480 | cf5f24e5a32f8cafe90d4253d727b1c0457da6a4 | /algorithm/boj_16985.py | a3f12c8374c713064a9eea0eb995f12079fa3a68 | [] | no_license | seoljeongwoo/learn | 537659ca942875f6846646c2e21e1e9f2e5b811e | 5b423e475c8f2bc47cb6dee09b8961d83ab08568 | refs/heads/main | 2023-05-04T18:07:27.592058 | 2021-05-05T17:32:50 | 2021-05-05T17:32:50 | 324,725,000 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,164 | py | import sys
from itertools import permutations
from collections import deque
input =sys.stdin.readline
ret = int(1e9)
def range_check(x,y,z):
return 0<=x<5 and 0<=y<5 and 0<=z<5
def rotate(temp, h):
new_temp = [ [ 0 for i in range(5)] for j in range(5)]
for i in range(5):
for j in range(5):
... | [
"noreply@github.com"
] | seoljeongwoo.noreply@github.com |
c962789a0d7a79b73036d4123cbdfae8ad0b8b3e | bfe6c95fa8a2aae3c3998bd59555583fed72900a | /reachNumber.py | c529cd721779f2e52f7d23adbc52206920abdac0 | [] | no_license | zzz136454872/leetcode | f9534016388a1ba010599f4771c08a55748694b2 | b5ea6c21bff317884bdb3d7e873aa159b8c30215 | refs/heads/master | 2023-09-01T17:26:57.624117 | 2023-08-29T03:18:56 | 2023-08-29T03:18:56 | 240,464,565 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 386 | py | class Solution:
def reachNumber(self, target: int) -> int:
k = 0
s = 0
target = abs(target)
while s < target:
k += 1
s += k
d = s - target
if d % 2 == 0:
return k
k += 1
if (k - d) % 2 != 0:
k += 1
... | [
"zzz136454872@163.com"
] | zzz136454872@163.com |
5e24b2565a618ba55d6cd3076b1e53d6d810773b | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02615/s526468670.py | 459df95840e8558c1521ce47d258b9055f356cf3 | [] | 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 | 161 | py | n = int(input())
la = list(map(int, input().split()))
la.sort(reverse=True)
answer = la[0]
for i in range(n - 2):
answer += la[1 + i // 2]
print(answer)
| [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
9053f5b0f20440d4b3ba686f4971f8d31a94cc3b | 9af995f2908b986211d76ea4a1cefe01ecca9cb3 | /paddlehub/finetune/task/sequence_task.py | 9ebfc1ae831a79f21d9a934e9adcfa42867f3af8 | [] | no_license | wuhuaha/beike | 94b5477fcb99b12e15a6c87911ec0f872ff9d1a0 | 076d5e594d0b129574d11d097b910471f2b4bdd0 | refs/heads/main | 2023-01-06T17:21:41.475137 | 2020-11-12T14:08:49 | 2020-11-12T14:08:49 | 309,097,633 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,029 | py | # coding:utf-8
# Copyright (c) 2019 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 re... | [
"you@example.com"
] | you@example.com |
c02f8f5bb55fb908952922011688ba908edcb9c1 | 19ea2c6fe2896807cd3db08109a80f0fcd303beb | /2021_03/03_12/CH04/013_Reversed_For01.py | b499b4f0f24761f42264e8a317f63d7fa3367044 | [] | no_license | ITlearning/ROKA_Python | 8078528eda10eab035f06a69a3278ff21d167df2 | d165fc2f276765a43bc859f556e76aaea779641f | refs/heads/main | 2023-03-26T07:47:17.164024 | 2021-03-27T14:22:54 | 2021-03-27T14:22:54 | 345,230,355 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 143 | py | # 반대로 반복하기(1)
for i in range(4,-1, -1) :
print("현재 반복 변수 : {}".format(i))
# range() 매개변수 3개 방법 | [
"yo7504@naver.com"
] | yo7504@naver.com |
58d5dca55a3bf9e020bcac0e1af8db7b09471366 | 2f64dddf0d5df9df42b1c93d8f946c788d19fef0 | /scruffy/env.py | d760d1cfc7f78a3af7918160f96c5a9756ae2065 | [] | no_license | tmr232/scruffy | 41d2598d0b15b8eefd8ab038b1411eb8c384b836 | 3c35369a5a7b67e934d59c321439e3d3e5495970 | refs/heads/master | 2021-01-17T14:18:58.418097 | 2015-02-26T11:52:25 | 2015-02-26T11:52:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,835 | py | import os
import yaml
import itertools
import errno
import logging
import logging.config
from .directory import Directory
from .plugin import PluginManager
from .config import ConfigNode, Config, ConfigEnv, ConfigApplicator
class Environment(object):
"""
An environment in which to run a program
"""
d... | [
"snare@ho.ax"
] | snare@ho.ax |
8e6ddac527a835923457ffb56b86e80403bcc21e | c672675d505f1b0dafb4b81141644caedf24cdef | /CADRE/power_dymos/power_cell_voltage.py | 1190bedce22ea57736456b93baa146f986dc045b | [
"Apache-2.0"
] | permissive | johnjasa/CADRE | aa63c7fa9466dc1839b454f2484346e57204dc8a | a4ffd61582b8474953fc309aa540838a14f29dcf | refs/heads/master | 2020-04-07T03:19:57.501186 | 2018-11-17T19:15:10 | 2018-11-17T19:15:10 | 158,012,106 | 0 | 0 | Apache-2.0 | 2018-11-17T18:17:53 | 2018-11-17T18:17:53 | null | UTF-8 | Python | false | false | 4,874 | py | """
Power discipline for CADRE: Power Cell Voltage component.
"""
from __future__ import print_function, division, absolute_import
from six.moves import range
import os
import numpy as np
from openmdao.api import ExplicitComponent
from MBI import MBI
class PowerCellVoltage(ExplicitComponent):
"""
Compute t... | [
"kenneth.t.moore-1@nasa.gov"
] | kenneth.t.moore-1@nasa.gov |
950676821e3247a2de1ac3ab907345178473721e | 69bfed466017c654c5d24a3e735430c4dc138af4 | /src/settings.py | fc9c4e70c37f0bca34b88ed0a4c3fc0d16a4d2e2 | [
"MIT"
] | permissive | kartagis/lucy | 20579fe1776cb6a2cfda2c26212d3d63be8829be | 45de24c0b01dfb9329eb31a1bd705df5b26e84a3 | refs/heads/master | 2021-01-23T15:27:20.420914 | 2017-09-07T08:08:14 | 2017-09-07T08:08:14 | 102,708,901 | 0 | 0 | null | 2017-09-07T08:00:34 | 2017-09-07T08:00:34 | null | UTF-8 | Python | false | false | 397 | py | from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
db_name = "db/filop.db"
Base = declarative_base()
def session(db_name = db_name):
engine = create_engine('sqlite:///{}'.format(db_name))
session = sessionmaker()
session.conf... | [
"hakancelik96@outlook.com"
] | hakancelik96@outlook.com |
ddfa181471cceb2fcfaedc2db33679d4f3c3ae67 | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /third_party/blink/renderer/core/url_pattern/DEPS | 7c671850403fe157f8234a4a1b325f2ab5b091ee | [
"LGPL-2.0-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-only",
"GPL-1.0-or-later",
"GPL-2.0-only",
"LGPL-2.0-only",
"BSD-2-Clause",
"LicenseRef-scancode-other-copyleft",
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] | permissive | chromium/chromium | aaa9eda10115b50b0616d2f1aed5ef35d1d779d6 | a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c | refs/heads/main | 2023-08-24T00:35:12.585945 | 2023-08-23T22:01:11 | 2023-08-23T22:01:11 | 120,360,765 | 17,408 | 7,102 | BSD-3-Clause | 2023-09-10T23:44:27 | 2018-02-05T20:55:32 | null | UTF-8 | Python | false | false | 277 | # Copyright 2020 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
include_rules = [
"+base/strings/string_util.h",
"+third_party/liburlpattern",
"+url/url_canon.h",
"+url/url_util.h",
]
| [
"chromium-scoped@luci-project-accounts.iam.gserviceaccount.com"
] | chromium-scoped@luci-project-accounts.iam.gserviceaccount.com | |
e45f74a36ee23641f9d7cd1fdf8a4ba8f9a3e067 | af3ec207381de315f4cb6dddba727d16d42d6c57 | /dialogue-engine/test/programytest/processors/post/test_mergechinese.py | 94679d64e47a6074fb113389ea20ae7e01be2ae1 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mcf-yuichi/cotoba-agent-oss | 02a5554fe81ce21517f33229101013b6487f5404 | ce60833915f484c4cbdc54b4b8222d64be4b6c0d | refs/heads/master | 2023-01-12T20:07:34.364188 | 2020-11-11T00:55:16 | 2020-11-11T00:55:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,284 | py | """
Copyright (c) 2020 COTOBA DESIGN, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distri... | [
"cliff@cotobadesign.com"
] | cliff@cotobadesign.com |
64b15f566dc2e930a5e0177cd01827d2c16d2e5e | 59bd639757fd8afcfdba73298a69482fd1f88069 | /cifar10/7_DenseNet/4last-output.py | 95b854521d8ef455b564b73ffa226914c451d537 | [] | no_license | DeepReduce/DeepReduce | f1e14b985affba2796c80d9e795b36cfd4ed9a55 | 707c2b411d65ed77967a3d1ea1506a91cc9d4bfd | refs/heads/master | 2020-08-01T01:47:23.293453 | 2020-06-14T18:09:01 | 2020-06-14T18:09:01 | 210,813,368 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,670 | py | import keras
from keras import optimizers
from keras.datasets import cifar10
from keras.models import Sequential
from keras.layers import Conv2D, Dense, Flatten, MaxPooling2D
from keras.callbacks import LearningRateScheduler, TensorBoard
from keras.models import load_model
from collections import defaultdict
import num... | [
"DLR_ICLR20@163.com"
] | DLR_ICLR20@163.com |
1e9c16e2b6d642eebb25c59fd0d5220331672fb8 | 324d8a723bc057b4679014a1a7df08a013f2e237 | /torchpack/runner/hooks/logger.py | 49251f01012a787560503cb09c3bb34fd5925422 | [
"MIT"
] | permissive | lxx1991/torchpack | ff0db24c73479b8d4e1bf77dd5fda4e5a3a7b694 | 3de04972bca89e0a4c53fa896a4f9f62457adc75 | refs/heads/master | 2020-03-24T04:05:14.299613 | 2018-07-26T13:52:38 | 2018-07-26T13:52:38 | 142,443,539 | 0 | 0 | null | 2018-07-26T13:17:29 | 2018-07-26T13:17:29 | null | UTF-8 | Python | false | false | 781 | py | from .hook import Hook
class LoggerHook(Hook):
"""Base class for logger hooks."""
def __init__(self, interval=10, reset_meter=True, ignore_last=True):
self.interval = interval
self.reset_meter = reset_meter
self.ignore_last = ignore_last
def log(self, runner):
pass
d... | [
"chenkaidev@gmail.com"
] | chenkaidev@gmail.com |
2e5b6109e5a9caf2bc44433828a311f4a7bdbc4b | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_5686313294495744_0/Python/jessethegame/technobabble.py | 4dc584f7ee2f0b34adfcd5dd99e118b303b19b94 | [] | 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 | 1,067 | py | from collections import Counter
file = 'C-small-attempt0.in'
def technobabble(topics):
real_firsts = set()
real_seconds = set()
fakes = 0
while topics:
firsts, seconds = zip(*topics)
firsts_counter = Counter(firsts)
seconds_counter = Counter(seconds)
ranked_topics = [... | [
"alexandra1.back@gmail.com"
] | alexandra1.back@gmail.com |
c239e77199b80a12345eece29962351d9e9c9e3a | aa4024b6a846d2f6032a9b79a89d2e29b67d0e49 | /mbeddr2C_MM/transformation_from_eclipse/Hlayer0rule10.py | bb1691eeceb274bc2e91c97bcfad803a7582cfba | [
"MIT"
] | permissive | levilucio/SyVOLT | 41311743d23fdb0b569300df464709c4954b8300 | 0f88827a653f2e9d3bb7b839a5253e74d48379dc | refs/heads/master | 2023-08-11T22:14:01.998341 | 2023-07-21T13:33:36 | 2023-07-21T13:33:36 | 36,246,850 | 3 | 2 | MIT | 2023-07-21T13:33:39 | 2015-05-25T18:15:26 | Python | UTF-8 | Python | false | false | 2,433 | py | from core.himesis import Himesis
import uuid
class Hlayer0rule10(Himesis):
def __init__(self):
"""
Creates the himesis graph representing the DSLTrans rule layer0rule10.
"""
# Flag this instance as compiled now
self.is_compiled = True
... | [
"bentleyjoakes@gmail.com"
] | bentleyjoakes@gmail.com |
a865a4a19651e7b15a5546c69a0a6e8fd29a34e7 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_206/1242.py | fb480c086828b23e6c6b68107084423f36d2c390 | [] | 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 | 564 | py | inputfile = open("h2.in", mode='r')
outputfile = open("output_h_l.txt", mode='w')
t = int(inputfile.readline().strip())
for case in range(t):
d, n = map(int, inputfile.readline().strip().split(' '))
time = 0
for i in range(n):
hD, hS = map(int, inputfile.readline().strip().split(' '))
hT = ... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
01956a1d6ef57c28be46ff7304cfc60c0c562d05 | 98c6ea9c884152e8340605a706efefbea6170be5 | /examples/data/Assignment_7/ndxren013/util.py | f7c3c9c8c6cfa0051e619ed357a02dcd81f8c0e5 | [] | no_license | MrHamdulay/csc3-capstone | 479d659e1dcd28040e83ebd9e3374d0ccc0c6817 | 6f0fa0fa1555ceb1b0fb33f25e9694e68b6a53d2 | refs/heads/master | 2021-03-12T21:55:57.781339 | 2014-09-22T02:22:22 | 2014-09-22T02:22:22 | 22,372,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,152 | py | import copy
def create_grid(grid) :
"""create a 4x4 grid"""
for i in range(4):
tmp = []
for j in range(4):
tmp.append(0)
grid.append(tmp)
def print_grid(grid) :
"""print out a 4x4 grid in 5-width columns within a box"""
print("+------------------... | [
"jarr2000@gmail.com"
] | jarr2000@gmail.com |
71f69800aac7f2532c02268c353747e0fb1e2a77 | ee2444e8e70f136e6b34a35eb55dc287a7621956 | /clock/clocks.py | 20fd7688ffe7775b14b7fed30fc4decad5af4c9f | [
"Apache-2.0"
] | permissive | vyahello/desktop-clock | ec737c6e12273bc9f309e4dc921740b41e5fbef0 | b9db67ef646db7951354842846e8b6baf03d3076 | refs/heads/master | 2020-04-14T03:12:13.643967 | 2019-01-06T22:10:00 | 2019-01-06T22:10:00 | 163,602,100 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,701 | py | from abc import ABC, abstractmethod
from clock.environment.engines import Engine, ClockEngine
from clock.environment.time import Time, ClockTime
from clock.environment.widgets import Widget, PurpleUIWidget
from clock.environment.windows import Window
from clock.types import Runner
class Clock(ABC):
"""Represent a... | [
"vyahello@gmail.com"
] | vyahello@gmail.com |
9889d3e62066d82b07468267398eeaee10b1399b | bd75c7ec55b78ef189f57596520744f82ec73073 | /Swap Nodes in Pairs.py | 06df07c8a141d9b99481b27baa91b0459c330f30 | [] | no_license | GaoLF/LeetCode-PY | 17058ac0743403292559f9b83a20bf79d89e33f6 | ccd294cfe0c228a21518d077d1aa01e510930ea3 | refs/heads/master | 2021-01-23T02:24:05.940132 | 2015-07-22T13:44:01 | 2015-07-22T13:44:01 | 38,248,471 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,085 | py | # Definition for singly-linked list.
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
# @param {ListNode} head
# @return {ListNode}
def swapPairs(self, head):
if not head:
return head
iter = head
temp = head
... | [
"gaolongfei@pku.edu.cn"
] | gaolongfei@pku.edu.cn |
f3308bc272f6a64b2c2b9e3e700cf49d912db947 | f7b035ee2eccd647a20ac49b0f6a8a2d7c854c81 | /foo.py | ee566b3d0c23c928a4c9f11a5bcadac04d29e753 | [] | no_license | lugrace/sryr-research | 00e0d9ef53573e4a5bec7311b775f61bccd92a8e | 245435161d38009026b21f4811155154927e5ecf | refs/heads/master | 2021-09-15T06:50:54.689077 | 2018-05-28T03:41:11 | 2018-05-28T03:41:11 | 110,488,453 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 54 | py | import math
def jumpInt(bar):
Foo = jumpString(bar)
| [
"2018glu@tjhsst.edu"
] | 2018glu@tjhsst.edu |
16ae4e8715304dfc152331ccbd298ad4158b5b5b | 113d34bc3a8a9d43c770fd41ee327fd3cbca67dd | /Python3/Path in the matrix.py | 24465fdc0b35da89dd603edf323da1f75d640c77 | [] | no_license | liuyuhang791034063/LeetCode | 2b5d3413abc3ed6f8fccf35f39454e2cfd9807b1 | b613718bf69982535b7c3c9f329a47d5741d8a9e | refs/heads/master | 2020-03-29T01:58:25.836162 | 2019-07-27T04:33:06 | 2019-07-27T04:33:06 | 149,415,780 | 12 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,553 | py | # -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name: Path in the matrix
Description:
Author: God
date: 2018/12/3
-------------------------------------------------
Change Activity: 2018/12/3
-------------------------------------------------
"... | [
"liuyuhang791034063@qq.com"
] | liuyuhang791034063@qq.com |
ca7d198a0e326232ec911103384438c043f5be31 | a1eb0bb73680bc42af97eea6b4d7811453dc6758 | /clustering/venv/Scripts/easy_install-3.6-script.py | 068e92aa69165faea6f8172bb1529439b7853e02 | [] | no_license | PotatoPig/machine-learning | 23c2ba5e7cf9d66c92309437d47d139bbf4e866f | eb7ae7b8bc03d765e508b1a1c222ea15d25b1c21 | refs/heads/master | 2020-07-22T15:00:03.607116 | 2019-09-09T06:47:33 | 2019-09-09T06:47:33 | 207,239,820 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 460 | py | #!D:\CS_Project\MachineLearning\clustering\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.1.0','console_scripts','easy_install-3.6'
__requires__ = 'setuptools==39.1.0'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.p... | [
"Binhan Xu"
] | Binhan Xu |
0e602feaaebaabffc917cb62b6c5e9a85335fffa | f312fcd24d94be8b32e2d1e50643b01c619aa23b | /tensorboard/plugins/wit_redirect/wit_redirect_plugin.py | 58bcd4d9cfb12ad96adb029933e9ef31ab6a7ad5 | [
"Apache-2.0"
] | permissive | tensorflow/tensorboard | bf316fc5d47f78ef980dd2106c99207892a508d5 | 5961c76dca0fb9bb40d146f5ce13834ac29d8ddb | refs/heads/master | 2023-09-03T23:59:03.264261 | 2023-08-30T22:24:07 | 2023-08-30T22:24:07 | 91,379,993 | 6,766 | 2,063 | Apache-2.0 | 2023-09-14T20:55:56 | 2017-05-15T20:08:07 | TypeScript | UTF-8 | Python | false | false | 1,682 | py | # Copyright 2020 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... | [
"noreply@github.com"
] | tensorflow.noreply@github.com |
81a1f59117d0eb5e1339b1325cfa301b91127add | 5b4b1866571453f78db5b06a08ff0eda17b91b04 | /test/vanilla/Expected/AcceptanceTests/Url/url/operations/_paths_operations.py | a142282285bee503445254ca4ba268c9aff892b9 | [
"MIT",
"LicenseRef-scancode-generic-cla"
] | permissive | koek67/autorest.azure-functions-python | ba345f1d194ca7431daab1210a0cd801d4946991 | b0896d8aec6b0fd6f0bcb12ea8e0489652dc2783 | refs/heads/main | 2022-12-20T13:27:56.405901 | 2020-09-30T08:23:11 | 2020-09-30T08:23:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 51,127 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | [
"varad.meru@gmail.com"
] | varad.meru@gmail.com |
13205a31e87c1b4daed148c5469c509a8f892bfa | ff810e6722caab8c0affcf97151f3c8fc332b6a1 | /muddery/worlddata/dao/event_mapper.py | cabd7a3f72345ee671298bcbd1c1df5684fb79c3 | [
"BSD-3-Clause"
] | permissive | tuchang/muddery | 014b69daf33a0042d341b403acc9939ca5e3ef11 | bab4b86c5fe4259b7c22a97d54e4249aab47f99e | refs/heads/master | 2020-04-26T23:38:40.383523 | 2019-01-30T14:54:07 | 2019-01-30T14:54:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 506 | py | """
Query and deal common tables.
"""
from __future__ import print_function
from evennia.utils import logger
from django.db import transaction
from django.apps import apps
from django.conf import settings
from muddery.utils import defines
from muddery.worlddata.dao.common_mapper_base import ObjectsMapper
def get_ob... | [
"luyijun999@gmail.com"
] | luyijun999@gmail.com |
8a60ef7df7b4593fe623e1cd3e266dec4a72850c | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/triangle_20200625195423.py | f43a71703b57e579886f578c35c9e086ac7dbb53 | [] | 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 | 263 | py | # this function is meant to print a triangle
def triangle():
# outer loop is for the rows --> 4
for i in range(0,4):
# inner loop is for colums --> 4
for j in range(0,i+1):
print('*')
#
triangle()
| [
"mary.jereh@gmail.com"
] | mary.jereh@gmail.com |
0efe069b4fa0143a1c876e9da6b2664df329c8ff | 8821c29949644faab3023f492bf615fe1cab4049 | /liquidluck/writers/extends.py | dc50589efe1785f5f245c316b5bf36a2d61828f3 | [] | no_license | loopwerk/liquidluck | c29bf2cc70343418dbe6a4dd3b55c9ec96e1f503 | d2c41f0b7cddabd3036bab514cf5ecbcc57becea | refs/heads/main | 2023-02-26T15:41:06.173164 | 2021-02-02T16:32:32 | 2021-02-02T16:32:32 | 335,299,233 | 1 | 0 | null | 2021-02-02T13:32:14 | 2021-02-02T13:32:14 | null | UTF-8 | Python | false | false | 2,165 | py | #!/usr/bin/env python
"""Extends of the core writers
"""
import os
from liquidluck.options import g, settings
from liquidluck.writers.base import BaseWriter
from liquidluck.writers.base import get_post_destination
class PostWriter(BaseWriter):
"""Replace the default post writer, edit settings::
writers... | [
"lepture@me.com"
] | lepture@me.com |
eb7275ac23673310b390268735873fa20ddf60fc | 5c3251a8c2f355452a5240518684eb935f9809af | /tasks_project_v2/.tox/py36/lib/python3.6/site-packages/tinydb/queries.py | 972010ba0b7ef014cdc596aaf94e6702eaf8e794 | [] | no_license | cbohara/pytest | b3783ab590aaf7b6a77a2ec372e5206a7152e574 | 13b0ed1c3bcb06042da561a27f4c8857ffefd610 | refs/heads/master | 2021-05-15T12:55:14.841045 | 2017-10-31T03:46:27 | 2017-10-31T03:46:27 | 108,433,716 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 10,089 | py | """
Contains the querying interface.
Starting with :class:`~tinydb.queries.Query` you can construct complex
queries:
>>> ((where('f1') == 5) & (where('f2') != 2)) | where('s').matches(r'^\w+$')
(('f1' == 5) and ('f2' != 2)) or ('s' ~= ^\w+$ )
Queries are executed by using the ``__call__``:
>>> q = where('val') == 5... | [
"charlie.b.ohara@gmail.com"
] | charlie.b.ohara@gmail.com |
c56af7a7378410adccb3cbec6898cb84a8ad7148 | fd711822ba16edf959d729cfecec2903d06a7e65 | /backend/msm_mobile_2212fgbx_17149/settings.py | 3df27e4c1a10fbc3a9554cff8bf5434e37862f55 | [] | no_license | crowdbotics-apps/msm-mobile-2212fgbx-17149 | 21c5aac1ef48afcc2fa2cbc67322844365d2b6ae | 9e0df24add57b3ed9d6d2cf51b9411858837a60b | refs/heads/master | 2023-02-02T23:44:39.254133 | 2020-12-22T07:21:50 | 2020-12-22T07:21:50 | 323,546,196 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,062 | py | """
Django settings for msm_mobile_2212fgbx_17149 project.
Generated by 'django-admin startproject' using Django 2.2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
67fe520ef708626c818809afe39e7d4be0ca0482 | afb16c3188bf06af65ae0d998e114c72342bd8be | /note/demo/pyqt_demo/pyqtdeploy-3.3.0/pyqtdeploy/gui/__init__.py | 7bb7439211741600c2869895c4c546dfdd990b0e | [
"BSD-3-Clause"
] | permissive | onsunsl/onsunsl.github.io | aa75f399f1c647bc2e62314633bfe35187e59ad4 | 4ed2b1b9a2407afcbffdf304020d42b81c4c8cdc | refs/heads/master | 2023-05-26T12:33:11.167270 | 2023-04-01T10:18:05 | 2023-04-01T10:18:05 | 237,595,319 | 1 | 0 | null | 2023-05-23T20:13:11 | 2020-02-01T10:02:58 | Python | UTF-8 | Python | false | false | 1,487 | py | # Copyright (c) 2019, Riverbank Computing Limited
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of c... | [
"onsunsl@foxmail.com"
] | onsunsl@foxmail.com |
4feb4ee318210f8ba9d5a5900e78c390ad285d83 | 51b20543e5ed606636bcde9fba329e5fa948de2e | /communityprofiles/profiles/oldmigrations/0028_rename_datadisplay.py | cf6e22a06d39652831e0cdfc8b64e75216157ffa | [
"MIT"
] | permissive | 216software/Profiles | b821112225e8522b7b558cab87ae1c12c68c653b | 651da880a3d4295243205bdae4de88504edc91de | refs/heads/dev | 2023-03-16T04:49:01.389186 | 2023-03-09T17:04:04 | 2023-03-09T17:04:04 | 59,139,518 | 3 | 0 | null | 2016-05-18T18:02:53 | 2016-05-18T18:02:53 | null | UTF-8 | Python | false | false | 15,732 | py | # encoding: 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):
# Deleting model 'DataDisplay'
db.rename_table('profiles_datadisplay', 'profiles_datadisplaytemplate')
... | [
"asmedrano@gmail.com"
] | asmedrano@gmail.com |
df3dd0c6444826ae7b47594b45a3af13c9367411 | eb9c3dac0dca0ecd184df14b1fda62e61cc8c7d7 | /google/cloud/automl/v1beta1/automl-v1beta1-py/google/cloud/automl_v1beta1/types/text.py | 4cfbeec4414685c6289c3c27575e043c78d1d454 | [
"Apache-2.0"
] | permissive | Tryweirder/googleapis-gen | 2e5daf46574c3af3d448f1177eaebe809100c346 | 45d8e9377379f9d1d4e166e80415a8c1737f284d | refs/heads/master | 2023-04-05T06:30:04.726589 | 2021-04-13T23:35:20 | 2021-04-13T23:35:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,303 | py | # -*- coding: utf-8 -*-
# Copyright 2020 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 o... | [
"bazel-bot-development[bot]@users.noreply.github.com"
] | bazel-bot-development[bot]@users.noreply.github.com |
70010e56865e6859e5fb7ce76d3db89396781ae3 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02404/s524653076.py | 6b28671655af949d1e273a3f672228e10e89b441 | [] | 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 | 503 | py | while True:
num = list(map(int,input().split()))
if(num[0] == 0 and num[1] == 0): break
else:
flag = False
for i in range(num[0]):
str = ""
if(i == 0 or i == num[0]-1): flag=True
else: flag=False
for j in range(num[1]):
if(j == ... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
217781305f8edabd2f783fbd2dfab45ad641bc8b | 88b063ec8e543e6f62f3adac6be214128a984548 | /backend/chat/api/v1/viewsets.py | f866d1b60c17b260c5991567c246fc3286766130 | [] | no_license | crowdbotics-apps/chat-app-28513 | 6939d1da6c53f6d44786b4f822b4fb4c1fedd57f | 129f56f533f8f3076fdcfcfe3180942e5890f9f2 | refs/heads/master | 2023-06-06T17:26:04.090136 | 2021-07-06T23:23:40 | 2021-07-06T23:23:40 | 383,620,473 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,983 | py | from rest_framework import authentication
from chat.models import (
Message,
ThreadMember,
MessageAction,
ThreadAction,
ForwardedMessage,
Thread,
)
from .serializers import (
MessageSerializer,
ThreadMemberSerializer,
MessageActionSerializer,
ThreadActionSerializer,
Forwarded... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
726f56c748b2aa68e9e184b243ff36945ab2243e | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02421/s282455109.py | e0be63d9b3954f9063104c79b5c40180297004d4 | [] | 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 | 345 | py | point_a,point_b = 0,0
for i in range(int(input())):
k =[]
a,b = input().split()
k = [[i,j] for i,j in zip(a,b) if i != j]
if k == []:
if len(a) < len(b):
point_b+=3
elif len(a) > len(b):
point_a += 3
else:
point_a+=1
point_b+=1
elif ord(k[0][0]) < ord(k[0][1]):
point_b += 3
else :
point_a +=... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
968b545c65e188b2f1d2f91599be84694e58c3f0 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/refactoring/introduceVariable/formattingOfParenthesizedTuplePreserved.after.py | d6d33f19491d398e0b0c4c6b3471f43c25c72a52 | [
"Apache-2.0"
] | permissive | JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | null | UTF-8 | Python | false | false | 50 | py | a = ('foo',
'bar',
'baz')
func(param=a)
| [
"mikhail.golubev@jetbrains.com"
] | mikhail.golubev@jetbrains.com |
e5cb1c5a23fb4af6846b5bf7dc61c210c9fbfe4d | b68115ac6cd996c1a09d70c2cf7158715c125aae | /simulation/tests/context.py | 542253303d40ec9076d7a91ffa82a0c73939aaa3 | [] | no_license | joakim-hove/fmu_storage | 3a71d7521818658a252e90a3b08c32810a86d544 | c02feb69493a9e17592b1b5e3cf201c559b20bdf | refs/heads/master | 2021-08-28T06:54:59.291006 | 2017-12-11T13:51:36 | 2017-12-11T13:51:36 | 103,049,778 | 0 | 2 | null | 2017-09-14T13:14:26 | 2017-09-10T17:53:27 | Python | UTF-8 | Python | false | false | 2,918 | py | import getpass
import os
import grp
import random
from ecl.ecl import EclGrid, EclGridGenerator, EclSum, openFortIO, EclFile
from ecl.test import TestAreaContext
from ecl.test.ecl_mock import createEclSum
from simulation.models import *
def fopr(days):
return days
def random_fopr(days):
return fopr(days) * ... | [
"joakim.hove@gmail.com"
] | joakim.hove@gmail.com |
28071d902234225339df9863437a44aa01511de6 | 6cc50a15672155f7d66e88830ad1baec6a061077 | /processing/legacy/anisotropy/random_trials/grid_test/submitter.py | 237c124558f1838e5cf2d1f6b45d2c356f636c95 | [
"MIT"
] | permissive | jrbourbeau/cr-composition | 16b29c672b2d1c8d75c1c45e35fe6bb60b53ffe2 | e9efb4b713492aaf544b5dd8bb67280d4f108056 | refs/heads/master | 2020-06-24T21:48:21.784277 | 2018-11-01T21:30:56 | 2018-11-01T21:30:56 | 74,618,907 | 0 | 1 | MIT | 2018-08-23T21:01:03 | 2016-11-23T22:31:01 | Jupyter Notebook | UTF-8 | Python | false | false | 1,237 | py | #!/usr/bin/env python
import os
import pycondor
import comptools as comp
if __name__ == "__main__":
# Define output directories
error = os.path.join(comp.paths.condor_data_dir, 'grid_test/error')
output = os.path.join(comp.paths.condor_data_dir, 'grid_test/output')
log = os.path.join(comp.paths.con... | [
"jrbourbeau@gmail.com"
] | jrbourbeau@gmail.com |
f3e6214771059eaad09dcfbffb014559b1f6d936 | 0d1b38738bf8d3a46efdf44ef6dd1fd061a0ff3e | /python/tak/ptn/__init__.py | ab2d16a528bceaaba2de3029070ad29c57dcf878 | [
"MIT"
] | permissive | nelhage/taktician | aea285e49c97d9212390075239abf4816b0023ee | 8ab398ad8ce65a7615da476c6e99c3f6d5d24d76 | refs/heads/main | 2022-12-08T23:43:26.458026 | 2022-11-06T23:31:12 | 2022-11-06T23:31:12 | 57,939,961 | 60 | 14 | MIT | 2022-11-06T23:31:13 | 2016-05-03T03:54:39 | Go | UTF-8 | Python | false | false | 38 | py | from .ptn import *
from .tps import *
| [
"nelhage@nelhage.com"
] | nelhage@nelhage.com |
c35d40a6aaaa6fe00d05db758d350f86d9bc8b5d | 7bcb0b7f721c8fa31da7574f13ed0056127715b3 | /src/apps/bi/kruskals.py | 5a6e72b1e0f1a21c431315fa0eb2abb11ade3fbc | [] | no_license | simonchapman1986/ripe | 09eb9452ea16730c105c452eefb6a6791c1b4a69 | c129da2249b5f75015f528e4056e9a2957b7d884 | refs/heads/master | 2022-07-22T05:15:38.485619 | 2016-01-15T12:53:43 | 2016-01-15T12:53:43 | 49,718,671 | 1 | 0 | null | 2022-07-07T22:50:50 | 2016-01-15T12:53:09 | Python | UTF-8 | Python | false | false | 1,537 | py | __author__ = 'simon'
parent = dict()
rank = dict()
def make_set(vertice):
parent[vertice] = vertice
rank[vertice] = 0
def find(vertice):
if parent[vertice] != vertice:
parent[vertice] = find(parent[vertice])
return parent[vertice]
def union(vertice1, vertice2):
root1 = find(vertice1)
... | [
"simon-ch@moving-picture.com"
] | simon-ch@moving-picture.com |
6fc23d15c1c3ed67d9789862a4419cf73d03b598 | 556f9c2db9c88120dc6dc7bc4280935db78e3eaa | /scripts/test_zero.py | c28139a20225537e6deb1324f888d975b27f2fee | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | BlockResearchGroup/compas_ags | 55dde6a2755c644b484767c8c359f6bfe68531a5 | 4507ff09be1a881d3f3520bc465a9dcda52b42ed | refs/heads/main | 2023-04-11T04:43:50.850869 | 2022-11-17T10:46:23 | 2022-11-17T10:46:23 | 113,161,567 | 13 | 5 | MIT | 2022-11-17T10:35:43 | 2017-12-05T09:31:08 | Python | UTF-8 | Python | false | false | 2,327 | py | import compas_ags
from compas_ags.diagrams import FormGraph
from compas_ags.diagrams import FormDiagram
from compas_ags.diagrams import ForceDiagram
# from compas_ags.ags import graphstatics
from compas_ags.viewers import Viewer
from compas.rpc import Proxy
graphstatics = Proxy('compas_ags.ags.graphstatics')
# this... | [
"vanmelet@ethz.ch"
] | vanmelet@ethz.ch |
1b1047863ca9ab109e3bf32a674b4f7077fcfb6d | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_136/1892.py | 5fc6c54ef1e3222a84986cd7b64701be7742ba30 | [] | 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,076 | py | INITIAL_RATE = 2
class Case(object):
def __init__(self,C,F,X):
self.C = C
self.F = F
self.X = X
def solve(self):
time = self.X/INITIAL_RATE
return self.__solve_in_loop(INITIAL_RATE, time,0)
def __solve_in_loop(self,last_rate,last_time,overhead):
... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
b4d0a06a96fa7688f6cf7f0e79de64a4065cf646 | c0feb8693883e4b29096ad45b6b2113b7cad69ef | /supervised_learning/0x03-optimization/0-main.py | dcbea35b2e1336070660c73f686a5451c7af267c | [] | no_license | vandeldiegoc/holbertonschool-machine_learning | 905977a15dbb59753115936215a870fa0f46f52e | bda9efa60075afa834433ff1b5179db80f2487ae | refs/heads/main | 2023-07-06T23:28:59.393284 | 2021-08-10T21:58:40 | 2021-08-10T21:58:40 | 318,391,491 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 418 | py | #/usr/bin/env python3
import numpy as np
normalization_constants = __import__('0-norm_constants').normalization_constants
if __name__ == '__main__':
np.random.seed(0)
a = np.random.normal(0, 2, size=(100, 1))
b = np.random.normal(2, 1, size=(100, 1))
c = np.random.normal(-3, 10, size=(100, 1))
X =... | [
"vandeldiegoc@gmail.com"
] | vandeldiegoc@gmail.com |
939ef16942fc3121165f9df42f9a4b943a6b7273 | 7ec38beb6f041319916390ee92876678412b30f7 | /src/leecode/array_medium_1282(2).py | 74ad89bcac3387e7faae9e44a1009212c7d51539 | [] | no_license | hopensic/LearnPython | 3570e212a1931d4dad65b64ecdd24414daf51c73 | f735b5d865789843f06a623a4006f8883d6d1ae0 | refs/heads/master | 2022-02-18T23:11:30.663902 | 2022-02-12T17:51:56 | 2022-02-12T17:51:56 | 218,924,551 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 367 | py | from collections import defaultdict
class Solution:
def groupThePeople(self, groupSizes):
count = defaultdict(list)
for i, size in enumerate(groupSizes):
count[size].append(i)
return [l[i:i + s] for s, l in count.items() for i in range(0, len(l), s)]
lst = [3, 3, 3, 3, 3, 1, ... | [
"hopensic@gmail.com"
] | hopensic@gmail.com |
cd967ebaafe8d50ba8eb76a9166a6187a6d13a31 | a7e3ffcd2e011f091763370a66aab9bd04d4ffec | /trade/urls.py | fe530542c751a1c69c2b97f02fb07a1a1b56e89f | [] | no_license | jiangyuwei666/Shop | 0363a5c1c55c796e5ff56f07c663eea4bc08de71 | 78d7d4647f5c101c89fc5188808cddecf16d1ee6 | refs/heads/master | 2022-12-27T11:05:57.190555 | 2019-08-18T07:50:37 | 2019-08-18T07:50:37 | 189,996,974 | 0 | 0 | null | 2022-12-16T09:43:17 | 2019-06-03T12:02:22 | Python | UTF-8 | Python | false | false | 412 | py | from django.conf.urls import url, include
from rest_framework.routers import DefaultRouter
from apps.trade.views import ShoppingCartViewSet, OrderInfoViewSet, OrderGoodsViewSet
router = DefaultRouter()
router.register('shopping_cart', ShoppingCartViewSet)
router.register('order_info', OrderInfoViewSet)
router.regist... | [
"739843128@qq.com"
] | 739843128@qq.com |
5f1c7ca9826e83c4e2252cfcfb3335b01d8a46bd | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_5636311922769920_0/Python/jonyafek/d-large.py | 681f1d58b9ba783300076960e61ec020cdc6a53d | [] | 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 | 1,192 | py | #!/usr/bin/python
def solve(k, c, s):
#print "k: " + str(k)
#print "c: " + str(c)
#print "s: " + str(s)
result = ""
numbers_to_verify = range(1, k + 1)
numbers_to_check = []
while numbers_to_verify:
number = 0
for level in xrange(c):
temp_num = 1
if numbers_to_verify:
temp_num = numbers_to_verify.... | [
"alexandra1.back@gmail.com"
] | alexandra1.back@gmail.com |
05efe8ebcc108f820c6f960b90f10a1c382616f0 | b5bde7b0be53cf62e4aa19085e75d61636213abb | /celebs/migrations/0001_initial.py | 0b1719c8467ec6535bfa6428967be5b4cddc7c60 | [] | no_license | pydatageek/imdb-clone-django-vue | 3ecaa2dbf97225a202c574c06953b4be80fc240b | 2c77f49be3e5a40b368110630641f22b686eb7bc | refs/heads/master | 2022-12-07T18:29:22.303516 | 2020-04-03T04:54:07 | 2020-04-03T04:54:07 | 252,633,801 | 1 | 0 | null | 2022-11-22T05:27:31 | 2020-04-03T04:40:03 | HTML | UTF-8 | Python | false | false | 3,349 | py | # Generated by Django 2.2.10 on 2020-04-03 02:02
import celebs.models
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Celebrity',
fields=[
... | [
"pydatageek@gmail.com"
] | pydatageek@gmail.com |
1aaf359a44b493c5f11b48b1be9151ffa1bd2dcd | d2b6b9792e5dde0a994e875d23d8a8ace2651fca | /tests/test_build_and_lint.py | 5d623626f0a8f1d543e647aaf380c31c4bccc2cd | [
"AFL-3.0",
"CC-BY-2.5",
"AFL-2.1",
"CC-BY-3.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | michauhl/planemo | 908d9bd95febcce3aa8a2e932260f0bd3151f433 | fdcc6003c1fa45cbe1d074ad9d0f9a491ba99c06 | refs/heads/master | 2020-03-11T20:54:11.424703 | 2018-04-17T19:06:32 | 2018-04-17T19:06:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,573 | py | import os
import yaml
from .test_utils import CliTestCase, skip_if_environ
class BuildAndLintTestCase(CliTestCase):
def test_build_and_lint(self):
with self._isolate():
self._check_exit_code(_init_command())
self._check_lint(exit_code=0)
def test_build_and_lint_with_macros(... | [
"jmchilton@gmail.com"
] | jmchilton@gmail.com |
61eb0d93423d7ff12f16262371ed2cf4fa2a0fa6 | 5736e117e8d0e011107c3ce4943cce44ea242263 | /DP/Lavenshtein.py | 8744443adb2b9663278c3aa5e76d760482984ce3 | [] | no_license | arvakagdi/Dynamic-Programming | 7119d2005f12b9b441b6e3a582d99a5e4ddffa4d | 49a199413fa939335308533a8303974e3a82cc5c | refs/heads/main | 2023-01-11T01:36:36.862590 | 2020-11-14T14:10:14 | 2020-11-14T14:10:14 | 312,829,648 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,302 | py | # Time: O(mn) || Spacr: O(nm)
def levenshteinDistance(str1, str2):
# set up a matrix of size of first and second string
edits = [[x for x in range(len(str1)+1)] for y in range(len(str2) + 1)]
for i in range(1,len(str2) + 1):
edits[i][0] = edits[i - 1][0] + 1 # set 1st(0th) column to base v... | [
"noreply@github.com"
] | arvakagdi.noreply@github.com |
b2936740e8936183c7d49945d098ee718bc25273 | 86c360ece5931b8a48f895e8233a571720a5c273 | /fabfile.py | a589579347eeb70a07bdf0c72850e3ad088f3d88 | [] | no_license | dschien/bbc_tool_deploy | c83501a33fa17754a530a36391637a59569d497c | ab136aa7872031b99fcee318bc23390b93639db1 | refs/heads/master | 2021-01-10T12:20:28.586805 | 2016-10-19T16:10:06 | 2016-10-19T16:10:06 | 52,797,894 | 0 | 0 | null | null | null | null | UTF-8 | Python | true | false | 6,817 | py | import boto3
import ConfigParser
import logging
import boto3
import time
from fabric.api import *
from fabric.contrib.files import exists
CONFIG_FILE = "settings.cfg"
config = ConfigParser.RawConfigParser()
config.read(CONFIG_FILE)
env.forward_agent = True
env.update(config._sections['ec2'])
env.hosts = [config.get(... | [
"dschien@gmail.com"
] | dschien@gmail.com |
acd3af53e483f5486883751ff18a9e9a124f4c06 | 038e6e13ad4a81cee5dbbd6ccc322d48330d15d7 | /AnswerCode/463IslandPerimeter.py | b6168c15bf6864a09d4e81b9745085bc8ea3662f | [] | no_license | aistoume/Leetcode | ad69dae6d9f41a03c883fc2582d0afd6997f83d6 | d8dc574b611d0e3d42367ccd47a44fd8443b0b27 | refs/heads/master | 2021-01-12T14:27:18.245818 | 2018-11-09T00:21:04 | 2018-11-09T00:21:04 | 70,066,007 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 657 | py | ### Youbin 2017/06/21
### 463 Island Perimeter
class Solution(object):
def islandPerimeter(self, grid):
p = 0
newGrid = [[0]*(len(grid[0])+2)]
for l in grid:
row = [0]+ l + [0]
newGrid.append(row)
newGrid.append([0]*(len(grid[0])+2))
for row in range(1,len(newGrid)-1):
for col in range(1, len(ne... | [
"ais.yb.mo@gmail.com"
] | ais.yb.mo@gmail.com |
d69f2d5892bc361a4bb224fe5d218221024326c8 | 3ddc7fb5ac7ac91753a29beced3d2cfb63a2ba8b | /src/minij_proxy_asgi_aiohttp.py | 1c317a05af5abdd396904aa838e8becb2573d4f2 | [] | no_license | abilian/asgi-sandbox | 3f978ac9eba139e248af3508b506c87ed6f87fe1 | 49f6c50a94e90045c7c60533f6e564e6b745d8b5 | refs/heads/main | 2023-05-31T08:39:57.855151 | 2021-06-29T13:34:33 | 2021-06-29T13:34:33 | 364,506,274 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,003 | py | import asyncio
from typing import Mapping
import aiohttp
import fire
import uvicorn
from aiohttp import ClientSSLError, ClientTimeout, TooManyRedirects
from starlette.requests import Request
from starlette.responses import Response
# Extremely aggressive and hardcoded value
TIMEOUT = 10
DEFAULT_ACCESS_URL = "https:/... | [
"sf@fermigier.com"
] | sf@fermigier.com |
c239fa23fae2712d15c071e023a056a4116c2caf | b4cc610bbd069c2b3e1f50c82303d48de21843a4 | /ce/c235_test.py | 896a898bca43a1811bb53b5b1aac0718705bf3b4 | [] | no_license | AakashKumarNain/pythonesque | d47b890ff42fa7baa3f25f9569d8a7310c7aa710 | 3225aaf878c52962becafd60a50243a91f92b264 | refs/heads/master | 2020-03-18T00:07:00.624695 | 2018-05-19T09:24:16 | 2018-05-19T09:24:16 | 134,078,646 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 582 | py | """
Simple or trump
author: Manny egalli64@gmail.com
info: http://thisthread.blogspot.com/2017/01/codeeval-simple-or-trump.html
https://www.codeeval.com/open_challenges/235/
"""
import unittest
from ce.c235 import solution
class TestCodeEval(unittest.TestCase):
def test_provided_1(self):
self.asse... | [
"egalli64@gmail.com"
] | egalli64@gmail.com |
8609337d0074cd189a54453539b0385f45cc2b9b | ed719ee21d88b1d3fa03fbcc41cb2683930ea665 | /month05/AI/day05/demo05_traffic.py | a52e182e55428309879deb30567c217b8cf38444 | [] | no_license | KarlLichterVonRandoll/learning_python | 453305c0af116014e384e4335d53b9775587483d | c458e203e7f7bfce9641408ef63d6ba041ed7fef | refs/heads/master | 2022-02-23T03:04:24.580457 | 2019-09-17T03:43:45 | 2019-09-17T03:43:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,663 | py | """
案例:车流量预测 回归问题
"""
import numpy as np
import sklearn.preprocessing as sp
import sklearn.model_selection as ms
import sklearn.svm as svm
import sklearn.metrics as sm
class DigitEncoder():
# 模拟LabelEncoder自定义的数字编码器
def fit_transform(self, y):
return y.astype('i4')
def transform(self, y):
... | [
"286631670@qq.com"
] | 286631670@qq.com |
803f26d0e831665f687af15088f956c6846a247d | 531c47c15b97cbcb263ec86821d7f258c81c0aaf | /sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/aio/operations_async/_available_delegations_operations_async.py | a4120781c732285c6b81e9300d16784aafbd4b5e | [
"LicenseRef-scancode-generic-cla",
"LGPL-2.1-or-later",
"MIT"
] | permissive | YijunXieMS/azure-sdk-for-python | be364d3b88204fd3c7d223df23756386ff7a3361 | f779de8e53dbec033f98f976284e6d9491fd60b3 | refs/heads/master | 2021-07-15T18:06:28.748507 | 2020-09-04T15:48:52 | 2020-09-04T15:48:52 | 205,457,088 | 1 | 2 | MIT | 2020-06-16T16:38:15 | 2019-08-30T21:08:55 | Python | UTF-8 | Python | false | false | 5,085 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | [
"noreply@github.com"
] | YijunXieMS.noreply@github.com |
4785a18fd7f8139ca9ffe991135f4fb33afce469 | 97f285b6f8016a8d1d2d675fffb771df3c9e37b9 | /web/simplehttpputserver.py | 29a977339705467a06f309e41d64dc6f919fd323 | [] | no_license | oskomorokhov/python | ef5408499840465d18852954aee9de460d0e7250 | 8909396c4200bd2fca19d3f216ed5f484fb2192a | refs/heads/master | 2021-05-14T09:27:25.413163 | 2019-12-12T21:00:05 | 2019-12-12T21:00:05 | 116,327,306 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 446 | py | import SimpleHTTPServer
import BaseHTTPServer
class SputHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def do_PUT(self):
print self.headers
length = int(self.headers["Content-Length"])
path = self.translate_path(self.path)
with open(path, "wb") as dst:
d... | [
"oskom85@gmail.com"
] | oskom85@gmail.com |
8f48ea04409d30f7fbe228bdf8395f39c7f6e20a | e377a9333401b992548ddb7e6ccd9452fdd1d071 | /os_package_registry/__init__.py | 05645fc92042b3bde8d401005e923f323fdd870c | [
"MIT"
] | permissive | OpenSpending-Clone/os-package-registry | 58a9d7754400f546f1bcdaa6b017dcf1dfa21049 | 27b82eff040a93e31f958820c62aa084a9cd1cc0 | refs/heads/master | 2022-02-24T22:32:10.714979 | 2019-11-06T21:07:36 | 2019-11-06T21:07:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 46 | py | from .package_registry import PackageRegistry
| [
"adam.kariv@gmail.com"
] | adam.kariv@gmail.com |
3944f19dacca45a6c4ca733edff9d19acdd24250 | 4a8bfa3407aa98a04ede3162f85467b1b5012fe7 | /tests/test_api/test_methods/test_edit_message_live_location.py | 07b61a9d518c71e42d0b70073e468713690f8296 | [] | no_license | aiogram/tg-codegen | 07ec80814eec46f464d2490fd27b7b6b27257f1b | ba3c2f893591d45dda418dd16e0646e260afdf14 | refs/heads/master | 2022-12-09T10:44:10.781570 | 2021-11-07T23:33:25 | 2021-11-07T23:33:25 | 218,523,371 | 24 | 5 | null | 2022-12-08T08:47:43 | 2019-10-30T12:33:21 | Python | UTF-8 | Python | false | false | 1,141 | py | import pytest
from aiogram.api.methods import EditMessageLiveLocation, Request
from tests.mocked_bot import MockedBot
@pytest.mark.skip
class TestEditMessageLiveLocation:
@pytest.mark.asyncio
async def test_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(EditMessageLiveLocation, ok=T... | [
"jroot.junior@gmail.com"
] | jroot.junior@gmail.com |
1ee61b83ccfaad20826b03e78474d2cbc307c42e | 320bf3ddd6233577d9f2f08f046eaef96f881e4e | /Pillow-4.3.0/Tests/test_image_fromqpixmap.py | 543b74bbf249991a39c73878b670772b46f1f152 | [
"MIT"
] | permissive | leorzz/simplemooc | 057ba3e220c20907017edfd8d0fc0422f9a6d99c | 8b1c5e939d534b1fd729596df4c59fc69708b896 | refs/heads/master | 2022-10-22T02:24:46.733062 | 2017-12-17T16:37:04 | 2017-12-17T16:37:04 | 112,488,280 | 0 | 1 | MIT | 2022-10-08T17:50:17 | 2017-11-29T14:52:23 | Python | UTF-8 | Python | false | false | 837 | py | from helper import unittest, PillowTestCase, hopper
from test_imageqt import PillowQtTestCase, PillowQPixmapTestCase
from PIL import ImageQt
class TestFromQPixmap(PillowQPixmapTestCase, PillowTestCase):
def roundtrip(self, expected):
PillowQtTestCase.setUp(self)
result = ImageQt.fromqpixmap(Imag... | [
"rizzi.leo@gmail.com"
] | rizzi.leo@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.