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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cec549844f429ed57e856702a1979e9d7ed82176 | 4574f5c8e491993dbb89b8a0abc63ede4b9adfc0 | /src/rule_chains/dispatch.py | dd4fe6c45e938b70d29325a739976965815a027b | [
"Apache-2.0"
] | permissive | deeso/rule-chains | 93f472e79b2e2eb9a17618a11940b7fe9afb00bb | 499e42626a4c1911be7916aabfcb76a7172a55cd | refs/heads/master | 2021-01-21T08:11:53.675403 | 2018-03-13T05:37:23 | 2018-03-13T05:37:23 | 101,954,836 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,097 | py | class ChainDispatchResult(object):
def __init__(self, table_name, chain_name=None, success=False,
chain_result=None,
block_results=None, chain_results=None, rvalue=None,
extraction_rule_results=None, outcome=False,
extraction_value=None, block_name... | [
"adam.pridgen@thecoverofnight.com"
] | adam.pridgen@thecoverofnight.com |
879c72a749aa447e3cf0d98e4a0ad65d7b96ec4b | 97ad602612adf894bdfab85c4867cac69b2d7c99 | /learnpythonthehardway/erect-fence.py | c6590a9ee3c6e8e39d645b035aeca2371444cfce | [] | no_license | cotncndy/leetcode-python | bebd15f3dd44e8ed1c5f33f29314977de4fcc141 | 591067d87209702c4d41e1a9fce88f9dd1815fed | refs/heads/master | 2020-03-17T03:05:07.182353 | 2018-05-10T16:37:57 | 2018-05-10T16:37:57 | 133,219,257 | 0 | 3 | null | 2018-05-13T08:34:43 | 2018-05-13T08:34:43 | null | UTF-8 | Python | false | false | 2,630 | py | # There are some trees, where each tree is represented by (x,y) coordinate in a two-dimensional garden. Your job is
# to fence the entire garden using the minimum length of rope as it is expensive. The garden is well fenced only if
# all the trees are enclosed. Your task is to help find the coordinates of trees which a... | [
"xin_wei@intuit.com"
] | xin_wei@intuit.com |
f582bd1fe8a38bfb9010d139d33a72d4f79d7469 | 401aae63dde689f298c196b9063b6dca3ecf529b | /utils.py | 4f3987e6e9f34679e576b4a3765a5a7ebe79e7e9 | [] | no_license | dunovank/Hierarchical-Attention-Network-1 | 1791c4afddaf786abd60e05bf3eb4b542c9a1306 | 558660c7030e41698b62702c88741f0a893c8509 | refs/heads/master | 2021-10-25T09:17:28.882012 | 2019-04-03T11:50:51 | 2019-04-03T11:50:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,591 | py | import matplotlib.pyplot as plt
import numpy as np
from matplotlib.lines import Line2D
def plot_grad_flow(named_parameters):
'''Plots the gradients flowing through different layers in the net during training.
Can be used for checking for possible gradient vanishing / exploding problems.
Usage: Plug this... | [
"shikhar.chauhan@live.com"
] | shikhar.chauhan@live.com |
b69b52e5f9ea49a0fb6647fb95417e9d880c1ac1 | 5acc77c4d594c1750a9b7477499ee25b4c307bca | /ehpi_action_recognition/networks/action_recognition_nets/action_rec_net_ehpi.py | b0f025abbc592698624fe9a900a4b478838ee111 | [
"MIT"
] | permissive | noboevbo/ehpi_action_recognition | bc15a3c260c79b85a82844a2779c9b1ec9cf42fd | 3b77eeb5103f0f11c8d4be993ec79dddad7e661c | refs/heads/master | 2021-12-29T05:24:31.891044 | 2021-12-19T16:23:36 | 2021-12-19T16:23:36 | 180,351,212 | 113 | 23 | null | 2019-04-23T11:24:27 | 2019-04-09T11:22:45 | Python | UTF-8 | Python | false | false | 3,202 | py | from typing import List, Dict
import cv2
import numpy as np
import torch
from nobos_commons.data_structures.dimension import ImageSize
from nobos_commons.data_structures.human import Human
from nobos_commons.data_structures.humans_metadata.algorithm_output_buffer import AlgorithmOutputBuffer
from nobos_commons.data_st... | [
"Dennis.Ludl@reutlingen-university.de"
] | Dennis.Ludl@reutlingen-university.de |
f807ab26b6709ac4c4da5cd5a8fd8a42d2095e0d | 289aaefe2f78bde474ea082afe55054f14932be4 | /LearnPython3-master/14-各种if语句/test.py | f8ca0d1778a1946fc2b6debfc9952c9d347ba02f | [] | no_license | 13424010187/python | ed15dbad380164c846ef68692213dea7689b514e | aab8ba8565ed29e7d8b93d7ec3270fafb1294fe9 | refs/heads/master | 2023-07-17T07:57:47.694227 | 2021-08-15T09:57:06 | 2021-08-15T09:57:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 470 | py | point = 5
# if
# if point > 30:
# print("MVP球星")
# if-else
# if point > 20:
# print("绝对球星")
# else:
# print("未来球星")
# if-elif-else
# if point > 30:
# print("MVP球星")
# elif point >= 20:
# print("绝对球星")
# else:
# print("未来球星")
# if-elif-elif-else
if point > 30:
print("MVP球星")
elif point >=... | [
"1393699623@qq.com"
] | 1393699623@qq.com |
589cb44e6bd250ca99485e8a12bf3737b5cdbe43 | 0d0cf0165ca108e8d94056c2bae5ad07fe9f9377 | /24_Image_Processing_with_Keras_in_Python/2_Using_Convolutions/trainingACNNToClassifyClothingTypes.py | a19cd93f8c468f435f23c4ea61341e3ec4a0d1ca | [] | no_license | MACHEIKH/Datacamp_Machine_Learning_For_Everyone | 550ec4038ebdb69993e16fe22d5136f00101b692 | 9fe8947f490da221430e6dccce6e2165a42470f3 | refs/heads/main | 2023-01-22T06:26:15.996504 | 2020-11-24T11:21:53 | 2020-11-24T11:21:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,121 | py | # Training a CNN to classify clothing types
# Before training a neural network it needs to be compiled with the right cost function, using the right optimizer. During compilation, you can also define metrics that the network calculates and reports in every epoch. Model fitting requires a training data set, together wit... | [
"noreply@github.com"
] | MACHEIKH.noreply@github.com |
35567216643280a09ad3bd8935dace54d5234dbd | 2accbf8013faf4d879ebd5bf1de9767331d6c9ff | /Python/어서와 파이썬은 처음이지!/selection_sort.py | c2f36f2b8033bce395339903ad6ac0c18144ae19 | [] | no_license | egsu20/study | 5e8f7fe149342edd43378f9ccf264346f32128fe | 5a42d022f7402ee0354e3fd19769b5485205c55d | refs/heads/main | 2023-07-17T22:40:42.039749 | 2021-08-27T14:19:22 | 2021-08-27T14:19:22 | 324,571,396 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 394 | py | def selection_sort(aList):
for i in range(len(aList)):
least = i
least_value = aList[i]
for j in range(i+1, len(aList)):
if aList[j] < least_value:
least_value = aList[j]
least = j
tmp = aList[i]
aList[i] = aList[least]
aL... | [
"56678959+egsu20@users.noreply.github.com"
] | 56678959+egsu20@users.noreply.github.com |
e6c64fa2264290c17763d19942f3cc545b1e6ebe | 7089b86f90d855c7862d0b408e61a67725d0c254 | /website/migrations/0037_auto_20210129_1257.py | 9e69d14b79cb6b3aa11f06ebd0ac33962a22f43b | [] | no_license | samozzy/codamotion | 784fdeb99216f030a53f27a3c1f22041743b41f3 | 6a4a85852023d01b13459fa0cb644f1855eb752a | refs/heads/master | 2023-03-06T23:39:12.876150 | 2021-02-23T19:47:53 | 2021-02-23T19:47:53 | 334,784,978 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,129 | py | # Generated by Django 3.1.5 on 2021-01-29 12:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('website', '0036_auto_20210125_2315'),
]
operations = [
migrations.CreateModel(
name='SiteMenu',
fields=[
... | [
"sam.tosborne@googlemail.com"
] | sam.tosborne@googlemail.com |
e7d838441af4644f293ada41a9292abbeb913be1 | b08d42933ac06045905d7c005ca9c114ed3aecc0 | /src/coefSubset/evaluate/ranks/fifth/rank_2x9a_L.py | e66f7696ff621027b573962e362ee9ac48c79b60 | [] | no_license | TanemuraKiyoto/PPI-native-detection-via-LR | d148d53f5eb60a4dda5318b371a3048e3f662725 | 897e7188b0da94e87126a4acc0c9a6ff44a64574 | refs/heads/master | 2022-12-05T11:59:01.014309 | 2020-08-10T00:41:17 | 2020-08-10T00:41:17 | 225,272,083 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,204 | py | # 9 July 2019
# Kiyoto Aramis Tanemura
# Several metrics are used to assess the performance of the trained RF model, notably native ranking. This script returns a ranking of the native protein-protein complex among a decoy set. For convenience, I will define as a function and will call in a general performance assess... | [
"tanemur1@msu.edu"
] | tanemur1@msu.edu |
9a0efd92897fe170fc7b6274f6a4b78de5ba4563 | 52bb00d5e9dd936fb11aff2adb8c6d0f94849dc8 | /Stack/stackBasics.py | 02a1d2f1f7c25c4d306af354705e6860c171694f | [] | no_license | anildhaker/DataStructures | 1c7815d2bb1dc9d8ebd51e1ec868df8260557519 | e333fa5b95ecfc08a036bbeadfc4244f64361d7d | refs/heads/master | 2020-04-24T14:07:44.240689 | 2019-11-24T21:21:03 | 2019-11-24T21:21:03 | 172,009,569 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 418 | py | # Creating Stack using Arrays
from sys import maxsize
def createStack():
stack = []
return stack
def isEmpty(stack):
return (len(stack) == 0)
def push(stack, item):
stack.append(item)
def pop(stack):
if isEmpty(stack):
return (str(-maxsize - 1))
return stack.pop()
stack = createStack()
push(stack... | [
"anildhaker777@gmail.com"
] | anildhaker777@gmail.com |
8652501aa9d3ac641cd3ee899b3d58665f34fa0b | 051f3b084f1df675338815a12abde6a70ee5e649 | /locamapper.py | d1063feb7d8c84ecf7e11be5e316e0c669e62e8e | [] | no_license | CaMeLCa5e/daily | d952b1de9e5cb1bcb805203b0b1cde859adb2314 | e9ec40868e8085a521f009f9ccc19cd0c64c51c3 | refs/heads/master | 2020-04-26T11:25:10.130077 | 2015-04-19T19:30:45 | 2015-04-19T19:30:45 | 29,375,471 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 220 | py | import sys
for line in sys.stdin
line = line.strip()
unpacked = line.split(",")
stadium, capacity, location, surface, turf, team, opened weather = line.split(",")
results = [turf, "1"]
print("\t".join(results))
| [
"JM273606@gmail.com"
] | JM273606@gmail.com |
5f2ce7121fa780c80dfe8ccdb8e31d4f67ad3753 | 56abd8f94a511ae0d163161cb2f5e0a91d4b8bed | /datahub/investment/test/test_validate.py | 1a5ffaa2fa0b35879bda1a796d8eb999cd128ab5 | [
"MIT"
] | permissive | cgsunkel/data-hub-api | 994c58bd975d902bf2bc44b415a5892919ff4539 | a92faabf73fb93b5bfd94fd465eafc3e29aa6d8e | refs/heads/develop | 2023-05-31T22:35:56.344904 | 2021-06-30T11:23:06 | 2021-06-30T11:23:06 | 303,947,456 | 0 | 0 | MIT | 2021-06-30T10:34:50 | 2020-10-14T08:14:46 | Python | UTF-8 | Python | false | false | 1,477 | py | from datetime import date
import pytest
from freezegun import freeze_time
from datahub.investment.validate import (
_is_provided_and_is_date_in_the_past,
is_provided_and_is_date_less_than_a_year_ago,
)
@pytest.mark.parametrize(
'data_date,expected_result',
(
(
date(2019, 2, 2),
... | [
"marcus.patino-pan@digital.trade.gov.uk"
] | marcus.patino-pan@digital.trade.gov.uk |
b2006cbb7580f686445bb729d89f9d2782cd9c57 | 3f5504aff203cc15ca8754353991208962a04a90 | /src/the_tale/the_tale/game/heroes/shop_accessors.py | ee3911ac374e614437dcd8b8046989ebb6aca997 | [
"BSD-3-Clause"
] | permissive | Portal777/the-tale | 39614e60fa817a1e00e948a2b465fcb6be35e0c6 | 1a98294f6ed45d26bf5f09bdd2b4a931dbbb72e3 | refs/heads/master | 2021-08-24T01:46:11.472205 | 2017-11-04T13:31:30 | 2017-11-04T13:31:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,123 | py | # coding: utf-8
import random
from the_tale.game.balance.power import Power
from the_tale.game.artifacts.storage import artifacts_storage
from the_tale.game.cards import objects as cards_objects
class ShopAccessorsMixin(object):
__slots__ = ()
def purchase_energy_bonus(self, energy):
self.add_ener... | [
"a.eletsky@gmail.com"
] | a.eletsky@gmail.com |
a65372cb81c7b03b6c39d5f50a614eb3fe350d61 | ebfcae1c5ba2997b2ac4471d5bedc3f5daffcb31 | /repos/flaskTs-master/app/email.py | 9203880e1598384e4a0187a41bb57893fba8264d | [] | no_license | babiato/flaskapp1 | 84de2d0b26a54f5820d3bbe97926782ad41e005c | 530beb9e3b8516e0e93960b99521c23a523ef546 | refs/heads/master | 2023-02-26T16:36:49.760632 | 2021-02-04T09:08:40 | 2021-02-04T09:08:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 351 | py | from flask_mail import Message
from app import mail
from flask import render_template
def send_email(to,subject,template,**kwargs):
msg=Message("[TecnologyDreamer]"+subject,sender='879651072@qq.com',recipients=[to])
msg.body=render_template(template+'.txt',**kwargs)
msg.html=render_template(template+'.html... | [
"jinxufang@tencent.com"
] | jinxufang@tencent.com |
adf8bcf70a7abd41c6617653f5ac599ad6aff3cc | f260ff31ba63e9cd35e21b99c577107c46135a0d | /test005/test_reduce.py | 2b49c6ecf3d3ee5062e62b927f5198f055b7b5fd | [] | no_license | wscfan/pythoncode | e1cc882139931f4257528e274f443c3c8217ec8d | 4bbe06f47b046a5078e8dd0f2ae9ccb9eeb01743 | refs/heads/master | 2021-03-20T21:12:58.580056 | 2020-12-19T16:38:10 | 2020-12-19T16:38:10 | 247,234,904 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 442 | py | from functools import reduce
def get_sum_use_python(l):
return sum(l)
def f(m, n):
return m + n
def get_sum_use_reduce(l):
return reduce(f, l)
def get_sum_use_lambda(l):
return reduce(lambda m, n: m + n,l)
if __name__ == "__main__":
l = [1, 2, 3, 5, 7]
print(get_sum_use_python(l))
prin... | [
"wshappyday@sina.com"
] | wshappyday@sina.com |
4f558c18905639160671530a35dbbf592d71058c | a15200778946f6f181e23373525b02b65c44ce6e | /Algoritmi/2019-06-25/all-CMS-submissions/2019-06-25.10:26:54.215386.VR432075.biancaneve.py | 959fb7d91ea8ff4d2875e8281f77063d1dc829c4 | [] | no_license | alberto-uni/portafoglioVoti_public | db518f4d4e750d25dcb61e41aa3f9ea69aaaf275 | 40c00ab74f641f83b23e06806bfa29c833badef9 | refs/heads/master | 2023-08-29T03:33:06.477640 | 2021-10-08T17:12:31 | 2021-10-08T17:12:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,383 | py | """
* user: VR432075
* fname: BUSATTO
* lname: ALESSANDRO
* task: biancaneve
* score: 2.0
* date: 2019-06-25 10:26:54.215386
"""
from __future__ import print_function
import sys
if sys.version_info<(3,0):
input=raw_input
def scambia(nani,p1,p2):
x=nani[p1-1]
nani[p1-1]=nani[p2-1]
nani[p2-1]=x
def ... | [
"romeo.rizzi@univr.it"
] | romeo.rizzi@univr.it |
b5c3ee3c6030d006925a30c43b0ae563408aeda9 | fe6775ca8c5b42710785e3a923974ae079f92c8f | /剑指offer/剑指 Offer 55 - I. 二叉树的深度.py | 53759e4232eb424671a0c80016e248c07bbe847d | [] | no_license | AiZhanghan/Leetcode | 41bda6676fa1a25fa19e393553c1148ed51fdf72 | 101bce2fac8b188a4eb2f5e017293d21ad0ecb21 | refs/heads/master | 2021-06-28T10:48:07.865968 | 2020-11-20T09:45:15 | 2020-11-20T09:45:15 | 188,155,059 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 499 | 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 maxDepth(self, root):
"""
Args:
root: TreeNode
Return:
int
"""
if not... | [
"35103759+AiZhanghan@users.noreply.github.com"
] | 35103759+AiZhanghan@users.noreply.github.com |
8cbe4de82e8973e9de229af929a25871f3a061bc | 20d54e88dbdab0a0335f6ae4bad22117e14eb556 | /src/py3/srtmTest.py | 475a6f72cca4bfec1cea1366608b23bc1b003792 | [] | no_license | bjohan/GnuradioTransceiver | ebf0426aabf5be4e06a52ac7a8ce941e14341ea7 | 501d68f78e40931f2f9549ab1ae1982faae464c6 | refs/heads/master | 2021-01-11T03:36:48.162992 | 2020-05-17T21:15:19 | 2020-05-17T21:15:19 | 70,995,273 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 606 | py | import matplotlib.pyplot as plt
import numpy as np
import srtmData
import heightResampler
sd = srtmData.SrtmData()
hr = heightResampler.HeightResampler(sd)
e, x, y = sd.getBlock(12, 57)
print(x)
print(y)
#plt.figure(1)
#plt.imshow(np.clip(e, 0, 10000), extent=[x[0], x[-1], y[-1], y[0]])
plt.figure(2)
xr = np.linspac... | [
"you@example.com"
] | you@example.com |
6b8be3ce5a2307b8c3529e0eb27f4790497e0059 | 5eb29ce7104e10a399d9afd7e253f029bf8bc0ff | /scripts/tests/test_get_sim.py | fd8d224e2bcce56d015705e64cd8d67421aa30a1 | [
"BSD-2-Clause"
] | permissive | svebk/DeepSentiBank_memex | 69789dc09316e97aad711edeb251837a60184e7e | 4e69ce66e3a177817ff360ddc263f55c6e0b63f7 | refs/heads/master | 2021-01-18T18:55:10.870052 | 2017-10-19T22:51:29 | 2017-10-19T22:51:29 | 36,091,024 | 22 | 1 | null | 2017-02-09T20:31:20 | 2015-05-22T19:20:54 | Python | UTF-8 | Python | false | false | 350 | py | import happybase
if __name__=="__main__":
tab_image = 'escorts_images_similar_row'
conn = happybase.Connection(host='10.1.94.57')
image_sha1s = '1000013C0A38D8DACAEC31360AFAFEB5DC3D712B'
table = conn.table(tab_image)
row = table.row(image_sha1s,columns=['s'])
print len(row.keys()),[x.split(... | [
"svebor.karaman@gmail.com"
] | svebor.karaman@gmail.com |
bfea27733e3baaa41e1cf44c97e610c37ea4f198 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03049/s868278541.py | b3f9160fdd19cecfb8e58fc70735fa3e21e93802 | [] | 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 | 464 | py | n=int(input())
a_num=0
b_num=0
set_num=0
ans=0
for i in range(n):
s=list(input())
for j in range(len(s)-1):
if s[j]+s[j+1]=="AB":
ans+=1
if s[0]=="B" and s[-1]=="A":
set_num+=1
elif s[0]=="B":
b_num+=1
elif s[-1]=="A":
a_num+=1
if set_num==0:
print(ans... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
a59e67e2f7499c2085d18c176ceba106f3d6e308 | ad0857eaba945c75e705594a53c40dbdd40467fe | /leetCode/number_of_papers_1780.py | dace9f5d455a28a9951f765e1c89a67e75850822 | [
"MIT"
] | permissive | yskang/AlgorithmPractice | c9964d463fbd0d61edce5ba8b45767785b0b5e17 | 3efa96710e97c8740d6fef69e4afe7a23bfca05f | refs/heads/master | 2023-05-25T13:51:11.165687 | 2023-05-19T07:42:56 | 2023-05-19T07:42:56 | 67,045,852 | 0 | 0 | null | 2021-06-20T02:42:27 | 2016-08-31T14:40:10 | Python | UTF-8 | Python | false | false | 1,602 | py | # Title: 종이의 개수
# Link: https://www.acmicpc.net/problem/1780
import sys
sys.setrecursionlimit(10 ** 6)
def read_list_int():
return list(map(int, sys.stdin.readline().strip().split(' ')))
def read_single_int():
return int(sys.stdin.readline().strip())
def check_all_number(matrix, start_x, start_y, length... | [
"yongsung.kang@gmail.com"
] | yongsung.kang@gmail.com |
d28596a3b41c60b5e98f6cde6ebd4cf085d4d579 | 42cbf381d6d12b29a5212f3e8482ebde2067758b | /3 - Estrutura de Repetição/9nv.py | c87bfb1840eb522246d2b97d6b305cbc5d05d381 | [] | no_license | loristron/PythonExercisesLearnPython | d76d0f7d0b96b76ca463c0d431814a6ba74bbe74 | c98a903900b41733980a5a13017dc1901b1ecee7 | refs/heads/master | 2023-02-09T12:46:44.885145 | 2021-01-07T19:39:33 | 2021-01-07T19:39:33 | 327,707,915 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 284 | py | # -*- coding: utf-8 -*-
"""
Created on Thu Jun 25 13:11:08 2020
@author: loris
Faça um programa que imprima na tela apenas os números ímpares entre 1 e 50.
"""
lista = []
for n in range (1, 50):
if n % 2 != 0:
print(n)
lista.append(n)
print(lista)
| [
"loremmiranda@gmail.com"
] | loremmiranda@gmail.com |
db978cb55308c9705010fe8e0799d0f3dfcee515 | 62ccdb11daefaecc8e63f235c7519cc7594f705a | /images/google-cloud-sdk/lib/googlecloudsdk/command_lib/compute/instance_groups/managed/rolling_action.py | 62c3d07cac5b5ba9303df7b4585f2a7c5fcf9414 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | hiday1979/kalabasa-mas | eccc869bfe259bb474f9d2a4dc4b8561a481f308 | 53a9818eb2a6f35ee57c4df655e7abaaa3e7ef5b | refs/heads/master | 2021-07-05T16:34:44.962142 | 2018-07-10T10:22:24 | 2018-07-10T10:22:24 | 129,709,974 | 0 | 1 | null | 2020-07-24T22:15:29 | 2018-04-16T08:27:13 | Python | UTF-8 | Python | false | false | 4,470 | py | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | [
"accounts@wigitech.com"
] | accounts@wigitech.com |
d5b44d84be7c7901c1635edaa14a5f4c9d9321c6 | fa04309288a0f8b2daae2fd73c8224a1c0ad4d95 | /eventkit_cloud/utils/tests/test_wcs.py | 14f1277c8a48f019d673a0273edd556c62f11626 | [] | no_license | jj0hns0n/eventkit-cloud | 7bb828c57f29887621e47fe7ce0baa14071ef39e | 2f749090baf796b507e79251a4c4b30cb0b4e126 | refs/heads/master | 2021-01-01T19:45:32.464729 | 2017-07-24T19:01:24 | 2017-07-24T19:01:24 | 98,675,805 | 0 | 0 | null | 2017-07-28T18:16:34 | 2017-07-28T18:16:34 | null | UTF-8 | Python | false | false | 2,133 | py | # -*- coding: utf-8 -*-
import logging
import os
from mock import Mock, patch
from django.conf import settings
from django.test import TransactionTestCase
from string import Template
from ..wcs import WCStoGPKG, WCStoGeotiff
from uuid import uuid4
logger = logging.getLogger(__name__)
class TestWCSToGPKG(TransactionT... | [
"joseph.svrcek@rgi-corp.com"
] | joseph.svrcek@rgi-corp.com |
c7d90f35e98f547498e4ac58bd24c52bf0e03f4f | 9404b743f04a87626f117e394ed0877445f88efe | /DK_Project/market/urls.py | 0e353a9701ea3776ba2bdda7ad4315f8865da274 | [
"Apache-2.0"
] | permissive | xedporject/DK | 3497ddfb03521d856e3e9a1874e310db30d64fee | af8f9521011ac1ee0256db4863220abbbf9699ac | refs/heads/master | 2020-03-24T22:37:29.871222 | 2018-08-11T07:42:47 | 2018-08-11T07:42:47 | 143,094,839 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 409 | py |
from django.conf.urls import url
from rest_framework.routers import SimpleRouter
from market import views
router = SimpleRouter()
router.register(r'^goods', views.GoodsApi)
router.register(r'brand', views.BrandApi)
router.register(r'category', views.CategoryApi)
urlpatterns = [
url(r'^index/', views.index, nam... | [
"1367000465@qq.com"
] | 1367000465@qq.com |
d51e0b54497d62f9511db1030a8af93fea2fdc67 | 931a3304ea280d0a160acb87e770d353368d7d7d | /vendor/swagger_client/models/get_fw_leaderboards_characters_active_total.py | 84445a28e19347e99ebfd6bf4119f7a6f4c946d2 | [] | no_license | LukeS5310/Broadsword | c44786054e1911a96b02bf46fe4bdd0f5ad02f19 | 3ba53d446b382c79253dd3f92c397cca17623155 | refs/heads/master | 2021-09-08T00:05:26.296092 | 2017-10-24T07:01:48 | 2017-10-24T07:01:48 | 105,143,152 | 0 | 1 | null | 2017-11-03T14:29:38 | 2017-09-28T12:03:19 | Python | UTF-8 | Python | false | false | 3,883 | py | # coding: utf-8
"""
EVE Swagger Interface
An OpenAPI for EVE Online
OpenAPI spec version: 0.6.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class GetFwLeaderboardsCharactersActiveTotal(object):
"""
... | [
"cyberlibertyx@gmail.com"
] | cyberlibertyx@gmail.com |
742ac4cb0de10696de786121651155b128a26bc5 | 1e4c7e1c949bd6c396454dccab5a17ed543c5546 | /snippets/settings.py | 76d838983684016722954ac2dda015c565ddf7b5 | [] | no_license | Kennedy-Njeri/Registration-Token-Based-Authentication | 05f621f4e2a3445c6685af1e73921aee009f234b | 464629b94a831bb8e41ddbbea913c6e37d9f8217 | refs/heads/master | 2020-05-09T19:10:45.680297 | 2019-04-14T21:04:09 | 2019-04-14T21:04:09 | 181,367,071 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,620 | py | """
Django settings for snippets project.
Generated by 'django-admin startproject' using Django 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/
"""
import os
# ... | [
"mistakenz123@gmail.com"
] | mistakenz123@gmail.com |
b3ce66d5ab56ec78ae434f553712d4027996e0c8 | 7bf377472dea25a39933e34726dc581e8f7efb6f | /4_lr_analysis/get_lu_data.py | 393f8e9613fef98a48f8ad3e0c721ad64001b5b4 | [] | no_license | gordonje/deadly_work | 8fe655cca4fea522842609cfdc7fff1582cd4775 | cdd8586eaf71b643b2076ef4389333a64e04da8e | refs/heads/master | 2021-01-21T08:01:09.981286 | 2015-03-20T02:55:28 | 2015-03-20T02:55:28 | 21,902,373 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,707 | py | import getpass
import psycopg2
import requests
db = raw_input("Enter name of target database:")
user = raw_input("Enter your PostgreSQL username (this might just be 'postgres'):")
password = getpass.getpass("Enter your PostgreSQL user password:")
conn = psycopg2.connect("dbname=%(db)s user=%(user)s password=%... | [
"gordon.je@gmail.com"
] | gordon.je@gmail.com |
20d016d8c835bb90dcdfc491f101ee23416a4a9d | 0ccb70cd22862f5c1617113cec62fb4438093ce7 | /src/gamer/application/tests/fixtures.py | 1667dcd3275df70908ece80cd9b9f344daf4c45a | [] | no_license | socek/gamer | f4590a557819047158c1a8c0e9605632dbaac58c | 040216b44d38f2ab5a111cb55981645d331c2ba3 | refs/heads/master | 2020-09-13T09:42:26.427433 | 2014-10-26T19:44:17 | 2014-10-26T22:23:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 185 | py | from haplugin.toster.fixtures import Fixtures as Base
class Fixtures(Base):
def __call__(self):
# example:
# self.create_nameless(Model, name=value)
pass
| [
"msocek@gmail.com"
] | msocek@gmail.com |
d7893781c8869541e806fcbcbc353555c39f40fe | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_280/ch39_2020_03_31_00_53_54_201792.py | 47ea9f05865c88712d8501fe79b7fc7736d39472 | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 284 | py | def tamanho(x):
i = 1
while x != 1:
if x%2 == 0:
x = x/2
else:
x = 3*x + 1
i += 1
return i
nms = 1
ms = 1
x = 2
while 1 < x < 1000:
if tamanho(x) >= ms:
ms = tamanho (x)
nms = x
x = x + 1
print(nms) | [
"you@example.com"
] | you@example.com |
6b0a7bd2d974d61447504b9f0b45adcff16dc291 | f4d710f68d715470905daa1245f3b9f4f4c4cef5 | /local_settings.py | da93c18c7fe1d80df9288fb1a2a37e53e9ee22de | [] | no_license | powellc/findhistory_me | c3044a894840e62f12bb2ee4dc0ad7dbe8a524fd | d72eb449eb0e15f0d62a46986ad8551ab1cb66ca | refs/heads/master | 2016-09-15T20:55:57.994241 | 2014-04-15T03:56:18 | 2014-04-15T03:56:18 | 10,428,262 | 0 | 0 | null | 2014-04-15T03:54:33 | 2013-06-01T20:46:48 | JavaScript | UTF-8 | Python | false | false | 658 | py |
DEBUG = True
AWS_ACCESS_KEY_ID = 'AKIAIC6KSWVHASDPKERQ'
AWS_SECRET_ACCESS_KEY = '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'
DATABASES = {
"default": {
# Ends with "postgresql_psycopg2", "mysql", "sqlite3" or "oracle".
"ENGINE": "django.db.backends.sqlite3",
# DB name or path to database fil... | [
"colin.powell@gmail.com"
] | colin.powell@gmail.com |
83b6521cbb69e918d5adf86d3847e2be974e7380 | 33c1c5d0f48ad952776fe546a85350a441d6cfc2 | /ABC/125/B.py | 8f6837817b70aa2610cc83b398e4c54f113aa439 | [] | no_license | hisyatokaku/Competition | 985feb14aad73fda94804bb1145e7537b057e306 | fdbf045a59eccb1b2502b018cab01810de4ea894 | refs/heads/master | 2021-06-30T18:48:48.256652 | 2020-11-16T11:55:12 | 2020-11-16T11:55:12 | 191,138,764 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 155 | py | N = int(input())
S = input()
K = int(input())
tar = S[K-1]
ans = ""
for c in S:
if c != tar:
ans += "*"
else:
ans += c
print(ans)
| [
"hisyatokaku2005@yahoo.co.jp"
] | hisyatokaku2005@yahoo.co.jp |
1c8511d43344a1e4d70820bed6125f0579cc50c8 | c112831974be5aa036a74bbe1bf3798a4f9a5907 | /Python基础教程学习代码/venv/Scripts/pip3.7-script.py | 5cd47a7d356bee3623bf1d548ec06ba97a352e59 | [] | no_license | MuSaCN/PythonLearning_old1 | 5e1cb069d80cbe9527c179877b0d2026072c45c0 | c9aa0938875959526cf607344c1094a8fbf76400 | refs/heads/master | 2020-07-31T23:51:08.591550 | 2019-09-24T10:59:46 | 2019-09-24T10:59:46 | 210,792,257 | 0 | 0 | null | null | null | null | WINDOWS-1252 | Python | false | false | 443 | py | #!C:\Users\i2011\PycharmProjects\Python»ù´¡½Ì³Ìѧϰ\venv\Scripts\python.exe -x
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip3.7'
__requires__ = 'pip==10.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)?$... | [
"39754824+MuSaCN@users.noreply.github.com"
] | 39754824+MuSaCN@users.noreply.github.com |
06dc48c81124fea793ef637fde3fec4caa144662 | 8f5ee885986e9a0ec8816c32a9ad2966fb747f7d | /src/aido_schemas/estimation_demo.py | eb7931f53cb1b8c34e57b5ea740582f2ec41d9cf | [] | no_license | duckietown/aido-protocols | 3cca7564738d645785a5cc242bb39fd53936af0a | 47b551d80151a76aba05f76a13e516f9fa06749c | refs/heads/daffy | 2023-04-13T08:57:28.079004 | 2022-11-29T13:18:35 | 2022-11-29T13:18:35 | 169,989,925 | 1 | 1 | null | 2021-10-31T22:48:30 | 2019-02-10T15:00:05 | Python | UTF-8 | Python | false | false | 523 | py | from .basics import InteractionProtocol
__all__ = ["protocol_simple_predictor"]
protocol_simple_predictor = InteractionProtocol(
description="""
An estimator receives a stream of values and must predict the next value.
""".strip(),
inputs={"observations": float, "seed": int, "get_prediction": type(None)... | [
"acensi@ethz.ch"
] | acensi@ethz.ch |
afbe0a36ff1f83a9c1ebd24646a5d41fef49fe65 | 73c05ee0cbc54dd77177b964f3a72867138a1f0f | /interview/CyC2018_Interview-Notebook/剑指offer/41_2.py | 6ab655dbf45728e3718151f3849c4ee7f6f8943e | [] | no_license | tb1over/datastruct_and_algorithms | 8be573953ca1cdcc2c768a7d9d93afa94cb417ae | 2b1c69f28ede16c5b8f2233db359fa4adeaf5021 | refs/heads/master | 2020-04-16T12:32:43.367617 | 2018-11-18T06:52:08 | 2018-11-18T06:52:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 484 | py | # -*- coding: utf-8 -*-
"""题目描述
请实现一个函数用来找出字符流中第一个只出现一次的字符。例如,当从字符流中只读出前两个字符"go"时,第一个只出现一次的字符是"g"。当从该字符流中读出前六个字符“google"时,第一个只出现一次的字符是"l"。
"""
class Solution:
# 返回对应char
def FirstAppearingOnce(self):
# write code here
def Insert(self, char):
# write code here
| [
"mitree@sina.com"
] | mitree@sina.com |
59abb941173fc174e7c1871a202d8b4af137e040 | 68ee9027d4f780e1e5248a661ccf08427ff8d106 | /extra/unused/qgisRasterColorscale.py | 1ced8315150eba200810e34a79bad3ffd8fa1c6c | [
"MIT"
] | permissive | whyjz/CARST | 87fb9a6a62d39fd742bb140bddcb95a2c15a144c | 4fc48374f159e197fa5a9dbf8a867b0a8e0aad3b | refs/heads/master | 2023-05-26T20:27:38.105623 | 2023-04-16T06:34:44 | 2023-04-16T06:34:44 | 58,771,687 | 17 | 4 | MIT | 2021-03-10T01:26:04 | 2016-05-13T20:54:42 | Python | UTF-8 | Python | false | false | 1,429 | py | #!/usr/bin/python
# qgisRasterColorscale.py
# Author: Andrew Kenneth Melkonian
# All rights reserved
def qgisRasterColorscale(qgs_path, qml_path):
assert os.path.exists(qgs_path), "\n***** ERROR: " + qgs_path + " does not exist\n";
assert os.path.exists(qml_path), "\n***** ERROR: " + qml_path + " does not exist... | [
"wz278@cornell.edu"
] | wz278@cornell.edu |
2bfb834c61e5fd67368ad0fbc61cdbb04f3ac348 | 1a4bc1a11fdb3f714f22f5e0e826b47aa0569de2 | /lab/lab09/tests/q3_2.py | ca45e1c7feda06578903f5453e3fdb3f09c5adcf | [] | no_license | taylorgibson/ma4110-fa21 | 201af7a044fd7d99140c68c48817306c18479610 | a306e1b6e7516def7de968781f6c8c21deebeaf5 | refs/heads/main | 2023-09-05T21:31:44.259079 | 2021-11-18T17:42:15 | 2021-11-18T17:42:15 | 395,439,687 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 657 | py | test = { 'name': 'q3_2',
'points': None,
'suites': [ { 'cases': [ { 'code': ">>> # Make sure your column labels are correct.\n>>> set(faithful_predictions.labels) == set(['duration', 'wait', 'predicted wait'])\nTrue",
'hidden': False,
... | [
"taylorgibson@gmail.com"
] | taylorgibson@gmail.com |
c4ac861f2ee0b8e2fc382f3d37a11fd699b479ca | a1bffcd8854e1843e56bb812d4d83b3161a5211e | /plugins/lookup/cyberarkpassword.py | 79e855c22d4b5573ba40e8c231017a3b2e10e868 | [] | no_license | goneri/ansible.community | 1a71f9d98c164b77f8ed2ed7f558b4963005ff8f | f26f612dd0a3154050d90b51a75502018c95f6e4 | refs/heads/master | 2020-12-29T07:47:35.353515 | 2020-01-22T17:43:18 | 2020-01-22T17:43:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,196 | py | # (c) 2017, Edward Nunez <edward.nunez@cyberark.com>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
lookup: cyberarkpassword
short... | [
"ansible_migration@example.com"
] | ansible_migration@example.com |
27f10dff9fe70eb67bbbd8be5e27c8ee089b46f9 | 65dce36be9eb2078def7434455bdb41e4fc37394 | /454 4Sum II.py | c5d654a137c6a70d3df07a7fcec921b7407065cd | [] | no_license | EvianTan/Lintcode-Leetcode | 9cf2d2f6a85c0a494382b9c347bcdb4ee0b5d21a | d12dd31e98c2bf24acc20c5634adfa950e68bd97 | refs/heads/master | 2021-01-22T08:13:55.758825 | 2017-10-20T21:46:23 | 2017-10-20T21:46:23 | 92,607,185 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,131 | py | '''
Given four lists A, B, C, D of integer values, compute how many tuples (i, j, k, l) there are such that A[i] + B[j] + C[k] + D[l] is zero.
To make problem a bit easier, all A, B, C, D have same length of N where 0 ≤ N ≤ 500. All integers are in the range of -228 to 228 - 1 and the result is guaranteed to be at mos... | [
"yiyun.tan@uconn.edu"
] | yiyun.tan@uconn.edu |
9b782c688e0dd74223de5b199c0bc92e6fa39895 | 2bb90b620f86d0d49f19f01593e1a4cc3c2e7ba8 | /pardus/tags/2007.1/server/openldap/actions.py | cb88cc11802e70a1cca7ea9961bec056dfadb4c4 | [] | no_license | aligulle1/kuller | bda0d59ce8400aa3c7ba9c7e19589f27313492f7 | 7f98de19be27d7a517fe19a37c814748f7e18ba6 | refs/heads/master | 2021-01-20T02:22:09.451356 | 2013-07-23T17:57:58 | 2013-07-23T17:57:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,360 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2005, 2006 TUBITAK/UEKAE
# Licensed under the GNU General Public License, version 2.
# See the file http://www.gnu.org/copyleft/gpl.txt.
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
from pisi.a... | [
"yusuf.aydemir@istanbul.com"
] | yusuf.aydemir@istanbul.com |
7b8466f0376f6de64cf039644fc1465308b1e644 | e1c5b001b7031d1ff204d4b7931a85366dd0ce9c | /EMu/2016/plot_fake/check_data.py | 285e253d884fcbc8e17661669330414a85534585 | [] | no_license | fdzyffff/IIHE_code | b9ff96b5ee854215e88aec43934368af11a1f45d | e93a84777afad69a7e63a694393dca59b01c070b | refs/heads/master | 2020-12-30T16:03:39.237693 | 2020-07-13T03:06:53 | 2020-07-13T03:06:53 | 90,961,889 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 823 | py | import ROOT
try:
tchain=ROOT.TChain('tap')
tchain.Add('data_2016B_DoubleEG.root')
except:
print "errors!"
run_list = []
n_passed1 = 0
totalEntry = tchain.GetEntries()
for iEntry in range(0, tchain.GetEntries()):
tchain.GetEntry(iEntry)
if tchain.ev_run_out not in run_list:run_list.append(tchain.ev... | [
"1069379433@qq.com"
] | 1069379433@qq.com |
e97e4caa02a91f4185685942cc774181c4259b6c | caaf56727714f8c03be38710bc7d0434c3ec5b11 | /homeassistant/components/avri/__init__.py | 3165b6ee87a77f41cca449f635f51943bbe62923 | [
"Apache-2.0"
] | permissive | tchellomello/home-assistant | c8db86880619d7467901fd145f27e0f2f1a79acc | ed4ab403deaed9e8c95e0db728477fcb012bf4fa | refs/heads/dev | 2023-01-27T23:48:17.550374 | 2020-09-18T01:18:55 | 2020-09-18T01:18:55 | 62,690,461 | 8 | 1 | Apache-2.0 | 2023-01-13T06:02:03 | 2016-07-06T04:13:49 | Python | UTF-8 | Python | false | false | 1,572 | py | """The avri component."""
import asyncio
from datetime import timedelta
import logging
from avri.api import Avri
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from .const import (
CONF_COUNTRY_CODE,
CONF_HOUSE_NUMBER,
CONF_HOUSE_NUMBER_EXTENSION,
CO... | [
"noreply@github.com"
] | tchellomello.noreply@github.com |
961cc26729281f013409614ad41160edb6caace8 | a97f789530412fc1cb83170a11811f294b139ee8 | /疯狂Python讲义/codes/10/10.8/dict_vs_defaultdict.py | 271ff0662c308adfa488ad5cc5242ed3fdbd5820 | [] | no_license | baidongbin/python | 3cebf2cc342a15b38bf20c23f941e6887dac187a | 1c1398bff1f1820afdd8ddfa0c95ccebb4ee836f | refs/heads/master | 2021-07-21T19:23:32.860444 | 2020-03-07T11:55:30 | 2020-03-07T11:55:30 | 195,909,272 | 0 | 1 | null | 2020-07-21T00:51:24 | 2019-07-09T01:24:31 | Python | UTF-8 | Python | false | false | 244 | py | from collections import defaultdict
my_dict = {}
# 使用 int 作为 defaultdict 的 default_factory
# 当 key 不存在时,将会返回 int 函数的返回值
my_defaultdict = defaultdict(int)
print(my_defaultdict['a'])
print(my_dict['a'])
| [
"baidongbin@thunisoft.com"
] | baidongbin@thunisoft.com |
a5230b855b505b17f14791a0061759b8f1b21930 | fa27b2e9668484959772c6ac37622a7442396347 | /sharing/app/api_1_0/register.py | 039c61f8e235d2d4e7f5478a4cc4115a74de729a | [] | no_license | tangxiangru/2017-sharing-backend | 5a3cc9ba6c22944046ae99221bee70245e326ffd | 0905e38c9a30296cf01950efa6eed2708807f957 | refs/heads/master | 2021-01-13T11:30:24.026822 | 2017-02-11T18:56:29 | 2017-02-11T18:56:29 | 81,680,679 | 1 | 0 | null | 2017-02-11T20:37:08 | 2017-02-11T20:37:08 | null | UTF-8 | Python | false | false | 994 | py | #coding:utf-8
from flask import jsonify, redirect, request, url_for, flash
from ..models import User
from .. import db
from . import api
#注册
@api.route('/register/',methods = ['POST'])
def register():
if request.method == 'POST':
email = request.get_json().get("email")
password = reques... | [
"504490160@qq.com"
] | 504490160@qq.com |
a5e994b745288becf5f7c50b640bea1b03d4ad05 | ae88dd2493c2329be480030f87e6e2a91470e255 | /src/python/DQIS/Client/CommandLine.py | 15d7a3b7f6f2e7ddc217564c71ac050dab93013c | [] | no_license | dmwm/DQIS | a48da3841ab6a086247ae8e437e2b5eb9e1c5048 | bd861954c2531df1bd2e9dceb2585b9acd4cbbdc | refs/heads/master | 2021-01-23T08:15:06.804525 | 2010-05-11T19:30:33 | 2010-05-11T19:30:33 | 4,423,793 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,840 | py | '''
Created on 7 May 2010
@author: metson
'''
from DQIS.API.Database import Database
from optparse import OptionParser
import json
D_DATABASE_NAME = 'dqis'
D_DATABASE_ADDRESS = 'localhost:5984'
def do_options():
op = OptionParser(version="%prog 0.1")
op.add_option("-u", "--url",
type="strin... | [
"metson@4525493e-7705-40b1-a816-d608a930855b"
] | metson@4525493e-7705-40b1-a816-d608a930855b |
f721745c59dfa425155103c807994cc344f7ce31 | 93039551fbdef0a112a9c39181d30b0c170eb3a6 | /day03/day03HomeWork.py | a399b93ad6e0b969a53525cf311c62598023889e | [] | no_license | wenzhe980406/PythonLearning | 8714de8a472c71e6d02b6de64efba970a77f6f4a | af0e85f0b11bf9d2f8e690bac480b92b971c01bb | refs/heads/master | 2020-07-14T20:46:45.146134 | 2020-05-28T12:16:21 | 2020-05-28T12:16:21 | 205,398,758 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,561 | py | # _*_ coding : UTF-8 _*_
# 开发人员 : ChangYw
# 开发时间 : 2019/7/17 17:33
# 文件名称 : day03HomeWork.PY
# 开发工具 : PyCharm
#1
# #1)
# if __name__ == "__main__":
# score = []
#
# #2)
# if __name__ == "__main__":
# score.append(68)
# score.append(87)
# score.append(92)
# score.append(100)
# s... | [
"noreply@github.com"
] | wenzhe980406.noreply@github.com |
72e99ab5f865b18e80a5fd7dbe9e887b0bcfcdbc | 8e8273a3c9b87e58e46dd6ab575a33eb6fde9f62 | /version_manager/options_set.py | e9aa203b1975a30aac22e2e044a66baa54686947 | [] | no_license | mdrotthoff/version-manager-py | 69ddd1308f1f1c896739f583f372d1af09d3d384 | e5f388ff3856f7f4f1818215422610233b2dcb1d | refs/heads/master | 2020-12-07T07:07:02.762375 | 2020-01-08T22:52:38 | 2020-01-08T22:52:38 | 232,666,355 | 0 | 0 | null | 2020-01-08T21:46:51 | 2020-01-08T21:46:50 | null | UTF-8 | Python | false | false | 782 | py | from typing import Dict, List, Optional
import yaml
def get_parameter_values(parameter_values: Dict[str, str],
values_list: Optional[List[str]]) -> Dict[str, str]:
"""
Override the parameter values that are given in the list.
It assumes each parameter is in the 'KEY=VALUE' format.... | [
"bogdan.mustiata@gmail.com"
] | bogdan.mustiata@gmail.com |
12e3936893568ce3f48ea41898acde3506eb4f06 | 52855d750ccd5f2a89e960a2cd03365a3daf4959 | /ABC/ABC52_B.py | 6a5c62026f989697559e55494fbdcbc27af93a36 | [] | no_license | takuwaaan/Atcoder_Study | b15d4f3d15d48abb06895d5938bf8ab53fb73c08 | 6fd772c09c7816d147abdc50669ec2bbc1bc4a57 | refs/heads/master | 2021-03-10T18:56:04.416805 | 2020-03-30T22:36:49 | 2020-03-30T22:36:49 | 246,477,394 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 147 | py | N = int(input())
S = input()
l = [0]
x = 0
for i in range(N):
if S[i] == "I":
x+=1
else:
x-=1
l.append(x)
print(max(l)) | [
"takutotakuwan@gmail.com"
] | takutotakuwan@gmail.com |
3a4162c73e2895e4844d4a8ce5c4a057e8fa230e | cb703e45cf56ec816eb9203f171c0636aff0b99c | /Dzien06/loger.py | 0e546809184bbae08d85b4ec2e6a1b2e188b982b | [] | no_license | marianwitkowskialx/Enzode | dc49f09f086e4ca128cd189852331d3c9b0e14fb | 67d8fd71838d53962b4e58f73b92cb3b71478663 | refs/heads/main | 2023-06-04T20:58:17.486273 | 2021-06-24T16:37:53 | 2021-06-24T16:37:53 | 366,424,571 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 581 | py |
# Przykład logowania w Pythonie
import logging
log_format="%(asctime)s:%(levelname)s:%(filename)s:%(message)s"
logging.basicConfig(
format=log_format,
handlers= [
logging.StreamHandler(),
logging.FileHandler("app1.log")
],
level=logging.DEBUG,
#filename="app.log",
datefmt="%Y-%... | [
"marian.witkowski@gmail.com"
] | marian.witkowski@gmail.com |
99c7a87a5d8431b21888a5a8c5512f6f205f3704 | fd7598754b87536d3072edee8e969da2f838fa03 | /chapter3_programming17.py | 257697649b65df0980c01265e13efa08d4a817ce | [] | no_license | dorabelme/Python-Programming-An-Introduction-to-Computer-Science | 7de035aef216b2437bfa43b7d49b35018e7a2153 | 3c60c9ecfdd69cc9f47b43f4a8e6a13767960301 | refs/heads/master | 2020-05-02T23:19:44.573072 | 2019-03-28T21:27:20 | 2019-03-28T21:27:20 | 178,261,171 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 972 | py | # Program using Newton's method to approximate square root
import math
def main():
# Title and description of the Program
print("\nSquare Root Approximator\n")
print("This program calculates the approximation of the square root of " +\
"a number using Newton's method.")
# Obtain the number to take the square ... | [
"contact.dorabelme@gmail.com"
] | contact.dorabelme@gmail.com |
e43289d08b2bee5b02db3fd8e63c0ab77b14b898 | 4f793320d5d2d003b8e32d7d0204bc152f703d31 | /hypercane/hfilter/containing_pattern.py | 948a41498d104eff2c5521e4ca164b1533d8e629 | [
"MIT"
] | permissive | himarshaj/hypercane | 77ea458e75033a51fa452c557e82eb8ff5e0f887 | 99ac84834e2aad57cdf4687469a63b6305d20e47 | refs/heads/master | 2023-03-29T22:10:48.123857 | 2021-04-13T23:17:45 | 2021-04-13T23:17:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,164 | py | import logging
import concurrent.futures
import re
from ..utils import match_pattern
module_logger = logging.getLogger('hypercane.hfilter.patterns')
def filter_pattern(input_urims, cache_storage, regex_pattern, include):
filtered_urims = []
compiled_pattern = re.compile(regex_pattern)
with concurrent.... | [
"jones.shawn.m@gmail.com"
] | jones.shawn.m@gmail.com |
bac612e62bec9e76a649f5be726257ddc8ce1646 | 1395576291c1e8b34981dbcbfcd0fdda020083b8 | /dist_cts/dist_fleet/thirdparty/simnet_bow/dataset_generator.py | 4e3b7a3565639c5154043bbc8179ef3b0a6d635f | [] | no_license | gentelyang/scripts | a8eb8a3cc5cc5bac753f1bb12033afaf89f03404 | e3562ab40b574f06bba68df6895a055fa31a085d | refs/heads/master | 2023-06-06T12:38:37.002332 | 2021-06-15T05:09:06 | 2021-06-15T05:09:06 | 262,957,519 | 0 | 4 | null | 2021-01-10T08:28:11 | 2020-05-11T06:28:08 | Python | UTF-8 | Python | false | false | 2,500 | py | #!/usr/bin/env python
#-*- coding:utf-8 -*-
# @Time : 2019-09-26 17:30
# @Author : liyang109
from __future__ import print_function
import paddle.fluid.incubate.data_generator as dg
import random
class PairwiseReader(dg.MultiSlotDataGenerator):
def init_reader(self, max_len, sampling_rate):
# np.random.... | [
"liyang109@baidu.com"
] | liyang109@baidu.com |
cce4b96a715d43f53534c19733cad518beb38e8e | 0d5c77661f9d1e6783b1c047d2c9cdd0160699d1 | /python/paddle/fluid/tests/test_lod_tensor.py | f7a9dd4129027417a06a6c25ff9a801fff259c5e | [
"Apache-2.0"
] | permissive | xiaoyichao/anyq_paddle | ae68fabf1f1b02ffbc287a37eb6c0bcfbf738e7f | 6f48b8f06f722e3bc5e81f4a439968c0296027fb | refs/heads/master | 2022-10-05T16:52:28.768335 | 2020-03-03T03:28:50 | 2020-03-03T03:28:50 | 244,155,581 | 1 | 0 | Apache-2.0 | 2022-09-23T22:37:13 | 2020-03-01T13:36:58 | C++ | UTF-8 | Python | false | false | 4,649 | 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... | [
"xiaoyichao@haohaozhu.com"
] | xiaoyichao@haohaozhu.com |
abcb6982c6f5dd12b149025215077f5e7fde1359 | 1959350ca45f43806e925907c298cfae2f3f355f | /test/programytest/parser/pattern/nodes_tests/test_root.py | eca847aa29bdf9535f4c7d605bb69293e405357c | [
"MIT"
] | permissive | tomliau33/program-y | 8df17ff4078a0aa292b775ef869930d71843682a | 30a3715c8501b4c2f1b4de698b679cb4bac168b1 | refs/heads/master | 2021-09-06T01:56:08.053131 | 2018-01-31T15:10:10 | 2018-01-31T15:10:10 | 114,656,850 | 0 | 0 | null | 2018-02-01T13:27:30 | 2017-12-18T15:27:54 | Python | UTF-8 | Python | false | false | 3,716 | py | from programytest.parser.pattern.base import PatternTestBaseClass
from programy.parser.exceptions import ParserException
from programy.parser.pattern.nodes.word import PatternWordNode
from programy.parser.pattern.nodes.base import PatternNode
from programy.parser.template.nodes.base import TemplateNode
from programy.... | [
"keith@keithsterling.com"
] | keith@keithsterling.com |
10adb072e9eabcec4d2ad0f61ee7d6d29b38c97c | fdcb2cdee4d5b398eed4eefc830213234e3e83a5 | /01_MIT_Learning/week_2/lectures_and_examples/3_guess_my_number.py | 12e1fa8891345cf687bad33b67bd047e96880487 | [] | no_license | daftstar/learn_python | be1bbfd8d7ea6b9be8407a30ca47baa7075c0d4b | 4e8727154a24c7a1d05361a559a997c8d076480d | refs/heads/master | 2021-01-20T08:53:29.817701 | 2018-01-15T22:21:02 | 2018-01-15T22:21:02 | 90,194,214 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,983 | py | # #######################################################
# Create a program that guesses a secret number!
# The program works as follows:
# you (user) thinks of an integer between 0 (inclusive) and 100 (not inclusive).
# The computer makes guesses, and you give it input -
# is its guess too high or too low?
# Using ... | [
"nikdaftary@gmail.com"
] | nikdaftary@gmail.com |
b2830436f10dd100a76995d67b0f77827b8fa308 | c19bcbc98555ef06276f9f0dcffc9ac35942a7c4 | /tests/test_proc_pid_maps.py | 295254aa85fb9c2904a4fc24b52c440ba608763e | [
"MIT"
] | permissive | kellyjonbrazil/jc | 4e81a5421cd20be5965baf375f4a5671c2ef0410 | 4cd721be8595db52b620cc26cd455d95bf56b85b | refs/heads/master | 2023-08-30T09:53:18.284296 | 2023-07-30T17:08:39 | 2023-07-30T17:08:39 | 215,404,927 | 6,278 | 185 | MIT | 2023-09-08T14:52:22 | 2019-10-15T22:04:52 | Python | UTF-8 | Python | false | false | 1,270 | py | import os
import unittest
import json
from typing import Dict
import jc.parsers.proc_pid_maps
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
class MyTests(unittest.TestCase):
f_in: Dict = {}
f_json: Dict = {}
@classmethod
def setUpClass(cls):
fixtures = {
'proc_pid_maps': ... | [
"kellyjonbrazil@gmail.com"
] | kellyjonbrazil@gmail.com |
67d7445176b628d391bca470696e3b4247bc6228 | aabfe137db175f0e070bd9342e6346ae65e2be32 | /RecoEcal/EgammaClusterProducers/python/islandClusteringSequence_cff.py | 57c2add9f6396084fa60b771d75bfcb922cb8181 | [] | no_license | matteosan1/cmssw | e67b77be5d03e826afd36a9ec5a6dc1b3ee57deb | 74f7c9a4cf24913e2a9f4e6805bb2e8e25ab7d52 | refs/heads/CMSSW_7_0_X | 2021-01-15T18:35:33.405650 | 2013-07-30T14:59:30 | 2013-07-30T14:59:30 | 11,789,054 | 1 | 1 | null | 2016-04-03T13:48:46 | 2013-07-31T11:06:26 | C++ | UTF-8 | Python | false | false | 797 | py | import FWCore.ParameterSet.Config as cms
#
# $Id: islandClusteringSequence.cff,v 1.7 2007/03/13 17:21:44 futyand Exp $
#
#------------------
#Island clustering:
#------------------
# Island BasicCluster producer
from RecoEcal.EgammaClusterProducers.islandBasicClusters_cfi import *
# Island SuperCluster producer
from R... | [
"sha1-197b93d87bf2e1eb4349df76c6ec25fd8f1f348e@cern.ch"
] | sha1-197b93d87bf2e1eb4349df76c6ec25fd8f1f348e@cern.ch |
c27074644766ba4228e511a9a1c884d8ec0e431b | ea262de505a1dd5ae1c7b546b85184309c3fdd35 | /src/models/modules/scales.py | 78234592ac2641e1791aa6240573f86204bde16e | [
"MIT"
] | permissive | Runki2018/CvPytorch | 306ff578c5f8d3d196d0834e5cad5adba7a89676 | 1e1c468e5971c1c2b037334f7911ae0a5087050f | refs/heads/master | 2023-08-25T09:48:48.764117 | 2021-10-15T05:11:21 | 2021-10-15T05:11:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 445 | py | # !/usr/bin/env python
# -- coding: utf-8 --
# @Time : 2021/3/29 9:22
# @Author : liumin
# @File : scales.py
import torch
import torch.nn as nn
class Scale(nn.Module):
"""
A learnable scale parameter
"""
def __init__(self, scale=1.0):
super(Scale, self).__init__()
se... | [
"569793357@qq.com"
] | 569793357@qq.com |
3835bd462d27894a5442d6a412b2dd67de3d593d | 675cdd4d9d2d5b6f8e1383d1e60c9f758322981f | /supervised_learning/0x03-optimization/2-shuffle_data.py | 1fc0ce20d6f011ea71c6f64624e3d65b15d7e653 | [] | no_license | AndresSern/holbertonschool-machine_learning-1 | 5c4a8db28438d818b6b37725ff95681c4757fd9f | 7dafc37d306fcf2ea0f5af5bd97dfd78d388100c | refs/heads/main | 2023-07-11T04:47:01.565852 | 2021-08-03T04:22:38 | 2021-08-03T04:22:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 280 | py | #!/usr/bin/env python3
"""
Shuffles the data points in two matrices the same way
"""
import numpy as np
def shuffle_data(X, Y):
"""
Shuffles the data points in two matrices the same way
"""
i = np.random.permutation(np.arange(X.shape[0]))
return X[i], Y[i]
| [
"bouzouitina.hamdi@gmail.com"
] | bouzouitina.hamdi@gmail.com |
0b90df7dbd721ecc641998896bff6d7087d4c28c | ac0a583e4765f2b5b97e898f30d6df0fc71ea8f6 | /pyros_msgs/opt_as_nested/__init__.py | 4beab2c01e9a05fe2344eb3a0f0e64941a108eae | [
"MIT"
] | permissive | pyros-dev/pyros-msgs | 5ce9efaa246ffa94396552fd6034c0eeacddeb76 | 28d9d6aa3cfbb42d154360f16eea1900be518f74 | refs/heads/master | 2022-07-06T15:53:16.764600 | 2018-02-17T15:03:36 | 2018-02-17T15:03:36 | 67,676,303 | 1 | 3 | MIT | 2022-06-21T21:19:34 | 2016-09-08T06:45:37 | Python | UTF-8 | Python | false | false | 347 | py | from __future__ import absolute_import
from __future__ import print_function
"""
pyros_msgs.opt_as_nested is a module that declares optional fields as a specific message type.
This is useful if you want to express an optional field in a message without any ambiguity.
"""
from .opt_as_nested import duck_punch
__al... | [
"asmodehn@gmail.com"
] | asmodehn@gmail.com |
d0dade868cb00ef5e103594ae46c0d072fcbd126 | e94d22cdb7c73b8a55262d5a6c2c7b0d75f3b63e | /snussum/analytics/management/commands/createanalytics.py | 6aae31665b387f93092ff96a50482be7c680c3e8 | [] | no_license | dobestan/snussum | 594d1169cc6a0a799c8104135dc028d65a3967d0 | 4f1f092a4c5cebd913a64c5a0d7f12b3e061552f | refs/heads/master | 2021-01-18T18:25:00.237448 | 2015-06-01T06:03:29 | 2015-06-01T06:03:29 | 34,576,643 | 8 | 2 | null | null | null | null | UTF-8 | Python | false | false | 417 | py | from django.core.management.base import BaseCommand, CommandError
from analytics.models.demographic import Demographic
class Command(BaseCommand):
help = "Create Analytics Data"
def add_arguments(self, parser):
pass
def handle(self, *args, **options):
demograhic = Demographic.objects.cr... | [
"dobestan@gmail.com"
] | dobestan@gmail.com |
d457f176565b80c978bfb00733dec4d02f4861d8 | 256644d14bd15f8e1a3e92c95b1655fd36681399 | /pure_python/ga+ppm/main/utilities.py | a07447f3183438919021284b04c4c34a872f020c | [] | no_license | mfbx9da4/neuron-astrocyte-networks | 9d1c0ff45951e45ce1f8297ec62b69ee4159305a | bcf933491bdb70031f8d9c859fc17e0622e5b126 | refs/heads/master | 2021-01-01T10:13:59.099090 | 2018-06-03T12:32:13 | 2018-06-03T12:32:13 | 12,457,305 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,262 | py | import random
import math
from pylab import zeros, where, array, empty_like
def crossover(m1, m2, NN):
# Maybe could be sped up using flatten/reshape output?
net = NN()
r = random.randint(0, net.wi.size + net.wo.size)
output1 = [empty_like(net.wi), empty_like(net.wo)]
output2 = [empty_like(net.wi... | [
"dalberto.adler@gmail.com"
] | dalberto.adler@gmail.com |
a775e4b0f818ac2bdd927c36c645d58aea22d114 | 389d95ee1f8d4ba992114e36c5fc427d02ba2a6c | /flexmessage_project/settings.py | ef5e0ea9c78442b5078ec03584e4b733d9fc65ac | [
"MIT"
] | permissive | adepeter/sleekmessage | d7a6b4279f6a60659cf8a98897136ca22c1b830a | 64621842cb9b0d707523e87f8bd6549d4e2d8433 | refs/heads/master | 2022-11-16T23:58:18.477628 | 2020-07-15T15:50:16 | 2020-07-15T15:50:16 | 265,276,882 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,406 | py | """
Django settings for flexmessage_project project.
Generated by 'django-admin startproject' using Django 3.0.4.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
... | [
"adepeter26@gmail.com"
] | adepeter26@gmail.com |
f53f414f7ee5fbc8b13847a32418970ec312c561 | 4af454bced0f99e4ed8269d71e97284f0ef13afb | /loginserver/keys/rsa.py | 02c4c9811d4e423b0a531fa48b9e687d9ba12cbd | [] | no_license | L2jBrasil/L2py | c46db78238b4caf272a2399f4e4910fc256b3cca | d1c2e7bddb54d222f9a3d04262c09ad70329a226 | refs/heads/master | 2022-11-19T01:39:02.019777 | 2020-07-24T20:07:15 | 2020-07-24T20:07:15 | 292,115,581 | 1 | 1 | null | 2020-09-01T21:53:54 | 2020-09-01T21:53:54 | null | UTF-8 | Python | false | false | 2,315 | py | from Cryptodome.PublicKey import RSA
from M2Crypto import BIO
from M2Crypto import RSA as M2RSA
from common.helpers.bytearray import ByteArray
class L2RsaKey(RSA.RsaKey):
def scramble_mod(self) -> bytes:
n = ByteArray(self.n_bytes)
# step 1: 0x4d - 0x50 <-> 0x00 - 0x04
for i in range(4)... | [
"yurzs@icloud.com"
] | yurzs@icloud.com |
3ed03f450ecd93b825fa1583fb79154b40c83ff4 | 70d4ef0863906b3ca64f986075cd35b8412b871e | /packages/blueking/component/apis/sops.py | 9446f23f6bd7a4629b842b45ea8ea69b7a4e32f0 | [
"MIT",
"BSD-3-Clause",
"BSL-1.0",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | selinagyan/bk-sops | 72db0ac33d9c307f51769e4baa181ceb8e1b279e | 39e63e66416f688e6a3641ea8e975d414ece6b04 | refs/heads/master | 2020-05-07T16:44:33.312442 | 2019-04-11T02:09:25 | 2019-04-11T02:09:25 | 180,696,241 | 0 | 0 | null | 2019-04-11T02:07:11 | 2019-04-11T02:07:10 | null | UTF-8 | Python | false | false | 2,426 | py | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | [
"pagezhou@tencent.com"
] | pagezhou@tencent.com |
602d5661471469217459de0236ec43a9a1f0e8de | 81344c55ed60bf12818d1a0ec246f3c24c79cb4c | /力扣习题/8字符串转整数/atoi.py | 73fb9e626ac6852e2287bfbded03dddd0161775c | [
"MIT"
] | permissive | lollipopnougat/AlgorithmLearning | 7d5c4a37bd5c814c5caea6963e81fbe0cb44b7b7 | cb13caa0159f0179d3c1bacfb1801d156c7d1344 | refs/heads/master | 2023-05-11T04:47:09.758889 | 2023-05-07T06:55:48 | 2023-05-07T06:55:48 | 194,078,151 | 7 | 2 | MIT | 2023-03-25T01:23:44 | 2019-06-27T10:53:08 | Python | UTF-8 | Python | false | false | 144 | py | class Solution:
def myAtoi(self, str: str) -> int:
return max(min(int(*re.findall('^[\+\-]?\d+', str.lstrip())), 2**31 - 1), -2**31) | [
"ab2defg145@gmail.com"
] | ab2defg145@gmail.com |
889a29dd98a7786a22e8d2fbde68e5a1ce2d4137 | a6ed0c42659f54f88024a9171c353e7cbe51328e | /Python/flask_MySQL/emailval/server.py | 1d9d6e7aa490bb6f47f766d7b83b106c0677f317 | [] | no_license | tomama1/Practice | c4a44a044fe67b3f4eb34dca0a0dd9ea38f4c766 | 8adecd0ee985db06497578a11d067ac16502da7b | refs/heads/master | 2021-09-05T04:32:42.020673 | 2018-01-24T05:51:16 | 2018-01-24T05:51:16 | 104,159,010 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,746 | py | from flask import Flask, request, redirect, render_template, flash
from mysqlconnection import MySQLConnector
import re
app = Flask(__name__)
app.secret_key = ("CodingDojo")
mysql = MySQLConnector(app,'listserv')
@app.route('/')
def index():
return render_template('index.html')
@app.route('/process', methods=['PO... | [
"matthewtoma123@gmail.com"
] | matthewtoma123@gmail.com |
ea0207d1f4614c56c66b011cec3e7d9ecefe2d10 | 58f6184fbfe4782bccf7803fbb978b5a5f93bb50 | /src/scs_analysis/cmd/cmd_sample_tally.py | a7dff9ca4f518978eee941ce646bb2796fd1ea4b | [
"MIT"
] | permissive | seoss/scs_analysis | d41db35a1c7d97d75776a797df099749dbced824 | c203093fd6728eafe576a1798bd9040ca18c73f8 | refs/heads/master | 2020-04-04T20:14:48.026665 | 2018-11-05T12:51:23 | 2018-11-05T12:51:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,316 | py | """
Created on 22 Aug 2017
@author: Bruno Beloff (bruno.beloff@southcoastscience.com)
"""
import optparse
# --------------------------------------------------------------------------------------------------------------------
class CmdSampleTally(object):
"""unix command line handler"""
def __init__(self):... | [
"bruno.beloff@southcoastscience.com"
] | bruno.beloff@southcoastscience.com |
d470117b87c20044939b34206f9e9d67c89cc690 | ac5e52a3fc52dde58d208746cddabef2e378119e | /exps-gsn-edf/gsn-edf_ut=2.0_rd=0.5_rw=0.04_rn=4_u=0.075-0.35_p=harmonic-2/sched=RUN_trial=76/params.py | 29fdaca73a9d96a41ddea9479708049d1a27dfc2 | [] | no_license | ricardobtxr/experiment-scripts | 1e2abfcd94fb0ef5a56c5d7dffddfe814752eef1 | 7bcebff7ac2f2822423f211f1162cd017a18babb | refs/heads/master | 2023-04-09T02:37:41.466794 | 2021-04-25T03:27:16 | 2021-04-25T03:27:16 | 358,926,457 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 254 | py | {'cpus': 4,
'duration': 30,
'final_util': '2.010214',
'max_util': '2.0',
'periods': 'harmonic-2',
'release_master': False,
'res_distr': '0.5',
'res_nmb': '4',
'res_weight': '0.04',
'scheduler': 'GSN-EDF',
'trial': 76,
'utils': 'uni-medium-3'}
| [
"ricardo.btxr@gmail.com"
] | ricardo.btxr@gmail.com |
629585562843f773778c17fec9276488963e4e18 | 515e7d6e5756e3922df0b874b241c8b0744b4570 | /packs/python_packs.py | 1d34ff441b4097d542aca3c6d08a9dd2b0ef7e4d | [] | no_license | mjgpy3/udm_script | d77f4904df62e33c72f690cdf4049a1118be105b | d04802d21797fa6ed03cfc35c955bcc6d028f1c2 | refs/heads/master | 2021-01-23T11:40:25.415072 | 2013-07-30T16:53:31 | 2013-07-30T16:53:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,219 | py | #!/usr/bin/env python
# Created by Michael Gilliland
# Date: Fri Jan 25 16:47:44 EST 2013
#
#
from package_container import PackageContainer
packages = {'Pygame': 'python-pygame',
'Sympy': 'python-sympy',
'Numpy': 'python-numpy',
'Scipy': 'python-scipy',
'Virtualenv... | [
"mjg.py3@gmail.com"
] | mjg.py3@gmail.com |
306169c51708eb9ebd6f3a4715d52aaf5b2f46c0 | 09c87fe780df6d1f9eb33799ed516a0bbd7ab1e3 | /Research/async play/wxasync1.py | 938fa1c468981bdc521f7644434f52312729c2b3 | [] | no_license | abulka/pynsource | 8ad412b85dc1acaeb83d7d34af8cc033c6baba91 | 979436525c57fdaeaa832e960985e0406e123587 | refs/heads/master | 2023-04-13T12:58:02.911318 | 2023-04-11T09:56:32 | 2023-04-11T09:56:32 | 32,249,425 | 271 | 46 | null | 2022-10-10T04:36:57 | 2015-03-15T07:21:43 | Python | UTF-8 | Python | false | false | 1,429 | py | import wx
from wxasync import AsyncBind, WxAsyncApp, StartCoroutine
import asyncio
from asyncio.events import get_event_loop
import time
class TestFrame(wx.Frame):
def __init__(self, parent=None):
super(TestFrame, self).__init__(parent)
vbox = wx.BoxSizer(wx.VERTICAL)
button1 = wx.Button(s... | [
"abulka@gmail.com"
] | abulka@gmail.com |
24f2de63f6fe12b2e69518221df7bc7cef282fb6 | 078e35f6b03e4e7a9616f2335a740109d8292176 | /examples/adwords/v201609/advanced_operations/add_ad_customizer.py | f3c8da4ffc6854a0fdba2a28bd13a0f160fd0adb | [
"Apache-2.0"
] | permissive | parander/googleads-python-lib | 5f5b09e8adf7d733bddca314f6aa624b60c5abde | bc1bdff2d58fdc7cf4f09b879c68757c5b9b3abc | refs/heads/master | 2021-01-12T16:36:44.861582 | 2017-02-27T04:27:18 | 2017-02-27T04:27:18 | 71,418,777 | 0 | 0 | null | 2016-10-20T02:38:33 | 2016-10-20T02:38:32 | null | UTF-8 | Python | false | false | 7,140 | py | #!/usr/bin/python
#
# 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
#
# Unless required b... | [
"msaniscalchi@users.noreply.github.com"
] | msaniscalchi@users.noreply.github.com |
f160905d816728acf5ab28b38fe37cd56249ef23 | a95aebf977058d32fa4298e35939fb5813f11276 | /nn/layers.py | f339ba6e01b645a013632b3b8d3cd2e47a1ae2a2 | [
"MIT"
] | permissive | CV-IP/uqvi | f6e595c60ab86eb00c3b221d24f7300a4f872839 | 2534c26c41a4745e98d4b12d66270691002d1a5f | refs/heads/master | 2022-12-22T20:47:44.140964 | 2020-10-03T17:40:17 | 2020-10-03T17:40:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,452 | py | import os
import math
import numpy as np
import pandas as pd
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.modules.utils import _pair, _triple
from nn.bayes_conv import BayesConv3d, BayesConv2d
class ConvBlock(nn.Module):
def __init__(self, in_channels, out_channels, kernel, s... | [
"noreply@github.com"
] | CV-IP.noreply@github.com |
a0e0bfbddd2d9003785d592b78d9b8475e63b70c | 097eae4e0190da97570ae7db748fca306f977fbd | /py/learn/test/class/example.py | f8642e40064bba601cac875200d08370551f363f | [] | no_license | jiaolj/other | 42257c593495d97ab98b9a9af00d3791ccce7a57 | 78d0366cbd599f4dde7bf6e44ca4cfc373132418 | refs/heads/master | 2021-05-24T04:14:03.829126 | 2016-08-28T07:40:49 | 2016-08-28T07:40:49 | 64,064,262 | 0 | 1 | null | 2020-07-23T17:05:36 | 2016-07-24T12:25:56 | JavaScript | UTF-8 | Python | false | false | 358 | py | # -*- coding: utf-8 -*-
class b(object):
def __init__(self):
self.t=2
def getb(self):
self.t+=1
class a(b):
#----如果不声明init函数,会继承基类init属性。声明init是为了加一些自定义属性
def __init__(self):
b.__init__(self)
def get(self):
print 1
temp=a()
temp.getb()
print temp.t | [
"841232468@qq.com"
] | 841232468@qq.com |
54bbd219f19c1ed9466ccdbb26db23e887394dba | 6cb11cb804f316d16efa083effb3def1c2cab57c | /22.py | c55af12e976c5a84557d4af19a98af4e455b732f | [] | no_license | davemolk/python_practice | 8879cd5bdcb77c3d84ff5c7f961fda1cd48b2f93 | 91d3e411b32f3a4a29d60148b352b91ce8e1d11b | refs/heads/main | 2023-08-01T12:57:45.779824 | 2021-09-18T16:54:11 | 2021-09-18T16:54:11 | 400,767,618 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 282 | py | '''
return True if array has two consecutive 2s, otherwise return false
'''
import re
def has22(nums):
pattern = r"[2]{2}"
regex = re.compile(pattern)
match = regex.findall(("".join(str(el) for el in nums)))
return True if match else False
print(has22([1, 2, 2])) | [
"davemolk@gmail.com"
] | davemolk@gmail.com |
f3d109ee8baa41ca18eaa3f3d511d490209b0c12 | 0619b1ba176456c4b62d78d6a72fc4d9a9084287 | /thesite/communication_app/forms.py | 4eabf764b1d1037b42e5497319e87205eb1f6f36 | [
"Apache-2.0"
] | permissive | jacinda/petwitter | c13dd43a5b76786f5d5c5c3f29420153cb5a16c7 | ea7ffa16b8d8b1207f04ace619b31dba4efc45bc | refs/heads/master | 2021-01-13T06:38:31.439749 | 2015-04-15T17:25:03 | 2015-04-15T17:25:03 | 33,678,730 | 0 | 0 | null | 2015-04-09T16:02:42 | 2015-04-09T16:02:40 | Python | UTF-8 | Python | false | false | 699 | py | from django import forms
import communication_app.models
class PetForm(forms.ModelForm):
class Meta:
model = communication_app.models.Pet
fields = ['name']
def __init__(self, *args, **kwargs):
super(PetForm, self).__init__(*args, **kwargs)
self.fields['name'].widget = forms.Te... | [
"asheesh@asheesh.org"
] | asheesh@asheesh.org |
7e1029ad59d5a3c4e3e7636aa5802f22953086cd | e15d63ccde04e7458bff5af1bdad63a5c699b489 | /example/Transformer_vision/2dpose/vit/multi_branch/config.py | 5582a68fa5d82c8142ce319cab34a1901077d3e7 | [
"WTFPL"
] | permissive | ddddwee1/TorchSUL | 775b6a2b1e4ab7aac25a3f0411de83affc257af5 | 6c7cd41b14fc8b746983e8b981d1ba4d08370ca2 | refs/heads/master | 2023-08-21T15:21:24.131718 | 2023-08-18T09:37:56 | 2023-08-18T09:37:56 | 227,628,298 | 13 | 1 | null | null | null | null | UTF-8 | Python | false | false | 657 | py | import numpy as np
# size
inp_size = 224
out_size = 56
base_sigma = 2.5
num_pts = 17
pairs = [[0,1], [1,2],[2,3], [0,4], [4,5],[5,6], [0,7],[7,8],[8,9],[9,10], [8,11],[11,12],[12,13],[8,14],[14,15],[15,16]]
# augmentation
rotation = 0
min_scale = 1 # this controls largest size
max_scale = 1 # this controls smalle... | [
"cy960823@outlook.com"
] | cy960823@outlook.com |
10b0d6c77a5a22b76ba2d6593ccd3657539ce9fd | 4a36b5979b0753b32cff3956fd97fb8ed8b11e84 | /1.0/_downloads/469209d8040c0923f6b4f925074d58d7/evoked_topomap.py | f677e3d7f02abfe8f6f3546a99379b408253479f | [] | permissive | mne-tools/mne-tools.github.io | 8aac7ae10bf2faeeb875b9a351a5530dc0e53154 | 495e878adc1ef3374e3db88604504d7542b01194 | refs/heads/main | 2023-09-03T07:06:00.660557 | 2023-09-03T04:10:18 | 2023-09-03T04:10:18 | 35,639,371 | 12 | 16 | BSD-3-Clause | 2023-05-05T19:04:32 | 2015-05-14T22:04:23 | HTML | UTF-8 | Python | false | false | 5,921 | py | # -*- coding: utf-8 -*-
"""
.. _ex-evoked-topomap:
========================================
Plotting topographic maps of evoked data
========================================
Load evoked data and plot topomaps for selected time points using multiple
additional options.
"""
# Authors: Christian Brodbeck <christianbrodb... | [
"dan@mccloy.info"
] | dan@mccloy.info |
c157b99f15cf4b7b2d4bd05ea5b0e5f89507cf3a | 07bb913fea5e0f1e65e35a7ca5c594fa1d144eb8 | /publishconf.py | ab389e79f3df4349f62293bf934b3def399eb94a | [] | no_license | jbzdak/pwzn-lessons | 8373552fabb260593cf612a27bf821d7b70b452d | 5ca58dba6220259b170c8a689a10338122c4eefd | refs/heads/master | 2021-04-05T20:48:56.447870 | 2020-03-19T20:36:08 | 2020-03-19T20:36:08 | 248,600,049 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 555 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
# This file is only used if you use `make publish` or
# explicitly specify it as your config file.
import os
import sys
sys.path.append(os.curdir)
from pelicanconf import *
#ITEURL = 'http://pwzn.s3-website-us-east-1.amazonaws.co... | [
"jbzdak@gmail.com"
] | jbzdak@gmail.com |
86a3a8b7517688b3d439381f7baf7469c0eb82a9 | 9f2a231557a9aabc181ed388faaf2f0b3b59c530 | /Testcode/spellCheck.py | 5be1f5b0fa649c1d809ee849a078538109829c13 | [] | no_license | abhashjain/DIC_Project | 7e379cd5ef99d1fc31d414985e1b04388b475fe0 | 329f8da2f61e95410292a3062c68ed06845ec6ac | refs/heads/master | 2020-04-25T14:49:58.508999 | 2018-12-11T04:36:09 | 2018-12-11T04:36:09 | 172,855,829 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,310 | py | import os, time, re
os.getcwd()
startTime = time.time()
wordFile = open("..\\src\\words.txt","r")
words = wordFile.read()
print("Words in dictionary:",len(words))
inputDoc = open("..\\src\\guten.txt", "r", encoding="utf-8")
doc = inputDoc.read().split()
print("Words in file:",len(doc))
## Processing ... | [
"nobody@ncsu.edu"
] | nobody@ncsu.edu |
44d7b163937a1cc756b6f3918b58cb04e955dc93 | 04aacfdb9944e6d796671198835394e07db98ecf | /pythonz/commands/locate.py | 939aedb0faee04842dfa3a3a10a968e88396ce8c | [] | no_license | rmoorman/pythonz | ea86f302c70b67440c2829d4a0a9161d4a006ccc | 3d43172cae190284cf0b620aa28c0f794f770497 | refs/heads/master | 2021-01-12T19:51:39.057258 | 2014-10-16T07:20:06 | 2014-10-16T07:20:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,006 | py |
import os
from pythonz.commands import Command
from pythonz.define import PATH_PYTHONS
from pythonz.util import Package, is_installed
from pythonz.log import logger
class LocateCommand(Command):
name = "locate"
usage = "%prog [options] VERSION"
summary = "Locate the given version of python"
def __i... | [
"saghul@gmail.com"
] | saghul@gmail.com |
d7e6fb902bb4d82e45d61c4cff79935749eb6882 | 60f75884ced267a5f0f09a0b43f68e7d8c5c7a14 | /tester/test_handlers/test_page_handler.py | 25b3ed3218c1b9b75b71fae6e6b25697c3bb7901 | [
"MIT"
] | permissive | liusheng6982/TorCMS | b0fa1fe96a814c10dc7163b127672e1076d19e02 | cb5ee651ece0cff28eae1dcde9013edf28387073 | refs/heads/master | 2021-01-19T04:31:54.221405 | 2017-04-04T11:41:50 | 2017-04-04T11:41:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 284 | py | # -*- coding:utf-8 -*-
from torcms.handlers.page_handler import PageHandler
from torcms.handlers.page_ajax_handler import PageAjaxHandler
def Test():
urls = [
("/label/(.*)", PageAjaxHandler, dict()),
("/label/(.*)", PageHandler, dict()),
]
assert urls
| [
"bukun@osgeo.cn"
] | bukun@osgeo.cn |
845e06146026e7a00fd10824220dd35e50e2ccab | 127d8c209b00978f4f660534363e95eca3f514f2 | /backend/home/migrations/0002_load_initial_data.py | 110b21901b630cf3f96ad807523e091bfc8ac157 | [] | no_license | crowdbotics-apps/sitespace-19938 | afd070e64d32ab455f9b2b05e376152e9e28e5ad | 416b5cef0bdb25018ec3b634bf3096e61fe8b662 | refs/heads/master | 2022-12-10T15:52:58.601025 | 2020-09-02T15:20:15 | 2020-09-02T15:20:15 | 292,319,517 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,290 | py | from django.db import migrations
def create_customtext(apps, schema_editor):
CustomText = apps.get_model("home", "CustomText")
customtext_title = "Sitespace"
CustomText.objects.create(title=customtext_title)
def create_homepage(apps, schema_editor):
HomePage = apps.get_model("home", "HomePage")
... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
348fc47cef3dc9dc96c748af7cf91394fd8222e7 | 2d7c21a793c8080a090ce8c9f05df38f6477c7c7 | /tests/data_templates/test_field_definitions.py | c4f05eb9f57000460d8661f4d47b2a554f7826ea | [
"Apache-2.0"
] | permissive | kids-first/kf-api-study-creator | c40e0a8a514fd52a857e9a588635ef76d16d5bc7 | ba62b369e6464259ea92dbb9ba49876513f37fba | refs/heads/master | 2023-08-17T01:09:38.789364 | 2023-08-15T14:06:29 | 2023-08-15T14:06:29 | 149,347,812 | 3 | 0 | Apache-2.0 | 2023-09-08T15:33:40 | 2018-09-18T20:25:38 | Python | UTF-8 | Python | false | false | 5,204 | py | import os
import json
import pytest
import pandas
from marshmallow import ValidationError
from pprint import pprint
from creator.data_templates.models import TemplateVersion
from creator.data_templates.field_definitions_schema import (
coerce_number,
coerce_bool,
FieldDefinitionSchema,
FieldDefinition... | [
"dukedesi22@gmail.com"
] | dukedesi22@gmail.com |
19caab41b1e7e5822d71d8e70217b1ac6dda3b67 | 847273de4b1d814fab8b19dc651c651c2d342ede | /.history/Sudoku_II_005_20180620141234.py | 396d0dea7f396d2fdc9165bfceb7cd75b20f3c37 | [] | no_license | Los4U/sudoku_in_python | 0ba55850afcffeac4170321651620f3c89448b45 | 7d470604962a43da3fc3e5edce6f718076197d32 | refs/heads/master | 2020-03-22T08:10:13.939424 | 2018-07-04T17:21:13 | 2018-07-04T17:21:13 | 139,749,483 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,622 | py | from random import randint
sudoku1 = [
[5, 9, 8, 6, 1, 2, 3, 4, 7],
[2, 1, 7, 9, 3, 4, 8, 6, 5],
[6, 4, 3, 5, 8, 7, 1, 2, 9],
[1, 6, 5, 4, 9, 8, 2, 7, 3],
[3, 2, 9, 7, 6, 5, 4, 1, 8],
[7, 8, 4, 3, 2, 1, 5, 9, 6],
[8, 3, 1, 2, 7, 6, 9, 5, 4],
[4, 7, 2, 8, 5, 9, 6, 3, 1],
[9, 5, 6, 1,... | [
"inz.kamil.wos@gmail.com"
] | inz.kamil.wos@gmail.com |
ba508a2958f5325258855671103405bc641ebe97 | a5e591dc09e11e88af56fb5a881fae064fb9c495 | /recruitment/recruitment/doctype/interview/interview.py | 0449ed7ff48f9261f3c429e7522f6aad25c3b49d | [
"MIT"
] | permissive | barathprathosh/recruitment | 6b61dd1ee9c0b9d7851b0b3e5bab307f7ee2d1b5 | 9660944856e72288e47960e6802ec97a220a656d | refs/heads/master | 2020-04-29T03:03:51.722972 | 2019-03-15T08:58:32 | 2019-03-15T08:58:32 | 175,794,797 | 0 | 0 | NOASSERTION | 2019-03-15T10:00:32 | 2019-03-15T10:00:31 | null | UTF-8 | Python | false | false | 250 | py | # -*- coding: utf-8 -*-
# Copyright (c) 2015, VHRS and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class Interview(Document):
pass
| [
"abdulla.pi@voltechgroup.com"
] | abdulla.pi@voltechgroup.com |
cac8cca8bbafc756a771cbbd21f316a640e98cd7 | 6b4a48fb6142789326654c48d32acda3eb5e7b08 | /formationproject/wsgi.py | a9ea3c0a982ffb7af95cba5e2211d90796a89dd1 | [] | no_license | mwesterhof/formationproject | 0d9795c218b5010bfbb716216d3d8f4fa5bd4799 | 1b4a057b996829609e308c78721aca840ec58ee7 | refs/heads/master | 2023-08-19T00:08:58.282341 | 2021-10-08T16:19:18 | 2021-10-08T16:19:18 | 401,425,998 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 413 | py | """
WSGI config for formationproject 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.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJA... | [
"m.westerhof@lukkien.com"
] | m.westerhof@lukkien.com |
433dc5780c6bf966236e507e8947e87df83870a2 | 43e900f11e2b230cdc0b2e48007d40294fefd87a | /Amazon/VideoOnsite/926.flip-string-to-monotone-increasing.py | d4efde64ddbe2e4540f93d5acfa3516e947730ab | [] | no_license | DarkAlexWang/leetcode | 02f2ed993688c34d3ce8f95d81b3e36a53ca002f | 89142297559af20cf990a8e40975811b4be36955 | refs/heads/master | 2023-01-07T13:01:19.598427 | 2022-12-28T19:00:19 | 2022-12-28T19:00:19 | 232,729,581 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 472 | py | #
# @lc app=leetcode id=926 lang=python3
#
# [926] Flip String to Monotone Increasing
#
# @lc code=start
class Solution:
def minFlipsMonoIncr(self, s: str) -> int:
n = len(s)
cnt0 = s.count('0')
cnt1 = 0
res = n - cnt0
for i in range(n):
if s[i] == '0':
... | [
"wangzhihuan0815@gmail.com"
] | wangzhihuan0815@gmail.com |
89b1685f529264b86004c272eb59419b27a1315b | 4a42fefd8945c73402ddf36f8943e011cd9c4151 | /projects/myhellowebapp/hellowebapp/wsgi.py | 2b6fe00b6b8875c39ed849cf147b0eb94f51d25b | [] | no_license | momentum-cohort-2018-10/hello-web-app-SowmyaAji | c2c1374b460232822ff91fc1d034f1d89a400332 | 2cfe7fd6d22db4f9b9ac0d8fdc611787cb1372c5 | refs/heads/master | 2020-04-06T11:53:35.991478 | 2018-11-18T20:48:49 | 2018-11-18T20:48:49 | 157,434,877 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 399 | py | """
WSGI config for hellowebapp project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_S... | [
"sowmya.aji@gmail.com"
] | sowmya.aji@gmail.com |
c718408ccc29e4bca88b5deef7e84bb586acddfc | ea0c0b8d67a42086f840149b3dbe1c0e4f58e56f | /members_area/forms.py | 06d19b868f16f535ae4172f3cc5f191a2c75b8b0 | [
"MIT"
] | permissive | AzeezBello/raodoh | 78b27e0886f8882144a4def160d9c3f53bcc6af9 | 296bd44069bd750557bf49995374601f5052d695 | refs/heads/master | 2022-05-03T05:07:21.632642 | 2020-02-26T10:16:08 | 2020-02-26T10:16:08 | 235,878,080 | 0 | 0 | MIT | 2022-04-22T23:01:27 | 2020-01-23T20:15:39 | JavaScript | UTF-8 | Python | false | false | 194 | py | from django.forms import ModelForm
from .models import Lesson
class LessonForm(ModelForm):
class Meta:
model = Lesson
fields = ('title', 'course', 'body', 'url', 'video')
| [
"azeez@scholarx.co"
] | azeez@scholarx.co |
e78a07d5a9ac0d6375bab50be733a669fac273ff | e5b6d2e79d6593587fa8f5854def9ebf4d47a9e1 | /djangocli/wsgi.py | 8e9c0ba06187289fb8d23d2abffc8b6bcf5721d6 | [] | no_license | redeyed-archive/DjangoSiteCheckerExample | 35756664f0b9667e151d4608c6ebd5d279523534 | e53b2fad15d2a768e75bc853c69113c0d54c2ed2 | refs/heads/master | 2023-03-17T06:22:46.129989 | 2019-02-17T05:48:43 | 2019-02-17T05:48:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 395 | py | """
WSGI config for djangocli project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SET... | [
"unconfigured@null.spigotmc.org"
] | unconfigured@null.spigotmc.org |
16d37fe91e6e6174ecc5ebf06d10063687980ee8 | 97e54e4b18c1d696926678f1e320b2fc9cef5436 | /jaraco/text/strip-prefix.py | 761717a9b9e1f837eeacf0e888822f6fad881361 | [
"MIT"
] | permissive | jaraco/jaraco.text | 8ff2d7d49b3af0ca5e98c1cb337562bde9d3ba72 | 460dc329b799b88adb32ea95435d3a9e03cbdc00 | refs/heads/main | 2023-09-04T06:57:23.624303 | 2023-07-30T01:01:42 | 2023-07-30T01:01:42 | 48,551,451 | 15 | 8 | MIT | 2023-07-30T14:52:20 | 2015-12-24T17:20:06 | Python | UTF-8 | Python | false | false | 412 | py | import sys
import autocommand
from jaraco.text import Stripper
def strip_prefix():
r"""
Strip any common prefix from stdin.
>>> import io, pytest
>>> getfixture('monkeypatch').setattr('sys.stdin', io.StringIO('abcdef\nabc123'))
>>> strip_prefix()
def
123
"""
sys.stdout.writeline... | [
"jaraco@jaraco.com"
] | jaraco@jaraco.com |
2bc4f1ab2384a7e76f74641976a53715c495cc2a | b0c528e2650dec1ff011215537fc5ea536627966 | /main/urls.py | 58a80f586c83f786718a9f83bb105e9b11210f7e | [] | no_license | trinhgliedt/Python_Great_number_game | 9cb84a1bd95333df15140cc2e1c466d0911b7b19 | 8358c84012981b8dfaafb9017fc9a92450a98e7b | refs/heads/master | 2023-02-08T21:14:23.124896 | 2021-01-01T06:18:02 | 2021-01-01T06:18:02 | 325,926,745 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 135 | py | from django.urls import path
from . import views
urlpatterns = [
path('', views.index),
path('result/', views.process_form),
] | [
"chuot2008@gmail.com"
] | chuot2008@gmail.com |
dc72573a696b1184ae2cf899bda0ecd956d49f9d | 0931b32140ba932b3ba02f5109a087c6c70a244d | /frappe/desk/desk_page.py | fc7281e06c18d9766c2efcb8f939fa6938c5c494 | [
"MIT"
] | permissive | cstkyrilos/frappe | b60ed4e95ce929c74c2fc46000080d10b343190e | 27d9306bc5924c11c2749503454cc6d11a8cc654 | refs/heads/main | 2023-03-23T10:35:42.732385 | 2021-03-22T21:55:58 | 2021-03-22T21:55:58 | 350,292,784 | 0 | 0 | MIT | 2021-03-22T10:01:08 | 2021-03-22T10:01:07 | null | UTF-8 | Python | false | false | 1,569 | py | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.translate import send_translations
@frappe.whitelist()
def get(name):
"""
Return the :term:`doclist` of the `Page` specified by `name`
"""
page =... | [
"cst.kyrilos@gmail.com"
] | cst.kyrilos@gmail.com |
c9a91552c1b8f4b8a2ff609676b81cd11cf08ead | 48df99f4358be7a51becd3d685e1ec825d295ba4 | /dentalstate/models.py | 36c642462ac4cabb367d2fe592fdd0be94d557a6 | [
"Apache-2.0"
] | permissive | kuyesu/tscharts | 21d2aedeea4aad3b126defaa1703f60f44f14de6 | 9ed4e4bb0a6d296e1156afca5b55d0f71dfb894b | refs/heads/master | 2023-06-03T04:50:15.282855 | 2021-06-12T19:50:51 | 2021-06-12T19:50:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,258 | py | #(C) Copyright Syd Logan 2020
#(C) Copyright Thousand Smiles Foundation 2020
#
#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 a... | [
"slogan621@gmail.com"
] | slogan621@gmail.com |
a650fcc83f32dd0898f953ec683b1b54eb77b733 | 233f97c6f360d478bf975016dd9e9c2be4a64adb | /guvi3.py | 6dd143242eb16cf5b6ec3091f1ddba172fd1f82f | [] | no_license | unknownboyy/GUVI | 3dbd1bb2bc6b3db52f5f79491accd6c56a2dec45 | d757dd473c4f5eef526a516cf64a1757eb235869 | refs/heads/master | 2020-03-27T00:07:12.449280 | 2019-03-19T12:57:03 | 2019-03-19T12:57:03 | 145,595,379 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 332 | py | def check(n):
count = 0
for i in str(n):
count+=int(i)
if str(count)[0]=='1':
return count
else:
return False
n = int(input())
l = [8]
c = 0
diff = 2
curr = 800
while curr+diff<=n:
curr+=diff
w = check(curr)
if w!=False:
l.append(w)
diff+=2
c+=1
print(... | [
"ankitagrawal11b@gmail.com"
] | ankitagrawal11b@gmail.com |
24ebdd333e00edb3f74ccd4677e9ab43d5c096e3 | c03d7a4e03c581d4be98b6363003cddb9c213ec0 | /pets/migrations/0007_auto_20180910_0016.py | 6228879999e3df790cc687d09ad854b059402325 | [] | no_license | hernandavidc/plataforma | b333e4f06290713072d8dc609c27d4ce8af1d9df | 4316e2a59db76e74f1e6106958631ad4a7a653c7 | refs/heads/master | 2020-04-06T17:08:21.019355 | 2019-04-09T04:41:00 | 2019-04-09T04:41:00 | 157,648,096 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 771 | py | # Generated by Django 2.1 on 2018-09-10 05:16
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('pets', '0006_auto_20180910... | [
"hernandavidc@hotmail.com"
] | hernandavidc@hotmail.com |
a3eefa3f23a8dfe00c158170d73f421c29d1e373 | c79737296bdf4b3a969ab5ceb69198daf66def0e | /python/solutii/bogdan_iacoboae/caesar/caesar.py | 315bde89ddbea8afd9d78e0152861ba4b9c51fa0 | [
"MIT"
] | permissive | ilieandrei98/labs | 96c749072b6455b34dc5f0bd3bb20f7a0e95b706 | cda09cbf5352e88909f51546c2eb360e1ff2bec1 | refs/heads/master | 2020-04-26T03:23:48.220151 | 2019-03-01T08:56:43 | 2019-03-01T08:56:43 | 173,265,757 | 0 | 0 | MIT | 2019-03-01T08:37:14 | 2019-03-01T08:37:14 | null | UTF-8 | Python | false | false | 1,939 | py | # coding=utf-8
# from __future__ import print_function
"""Împăratul a primit serie de mesaje importante pe care este
important să le descifreze cât mai repede.
Din păcate mesagerul nu a apucat să îi spună împăratul care au fost
cheile alese pentru fiecare mesaj și tu ai fost ales să descifrezi
misterul.
Informații:
... | [
"mmicu@cloudbasesolutions.com"
] | mmicu@cloudbasesolutions.com |
989528ac7820dca22e21aec571ce43ed89e4c1a0 | e3e3071e5f01f75ba3716ac229abef484e8c051a | /mnist.py | f9639c963cb10a4bdcfc9a82659ccfe73a01289c | [] | no_license | schmit/dictlearning | 9efc9e15e73a99f840db71d81925dbe7c0bd22d0 | 14c37631aa4d330d58fc174b2294866e2484d5d0 | refs/heads/master | 2021-01-10T04:06:33.899917 | 2013-03-15T18:40:33 | 2013-03-15T18:40:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,943 | py | import numpy as np
import scipy.io as sio
import dictionary
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
from multiOGD import *
from kernels import *
import sys
import argparse
import utility
sys.stdout = utility.Logger()
print 'Starting run of MNIST.py'
parser = argparse.ArgumentParser(descriptio... | [
"schmit@stanford.edu"
] | schmit@stanford.edu |
a98677c79904384ea4f9182f45560317822060b0 | 1eb50735e3861cde4bca8f4feab5afc730003078 | /future/flags_threadpool.py | 68c2812cf5337155961672ac7f2d7ec0945eca02 | [] | no_license | chinaylssly/fluent-python | 442e6458215e3c5a74c4d34d020b714da108f81d | 126c1d3e7853628c4a2c0e6ff475362b7d7fe33a | refs/heads/master | 2020-04-17T13:58:03.534184 | 2019-02-01T14:40:42 | 2019-02-01T14:40:42 | 166,637,609 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 924 | py | # -*- coding: utf-8 -*-
import random,sys
from time import sleep,time
from concurrent import futures
MAX_WORKERS= 20
tl=[i*0.01 for i in range(20)]
def do_one(t=0.2):
# print (t)
sleep(t)
return t
def do_many(tl=tl):
workers=min(len(tl),MAX_WORKERS)
with futures.ThreadPoolExecutor(worke... | [
"chinaylssly@qq.com"
] | chinaylssly@qq.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.