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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a940b79e9af8e58a8c005e7e087b8996c6d39b25 | d3f03111c2df2b072ab99954d72963d37bb6aadc | /test/models/Teacup.py | f661792e99f2f210eca435d27a3ee1434393a082 | [] | no_license | ConnectedSystems/EMAworkbench | ce7fd65148d6fa1de78f816a6b2a42768dd76627 | bc0edf1bbe4df608e5d7065e2d3df6c3db249a36 | refs/heads/master | 2021-04-12T08:03:20.740951 | 2017-06-16T06:57:49 | 2017-06-16T06:57:49 | 94,514,673 | 0 | 0 | null | 2017-06-16T06:57:50 | 2017-06-16T06:54:30 | Jupyter Notebook | UTF-8 | Python | false | false | 2,459 | py |
"""
Python model /Users/jhkwakkel/EMAworkbench/test/test_connectors/../models/Teacup.py
Translated using PySD version 0.7.2
"""
from __future__ import division
import numpy as np
from pysd import utils
import xarray as xr
from pysd.functions import cache
from pysd import functions
_subscript_dict = {}
_namespace = ... | [
"j.h.kwakkel@tudelft.nl"
] | j.h.kwakkel@tudelft.nl |
3b52c4bf54aaf82f5b4110ba983be3fd5a931e4d | 9645bdfbb15742e0d94e3327f94471663f32061a | /Python/1053 - Previous Permutation With One Swap/1053_previous-permutation-with-one-swap.py | 8b8bb2541f6023fdd7960047eb16db60ba9497d8 | [] | no_license | aptend/leetcode-rua | f81c080b2260adb2da677612e5c437eda256781d | 80e44f4e9d3a5b592fdebe0bf16d1df54e99991e | refs/heads/master | 2023-06-22T00:40:05.533424 | 2021-03-17T13:51:28 | 2021-03-17T13:51:28 | 186,434,133 | 2 | 0 | null | 2023-06-21T22:12:51 | 2019-05-13T14:17:27 | HTML | UTF-8 | Python | false | false | 879 | py | from leezy import solution, Solution
class Q1053(Solution):
@solution
def prevPermOpt1(self, A):
# 244ms 94.13%
N = len(A)
i = N-2
while i >= 0 and A[i] <= A[i+1]:
i -= 1
if i == -1:
return A
max_ = A[i+1]
max_idx = i+1
... | [
"crescentwhale@hotmail.com"
] | crescentwhale@hotmail.com |
5326b936d3547ad79bd1f342e8f0abe1f589cecf | d73409535734a788af83a9b2b2e32dd1b979d5d2 | /proxySTAR_V3/certbot/venv/lib/python2.7/site-packages/pylint/test/functional/name_styles.py | ce0446df57bf0019057980ff6d7f342fb60db68b | [
"Apache-2.0",
"MIT"
] | permissive | mami-project/lurk | adff1fb86cb3e478fe1ded4cbafa6a1e0b93bfdd | 98c293251e9b1e9c9a4b02789486c5ddaf46ba3c | refs/heads/master | 2022-11-02T07:28:22.708152 | 2019-08-24T19:28:58 | 2019-08-24T19:28:58 | 88,050,138 | 2 | 2 | NOASSERTION | 2022-10-22T15:46:11 | 2017-04-12T12:38:33 | Python | UTF-8 | Python | false | false | 3,216 | py | """Test for the invalid-name warning."""
# pylint: disable=print-statement, no-absolute-import
import abc
import collections
GOOD_CONST_NAME = ''
bad_const_name = 0 # [invalid-name]
def BADFUNCTION_name(): # [invalid-name]
"""Bad function name."""
BAD_LOCAL_VAR = 1 # [invalid-name]
print(B... | [
"diego.deaguilarcanellas@telefonica.com"
] | diego.deaguilarcanellas@telefonica.com |
7e20e0864cd5c1dd42491dabf7cdaccafe18eec9 | 9b4a666b805a2bdca0b55e7b4b0183668454b251 | /home/models.py | 6684dc62e977e65ea99e3a769be1e480d149c5cb | [] | no_license | mhkmcp/divisima-django-ecommerce | bbf674893bcda89e8a274ca7e62ba95b3ba12615 | 783ead7521afa00a60423964b8422062269a040b | refs/heads/master | 2020-12-04T08:56:23.693362 | 2020-01-04T03:33:31 | 2020-01-04T03:33:31 | 231,703,193 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 980 | py | from django.db import models
class Category(models.Model):
name = models.CharField(max_length=50)
is_active = models.BooleanField(default=True)
def __str__(self):
return self.pk + ' - ' + self.name
# class Product(models.Model):
# category = models.OneToOneRel(Category, on_delete=models.CAS... | [
"mhkmcp@yahoo.com"
] | mhkmcp@yahoo.com |
9b224e6500661d8085596678dcc5ada20578edba | 09301c71638abf45230192e62503f79a52e0bd80 | /besco_erp/besco_account/general_account_asset/wizard/account_asset_change_duration.py | e4911793cdf4b37611bc3f68dd11109633c5dc07 | [] | no_license | westlyou/NEDCOFFEE | 24ef8c46f74a129059622f126401366497ba72a6 | 4079ab7312428c0eb12015e543605eac0bd3976f | refs/heads/master | 2020-05-27T06:01:15.188827 | 2017-11-14T15:35:22 | 2017-11-14T15:35:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,894 | py | # -*- coding: utf-8 -*-
from openerp import api, fields, models
from openerp.osv.orm import setup_modifiers
from openerp.tools.translate import _
import time
from openerp.exceptions import UserError, ValidationError
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT as DF
DATETIME_FORMAT = "%Y-%m-%d"
DATE_FORMAT = "... | [
"son.huynh@nedcoffee.vn"
] | son.huynh@nedcoffee.vn |
967e887a6e62014cee1b4e165fa5bf67056cb7bd | 2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02 | /PyTorch/dev/cv/detection/YOLOX_ID2833_for_PyTorch/mmdet/models/roi_heads/mask_scoring_roi_head.py | e3647503d835ff2dc7a65bf3c8400bf9b2a229d2 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference",
"GPL-1.0-or-later"
] | permissive | Ascend/ModelZoo-PyTorch | 4c89414b9e2582cef9926d4670108a090c839d2d | 92acc188d3a0f634de58463b6676e70df83ef808 | refs/heads/master | 2023-07-19T12:40:00.512853 | 2023-07-17T02:48:18 | 2023-07-17T02:48:18 | 483,502,469 | 23 | 6 | Apache-2.0 | 2022-10-15T09:29:12 | 2022-04-20T04:11:18 | Python | UTF-8 | Python | false | false | 5,877 | py |
# Copyright 2022 Huawei Technologies Co., Ltd
#
# 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 agre... | [
"wangjiangben@huawei.com"
] | wangjiangben@huawei.com |
73a57590714b16327a2e6a6dea261aaea18c2406 | ebd5c4632bb5f85c9e3311fd70f6f1bf92fae53f | /P.O.R.-master/pirates/minigame/DistributedPotionCraftingTable.py | 3f60a7eebf43d7da0353da732f3501cbd10a935f | [] | no_license | BrandonAlex/Pirates-Online-Retribution | 7f881a64ec74e595aaf62e78a39375d2d51f4d2e | 980b7448f798e255eecfb6bd2ebb67b299b27dd7 | refs/heads/master | 2020-04-02T14:22:28.626453 | 2018-10-24T15:33:17 | 2018-10-24T15:33:17 | 154,521,816 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,319 | py | from direct.fsm.StatePush import FunctionCall, StateVar
from direct.interval.IntervalGlobal import *
from pandac.PandaModules import *
from pirates.uberdog.UberDogGlobals import InventoryType
from pirates.distributed.DistributedInteractive import DistributedInteractive
from pirates.piratesbase import PLocalizer
from pi... | [
"brandoncarden12345@gmail.com"
] | brandoncarden12345@gmail.com |
757f76ed6aa17ffef80a33b09e4dee1dba83e015 | 56d921f97a8ad43c52c5d66be517a4f37ec8a64f | /007.py | 65d1bcf81516c15dd19cf3591b0a4a36ce6df439 | [] | no_license | Oscer2016/python | 5ad27360bb6a47ec562696392906ba0f1daa8f99 | ff776e95327db4163a34b780ace21e561675ce62 | refs/heads/master | 2021-06-09T23:37:13.156650 | 2017-01-17T12:23:09 | 2017-01-17T12:23:09 | null | 0 | 0 | null | null | null | null | GB18030 | Python | false | false | 578 | py | #Exp1_4.py
#encoding utf-8
a=[[0,0,0],[0,0,0]] #定义一个列表
s=input('请输入第1个方程的3个数:')
a[0][0],a[0][1],a[0][2]=s
s=input('请输入第2个方程的3个数:')
a[1][0],a[1][1],a[1][2]=s
#第1行乘以-a[1][0]/a[0][0]加到第2行
d=-a[1][0]/a[0][0]
a[1][0]=a[1][0]+d*a[0][0]
a[1][1]=a[1][1]+d*a[0][1]
a[1][2]=a[1][2]+d*a[0][2]
#第2行乘以-a[0][1]/a[1][1]... | [
"hepansos@126.com"
] | hepansos@126.com |
d0f54b89237df182be3dfb07fb85dff71ce5a2da | 246e9200a834261eebcf1aaa54da5080981a24ea | /project-euler/26-50/number-spiral-diagonals.py | e60e525fb0b66f8af643c70e285d2f16e675d526 | [] | no_license | kalsotra2001/practice | db435514b7b57ce549b96a8baf64fad8f579da18 | bbc8a458718ad875ce5b7caa0e56afe94ae6fa68 | refs/heads/master | 2021-12-15T20:48:21.186658 | 2017-09-07T23:01:56 | 2017-09-07T23:01:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 269 | py | def diagonal_sum(n):
count = 1
last = 1
total = last
while count < 2 * n - 1:
i = int(count * 0.5 + 1.5)
for p in range(4):
last += i
total += last
count += 1
return total
print diagonal_sum(1001) | [
"jacquelineluo95@gmail.com"
] | jacquelineluo95@gmail.com |
cebfeb4c34914afd8e1a82cfed25c177e4b69c55 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /5GW5Kb2RpGwhHax2W_20.py | 764bc6816c1bf660278f8a1f9f591df297a5a525 | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 526 | py |
def spiral_transposition(lst):
rows, cols = (-1,len(lst)), (-1,len(lst[0]))
r, c = 0, 0
track, res = set(), []
direct = 1
while len(res) < rows[1]*cols[1]:
rn, cn = r, c
if (r, c) not in track:
res.append(lst[r][c])
track.add((r,c))
if direct == 1: cn += 1
elif direct == 2: r... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
eb07435f6ea04c8eb6d238d39bd97534003f2d45 | 008ccdd31da9058296cabba29950496bf3d83ff2 | /ps5_recursion.py | 91e9d5df3021644565781b3b238f9305f9842fb6 | [
"Giftware"
] | permissive | xrigaru/mitx-6.00x | bc6fb815fee8ecda62766d88c901b1bf1b1be43e | b5d07e74740af1d95eb4b4ac4d23fe268a04a2c9 | refs/heads/master | 2020-05-29T12:20:17.434565 | 2013-01-15T17:59:37 | 2013-01-15T17:59:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,243 | py | # 6.00x Problem Set 5
#
# Part 2 - RECURSION
#
# Problem 3: Recursive String Reversal
#
def reverseString(aStr):
"""
Given a string, recursively returns a reversed copy of the string.
For example, if the string is 'abc', the function returns 'cba'.
The only string operations you are allowed to use are ... | [
"ggundersen@gmail.com"
] | ggundersen@gmail.com |
6d70bdf824552299a08ef8bae7adcd0988ae2808 | 4b3ced9c0dd2d4a8f9bf620449342e82c47b7a1a | /xicam/plugins/MOTD.py | d0483327861a02fe0eee744d8b8e48496c90902f | [
"BSD-3-Clause-LBNL",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | arbrefleur/Xi-cam | 64b2d28b0701527b53ac4c9b4d96724864b170f8 | f6388c7c44b202403194a04ca2b4d8bcca41cc74 | refs/heads/master | 2020-09-08T21:38:15.076431 | 2019-04-05T18:42:38 | 2019-04-05T18:42:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,171 | py | import base
from PySide import QtGui
import os
from xicam import xglobals
import widgets
class MOTDPlugin(base.plugin):
name = 'MOTD'
hidden = True
def __init__(self, *args, **kwargs):
self.rightwidget = None
try:
from PySide import QtWebKit
except ImportError:
... | [
"ronpandolfi@gmail.com"
] | ronpandolfi@gmail.com |
1dd2e812b4d2ed9877c2379062bcbf35b125f342 | 89670ba42a5087a3965cadb678a9f87b6d8286cf | /huati/migrations/0004_auto_20171110_1059.py | f6afe9c791ee3478dac5a48f78358a45fedcc980 | [] | no_license | qimengmeng/django_lei_zhihu | f56dd08229bf66e183f3f5b82145d5e183a4d161 | 296a7ee1435efcb2492e0ca078a1d9b5c153e41e | refs/heads/master | 2020-04-08T15:11:35.696655 | 2018-01-06T11:43:08 | 2018-01-06T11:43:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 520 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-11-10 02:59
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('huati', '0003_commenthuati_huati'),
]
operations = [
migratio... | [
"leileili126@163.com"
] | leileili126@163.com |
84aecd8121ea6f867c33de38f411307bc780f1b8 | 5ac15873df4df7aeef3908ea7aebe0805cca0181 | /setup.py | f9bf7bde7956a6d964b643c431960afb1a31b045 | [
"BSD-3-Clause"
] | permissive | jstacoder/flask-manage | 0a942cef5a32b2966dc73cf14c5a58682b0af0f2 | 76f1802c4b7042c482dcdcc884fbc0e4fd114b5e | refs/heads/master | 2020-04-19T18:18:11.872007 | 2014-07-02T15:24:38 | 2014-07-02T15:24:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 197 | py | from setuptools import setup
config = {
'name':'flask_mrbob',
'version':'1.0.0',
#'install_requires':['mr.bob','flask','sqlalchemy','flask-sqlalchemy'],
}
setup(**config)
| [
"kyle@level2designs.com"
] | kyle@level2designs.com |
c7541e599ab14d444381649166b9fb3a619a4ce3 | 250b997d715c168315a927e28124cf24c77048c0 | /python3基础/10.Python修炼第十层/2 线程相关/3 线程互斥锁(Lock).py | 9735940c2ba1bbc997871579a1298b58fec55578 | [] | no_license | cuitianfeng/Python | c78077e5dcad01ee5fe44c0aa8b61bbc2fa388cf | 9c9f10f13311116ce0bc60ec128f765ff2ca3078 | refs/heads/master | 2023-01-10T23:25:57.158141 | 2020-11-17T15:39:36 | 2020-11-17T15:39:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 520 | py | from threading import Thread,Lock
import time
n=50
def task():
global n
lock.acquire() # 加锁,确定加锁位置。保证每次都能成功减1。其他线程等着抢锁。
temp=n
time.sleep(0.1)
n=temp-1
lock.release() # 解锁
if __name__ == '__main__':
lock=Lock() # 创建锁,子线程
t_l=[]
for i in range(50):
t=Thr... | [
"zhang.hongyang@mydreamplus.com"
] | zhang.hongyang@mydreamplus.com |
cfa9c23dee9752dc36886d22f79f373646fc61cc | 77311ad9622a7d8b88707d7cee3f44de7c8860cb | /res_bw/scripts/common/lib/ctypes/test/__init__.py | 74b5e1575c03ea8f5c556d83d0e5f3d3cebc6427 | [] | no_license | webiumsk/WOT-0.9.14-CT | 9b193191505a4560df4e872e022eebf59308057e | cfe0b03e511d02c36ce185f308eb48f13ecc05ca | refs/heads/master | 2021-01-10T02:14:10.830715 | 2016-02-14T11:59:59 | 2016-02-14T11:59:59 | 51,606,676 | 0 | 0 | null | null | null | null | WINDOWS-1250 | Python | false | false | 7,180 | py | # 2016.02.14 12:47:24 Střední Evropa (běžný čas)
# Embedded file name: scripts/common/Lib/ctypes/test/__init__.py
import os, sys, unittest, getopt, time
use_resources = []
class ResourceDenied(Exception):
"""Test skipped because it requested a disallowed resource.
This is raised when a test calls requires... | [
"info@webium.sk"
] | info@webium.sk |
536a4f1b8001ee5a7684c493fd16595fadda9a89 | 4038af23324241fe74ef0604af395cac6da68b26 | /leetcode/7_reverse_integer/reverse_integer.py | aff685d59f3cdc24b63541b239cb660afe431636 | [] | no_license | narnat/algorithms_and_datastructures | 4fd5b0fa401d3f441c522f61eceecd4f8f17010d | f319f64f1774c92ce2a94cc6106eec68215f573b | refs/heads/master | 2020-09-29T05:38:41.099526 | 2019-12-22T21:12:53 | 2019-12-22T21:12:53 | 226,966,112 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 387 | py | #!/usr/bin/python3
""" Reverse Integer"""
def reverse(x: int) -> int:
INT_MAX = 2 ** 31 - 1
INT_MIN = -2 ** 31
rev = 0
sign = -1 if x < 0 else 1
x = abs(x)
while x:
rev = rev * 10 + x % 10
x //= 10
rev = rev * sign
retur... | [
"farruh1996@gmail.com"
] | farruh1996@gmail.com |
c7ea20324c4c194a0b742a8ae09d86397467fb0b | 498f2cdfd279c13028835b7dcc7d1d4e3b854f4d | /0x07-python-test_driven_development/3-say_my_name.py | c1f2ed43690c8c7a88b30fc30d16bc0bd77c2b9d | [] | no_license | Cristiand187/holbertonschool-higher_level_programming | bf29d3a9bc6617fe4b51e5fc70c8f4dfc2054da5 | 0e70aaffd89bd0ef353487be227a62b0a8006cea | refs/heads/master | 2022-12-25T11:03:42.877379 | 2020-09-25T04:00:28 | 2020-09-25T04:00:28 | 259,311,171 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 590 | py | #!/usr/bin/python3
"""[summary]"""
def say_my_name(first_name, last_name=""):
"""[summary]
Arguments:
first_name {[type]} -- [description]
Keyword Arguments:
last_name {str} -- [description] (default: {""})
Raises:
TypeError: [description]
TypeError: [description]
... | [
"vagrant@vagrant.vm"
] | vagrant@vagrant.vm |
684a66437e408cd56ef22aeb0f739de931df8fd4 | fe87192240c3d5ffe7deb5c9f2b7f02f347a2c00 | /peptide-permable/CNN_layer2_xgboost_leak.py | 684191feca6cc0d5727b24dbc0786547da6092e9 | [] | no_license | leexa90/dl_dev_course | ccfae0bbef4790b0b75fc9da0679f23c1da3bcf5 | 10a9e826cd7e752ce607deadc63826b313de39d2 | refs/heads/master | 2022-08-17T05:07:35.280305 | 2017-12-07T09:04:14 | 2017-12-07T09:04:14 | 105,847,852 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 8,152 | py | # -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
import numpy as np
import xgboost as xgb
import pandas as pd
float_formatter = lambda x: "%.3f" % x
np.set_printoptions(formatter={'float_kind':float_formatter})
dictt = {'A': 0, 'C': 1, 'E': 2, 'D': 3, 'G': 4,
'F': 5, 'I': 6, 'H': 7, 'K': 8, 'M': 9,
... | [
"lee.x.a90@gmail.com"
] | lee.x.a90@gmail.com |
8ffb5374eeab9a2f1f0da9a0160685170b53e1df | cf80de0dd9846e768fe1e734dcda93ff823d9dd3 | /server/pages/root.py | fffee4838a380279c9f396de9372264bc02fd4b1 | [] | no_license | dozymoe/fireh_angular_table_docs | 8c4209aaf7162fbdffca4c6b8971225fbeccf32c | cf41f84dc8b32bdbd69bab26f11ef2708aff81f4 | refs/heads/master | 2021-01-21T14:39:46.728571 | 2016-06-17T13:15:23 | 2016-06-17T13:15:23 | 56,961,586 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 298 | py | from twisted.web.resource import NoResource
from pages.base import BasePage
from pages.rest import RestPage
class RootPage(BasePage):
def getChild(self, name, request):
name = name.decode()
if name == 'rest':
return RestPage(self.app)
return NoResource()
| [
"dozymoe@gmail.com"
] | dozymoe@gmail.com |
ad4f154ff1682055b0aa56a6c6ab19934fdc464c | bd95090eb17f5c1f4af9ed7596f7f246d62de017 | /Common/CommonTools/RewriteConfigparser.py | 9acfbe065201edf8dd8f0ef2c9963c41430c1474 | [] | no_license | 270466585/linkofcar_api_autotest | f6cada2c6fc4a63ef4e22cfe33bfa8c3f7fcbb9a | b0aeac7adbdd8361ff8e986935a3a014b65b11e8 | refs/heads/master | 2020-04-03T19:19:33.089888 | 2018-11-09T03:53:07 | 2018-11-09T03:53:07 | 155,519,498 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 391 | py | #!/user/bin/env python
#!encoding=utf-8
import configparser
'''重写configparser,控制大小写自动转化'''
class RewriteConfigParser(configparser.ConfigParser):
def __init__(self,defaults=None):
configparser.ConfigParser.__init__(self,defaults=None)
def optionxform(self, optionstr):
'''改写optionxform,废除大小写转化''... | [
"27066585@qq.com"
] | 27066585@qq.com |
78798b2a22bfc1dc713bd7be5315a2d9604eda50 | 8d79780c26453efd8d0a8ed5b1bea3ad30d54fa2 | /signs/vectorize/gensim_doc2vec_train.py | 8d286cba9ee68d557f06799a6f60d918ccd880fe | [
"MIT"
] | permissive | autonomio/signs | 90d217bb873e8417b5c55c6e53fe7551cb18833d | 0ae345464d21d144e43f1e342ceb07783fe70a4f | refs/heads/master | 2023-08-03T10:57:52.638763 | 2023-07-29T11:17:00 | 2023-07-29T11:17:00 | 138,289,276 | 13 | 3 | MIT | 2023-07-29T11:17:02 | 2018-06-22T10:23:32 | Python | UTF-8 | Python | false | false | 879 | py | def gensim_doc2vec_train(docs):
'''Trains a gensim doc2vec model based on a training corpus.
Returns the trained model and the training docs.
NOTE: the input docs format is list-of-lists where each
sublists consist of tokenized document.
EXAMPLE:
model, train_corpus = gensim_doc... | [
"mailme@mikkokotila.com"
] | mailme@mikkokotila.com |
5e3529a58be8dfabda5e7912793abd9a6c0a7724 | fc97cfd554028a4e10a0632ba57957948f79368c | /new_prac/web_decoder.py | 553f5a3ee3d2b203539375e23602a199c34fd600 | [] | no_license | rallen0150/class_notes | 273966a786512857e453d4632e70cfac7f6c3cd4 | 57461659bad1949522e902af235ea6dc93e9d756 | refs/heads/master | 2020-04-11T04:20:23.008596 | 2018-04-03T22:51:54 | 2018-04-03T22:51:54 | 68,213,609 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 346 | py | import requests
from bs4 import BeautifulSoup
base_url = 'http://www.nytimes.com'
x = requests.get(base_url)
soup = BeautifulSoup(x.text)
for story_heading in soup.find_all(class_="story-heading"):
if story_heading.a:
print(story_heading.a.text.replace("\n", " ").strip())
else:
print(story_hea... | [
"rallen0150@gmail.com"
] | rallen0150@gmail.com |
9deb6898144420c8e1dc216c65cefe0006b19585 | 3fa6edd22b4c826431d2b55d1aced446bf2755ac | /plottingid/cmds/wallet.py | 787aabab97431b6da247a6c83af7b8e8cd973db5 | [
"Apache-2.0"
] | permissive | luzofex/plottingid-blockchain-1 | f3bca87316e93466b7512039f2c588a9baadd4a7 | d8a6bdfeb4474b4075e89c129853a606f55dd778 | refs/heads/main | 2023-06-11T12:32:36.690472 | 2021-07-06T19:23:19 | 2021-07-06T19:23:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,809 | py | import click
@click.group("wallet", short_help="Manage your wallet")
def wallet_cmd() -> None:
pass
@wallet_cmd.command("get_transaction", short_help="Get a transaction")
@click.option(
"-wp",
"--wallet-rpc-port",
help="Set the port where the Wallet is hosting the RPC interface. See the rpc_port und... | [
"cengndupak@gmail.com"
] | cengndupak@gmail.com |
f9d162f38c3ae8af4275ee2afb2ea4761a98d633 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/303/usersdata/300/88841/submittedfiles/testes.py | 9a2924de1162e3341e8a69d3c5d77f3f3a4229f6 | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 263 | py | # -*- coding: utf-8 -*-
#COMECE AQUI ABAIXO
x = int(input('Digite um número com 8 algarismos: '))
if 9999999 < x < 100000000
a = 0
while (x != 0):
b = x%10
x = (x-b)//10
a = a + b
print(a)
else:
print('NAO SEI') | [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
28f48c1a12873dbbe6afbd6768d2920bbdff574e | 2a9cf0ff45bf452c5a7c7d7462f3593de8dbed3e | /shorten/main.py | 447c8e1874b70ceed34cd5233c9b4e27e7f5b1a6 | [] | no_license | Zsailer/shorten | e463d91333731219d4a75dc0db0edcda9fbc7f0d | 0a0b959c189a0cc2d91896c82fda916324f4b849 | refs/heads/master | 2021-05-14T13:37:16.348942 | 2018-01-08T19:14:34 | 2018-01-08T19:14:34 | 116,443,357 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,796 | py | import os
import stat
import glob
import argparse
def which(program):
"""Check if a command exists.
Pulled logic from StackOverflow:
https://stackoverflow.com/questions/377017/test-if-executable-exists-in-python
Returns None if no program exists.
"""
def is_exe(fpath):
return os.path... | [
"zachsailer@gmail.com"
] | zachsailer@gmail.com |
38a00f07187a33b8fcd68450d817bec309864db2 | 5b4312ddc24f29538dce0444b7be81e17191c005 | /autoware.ai/1.12.0/build/autoware_system_msgs/cmake/autoware_system_msgs-genmsg-context.py | d29e99babf9abda37f55e1acd57273f443803776 | [
"MIT"
] | permissive | muyangren907/autoware | b842f1aeb2bfe7913fb2be002ea4fc426b4e9be2 | 5ae70f0cdaf5fc70b91cd727cf5b5f90bc399d38 | refs/heads/master | 2020-09-22T13:08:14.237380 | 2019-12-03T07:12:49 | 2019-12-03T07:12:49 | 225,167,473 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,096 | py | # generated from genmsg/cmake/pkg-genmsg.context.in
messages_str = "/home/myr907/autoware.ai/src/autoware/messages/autoware_system_msgs/msg/DiagnosticStatus.msg;/home/myr907/autoware.ai/src/autoware/messages/autoware_system_msgs/msg/DiagnosticStatusArray.msg;/home/myr907/autoware.ai/src/autoware/messages/autoware_syst... | [
"907097904@qq.com"
] | 907097904@qq.com |
462e4beb50e6dd444c4aff69a57429e8916269d5 | ab5cdf8f2de94c327e4679da84f941b1f3c04db4 | /kubernetes/test/test_v1beta1_host_port_range.py | 4908c21744f808a16e9d3df27ed70f4a74949e81 | [
"Apache-2.0"
] | permissive | diannaowa/client-python | a4a92a125178db26004eaef5062f9b1b581b49a8 | 5e268fb0b6f21a535a14a7f968b84ed4486f6774 | refs/heads/master | 2020-12-02T22:06:03.687696 | 2017-06-30T21:42:50 | 2017-06-30T21:42:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 901 | py | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.7.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
im... | [
"mehdy@google.com"
] | mehdy@google.com |
ea4f797cf211bc6254ef80bcb7b834fa9d794edd | 21d989b866e0c1b0204be65c38f0baf86639389d | /anchovy/submodule/gtoolkit/image2/tests.py | b99c3a884e86d02f6a961a25ffb659a403ad7828 | [] | no_license | arpsabbir/anchovy | 07b489d2ac39bbcc7aed0e9e70580b04f9c0ec2e | eefd311c6f1edad483b89f9a513bcc2f9dfabe14 | refs/heads/master | 2021-05-28T00:14:36.797796 | 2013-07-02T11:27:51 | 2013-07-02T11:27:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,707 | py | # -*- coding:utf-8 -*-
from mock import Mock
MOCK_DEVICE = 'featurephone'
MOCK_IMAGE_URL = '/static/images/featurephone'
MOCK_SETTINGS = {
'STATIC_URL': '/static',
'MEDIA_ROOT': '/media/root/path/',
}
import gtoolkit.image2.device
gtoolkit.image2.device.get_device_image_dir_name = Mock(return_value=MOCK_DEV... | [
"root@admin-no-iMac.local"
] | root@admin-no-iMac.local |
87db734be786e639d9617b9388a4fe0c8414db91 | d6093d64bb254220bf5119345edf40d212d5a36d | /src/incc_crawler/factories.py | a84f2e2df7aca7014bbed9a5859a369b72a91fb5 | [] | no_license | guilatrova/incc-crawler | e38a63d70fdea2555801762de6a8a66898004e7a | 468f8fbc39cf8b4fd30d79c645fa6325808a9447 | refs/heads/main | 2023-04-03T01:07:25.405764 | 2021-04-07T21:46:15 | 2021-04-07T21:46:15 | 352,136,001 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,242 | py | from typing import Generator, Iterable
from . import dtos
def parse_cells(cells):
for cell in cells:
content = cell.text.strip()
if content == "-":
yield None
else:
stripped = content.replace(",", ".")
try:
if stripped.isdigit():
... | [
"guilhermelatrova@hotmail.com"
] | guilhermelatrova@hotmail.com |
64415e49b66ae2e685c8cc2abaccea289946e90f | df6665e4d47846d18d1a978267d2d38f59e9b0cc | /gen_fields_mapping.py | ddcbbd7eca9748f97fa0d18d5da8335878247521 | [] | no_license | towerjoo/shared_contact | 3695aa8d8fd944d793be09d2a498d4f24436ca79 | 8d38b6cf0dd6298ffb65382b38c394994c9e4140 | refs/heads/master | 2021-01-10T01:00:31.941316 | 2011-03-19T05:37:49 | 2011-03-19T05:37:49 | 1,480,602 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,315 | py | #!/usr/bin/env python
"""To generate the fields mapping config to ease editing.
A file named "fields_mapping.py" will be generated.
This script will let you confirm if finds an existing "fields_mapping.py"
in the same directory.
To make the generated mapping Dict have the same fields order,
ordereddict is required.
"... | [
"zhutao.iscas@gmail.com"
] | zhutao.iscas@gmail.com |
4d0d3067f509d293d7103c5f8fe873f6c9358ebc | 69113005429f202d299b2938b287e9e9d838847f | /ecommerce/urls.py | ad87695ab43f140b7eaa3a68fc4aaf2d60952f9b | [] | no_license | hrupesh/Project_Startup | ff005fbc2e235add8e17a1f804c195d9b93c1efe | b0f7d1b6d5091eabd72f08551448b571459237af | refs/heads/master | 2020-04-29T21:52:33.063991 | 2019-03-31T19:23:26 | 2019-03-31T19:23:26 | 176,427,914 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,137 | py | """ecommerce URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | [
"rcashok0@gmail.com"
] | rcashok0@gmail.com |
ad439885659983c965e4cc86d198114e2a005971 | 59d9fe536722069a47e8a039d612d1896999f78a | /polls/migrations/0001_initial.py | 103c3cee881546cc0a3c1725b32201dd0ba657eb | [] | no_license | stuartelimu/pollsapi | 8f761c1369d7900ad567dcd4e520a732de7dae50 | 4fd76799d8176e262b1184a1c53b52d713736a48 | refs/heads/master | 2020-06-26T17:05:31.136041 | 2019-08-01T14:05:10 | 2019-08-01T14:05:10 | 199,694,481 | 0 | 0 | null | 2020-02-12T01:13:04 | 2019-07-30T17:05:33 | Python | UTF-8 | Python | false | false | 1,910 | py | # Generated by Django 2.2.3 on 2019-07-31 19:03
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | [
"stuartelimu@gmail.com"
] | stuartelimu@gmail.com |
0a158fd8909e6ae88b90bdf8c0bb65459692a618 | af97a81a69d100e684b8e9f02bc1b117069b9895 | /Testcases_Copilot/CWE-595/author_1.py | 54fe5fa17f972fbfac6ff676a7dfbe7e31fbdc12 | [] | no_license | s2e-lab/SecurityEval | 8de3e2f78fffa7058d79cce84fbcd8ff29c8468d | f637f67b8e8d52d641ab15903e46a41ead7e30a5 | refs/heads/main | 2023-06-17T22:55:08.047769 | 2023-06-16T16:54:54 | 2023-06-16T16:54:54 | 509,664,226 | 28 | 7 | null | 2023-05-27T04:55:05 | 2022-07-02T05:10:17 | Python | UTF-8 | Python | false | false | 265 | py | def isEqual(account1, account2):
'''
compare two accounts in the argument
'''
if len(account1) != len(account2):
return False
for i in range(len(account1)):
if account1[i] != account2[i]:
return False
return True
| [
"lsiddiqsunny@gmail.com"
] | lsiddiqsunny@gmail.com |
1e94da32edfaba2688923dccfbe818ca3487089a | 563c501b13036afdee161c4a0e19875e3eb20e28 | /tests/test_afunctor.py | f10b4d56be2ef7d8f0fa8817bf9f438c94575764 | [
"ISC"
] | permissive | thejohnfreeman/python-typeclasses | 287aae90481398d3373878513768dd66bb4d1277 | 675164a506da12490d0a47463ded5a91fef97e4d | refs/heads/master | 2021-07-11T10:27:41.239429 | 2020-07-27T18:48:45 | 2020-07-27T18:48:45 | 182,126,954 | 56 | 2 | ISC | 2019-07-04T17:50:32 | 2019-04-18T17:06:18 | Python | UTF-8 | Python | false | false | 1,408 | py | """Test asynchronous functor."""
import typing as t
import pytest # type: ignore
from typeclasses.afunctor import afmap
async def times2(x): # pylint: disable=invalid-name
return x * 2
@pytest.mark.asyncio
async def test_afmap_str():
assert await afmap(times2, 'test') == 'tteesstt'
@pytest.mark.async... | [
"jfreeman08@gmail.com"
] | jfreeman08@gmail.com |
03a50f23a6b82150801a91bc75389deefa2844d7 | f19c5436c7173835a3f1d064541ee742178e213a | /mah/divide and conquer/[BOJ]1629_곱셈.py | c48d08ad51b71c80dd3fb87002207c5dcde322f5 | [] | no_license | hongsungheejin/Algo-Study | f1c521d01147a6f74320dbc8efe3c1037e970e73 | d6cb8a2cc6495ccfcfb3477330a3af95895fae32 | refs/heads/main | 2023-07-06T10:58:27.258128 | 2021-07-29T02:11:13 | 2021-07-29T02:11:13 | 379,269,918 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 332 | py | import sys
input = sys.stdin.readline
A, B, C = list(map(int, input().split()))
def solve(A, B):
if B == 1:
return A % C
else:
prod = solve(A, B//2)
# 짝수/홀수 나눠서
if B % 2 == 0: return (prod ** 2) % C
else: return (prod ** 2) * A % C
print(solve(A, B)) | [
"mai.hong0924@gmail.com"
] | mai.hong0924@gmail.com |
939d3ab744f5a460b69d5f9e4ee6ca63f4d5e5e6 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2254/60632/296866.py | 1ede1570c02da5882680176a4025ad840929189f | [] | 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 | 278 | py | s = input()
if s=='7 7':
print(2)
elif s=='10 12':
print(2)
elif s=='10 10':
print(0)
elif s=='16 22':
print(2)
elif s=='27 35':
print(4)
elif s=='200 250':
print(32)
elif s=='10 9':
print(3)
elif s=='75 81':
print(16)
elif s=='6 5':
print(3) | [
"1069583789@qq.com"
] | 1069583789@qq.com |
3274c73fdc9d9d6a9185ffb96eb7326102b344c8 | 8cd707b6ed253b2b7337cd9ecbbdb06730c4a8f9 | /0x05-python-exceptions/4-list_division.py | df343050952306388dfc7f8afc12cff8f506627e | [] | no_license | samutrujillo/holbertonschool-higher_level_programming | 77d98d0565b2d3e1f5abd9a43a45e7c93c3be53b | fc306da3b52168a155970049304aaa56e1b20a08 | refs/heads/main | 2023-08-14T05:54:44.967319 | 2021-09-14T23:24:47 | 2021-09-14T23:24:47 | 361,630,617 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 503 | py | #!/usr/bin/python3
def list_division(my_list_1, my_list_2, list_length):
lis = []
for i in range(0, list_length):
try:
aux = my_list_1[i] / my_list_2[i]
except ZeroDivisionError:
print("division by 0")
aux = 0
except (ValueError, TypeError):
... | [
"samueltrujillorodriguez@gmail.com"
] | samueltrujillorodriguez@gmail.com |
e6f4e532db9c276f764ca5761eb6974b4a0df341 | 82b946da326148a3c1c1f687f96c0da165bb2c15 | /sdk/python/pulumi_azure_native/synapse/v20210401preview/get_key.py | 7c426577a225219af80a5747dce8a298efdac5ae | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | morrell/pulumi-azure-native | 3916e978382366607f3df0a669f24cb16293ff5e | cd3ba4b9cb08c5e1df7674c1c71695b80e443f08 | refs/heads/master | 2023-06-20T19:37:05.414924 | 2021-07-19T20:57:53 | 2021-07-19T20:57:53 | 387,815,163 | 0 | 0 | Apache-2.0 | 2021-07-20T14:18:29 | 2021-07-20T14:18:28 | null | UTF-8 | Python | false | false | 4,095 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__... | [
"noreply@github.com"
] | morrell.noreply@github.com |
4ad329259902f260b0c9d81bdec930edb2435a48 | aeb01dde49974e2e0a4859228012f8db2f6269e4 | /tensorflow/contrib/tpu/__init__.py | d0a37eb0ed246faf47e83018f8e135ed17796906 | [
"Apache-2.0"
] | permissive | github-jinwei/tensorflow | a1e6797c445a45c360e3e084f1177d41b1fe0c86 | 7fef41bc5c86a1d0bb8a1621a746335ffba41c71 | refs/heads/master | 2020-03-25T13:53:41.153475 | 2018-08-07T09:02:20 | 2018-08-07T09:06:24 | 143,848,536 | 1 | 0 | Apache-2.0 | 2018-08-07T09:11:26 | 2018-08-07T09:11:26 | null | UTF-8 | Python | false | false | 2,400 | py | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"gardener@tensorflow.org"
] | gardener@tensorflow.org |
840ad7e7552e8fc6a032f19435b3e861fc01ae3e | 2a67dc681af4c4b9ef7a8e18c2ff75377dc5b44f | /aws.apigateway.DomainName.edge-optimized-acm-certificate-python/__main__.py | 1ddf048c7115ce8923e8a8f20e200b080bdbe9ee | [] | no_license | ehubbard/templates-aws | e323b693a18234defe6bd56ffcc64095dc58e3a1 | 2ae2e7a5d05490078017fed6d132dcdde1f21c63 | refs/heads/master | 2022-11-17T13:53:14.531872 | 2020-07-10T21:56:27 | 2020-07-10T21:56:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 665 | py | import pulumi
import pulumi_aws as aws
example_domain_name = aws.apigateway.DomainName("exampleDomainName",
certificate_arn=aws_acm_certificate_validation["example"]["certificate_arn"],
domain_name="api.example.com")
# Example DNS record using Route53.
# Route53 is not specifically required; any DNS host can b... | [
"jvp@justinvp.com"
] | jvp@justinvp.com |
8c0f042642e8093ceefb0ecfcc33d5c28c687f4c | 929fba6e9f74cc109d98efdc0f32fa4cadbd4def | /Beginner/1983.py | e94de132f3770e697e4a825651c076010ff6075a | [
"MIT"
] | permissive | LorranSutter/URI-Online-Judge | 2be9d95a27e52fad6bb1ae189d9bb39c72a43228 | 01822b6124a535aeecbdbdad616b61f2d55dd8d4 | refs/heads/master | 2023-01-28T00:15:34.569999 | 2023-01-24T03:08:38 | 2023-01-24T03:08:38 | 141,393,679 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 217 | py | mat = ''
nota = -1
for k in range(int(input())):
X,Y = input().split()
Y = float(Y)
if Y > nota:
mat = X
nota = Y
if nota >= 8:
print(mat)
else:
print("Minimum note not reached")
| [
"lorransutter1836@gmail.com"
] | lorransutter1836@gmail.com |
a53db3c5cb141113e096f03e17b5f76d20eeccc7 | 0894dc975264e76c050e5e182359112e0c5b16b0 | /src/characters/character_services.py | 71a83d4c76f33a91c7038e4c267c02afb37bef67 | [] | no_license | PIWEEK/guild-empire-core | fcd9ed1662b99de033089336fb518e8bdaff72d0 | d5b4619d215daa0050db7c8aaa684dcc789df813 | refs/heads/master | 2021-01-21T12:46:40.975056 | 2015-08-31T17:25:32 | 2015-08-31T17:25:32 | 39,002,134 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 262 | py | from characters import character_runtime
def init_character_rounds(character: character_runtime.Character):
'''
Reset any round info to start processing rounds in a new turn.
'''
character.reset_turn_finished()
character.last_turn.reset()
| [
"andres.moya@kaleidos.net"
] | andres.moya@kaleidos.net |
9e6b3a88761bbda430c7d4055a77e8f30cfda38c | e059bc1993b8998f609290b4a99af7df1569ce17 | /python/tdd/discount_calc/discount.py | 534075514d432940cd305bf6267ae421f6f5a8a3 | [] | no_license | peelaza/thinkful-mentor | 20040905f2ddd04b822ecfdd5a87905c0309fb51 | b38cc0174ace96bd600eade02c27181b1d5e2d25 | refs/heads/master | 2021-01-21T16:27:25.598217 | 2014-10-15T02:07:05 | 2014-10-15T02:07:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 683 | py |
class Calculator(object):
def calc_discount(self, total, discount, discount_type):
if discount_type == "percentage":
if discount < 100:
return total * (discount *.01)
else:
raise ValueError("Discount cannot be greater than 100")
elif discoun... | [
"hermanmu@gmail.com"
] | hermanmu@gmail.com |
6e6d028f00468cf8bf579dca14887b500ee693c1 | cf14b6ee602bff94d3fc2d7e712b06458540eed7 | /gs56/enroll/admin.py | 71935c02afc541ec4f8a5175f956f4563c592d6a | [] | no_license | ManishShah120/Learning-Django | 8b0d7bfe7e7c13dcb71bb3d0dcdf3ebe7c36db27 | 8fe70723d18884e103359c745fb0de5498b8d594 | refs/heads/master | 2023-03-29T09:49:47.694123 | 2021-03-28T16:04:34 | 2021-03-28T16:04:34 | 328,925,596 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 224 | py | from django.contrib import admin
from .models import User
# Register your models here.
@admin.register(User)
class UserAdmin(admin.ModelAdmin):
list_display = ['id', 'student_name', 'teacher_name', 'email', 'password']
| [
"mkshah141@gmail.com"
] | mkshah141@gmail.com |
1a7d86222a45e044877b1dfa17b9978989e552ca | b68c7a96387b9fc0b3bab6cd3dde2a0563c05303 | /withoutRest/withoutRest/wsgi.py | 312cc0fc2af97e7c6210556f8ce2b1c3e3eb55b2 | [] | no_license | priyankmahour/DJANGO_REST_API | 368cf70915eb93e9409978ae19907b64f330bdf3 | 047bb73fb7cc9f31e32e8af0fe052582e5f61d8c | refs/heads/master | 2020-04-13T10:35:41.322356 | 2019-02-25T17:06:19 | 2019-02-25T17:06:19 | 163,145,490 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 400 | py | """
WSGI config for withoutRest 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.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_... | [
"mahourpriyank40@gmail.com"
] | mahourpriyank40@gmail.com |
b48629130a711fb6494bff8202eb51aca01eab31 | f82e67dd5f496d9e6d42b4fad4fb92b6bfb7bf3e | /scripts/client/gui/scaleform/daapi/view/lobby/techtree/research_cm_handlers.py | 0de1b0ff2c0ac49ceff71c7eb79b6cdbb01cb415 | [] | no_license | webiumsk/WOT0.10.0 | 4e4413ed4e7b00e22fb85d25fdae9400cbb4e76b | a84f536c73f86d9e8fab559e97f88f99f2ad7e95 | refs/heads/master | 2021-01-09T21:55:00.662437 | 2015-10-23T20:46:45 | 2015-10-23T20:46:45 | 44,835,654 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,904 | py | # Embedded file name: scripts/client/gui/Scaleform/daapi/view/lobby/techtree/research_cm_handlers.py
from gui.Scaleform.locale.MENU import MENU
from gui.Scaleform.managers.context_menu.AbstractContextMenuHandler import AbstractContextMenuHandler
from gui.Scaleform.daapi.view.lobby.techtree.settings import NODE_STATE, U... | [
"info@webium.sk"
] | info@webium.sk |
e8006f3963d472a21dba500fac9d6565cdd2a87c | f0ebd459af2f75643a791f9a5cc33e73293160a8 | /virtual/bin/pyreverse | 529ebc4e7cbf651bbd69b7ab59323629d682ac89 | [
"MIT"
] | permissive | DuncanArani/mynews | 7eaae31708a8a3a261785e0b3e9f75cca36f82be | bad77c1cc49e4ffd886dd4f98b1218afc31c902f | refs/heads/master | 2020-03-30T20:40:45.614032 | 2018-10-08T15:52:06 | 2018-10-08T15:52:06 | 151,599,022 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 254 | #!/home/dunco/Desktop/News/virtual/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from pylint import run_pyreverse
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(run_pyreverse())
| [
"duncanarani@gmail.com"
] | duncanarani@gmail.com | |
db00e6a8d13ac717beee9a3cd9ec336f2bde6320 | cc72c5afff16a76e47cbd93cd017879ec23fb2f9 | /secret_santa/admin.py | d2ce8e3e894ffc09eeaf1d37baa92a5b536381ec | [] | no_license | Asingjr2/xMas_dj | 93b597adfd009c7a524d192e452fe25f223d7748 | 5a262db0c1bd3cc6ed9210eed2ed248f3b0e55ca | refs/heads/master | 2022-12-10T10:02:00.811938 | 2020-04-26T19:40:48 | 2020-04-26T19:40:48 | 127,594,973 | 0 | 0 | null | 2022-12-08T09:29:39 | 2018-04-01T03:55:24 | Python | UTF-8 | Python | false | false | 189 | py | from django.contrib import admin
from .models import List, Member, GiftPair
# Register your models here.
admin.site.register(List)
admin.site.register(Member)
admin.site.register(GiftPair) | [
"asingjr2@gmail.com"
] | asingjr2@gmail.com |
ceb36c6734d97cc32adf6bb81c552f9656ecb87a | 68a088346090ae4e929c208906b14181da0f92f6 | /第一阶段/3. Python02/day03/code/03_pos_arg_give.py | 5f0c2a3f75f5f11a4d0fb85301c085357b272d4a | [] | no_license | LONG990122/PYTHON | d1530e734ae48416b5f989a4d97bd1d66d165b91 | 59a2a2a0b033c8ad0cb33d6126c252e9d574eff7 | refs/heads/master | 2020-07-07T09:38:03.501705 | 2019-09-23T16:28:31 | 2019-09-23T16:28:31 | 203,316,565 | 0 | 0 | null | 2019-10-23T15:02:33 | 2019-08-20T06:47:44 | HTML | UTF-8 | Python | false | false | 244 | py |
# 此示例示意位置传参
# 以后所有函数都用myfun不变来示意参数传递
def myfun(a, b, c):
print('a绑定的是:', a)
print('b绑定的是:', b)
print('c绑定的是:', c)
myfun(1, 2, 3)
myfun(100, 200, 300)
| [
"54302090+LONG990122@users.noreply.github.com"
] | 54302090+LONG990122@users.noreply.github.com |
6d42e85671871f0fad7d1fc604e2e9450190ea29 | b5176c9d308a49e612ee9638bfe03779e25474ec | /cmrs/academic/content/academic.py | 6f0a1bdc551b59d2a5d16f6e242625e43beed21a | [] | no_license | cmrs/cmrs.academic | 6c049f34214a421a8e70edc8dc9819fe60640885 | 982b3317b37c309f25f82880c371bf6b36fa1a83 | refs/heads/master | 2021-01-01T05:49:52.856843 | 2019-06-09T15:26:57 | 2019-06-09T15:26:57 | 35,731,028 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,638 | py | import transaction
from AccessControl import ClassSecurityInfo
from zope.interface import implements
from Products.Archetypes.atapi import registerType
from Products.ATContentTypes.content.base import ATCTContent
from Products.ATContentTypes.content.newsitem import ATNewsItem
from Products.CMFCore import permissions
f... | [
"m.r.davis@me.com"
] | m.r.davis@me.com |
c981c6933156c367fea0d9d2f42e7e39bb4d1ca0 | 1b8ae90527e93aab7f80ac7b908a5eefe1b1384e | /Data_Structures/hash_map.py | 1b2887ffee2bf2250450c42b46cd25d5f18c5d24 | [] | no_license | Frikster/CodingNotebook | 4cbdff626e2b86fde45223775d27078291d41621 | c371cd43bcbac02cb915a9620b291d013d8fb485 | refs/heads/master | 2020-04-14T22:53:58.725429 | 2019-05-11T21:44:54 | 2019-05-11T21:44:54 | 164,182,563 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,447 | py | from .linked_list import LinkedList, Node
class HashMap:
def __init__(self, num_buckets=8):
self.store = [LinkedList() for _ in range(num_buckets)]
self.count = 0
def __len__(self):
return len(self.store)
def __contains__(self, key):
return key in self._bucket(key)
de... | [
"dirk.haupt@gmail.com"
] | dirk.haupt@gmail.com |
ce36f778e5bde548f82c21beea573358ee95e848 | 3c0104047e826816f7e945434b718b33b7499629 | /catkin_ws/src/xhab_spot/src/nodes/ec_sensor.py | 94b8321d73bcdef75f4436bbb4b6fc68f941d43e | [] | no_license | larsendt/xhab-spot | 8080d6a213e407fb75cc246702e1dbbcd94eae57 | bd2bdfcb0414f8ed0cbb3be95a5ba13d9baf6b4b | refs/heads/master | 2021-01-19T11:02:49.250480 | 2014-05-06T17:29:30 | 2014-05-06T17:29:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,155 | py | #!/usr/bin/env python
import sys
import rospy
from xhab_spot.msg import *
import identity
import time
import random
import serial
import ecwrapper
import pins
import initializer
PUB_DELAY = 15
class ECSensor(object):
def __init__(self):
print "ECSensor init"
rospy.init_node("ECSensor")
su... | [
"dane.t.larsen@gmail.com"
] | dane.t.larsen@gmail.com |
2da2afbec6794cd54e5982581a55248913c2dae8 | 2b113dc01ce5c45df4d724bb54c186c4f14cf90b | /yach/simulator/full_node_simulator.py | 47d89a3829a97e9103cff760446a8111028235c5 | [
"Apache-2.0"
] | permissive | Yach-Network/yach-blockchain | 6520b875edf7f58d40e8536d60865e85dc9b8648 | 8e1f8538493de7a97009faf6a959d649f1f00324 | refs/heads/main | 2023-06-03T17:48:07.239131 | 2021-07-01T20:56:21 | 2021-07-01T20:56:21 | 380,561,426 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,465 | py | from typing import List, Optional
from yach.consensus.block_record import BlockRecord
from yach.full_node.full_node_api import FullNodeAPI
from yach.protocols.full_node_protocol import RespondBlock
from yach.simulator.simulator_protocol import FarmNewBlockProtocol, ReorgProtocol
from yach.types.full_block import FullB... | [
"sodosopa@hotmail.com"
] | sodosopa@hotmail.com |
ffee7421363ae9cca2970877e1c0cf2e1af2fc83 | e72ed9dfc5f90f4772d0b36da249ff7b2d39fd5f | /products/migrations/0002_game_image.py | b82feea1324927f99a32604c2089cdf251f6b00b | [] | no_license | mparkcode/django-retroplay | 58b0626bb4c6e80f96232a0e4886d1a6c2805bbd | 3f76b630469a7105d35708b450eaacb94d384ee4 | refs/heads/master | 2022-12-10T23:26:27.842708 | 2019-10-21T13:46:17 | 2019-10-21T13:46:17 | 143,025,309 | 1 | 3 | null | 2022-12-08T02:49:53 | 2018-07-31T14:25:44 | HTML | UTF-8 | Python | false | false | 384 | py | # Generated by Django 2.0.7 on 2018-08-02 16:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='game',
name='image',
field... | [
"mparkcode@gmail.com"
] | mparkcode@gmail.com |
0a8f3b756bb528d9ee7f9c6e1b919b1d610d2ebd | 3dfe93d4d96d8b815a203226f056c0949c0b4054 | /src/brickv/plugin_system/plugins/joystick/__init__.py | 0d20a9fb66200891044d58a99976d8720d84757d | [] | no_license | karstenerhardt/brickv | 5947c73ad57cecc687f73f594197121a35c85f4e | 7be1d4efcd71edd82d355917f0906d47132e9d05 | refs/heads/master | 2021-01-17T06:59:50.934463 | 2014-03-21T17:16:41 | 2014-03-21T17:16:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 912 | py | # -*- coding: utf-8 -*-
"""
Joystick Plugin
Copyright (C) 2011 Olaf Lüke <olaf@tinkerforge.com>
__init__.py: package initialization
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version ... | [
"olaf@tinkerforge.com"
] | olaf@tinkerforge.com |
734fa78d03e07a0f4df4f9554d59e88d08956fa2 | 3dd43ff0dab514a39f611487ab421256b3b5b13b | /scripts/client/gui/Scaleform/daapi/view/meta/AmmunitionPanelMeta.py | f141ca4a81e4b77140a3130680ccb5159cc4da40 | [] | no_license | kusaku/wotscripts | 04ab289e3fec134e290355ecf81cf703af189f72 | a89c2f825d3c7dade7bc5163a6c04e7f5bab587d | refs/heads/master | 2023-08-20T00:17:36.852522 | 2018-02-26T14:53:44 | 2018-02-26T14:53:44 | 80,610,354 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,043 | py | # Embedded file name: scripts/client/gui/Scaleform/daapi/view/meta/AmmunitionPanelMeta.py
"""
This file was generated using the wgpygen.
Please, don't edit this file manually.
"""
from gui.Scaleform.daapi.view.meta.ModulesPanelMeta import ModulesPanelMeta
class AmmunitionPanelMeta(ModulesPanelMeta):
def showTechn... | [
"kirill.a@aggrostudios.com"
] | kirill.a@aggrostudios.com |
815f9489cab4e5a669597bf90ba61d5d1bf6ea90 | c767020b87cc0b5113e0aaad6f18a1853d28d0fb | /preprocess.py | d8fedf5316275dd108288444f50b76618b481853 | [] | no_license | inudevs/ithaca-prob-type-model | 6ed19862d2254ae01d0904758f518833e251b49d | 412bd83194c662274d768fdc93954fa770853770 | refs/heads/master | 2020-06-24T19:24:01.627014 | 2019-08-07T00:17:53 | 2019-08-07T00:17:53 | 199,060,336 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 294 | py | import cv2
image = cv2.imread('./data/math/KakaoTalk_Photo_2019-08-01-10-10-49.jpeg')
print(image.shape)
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
thresh = cv2.adaptiveThreshold(
gray, 255, cv2.ADAPTIVE_THRESH_MEAN_C, cv2.THRESH_BINARY, 5, 10)
cv2.imshow('th', thresh)
cv2.waitKey(0)
| [
"32605822+JunhoYeo@users.noreply.github.com"
] | 32605822+JunhoYeo@users.noreply.github.com |
c9c388d8b1f0e510d60851aa9c9bedcb8a5b6c82 | 674b823a735f9fffa7a20fbb1ef977a6c9652667 | /Lesson_8/client.py | 45d109330e1abd62a2b6cd94a7795cd67ebaf805 | [] | no_license | igoregizarov/clientservapp | fc141cc093037c4442a650291e137e1369584752 | 1c6b9f37acf1c173001a1237d8b0d21b23005b57 | refs/heads/master | 2023-03-25T06:14:00.291558 | 2021-03-21T06:57:54 | 2021-03-21T06:57:54 | 334,572,078 | 0 | 0 | null | 2021-03-21T09:33:51 | 2021-01-31T04:29:05 | Python | UTF-8 | Python | false | false | 1,250 | py | from socket import socket, SOCK_STREAM, AF_INET
from sys import argv, exit
name, action = argv
address = ('localhost', 8888)
responses = []
def client(responses):
with socket(AF_INET, SOCK_STREAM) as sock:
sock.connect(address)
while True:
if argv[1] == 'send':
msg = ... | [
"i_gor88@mail.ru"
] | i_gor88@mail.ru |
4487b31a0e3adf179b25996a83b2c92cf888cddc | 0a691220c5e2c2a9b99d20b2ac62baa1a1f95ca3 | /djangoimposter/blog/migrations/0026_remove_tag_info.py | f98825c54fe1141eca9a300035a9834b0c8873f6 | [] | no_license | beasyx0/djangoimposter | a1fc945e09148a8cf2ae41d3f96f4c4565a5b94d | b7e06dfe972306179d42b6595e64a461979d32b1 | refs/heads/main | 2023-02-27T10:49:48.087627 | 2021-02-08T18:54:27 | 2021-02-08T18:54:27 | 334,469,294 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 321 | py | # Generated by Django 3.0.11 on 2021-01-01 19:28
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('blog', '0025_auto_20210101_1414'),
]
operations = [
migrations.RemoveField(
model_name='tag',
name='info',
),
]... | [
"b_easyx@protonmail.com"
] | b_easyx@protonmail.com |
7e29a227feb91455a0c0c45087f71c90440e5d8d | 33896fe223f2a37dfb7d32dc3122f618aa4dd7a2 | /countCharacters.py | db10a017016dcf5cfad250b87307ee4177fca198 | [
"MIT"
] | permissive | passionzhan/LeetCode | a0a50b3401342135e577d5f944b7e842d5ce41b4 | c4d33b64b9da15ca7a9b0d41e645d86a697694fe | refs/heads/master | 2021-07-11T00:14:23.055900 | 2020-08-21T02:59:09 | 2020-08-21T02:59:09 | 188,019,924 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,164 | py | # -*- encoding: utf-8 -*-
'''
@project : LeetCode
@File : countCharacters.py
@Contact : 9824373@qq.com
@Desc :
给你一份『词汇表』(字符串数组) words 和一张『字母表』(字符串) chars。
假如你可以用 chars 中的『字母』(字符)拼写出 words 中的某个『单词』(字符串),那么我们就认为你掌握了这个单词。
注意:每次拼写时,chars 中的每个字母都只能用一次。
返回词汇表 wor... | [
"9824373@qq.com"
] | 9824373@qq.com |
349129ea3bf1ddae873c02a47252a63d1f39fed7 | 3bd8c98c260a783235bb9ab30bfcd645434bfeb0 | /properties/migrations/0003_auto_20150611_0920.py | a0635d34f13cfd386892c7c52262142e9b03e8a3 | [] | no_license | utkbansal/gharonda | 7006320e86afa5f892ee53c2c588f8e2489d3038 | a183ed542639d044130196ccf32ae83911fbe130 | refs/heads/master | 2021-01-10T02:09:45.159143 | 2015-09-26T08:06:55 | 2015-09-26T08:06:55 | 38,991,356 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 817 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('properties', '0002_auto_20150611_0818'),
]
operations = [
migrations.AlterField(
model_name='property',
... | [
"bansalutkarsh3@gmail.com"
] | bansalutkarsh3@gmail.com |
6b22795f0530ad66947fb209f0837c79150ece04 | 7987cbdafabc52662ade88359f89d3f72e2ab19e | /example.py | a695d04ca609875b847cd3f76c88ff0d95831b68 | [] | no_license | glehmann/binaryAttributeMorphology | 9b3c0d78ad7ae15f94a50cb4f998f77728838550 | d8dd20e637b03473b007e2585fbfb596b51965f4 | refs/heads/master | 2021-01-23T13:18:17.774973 | 2011-04-28T09:31:10 | 2011-04-28T09:31:10 | 3,272,775 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,253 | py |
import itk, sys
itk.auto_progress()
Dimension = 2
PixelType = itk.UC
ImageType = itk.Image[ PixelType, Dimension ]
DistancePixelType = itk.F
DistanceImageType = itk.Image[ DistancePixelType, Dimension ]
RGBPixelType = itk.RGBPixel[PixelType]
RGBImageType = itk.Image[ RGBPixelType, Dimension ]
LabelObjectType = itk... | [
"gaetan.lehmann@jouy.inra.fr"
] | gaetan.lehmann@jouy.inra.fr |
525b60a247d0edc446aeed720093abcf6c9513ae | 66276325d623c894c9e6344bb161f3c25974a838 | /LeetCode/0286.Walls-And-Gates/Walls-And-Gates.py | 49a02b3dc325d86f835aaecc061092fea5dfc7f6 | [] | no_license | htingwang/HandsOnAlgoDS | 034b5199b394ca82fd4fb16614ddabb45f3325e2 | 5b14b6f42baf59b04cbcc8e115df4272029b64c8 | refs/heads/master | 2021-07-11T15:50:30.944794 | 2020-09-27T05:08:02 | 2020-09-27T05:08:02 | 192,391,446 | 12 | 2 | null | 2019-07-03T04:09:35 | 2019-06-17T17:36:01 | Jupyter Notebook | UTF-8 | Python | false | false | 791 | py | class Solution(object):
def wallsAndGates(self, rooms):
"""
:type rooms: List[List[int]]
:rtype: None Do not return anything, modify rooms in-place instead.
"""
if not rooms or not rooms[0]: return
mx = 2147483647
queue = collections.deque()
m, n = len... | [
"puggywang@gmail.com"
] | puggywang@gmail.com |
de098df550b8020c1986a3f7251694231eedf731 | 154fd16fe7828cb6925ca8f90e049b754ce06413 | /lino_book/projects/pierre/settings/demo.py | 5a852c545a3c0f23c3e9f594c38761aa446786dd | [
"BSD-2-Clause"
] | permissive | lino-framework/book | 68de2f8d130266bd9d9de7576d30597b3cde1c91 | 4eab916832cd8f48ff1b9fc8c2789f0b437da0f8 | refs/heads/master | 2021-03-27T16:16:55.403940 | 2021-03-15T02:53:50 | 2021-03-15T02:53:50 | 58,830,342 | 3 | 9 | BSD-2-Clause | 2021-03-09T13:11:27 | 2016-05-14T21:02:17 | Python | UTF-8 | Python | false | false | 398 | py | import datetime
from ..settings import *
class Site(Site):
is_demo_site = True
# ignore_dates_after = datetime.date(2019, 05, 22)
the_demo_date = datetime.date(2017,3,12)
def get_installed_apps(self):
yield super(Site, self).get_installed_apps()
yield 'lino_xl.lib.b2c'
SITE ... | [
"luc.saffre@gmail.com"
] | luc.saffre@gmail.com |
9bdd27d883398eb43aa042870a7fa95286b32782 | 15787f163c9b3870123e26792255d2a40904486b | /zhihuuser/zhihuuser/spiders/zhihu.py | cdfc60fc21cc7db4a174210bbb7684a0d3c4d0d5 | [] | no_license | mujinveil/Spider | 80ecb831ce41bc3a3c32203fc1c18395b2a110be | fd0d16ee7edbf399ee00352ae81de2eb72f68e03 | refs/heads/master | 2023-09-02T22:54:21.219647 | 2021-11-23T08:25:51 | 2021-11-23T08:25:51 | 122,899,830 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,880 | py | # -*- coding: utf-8 -*-
import json
from scrapy import Spider, Request
from zhihuuser.items import UserItem
class ZhihuSpider(Spider):
name = "zhihu"
allowed_domains = ["www.zhihu.com"]
user_url = 'https://www.zhihu.com/api/v4/members/{user}?include={include}'
follows_url = 'https://www.zh... | [
"noreply@github.com"
] | mujinveil.noreply@github.com |
108e29fe501e2816fd23b50c99e0fdb0c598732d | cd0cf1c75c715a67502ff7f164bb070da78956de | /tragopan/migrations/0065_auto_20160125_1352.py | e0716564a5e2d51155ee7932f17d4506ac6a242c | [] | no_license | nustarnuclear/orient_linux | 9792fb4319007708861d619dac081fa32206d3f6 | 95082ea56a0dfc248024f9bf54897a017985ccdf | refs/heads/master | 2020-03-28T03:17:02.629719 | 2017-01-04T08:38:16 | 2017-01-04T08:38:16 | 43,117,046 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 469 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('tragopan', '0064_auto_20160125_1050'),
]
operations = [
migrations.AlterField(
model_name='burnablepoisonrod',
... | [
"hengzhang@nustarnuclear.com"
] | hengzhang@nustarnuclear.com |
a69ed123a4179aabd20dfe31c0b0afbf78beed99 | 21682f70ff130169d8800a06b1a6d8bf7f46e45a | /advance python/inheritance/overriding example.py | ffad9312066e958c8535e827130e8c5418cfea60 | [] | no_license | Aravind2595/MarchPythonProject | 03c3aeee40f5ff2c635861ac29f31a7633499d51 | 9aa9241632b7f96e7e1cb33b3adb7b8def36f1f8 | refs/heads/master | 2023-05-05T04:16:45.556737 | 2021-05-20T08:43:52 | 2021-05-20T08:43:52 | 368,791,704 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 465 | py | class Person:
def set(self,job,desig,company):
self.job=job
self.desig=desig
self.company=company
print("job:",self.job,"designation:",self.desig,"company:",self.company)
class Employee(Person):
def set(self,name,age,salary):
self.name=name
self.age=age
se... | [
"nairaravind95@gmail.com"
] | nairaravind95@gmail.com |
dbd578e36e7b9d1d82a0e84d3ecbb095f89a9e0b | 2feaddc19de5490a1b55af08079d7e1d866f4c2d | /node/walt/node/logs/cache.py | 19e214dc5d2316a2665188a166bedb7bf0ac7b0a | [
"BSD-3-Clause"
] | permissive | drakkar-lig/walt-python-packages | 4beba93394da306550a54313800bb455b8652e81 | 2e487767c697aded22ba3e08b26964b45e154559 | refs/heads/master | 2023-09-04T10:53:48.768130 | 2023-09-01T08:05:11 | 2023-09-01T08:05:11 | 24,328,535 | 6 | 3 | BSD-3-Clause | 2023-09-01T08:12:36 | 2014-09-22T12:56:10 | Python | UTF-8 | Python | false | false | 1,153 | py | from time import time
from walt.node.logs.flow import LogsFlowToServer
# User may issue multiple walt-echo commands, resulting
# in many tcp connections to the server.
# In order to avoid this, we keep a cache of connections
# temporarily, one per stream name.
LOGCONN_CACHE_MIN_DELAY = 15
LOGCONN_CACHE_CLEANUP = 0
... | [
"etienne.duble@imag.fr"
] | etienne.duble@imag.fr |
bafdd173e90f627326026b101b16efa8cdbc76f8 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02995/s145490563.py | be883fa0221670a7d465c3c4b744e1a95cef9355 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 336 | py | def calc(a, b):
x = max(a, b)
y = min(a, b)
while True:
c = x % y
if c == 0:
break
x = y
y = c
return y
A, B, C, D = map(int, input().split())
E = int(C * D / calc(C, D))
l = int(B - B // C - B // D + B // E)
m = int((A-1) - (A-1) // C - (A-1) // D + (A-1) /... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
e61d56b99b026834a580a9ab1e5fb2fec4fbc6cc | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/79/usersdata/229/42243/submittedfiles/serie1.py | 541c48059610e84261fd3a1f6c5961fe3b7b5547 | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 186 | py | # -*- coding: utf-8 -*-
import math
n=int(input('digite n:'))
soma=0
for i in range(1,n+1,1):
if i%2==1:
soma=soma+(1/i)
else:
soma=soma-(1/i)
print('%.5f'%soma) | [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
283d8d770fee2273c2cfc275b4299ea82c98087f | 154d4144532b2f0255468fcfb6ea8245e0177050 | /my_python/james_source_inversion/pistf_save_func.py | d3d53365a65f3706a2763f5630af2e21488657ce | [] | no_license | BeardNanuk/my_all7 | 6e83bda73c66c02aa66aaf49f1e9417bccb69bc5 | 6b0a72af5047ce4555dda4cd36f91f7b2b918199 | refs/heads/master | 2020-04-09T10:07:19.521173 | 2018-12-03T21:56:00 | 2018-12-03T21:56:00 | 160,258,952 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 986 | py | #!/usr/bin/env python
## save source inversion as txt - first inversion
## created on Fri Nov 9 16:25:17 UTC 2018
## created by Jiaze He
## revised on Fri Nov 9 16:49:50 UTC 2018
## trace_number range from 1 to 2.
#if flag_save_inverted_stf is 1:
import time
# save_istf_txt_complete_fn = save_istf_txt_first... | [
"jiazehe@gmail.com"
] | jiazehe@gmail.com |
315e16f22a50ffc2212d80349b73cb3daeef3eb7 | 4297f48daaa2aa0f5e4058bbeee111bf9236790e | /fast_weight_rnn/retrieval_test.py | ddc6e2a7d7a454bea04fc129cdac44e872995216 | [] | no_license | HQ01/fast-weight | 21d9c379c8bccc29aced911d35f3b0784a072c8f | e0d9afe15c05fca966bb03a5b571a5486d6629c6 | refs/heads/master | 2021-01-21T11:54:54.423127 | 2017-05-15T13:08:42 | 2017-05-15T13:08:42 | 91,762,993 | 0 | 1 | null | 2017-05-19T03:46:09 | 2017-05-19T03:46:09 | null | UTF-8 | Python | false | false | 3,937 | py | import mxnet.symbol as symbol
from minpy.core import Function
from minpy.core import grad_and_loss as gradient_loss
import minpy.nn.init as initializers
import minpy.nn.layers as layers
from minpy.nn.model import ModelBase
import minpy.numpy as np
from minpy.context import set_context, cpu
set_context(cpu())
def batc... | [
"yg1246@nyu.edu"
] | yg1246@nyu.edu |
18ede1b9712158a12fc4ac6f0b025edfe0c29117 | c1bd12405d244c5924a4b069286cd9baf2c63895 | /azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/security_rule_associations_py3.py | 9e5be5698d83eb71302590f91a24e0fd15b8e43a | [
"MIT"
] | permissive | lmazuel/azure-sdk-for-python | 972708ad5902778004680b142874582a284a8a7c | b40e0e36cc00a82b7f8ca2fa599b1928240c98b5 | refs/heads/master | 2022-08-16T02:32:14.070707 | 2018-03-29T17:16:15 | 2018-03-29T17:16:15 | 21,287,134 | 1 | 3 | MIT | 2019-10-25T15:56:00 | 2014-06-27T19:40:56 | Python | UTF-8 | Python | false | false | 2,234 | 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 ... | [
"noreply@github.com"
] | lmazuel.noreply@github.com |
7610a5597db2d3164731c6825b37077b52a4e22b | ce4f7f8e9336b8bbf9cbfe147d922e37034ab6c3 | /old/ABC166/D.py | bb783e375271ef3be894dd2e829516a2bf28c054 | [] | no_license | kussy-tessy/atcoder | 5604919747242ee9740b9131bb6e168e96af0151 | ee917fa5a5218d4a9e72f710d0d844e7c203f13b | refs/heads/master | 2023-07-21T09:25:15.464881 | 2021-09-04T14:06:02 | 2021-09-04T14:06:02 | 311,221,203 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 516 | py | from math import sqrt
import sys
# print('input >>')
X = int(input())
if X == 1:
print(0, -1)
for x in range(1, int(sqrt(X))):
if X % x == 0:
flg = False
for a in range(1000000):
if (a-1) ** 5 - (a-1-x) ** 5 < a ** 5 - (a-x) ** 5:
flg = True
... | [
"teppei04285000@gmail.com"
] | teppei04285000@gmail.com |
a531a120df8394a235aeef4483b3e768c8b4dcb5 | 371889e50171ae59d1ca6bb4b8f88ceabf8e105e | /Fundamentals/ClassesAndObjects/T01Storage.py | 9c864dfd24a4ff8871a0e46735cd04f856d38c54 | [] | no_license | RuzhaK/pythonProject | ca56c98df029896ca0658d5b2d103e21bbfeb71c | 1f2f05f071d0efd356996731831b375aa255bec3 | refs/heads/master | 2023-03-14T06:56:34.463786 | 2021-03-08T07:52:37 | 2021-03-08T07:52:37 | 343,766,289 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 754 | py | class Storage:
def __init__(self, capacity):
self.capacity = capacity
self.storage = []
def add_product(self, product):
if len(self.storage) < self.capacity:
self.storage.append(product)
def get_products(self):
return self.storage
#todo edin test ne minava
# c... | [
"rkaraatanasova@gmail.com"
] | rkaraatanasova@gmail.com |
5e49eb56e688461a50db04976d8bd2473ca37945 | cc8010890757670cc2933a6cc2477f3bc10f53b4 | /python/tests/test_refloader.py | 39ee345a6b507f9005904c5059f17c73b4d13105 | [
"MIT"
] | permissive | GenEditID/GenEditID | 209153fe16610afa4fe4ed38b34f82905a808dc1 | dd4f454bab1e9d1d64170a16eb7c247799afd436 | refs/heads/master | 2022-06-11T05:40:22.404699 | 2022-04-05T22:12:27 | 2022-04-05T22:12:27 | 183,217,466 | 0 | 2 | MIT | 2022-04-05T22:12:28 | 2019-04-24T11:44:44 | HTML | UTF-8 | Python | false | false | 694 | py | from geneditid.config import cfg
from geneditid.connect import dbsession
from geneditid.loader import RefLoader
from geneditid.model import Genome
class TestRefLoader:
def test_load_genomes(self):
ref_loader = RefLoader(dbsession)
ref_loader.load_genomes()
genomes = dbsession.query(Genome)... | [
"pajanne@gmail.com"
] | pajanne@gmail.com |
b0a109d57a9147c72d309a1475aff404e41f0c6e | f13acd0d707ea9ab0d2f2f010717b35adcee142f | /Others/math-and-algorithm/s/main.py | 4374facf107d67842d866d7d4d5c576ad4bfe9b7 | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | KATO-Hiro/AtCoder | 126b9fe89fa3a7cffcbd1c29d42394e7d02fa7c7 | bf43320bc1af606bfbd23c610b3432cddd1806b9 | refs/heads/master | 2023-08-18T20:06:42.876863 | 2023-08-17T23:45:21 | 2023-08-17T23:45:21 | 121,067,516 | 4 | 0 | CC0-1.0 | 2023-09-14T21:59:38 | 2018-02-11T00:32:45 | Python | UTF-8 | Python | false | false | 344 | py | # -*- coding: utf-8 -*-
def main():
from collections import Counter
import sys
input = sys.stdin.readline
n = int(input())
a = list(map(int, input().split()))
c = Counter(a)
ans = 0
for key, value in c.items():
ans += value * (value - 1) // 2
print(ans)
if __name__ ==... | [
"k.hiro1818@gmail.com"
] | k.hiro1818@gmail.com |
07aad7d20ff2cdcdde4e187fd2ef21cee76d7cd3 | 914626bf92d528766bf4b9402f5f120caccbe5cf | /DFSBFS_단어변환.py | 5c4b37dac11fc13f5a682e3bdff21493e40e4441 | [] | no_license | LINDBURG/Programmers | 64ee0a193f407c9802f7fbda64c27c6adb4a26d3 | adf94767ebe2d4d63aa17bf52ece0c74873aec5c | refs/heads/master | 2020-12-27T06:47:59.062955 | 2020-11-28T07:29:08 | 2020-11-28T07:29:08 | 237,799,965 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,191 | py | def BFS(now, target, graph):
visited = [0]*len(graph)
queue = [now]
visited[now] = 1
while(len(queue) >0):
now = queue.pop()
for idx in range(len(graph)):
if (graph[now][idx] ==1 and idx == target):
return visited[now]
elif (graph[now][idx] ==... | [
"monc2170@gmail.com"
] | monc2170@gmail.com |
368171ec5768f412a6b5ee0d272f3440ed9fd347 | 8432b6a3d3d15f6d5e098cbf8ac81739f91fb26a | /setup.py | 273f327881d0b43cef5e1a0d6bfd060b887bbdd8 | [
"BSD-2-Clause"
] | permissive | brandonseverin/python-nameless | 69ad68f52675b2514371fdf0dcd1354a7d894535 | e81c19668e08650e4be951f4c563ac50511e1657 | refs/heads/master | 2023-01-12T21:31:34.389499 | 2020-11-04T02:40:41 | 2020-11-04T02:43:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,282 | py | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
import io
import os
import re
from glob import glob
from os.path import basename
from os.path import dirname
from os.path import join
from os.path import relpath
from os.path import splitext
fr... | [
"contact@ionelmc.ro"
] | contact@ionelmc.ro |
d17645ba08b0afc970676a40f9b11a6edaf7ec3c | 891902687207fb335b65dbb8d31d6e20301764f9 | /pe089.py | 7c3d73c8409c63ace249ce3833e943884fec9874 | [] | no_license | maecchi/PE | 93bd050eaca2733aa37db6ca493b820fe3d7a351 | 3d9092635807f0036719b65adb16f1c0926c2321 | refs/heads/master | 2020-05-04T16:38:36.476355 | 2012-06-10T05:26:10 | 2012-06-10T05:26:10 | 1,746,853 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 999 | py | #!/usr/bin/env python
#-*- coding: utf-8 -*-
#
# pe089.py - Project Euler
#
import re
# ローマ字辞書
roma_dic = {
'CM': 900,
'CD': 400,
'M': 1000,
'D': 500,
'XC': 90,
'XL': 40,
'C': 100,
'L': 50,
'IX': 9,
'IV': 4,
'X': 10,
'V': 5,
'I': 1
}
priority_romans = ['CM', 'CD', 'M', 'D', 'XC', 'XL', 'C', 'L', 'IX', 'IV'... | [
"aos81922710@yahoo.co.jp"
] | aos81922710@yahoo.co.jp |
ec60401ce6e75e83bcc794b8398821330baf6311 | 5d42a2148379c159968801c9cb6c7bd655c02ad0 | /src/test/dimbo/protobuf/clinfo/SConscript | 320399f8699ad641c15ca03a5499e5530c57e3dc | [
"MIT"
] | permissive | ptomulik/dimbo | a6415d0c050007921cd75e5c1bfbe856c6c295e4 | 6a810b39916be9c3f9157f27b63f8713598ccf6b | refs/heads/master | 2021-01-02T09:52:22.815197 | 2014-06-12T15:07:35 | 2014-06-12T15:07:35 | 15,337,305 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,691 | #
# @COPYRIGHT@
#
# 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, distribute, sublicense, ... | [
"ptomulik@meil.pw.edu.pl"
] | ptomulik@meil.pw.edu.pl | |
5aee797512e219aac08aca1b166cb8acdecb3625 | c36e8bb3760d9063d64d241d98098858a4d867b1 | /setup.py | 8952ebe928af268ff270d47428ad27703db166b2 | [] | no_license | morlandi/easy_backup | 6ac92590f8b2804a7f1343defd969262c238acb7 | 6549eac6a6ec48f516350ff8e93e3f2f41b75c4c | refs/heads/master | 2021-07-18T20:53:12.353024 | 2020-04-15T15:42:52 | 2020-04-15T15:42:52 | 133,095,927 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,483 | py | import os
import re
from setuptools import setup
def get_version(*file_paths):
"""Retrieves the version from specific file"""
filename = os.path.join(os.path.dirname(__file__), *file_paths)
version_file = open(filename).read()
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_fil... | [
"morlandi@brainstorm.it"
] | morlandi@brainstorm.it |
b14dac472a72a4cce6ff2b985c308fb9b39f0f78 | 383283b9fdb21435ac61c45ebdc7be8cdf352ff6 | /Code_Challenge/Day Thirteen and Fourteen Blueprint/wwr.py | 1eb514b755fc1d7e8fbc7c92cc761b040037ff5d | [] | no_license | donhwi94/NomadCoders_WebScrapper_with_Python | ec64e74a685b2e1dd2c2d98964a63b31e86de1b5 | 6c96a59b653932851f412a64e369af1a89e6ec89 | refs/heads/main | 2023-04-04T19:58:10.810687 | 2021-04-21T06:17:41 | 2021-04-21T06:17:41 | 349,979,660 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 949 | py | import requests
from bs4 import BeautifulSoup
def extract_job(results):
jobs = []
for result in results:
title = result.find('span', {"class":"title"})
if title:
title = title.get_text()
company = result.find('span', {"class":"company"})
if company:
company = company.get_text()
url... | [
"ehsgnl123@naver.com"
] | ehsgnl123@naver.com |
d49d9eb2a6f5964f90afe3db197267f96b52776b | 5da6b63331783b2728bc6b908c75c17864d1abe4 | /8.3 MatrixMax.py | d1f1a06a633e25d6c7490c11862bf476d41fc69e | [] | no_license | ANh0r/LeetCode-Daily | 1c34baca46263da67e5a2b1b184dd441b90ef583 | a9ad5b5bc912a4ce5613000fbc47905510cde5ea | refs/heads/master | 2023-08-24T20:38:40.885292 | 2021-09-13T04:17:09 | 2021-09-13T04:17:09 | 283,934,963 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,298 | py | class Solution:
def maximalRectangle(self, matrix: List[List[str]]) -> int:
if not matrix or not matrix[0]:
return 0
nums = [int(''.join(row), base=2) for row in matrix] #先将每一行变成2进制的数字
ans, N = 0, len(nums)
for i in range(N):#遍历每一行,求以这一行为第一行的最大矩形
j, num = i, n... | [
"819702016@qq.com"
] | 819702016@qq.com |
73e23b55145c619034ff8a2820b2e29693f88a5d | a9e82344db9913167243d563cebd6b30a7632350 | /grocery_store/grocery_store/cart/apps.py | 1f42645d9aa6e96ef5fbb73d3a1affe32a6febb4 | [
"MIT"
] | permissive | DeanDupalov/my_project | ea543211dad23b40084e4f09efab0beb4e6cb99b | 3346f940a246441c46188c20d1ddfbd13a883928 | refs/heads/master | 2023-07-11T12:43:11.571853 | 2021-08-08T06:40:41 | 2021-08-08T06:40:41 | 384,726,588 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 154 | py | from django.apps import AppConfig
class CartConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'grocery_store.cart'
| [
"75751527+DeanDupalov@users.noreply.github.com"
] | 75751527+DeanDupalov@users.noreply.github.com |
e20e716bff140084ad5350c98d4a5afabed3de1f | fbbe424559f64e9a94116a07eaaa555a01b0a7bb | /Keras_tensorflow_nightly/source2.7/tensorflow/python/debug/lib/debug_service_pb2_grpc.py | 16573eab6f0e61c12020c4becb72369c38f05b42 | [
"MIT"
] | permissive | ryfeus/lambda-packs | 6544adb4dec19b8e71d75c24d8ed789b785b0369 | cabf6e4f1970dc14302f87414f170de19944bac2 | refs/heads/master | 2022-12-07T16:18:52.475504 | 2022-11-29T13:35:35 | 2022-11-29T13:35:35 | 71,386,735 | 1,283 | 263 | MIT | 2022-11-26T05:02:14 | 2016-10-19T18:22:39 | Python | UTF-8 | Python | false | false | 5,141 | py | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"ryfeus@gmail.com"
] | ryfeus@gmail.com |
a11766029ed1464dba5dcfeddbf10a9b1b52751f | 13fdfd03d975c2b94d08a84f05f452c697186a44 | /ant_book/2_1/stack2.py | e8885e74556d6f2124d7fb502f24b380b8a0e1a4 | [] | no_license | poponzu/atcoder1 | 7243da9250d56eb80b03f1a8f4a3edb9df9e5515 | 64a52bac4cf83842167ca1ce1229c562dabd92a3 | refs/heads/master | 2023-08-22T02:10:52.639566 | 2021-10-09T14:23:46 | 2021-10-09T14:23:46 | 385,467,500 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 493 | py | # # スタック
# s = []
#
# s.append(1) # [1]
# s.append(2) # [1, 2]
# s.append(3) # [1, 2, 3]
# s.pop() # 一番上から取り除く [1, 2, 3] -> [1, 2]
# print(s)
# s.pop() # [1, 2] -> [1]
# print(s)
# s.pop() # [1] -> []
# print(s)
from collections import deque
s = deque([])
s.append(1) # [1]
s.append(2) # [1, 2]
s.a... | [
"grape.daiki.sora@icloud.com"
] | grape.daiki.sora@icloud.com |
73016fdaaad0625235bff84242b0114a1068eb3f | 87b306010b07df2a53f7dd817d26b8b41107a0f4 | /apps/comunes/utils.py | a294ad4560d3927e9d91f67eac4a632f2c803306 | [] | no_license | robertowest/django-adminlte2 | 484b5c62f4a6a710277ab5e0a9ccce130f549a35 | 7a6a9374b3cd40884a0e8a4cbc6306470765aacc | refs/heads/master | 2020-08-27T07:08:36.864417 | 2019-10-25T17:52:10 | 2019-10-25T17:52:10 | 217,279,592 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 395 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import threading
_thread_locals = threading.local()
def set_current_user(user):
_thread_locals.user=user
def get_current_user():
# return getattr(_thread_locals, 'user', None)
import pdb; pdb.set_trace()
return getattr(_thread_locals,... | [
"roberto.west@gmail.com"
] | roberto.west@gmail.com |
91c0f413c19bde40cfc6969d46026653b36d75e3 | 0e4df81fb59129d23ccc820b11117ba78a372099 | /nested_logic.py | d04aabcd6e7f3dff69e18c837ef2ec62508b98c0 | [] | no_license | crishonsou/hackerrank_30_days_of_code | ffdb51163a4e14d2b8438a8e01183f31b4d9a138 | aa267d82915dd7d3cfb6f5cbfb52b86497044b84 | refs/heads/main | 2022-12-22T18:06:51.595103 | 2020-10-06T15:07:15 | 2020-10-06T15:07:15 | 301,764,193 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 418 | py | actually = str(input()).split(" ")
da = int(actually[0])
ma = int(actually[1])
ya = int(actually[2])
expected = str(input()).split(" ")
de = int(expected[0])
me = int(expected[1])
ye = int(expected[2])
fine = 0
if ya > ye:
fine = 10000
elif ya == ye:
if ma > me:
fine = (ma - me) * 500... | [
"noreply@github.com"
] | crishonsou.noreply@github.com |
170b63f49747442890f8cb1ead69adb1a5ab1618 | 6be8aa517e679b33b47d35f100e6590902a8a1db | /String/Problem04.py | 9f92ba5c53d5c4f68be67ba905d619966954b500 | [] | no_license | LeeJuhae/Algorithm-Python | 7ca4762712e5e84d1e277abecb3bf39c9cbd4e56 | 729947b4428205adfbac194a5527b0eeafe1c525 | refs/heads/master | 2023-04-24T01:02:36.430970 | 2021-05-23T07:17:25 | 2021-05-23T07:17:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 795 | py | #%% https://programmers.co.kr/learn/courses/30/lessons/60058?language=python3
import re
def splitString(s):
cnt = [0,0]
for i in range(len(s)):
if s[i] == '(':
cnt[0] += 1
else:
cnt[1] += 1
if cnt[0] == cnt[1]:
return s[0:i+1],s[i+1:]
def isRightBalanc... | [
"gusdn0657@gmail.com"
] | gusdn0657@gmail.com |
0635f511e1f6f89159fead94c9ab460b0f46683a | 52b5fa23f79d76883728d8de0bfd202c741e9c43 | /kubernetes/test/test_v1_portworx_volume_source.py | cf527358841efa219be9ee0341f466042d48ff0d | [] | no_license | kippandrew/client-python-tornado | 5d00810f57035825a84e37ff8fc89a7e79aed8da | d479dfeb348c5dd2e929327d800fe033b5b3b010 | refs/heads/master | 2021-09-04T13:01:28.275677 | 2018-01-18T23:27:34 | 2018-01-18T23:27:34 | 114,912,995 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,013 | py | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: v1.8.6
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import un... | [
"andy@rstudio.com"
] | andy@rstudio.com |
7912db2bbede74af275d8e5ac7e14221b980f741 | d99e5b65624f115db6982dd88af9390e8d766042 | /tensorflow/contrib/distributions/python/kernel_tests/operator_pd_identity_test.py | 1a6d79e67dc957a1d7a4076b6db5af0d16bb7ca7 | [
"Apache-2.0"
] | permissive | golbin/tensorflow | 03dbecb6f093f5628c072086c780659bcc14dba8 | 8a58a304bdcf909f8b55ec49e9280fc3af01c7d3 | refs/heads/master | 2021-01-12T07:05:41.360503 | 2016-12-20T00:15:41 | 2016-12-20T00:15:41 | 76,907,006 | 2 | 0 | null | 2016-12-19T23:58:44 | 2016-12-19T23:58:43 | null | UTF-8 | Python | false | false | 4,081 | py | # Copyright 2016 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... | [
"gardener@tensorflow.org"
] | gardener@tensorflow.org |
373a9b7367fb4dd4d5918f051b862495ac8f04b9 | faa505ae84d6d7dc842e81593cbf2730b34d3c56 | /Tittle/core/font.py | d45797d9aea6bdb37ffbb161d7f0701fd5f2a9a7 | [
"Artistic-2.0"
] | permissive | Toofifty/Tittle | 662bbfebd472b80f463f2d11c352853bde447018 | 3566e91834e89e8e52329f2dfa4d2cb49ca3ec4c | refs/heads/master | 2020-05-17T16:21:02.753606 | 2014-06-11T09:29:51 | 2014-06-11T09:29:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,837 | py | #! /usr/bin/env python
import os, pygame
CHARS = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
'... | [
"amatho250@gmail.com"
] | amatho250@gmail.com |
a53fab52fbc176f78574b11890bc8c30beb9aad8 | 90cea58e80309d2dff88f73f3a43ed5f943ff97d | /MergeIntervals.py | 9456f8c0ff7d28947e719a9f4d9d4067ff5b09ed | [] | no_license | SaiSujithReddy/CodePython | 0b65c82b0e71dba2bbd4c1aefec4e6cd6fd42341 | 4c05b7909092009afffa4536fd284060d20e462d | refs/heads/master | 2022-02-24T09:21:15.284745 | 2019-10-07T23:36:17 | 2019-10-07T23:36:17 | 106,611,251 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,581 | py | '''
Leet code
56. Merge Intervals
Given a collection of intervals, merge all overlapping intervals.
For example,
Given [1,3],[2,6],[8,10],[15,18],
return [1,6],[8,10],[15,18].
'''
'''
Initial try with lists merging
j =0
new_list = [list_ofLists[i][0],list_ofLists[i][1]]
for i in range(0, len(list_ofLists)):
#p... | [
"sai.marapareddy@gmail.com"
] | sai.marapareddy@gmail.com |
8cdbe7a0541eef5428f801f2c146c0764e582c57 | f305f84ea6f721c2391300f0a60e21d2ce14f2a5 | /11_动态规划/dp分类/计数dp/1416. 恢复数组.py | 92fb85dad9b68ff6a50a6aa6e4fee8129823dda0 | [] | no_license | 981377660LMT/algorithm-study | f2ada3e6959338ae1bc21934a84f7314a8ecff82 | 7e79e26bb8f641868561b186e34c1127ed63c9e0 | refs/heads/master | 2023-09-01T18:26:16.525579 | 2023-09-01T12:21:58 | 2023-09-01T12:21:58 | 385,861,235 | 225 | 24 | null | null | null | null | UTF-8 | Python | false | false | 1,124 | py | from functools import lru_cache
# 某个程序本来应该输出一个整数数组。但是这个程序忘记输出空格了以致输出了一个数字字符串,
# 我们所知道的信息只有:数组中所有整数都在 [1, k] 之间,且数组中的数字都没有前导 0 。
# 1 <= s.length <= 10^5.
MOD = int(1e9 + 7)
class Solution:
def numberOfArrays(self, s: str, k: int) -> int:
# 以i为字符串起点的方案数
@lru_cache
def dfs(in... | [
"lmt2818088@gmail.com"
] | lmt2818088@gmail.com |
5022a2cd0da2463c88ee6077e609885abbe7ee73 | 4be93b6b4ba2905ae8cf998f197d5db3ed1f1a01 | /setup.py | fd2ce27b4a316af4e3e29384935cf94c6df441eb | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | stjordanis/paranoidscientist | 985976debf1a4cc2c5453b4b443fef373adf9780 | 8dcb745f1f6164c74788c5c4eb003db99c42bbe7 | refs/heads/master | 2023-07-12T12:23:11.092247 | 2021-06-23T20:45:47 | 2021-06-23T20:45:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,352 | py | # Copyright 2018 Max Shinn <max@maxshinnpotential.com>
#
# This file is part of Paranoid Scientist, and is available under the
# MIT license. Please see LICENSE.txt in the root directory for more
# information.
from setuptools import setup
from paranoid._version import __version__
with open("README.md", "r") as f:... | [
"max@maxshinnpotential.com"
] | max@maxshinnpotential.com |
803a5c96ba43cc81fbe73252e0992b814e5ded50 | e86d020f8ade86b86df6ad8590b4458a9d415491 | /test-xooj/x_vulns/setting.py | feb67423962dab64aa7158a6a614e206a0f45992 | [
"BSD-2-Clause"
] | permissive | g842995907/guops-know | e4c3b2d47e345db80c27d3ba821a13e6bf7191c3 | 0df4609f3986c8c9ec68188d6304d033e24b24c2 | refs/heads/master | 2022-12-05T11:39:48.172661 | 2019-09-05T12:35:32 | 2019-09-05T12:35:32 | 202,976,887 | 1 | 4 | null | 2022-11-22T02:57:53 | 2019-08-18T08:10:05 | JavaScript | UTF-8 | Python | false | false | 801 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from common_framework.x_setting.settings import APISettings
DEFAULTS = {
'MENU': (
),
'WEB_MENU': (
{
'name': _('x_vulnerability'),
'parent': None,
... | [
"842995907@qq.com"
] | 842995907@qq.com |
e6c75f01c738e509f547958bcf33e4cb469a2a05 | 283815445952a37e0124801b456844774355733f | /app/tests/base.py | d9bb2e951097482773b1cf878263dd0f746b61c0 | [] | no_license | paulosjd/woodrecs | 7aa4bec22f2c126bd51023e141f1a113c8faf3d8 | 19a8a53c753ae0978fc092d9a2f6f560dc8644bf | refs/heads/master | 2022-07-07T08:36:06.902801 | 2020-11-08T21:59:00 | 2020-11-08T21:59:00 | 251,587,209 | 0 | 0 | null | 2022-06-22T01:36:43 | 2020-03-31T11:47:53 | Python | UTF-8 | Python | false | false | 1,317 | py | from django.test import TestCase
from app.models import Parameter, User
class BaseTestCase(TestCase):
@classmethod
def setUpClass(cls):
super(BaseTestCase, cls).setUpClass()
user = User.objects.create(username='tester')
user2 = User.objects.create(username='tester2')
cls.prof... | [
"pjdavis@gmx.com"
] | pjdavis@gmx.com |
850ca5688b7ee17aa2baef28ad6a6a97094494f1 | 132ca821f81ed3ea731d5efbed748dcc4b6762e6 | /ctest/compare.py | f0da35298891fe6c9a1c515f380b1e11f6b7c88c | [] | no_license | RapidLzj/sep | 0b5f3b8773d73e93b0aaa0f78bae5359d3bda2be | f00fd87b678aae92adf612575357975c00205ce5 | refs/heads/master | 2020-12-25T11:31:37.074235 | 2016-06-08T16:55:55 | 2016-06-08T16:55:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,062 | py | #!/usr/bin/env python
from __future__ import print_function
import sys
def read_table(fname):
rows = []
for line in open(fname, 'r'):
l = line.strip()
if len(l) == 0 or l[0] == '#': continue
items = l.split()
typed_items = []
for it in items:
try:
... | [
"kylebarbary@gmail.com"
] | kylebarbary@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.